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
El tiempo de vida que le queda a los fragmentos.
public double getFragmentsLifeTime() { return this.fragmentsLifeTime; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int esquinas(){\n int v=0;\n if (fila==0 && columna==0){\n if(automata.getElemento(fila,columna+1)!=null && automata.getElemento(fila,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna+1)!=null && automata.getElemento(fila+1,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna)!=null && automata.getElemento(fila+1,columna).isVivo()){v++;}\n }\n else if(fila==0 && columna==15){\n if(automata.getElemento(fila,columna-1)!=null && automata.getElemento(fila,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna-1)!=null && automata.getElemento(fila+1,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna)!=null && automata.getElemento(fila+1,columna).isVivo()){v++;}\n }\n else if(fila==15 && columna==0){\n if(automata.getElemento(fila-1,columna)!=null && automata.getElemento(fila-1,columna).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna+1)!=null && automata.getElemento(fila-1,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila,columna+1)!=null && automata.getElemento(fila,columna+1).isVivo()){v++;}\n }\n else if(fila==15 && columna==15){\n if(automata.getElemento(fila-1,columna)!=null && automata.getElemento(fila-1,columna).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna-1)!=null && automata.getElemento(fila-1,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila,columna-1)!=null && automata.getElemento(fila,columna-1).isVivo()){v++;}\n }\n return v;\n }", "public Long getFragments() {\n return this.fragments;\n }", "public void somaVezes(){\n qtVezes++;\n }", "public int vecinos(){\n int v=0;\n if(fila<15 && columna<15 && fila>0 && columna>0){\n if(automata.getElemento(fila,columna-1)!=null && automata.getElemento(fila,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna-1)!=null && automata.getElemento(fila+1,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna)!=null && automata.getElemento(fila+1,columna).isVivo()){v++;} \n if(automata.getElemento(fila+1,columna+1)!=null && automata.getElemento(fila+1,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila,columna+1)!=null && automata.getElemento(fila,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna+1)!=null && automata.getElemento(fila-1,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna)!=null && automata.getElemento(fila-1,columna).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna-1)!=null && automata.getElemento(fila-1,columna-1).isVivo()){v++;}\n }\n else{v=limitesX();}\n return v;\n }", "public int limitesY(){\n int v=0;\n if (columna==0 && fila>0 && fila<15){\n if(automata.getElemento(fila+1,columna)!=null && automata.getElemento(fila+1,columna).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna+1)!=null && automata.getElemento(fila+1,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila,columna+1)!=null && automata.getElemento(fila,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna+1)!=null && automata.getElemento(fila-1,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna)!=null && automata.getElemento(fila-1,columna).isVivo()){v++;}\n }\n else if (columna==15 && fila>0 && fila<15){\n if(automata.getElemento(fila+1,columna)!=null && automata.getElemento(fila+1,columna).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna-1)!=null && automata.getElemento(fila+1,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila,columna-1)!=null && automata.getElemento(fila,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna-1)!=null && automata.getElemento(fila-1,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna)!=null && automata.getElemento(fila-1,columna).isVivo()){v++;}\n }\n else{v=esquinas();}\n return v;\n }", "public void findTrack() {\n for (Node n : start_node.getLinks()) {\n precedenti.put(n, start_node);\n valori.put(n, calculator.calcDistance(n, start_node));\n }\n while (!da_collegare.isEmpty()) {\n Node piu_vicino = null;\n double min = Double.MAX_VALUE;\n for (Node n : da_collegare) {\n double dist = valori.get(n);\n if (dist - min < THRESHOLD) {\n min = dist;\n piu_vicino = n;\n }\n }\n double dist = valori.get(piu_vicino);\n for (Node n : piu_vicino.getLinks()) {\n double ricalc = dist + calculator.calcDistance(n, piu_vicino);\n if (ricalc - valori.get(n) < THRESHOLD) {\n precedenti.put(n, piu_vicino);\n valori.put(n, ricalc);\n }\n }\n da_collegare.remove(piu_vicino);\n }\n }", "@Override\r\n\tpublic TVA rechercherParId(TVA t) {\n\t\treturn null;\r\n\t}", "private int proximo_sequencia(int atual){\n if (atual + Utils.tamanho_util_pacote > Utils.numero_max_seq) return (atual + Utils.tamanho_util_pacote) - Utils.numero_max_seq;\n else return atual + Utils.tamanho_util_pacote;\n\n }", "public int limitesX(){\n int v=0;\n if (fila==0 && columna>0 && columna<15){\n if(automata.getElemento(fila,columna-1)!=null && automata.getElemento(fila,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna-1)!=null && automata.getElemento(fila+1,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna)!=null && automata.getElemento(fila+1,columna).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna+1)!=null && automata.getElemento(fila+1,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila,columna+1)!=null && automata.getElemento(fila,columna+1).isVivo()){v++;}\n }\n else if (fila==15 && columna>0 && columna<15){\n if(automata.getElemento(fila,columna-1)!=null && automata.getElemento(fila,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna-1)!=null && automata.getElemento(fila-1,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna)!=null && automata.getElemento(fila-1,columna).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna+1)!=null && automata.getElemento(fila-1,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila,columna+1)!=null && automata.getElemento(fila,columna+1).isVivo()){v++;}\n }\n else{v=limitesY();}\n return v;\n }", "@Override\n public long estimateSize(){\n return ((long)upTo)-from+last;\n }", "@Override\n public void cliclou(String time) {\n FragmentManager fragmentManager = getFragmentManager();\n DetalheFrag detalheFrag = (DetalheFrag) fragmentManager.findFragmentById(R.id.detalheFrag);\n\n if(detalheFrag != null && detalheFrag.isInLayout()){\n // mudar o texto do frag da direita\n detalheFrag.setNome(time);\n }else{\n\n //chamar outra tela\n timeBck = time;\n Intent intent = new Intent(this, DetalheActivity.class);\n intent.putExtra(\"time\", time);\n startActivityForResult(intent, 1);\n }\n\n }", "public long getIdCargaTienda();", "public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n mView = inflater.inflate(R.layout.fragment_nb_time, container, false);\n tv_showtime = (TextView) mView.findViewById(R.id.tv_showtime);\n\n indicatorLayout = (RelativeLayout)mView.findViewById(R.id.indicator3);\n bar = (ImageView)indicatorLayout.findViewById(R.id.phase1_bar);\n bar.setImageResource(R.drawable.progress_indicate_bar);\n dot1 = (TextView)indicatorLayout.findViewById(R.id.phase1_dot);\n dot1.setBackgroundResource(R.drawable.progress_bar_mark);\n dot2 = (TextView)indicatorLayout.findViewById(R.id.phase1_dot);\n dot2.setBackgroundResource(R.drawable.progress_bar_mark);\n\n getFragment.getNumber(3);\n\n Bundle bundleget = getArguments();\n final String getTime = bundleget.getString(\"time\"); // time string need to be analyzed\n barphone = bundleget.getString(\"barphone\");\n orderID = bundleget.getString(\"orderID\");\n hairstyle = bundleget.getString(\"hairstyle\");\n remark = bundleget.getString(\"remark\");\n final String sex = bundleget.getString(\"sex\");\n date = bundleget.getString(\"date\");\n distance = bundleget.getString(\"distance\");\n final String address = bundleget.getString(\"address\");\n barberName = bundleget.getString(\"barberName\");\n\n //final String getTime = \"6:20-6:40-7:40-12:00-15:40-16:20-18:40-20:20\";\n //final String date = \"20140808\";\n\n final ArrayList<MyTimeMark> time = new ArrayList<MyTimeMark>(TimeUtil.getAvailableTime(TimeUtil.pharseTimeString(getTime)));\n MyTimeMark myTimeMark; // store bianliang\n hour = new String[time.size()]; //get String for hour_picker\n for(int i = 0;i<time.size();i++)\n {\n hour[i] =Integer.toString(time.get(i).getHour());\n }\n minute_Picker = (NumberPicker) mView.findViewById(R.id.minute_picker); // minute_picker\n hour_Picker = (NumberPicker) mView.findViewById(R.id.hour_picker); //hour_picker\n hour_Picker.setDisplayedValues(hour);\n hour_Picker.setMaxValue(hour.length-1);\n hour_Picker.setMinValue(0);\n\n hour_Picker.setOnValueChangedListener(new NumberPicker.OnValueChangeListener() {\n @Override\n public void onValueChange(NumberPicker picker, int oldVal, final int newVal) { //newVal is index\n isChooseTime = true;\n ArrayList<MyTimeMark> timeInner = new ArrayList<MyTimeMark>(TimeUtil.getAvailableTime(TimeUtil.pharseTimeString(getTime)));\n int zeroMark = timeInner.get(newVal).getZeroMark();\n int twentyMark = timeInner.get(newVal).getTwentyMark(); //监听器的参数都是数组下标所以要通过下标来确定所选时间\n int fourtyMark = timeInner.get(newVal).getFourtyMark(); //对于小时可从上面的hour[]数组获得 即hour[newhour]\n int sum = zeroMark*0+twentyMark*20+fourtyMark*40;\n final int newhour = newVal;\n switch (zeroMark+twentyMark+fourtyMark)\n {\n case 1: if(sum == 0)\n tempsum = sum+\"0\";\n String minute1 [] = {sum+\"\"};\n minute_Picker.setMaxValue(0); //只有一种分钟选择的时候 不可能检测到分钟改变所以 直接以默认分钟为所选分钟\n minute_Picker.setDisplayedValues(minute1);\n minute_Picker.setMinValue(0);\n tv_showtime.setText(\"已选择时间\"+date+\" \"+ hour[newhour]+\"时\"+sum+\"分\");\n //commitTime = date+\";\"+hour[newhour]+\".\"+sum;\n commitTime = correctTime(date,hour[newhour],sum+\"\");\n isChooseTime = true;\n //getFinalTime.getFinalTime(commitTimw); //接口传值\n break;\n case 2: String []minute2 = new String[2]; //两种和三种分钟情 的情况差不多 分钟从 minute[]数组里面取 但是内部类访问要求数组为final\n switch (sum) //所以吧minute[]数组赋给拎一个 final数组 从而取值\n {\n case 20: minute2[0] = \"00\";minute2[1] = \"20\";break;\n case 40: minute2[0] = \"00\";minute2[1] = \"40\";break;\n case 60: minute2[0] = \"20\";minute2[1] = \"40\";break;\n }\n minute_Picker.setDisplayedValues(minute2);\n minute_Picker.setMaxValue(1);\n minute_Picker.setMinValue(0);\n final String getMinute2[] = minute2;\n String initminute2 = getMinute2[0]; //如果用户不选择分钟那么默认的分钟时 数组的第0个\n //commitTime = date+\";\"+hour[newhour]+\".\"+initminute2;\n commitTime = correctTime(date,hour[newhour],initminute2);\n //getFinalTime.getFinalTime(commitTimw); //以上三行就是设置默认时间的\n tv_showtime.setText(\"已选择时间\"+date+\" \" + hour[newhour] + \"时\" + initminute2 + \"分\");\n minute_Picker.setOnValueChangedListener(new NumberPicker.OnValueChangeListener() {\n @Override\n public void onValueChange(NumberPicker picker, int moldVal, int mnewVal) {\n tv_showtime.setText(\"已选择时间\"+date+\" \" + hour[newhour] + \"时\" + getMinute2[mnewVal] + \"分\");\n //commitTime = date+\";\"+hour[newhour]+\".\"+getMinute2[mnewVal]; //最后的提交带有日期和时间的 最终时间\n commitTime = correctTime(date,hour[newhour],getMinute2[mnewVal]);\n isChooseTime = true;\n //getFinalTime.getFinalTime(commitTimw);\n }\n });break;\n case 3: String minute3 [] = {\"00\",\"20\",\"40\"};\n minute_Picker.setDisplayedValues(minute3);\n minute_Picker.setMaxValue(2);\n minute_Picker.setMinValue(0);\n final String getMinute3[] = minute3;\n String initminute3 = getMinute3[0]; //如果用户不选择分钟那么默认的分钟时 数组的第0个\n //commitTime = date+\";\"+hour[newhour]+\".\"+initminute3;\n commitTime = correctTime(date,hour[newhour],initminute3);\n //getFinalTime.getFinalTime(commitTimw); //以上三行就是设置默认时间的\n tv_showtime.setText(\"已选择时间\" +date+\" \"+ hour[newhour] + \"时\" + initminute3 + \"分\");\n minute_Picker.setOnValueChangedListener(new NumberPicker.OnValueChangeListener() {\n @Override\n public void onValueChange(NumberPicker picker, int moldVal, int mnewVal) {\n tv_showtime.setText(\"已选择时间\"+date + \" \"+ hour[newhour]+\"时\"+getMinute3[mnewVal]+\"分\");\n //commitTime = date+\";\"+hour[newhour]+\".\"+getMinute3[mnewVal]; //最后的提交带有日期和时间的 最终时间\n commitTime = correctTime(date,hour[newhour],getMinute3[mnewVal]);\n isChooseTime = true;\n //getFinalTime.getFinalTime(commitTimw);\n }\n });\n }\n }\n });\n\n\n btn_next = (Button) mView.findViewById(R.id.btn_time_next);\n btn_next.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if(isChooseTime == false)\n {\n Toast toast = Toast.makeText(getActivity(),\"您还未选择时间呢\",Toast.LENGTH_SHORT);\n toast.setGravity(Gravity.CENTER,0,0);\n toast.show();\n return;\n }\n\n FragmentManager fragmentManager = getFragmentManager();\n Bundle bundle = new Bundle();\n bundle.putString(\"time\",commitTime);\n bundle.putInt(\"flag\", 1);\n bundle.putString(\"oederID\", orderID);\n bundle.putString(\"barphone\",barphone);\n bundle.putString(\"hairstyle\",hairstyle);\n bundle.putString(\"remark\",remark);\n bundle.putString(\"distance\",distance);\n bundle.putString(\"address\",address);\n bundle.putString(\"sex\",sex);\n bundle.putString(\"barberName\",barberName);\n Fragment fragment = new SubmitFragment();\n fragment.setArguments(bundle);\n FragmentTransaction ft = getFragmentManager().beginTransaction();\n ft.replace(R.id.fragment_container,fragment).addToBackStack(null).commit();\n\n }\n });\n\n return mView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View vista=inflater.inflate(R.layout.fragment_consumo, container, false);\n\n texto1=vista.findViewById(R.id.textView2);\n texto2=vista.findViewById(R.id.textView4);\n texto3=vista.findViewById(R.id.textView6);\n texto4=vista.findViewById(R.id.textView8);\n texto5=vista.findViewById(R.id.textView10);\n texto6=vista.findViewById(R.id.textView12);\n texto7=vista.findViewById(R.id.textView14);\n\n\n texto1.setText(Double.toString((contLum1*100))+\" Watts - \"+Double.toString((contLum1*100*2)/10000)+\" Dolares - \"+Double.toString((contLum1))+\" Horas\");\n texto2.setText(Double.toString((contLum2*100))+\" Watts - \"+Double.toString((contLum2*100*2)/10000)+\" Dolares - \"+Double.toString((contLum2))+\" Horas\");\n texto3.setText(Double.toString((contLum3*100))+\" Watts - \"+Double.toString((contLum3*100*2)/10000)+\" Dolares - \"+Double.toString((contLum3))+\" Horas\");\n texto4.setText(Double.toString((contLum4*100))+\" Watts - \"+Double.toString((contLum4*100*2)/10000)+\" Dolares - \"+Double.toString((contLum4))+\" Horas\");\n texto5.setText(Double.toString((contLum5*100))+\" Watts - \"+Double.toString((contLum5*100*2)/10000)+\" Dolares - \"+Double.toString((contLum5))+\" Horas\");\n texto6.setText(Double.toString((contLum6*100))+\" Watts - \"+Double.toString((contLum6*100*2)/10000)+\" Dolares - \"+Double.toString((contLum6))+\" Horas\");\n\n Double total=contLum1+contLum2+contLum3+contLum4+contLum5+contLum6;\n\n texto7.setText(Double.toString((total*100))+\" Watts - \"+Double.toString((total*100*2)/10000)+\" Dolares - \"+Double.toString((total))+\" Horas\");\n\n return vista;\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_historial, container, false);\n Bundle args = getArguments();\n String dato = args.getString(\"idCuenta\");\n\n Tabla tabla = new Tabla(getActivity(), (TableLayout)v.findViewById(R.id.tabla));\n tabla.agregarCabecera(R.array.cabecera_tabla);\n\n StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();\n\n StrictMode.setThreadPolicy(policy);\n Connection connection;\n String url;\n\n try\n {\n Class.forName(\"net.sourceforge.jtds.jdbc.Driver\");\n url = \"jdbc:jtds:sqlserver://bdAguaPotable.mssql.somee.com;databaseName=bdAguaPotable;user=SYSTEM-APP_SQLLogin_1;password=pn8akqjwxc\";\n connection = DriverManager.getConnection(url);\n Statement estatuto = connection.createStatement();\n\n //cargar la situacion\n String query =\"SELECT Pagos.idPago, Pagos.fecha, Pagos.tipo, Agua.mInicial, Agua.mFinal, Situacion.descripcion, Pagos.otros, Agua.descuento, Pagos.total FROM Pagos inner join Agua on Agua.idPago = Pagos.idPago inner join Situacion on Agua.idSituacion = Situacion.idSituacion WHERE Pagos.idCuenta = \" + dato;\n ResultSet resultado = estatuto.executeQuery(query);\n int x = 1;\n while (resultado.next())\n {\n ArrayList<String> elementos = new ArrayList<String>();\n elementos.add(Integer.toString(x));\n elementos.add(Integer.toString(resultado.getInt(\"idPago\")));\n elementos.add(String.valueOf(resultado.getDate(\"fecha\")));\n elementos.add(resultado.getString(\"tipo\"));\n elementos.add(Integer.toString(resultado.getInt(\"mInicial\")));\n elementos.add(Integer.toString(resultado.getInt(\"mFinal\")));\n elementos.add(resultado.getString(\"descripcion\"));\n elementos.add(Float.toString(resultado.getFloat(\"otros\")));\n elementos.add(Float.toString(resultado.getFloat(\"descuento\")));\n elementos.add(Float.toString(resultado.getFloat(\"total\")));\n tabla.agregarFilaTabla(elementos);\n\n x++;\n }\n\n connection.close();\n\n }catch (SQLException E) {\n E.printStackTrace();\n }catch (ClassNotFoundException e){\n e.printStackTrace();\n }catch (Exception e) {\n e.printStackTrace();\n }\n return v;\n }", "public Uzsakymas paimtiFragmenta() {\n\t\tString[] langeliai = this.file_line.split ( \",\" );\n\t\t\n\t\tUzsakymas uzsakymas = null;\n\t\t\n\t\tif ( ! this.file_line.trim().equals(\"\") ) { \n\t\t\n\t\t\tuzsakymas = new Uzsakymas(); \n\t\t\t\n\t\t\tuzsakymas.setPav ( langeliai [ 0 ] );\n\t\t\tuzsakymas.setTrukme_ruosimo ( 0 );\n\t\t\tuzsakymas.setTrukme_kaitinimo ( 0 );\n\t\t\t\n\t\t\ttry {\n\t\t\t\n\t\t\t\tif ( langeliai.length > 1 ) {\n\t\t\t\t\n\t\t\t\t\tuzsakymas.setTrukme_ruosimo ( Integer.parseInt( langeliai [ 1 ] ) );\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} catch ( Exception e ) {\n\t\t\t\t\n\t\t\t\tuzsakymas.setTrukme_ruosimo ( -1 );\n\t\t\t}\t\t\t\n\t\t\t\t\n\t\t\ttry {\n\t\t\t\t\n\t\t\n\t\t\t\tif ( langeliai.length > 2 ) {\n\t\t\n\t\t\t\t\tuzsakymas.setTrukme_kaitinimo ( Integer.parseInt( langeliai [ 2 ] ) );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} catch ( Exception e ) {\t\n\t\t\t\t\n\t\t\t\tuzsakymas.setTrukme_kaitinimo ( -1 );\n\t\t\t}\n\t\t}\n\t\n\t\treturn uzsakymas;\n\t}", "public final void mo120363a(LiveRoomFragment liveRoomFragment, int i, View.OnClickListener onClickListener) {\n C32569u.m150519b(liveRoomFragment, C6969H.m41409d(\"G6F91D41DB235A53D\"));\n C32569u.m150519b(onClickListener, C6969H.m41409d(\"G658AC60EBA3EAE3B\"));\n mo120362a(liveRoomFragment);\n if (i != 0) {\n ViewGroup a = liveRoomFragment.mo119570a();\n View view = liveRoomFragment.getView();\n FullFitFlowLayout fullFitFlowLayout = view != null ? (FullFitFlowLayout) view.findViewById(R.id.live_container) : null;\n if (fullFitFlowLayout != null) {\n Context context = liveRoomFragment.getContext();\n View inflate = View.inflate(context, R.layout.b9q, null);\n C32569u.m150513a((Object) inflate, C6969H.m41409d(\"G6C8DD138AA24BF26E8\"));\n Drawable background = inflate.getBackground();\n C32569u.m150513a((Object) background, C6969H.m41409d(\"G6C8DD138AA24BF26E8409249F1EEC4C56696DB1E\"));\n background.setAlpha((int) 153.0f);\n inflate.setOnClickListener(new View$OnClickListenerC29020a(context, liveRoomFragment, onClickListener, a, i));\n inflate.setTag(\"end_tag\");\n if (a != null) {\n a.addView(inflate, EndLinkViewHelper.f99522a.m137424a(context, fullFitFlowLayout, i));\n }\n VideoXOnlineLog abVar = VideoXOnlineLog.f101073b;\n abVar.mo121421b(\"xVideo\", \"增加小主播结束对谈 size: \" + i);\n }\n }\n }", "@Override\n\tpublic int sacameVida(ElementoFuente a) {\n\t\treturn 10;\n\t}", "private final Tuples<Integer, Integer> m137836a() {\n int i;\n int measuredWidth = getMeasuredWidth() / getChildCount();\n if (getChildCount() == 1 || LPFit.f99531a.mo120373a()) {\n i = getMeasuredHeight();\n } else {\n i = (int) (((float) measuredWidth) / VideoParams.f96577a.mo116006l());\n }\n return new Tuples<>(Integer.valueOf(measuredWidth), Integer.valueOf(i));\n }", "public int getminutoStamina(){\n return tiempoReal;\n }", "public void testSinglePartitionSpaceBetweenFragments() {\n ActivityFragment eating = new ActivityFragment(\"Eating\", start.minus(hours(8)), start.plus(minutes(5)));\n ActivityFragment sleeping = new ActivityFragment(\"Sleeping\", start.plus(minutes(10)), start.plus(minutes(20)));\n\n List<ActivityFragment> fragments = Lists.newArrayList(eating, sleeping);\n ActivityInterval interval = new ActivityInterval(start, start.plus(minutes(15)), fragments);\n List<ActivityInterval> blocks = DisplayBlock.wrapFragmentsAndClipFreeTime(interval, minutes(5).toStandardDuration());\n\n assertEquals(\"\" + blocks, 3, blocks.size());\n\n assertEquals(start, blocks.get(0).getStart());\n assertEquals(start.plus(minutes(5)), blocks.get(0).getEnd());\n assertNotSame(eating, blocks.get(0).getActivityFragment(0));\n assertTrue(blocks.get(0).getActivityFragment(0).getActivityName().equals(eating.getActivityName()));\n\n assertEquals(start.plus(minutes(5)), blocks.get(1).getStart());\n assertEquals(start.plus(minutes(10)), blocks.get(1).getEnd());\n assertTrue(blocks.get(1).isEmpty());\n\n assertEquals(start.plus(minutes(10)), blocks.get(2).getStart());\n assertEquals(start.plus(minutes(15)), blocks.get(2).getEnd());\n assertNotSame(sleeping, blocks.get(2));\n assertTrue(blocks.get(2).getActivityFragment(0).getActivityName().equals(sleeping.getActivityName()));\n }", "public int probabilidadesHastaAhora(){\n return contadorEstados + 1;\n }", "private void MontarTabela(String where) {\n \n int linha = 0;\n int coluna = 0;\n \n String offset = String.valueOf(getPaginacao());\n \n while(linha < 10){\n while(coluna < 7){\n tbConFin.getModel().setValueAt(\"\", linha, coluna);\n coluna++;\n }\n linha++;\n coluna = 0;\n }\n \n linha = 0;\n \n String rd_id\n ,rd_codico\n ,rd_nome\n ,rd_receita_despesa\n ,rd_grupo\n ,rd_fixa\n ,rd_ativo;\n \n \n \n try{\n ResultSet rsConFin = cc.stm.executeQuery(\"select * from v_receitadespesa \"+where+\" order by rd_codico limit 10 offset \"+offset);\n \n while ( rsConFin.next() ) {\n rd_id = rsConFin.getString(\"RD_ID\");\n rd_codico = rsConFin.getString(\"rd_codico\");\n rd_nome = rsConFin.getString(\"rd_nome\");\n rd_receita_despesa = getRecDesp(rsConFin.getString(\"rd_receita_despesa\"));\n rd_grupo = getSimNao(rsConFin.getString(\"rd_grupo\"));\n rd_fixa = getSimNao(rsConFin.getString(\"rd_fixa\"));\n rd_ativo = getSimNao(rsConFin.getString(\"rd_ativo\"));\n \n tbConFin.getModel().setValueAt(rd_id, linha, 0);\n tbConFin.getModel().setValueAt(rd_codico, linha, 1);\n tbConFin.getModel().setValueAt(rd_nome, linha, 2);\n tbConFin.getModel().setValueAt(rd_receita_despesa, linha, 3);\n tbConFin.getModel().setValueAt(rd_grupo, linha, 4);\n tbConFin.getModel().setValueAt(rd_fixa, linha, 5);\n tbConFin.getModel().setValueAt(rd_ativo, linha, 6);\n \n linha++;\n }\n \n \n if(linha <= 10){\n setMensagem(\"A Busca retornou \"+linha+\" registros!\");\n }\n \n if(linha < 10){\n setFimConsulta(true);\n }else{\n setFimConsulta(false);\n }\n \n }catch(SQLException e){\n JOptionPane.showMessageDialog(this, \"Erro ao Carregar informações de contas financeiras!\\n\"+e.getMessage());\n }\n \n }", "public abstract int getPerTagAvgPoseSolveTime();", "private Map<Vertice<T>, Integer> caminosMinimoDikstra(Vertice<T> origen) {\n \tMap<Vertice<T>, Integer> distancias = new HashMap<Vertice<T>, Integer>();\n \tfor(Vertice<T> unVertice : this.vertices) {\n \t\tdistancias.put(unVertice, Integer.MAX_VALUE);\n \t}\n \tdistancias.put(origen, 0);\n \t\n \t// guardo visitados y pendientes de visitar\n \tSet<Vertice<T>> visitados = new HashSet<Vertice<T>>();\n \tTreeMap<Integer,Vertice<T>> aVisitar= new TreeMap<Integer,Vertice<T>>();\n\n \taVisitar.put(0,origen);\n \t \n \twhile (!aVisitar.isEmpty()) {\n \t\tEntry<Integer, Vertice<T>> nodo = aVisitar.pollFirstEntry();\n \t\tvisitados.add(nodo.getValue());\n \t\t\n \tint nuevaDistancia = Integer.MIN_VALUE;\n \tList<Vertice<T>> adyacentes = this.getAdyacentes(nodo.getValue());\n \t\n \tfor(Vertice<T> unAdy : adyacentes) {\n if(!visitados.contains(unAdy)) {\n Arista<T> enlace = this.buscarArista(nodo.getValue(), unAdy);\n if(enlace !=null) {\n nuevaDistancia = enlace.getValor().intValue();\n }\n int distanciaHastaAdy = distancias.get(nodo.getValue()).intValue();\n int distanciaAnterior = distancias.get(unAdy).intValue();\n if(distanciaHastaAdy + nuevaDistancia < distanciaAnterior ) {\n distancias.put(unAdy, distanciaHastaAdy + nuevaDistancia);\n aVisitar.put(distanciaHastaAdy + nuevaDistancia,unAdy);\n }\n }\n } \t\t\n \t}\n \tSystem.out.println(\"DISTANCIAS DESDE \"+origen);\n \tSystem.out.println(\"Resultado: \"+distancias);\n \treturn distancias;\n }", "public static int getTotalTableFragmentation(final HMaster master) throws IOException {\n Map<String, Integer> map = getTableFragmentation(master);\n return map.isEmpty() ? -1 : map.get(\"-TOTAL-\");\n }", "public long frag_length() {\r\n\t\treturn frag_length_;\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view= inflater.inflate(R.layout.fragment_pedidos, container, false);\n puntoVentaVentas = rutasObj.sacarPuntoVenta(puntoVentaLogin);\n\n //MUESTRA EL MENU DE OPCIONES EN LA TOOLBAR\n setHasOptionsMenu(true);\n\n listView = (ListView)view.findViewById(R.id.listaPedidos);\n\n listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {\n pedidoID = (int)pedidosAdapter.getItemId(i);\n Fragment fragment = DetallesPedidos.newInstance(pedidoID);\n FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction();\n fragmentTransaction.replace(R.id.content_main,fragment);\n fragmentTransaction.addToBackStack(null);\n fragmentTransaction.commit();\n }\n });\n\n //SE INICIALIZA EL PROGRESS DIALOG\n progressDialog = new ProgressDialog(getContext());\n progressDialog.setTitle(\"En Proceso\");\n progressDialog.setMessage(\"Un momento...\");\n progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);\n progressDialog.show();\n //PARA LA CONSULTA DE LAS CLAVES DE LOS CLIENTES EN EL SPINNER\n RequestQueue queue = Volley.newRequestQueue(getContext());\n String consulta = \" SELECT distinct o.id,o.folio,CONCAT(pv.tipo,'-',cc.numero),DATE(o.fecha),\"+\n \" (SELECT SUM( od.precio_final * od.cantidad)\"+\n \" FROM orden_descripcion od, orden ord\"+\n \" where od.orden_id = ord.id\"+\n \" AND ord.id = o.id)\"+\n \" from orden o, punto_venta pv, clave_cliente cc, cliente cli, orden_descripcion od \"+\n \" where o.id not in(Select orden_id from orden_completa)\"+\n \" and o.puntoVenta_id = pv.id\"+\n \" and od.orden_id = o.id \"+\n \" and o.cliente_id = cli.id\"+\n \" and cc.cliente_id=cli.id\"+\n \" and pv.tipo ='\"+puntoVentaVentas+\n \"' and od.precio_final * od.cantidad > 0\" +\n \" order by o.fecha desc;\";\n consulta = consulta.replace(\" \", \"%20\");\n String cadenaClaveCliente = \"?host=\" + HOST + \"&db=\" + DB + \"&usuario=\" + USER + \"&pass=\" + PASS + \"&consulta=\" + consulta;\n String url = SERVER + RUTA + \"consultaGeneral.php\" + cadenaClaveCliente;\n Log.i(\"info\", url);\n JsonArrayRequest request = new JsonArrayRequest(Request.Method.GET, url, null, new Response.Listener<JSONArray>() {\n @Override\n public void onResponse(JSONArray response) {\n progressDialog.hide();\n pedidosAdapter = new PedidosAdapter(getContext(), ModeloPedidos.sacarListaClientes(response),getFragmentManager());\n listView.setAdapter(pedidosAdapter);\n if (response.length() == 0){\n AlertDialog.Builder dialogo1 = new AlertDialog.Builder(getActivity());\n dialogo1.setTitle(\"Importante\");\n dialogo1.setCancelable(false);\n dialogo1.setIcon(R.drawable.cancelar);\n dialogo1.setMessage(\"No hay pedidos pendientes\");\n dialogo1.setPositiveButton(\"Confirmar\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n\n }\n });\n dialogo1.show();\n\n }\n\n\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n\n }\n });\n queue.add(request);\n return view;\n }", "public void listaVacia() {\n\n mProgressDialog.dismiss();\n\n Bundle arguments = new Bundle();\n\n arguments.putString(\"ficha\", ActivosFragment.TAG);\n\n mBlankFragment = BlankFragment.newInstance(arguments);\n FragmentTransaction mFragmentTransaction = getFragmentManager().beginTransaction();\n mFragmentTransaction.replace(R.id.main_content, mBlankFragment, BlankFragment.TAG);\n //mFragmentTransaction.addToBackStack(FragmentDepartamento.TAG); // Agrega a la pila el fragmento para poder retroceder\n mFragmentTransaction.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_CLOSE); //Agrega una transición al fragment\n\n mFragmentTransaction.commit();\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View view = inflater.inflate(R.layout.fragment_mega_sena, container, false);\n\n concurso = (TextView)view.findViewById(R.id.tvConcursoMegaSena);\n data = (TextView)view.findViewById(R.id.tvDataMegaSena);\n sorteiEspecial = (TextView)view.findViewById(R.id.tvSorteiEspecialMegaSena);\n\n local = (TextView)view.findViewById(R.id.tvLocalMegaSena);\n cidadeEuf = (TextView)view.findViewById(R.id.tvCidadeUFMegaSena);\n\n ganhadores = (TextView)view.findViewById(R.id.tvGanhadoresMegaSena);\n\n ordemSorteio = (TextView)view.findViewById(R.id.tvOrdemSorteioMegaSena);\n\n proximoData = (TextView)view.findViewById(R.id.tvProximoDataMegaSena);\n proximoEstimativa = (TextView)view.findViewById(R.id.tvProximoEstimativaMegaSena);\n\n String urlMegaSena = \"https://api.vitortec.com/loterias/megasena/v1.2/\";\n Ion.with(getActivity())\n .load(urlMegaSena)\n .asJsonObject()\n .setCallback(new FutureCallback<JsonObject>() {\n @Override\n public void onCompleted(Exception e, JsonObject result) {\n if (e == null) {\n\n\n JsonObject objectData = result.get(\"data\").getAsJsonObject();\n JsonObject objectRealizacao = objectData.get(\"realizacao\").getAsJsonObject();\n final JsonObject objectResultado = objectData.get(\"resultado\").getAsJsonObject();\n final JsonObject objectProximo = objectData.get(\"proximoConcurso\").getAsJsonObject();\n\n try {\n String mConcurso = objectData.get(\"concurso\").toString().replace( \"\\\"\" ,\"\");\n String mData = objectData.get(\"data\").toString().replace( \"\\\"\" ,\"\");\n String mAcumuladoSorEspe = objectData.get(\"valorAcumulado\").toString().replace( \"\\\"\" ,\"\");\n\n concurso.setText(\"Consurso \" + mConcurso);\n data.setText(mData);\n sorteiEspecial.setText(\"Acumulado próximo concurso\\n\"+ \"R$\"+mAcumuladoSorEspe);\n\n } catch (Exception e1) { }\n\n\n try {\n String mLocal = objectRealizacao.get(\"local\").toString().replace( \"\\\"\" ,\"\");\n String mCidade = objectRealizacao.get(\"cidade\").toString().replace( \"\\\"\" ,\"\");\n String mUF = objectRealizacao.get(\"uf\").toString().replace( \"\\\"\" ,\"\");\n\n local.setText(mLocal);\n cidadeEuf.setText(\"Realizado \"+mCidade +\"-\"+mUF);\n\n }catch (Exception e2) {}\n\n JsonArray jsonArray = objectResultado.getAsJsonArray(\"ordemCrescente\").getAsJsonArray();\n String mGanhadores = jsonArray.toString();\n ganhadores.setText(mGanhadores.replace(\"\\\"\", \"\").replace(\"[\", \"\").replace(\"]\", \"\").replace(\",\", \" - \"));\n\n ordemSorteio.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n JsonArray jsonArray1 = objectResultado.getAsJsonArray(\"ordemSorteio\").getAsJsonArray();\n String mGanhadoresOrdemSorteio = jsonArray1.toString();\n ganhadores.setText(mGanhadoresOrdemSorteio.replace(\"\\\"\", \"\").replace(\"[\", \"\").replace(\"]\", \"\").replace(\",\", \" - \"));\n ordemSorteio.setText(\"Ver números em orderm crescente\");\n\n ordemSorteio.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n JsonArray jsonArray = objectResultado.getAsJsonArray(\"ordemCrescente\").getAsJsonArray();\n String mGanhadores = jsonArray.toString();\n ganhadores.setText(mGanhadores.replace(\"\\\"\", \"\").replace(\"[\", \"\").replace(\"]\", \"\").replace(\",\", \" - \"));\n ordemSorteio.setText(\"Ver números na ordem do sorteio\");\n }\n });\n }\n });\n\n try {\n\n String mProData = objectProximo.get(\"data\").toString().replace( \"\\\"\" ,\"\");\n String mProEstimativa = objectProximo.get(\"estimativa\").toString().replace( \"\\\"\" ,\"\");\n\n proximoData.setText(\"Estimativa de prêmio do próximo\\nconcurso \"+mProData);\n proximoEstimativa.setText(\"R$\"+mProEstimativa);\n\n } catch (Exception e3) { }\n\n }\n }\n });\n\n return view;\n }", "public long termina() {\n\t\treturn (System.currentTimeMillis() - inicio) / 1000;\n\t}", "void evoluer()\n {\n int taille = grille.length;\n int nbVivantes = 0;\n for(int i=-1; i<2; i++)\n {\n int xx = ((x+i)+taille)%taille; // si x+i=-1, xx=taille-1. si x+i=taille, xx=0\n for(int j=-1; j<2; j++)\n {\n if (i==0 && j==0) continue;\n int yy = ((y+j)+taille)%taille;\n if (grille[xx][yy].vivante) nbVivantes++;\n }\n }\n if (nbVivantes<=1 || nbVivantes>=4) {vientDeChanger = (vivante==true); vivante = false;}\n if (nbVivantes==3) {vientDeChanger = (vivante==false); vivante = true;}\n }", "@Nullable\n @Override\n public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_timer,container,false);\n btnNavFrag2 = (Button) view.findViewById(R.id.btnNavFrag2);\n btnNavFrag2.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Toast.makeText(getActivity(),R.string.menu_about, Toast.LENGTH_SHORT).show();\n ((TrainingActivity)getActivity()).setViewPager(1);\n }\n });\n\n\n this.routineNum = TrainingActivity.routineNum;\n countDownText = view.findViewById(R.id.countdown);\n countdownButton = view.findViewById(R.id.countdown_button);\n currentExercise = view.findViewById(R.id.current_exercise);\n workOutText = view.findViewById(R.id.routine_title);\n progress = view.findViewById(R.id.progress_bar);\n progress.setProgress(0);\n routine = routineArrayList.get(routineNum);\n\n countdownButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n startStop();\n }\n });\n\n\n exerciseArray = routine.getExercises();\n\n workOutText.setText(routine.toString());\n\n current = exerciseArray.get(index);\n\n if(current.getBreakDurationMS()>0){\n hasbreak = current.getBreakDurationMS();\n }\n\n//\n//\n//\n if(current.getDurationMS()>0){\n timeleftmilliseconds=current.getDurationMS();\n }\n\n exercisecount= exerciseArray.size();\n\n\n int temp = exercisecount;\n\n for (int j=0;j<exerciseArray.size();j++){\n if(exerciseArray.get(j).getBreakDurationMS()>0){\n temp++;\n }\n }\n progress.setMax(temp);\n\n\n currentExercise.setText(getString(R.string.label_current_exercise)+\" \"+ current.toString());\n\n updateTimer();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_creditos, container, false);\n img1 = (ImageView) v.findViewById(R.id.imgZombie);\n img2 = (ImageView) v.findViewById(R.id.imgRick);\n img3 = (ImageView) v.findViewById(R.id.imgNegan);\n mainActivity = (MainActivity)getActivity(); //Para referenciar el mainActivity en esta clase\n\n //Peticion a PHP del servidor (preguntas.php) para descargar preguntas de la BBDD.....................................................\n GestorPreguntas peticionPreg = new GestorPreguntas();\n peticionPreg.pedirPreguntas(); //ejecutar URL\n\n timerTask = new TimerTask() {\n public void run() {\n getActivity().runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Log.v(\"CreditosFragment\",\"ENTRE!!! \");\n if (img1.getVisibility() == View.VISIBLE ) {\n img1.setVisibility(View.INVISIBLE);\n img2.setVisibility(View.VISIBLE);\n } else if (img2.getVisibility() == View.VISIBLE) {\n img2.setVisibility(View.INVISIBLE);\n img3.setVisibility(View.VISIBLE);\n }\n }\n });\n\n if (img3.getVisibility() == View.VISIBLE) {\n timer.cancel(); //Termina el tiempo\n mainActivity.cambiarFragment(2); //Se cambia a la vista de inicio\n }\n }\n };\n timer = new Timer();\n timer.schedule(timerTask, 1000, 1000); //(5000) Cuanto tiempo tarda la app en ejecutar la tarea. (10000) Cada cuánto tiempo está realizando la tarea\n\n return v;\n }", "public void ponerMaximoTiempo() {\n this.timeFi = Long.parseLong(\"2000000000000\");\n }", "public Long consultarTiempoMaximo() {\n return timeFi;\n }", "public int getPontosTimeVisitante() {\r\n return pontosTimeVisitante;\r\n }", "@Override\n\tpublic int sacameVida(ElementoPiedra a) {\n\t\treturn 20;\n\t}", "protected abstract int getFirstFrag();", "@Override\n public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {\n DetalleFotoFragment detalle = new DetalleFotoFragment();\n detalle.setArguments(getIntent().getExtras());\n\n /*como tenemos el nuevo fragment, lo siguiente que hago abajo es reemplazar un componente \"vacio\"\n Fijate en el layout que hay un FrameLayout como fragment que no tiene nada, lo cual no tiene nada que mostrar\n a ese lo reemplazo por otro layout que se llama fragment_load_detalle, si buscas ese xml en el layout ahi tenes\n lo necesario para mostrar el detalle\n Los pasos que hace las lineas de abajo es asi:\n -Saco el fragment vacio (del layout vacio)\n -meto el fragment nuevo llamado fragment_load_detalle\n -addToBackStack lo que hace es agregarlo a la pila cuando se presiona el boton de retroceder del celular\n -finalmente el commit carga el fragment que se puso mostrandolo en pantalla\n * */\n\n //commiteamos el fragment\n\n getSupportFragmentManager().beginTransaction()\n .replace(R.id.fragment_load_detalle,detalle)\n .setTransitionStyle(FragmentTransaction.TRANSIT_FRAGMENT_OPEN)\n .addToBackStack(null)\n .commit();\n //el commit es asincronico y no puedo llamar para mostrar la foto y detalles en pantalla\n //por lo cual primero guardo en la instancia los datos necesarios, y luego en un metodo privado interno lo cargo\n detalle.cargarEnMomento(listaMomentos.get(i));\n }", "Long onFragmentInteraction();", "public void llenarDatosTransaccion(TransactionEntity entity, int indiceLayoutHose){\n //**********************************************************\n int contador = 0;\n Log.v(\"INICIO\",\"**********************************************************\");\n\n Log.v(\"Bomba\",String.valueOf(entity.getIdBomba()));\n //**********************************************************\n //EstadoActual\n int[] tramaEstadoActual = new int[1];\n contador = 0;\n for(int i = 8; i<= 8; i++){\n tramaEstadoActual[contador] = bufferRecepcion[i];\n contador++;\n }\n //String estadoActual = byteArrayToHexString(tramaEstadoActual,tramaEstadoActual.length);\n int estadoActual = Integer.parseInt(byteArrayToHexIntGeneral(tramaEstadoActual,1));\n entity.setEstadoActual(estadoActual);\n\n Log.v(\"Estado\",String.valueOf(entity.getEstadoActual()));\n cambioEstado(indiceLayoutHose, estadoActual);\n\n //**********************************************************\n //Capturar Nro Transaccion\n int[] tramaNroTransaccion = new int[3];\n contador = 0;\n for(int i = 9; i<= 11; i++){\n tramaNroTransaccion[contador] = bufferRecepcion[i];\n contador++;\n }\n String nroTransaccion = \"\" + byteArrayToHexInt(tramaNroTransaccion,tramaNroTransaccion.length);\n entity.setNumeroTransaccion(nroTransaccion);\n Log.v(\"Nro. Transacción\",entity.getNumeroTransaccion());\n\n //**********************************************************\n //Capturar Fecha Inicio\n int[] tramaFechaInicio = new int[1];\n tramaFechaInicio[0] = bufferRecepcion[12];\n String dia = \"\" + byteArrayToHexString(tramaFechaInicio,tramaFechaInicio.length);\n tramaFechaInicio[0] = bufferRecepcion[13];\n String mes = \"\" + byteArrayToHexString(tramaFechaInicio,tramaFechaInicio.length);\n tramaFechaInicio[0] = bufferRecepcion[14];\n String anio = \"20\" + byteArrayToHexString(tramaFechaInicio,tramaFechaInicio.length);\n tramaFechaInicio[0] = bufferRecepcion[17];\n String hora = \"\" + byteArrayToHexString(tramaFechaInicio,tramaFechaInicio.length);\n tramaFechaInicio[0] = bufferRecepcion[16];\n String minuto = \"\" + byteArrayToHexString(tramaFechaInicio,tramaFechaInicio.length);\n tramaFechaInicio[0] = bufferRecepcion[15];\n String segundo = \"\" + byteArrayToHexString(tramaFechaInicio,tramaFechaInicio.length);\n\n String fechaInicio = dia + \"-\" + mes + \"-\" + anio + \"\";\n String horaInicio = hora + \":\" + minuto + \":\" + segundo;\n //fechaInicio = \"\" + hexToAscii(byteArrayToHexString(tramaFechaInicio,tramaFechaInicio.length));\n entity.setFechaInicio(fechaInicio);\n entity.setHoraInicio(horaInicio);\n Log.v(\"Fecha Inicio\",entity.getFechaInicio());\n Log.v(\"Hora Inicio\",entity.getHoraInicio());\n\n //**********************************************************\n //Capturar Turno\n int[] tramaTurno = new int[2];\n contador = 0;\n for(int i = 18; i<= 19; i++){\n tramaTurno[contador] = bufferRecepcion[i];\n contador++;\n }\n int turno = byteArrayToHexInt2(tramaTurno,tramaTurno.length);\n entity.setTurno(turno);\n Log.v(\"Turno\",\"\"+entity.getTurno());\n\n //**********************************************************\n //Numero de Tanque\n int[] tramaNumeroTanque = new int[1];\n contador = 0;\n for(int i = 21; i<= 21; i++){\n tramaNumeroTanque[contador] = bufferRecepcion[i];\n contador++;\n }\n\n int numeroTanque = Integer.parseInt(byteArrayToHexIntGeneral(tramaNumeroTanque,1));\n entity.setNumeroTanque(numeroTanque);\n\n Log.v(\"Tanque\",\"\"+entity.getNumeroTanque());\n\n //**********************************************************\n //Tipo de Vehiculo\n int[] tramaTipoVehiculo = new int[1];\n contador = 0;\n for(int i = 22; i<= 22; i++){\n tramaTipoVehiculo[contador] = bufferRecepcion[i];\n contador++;\n }\n\n int tipoVehiculo = Integer.parseInt(byteArrayToHexIntGeneral(tramaTipoVehiculo,1));\n entity.setTipoVehiculo(tipoVehiculo);\n\n Log.v(\"Tipo Vehiculo\",\"\"+entity.getTipoVehiculo());\n\n\n //**********************************************************\n //Capturar IdVehiculo\n int[] tramaIdVehiculo = new int[8];\n contador = 0;\n for(int i = 23; i<= 30; i++){\n tramaIdVehiculo[contador] = bufferRecepcion[i];\n contador++;\n }\n String IdVehiculo = hexToAscii(byteArrayToHexString(tramaIdVehiculo,tramaIdVehiculo.length));\n entity.setIdVehiculo(IdVehiculo);\n\n Log.v(\"IdVehiculo\",entity.getIdVehiculo());\n\n //**********************************************************\n //Capturar Placa\n int[] tramaPlaca = new int[10];\n contador = 0;\n for(int i = 31; i<= 40; i++){\n tramaPlaca[contador] = bufferRecepcion[i];\n contador++;\n }\n String placa = hexToAscii(byteArrayToHexString(tramaPlaca,tramaPlaca.length));\n entity.setPlaca(placa);\n\n Log.v(\"Placa\",entity.getPlaca());\n\n //**********************************************************\n //Capturar Kilometro\n\n int[] tramaKilometroParteEntera = new int[3];\n contador = 0;\n for(int i = 41; i<= 43; i++){\n tramaKilometroParteEntera[contador] = bufferRecepcion[i];\n contador++;\n }\n int kilometroParteEntera = byteArrayToHexInt(tramaKilometroParteEntera,tramaKilometroParteEntera.length);\n\n int[] tramaKilometroParteDecimal = new int[1];\n contador = 0;\n for(int i = 44; i<= 44; i++){\n tramaKilometroParteDecimal[contador] = bufferRecepcion[i];\n contador++;\n }\n int kilometroParteDecimal = byteArrayToHexInt(tramaKilometroParteDecimal,tramaKilometroParteDecimal.length);\n\n //double kilometro = kilometroParteEntera + kilometroParteDecimal*0.1;\n double kilometro = Double.valueOf(kilometroParteEntera + \".\"+kilometroParteDecimal);\n entity.setKilometraje(\"\"+kilometro);\n\n Log.v(\"Kilometro\",\"\"+kilometro);\n\n //**********************************************************\n //Capturar Horometro\n\n int[] tramaHorometroParteEntera = new int[3];\n contador = 0;\n for(int i = 45; i<= 47; i++){\n tramaHorometroParteEntera[contador] = bufferRecepcion[i];\n contador++;\n }\n int horometroParteEntera = byteArrayToHexInt(tramaHorometroParteEntera,tramaHorometroParteEntera.length);\n\n int[] tramaHorometroParteDecimal = new int[1];\n contador = 0;\n for(int i = 48; i<= 48; i++){\n tramaKilometroParteDecimal[contador] = bufferRecepcion[i];\n contador++;\n }\n\n double horometro = 0.0;\n\n if(tramaHorometroParteDecimal[0]==255){\n horometro = horometroParteEntera/10D;\n }else{\n int horometroParteDecimal = byteArrayToHexInt(tramaKilometroParteDecimal,tramaKilometroParteDecimal.length);\n //horometro = horometroParteEntera + horometroParteDecimal*0.1;\n horometro = Double.valueOf(horometroParteEntera + \".\"+horometroParteDecimal);\n }\n\n entity.setHorometro(\"\"+horometro);\n\n Log.v(\"Horometro\",\"\"+horometro);\n\n //**********************************************************\n //Capturar IdConductor\n int[] tramaIdConductor = new int[8];\n contador = 0;\n for(int i = 49; i<= 56; i++){\n tramaIdConductor[contador] = bufferRecepcion[i];\n contador++;\n }\n String IdConductor = hexToAscii(byteArrayToHexString(tramaIdConductor,tramaIdConductor.length));\n entity.setIdConductor(IdConductor);\n\n Log.v(\"IdConductor\",entity.getIdConductor());\n\n //**********************************************************\n //Capturar IdOperador\n int[] tramaIdOperador = new int[8];\n contador = 0;\n for(int i = 57; i<= 64; i++){\n tramaIdOperador[contador] = bufferRecepcion[i];\n contador++;\n }\n String IdOperador = hexToAscii(byteArrayToHexString(tramaIdOperador,tramaIdOperador.length));\n entity.setIdOperador(IdOperador);\n\n Log.v(\"IdOperador\",entity.getIdOperador());\n\n //**********************************************************\n //Tipo de Transacción\n int[] tramaTipoTransaccion = new int[1];\n contador = 0;\n for(int i = 65; i<= 65; i++){\n tramaTipoTransaccion[contador] = bufferRecepcion[i];\n contador++;\n }\n\n int tipoTransaccion = Integer.parseInt(byteArrayToHexIntGeneral(tramaTipoTransaccion,1));\n entity.setTipoTransaccion(tipoTransaccion);\n\n Log.v(\"Tipo Transacción\",\"\"+entity.getTipoTransaccion());\n\n //**********************************************************\n //Capturar Latitud\n int[] tramaLatitud = new int[12];\n contador = 0;\n for(int i = 66; i<= 77; i++){\n tramaLatitud[contador] = bufferRecepcion[i];\n contador++;\n }\n String latitud = hexToAscii(byteArrayToHexString(tramaLatitud,tramaLatitud.length));\n entity.setLatitud(latitud);\n\n Log.v(\"Latitud\",entity.getLatitud());\n\n //**********************************************************\n //Capturar Longitud\n int[] tramaLongitud = new int[12];\n contador = 0;\n for(int i = 78; i<= 89; i++){\n tramaLongitud[contador] = bufferRecepcion[i];\n contador++;\n }\n String longitud = hexToAscii(byteArrayToHexString(tramaLongitud,tramaLongitud.length));\n entity.setLongitud(longitud);\n\n Log.v(\"Longitud\",entity.getLongitud());\n\n //**********************************************************\n //Capturar Tipo Error Pre-Seteo\n int[] tramaTipoErrorPreseteo = new int[1];\n contador = 0;\n for(int i = 90; i<= 90; i++){\n tramaTipoErrorPreseteo[contador] = bufferRecepcion[i];\n contador++;\n }\n\n int tipoErrorPreseteo= Integer.parseInt(byteArrayToHexIntGeneral(tramaTipoErrorPreseteo,1));\n entity.setTipoErrorPreseteo(tipoErrorPreseteo);\n\n Log.v(\"Tipo Error Preseteo\",\"\"+entity.getTipoErrorPreseteo());\n\n //**********************************************************\n //Capturar Volumen Autorizado\n int[] tramaVolumenAutorizado = new int[2];\n contador = 0;\n for(int i = 91; i<= 92; i++){\n tramaVolumenAutorizado[contador] = bufferRecepcion[i];\n contador++;\n }\n int volumenAutorizado = byteArrayToHexInt2(tramaVolumenAutorizado,tramaVolumenAutorizado.length);\n entity.setVolumenAutorizado(volumenAutorizado);\n Log.v(\"Volumen Autorizado\",\"\"+entity.getVolumenAutorizado());\n\n //**********************************************************\n //Capturar Volumen Aceptado\n int[] tramaVolumenAceptado = new int[2];\n contador = 0;\n for(int i = 93; i<= 94; i++){\n tramaVolumenAceptado[contador] = bufferRecepcion[i];\n contador++;\n }\n int volumenAceptado = byteArrayToHexInt2(tramaVolumenAceptado,tramaVolumenAceptado.length);\n entity.setVolumenAceptado(volumenAceptado);\n Log.v(\"Volumen Aceptado\",\"\"+entity.getVolumenAceptado());\n\n //**********************************************************\n //Capturar Código Cliente\n int[] tramaCodigoCliente = new int[2];\n contador = 0;\n for(int i = 100; i<= 101; i++){\n tramaCodigoCliente[contador] = bufferRecepcion[i];\n contador++;\n }\n int codigoCliente = byteArrayToHexInt2(tramaCodigoCliente,tramaCodigoCliente.length);\n entity.setCodigoCliente(codigoCliente);\n Log.v(\"Codigo Cliente\",\"\"+entity.getCodigoCliente());\n\n //**********************************************************\n //Capturar codigo area\n int[] tramaCodigoArea = new int[1];\n contador = 0;\n for(int i = 102; i<= 102; i++){\n tramaCodigoArea[contador] = bufferRecepcion[i];\n contador++;\n }\n\n int CodigoArea = Integer.parseInt(byteArrayToHexIntGeneral(tramaCodigoArea,1));\n entity.setCodigoArea(CodigoArea);\n\n Log.v(\"Codigo Area\",\"\"+entity.getCodigoArea());\n\n //**********************************************************\n //Capturar tipo TAG\n int[] tramaTipoTAG = new int[1];\n contador = 0;\n for(int i = 103; i<= 103; i++){\n tramaTipoTAG[contador] = bufferRecepcion[i];\n contador++;\n }\n\n int tipoTAG = Integer.parseInt(byteArrayToHexIntGeneral(tramaTipoTAG,1));\n entity.setTipoTag(tipoTAG);\n\n Log.v(\"Tipo TAG\",\"\"+entity.getTipoTag());\n\n //**********************************************************\n //Capturar Volumen Abastecido\n int[] tramaVolumen = new int[9];\n contador = 0;\n for(int i = 104; i<= 112; i++){\n tramaVolumen[contador] = bufferRecepcion[i];\n contador++;\n }\n String volumen = \"\"+ hexToAscii(byteArrayToHexString(tramaVolumen,tramaVolumen.length));\n String[] parts = volumen.split(\"\\\\.\");\n if(parts.length > 1) {\n volumen = parts[0] + \".\" + parts[1].substring(0,(0+entity.getCantidadDecimales()));\n }\n\n entity.setVolumen(volumen);\n\n Log.v(\"Volumen Abastecido\",entity.getVolumen());\n\n //**********************************************************\n //Capturar Temperatura\n int[] tramaTemperatura = new int[5];\n contador = 0;\n for(int i = 113; i<= 117; i++){\n tramaTemperatura[contador] = bufferRecepcion[i];\n contador++;\n }\n String temperatura = \"\" + hexToAscii(byteArrayToHexString(tramaTemperatura,tramaTemperatura.length));\n temperatura = temperatura.substring(0,temperatura.length()-1);\n entity.setTemperatura(temperatura);\n\n Log.v(\"Temperatura\",entity.getTemperatura());\n\n //**********************************************************\n //Capturar Fecha Fin\n int[] tramaFechaFin = new int[1];\n tramaFechaFin[0] = bufferRecepcion[118];\n String diaFin = \"\" + byteArrayToHexString(tramaFechaFin,tramaFechaFin.length);\n tramaFechaFin[0] = bufferRecepcion[119];\n String mesFin = \"\" + byteArrayToHexString(tramaFechaFin,tramaFechaFin.length);\n tramaFechaFin[0] = bufferRecepcion[120];\n String anioFin = \"20\" + byteArrayToHexString(tramaFechaFin,tramaFechaFin.length);\n tramaFechaFin[0] = bufferRecepcion[123];\n String horaFin = \"\" + byteArrayToHexString(tramaFechaFin,tramaFechaFin.length);\n tramaFechaFin[0] = bufferRecepcion[122];\n String minutoFin = \"\" + byteArrayToHexString(tramaFechaFin,tramaFechaFin.length);\n tramaFechaFin[0] = bufferRecepcion[121];\n String segundoFin = \"\" + byteArrayToHexString(tramaFechaFin,tramaFechaFin.length);\n\n String fechaFin = diaFin + \"-\" + mesFin + \"-\" + anioFin + \"\" ;\n String horaFin1 = horaFin + \":\" + minutoFin + \":\" + segundoFin;\n //fechaInicio = \"\" + hexToAscii(byteArrayToHexString(tramaFechaInicio,tramaFechaInicio.length));\n entity.setFechaFin(fechaFin);\n entity.setHoraFin(horaFin1);\n\n Log.v(\"Fecha Fin\",entity.getFechaFin());\n Log.v(\"Hora Fin\",entity.getHoraFin());\n\n //**********************************************************\n //Capturar Tipo de Cierre\n int[] tramaTipoCierre = new int[1];\n contador = 0;\n for(int i = 124; i<= 124; i++){\n tramaTipoCierre[contador] = bufferRecepcion[i];\n contador++;\n }\n\n int tipoCierre = Integer.parseInt(byteArrayToHexIntGeneral(tramaTipoCierre,1));\n entity.setTipoCierre(tipoCierre);\n\n Log.v(\"Tipo Cierre\",\"\"+entity.getTipoCierre());\n\n txt_galones = (TextView) layoutsHose.get(indiceLayoutHose).inflater.findViewById(R.id.txt_galones);\n txt_ultimo_ticket = (TextView) layoutsHose.get(indiceLayoutHose).inflater.findViewById(R.id.txt_ultimo_ticket);\n txt_placa = layoutsHose.get(indiceLayoutHose).inflater.findViewById(R.id.txt_placa);\n txt_producto = layoutsHose.get(indiceLayoutHose).inflater.findViewById(R.id.txt_producto);\n txt_ultimo_galon_p2 = layoutsHose.get(indiceLayoutHose).inflater.findViewById(R.id.txt_ultimo_galon_p2);\n txt_ultimo_ticket_p2= layoutsHose.get(indiceLayoutHose).inflater.findViewById(R.id.txt_ultimo_ticket_p2);\n\n txt_producto.setText(entity.getNombreProducto());\n txt_placa.setText(entity.getPlaca());\n txt_galones.setText(entity.getVolumen());\n txt_ultimo_galon_p2.setText(entity.getVolumen());\n txt_ultimo_ticket.setText(entity.getNumeroTransaccion());\n txt_ultimo_ticket_p2.setText(entity.getNumeroTransaccion());\n\n\n guardarTransaccionBD(entity);\n\n }", "private static float tock(){\n\t\treturn (System.currentTimeMillis() - startTime);\n\t}", "public void onClick(View v) {\n timeWhenStopped = tiempo.getBase() - SystemClock.elapsedRealtime();\n tiempo.stop();\n tiempoFinal = (timeWhenStopped / 1000);\n\n SharedPreferences sharedpreferences = getActivity().getSharedPreferences(MyPREFERENCES, Context.MODE_MULTI_PROCESS);\n SharedPreferences.Editor editor = sharedpreferences.edit();\n editor.putString(EstadoDelViaje, \"fin\");\n editor.putString(TiempoFinal, Float.toString(tiempoFinal));\n editor.commit();\n\n MainActivity m = (MainActivity)getActivity();\n m.displayView(0);\n\n finalizarServicio();\n\n Bundle args = new Bundle();\n FragmentDialogYuberCalificar newFragmentDialog = new FragmentDialogYuberCalificar();\n newFragmentDialog.setArguments(args);\n newFragmentDialog.setCancelable(false);\n newFragmentDialog.show(getActivity().getSupportFragmentManager(), \"TAG\");\n }", "public void pierdeUnaVida() {\n numeroDeVidas--;\n }", "private void EstablecerVistas(TipoGestion tGestion){\n\t\tCantEjecutada=Utilitarios.round(activ.getCantidadEjecutada(),4);\n\t\n\t\tcantContratada=Utilitarios.round(activ.getCantidadContratada(),4);\n\t\t\n\t\t//CantPendienteDeEjecutar = Utilitarios.round((activ.getCantidadContratada()-activ.getCantidadEjecutada()),4);\n\n\n\t\tif ( activ.getCantidadEjecutada() > activ.getCantidadContratada()){\n\t\t\tCantPendienteDeEjecutar = 0;\n\t\t\tCantExcendete = Utilitarios.round((activ.getCantidadEjecutada()-activ.getCantidadContratada()),4);\n\t\t\tPorcExcedente = Utilitarios.round((CantExcendete / cantContratada * 100),2);\n\t\t\t((TextView) getActivity().findViewById(R.id.tv_fragAgregarAvancesRenglon_PorcCantidadExcedente)).setTextColor(getResources().getColorStateList(R.color.graphRed));\n\t\t}\n\t\telse{\n\t\t\tCantPendienteDeEjecutar = Utilitarios.round((activ.getCantidadContratada()-activ.getCantidadEjecutada()),4);\n\t\t\t((TextView) getActivity().findViewById(R.id.tv_fragAgregarAvancesRenglon_PorcCantidadExcedente)).setTextColor(getResources().getColorStateList(R.color.graphGreen));\n\t\t}\n\n\t\t\n\t\tif ( activ.getCantidadContratada() > 0){\n\t\t\t\tPorcEjecutado=Utilitarios.round((activ.getCantidadEjecutada()/cantContratada) * 100,2);\n\t\t\t\tPorcPendienteDeEjecutar = Utilitarios.round((CantPendienteDeEjecutar / cantContratada * 100),2);\n\t\t\t}\n\t\telse{\n\t\t\tPorcPendienteDeEjecutar\t= 0.00;\n\t\t\tPorcPendienteDeEjecutar = 0.00;\n\t\t}\n\n\t\t((TextView) getActivity()\n\t\t\t\t.findViewById(R.id.tv_fragAgregarAvancesRenglon_Actividad))\n\t\t\t\t.setText(String.valueOf(cantContratada));\n\n\t\t((TextView) getActivity()\n \t\t\t.findViewById(R.id.tv_fragAgregarAvancesRenglon_CantidadContratada))\n \t\t\t.setText(String.valueOf(cantContratada));\n\n \t((TextView) getActivity()\n \t\t\t.findViewById(R.id.tv_fragAgregarAvancesRenglon_CantidadEjecutada))\n \t\t\t.setText(String.valueOf(CantEjecutada));\n\n \t((TextView) getActivity()\n \t\t\t.findViewById(R.id.tv_fragAgregarAvancesRenglon_PorcCantidadEjecutada))\n \t\t\t.setText( String.valueOf(PorcEjecutado) + \"%\");\n\n\n \ttvEtiquetaAgregarAvances.setText(getActivity().getString(R.string.fragment_agregar_avances_renglon_4));\n\n\t\tdesActividad.setText(\"[\" + activ.getCodigoInstitucional() + \"] - \" + activ.getDescripcion());\n \t\n\t\tif(tGestion == TipoGestion.Por_Cantidades){\n\t\t\t((TextView) getActivity()\n \t\t\t.findViewById(R.id.et_fragAgregarAvancesEtiquetaPorc))\n \t\t\t.setVisibility(0);\n \t}\n \telse{\n \t\t\n \t\t((TextView) getActivity()\n \t\t\t.findViewById(R.id.et_fragAgregarAvancesEtiquetaPorc))\n \t\t\t.setText(\"%\");\n\n \t}\n\n\t\t\n\t\t//Se deshabilitara el widget de ingreso del avance para cuando la cantidad\n\t\t//pendiente de ejecutar sea igual o menor a 0\n\t\t/*if (CantPendienteDeEjecutar>0){\n \t((TextView) getActivity()\n \t\t\t.findViewById(R.id.tv_fragAgregarAvancesRenglon_FechaActualizo))\n \t\t\t.setText(getActivity().getResources().getString(R.string.fragment_agregar_avances_renglon_2)\n \t\t\t\t\t+ \" \" + String.valueOf(activ.getFechaActualizacion()));\n \t}\n \telse\n \t{\n \t\tToast.makeText(getActivity(), getActivity().getString(R.string.fragment_agregar_avances_renglon_5), Toast.LENGTH_LONG).show();\n \t\tetNuevoAvance.setText(\"0.00\");\n \t\tetNuevoAvance.setEnabled(false);\n \t}*/\n \t\n \t((TextView) getActivity()\n \t\t\t.findViewById(R.id.tv_fragAgregarAvancesRenglon_CantidadPorEjecutar))\n \t\t\t.setText(String.valueOf(Utilitarios.round(CantPendienteDeEjecutar, 4)));\n \t((TextView) getActivity()\n \t\t\t.findViewById(R.id.tv_fragAgregarAvancesRenglon_PorcCantidadPorEjecutar))\n \t\t\t.setText(String.valueOf(Utilitarios.round(PorcPendienteDeEjecutar, 2)) + \"%\");\n\n\t\t((TextView) getActivity()\n\t\t\t\t.findViewById(R.id.tv_fragAgregarAvancesRenglon_CantidadExcedente))\n\t\t\t\t.setText(String.valueOf(Utilitarios.round(CantExcendete, 4)));\n\n\t\t((TextView) getActivity()\n\t\t\t\t.findViewById(R.id.tv_fragAgregarAvancesRenglon_PorcCantidadExcedente))\n\t\t\t\t.setText(String.valueOf(Utilitarios.round(PorcExcedente, 2)) + \"%\");\n\n\t\tvalidarAvance(String.valueOf(etNuevoAvance.getText()));\n \t\n \tetNuevoAvance.addTextChangedListener(new TextWatcher() {\n \t\t\n\t\t\t@Override\n\t\t\tpublic void beforeTextChanged(CharSequence s, int start,\n\t\t\t\t\tint count, int after) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onTextChanged(CharSequence s, int start,\n\t\t\t\t\tint before, int count) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void afterTextChanged(Editable s) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tvalidarAvance(s.toString());\n\t\t\t\t\t\t\t\t\t\n\t\t\t}\n \t});\n\t\t\n\t}", "public float getProgress() {\n // Depends on the total number of tuples\n return 0;\n }", "@Override\n public void cantidad_Ataque(){\n ataque=5+2*nivel+aumentoT;\n }", "public int asignacionMemoriaFlotante(float value){\n memoriaFlotante[flotanteActual] = value;\n flotanteActual++;\n return inicioMem + tamMem + flotanteActual - 1;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\n if (savedInstanceState == null) {\n if (mainActivity.pdiScelto.getIdPdi() != null) {\n if (FirebaseHelper.dammiFirebaseHelperCondiviso().scaricamentoDatabaseRiuscitoConSuccesso()) {\n immaginiPdi = FirebaseHelper.dammiFirebaseHelperCondiviso().dammiImmaginiPdiPerPdi(mainActivity.pdiScelto.getIdPdi());\n } else {\n immaginiPdi = mainActivity.gestoreDatabaseCondiviso.dammiImmaginiPdiPerPdi(mainActivity.pdiScelto.getIdPdi());\n }\n }\n indiceImmagine = 0;\n galleriaAperta = false;\n } else {\n //Log.d(\"DEBUGAPP\", TAG + \" onCreateView savedInstanceState != null\");\n\n immaginiPdi = savedInstanceState.getParcelableArrayList(\"immaginiPdi\"); // @SuppressWarnings(\"unchecked\")\n indiceImmagine = savedInstanceState.getInt(\"indiceImmagine\");\n galleriaAperta = savedInstanceState.getBoolean(\"galleriaAperta\");\n downloadInCorso = savedInstanceState.getBoolean(\"downloadInCorso\");\n }\n\n pdiDettaglioFragmentView = inflater.inflate(R.layout.fragment_pdi_dettaglio, container, false);\n\n svContenitore = (ScrollView) pdiDettaglioFragmentView.findViewById(R.id.svContenitore);\n\n tvIntestazioneDescrizione = (TextView) pdiDettaglioFragmentView.findViewById(R.id.tvIntestazioneDescrizione);\n dvDescrizione = (DocumentView) pdiDettaglioFragmentView.findViewById(R.id.dvDescrizione);\n\n llGalleria = (LinearLayout) pdiDettaglioFragmentView.findViewById(R.id.llGalleria);\n ivGalleria = (ImageView) pdiDettaglioFragmentView.findViewById(R.id.ivGalleria);\n tvDescrizioneImmagine = (TextView) pdiDettaglioFragmentView.findViewById(R.id.tvDescrizioneImmagine);\n tvDescrizioneImmagine.setAlpha(0.75f);\n if (ivGalleria != null) {\n ivGalleria.setOnClickListener(\n new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent intent = new Intent(mainActivity, Galleria.class);\n intent.putParcelableArrayListExtra(\"immaginiPdi\", immaginiPdi);\n intent.putExtra(\"indiceImmagine\", indiceImmagine);\n startActivityForResult(intent, 1);\n\n galleriaAperta = true;\n }\n }\n );\n }\n\n llIndirizzo = (LinearLayout) pdiDettaglioFragmentView.findViewById(R.id.llIndirizzo);\n btIndirizzo = (Button) pdiDettaglioFragmentView.findViewById(R.id.btIndirizzo);\n if (btIndirizzo != null) {\n btIndirizzo.setOnClickListener(\n new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n copiaInClipboard(getResources().getString(R.string.indirizzo_copiato_negli_appunti), (String) btIndirizzo.getText());\n }\n }\n );\n }\n\n llTelefono = (LinearLayout) pdiDettaglioFragmentView.findViewById(R.id.llTelefono);\n btTelefono = (Button) pdiDettaglioFragmentView.findViewById(R.id.btTelefono);\n if (btTelefono != null) {\n btTelefono.setOnClickListener(\n new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n chiamaNumeroTelefonico((String) btTelefono.getText());\n }\n }\n );\n }\n\n llFax = (LinearLayout) pdiDettaglioFragmentView.findViewById(R.id.llFax);\n btFax = (Button) pdiDettaglioFragmentView.findViewById(R.id.btFax);\n if (btFax != null) {\n btFax.setOnClickListener(\n new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n copiaInClipboard(getResources().getString(R.string.fax_copiato_negli_appunti), (String) btFax.getText());\n }\n }\n );\n }\n\n llCellulare = (LinearLayout) pdiDettaglioFragmentView.findViewById(R.id.llCellulare);\n btCellulare = (Button) pdiDettaglioFragmentView.findViewById(R.id.btCellulare);\n if (btCellulare != null) {\n btCellulare.setOnClickListener(\n new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n chiamaNumeroTelefonico((String) btCellulare.getText());\n }\n }\n );\n }\n\n llEmail = (LinearLayout) pdiDettaglioFragmentView.findViewById(R.id.llEmail);\n btEmail = (Button) pdiDettaglioFragmentView.findViewById(R.id.btEmail);\n if (btEmail != null) {\n btEmail.setOnClickListener(\n new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent i = new Intent(Intent.ACTION_SEND);\n i.setType(\"message/rfc822\");\n i.putExtra(Intent.EXTRA_EMAIL, new String[]{(String) btEmail.getText()});\n startActivity(Intent.createChooser(i, getString(R.string.invia_email_a) + btEmail.getText() + getString(R.string.usando)));\n }\n }\n );\n }\n\n llLink1 = (LinearLayout) pdiDettaglioFragmentView.findViewById(R.id.llLink1);\n tvIntestazioneLink1 = (TextView) pdiDettaglioFragmentView.findViewById(R.id.tvIntestazioneLink1);\n btLink1 = (Button) pdiDettaglioFragmentView.findViewById(R.id.btLink1);\n if (btLink1 != null) {\n btLink1.setOnClickListener(\n new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent i = new Intent(Intent.ACTION_VIEW);\n i.setData(Uri.parse((String) btLink1.getText()));\n startActivity(i);\n }\n }\n );\n }\n\n llLink2 = (LinearLayout) pdiDettaglioFragmentView.findViewById(R.id.llLink2);\n tvIntestazioneLink2 = (TextView) pdiDettaglioFragmentView.findViewById(R.id.tvIntestazioneLink2);\n btLink2 = (Button) pdiDettaglioFragmentView.findViewById(R.id.btLink2);\n if (btLink2 != null) {\n btLink2.setOnClickListener(\n new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent i = new Intent(Intent.ACTION_VIEW);\n i.setData(Uri.parse((String) btLink2.getText()));\n startActivity(i);\n }\n }\n );\n }\n\n llLink3 = (LinearLayout) pdiDettaglioFragmentView.findViewById(R.id.llLink3);\n tvIntestazioneLink3 = (TextView) pdiDettaglioFragmentView.findViewById(R.id.tvIntestazioneLink3);\n btLink3 = (Button) pdiDettaglioFragmentView.findViewById(R.id.btLink3);\n if (btLink3 != null) {\n btLink3.setOnClickListener(\n new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent i = new Intent(Intent.ACTION_VIEW);\n i.setData(Uri.parse((String) btLink3.getText()));\n startActivity(i);\n }\n }\n );\n }\n\n llLink4 = (LinearLayout) pdiDettaglioFragmentView.findViewById(R.id.llLink4);\n tvIntestazioneLink4 = (TextView) pdiDettaglioFragmentView.findViewById(R.id.tvIntestazioneLink4);\n btLink4 = (Button) pdiDettaglioFragmentView.findViewById(R.id.btLink4);\n if (btLink4 != null) {\n btLink4.setOnClickListener(\n new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent i = new Intent(Intent.ACTION_VIEW);\n i.setData(Uri.parse((String) btLink4.getText()));\n startActivity(i);\n }\n }\n );\n }\n\n bVediSuGM = (Button) pdiDettaglioFragmentView.findViewById(R.id.bVediSuGM);\n if (bVediSuGM != null) {\n bVediSuGM.setOnClickListener(\n new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n mainActivity.vediPdiSceltoSuGM();\n }\n }\n );\n }\n\n bVediSuOSM = (Button) pdiDettaglioFragmentView.findViewById(R.id.bVediSuOSM);\n if (bVediSuOSM != null) {\n bVediSuOSM.setOnClickListener(\n new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n mainActivity.vediPdiSceltoSuOSM();\n }\n }\n );\n }\n\n tvEsportaTraccia = (TextView) pdiDettaglioFragmentView.findViewById(R.id.tvEsportaTraccia);\n bEsportaKML = (Button) pdiDettaglioFragmentView.findViewById(R.id.bEsportaKML);\n bEsportaKMZ = (Button) pdiDettaglioFragmentView.findViewById(R.id.bEsportaKMZ);\n\n rlProgressBar = (RelativeLayout) pdiDettaglioFragmentView.findViewById(R.id.rlProgressBar);\n pbDownload = (ProgressBar) pdiDettaglioFragmentView.findViewById(R.id.pbDownload);\n\n final String fileTracciaGps = mainActivity.pdiScelto.getFileTracciaGps();\n\n if (fileTracciaGps != null && GestoreFileTracciatiGps.dammiGestoreDatabaseCondiviso(mainActivity) != null) {\n if (bEsportaKML != null) {\n bEsportaKML.setOnClickListener(\n new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n String urlFile = mainActivity.pdiScelto.getUrlTracciaGps() + \".kml\";\n final String nomeFile = fileTracciaGps + \".kml\";\n String type = \"application/kml\";\n\n Log.d(\"DEBUGAPP\", TAG + \" nomeFile: \" + nomeFile + \" type: \" + type);\n\n if (GestoreFileTracciatiGps.dammiGestoreDatabaseCondiviso(mainActivity).fileCacheNonEsiste(nomeFile)) {\n downloadInCorso = true;\n rlProgressBar.setVisibility(View.VISIBLE);\n pbDownload.setVisibility(View.VISIBLE);\n\n Ion.with(mainActivity)\n .load(urlFile)\n .progressBar(pbDownload)\n .progress(new ProgressCallback() {@Override\n public void onProgress(long downloaded, long total) {\n Log.d(\"DEBUGAPP\", TAG + \" [bEsportaKML.setOnClickListener] errore: \" + downloaded + \" / \" + total);\n }\n })\n .write(new File(GestoreFileTracciatiGps.dammiGestoreDatabaseCondiviso(mainActivity).getGpsTracksPath() + nomeFile))\n .setCallback(new FutureCallback<File>() {\n @Override\n public void onCompleted(Exception e, File file) {\n if (e != null) {\n Log.d(\"DEBUGAPP\", TAG + \" Fallito download del file \" + nomeFile + \" con errore: \" + e);\n } else {\n condividiFileConAltraApp(nomeFile);\n }\n\n downloadInCorso = false;\n rlProgressBar.setVisibility(View.GONE);\n pbDownload.setVisibility(View.GONE);\n }\n });\n } else {\n condividiFileConAltraApp(nomeFile);\n }\n }\n }\n );\n }\n\n if (bEsportaKMZ != null) {\n bEsportaKMZ.setOnClickListener(\n new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n String urlFile = mainActivity.pdiScelto.getUrlTracciaGps() + \".kmz\";\n final String nomeFile = fileTracciaGps + \".kmz\";\n String type = \"application/kmz\";\n\n Log.d(\"DEBUGAPP\", TAG + \" nomeFile: \" + nomeFile + \" type: \" + type);\n\n if (GestoreFileTracciatiGps.dammiGestoreDatabaseCondiviso(mainActivity).fileCacheNonEsiste(nomeFile)) {\n downloadInCorso = true;\n rlProgressBar.setVisibility(View.VISIBLE);\n pbDownload.setVisibility(View.VISIBLE);\n\n Ion.with(mainActivity)\n .load(urlFile)\n .progressBar(pbDownload)\n .progress(new ProgressCallback() {@Override\n public void onProgress(long downloaded, long total) {\n Log.d(\"DEBUGAPP\", TAG + \" [bEsportaKMZ.setOnClickListener] errore: \" + downloaded + \" / \" + total);\n }\n })\n .write(new File(GestoreFileTracciatiGps.dammiGestoreDatabaseCondiviso(mainActivity).getGpsTracksPath() + nomeFile))\n .setCallback(new FutureCallback<File>() {\n @Override\n public void onCompleted(Exception e, File file) {\n if (e != null) {\n Log.d(\"DEBUGAPP\", TAG + \" Fallito download del file \" + nomeFile + \" con errore: \" + e);\n } else {\n condividiFileConAltraApp(nomeFile);\n }\n\n downloadInCorso = false;\n rlProgressBar.setVisibility(View.GONE);\n pbDownload.setVisibility(View.GONE);\n }\n });\n } else {\n condividiFileConAltraApp(nomeFile);\n }\n }\n }\n );\n }\n } else {\n tvEsportaTraccia.setVisibility(View.GONE);\n bEsportaKML.setVisibility(View.GONE);\n bEsportaKMZ.setVisibility(View.GONE);\n }\n\n if (immaginiPdi.size() > 0) {\n impostaImmagine();\n } else {\n llGalleria.setVisibility(View.GONE);\n }\n\n if (mainActivity.pdiScelto.getVia() != null) {\n String indirizzo = mainActivity.pdiScelto.getCitta() + \", \" + mainActivity.pdiScelto.getVia();\n\n if (mainActivity.pdiScelto.getNumeroCivico() != null && mainActivity.pdiScelto.getNumeroCivico() != 0) {\n indirizzo = indirizzo + \", \" + mainActivity.pdiScelto.getNumeroCivico();\n }\n\n if (mainActivity.pdiScelto.getInterno() != null) {\n indirizzo = indirizzo + \"/\" + mainActivity.pdiScelto.getInterno();\n }\n\n if (mainActivity.pdiScelto.getCap() != null) {\n\n indirizzo = indirizzo + \", \" + mainActivity.pdiScelto.getCap();\n }\n\n btIndirizzo.setText(indirizzo);\n } else {\n llIndirizzo.setVisibility(View.GONE);\n }\n\n switch (mainActivity.gestoreDatabaseCondiviso.getLingua()) {\n case \"italiano\": {\n if (mainActivity.pdiScelto.getDescrizioneItaliano() != null) {\n dvDescrizione.setText(mainActivity.pdiScelto.getDescrizioneItaliano());\n\n final Handler handler = new Handler(); // serve per sistemare la rotazione di dvDescrizione che in landscape non prende tutta l'area orizzontale\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n if (dvDescrizione != null && mainActivity != null && mainActivity.pdiScelto != null) {\n dvDescrizione.setText(mainActivity.pdiScelto.getDescrizioneItaliano());\n } else {\n Log.d(\"DEBUGAPP\", TAG + \" [onCreateView - handler] dvDescrizione o mainActivity.pdiScelto nullo!\");\n }\n }\n }, 50);\n } else {\n tvIntestazioneDescrizione.setVisibility(View.GONE);\n dvDescrizione.setVisibility(View.GONE);\n }\n\n if (mainActivity.pdiScelto.getTitoloLink1GenericoItaliano() != null) {\n tvIntestazioneLink1.setText(mainActivity.pdiScelto.getTitoloLink1GenericoItaliano() + \":\");\n }\n if (mainActivity.pdiScelto.getTitoloLink2GenericoItaliano() != null) {\n tvIntestazioneLink2.setText(mainActivity.pdiScelto.getTitoloLink2GenericoItaliano() + \":\");\n }\n if (mainActivity.pdiScelto.getTitoloLink3GenericoItaliano() != null) {\n tvIntestazioneLink3.setText(mainActivity.pdiScelto.getTitoloLink3GenericoItaliano() + \":\");\n }\n if (mainActivity.pdiScelto.getTitoloLink4GenericoItaliano() != null) {\n tvIntestazioneLink4.setText(mainActivity.pdiScelto.getTitoloLink4GenericoItaliano() + \":\");\n }\n }\n break;\n\n case \"Deutsch\": {\n if (mainActivity.pdiScelto.getDescrizioneTedesco() != null) {\n dvDescrizione.setText(mainActivity.pdiScelto.getDescrizioneTedesco());\n\n final Handler handler = new Handler(); // serve per sistemare la rotazione di dvDescrizione che in landscape non prende tutta l'area orizzontale\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n if (dvDescrizione != null && mainActivity != null && mainActivity.pdiScelto != null) {\n dvDescrizione.setText(mainActivity.pdiScelto.getDescrizioneTedesco());\n } else {\n Log.d(\"DEBUGAPP\", TAG + \" [onCreateView - handler] dvDescrizione o mainActivity.pdiScelto nullo! \");\n }\n }\n }, 50);\n } else {\n tvIntestazioneDescrizione.setVisibility(View.GONE);\n dvDescrizione.setVisibility(View.GONE);\n }\n\n if (mainActivity.pdiScelto.getTitoloLink1GenericoTedesco() != null) {\n tvIntestazioneLink1.setText(mainActivity.pdiScelto.getTitoloLink1GenericoTedesco() + \":\");\n }\n if (mainActivity.pdiScelto.getTitoloLink2GenericoTedesco() != null) {\n tvIntestazioneLink2.setText(mainActivity.pdiScelto.getTitoloLink2GenericoTedesco() + \":\");\n }\n if (mainActivity.pdiScelto.getTitoloLink3GenericoTedesco() != null) {\n tvIntestazioneLink3.setText(mainActivity.pdiScelto.getTitoloLink3GenericoTedesco() + \":\");\n }\n if (mainActivity.pdiScelto.getTitoloLink4GenericoTedesco() != null) {\n tvIntestazioneLink4.setText(mainActivity.pdiScelto.getTitoloLink4GenericoTedesco() + \":\");\n }\n }\n break;\n\n case \"français\": {\n if (mainActivity.pdiScelto.getDescrizioneFrancese() != null) {\n dvDescrizione.setText(mainActivity.pdiScelto.getDescrizioneFrancese());\n\n final Handler handler = new Handler(); // serve per sistemare la rotazione di dvDescrizione che in landscape non prende tutta l'area orizzontale\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n if (dvDescrizione != null && mainActivity != null && mainActivity.pdiScelto != null) {\n dvDescrizione.setText(mainActivity.pdiScelto.getDescrizioneFrancese());\n } else {\n Log.d(\"DEBUGAPP\", TAG + \" [onCreateView - handler] dvDescrizione o mainActivity.pdiScelto nullo!\");\n }\n }\n }, 50);\n } else {\n tvIntestazioneDescrizione.setVisibility(View.GONE);\n dvDescrizione.setVisibility(View.GONE);\n }\n\n if (mainActivity.pdiScelto.getTitoloLink1GenericoFrancese() != null) {\n tvIntestazioneLink1.setText(mainActivity.pdiScelto.getTitoloLink1GenericoFrancese() + \":\");\n }\n if (mainActivity.pdiScelto.getTitoloLink2GenericoFrancese() != null) {\n tvIntestazioneLink2.setText(mainActivity.pdiScelto.getTitoloLink2GenericoFrancese() + \":\");\n }\n if (mainActivity.pdiScelto.getTitoloLink3GenericoFrancese() != null) {\n tvIntestazioneLink3.setText(mainActivity.pdiScelto.getTitoloLink3GenericoFrancese() + \":\");\n }\n if (mainActivity.pdiScelto.getTitoloLink4GenericoFrancese() != null) {\n tvIntestazioneLink4.setText(mainActivity.pdiScelto.getTitoloLink4GenericoFrancese() + \":\");\n }\n }\n break;\n\n default: {\n if (mainActivity.pdiScelto.getDescrizioneInglese() != null) {\n dvDescrizione.setText(mainActivity.pdiScelto.getDescrizioneInglese());\n\n final Handler handler = new Handler(); // serve per sistemare la rotazione di dvDescrizione che in landscape non prende tutta l'area orizzontale\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n if (dvDescrizione != null && mainActivity != null && mainActivity.pdiScelto != null) {\n dvDescrizione.setText(mainActivity.pdiScelto.getDescrizioneInglese());\n } else {\n Log.d(\"DEBUGAPP\", TAG + \" [onCreateView - handler] dvDescrizione o mainActivity.pdiScelto nullo! \");\n }\n }\n }, 50);\n } else {\n tvIntestazioneDescrizione.setVisibility(View.GONE);\n dvDescrizione.setVisibility(View.GONE);\n }\n\n if (mainActivity.pdiScelto.getTitoloLink1GenericoInglese() != null) {\n tvIntestazioneLink1.setText(mainActivity.pdiScelto.getTitoloLink1GenericoInglese() + \":\");\n }\n if (mainActivity.pdiScelto.getTitoloLink2GenericoInglese() != null) {\n tvIntestazioneLink2.setText(mainActivity.pdiScelto.getTitoloLink2GenericoInglese() + \":\");\n }\n if (mainActivity.pdiScelto.getTitoloLink3GenericoInglese() != null) {\n tvIntestazioneLink3.setText(mainActivity.pdiScelto.getTitoloLink3GenericoInglese() + \":\");\n }\n if (mainActivity.pdiScelto.getTitoloLink4GenericoInglese() != null) {\n tvIntestazioneLink4.setText(mainActivity.pdiScelto.getTitoloLink4GenericoInglese() + \":\");\n }\n }\n }\n\n if (mainActivity.pdiScelto.getTelefono() != null) {\n btTelefono.setText(mainActivity.pdiScelto.getTelefono());\n } else {\n llTelefono.setVisibility(View.GONE);\n }\n\n if (mainActivity.pdiScelto.getFax() != null) {\n btFax.setText(mainActivity.pdiScelto.getFax());\n } else {\n llFax.setVisibility(View.GONE);\n }\n\n if (mainActivity.pdiScelto.getCellulare() != null) {\n btCellulare.setText(mainActivity.pdiScelto.getCellulare());\n } else {\n llCellulare.setVisibility(View.GONE);\n }\n\n if (mainActivity.pdiScelto.getEmail() != null) {\n btEmail.setText(mainActivity.pdiScelto.getEmail());\n } else {\n llEmail.setVisibility(View.GONE);\n }\n\n if (mainActivity.pdiScelto.getLinkGenerico1() != null) {\n btLink1.setText(mainActivity.pdiScelto.getLinkGenerico1());\n } else {\n llLink1.setVisibility(View.GONE);\n }\n\n if (mainActivity.pdiScelto.getLinkGenerico2() != null) {\n btLink2.setText(mainActivity.pdiScelto.getLinkGenerico2());\n } else {\n llLink2.setVisibility(View.GONE);\n }\n\n if (mainActivity.pdiScelto.getLinkGenerico3() != null) {\n btLink3.setText(mainActivity.pdiScelto.getLinkGenerico3());\n } else {\n llLink3.setVisibility(View.GONE);\n }\n\n if (mainActivity.pdiScelto.getLinkGenerico4() != null) {\n btLink4.setText(mainActivity.pdiScelto.getLinkGenerico4());\n } else {\n llLink4.setVisibility(View.GONE);\n }\n\n return pdiDettaglioFragmentView;\n }", "public int getBegin() {\r\n return (event.getStartTime() - 6) * PIXELS_PER_HOUR;\r\n }", "public void calcularIndicePlasticidad(){\r\n\t\tindicePlasticidad = limiteLiquido - limitePlastico;\r\n\t}", "public long computeDurationHint() {\n return (getStartOffset() + getDuration()) * (getRepeatCount() + 1);\n }", "private final void m136464d() {\n BaseFragment baseFragment;\n if (this.f98816d && this.f98817e && getView() != null && (baseFragment = this.f98814b) != null) {\n if (baseFragment.isDetached() || baseFragment.getContext() == null) {\n VideoXOnlineLog.m139074c(VideoXOnlineLog.f101073b, C6969H.m41409d(\"G458AC31F8D3FA424C5019E5CF3ECCDD27BA5C71BB83DAE27F2549946FBF1E0D86797D413B135B973A60B825AFDF79985\"), null, 2, null);\n return;\n }\n if (baseFragment.getActivity() != null) {\n FragmentActivity activity = baseFragment.getActivity();\n if ((activity != null ? activity.getApplication() : null) != null) {\n m136459a(baseFragment);\n return;\n }\n }\n VideoXOnlineLog.m139074c(VideoXOnlineLog.f101073b, C6969H.m41409d(\"G458AC31F8D3FA424C5019E5CF3ECCDD27BA5C71BB83DAE27F2549946FBF1E0D86797D413B135B973A60B825AFDF79986\"), null, 2, null);\n }\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_activity_tracking_statistics, container, false);\n\n Map<String, Integer> minutePerActivityMap = new TreeMap<>();\n Map<String, Integer> activityCountMap = new TreeMap<>();\n DateFormatSymbols symbols = new DateFormatSymbols(Locale.getDefault());\n String[] months = symbols.getMonths();;\n for (Map row : activityList) {\n String type = row.get(ActivityTrackingDatabaseHelper.TYPE).toString();\n String timeString = row.get(ActivityTrackingDatabaseHelper.TIME).toString();\n Date time = null;\n try {\n time = ActivityTrackingUtil.getDateFormatter().parse(timeString);\n } catch (Exception e) {\n Log.e(ActivityTrackingStatisticsFragment.class.getName(), \"Error parsing time: \" + timeString);\n time = new Date();\n }\n Date today = new Date();\n\n String durationString = row.get(ActivityTrackingDatabaseHelper.DURATION).toString();\n int duration = Integer.parseInt(durationString);\n String month = months[time.getMonth()];\n Integer minutePerActivity = minutePerActivityMap.get(month);\n\n if (! (time.getYear() == today.getYear())) {\n continue;\n }\n if (minutePerActivity == null) {\n minutePerActivityMap.put(month, duration);\n } else {\n minutePerActivityMap.put(month, duration + minutePerActivity);\n }\n\n if (! (time.getMonth() == today.getMonth())) {\n continue;\n }\n\n\n Integer activityCount = activityCountMap.get(type);\n if (activityCount == null) {\n activityCountMap.put(type, 1);\n } else {\n activityCountMap.put(type, ++activityCount);\n }\n }\n\n TextView minutePerActivityView = view.findViewById(R.id.t_minitePerActivity);\n String mpa = getString(minutePerActivityMap);\n minutePerActivityView.setText(mpa);\n\n TextView activityCountView = view.findViewById(R.id.t_activityCount);\n activityCountView.setText(getString(activityCountMap));\n\n final Intent startIntent = new Intent(getActivity(), ActivityTrackingActivity.class);\n ((Button)view.findViewById(R.id.t_stats_ok)).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n getActivity().finish();\n startActivity(startIntent);\n }\n });\n return view;\n }", "public double t1() {\n\t\treturn segments.size() - 1;\n\t}", "public int getTSS() { \n\t\treturn( getStartOfBEDentry( getBEDentry().getBlockAtRelativePosition(1))); \n\t}", "private void m145775e() {\n long j;\n String str;\n int i;\n if (!this.f119477j.mo115499a()) {\n if (this.f119484q != null) {\n str = \"PRAGMA cipher_page_size\";\n if (this.f119485r == null || this.f119485r.pageSize <= 0) {\n i = SQLiteGlobal.f119529a;\n } else {\n i = this.f119485r.pageSize;\n }\n j = (long) i;\n } else {\n str = \"PRAGMA page_size\";\n j = (long) SQLiteGlobal.f119529a;\n }\n if (mo115435b(str, null, null) != j) {\n StringBuilder sb = new StringBuilder();\n sb.append(str);\n sb.append(\"=\");\n sb.append(j);\n mo115433a(sb.toString(), null, null);\n }\n }\n }", "@Override\n\tpublic int sacameVida(ElementoAlien a) {\n\t\treturn 20;\n\t}", "private void m125723r() {\n Context context = getContext();\n if (context != null) {\n if (this.f90233z == null) {\n this.f90233z = new ProgressView(context);\n }\n FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(-2, -2);\n layoutParams.gravity = 1;\n layoutParams.topMargin = DisplayUtils.m87171b(context, 50.0f);\n this.f90233z.mo68349a();\n if (this.f88308f != null) {\n TopicCommonUtil.m123937a(this.f88308f, this.f90233z, layoutParams);\n }\n }\n }", "@Override\n\tpublic int horas_trabajo() {\n\t\treturn 1000;\n\t}", "public void venceuRodada () {\n this.pontuacaoPartida++;\n }", "private int getTrackPosition(long cpuTime) {\n return (int) ((cpuTime / clockTicksPerWord) % WORDS_PER_TRACK);\n }", "public static int getVelocidade() {\n return velocidade;\n }", "public int darTamanoHourly()\n\t{\n\t\treturn queueHourly.darNumeroElementos();\n\t}", "@Override\n\tpublic void muestraInfo() {\n\t\tSystem.out.println(\"Adivina un número par: Es un juego en el que el jugador\" +\n\t\t\t\t\" deberá acertar un número PAR comprendido entre el 0 y el 10 mediante un número limitado de intentos(vidas)\");\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n vista=inflater.inflate(R.layout.fragment_v_violencia_pareja, container, false);\n btnSiguiente= (Button) vista.findViewById(R.id.btnSiguiente34);\n btnAtras= (Button) vista.findViewById(R.id.btnAtras34);\n idFragment= (TextView) vista.findViewById(R.id.idViolenciaPareja);\n rdinfielMM=(RadioButton) vista.findViewById(R.id.mmInfiel);\n rdinfielAV=(RadioButton) vista.findViewById(R.id.avInfiel);\n rdinfielN=(RadioButton) vista.findViewById(R.id.nInfiel);\n rdinfielNC=(RadioButton) vista.findViewById(R.id.ncInfiel);\n rdcelosMM=(RadioButton) vista.findViewById(R.id.mmCelos);\n rdcelosAV=(RadioButton) vista.findViewById(R.id.avCelos);\n rdcelosN=(RadioButton) vista.findViewById(R.id.nCelos);\n rdcelosNC=(RadioButton) vista.findViewById(R.id.ncCelos);\n rdrevisarCelularMM=(RadioButton) vista.findViewById(R.id.mmRevisarCelular);\n rdrevisarCelularAV=(RadioButton) vista.findViewById(R.id.avRevisarCelular);\n rdrevisarCelularN=(RadioButton) vista.findViewById(R.id.nRevisarCelular);\n rdrevisarCelularNC=(RadioButton) vista.findViewById(R.id.ncRevisarCelular);\n rdlimitarFamiliaMM=(RadioButton) vista.findViewById(R.id.mmLimitarFamilia);\n rdlimitarFamiliaAV=(RadioButton) vista.findViewById(R.id.avLimitarFamilia);\n rdlimitarFamiliaN=(RadioButton) vista.findViewById(R.id.nLimitarFamilia);\n rdlimitarFamiliaNC=(RadioButton) vista.findViewById(R.id.ncLimitarFamilia);\n rdinsultarPublicoMM=(RadioButton) vista.findViewById(R.id.mmInsultarPublico);\n rdinsultarPublicoAV=(RadioButton) vista.findViewById(R.id.avInsultarPublico);\n rdinsultarPublicoN=(RadioButton) vista.findViewById(R.id.nInsultarPublico);\n rdinsultarPublicoNC=(RadioButton) vista.findViewById(R.id.ncInsultarPublico);\n rdamenazaAbandonarteMM=(RadioButton) vista.findViewById(R.id.mmAmenazaAbandonarte);\n rdamenazaAbandonarteAV=(RadioButton) vista.findViewById(R.id.avAmenazaAbandonarte);\n rdamenazaAbandonarteN=(RadioButton) vista.findViewById(R.id.nAmenazaAbandonarte);\n rdamenazaAbandonarteNC=(RadioButton) vista.findViewById(R.id.ncAmenazaAbandonarte);\n rdquitarHijosMM=(RadioButton) vista.findViewById(R.id.mmQuitarHijos);\n rdquitarHijosAV=(RadioButton) vista.findViewById(R.id.avQuitarHijos);\n rdquitarHijosN=(RadioButton) vista.findViewById(R.id.nQuitarHijos);\n rdquitarHijosNC=(RadioButton) vista.findViewById(R.id.ncQuitarHijos);\n rdamenazaEconomicaMM=(RadioButton) vista.findViewById(R.id.mmAmenazaEconomico);\n rdamenazaEconomicaAV=(RadioButton) vista.findViewById(R.id.avAmenazaEconomico);\n rdamenazaEconomicaN=(RadioButton) vista.findViewById(R.id.nAmenazaEconomico);\n rdamenazaEconomicaNC=(RadioButton) vista.findViewById(R.id.ncAmenazaEconomico);\n rdrompeObjetosMM=(RadioButton) vista.findViewById(R.id.mmRompeObjetos);\n rdrompeObjetosAV=(RadioButton) vista.findViewById(R.id.avRompeObjetos);\n rdrompeObjetosN=(RadioButton) vista.findViewById(R.id.nRompeObjetos);\n rdrompreObjetosNC=(RadioButton) vista.findViewById(R.id.ncRompeObjetos);\n rdotroMM=(RadioButton) vista.findViewById(R.id.mmOtroViolenciaPareja);\n rdotroAV=(RadioButton) vista.findViewById(R.id.avOtroViolenciaPareja);\n rdotroN=(RadioButton) vista.findViewById(R.id.nOtroViolenciaPareja);\n rdotroNC=(RadioButton) vista.findViewById(R.id.ncOtroViolenciaPareja);\n\n\n txtOtro=(EditText) vista.findViewById(R.id.txtotroViolenciaPareja);\n\n\n Bundle data=getArguments();\n\n if(data!=null){\n\n idFragment.setText(data.getString(\"idEncuesta\"));\n\n\n\n }\n //Aqui empieza el volley\n //request= Volley.newRequestQueue(getContext());\n //aqui se llama al web services\n cargarWebServices();\n btnSiguiente.setOnClickListener(v -> {\n String pantalla=\"Siguiente\";\n actualizar(pantalla);\n\n });\n\n btnAtras.setOnClickListener(v -> {\n String pantalla=\"Atras\";\n actualizar(pantalla);\n\n });\n return vista;\n }", "private void cazaFantasma(Vertice<T> v){\n\tif(v.padre == null){\n\t if(v == this.raiz){\n\t\tthis.raiz = null;\n\t\treturn;\n\t }\n\t return;\n\t}else{\n\t Vertice<T> padre = v.padre;\n\t if(v == padre.izquierdo){\n\t\tif(v.hayIzquierdo()){\n\t\t padre.izquierdo = v.izquierdo;\n\t\t v.izquierdo.padre = padre;\n\t\t}else if(v.hayDerecho()){\n\t\t padre.izquierdo = v.derecho;\n\t\t v.derecho.padre = padre;\n\t\t}else{\n\t\t padre.izquierdo = null;\n\t\t}\t\t\n\t }else{\n\t\tif(v.hayIzquierdo()){\n\t\t padre.derecho = v.izquierdo;\n\t\t v.izquierdo.padre = padre;\n\t\t}else if(v.hayDerecho()){\n\t\t padre.derecho = v.derecho;\n\t\t v.derecho.padre = padre;\n\t\t}else{\n\t\t padre.derecho = null;\n\t\t}\n\t }\n\t}\n }", "public void W(Fragment fragment, int i2, int i3, int i4, boolean z2) {\n int i5;\n Fragment fragment2;\n boolean z3;\n ViewGroup viewGroup;\n String str;\n Parcelable parcelable;\n Parcelable parcelable2;\n Fragment fragment3;\n int i6;\n int i7 = 1;\n if (!fragment.k || fragment.z) {\n i5 = i2;\n if (i5 > 1) {\n i5 = 1;\n }\n } else {\n i5 = i2;\n }\n if (fragment.l && i5 > (i6 = fragment.f902b)) {\n i5 = (i6 != 0 || !fragment.u()) ? fragment.f902b : 1;\n }\n int i8 = 3;\n if (fragment.F && fragment.f902b < 3 && i5 > 2) {\n i5 = 2;\n }\n d.b bVar = fragment.N;\n int min = bVar == d.b.CREATED ? Math.min(i5, 1) : Math.min(i5, bVar.ordinal());\n int i9 = fragment.f902b;\n if (i9 <= min) {\n if (!fragment.m || fragment.n) {\n if (!(fragment.c() == null && fragment.g() == null)) {\n fragment.B(null);\n fragment.C(null);\n W(fragment, fragment.s(), 0, 0, true);\n }\n int i10 = fragment.f902b;\n if (i10 != 0) {\n if (i10 != 1) {\n if (i10 != 2) {\n }\n if (min <= 2) {\n fragment.t.X();\n fragment.t.K();\n i8 = 3;\n fragment.f902b = 3;\n fragment.C = false;\n fragment.C = true;\n fragment.O.d(d.a.ON_START);\n j jVar = fragment.t;\n jVar.u = false;\n jVar.v = false;\n jVar.H(3);\n z(fragment, false);\n } else {\n i8 = 3;\n }\n if (min > i8) {\n fragment.t.X();\n fragment.t.K();\n fragment.f902b = 4;\n fragment.C = false;\n fragment.C = true;\n fragment.O.d(d.a.ON_RESUME);\n j jVar2 = fragment.t;\n jVar2.u = false;\n jVar2.v = false;\n jVar2.H(4);\n fragment.t.K();\n x(fragment, false);\n fragment.f903c = null;\n fragment.d = null;\n }\n }\n } else if (min > 0) {\n Bundle bundle = fragment.f903c;\n if (bundle != null) {\n bundle.setClassLoader(this.p.f579c.getClassLoader());\n fragment.d = fragment.f903c.getSparseParcelableArray(\"android:view_state\");\n String string = fragment.f903c.getString(\"android:target_state\");\n if (string == null) {\n fragment3 = null;\n } else {\n fragment3 = this.g.get(string);\n if (fragment3 == null) {\n f0(new IllegalStateException(\"Fragment no longer exists for key \" + \"android:target_state\" + \": unique id \" + string));\n throw null;\n }\n }\n String str2 = fragment3 != null ? fragment3.e : null;\n fragment.h = str2;\n if (str2 != null) {\n fragment.i = fragment.f903c.getInt(\"android:target_req_state\", 0);\n }\n boolean z4 = fragment.f903c.getBoolean(\"android:user_visible_hint\", true);\n fragment.G = z4;\n if (!z4) {\n fragment.F = true;\n if (min > 2) {\n min = 2;\n }\n }\n }\n h hVar = this.p;\n fragment.s = hVar;\n Fragment fragment4 = this.r;\n fragment.u = fragment4;\n fragment.r = fragment4 != null ? fragment4.t : hVar.f;\n Fragment fragment5 = fragment.g;\n if (fragment5 != null) {\n Fragment fragment6 = this.g.get(fragment5.e);\n Fragment fragment7 = fragment.g;\n if (fragment6 == fragment7) {\n if (fragment7.f902b < 1) {\n W(fragment7, 1, 0, 0, true);\n }\n fragment.h = fragment.g.e;\n fragment.g = null;\n } else {\n throw new IllegalStateException(\"Fragment \" + fragment + \" declared target fragment \" + fragment.g + \" that does not belong to this FragmentManager!\");\n }\n }\n String str3 = fragment.h;\n if (str3 != null) {\n Fragment fragment8 = this.g.get(str3);\n if (fragment8 == null) {\n throw new IllegalStateException(\"Fragment \" + fragment + \" declared target fragment \" + fragment.h + \" that does not belong to this FragmentManager!\");\n } else if (fragment8.f902b < 1) {\n W(fragment8, 1, 0, 0, true);\n }\n }\n v(fragment, this.p.f579c, false);\n fragment.t.d(fragment.s, new c(fragment), fragment);\n fragment.C = false;\n h hVar2 = fragment.s;\n Context context = hVar2.f579c;\n fragment.C = true;\n if (hVar2.f578b != null) {\n fragment.C = false;\n fragment.C = true;\n }\n if (fragment.C) {\n if (fragment.u == null) {\n this.p.g(fragment);\n }\n q(fragment, this.p.f579c, false);\n if (!fragment.M) {\n w(fragment, fragment.f903c, false);\n Bundle bundle2 = fragment.f903c;\n fragment.t.X();\n fragment.f902b = 1;\n fragment.C = false;\n fragment.R.a(bundle2);\n fragment.C = true;\n if (!(bundle2 == null || (parcelable2 = bundle2.getParcelable(\"android:support:fragments\")) == null)) {\n fragment.t.a0(parcelable2);\n fragment.t.k();\n }\n j jVar3 = fragment.t;\n if (!(jVar3.o >= 1)) {\n jVar3.k();\n }\n fragment.M = true;\n if (fragment.C) {\n fragment.O.d(d.a.ON_CREATE);\n r(fragment, fragment.f903c, false);\n } else {\n throw new z(\"Fragment \" + fragment + \" did not call through to super.onCreate()\");\n }\n } else {\n Bundle bundle3 = fragment.f903c;\n if (!(bundle3 == null || (parcelable = bundle3.getParcelable(\"android:support:fragments\")) == null)) {\n fragment.t.a0(parcelable);\n fragment.t.k();\n }\n fragment.f902b = 1;\n }\n } else {\n throw new z(\"Fragment \" + fragment + \" did not call through to super.onAttach()\");\n }\n }\n if (min > 0 && fragment.m && !fragment.p) {\n fragment.w(fragment.x(fragment.f903c), null, fragment.f903c);\n fragment.E = null;\n }\n if (min > 1) {\n if (!fragment.m) {\n int i11 = fragment.w;\n if (i11 == 0) {\n viewGroup = null;\n } else if (i11 != -1) {\n viewGroup = (ViewGroup) this.q.b(i11);\n if (viewGroup == null && !fragment.o) {\n try {\n h hVar3 = fragment.s;\n Context context2 = hVar3 == null ? null : hVar3.f579c;\n if (context2 != null) {\n str = context2.getResources().getResourceName(fragment.w);\n StringBuilder d2 = b.a.a.a.a.d(\"No view found for id 0x\");\n d2.append(Integer.toHexString(fragment.w));\n d2.append(\" (\");\n d2.append(str);\n d2.append(\") for fragment \");\n d2.append(fragment);\n f0(new IllegalArgumentException(d2.toString()));\n throw null;\n }\n throw new IllegalStateException(\"Fragment \" + fragment + \" not attached to a context.\");\n } catch (Resources.NotFoundException unused) {\n str = \"unknown\";\n }\n }\n } else {\n f0(new IllegalArgumentException(\"Cannot create fragment \" + fragment + \" for a container view with no id\"));\n throw null;\n }\n fragment.D = viewGroup;\n fragment.w(fragment.x(fragment.f903c), viewGroup, fragment.f903c);\n fragment.E = null;\n }\n fragment.t.X();\n fragment.f902b = 2;\n fragment.C = false;\n fragment.C = true;\n j jVar4 = fragment.t;\n jVar4.u = false;\n jVar4.v = false;\n jVar4.H(2);\n p(fragment, fragment.f903c, false);\n fragment.f903c = null;\n }\n if (min <= 2) {\n }\n if (min > i8) {\n }\n } else {\n return;\n }\n } else if (i9 > min) {\n if (i9 != 1) {\n if (i9 != 2) {\n if (i9 != 3) {\n if (i9 == 4) {\n if (min < 4) {\n fragment.t.H(3);\n fragment.O.d(d.a.ON_PAUSE);\n fragment.f902b = 3;\n fragment.C = false;\n fragment.C = true;\n u(fragment, false);\n }\n }\n }\n if (min < 3) {\n j jVar5 = fragment.t;\n jVar5.v = true;\n jVar5.H(2);\n fragment.O.d(d.a.ON_STOP);\n fragment.f902b = 2;\n fragment.C = false;\n fragment.C = true;\n A(fragment, false);\n }\n }\n if (min < 2) {\n fragment.t.H(1);\n fragment.f902b = 1;\n fragment.C = false;\n fragment.C = true;\n b.C0019b bVar2 = ((a.n.a.b) a.n.a.a.b(fragment)).f655b;\n int i12 = bVar2.f657b.i();\n for (int i13 = 0; i13 < i12; i13++) {\n Objects.requireNonNull(bVar2.f657b.j(i13));\n }\n fragment.p = false;\n B(fragment, false);\n fragment.D = null;\n fragment.P = null;\n fragment.Q.g(null);\n fragment.E = null;\n fragment.n = false;\n }\n }\n if (min < 1) {\n if (this.w) {\n if (fragment.c() != null) {\n View c2 = fragment.c();\n fragment.B(null);\n c2.clearAnimation();\n } else if (fragment.g() != null) {\n Animator g2 = fragment.g();\n fragment.C(null);\n g2.cancel();\n }\n }\n if (fragment.c() == null && fragment.g() == null) {\n boolean z5 = fragment.l && !fragment.u();\n if (z5 || this.E.b(fragment)) {\n h hVar4 = this.p;\n if (hVar4 instanceof t) {\n z3 = this.E.f;\n } else {\n Context context3 = hVar4.f579c;\n z3 = context3 instanceof Activity ? !((Activity) context3).isChangingConfigurations() : true;\n }\n if (z5 || z3) {\n l lVar = this.E;\n Objects.requireNonNull(lVar);\n l lVar2 = lVar.f593c.get(fragment.e);\n if (lVar2 != null) {\n lVar2.a();\n lVar.f593c.remove(fragment.e);\n }\n s sVar = lVar.d.get(fragment.e);\n if (sVar != null) {\n sVar.a();\n lVar.d.remove(fragment.e);\n }\n }\n fragment.t.m();\n fragment.O.d(d.a.ON_DESTROY);\n fragment.f902b = 0;\n fragment.C = false;\n fragment.M = false;\n fragment.C = true;\n s(fragment, false);\n } else {\n fragment.f902b = 0;\n }\n fragment.C = false;\n fragment.C = true;\n fragment.L = null;\n j jVar6 = fragment.t;\n if (!jVar6.w) {\n jVar6.m();\n fragment.t = new j();\n }\n t(fragment, false);\n if (!z2) {\n if (!z5 && !this.E.b(fragment)) {\n fragment.s = null;\n fragment.u = null;\n fragment.r = null;\n String str4 = fragment.h;\n if (!(str4 == null || (fragment2 = this.g.get(str4)) == null || !fragment2.A)) {\n fragment.g = fragment2;\n }\n } else if (this.g.get(fragment.e) != null) {\n for (Fragment fragment9 : this.g.values()) {\n if (fragment9 != null && fragment.e.equals(fragment9.h)) {\n fragment9.g = fragment;\n fragment9.h = null;\n }\n }\n this.g.put(fragment.e, null);\n if (!S()) {\n this.E.f592b.remove(fragment);\n }\n String str5 = fragment.h;\n if (str5 != null) {\n fragment.g = this.g.get(str5);\n }\n fragment.t();\n fragment.e = UUID.randomUUID().toString();\n fragment.k = false;\n fragment.l = false;\n fragment.m = false;\n fragment.n = false;\n fragment.o = false;\n fragment.q = 0;\n fragment.r = null;\n fragment.t = new j();\n fragment.s = null;\n fragment.v = 0;\n fragment.w = 0;\n fragment.x = null;\n fragment.y = false;\n fragment.z = false;\n }\n }\n } else {\n fragment.b().f907c = min;\n if (fragment.f902b == i7) {\n Log.w(\"FragmentManager\", \"moveToState: Fragment state for \" + fragment + \" not updated inline; expected state \" + i7 + \" found \" + fragment.f902b);\n fragment.f902b = i7;\n return;\n }\n return;\n }\n }\n }\n i7 = min;\n if (fragment.f902b == i7) {\n }\n }", "private static int gravidadeTempo(int[] limites, int valor) {\n\t\tint result = -1;\n\t\tfor(int i = 0 ; i < limites.length && result == -1 ; i++) {\n\t\t\tif(valor <= limites[i]) {\n\t\t\t\tresult = i;\n\t\t\t}\n\t\t}\n\n\t\treturn result == -1 ? limites.length : result;\n\t}", "public int getAtaque() {\r\n\t\treturn this.unidad.getAtaque() + INCREMENTO_ATAQUE;\r\n\t}", "public double getMaxT() {\n return v[points_per_segment - 1];\n }", "public void editHashiv(final int position) {\n int mnacord, temp;\n\n//sa nshanakum e usern sexmel e toxi (=positioni) vra ev uzum e hashivnern xmbagri\n // kom1_kom2=1-i kom1-n e sexmvac, kom1_kom2=2 kom2- e sexmvac\n\n this.position = position;\n// Log.d(\"qqq\", \"\"+position/3);\n//---------\n//3 syunic axyusak enq stanum, vortex 3-i bajanelis mnacordum\n// 1-in syunin mnum e mnacord= 0, 2-rd syunin mnacord=1, isk 3-rdin mnacord=2\n mnacord = position % 3;\n//New Game rejimn e, xaxi skzbum erb voch mek der chi xosacel\n //{\n if (mnacord == 2)//bacel xoz xosalu texn\n {\n try {\n ExtraOrderBtnDialog bottomSheet = new ExtraOrderBtnDialog();\n bottomSheet.show(getSupportFragmentManager(), \"exampleBottomSheet\");\n } catch (ClassCastException e) {\n throw new ClassCastException();\n }\n }//bacel hashiv grelu dashtn (1-in syunn)\n else if (mnacord == 0) {\n//isk ete derevs xoz xosalu dashtn datark e, apa eli bacel miayn xoz xosalu texn\n if (recyclerViewItem_ArrayList.get(position + 2).getZakaz().equals(\"0\")) {\n try {\n ExtraOrderBtnDialog bottomSheet = new ExtraOrderBtnDialog();\n bottomSheet.show(getSupportFragmentManager(), \"exampleBottomSheet\");\n } catch (ClassCastException e) {\n throw new ClassCastException();\n }\n } else {//tvyal toxi xozn arden xosacel en\n kom1_kom2 = 1;\n if (recyclerViewItem_ArrayList.get(position).getZakaz() == null) {\n temp = 0;\n mejtex_Nor_Tox = true;//ete true e nor tox e, ete false mejtexi\n } else {\n temp = hashiv_Zangvac_kom1.get((position / 3));\n mejtex_Nor_Tox = false;//ete true e nor tox e, ete false mejtexi\n //xalastoy rejim, miayn xmbagrel tmeric meki hashivn\n kom1_kom2_kanchele = 0;\n }\n//mer sarqac interfeysi ekzempliar\n ExtraButtonDialog bottomSheet = new ExtraButtonDialog(\n temp,\n // recyclerViewItem_ArrayList.get(position).getZakaz(),\n kom1_kom2, kom1_kom2_kanchele, mast, order);\n bottomSheet.show(getSupportFragmentManager(), \"exampleBottomSheet\");\n }\n } else if (mnacord == 1) {//bacel hashiv grelu dashtn (2-in syunn)\n//isk ete derevs xoz xosalu dashtn datark e ayd toxi vra,\n// apa eli bacel miayn xoz xosalu texn\n if (recyclerViewItem_ArrayList.get(position + 1).getZakaz().equals(\"0\")) {\n try {\n ExtraOrderBtnDialog bottomSheet = new ExtraOrderBtnDialog();\n bottomSheet.show(getSupportFragmentManager(), \"exampleBottomSheet\");\n } catch (ClassCastException e) {\n throw new ClassCastException();\n }\n } else {//tvyal toxi xozn arden xosacel en\n kom1_kom2 = 2;\n if (recyclerViewItem_ArrayList.get(position).getZakaz() == null) {\n temp = 0;\n mejtex_Nor_Tox = true;//ete true e nor tox e, ete false mejtexi\n } else {\n temp = hashiv_Zangvac_kom2.get((position / 3));\n mejtex_Nor_Tox = false;//ete true e nor tox e, ete false mejtexi\n //xalastoy rejim, miayn xmbagrel tmeric meki hashivn\n kom1_kom2_kanchele = 0;\n }\n//mer sarqac interfeysi ekzempliar\n ExtraButtonDialog bottomSheet = new ExtraButtonDialog(\n temp,\n // recyclerViewItem_ArrayList.get(position).getZakaz(),\n kom1_kom2, kom1_kom2_kanchele, mast, order);\n bottomSheet.show(getSupportFragmentManager(), \"exampleBottomSheet\");\n\n }\n }\n }", "private int contabilizaHorasNoLectivas(ArrayList<FichajeRecuentoBean> listaFichajesRecuento, ProfesorBean profesor, boolean guardar, int mes) {\r\n int segundos=0;\r\n for (FichajeRecuentoBean fichajeRecuento : listaFichajesRecuento) {\r\n// System.out.println(fichajeRecuento.getFecha()+\" \"+fichajeRecuento.getHoraEntrada()+\"->\"+fichajeRecuento.getHoraSalida()+\" => \"+UtilsContabilizar.dimeDuracion(fichajeRecuento.getHoraEntrada(),fichajeRecuento.getHoraSalida()));\r\n segundos+=UtilsContabilizar.dimeDuracion(fichajeRecuento.getHoraEntrada(),fichajeRecuento.getHoraSalida());\r\n \r\n DetalleInformeBean detalleInforme=new DetalleInformeBean();\r\n detalleInforme.setIdProfesor(profesor.getIdProfesor());\r\n detalleInforme.setTotalHoras(UtilsContabilizar.dimeDuracion(fichajeRecuento.getHoraEntrada(),fichajeRecuento.getHoraSalida()));\r\n detalleInforme.setFecha(fichajeRecuento.getFecha());\r\n detalleInforme.setHoraIni(fichajeRecuento.getHoraEntrada());\r\n detalleInforme.setHoraFin(fichajeRecuento.getHoraSalida());\r\n detalleInforme.setTipoHora(\"NL\");\r\n if(guardar && detalleInforme.getTotalHoras()>0)GestionDetallesInformesBD.guardaDetalleInforme(detalleInforme, \"contabilizaHorasNoLectivas\", mes);\r\n \r\n }\r\n return segundos;\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_estadisticas, container, false);\n ventasTotales = view.findViewById(R.id.ventasTotales);\n ventasTotalesPorCobrar = view.findViewById(R.id.ventasTotalesPorCobrar);\n gastosTotalesPorPagar = view.findViewById(R.id.gastosTotalesPorPagar);\n gastosTotales = view.findViewById(R.id.gastosTotales);\n gastosMenosVentas = view.findViewById(R.id.gastosMenosVentas);\n fechaActual = view.findViewById(R.id.txtFechaSelect);\n ic_sumar_fecha = view.findViewById(R.id.ic_sumar_fecha);\n ic_restar_fecha = view.findViewById(R.id.ic_restar_fehca);\n escalar = view.findViewById(R.id.escalar);\n info_ganancias_totales = view.findViewById(R.id.info_ganancias_totales);\n info_gastos_totales = view.findViewById(R.id.info_gastos_totales);\n info_balance_neto = view.findViewById(R.id.info_balance_neto);\n\n/* Animation connectingAnimation = AnimationUtils.loadAnimation(getContext(), R.anim.scale_anim);\n escalar.startAnimation(connectingAnimation);*/\n\n\n //zone\n sdf.setTimeZone(TimeZone.getTimeZone(\"GMT-5\"));\n calendar.get(Calendar.MONTH);\n fechaActual.setText(sdf.format(calendar.getTime()));\n\n info_ganancias_totales.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Balloon balloon = new Balloon.Builder(getContext())\n .setArrowSize(10)\n .setArrowOrientation(ArrowOrientation.TOP)\n .setArrowConstraints(ArrowConstraints.ALIGN_ANCHOR)\n .setArrowPosition(0.5f)\n .setWidth(BalloonSizeSpec.WRAP)\n .setHeight(110)\n .setTextSize(15f)\n .setMargin(5)\n .setCornerRadius(6f)\n .setAlpha(0.9f)\n .setText(\"Son las ganancias totales de todas tus ventas ¡incluyendo las que no te han pagado!\")\n .setTextColor(getResources().getColor(R.color.white))\n .setTextIsHtml(true)\n .setBackgroundColor(getResources().getColor(R.color.primario))\n .setBalloonAnimation(BalloonAnimation.FADE)\n .build();\n\n balloon.showAlignBottom(info_ganancias_totales);\n }\n });\n\n info_gastos_totales.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Balloon balloon = new Balloon.Builder(getContext())\n .setArrowSize(10)\n .setArrowOrientation(ArrowOrientation.TOP)\n .setArrowConstraints(ArrowConstraints.ALIGN_ANCHOR)\n .setArrowPosition(0.5f)\n .setWidth(BalloonSizeSpec.WRAP)\n .setHeight(110)\n .setTextSize(15f)\n .setMargin(5)\n .setCornerRadius(6f)\n .setAlpha(0.9f)\n .setText(\"Son los gastos totales en el mes ¡incluyendo los que no has pagado!\")\n .setTextColor(getResources().getColor(R.color.white))\n .setTextIsHtml(true)\n .setBackgroundColor(getResources().getColor(R.color.primario))\n .setBalloonAnimation(BalloonAnimation.FADE)\n .build();\n\n balloon.showAlignBottom(info_gastos_totales);\n }\n });\n\n info_balance_neto.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Balloon balloon = new Balloon.Builder(getContext())\n .setArrowSize(10)\n .setArrowOrientation(ArrowOrientation.TOP)\n .setArrowConstraints(ArrowConstraints.ALIGN_ANCHOR)\n .setArrowPosition(0.5f)\n .setWidth(BalloonSizeSpec.WRAP)\n .setHeight(110)\n .setTextSize(15f)\n .setMargin(5)\n .setCornerRadius(6f)\n .setAlpha(0.9f)\n .setText(\"Es el valor total el cual se compone de la operación matemática que resta tus ganancias totales a tus gastos totales del mes!\")\n .setTextColor(getResources().getColor(R.color.white))\n .setTextIsHtml(true)\n .setBackgroundColor(getResources().getColor(R.color.primario))\n .setBalloonAnimation(BalloonAnimation.FADE)\n .build();\n\n balloon.showAlignBottom(info_balance_neto);\n }\n });\n\n\n\n ic_sumar_fecha.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n selectorDeFecha(1);\n cargarDatosSegunFecha(calendar);\n }\n });\n\n ic_restar_fecha.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n selectorDeFecha(-1);\n cargarDatosSegunFecha(calendar);\n }\n });\n\n\n return view;\n }", "public abstract int getFragmentView();", "public long getTotSeg() {\n return TotSeg;\n }", "public void hora()\n {\n horaTotal = HoraSalida - HoraLlegada;\n\n }", "private long getTotalDuration() {\n if(mMarkers.size() == 0) {\n return 0;\n }\n long first = mMarkers.get(0).time;\n long last = mMarkers.get(mMarkers.size() - 1).time;\n return last - first;\n }", "public int numberOfTires() {\n int tires = 4;\n return tires;\n }", "@Override\n public int getCount() {\n return mFragments.size();\n }", "@Override\n public int getCount() {\n return mFragments.size();\n }", "Integer getCurrentHhint();", "public int getDeltaT() {\n return deltaT;\n }", "protected int getTimesOptimized()\r\n {\r\n return timesOptimized;\r\n }", "public void backTrack (){\n LinkedList<Integer> v = new LinkedList<> (); //Lista de vecinos.\n boolean mover = false;\n int r = 0;\n while (!mover && v.size () < 4){\n r = rnd.nextInt (4);\n\t\t//Hay un vecino disponible.\n\t\t//Nos podemos mover.\n if (vecinoDisponible (r))\n\t\t mover = true;\n if (!v.contains (r))\n v.add (r);\n\t }\n\t if (mover){\n\t\t//Nos movemos a la siguiente dirección.\n\t\ttumbaMuros (r);\n\t\tmoverLaberinto (r);\n\t }else if (!p.empty ()){\n\t\t//Nos movemos a la celda previa\n\t\t//pues no hay vecnos a los que movernos\n\t\tCelda a = p.pop ();\n\t\tt.posY = a.celdaY;\n\t\tt.posX = a.celdaX; \n\t }\n \n terminado = p.isEmpty();\n\t}", "public int obtTotalEpVistosTemp() {\n\t\tint visto = 0;\n\t\tfor (Episodio episodio : this.episodios) {\n\t\t\tif (episodio.isFlag()) {\n\t\t\t\tvisto++;\n\t\t\t}\n\t\t}\n\t\treturn visto;\n\t}", "public Spot escolherSpot(String preferencia, String parqueName, LinkedList<Spot> favourites){\n //Comeco da contagem de tempo\n long startTime = System.currentTimeMillis();\n\n long total = 0;\n for (int i = 0; i < 10000000; i++) {\n total += i;\n }\n\n Parque parqueSelected = ParquesManager.INSTANCE.getParqueByName(parqueName);\n List<Spot> listaSpots = ParquesManager.INSTANCE.getListaSpotsNomeParque(parqueName);\n\n if(ParquesManager.INSTANCE.hasAvailableSpots(listaSpots, parqueSelected).equals(\"no\")) {\n showMessage(R.string.noavailablespots_inpark);\n }\n\n if(preferencia.equals(\"Qualification\")){\n Spot maiorRating = null;\n for (Spot spotp : listaSpots){ //Percorre spots do parque\n if (spotp.getEstado() != 0){\n continue;\n }else if (maiorRating == null){\n maiorRating = spotp;\n }\n if (spotp.getRating() > maiorRating.getRating()){\n maiorRating = spotp;\n if (maiorRating.getRating() == 5){ //Se rating for maximo devolve logo\n maiorRating.setEstado(2);\n long stopTime = System.currentTimeMillis();\n long elapsedTime = stopTime - startTime;\n mDatabase.child(\"TempoMedioApp\").child(\"Qualification\").push().setValue(elapsedTime);\n System.out.println(\"Qualification Demorou: \"+elapsedTime);\n return maiorRating;\n }\n }\n }\n if (maiorRating != null){\n maiorRating.setEstado(2);\n long stopTime = System.currentTimeMillis();\n long elapsedTime = stopTime - startTime;\n mDatabase.child(\"TempoMedioApp\").child(\"Qualification\").push().setValue(elapsedTime);\n System.out.println(\"Qualification Demorou: \"+elapsedTime);\n return maiorRating;\n }\n }else if (preferencia.equals(\"Favourites\")){\n for (Spot spotf : favourites){ //Percorre favoritos\n if (spotf.getEstado() != 0){\n continue;\n }\n for (Spot spotp : listaSpots){ //Percorre spots do parque\n if (spotf == spotp){ //Se coincidirem devolve\n spotf.setEstado(2);\n long stopTime = System.currentTimeMillis();\n long elapsedTime = stopTime - startTime;\n mDatabase.child(\"TempoMedioApp\").child(\"Favourites\").push().setValue(elapsedTime);\n System.out.println(\"Favourites Demorou: \"+elapsedTime);\n return spotf;\n }\n }\n }\n }\n\n //default faz por proximidade\n double menorDist = 0;\n Spot spotMenorDist = null;\n double dist = 0;\n\n preferences = getSharedPreferences(PREFS_POS, MODE_PRIVATE);\n double longit = 0;\n double lat = 0;\n if (preferences.contains(\"prefs_lat\") && preferences.contains(\"prefs_long\")){\n lat = Double.parseDouble(preferences.getString(\"prefs_lat\", \"not found\"));\n longit = Double.parseDouble(preferences.getString(\"prefs_long\", \"not found\"));\n }\n\n for (Spot spotp : listaSpots){ //Percorre spots do parque\n if (spotp.getEstado() == 0){\n dist = Math.sqrt((longit - spotp.getCoordenadaY()) * (longit - spotp.getCoordenadaY()) + (lat - spotp.getCoordenadaX()) * (lat - spotp.getCoordenadaX()));\n if (spotMenorDist == null){\n spotMenorDist = spotp;\n menorDist = dist;\n }else{\n if (dist < menorDist){\n spotMenorDist = spotp;\n menorDist = dist;\n }\n }\n }\n }\n\n spotMenorDist.setEstado(2);\n Log.d(TAG, \"Distancia = \" + menorDist);\n\n //contar tempo da app\n long stopTime = System.currentTimeMillis();\n long elapsedTime = stopTime - startTime;\n mDatabase.child(\"TempoMedioApp\").child(\"Closest\").push().setValue(elapsedTime);\n\n System.out.println(\"Distancia Demorou: \"+elapsedTime);\n\n return spotMenorDist;\n }", "public int getHauteur() {\n return getHeight();\n }", "private final void m136459a(BaseFragment baseFragment) {\n Theater a;\n TopInfoFD topInfoFD;\n VideoXOnlineLog.m139074c(VideoXOnlineLog.f101073b, C6969H.m41409d(\"G458AC31F8D3FA424C5019E5CF3ECCDD27BA5C71BB83DAE27F2549946FBF1E5F3\"), null, 2, null);\n View view = getView();\n if (view != null && (a = StaticProperty.f99549a.mo120385a()) != null) {\n m136465e();\n if (view != null) {\n ViewGroup viewGroup = (ViewGroup) view;\n if (StaticProperty.f99549a.mo120391e()) {\n topInfoFD = new ThemeTopInfoFD(baseFragment, viewGroup);\n } else {\n topInfoFD = new TopInfoFD(baseFragment, viewGroup);\n }\n ViewStub viewStub = (ViewStub) view.findViewById(R.id.fd_top_info);\n C32569u.m150513a((Object) viewStub, C6969H.m41409d(\"G7F8AD00DF136AF16F2018077FBEBC5D8\"));\n topInfoFD.mo119787a(viewStub);\n topInfoFD.mo119788a(a);\n BottomControlFD bottomControlFD = new BottomControlFD(baseFragment, viewGroup);\n ViewStub viewStub2 = (ViewStub) view.findViewById(R.id.fd_bottom_control);\n C32569u.m150513a((Object) viewStub2, C6969H.m41409d(\"G7F8AD00DF136AF16E401845CFDE8FCD4668DC108B03C\"));\n bottomControlFD.mo119787a(viewStub2);\n bottomControlFD.mo119788a(a);\n view.post(new RunnableC28690b(viewGroup, a, view, this, baseFragment));\n return;\n }\n throw new TypeCastException(C6969H.m41409d(\"G6796D916FF33AA27E8018408F0E083D46890C15AAB3FEB27E900DD46E7E9CF977D9AC51FFF31A52DF401994CBCF3CAD27ECDE313BA278C3BE91B80\"));\n }\n }", "public Integer getDistanciaVivienda() {\n return distanciaVivienda;\n }", "public int getTilaa() {\r\n return maara - matkustajia;\r\n }", "public int getTipusPartida() {\r\n\t\treturn tipus;\r\n\t}", "public int getTiempoEspera() {\n return tiempoEspera;\n }", "@Override\r\n public void onSChanged(int l, int t, int oldl, int oldt) {\n float webcontent = webView_movie_detail.getContentHeight() * webView_movie_detail.getScale();//webview的高度\r\n float webnow = webView_movie_detail.getHeight() + webView_movie_detail.getScrollY();//当前webview的高度\r\n if (webView_movie_detail.getContentHeight() * webView_movie_detail.getScale() - (webView_movie_detail.getHeight() + webView_movie_detail.getScrollY()) <= 250) {\r\n\r\n //已经处于底端\r\n linear_movieDetail.setVisibility(View.VISIBLE);\r\n\r\n } else {\r\n linear_movieDetail.setVisibility(View.GONE);\r\n }\r\n//已经处于顶端\r\n Log.d(\"height\", \"=================>\" + webView_movie_detail.getScrollY());\r\n if (webView_movie_detail.getScrollY() <= 100) {\r\n linear_top_movieDetail.setVisibility(View.VISIBLE);\r\n } else {\r\n linear_top_movieDetail.setVisibility(View.GONE);\r\n }\r\n }", "public static int timeSlotLivreSala(int sala){\r\n List<Integer> timeslots = new ArrayList<Integer>();\r\n int retorno = -1;\r\n for (int i = 0; i < n_timeslots; i++) {\r\n if(salas[sala][i] == 0)\r\n timeslots.add(i);\r\n }\r\n \r\n Random r = new Random();\r\n int ponto = r.nextInt(timeslots.size() + 1);\r\n retorno = timeslots.get(ponto);\r\n return retorno;\r\n }", "protected long travel() {\n\n return Math.round(((1 / Factory.VERTEX_PER_METER_RATIO) / (this.speed / 3.6)) * 1000);\n }", "long buscarAnterior(long id);", "public long duration() {\n\t\treturn end - start;\n\t}", "public void provocarEvolucion(Tribu tribuJugador, Tribu tribuDerrotada){\r\n System.out.println(\"\\n\");\r\n System.out.println(\"-------------------Fase de evolución ----------------------\");\r\n int indiceAtributo;\r\n int indiceAtributo2;\r\n double golpeViejo = determinarGolpe(tribuJugador);\r\n for(int i = 1; i <= 10 ; i++){\r\n System.out.println(\"Iteración número: \" + i);\r\n indiceAtributo = (int)(Math.random() * 8);\r\n indiceAtributo2 = (int)(Math.random() * 8);\r\n String nombreAtributo1 = determinarNombrePosicion(indiceAtributo);\r\n String nombreAtributo2 = determinarNombrePosicion(indiceAtributo2);\r\n if((tribuJugador.getArray()[indiceAtributo] < tribuDerrotada.getArray()[indiceAtributo] \r\n && (tribuJugador.getArray()[indiceAtributo2] < tribuDerrotada.getArray()[indiceAtributo2]))){\r\n System.out.println(\"Se cambió el atributo \" + nombreAtributo1 + \" de la tribu del jugador porque\"\r\n + \" el valor era \" + tribuJugador.getArray()[indiceAtributo] + \" y el de la tribu enemeiga era de \"\r\n + tribuDerrotada.getArray()[indiceAtributo] + \" esto permite hacer más fuerte la tribu del jugador.\");\r\n \r\n tribuJugador.getArray()[indiceAtributo] = tribuDerrotada.getArray()[indiceAtributo];\r\n \r\n System.out.println(\"Se cambió el atributo \" + nombreAtributo2 + \" de la tribu del jugador porque\"\r\n + \" el valor era \" + tribuJugador.getArray()[indiceAtributo2] + \" y el de la tribu enemeiga era de \"\r\n + tribuDerrotada.getArray()[indiceAtributo2] + \" esto permite hacer más fuerte la tribu del jugador.\");\r\n \r\n tribuJugador.getArray()[indiceAtributo2] = tribuDerrotada.getArray()[indiceAtributo2];\r\n }\r\n }\r\n double golpeNuevo = determinarGolpe(tribuJugador);\r\n if(golpeNuevo > golpeViejo){\r\n tribus.replace(tribuJugador.getNombre(), determinarGolpe(tribuJugador));\r\n System.out.println(\"\\nTribu evolucionada\");\r\n imprimirAtributos(tribuJugador);\r\n System.out.println(\"\\n\");\r\n System.out.println(tribus);\r\n }\r\n else{\r\n System.out.println(\"\\nTribu sin evolucionar\");\r\n System.out.println(\"La tribu no evolucionó porque no se encontraron atributos\"\r\n + \" que permitiesen crecer su golpe\");\r\n imprimirAtributos(tribuJugador);\r\n System.out.println(\"\\n\");\r\n System.out.println(tribus);\r\n }\r\n }" ]
[ "0.55649567", "0.54844564", "0.53038037", "0.52901125", "0.5132096", "0.5127524", "0.512144", "0.5109899", "0.50781405", "0.5068137", "0.50488997", "0.50430053", "0.50066465", "0.4998843", "0.49560884", "0.49349374", "0.49340364", "0.49195027", "0.49168992", "0.4908853", "0.488934", "0.48879623", "0.48858383", "0.48825023", "0.48787808", "0.48675096", "0.48643562", "0.48608997", "0.48498854", "0.4835449", "0.48281425", "0.48231873", "0.4819315", "0.48164597", "0.47983107", "0.47947973", "0.47928014", "0.47893563", "0.47756535", "0.47736084", "0.47706506", "0.47703663", "0.47687203", "0.47658548", "0.47620457", "0.47405708", "0.47388527", "0.4738338", "0.47312355", "0.4728342", "0.47255203", "0.47252107", "0.47247243", "0.47230354", "0.47203943", "0.4716351", "0.4702416", "0.4682871", "0.46658292", "0.46645412", "0.4661912", "0.46606895", "0.46493673", "0.46469712", "0.46332815", "0.46317986", "0.46311674", "0.46279863", "0.4624879", "0.4621956", "0.46201906", "0.46141022", "0.46140927", "0.46137142", "0.46109906", "0.46084806", "0.46065468", "0.4606312", "0.4601838", "0.4600931", "0.45978674", "0.45978674", "0.4592859", "0.45907837", "0.45905292", "0.459014", "0.45890915", "0.4585857", "0.45845732", "0.4584422", "0.45843115", "0.45819646", "0.45778444", "0.45746875", "0.45722312", "0.45686576", "0.45684075", "0.45639482", "0.45597488", "0.45580992" ]
0.55245554
1
Convert TelephoneNUmber into JSON object
public void set(TelephoneNumberImpl telephoneNumber) throws JAXRException, JSONException { if (telephoneNumber == null) { setDefaultNumber(); } else { /* * Country code */ String countryCode = telephoneNumber.getCountryCode(); countryCode = (countryCode == null) ? "" : countryCode; put(JaxrConstants.RIM_COUNTRY_CODE, countryCode); /* * Area code */ String areaCode = telephoneNumber.getAreaCode(); areaCode = (areaCode == null) ? "" : areaCode; put(JaxrConstants.RIM_AREA_CODE, areaCode); /* * Phone number */ String phoneNumber = telephoneNumber.getNumber(); phoneNumber = (phoneNumber == null) ? "" : phoneNumber; put(JaxrConstants.RIM_PHONE_NUMBER, phoneNumber); String extension = telephoneNumber.getExtension(); extension = (extension == null) ? "" : extension; put(JaxrConstants.RIM_PHONE_EXTENSION, extension); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getPhoneNumber();", "java.lang.String getPhoneNumber();", "java.lang.String getPhoneNumber();", "com.google.protobuf.ByteString\n getPhoneNumberBytes();", "com.google.protobuf.ByteString\n getPhoneNumberBytes();", "public String getPhoneNumber() {\r\n return number;\r\n }", "com.google.protobuf.ByteString\n getPhoneNumberBytes();", "public String getPhoneNumber(){\r\n\t\treturn phoneNumber;\r\n\t}", "public String getTelephone() {\n return (String) get(\"telephone\");\n }", "java.lang.String getPhone();", "java.lang.String getPhonenumber();", "public String getTelephoneNumber(){\n return telephoneNumber;\n }", "public java.lang.String getPhoneNumber() {\n java.lang.Object ref = phoneNumber_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n phoneNumber_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getPhoneNumber() {\n java.lang.Object ref = phoneNumber_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n phoneNumber_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getPhoneNumber(){\n return phone_number;\n }", "java.lang.String getUserPhone();", "public java.lang.String getPhoneNumber() {\n java.lang.Object ref = phoneNumber_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n phoneNumber_ = s;\n return s;\n }\n }", "public java.lang.String getPhoneNumber() {\n java.lang.Object ref = phoneNumber_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n phoneNumber_ = s;\n return s;\n }\n }", "public String getPhoneNum()\r\n {\r\n\treturn phoneNum;\r\n }", "public String getTelephoneNumber() {\n return telephoneNumber;\n }", "String getPhone(int type);", "com.google.protobuf.ByteString\n getPhonenumberBytes();", "@Override\n public String getPhoneNumber() {\n\n if(this.phoneNumber == null){\n\n this.phoneNumber = TestDatabase.getInstance().getClientField(token, id, \"phoneNumber\");\n }\n\n return phoneNumber;\n }", "public long getPhoneNumber() {\r\n\t\treturn phoneNumber;\r\n\t}", "public String getPhoneNumber() {\n return phoneNumber;\n }", "@java.lang.Override\n public com.google.protobuf.StringValue getPhoneNumber() {\n return phoneNumber_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : phoneNumber_;\n }", "public String getPhoneNumber() {\r\n return phoneNumber;\r\n }", "public String getTelphone() {\n return telphone;\n }", "public String getTelphone() {\n return telphone;\n }", "public String getTelphone() {\n return telphone;\n }", "public com.google.protobuf.ByteString\n getPhoneNumberBytes() {\n java.lang.Object ref = phoneNumber_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n phoneNumber_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getPhoneNum()\r\n {\r\n return phoneNum;\r\n }", "public Long getMobile_phone();", "public String getPhoneNumber()\n\t{\n\t\treturn this._phoneNumber;\n\t}", "public String getTelephoneNumber() {\n\t\treturn telephoneNumber;\n\t}", "public String getPhone_number() {\n return phone_number;\n }", "public int getPhoneNumber() {\n\t\treturn phoneNumber;\n\t}", "public com.google.protobuf.ByteString\n getPhoneNumberBytes() {\n java.lang.Object ref = phoneNumber_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n phoneNumber_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public synchronized String getTelephoneNumber()\r\n {\r\n return telephoneNumber;\r\n }", "public com.google.protobuf.ByteString\n getPhoneNumberBytes() {\n java.lang.Object ref = phoneNumber_;\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 phoneNumber_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getPhoneNumber() {\n return phoneNumber;\n }", "public String getPhoneNumber() {\n return phoneNumber;\n }", "public String getPhoneNumber() {\n return phoneNumber;\n }", "public String getPhoneNumber() {\n return phoneNumber;\n }", "public String getPhoneNumber() {\n return phoneNumber;\n }", "public String getPhoneNumber() {\n return phoneNumber;\n }", "public String getPhoneNumber() {\n return phoneNumber;\n }", "public String getPhoneNumber() {\n return phoneNumber;\n }", "public String getPhoneNumber() {\n return phoneNumber;\n }", "public String getPhoneNumber() {\n\t\treturn phoneNumber;\n\t}", "public String getPhoneNumber() {\n\t\treturn this.phoneNumber;\n\t}", "public java.lang.CharSequence getPhoneNumber() {\n return phone_number;\n }", "String formatPhoneNumber(String phoneNumber);", "public com.google.protobuf.ByteString\n getPhoneNumberBytes() {\n java.lang.Object ref = phoneNumber_;\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 phoneNumber_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getPhoneNumber() {\n return this.phoneNumber;\n }", "public String returnPhoneNumber() {\n\t\treturn this.registration_phone.getAttribute(\"value\");\r\n\t}", "public String getPhoneNum() {\n return phoneNum;\n }", "public String getPhoneNum() {\n return phoneNum;\n }", "public String getPhoneNum() {\n return phoneNum;\n }", "public String getPhoneNumberString() {\n return mPhoneNumberString;\n }", "public String getphoneNum() {\n\t\treturn _phoneNum;\n\t}", "public String getPhoneNumber() {\n return mPhoneNumber;\n }", "public String getTelephone() {\n return telephone;\n }", "public String getTelephone() {\n return telephone;\n }", "@java.lang.Override\n public com.google.protobuf.StringValueOrBuilder getPhoneNumberOrBuilder() {\n return getPhoneNumber();\n }", "public java.lang.CharSequence getPhoneNumber() {\n return phone_number;\n }", "public String getPhoneNumber(){\n\t\t \n\t\t TelephonyManager mTelephonyMgr;\n\t\t mTelephonyMgr = (TelephonyManager)\n\t\t activity.getSystemService(Context.TELEPHONY_SERVICE); \n\t\t return mTelephonyMgr.getLine1Number();\n\t\t \n\t\t}", "public String getTelNo() {\n return telNo;\n }", "@JsonGetter(\"number\")\r\n public String getNumber ( ) { \r\n return this.number;\r\n }", "void formatPhoneNumber(String phoneNumber) throws PhoneNumberFormatException;", "public Integer getTel() {\n return tel;\n }", "public java.lang.String getTelphone () {\r\n\t\treturn telphone;\r\n\t}", "public java.lang.String getPhone_number() {\n return phone_number;\n }", "public String getSenderPhoneNumber();", "public String getTelNo() {\n return telNo;\n }", "com.google.protobuf.ByteString\n getPhoneBytes();", "public String getPhone() {\r\n // Bouml preserved body begin 00040C82\r\n\t return phoneNumber;\r\n // Bouml preserved body end 00040C82\r\n }", "public String getUserTelephone() {\n return userTelephone;\n }", "private String convertToJson(Contacts contact) throws JsonProcessingException{\n\t ObjectMapper objectMapper = new ObjectMapper();\n\t return objectMapper.writeValueAsString(contact); \n\t}", "@Override\n public String provideCustomerMobilePhone( )\n {\n return _signaleur.getIdTelephone( );\n }", "public String getMobile_number() {\n return mobile_number;\n }", "public String getPhoneNo() {\n return (String)getAttributeInternal(PHONENO);\n }", "public java.lang.String getTelePhone() {\r\n return telePhone;\r\n }", "@AutoEscape\n\tpublic String getPhone();", "public String getTelNo()\r\n\t{\r\n\t\treturn this.telNo;\r\n\t}", "public Integer getPhonenumber() {\n return phonenumber;\n }", "public com.google.protobuf.StringValue getPhoneNumber() {\n if (phoneNumberBuilder_ == null) {\n return phoneNumber_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : phoneNumber_;\n } else {\n return phoneNumberBuilder_.getMessage();\n }\n }", "public java.lang.String getPhone() {\n java.lang.Object ref = phone_;\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 phone_ = s;\n }\n return s;\n }\n }", "public java.lang.String getPhone() {\n java.lang.Object ref = phone_;\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 phone_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "@JsonSetter(\"number\")\r\n public void setNumber (String value) { \r\n this.number = value;\r\n }", "public String getUserPhone() {\r\n return userPhone;\r\n }", "public String getPhonenumber() {\n return phonenumber;\n }", "public String getUserphone() {\n return userphone;\n }", "private static JsonEndereco toBasicJson(Endereco endereco) {\r\n\t\tJsonEndereco jsonEndereco = new JsonEndereco();\r\n\t\tapplyBasicJsonValues(jsonEndereco, endereco);\r\n\t\treturn jsonEndereco;\r\n\t}", "public String getPhone() {\r\n\t\treturn this.phone;\r\n\t}", "@Override\n public abstract JsonParser.NumberType numberType();", "@Override\r\n\tpublic String getPhone() {\n\t\treturn phone;\r\n\t}", "public java.lang.String getContactPhoneNumber()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(CONTACTPHONENUMBER$0, 0);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getStringValue();\r\n }\r\n }", "public String getPhone(){\n\t\treturn phone;\n\t}", "public MobileInfo getPhoneInfo(String number) {\n\t\tMobileInfo mobileInfo = new MobileInfo();\n\t\ttry {\n\t\t\tmobileInfo = readJsonFromUrl(\"http://apilayer.net/api/validate?access_key=ac5c6b3772430c1154575b8ce8b77a7b&number=\"+number+\"&country_code=&format=1\");\n\t\t} catch (Exception e) {\n\t\t\tlog.error(\"\", e);\n\t\t}\n\t\t\n\t\treturn mobileInfo;\n\t}", "@Override\n public String getphoneNumber() {\n return ((EditText)findViewById(R.id.phoneNumberUserPage)).getText().toString().trim();\n }" ]
[ "0.674754", "0.674754", "0.674754", "0.648711", "0.6354429", "0.63268447", "0.63221437", "0.62621546", "0.62290263", "0.62197", "0.61673284", "0.6157616", "0.6157404", "0.61572176", "0.61454475", "0.61440295", "0.612834", "0.6118948", "0.6091681", "0.60802317", "0.60793585", "0.6073423", "0.6068183", "0.6058607", "0.60342014", "0.6032686", "0.6026554", "0.60048264", "0.60048264", "0.60048264", "0.6003537", "0.5991059", "0.59840864", "0.5978174", "0.5972021", "0.59649456", "0.59487194", "0.594398", "0.5943215", "0.5942375", "0.59420925", "0.59420925", "0.59420925", "0.59420925", "0.59420925", "0.59420925", "0.59420925", "0.59420925", "0.59420925", "0.59222436", "0.5918782", "0.5917016", "0.59152335", "0.59118104", "0.59107816", "0.59061", "0.58946776", "0.58946776", "0.58946776", "0.58862495", "0.58805716", "0.587776", "0.5876295", "0.5876295", "0.58664495", "0.58580446", "0.5837435", "0.5830888", "0.58150876", "0.5807447", "0.5792455", "0.57810354", "0.5769843", "0.57499886", "0.5741591", "0.5740984", "0.57372755", "0.5726403", "0.57151866", "0.5709115", "0.5706475", "0.57039994", "0.56971216", "0.56923026", "0.56891537", "0.5678961", "0.5672554", "0.5671137", "0.566042", "0.5654269", "0.56507415", "0.56454647", "0.5644163", "0.56323797", "0.562127", "0.5604106", "0.56036687", "0.56025136", "0.56018627", "0.5592339", "0.5590499" ]
0.0
-1
Calificaciones de las actividades
public String actividadCal(String id){ try { //abrir conexión Connection con= conexion.abrirConexion(); //generar consultas Statement s = con.createStatement(); //consulta ResultSet rs = s.executeQuery("SELECT avg(calificacion) FROM `comentarios` where comentarios.actividad_idActividad = " + id + ";"); //declaración del array String a; rs.next(); //copiar del resultset al array a = rs.getString(1); //cerrar conexión conexion.cerrarConexion(con); return a; } catch(SQLException e) { return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getActivacion();", "public ManipularEstudiantes() {\n initComponents();\n cme = new Control_Mantenimiento_Estudiante(this);\n this.gUI_botones2.agregar_eventos(cme);\n }", "public void activar(){\n\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tgetControleur(). consultPeriod() ;}", "Activite getActiviteCourante();", "private static void statACricri() {\n \tSession session = new Session();\n \tNSTimestamp dateRef = session.debutAnnee();\n \tNSArray listAffAnn = EOAffectationAnnuelle.findAffectationsAnnuelleInContext(session.ec(), null, null, dateRef);\n \tLRLog.log(\">> listAffAnn=\"+listAffAnn.count() + \" au \" + DateCtrlConges.dateToString(dateRef));\n \tlistAffAnn = LRSort.sortedArray(listAffAnn, \n \t\t\tEOAffectationAnnuelle.INDIVIDU_KEY + \".\" + EOIndividu.NOM_KEY);\n \t\n \tEOEditingContext ec = new EOEditingContext();\n \tCngUserInfo ui = new CngUserInfo(new CngDroitBus(ec), new CngPreferenceBus(ec), ec, new Integer(3065));\n \tStringBuffer sb = new StringBuffer();\n \tsb.append(\"service\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"agent\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"contractuel\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"travaillees\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"conges\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"dues\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"restant\");\n \tsb.append(ConstsPrint.CSV_NEW_LINE);\n \t\n \n \tfor (int i = 0; i < listAffAnn.count(); i++) {\n \t\tEOAffectationAnnuelle itemAffAnn = (EOAffectationAnnuelle) listAffAnn.objectAtIndex(i);\n \t\t//\n \t\tEOEditingContext edc = new EOEditingContext();\n \t\t//\n \t\tNSArray array = EOAffectationAnnuelle.findSortedAffectationsAnnuellesForOidsInContext(\n \t\t\t\tedc, new NSArray(itemAffAnn.oid()));\n \t\t// charger le planning pour forcer le calcul\n \t\tPlanning p = Planning.newPlanning((EOAffectationAnnuelle) array.objectAtIndex(0), ui, dateRef);\n \t\t// quel les contractuels\n \t\t//if (p.affectationAnnuelle().individu().isContractuel(p.affectationAnnuelle())) {\n \t\ttry {p.setType(\"R\");\n \t\tEOCalculAffectationAnnuelle calcul = p.affectationAnnuelle().calculAffAnn(\"R\");\n \t\tint minutesTravaillees3112 = calcul.minutesTravaillees3112().intValue();\n \t\tint minutesConges3112 = calcul.minutesConges3112().intValue();\n \t\t\n \t\t// calcul des minutes dues\n \t\tint minutesDues3112 = /*0*/ 514*60;\n \t\t/*\tNSArray periodes = p.affectationAnnuelle().periodes();\n \t\tfor (int j=0; j<periodes.count(); j++) {\n \t\t\tEOPeriodeAffectationAnnuelle periode = (EOPeriodeAffectationAnnuelle) periodes.objectAtIndex(j);\n \t\tminutesDues3112 += periode.valeurPonderee(p.affectationAnnuelle().minutesDues(), septembre01, decembre31);\n \t\t}*/\n \t\tsb.append(p.affectationAnnuelle().structure().libelleCourt()).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(p.affectationAnnuelle().individu().nomComplet()).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(p.affectationAnnuelle().individu().isContractuel(p.affectationAnnuelle())?\"O\":\"N\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(TimeCtrl.stringForMinutes(minutesTravaillees3112)).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(TimeCtrl.stringForMinutes(minutesConges3112)).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(TimeCtrl.stringForMinutes(minutesDues3112)).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(TimeCtrl.stringForMinutes(minutesTravaillees3112 - minutesConges3112 - minutesDues3112)).append(ConstsPrint.CSV_NEW_LINE);\n \t\tLRLog.log((i+1)+\"/\"+listAffAnn.count() + \" (\" + p.affectationAnnuelle().individu().nomComplet() + \")\");\n \t\t} catch (Throwable e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t\tedc.dispose();\n \t\t//}\n \t}\n \t\n\t\tString fileName = \"/tmp/stat_000_\"+listAffAnn.count()+\".csv\";\n \ttry {\n\t\t\tBufferedWriter fichier = new BufferedWriter(new FileWriter(fileName));\n\t\t\tfichier.write(sb.toString());\n\t\t\tfichier.close();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tLRLog.log(\"writing \" + fileName);\n\t\t}\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tgetControleur(). saisirPeriodique() ;}", "public DatosInvitado() {\n\t\tsuper(MensajesVentanas.ventanaActiva);\n\t\tinitialize();\n\n\t\tjButtonAceptar.addActionListener(this);\n\t\tjButtonAceptar.addKeyListener(this);\n\t\tjButtonCancelar.addActionListener(this);\n\t\tjButtonCancelar.addKeyListener(this);\n\t\tjTextField.addKeyListener(this);\n\t\tjTextPane.addKeyListener(this);\n\t\t\n\t\tif(CR.meVenta.getVenta() != null && CR.meVenta.getVenta().getCliente().getNombreCompleto() != null){\n\t\t\tgetJTextField().setText(CR.meVenta.getVenta().getCliente().getNombreCompleto());\n\t\t\tjTextPane.requestFocus();\n\t\t}else if(CR.meServ.getListaRegalos()!=null && CR.meServ.getListaRegalos().getCliente()!=null){\n\t\t\tgetJTextField().setText(CR.meServ.getListaRegalos().getCliente().getNombreCompleto());\n\t\t\tjTextPane.requestFocus();\n\t\t}\n\t\t\n\t\tif(CR.meServ.getListaRegalos()!=null && CR.meServ.getListaRegalos().getDedicatoria()!=null)\n\t\t\tjTextPane.setText(CR.meServ.getListaRegalos().getDedicatoria());\n\t}", "public void activate() {\n\t\t// set cooldown counter\n\t}", "void getCurrentPeriodo();", "public Agenda() {\n initComponents();\n \n Deshabilitar();\n LlenarTabla();\n \n }", "public void aumentarAciertos() {\r\n this.aciertos += 1;\r\n this.intentos += 1; \r\n }", "public void activate() {\n\t\t\t\n\t\t//Prior to activation add objects to Community\n\t\tthis.buildings = new ArrayList<>();\t//setup buildings\n \tBuilding[] buildings = control.buildings();\n\t\tCollections.addAll(this.buildings, buildings);\n \t\n\t\t//Timer for animation\n\t\t//Argument 1: timerValue is a period in milliseconds to fire event\n\t\t//Argument 2:t any class that \"implements ActionListener\"\n\t\ttimer = new Timer(control.timerValue, this); //timer constructor\n\t\ttimer.restart(); //restart or start\n\t\t\n\t\t// frame becomes visible\n\t\tframe.setVisible(true);\t\t\n\t}", "public void setActivationTime(java.util.Calendar param){\n localActivationTimeTracker = true;\n \n this.localActivationTime=param;\n \n\n }", "protected void CriarEventos() {\r\n\r\n\r\n //CRIANDO EVENTO NO BOTÃO SALVAR\r\n buttonSalvar.setOnClickListener(new View.OnClickListener() {\r\n\r\n @Override\r\n public void onClick(View v) {\r\n\r\n Salvar_onClick();\r\n }\r\n });\r\n\r\n //CRIANDO EVENTO NO BOTÃO VOLTAR\r\n buttonVoltar.setOnClickListener(new View.OnClickListener() {\r\n\r\n @Override\r\n public void onClick(View v) {\r\n\r\n Intent intentMainActivity = new Intent(getApplicationContext(), CadastrarActivity.class);\r\n startActivity(intentMainActivity);\r\n finish();\r\n }\r\n });\r\n }", "private void doActivation() {\n OnFieldActivated activateEvent = new OnFieldActivated(this::finishReset);\n activateEvent.beginTask();\n DefenceField.getShrineEntity().send(activateEvent);\n activateEvent.finishTask();\n }", "@Override\n\tpublic void action() {\n\t\t_agj.addBehaviour(new RecibirDistritos(_agj));\n\t\t_agj.addBehaviour(new RecibirMonedas(_agj));\n\t}", "public void limpiarCamposActividadesYRecord() {\r\n try {\r\n opcionTableroControlSeguim = \"\";\r\n estadoPanelMisActivid = false;\r\n estadoPanelMisRecordat = false;\r\n estadoPanelActividAsign = false;\r\n estadoPanelRecordatAsign = false;\r\n } catch (Exception e) {\r\n mbTodero.setMens(\"Error en el metodo '\" + this.getClass() + \".limpiarCamposCita()' causado por: \" + e.getMessage());\r\n mbTodero.error();\r\n }\r\n\r\n }", "public ActividadTest()\n {\n prueba = new Actividad(\"Rumbear\",\"Salir a tomar y bailar con unos amigos\",2018,5,5,6,\n 15,8,30,30,new GregorianCalendar(2018,5,2,3,0),new GregorianCalendar(2018,5,7,8,0));\n }", "public void sumar() {\n Acumula.acumulador++;\n }", "public ActivitiesAndHr() {\r\n\t\tthis.overtimePaymentRate = new OvertimePaymentRate();\r\n\t}", "List<Oficios> buscarActivas();", "public void turnoIniciado() {\n\t\t\n\t\tfor (Partida.Observer o : observers) {\n\n\t\t\to.turnoIniciado(tablero, turno);\n\t\t}\n\t}", "public void inicia() { \r\n\t\tventana=new VentanaMuestraServicios(this);\r\n\t\tventana.abre();\r\n\t}", "private void configurarEventos() {\n\n btnVoltar.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n //OBJETIVO: fecha a tela atual\n VerPessoaActivity.this.finish();\n }\n });\n }", "public combinacion() {\n initComponents();\n eventos();\n }", "public void anualTasks(){\n List<Unit> units = unitService.getUnits();\n for(Unit unit: units){\n double amount = 10000; //@TODO calculate amount based on unit type\n Payment payment = new Payment();\n payment.setPaymentMethod(PaymentMethod.Cash);\n Calendar calendar = Calendar.getInstance();\n calendar.set(Calendar.MONTH, 1);\n calendar.set(Calendar.DATE, 30);\n payment.setDate(LocalDate.now());\n TimeZone tz = calendar.getTimeZone();\n ZoneId zid = tz == null ? ZoneId.systemDefault() : tz.toZoneId();\n payment.setAmount(amount);\n payment.setDueDate(LocalDateTime.ofInstant(calendar.toInstant(), zid).toLocalDate());\n payment.setClient(unit.getOwner());\n payment.setUnit(unit);\n payment.setRecurringInterval(365L);\n payment.setStatus(PaymentStatus.Pending);\n paymentService.savePayment(payment);\n }\n }", "protected void aktualisieren() {\r\n\r\n\t}", "public void act() \r\n {\r\n mueve();\r\n //tocaJugador();\r\n //bala();\r\n disparaExamen();\r\n }", "public void act()\n {\n if(onSales == true)\n {\n calculateSale();\n }\n }", "public void act() \r\n {\r\n \r\n // Add your action code here\r\n MovimientoNave();\r\n DisparaBala();\r\n Colisiones();\r\n //muestraPunto();\r\n //archivoTxt();\r\n }", "public interface OnChronoActiveListener {\n void onChronoActiveChange(boolean isCounting, long currentCount);\n }", "public void activate(){\r\n\r\n\t}", "protected void activeActivity() {\n\t\tLog.i(STARTUP, \"active activity\");\n\t\tcheckActiveActivity();\n\t}", "public void active() {\n createClassIfNotExists();\n\n globalHook = new OAuditingHook(security);\n\n retainTask =\n new TimerTask() {\n public void run() {\n retainLogs();\n }\n };\n\n long delay = 1000L;\n long period = 1000L * 60L * 60L * 24L;\n\n timer.scheduleAtFixedRate(retainTask, delay, period);\n\n Orient.instance().addDbLifecycleListener(this);\n if (context instanceof OServerAware) {\n if (((OServerAware) context).getDistributedManager() != null) {\n ((OServerAware) context).getDistributedManager().registerLifecycleListener(this);\n }\n }\n\n if (systemDbImporter != null && systemDbImporter.isEnabled()) {\n systemDbImporter.start();\n }\n }", "public AgendaController(){\n setService(new JavaServiceFacade());\n setActividadRegistrar(new CalendarActivityClinica());\n setModel(new CalendarModelClinica());\n if(this.isPermisoAgendaPersonal()){\n setUsuarioAgenda(LoginController.getUsuarioLogged());\n }\n generarActividades();\n setListaPacientes(service.getPacienteFindAll());\n setListaUsuarios(service.getUsuarioFindAll());\n setMensajeRegistrar(\"\");\n setMensajeEditar(\"\");\n }", "@Override\n\tpublic void ejecutarActividadesConProposito() {\n\t\t\n\t}", "public void acutualizarInfo(){\n String pibId = String.valueOf(comentario.getId());\n labelId.setText(\"#\" + pibId);\n\n String autor = comentario.getAutor().toString();\n labelAutor.setText(autor);\n\n String fecha = comentario.getFechaCreacion().toString();\n labelFecha.setText(fecha);\n \n String contenido = comentario.getContenido();\n textAreaContenido.setText(contenido);\n \n String likes = ((Integer)comentario.totalLikes()).toString();\n labelLikes.setText(likes);\n \n Collection<Comentario> comments = socialNetwork.searchSubComentarios(comentario);\n panelSubComentarios.loadItems(comments, 15);\n \n if(comentario.isSubcomentario()){\n jButton4.setEnabled(true);\n }\n else{\n jButton4.setEnabled(false);\n }\n }", "public void CobaHitung()\n {\n\n\n PrayTimeCounter prayers = new PrayTimeCounter();\n\n prayers.setTimeFormat(prayers.getTime24());\n prayers.setCalcMethod(prayers.getMWL());\n prayers.setAsrJuristic(prayers.getShafii());\n prayers.setAdjustHighLats(prayers.getAngleBased());\n int[] offsets = {0, 0, 0, 0, 0, 0, 0}; // {Fajr,Sunrise,Dhuhr,Asr,Sunset,Maghrib,Isha}\n prayers.tune(offsets);\n\n Date now = new Date();\n Calendar cal = Calendar.getInstance();\n cal.setTime(now);\n\n ArrayList<String> prayerTimes = prayers.getPrayerTimes(cal,\n Anshitu.getApp().getLatitude(), Anshitu.getApp().getLongitude(), Anshitu.getApp().getTimezone());\n subuh.setText(prayerTimes.get(0));\n terbit.setText(prayerTimes.get(1));\n duhur.setText(prayerTimes.get(2));\n ashar.setText(prayerTimes.get(3));\n maghrib.setText(prayerTimes.get(4));\n isya.setText(prayerTimes.get(prayerTimes.size()-1));\n /*ArrayList<String> prayerNames = prayers.getTimeNames();\n ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,android.R.layout.simple_spinner_item,prayerNames);\n jeda.setAdapter(adapter);\n ArrayAdapter<String> adapter1 = new ArrayAdapter<String>(this,android.R.layout.simple_spinner_item,prayerTimes);\n durasi.setAdapter(adapter1);*/\n }", "@Override\n\t/**Método que actua cuando nos pulsan el botón del mainActivity\n\t * @param el evento que tenemos que hacer\n\t * */\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\tlaKCalResult.setText(this.calculaKCal(Float.parseFloat(this.tfMinutos.getText()), Float.parseFloat(tfKgs.getText()), (String)cbEjercicios.getSelectedItem())) ;\n\t\t\n\t}", "public void action() {\n\t\t\ttreinador.Correu();\r\n\t\t\ttreinador.Perdeu();\r\n\t\t\treturn;\r\n\t\t}", "public JFPrincipioActivo() {\n initComponents();\n this.activarControles(false);\n this.listarPrincipiosActivos();\n }", "public void activityListener(CalendarActivityEvent ae){\n CalendarActivity activity = ae.getCalendarActivity();\n \n if(activity != null){\n setActividadEditar((CalendarActivityClinica)activity);\n if(actividadEditar.getTimeType().equals(CalendarActivity.TimeType.ALLDAY)){\n setTodoElDiaEditar(true);\n }else{\n setTodoElDiaEditar(false);\n }\n setInicioEditar(actividadEditar.getStartDate(null));\n setFinEditar(actividadEditar.getEndDate(null));\n }else{\n System.out.println(\"No activity with event \" + ae.toString());\n }\n }", "public void eventos() {\n btnAbrir.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent evt) {\n btnAbrirActionPerformed(evt);\n }\n });\n }", "public void ingresar_a_la_Opcion_de_eventos() {\n\t\t\n\t}", "private void comprobarActividades(List<DetectedActivity> actividadesProvables){\n for( DetectedActivity activity : actividadesProvables) {\n //preguntamos por el tipo\n switch( activity.getType() ) {\n case DetectedActivity.IN_VEHICLE: {\n //preguntamos por la provabilidad de que sea esa actividad\n //si es mayor de 75 (de cien) mostramos un mensaje\n if(activity.getConfidence()>75){\n Log.i(\"samsoftRecAct\",\"En vehiculo\");\n }\n break;\n }\n case DetectedActivity.ON_BICYCLE: {\n if(activity.getConfidence()>75){\n Log.i(\"samsoftRecAct\",\"En bici\");\n }\n break;\n }\n case DetectedActivity.ON_FOOT: {\n //este lo dejamos vacio por que va implicito en correr y andar\n break;\n }\n case DetectedActivity.RUNNING: {\n if(activity.getConfidence()>75){\n Log.i(\"samsoftRecAct\",\"Corriendo\");\n }\n break;\n }\n case DetectedActivity.WALKING: {\n if(activity.getConfidence()>75){\n Log.i(\"samsoftRecAct\",\"Andando\");\n }\n break;\n }\n case DetectedActivity.STILL: {\n if(activity.getConfidence()>75){\n Log.i(\"samsoftRecAct\",\"Quieto\");\n }\n break;\n }\n case DetectedActivity.TILTING: {\n if(activity.getConfidence()>75){\n Log.i(\"samsoftRecAct\",\"Tumbado\");\n }\n break;\n }\n\n case DetectedActivity.UNKNOWN: {\n //si es desconocida no decimos nada\n break;\n }\n }\n }\n }", "public void cargaDatosInicialesSoloParaModificacionDeCuenta() throws Exception {\n GestionContableWrapper gestionContableWrapper = parParametricasService.factoryGestionContable();\n gestionContableWrapper.getNormaContable3();\n parAjustesList = parParametricasService.listaTiposDeAjuste(obtieneEnumTipoAjuste(gestionContableWrapper.getNormaContable3()));\n selectAuxiliarParaAsignacionModificacion = cntEntidadesService.listaDeAuxiliaresPorEntidad(selectedEntidad);\n //Obtien Ajuste Fin\n\n //Activa formulario para automatico modifica \n switch (selectedEntidad.getNivel()) {\n case 1:\n swParAutomatico = true;\n numeroEspaciador = 200;\n break;\n case 2:\n swParAutomatico = true;\n swActivaBoton = true;\n numeroEspaciador = 200;\n break;\n case 3:\n swParAutomatico = false;\n numeroEspaciador = 1;\n break;\n default:\n break;\n }\n\n cntEntidad = (CntEntidad) getCntEntidadesService().find(CntEntidad.class, selectedEntidad.getIdEntidad());\n }", "public void activate();", "public void setActivo(String activo) {\r\n\t\tthis.activo = activo;\r\n\t}", "@Override\n\tpublic void update(Individuo o, Actividad arg) {\n\t\tthis.a = (Actividad) arg;\n\t\tDouble total = a.distancia * 0.71777203560149;\n\t\tthis.pasosActividad = total.intValue();\n\t\tthis.pasosTotal += this.pasosActividad;\n\t\tdisplay();\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n if (jcb_Actividad.getSelectedIndex() == 1) {\n jcb_Maestro.setEnabled(true);\n jcb_Hora_Clase.setEnabled(true);\n jcb_razones.setEnabled(false);\n Limpiar_Maestros();\n Consultar_Maestros();\n\n }\n if (jcb_Actividad.getSelectedIndex() == 0) {\n jcb_Maestro.setEnabled(false);\n jcb_Hora_Clase.setEnabled(false);\n jcb_razones.setEnabled(false);\n Limpiar_Maestros();\n Limpiar_Aulas_Y_Materias();\n }\n if (jcb_Actividad.getSelectedIndex() == 2) {\n\n jcb_Maestro.setEnabled(false);\n jcb_Hora_Clase.setEnabled(false);\n Limpiar_Maestros();\n Limpiar_Aulas_Y_Materias();\n Alumno.Comentarios = jcb_Actividad.getSelectedItem().toString();\n btnEntrar.setEnabled(true);\n }\n if (jcb_Actividad.getSelectedIndex() == 3) {\n\n jcb_Maestro.setEnabled(false);\n jcb_Hora_Clase.setEnabled(false);\n Limpiar_Maestros();\n Limpiar_Aulas_Y_Materias();\n Alumno.Comentarios = jcb_Actividad.getSelectedItem().toString();\n btnEntrar.setEnabled(true);\n }\n\n if (jcb_Actividad.getSelectedIndex() == 4) {\n jcb_razones.setEnabled(true);\n jcb_Maestro.setEnabled(false);\n jcb_Hora_Clase.setEnabled(false);\n Limpiar_Maestros();\n Limpiar_Aulas_Y_Materias();\n// btnEntrar.setEnabled(true);\n }\n }", "public void act() \r\n {\r\n // Add your action code here.\r\n tembak();\r\n gerakKiri();\r\n gerakKanan();\r\n \r\n \r\n \r\n }", "public void setActivo(Boolean activo) {\n this.activo = activo;\n }", "public void aumentarIntentos() {\r\n this.intentos += 1;\r\n }", "@Override\r\n\tprotected void initAcciones() {\r\n\t\tacciones.put(\"Buscar\", new AccionBuscarEvento());\r\n\t\tacciones.put(\"Consultar\", new AccionConsultarEvento());\r\n\t\tacciones.put(\"Agregar\", new AccionAgregarEvento());\r\n\t}", "public void startAgentTime() {\n Timer timer = new Timer(SIBAConst.TIME_AGENT_CHANGE_FOR_HOUR, new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n \t\n \tCalendar c = Calendar.getInstance();\n int minutos = c.get(Calendar.MINUTE);\n int hora = c.get( (Calendar.HOUR_OF_DAY)); \n hora = hora * 60;\n if (minutos >= 30 && minutos <= 59)\n {hora +=30;\t\n }\n if (hora > ctrlHours)\n {ctrlHours = hora;\n //activada bandera de modificacion de programacion\n activatedScheduleChange = true;\n }\n else\n { if (hora < ctrlHours)\n \t ctrlHours = 0;\n }\n \t\n \t\n \n }\n });\n timer.start();\n }", "public void setActividad(Actividad actividad) {\r\n\t\tthis.actividad = actividad;\r\n\t}", "public void fetchCalibrations() {\n calibrationMenu.init();\n }", "public void fecharAgenda(){\n\t\tsetBooSelecionouDataHora (false);\n\t\tsetBooSelecionouUsuario(false);\n\t\tsetBooIdentifiquese(false);\n\t\tsetBooSucesso(false);\n\t\tsetStrCelular(\"\");\n\t\tRequestContext.getCurrentInstance().closeDialog(0);\n\t\tthis.refresh();\n\t}", "public void comenzarDiaLaboral() {\n\t\tSystem.out.println(\"AEROPUERTO: Inicio del dia laboral, se abren los puestos de informe, atención y freeshops al público, el conductor del tren llega a tiempo como siempre\");\n\t\tthis.turnoPuestoDeInforme.release();\n\t\t}", "@Override\n public void activate() {\n \n }", "private int getActiveTime() {\n\t\treturn 15 + level;\n\t}", "public int activeDays() {return activeDay;}", "private void atualizarTela() {\n\t\tSystem.out.println(\"\\n*** Refresh da Pagina / Consultando Todos os Registro da Tabela Paciente\\n\");\n\t\tpaciente = new Paciente();\n\t\tlistaPaciente = pacienteService.buscarTodos();\n\t\t\n\t}", "private void atualizarTela() {\n\t\tSystem.out.println(\"\\n*** Refresh da Pagina / Consultando Todos os Registro da Tabela PressaoArterial\\n\");\n\t\tpressaoArterial = new PressaoArterial();\n\t\tlistaPressaoArterial = pressaoArterialService.buscarTodos();\n\n\t}", "public void mostrarInstitucionAcceso(int institucion){\r\n periodoS=null;\r\n \r\n institucionAcceso=new institucionAccesoDAO().mostrarInstitucionAcceso(institucion);\r\n //LISTADO PERIODO INSTITUCION\r\n \r\n periodoL=new periodoDAO().mostrarPeriodoInstitucion(institucion);\r\n \r\n if (periodoL.size() >0){\r\n periodoS=periodoL.get(0).getPeriodo();\r\n }\r\n cargarMenu();\r\n }", "public PanelInformesYEstadisticas() {\r\n\t\tinitComponents();\r\n\t\t//Util.personaSinResultados(lbSinResultados, true);\r\n\t}", "@Override public void activated() {\n\t\t\tApiDemo.INSTANCE.controller().reqFundamentals(m_contract, FundamentalType.ReportRatios, this);\n\t\t}", "public agendaVentana() {\n initComponents();\n setIconImage(new ImageIcon(this.getClass().getResource(\"/IMG/maqui.png\")).getImage());\n citasDAO = new CitasDAO();\n clienteDAO = new ClienteDAO();\n loadmodel();\n loadClientesCombo();\n loadClientesComboA();\n jTabbedPane1.setEnabledAt(2, false);\n\n }", "public void startAgentAlertChange() {\n // referencia la fecha que determina la alerta actual\n Timer timer = new Timer(SIBAConst.TIME_AGENT_ALERT_CHANGE, new ActionListener() {\n \t\n public void actionPerformed(ActionEvent e) {\n \t//System.out.println(\"Entro aqui general 900: \"+controlFlagGeneral.alerta());\n \t//System.out.println(\"Entro aqui personal 900: \"+controlFlagPersonal.alerta());\n //if (controlFlagGeneral.alerta() || getControlFlagPersonal().alerta()) {\n if (controlFlagGeneral.alerta().equals(true)) { \t\n // activada banderas de carga de nuevos archivos XML\n \tSystem.out.println(\"Se ha modificado la bandera General\");\n removeLastProgramation = true;\n alreadyChange = false;\n }\n else if(controlFlagPersonal.alerta().equals(true))\n {\n // activada banderas de carga de nuevos archivos XML\n \tSystem.out.println(\"Se ha modificado la bandera Personal\");\n removeLastProgramation = true;\n alreadyChange = false;\n }\n else\n {\n \tSystem.out.println(\"No se han modificado las banderas\");\n }\n }\n });\n timer.start();\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\t\tint hora = calendario.get(Calendar.HOUR_OF_DAY);\r\n\t\t\t\t\tint minutos = calendario.get(Calendar.MINUTE);\r\n\t\t\t\t\tint segundos = calendario.get(Calendar.SECOND);\r\n\t\t\t\t\tString horaDespegue = hora + \":\" + minutos + \":\" + segundos;\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Asigna la hora de despegue a la variable del Avión\r\n\t\t\t\t\tcontrol.llegadaAviones.elementAt(0).setHoraDespegue(horaDespegue);\r\n\r\n\t\t\t\t\t//Asigna al avión que puede proceder a despegar\r\n\t\t\t\t\tcontrol.llegadaAviones.elementAt(0).setApagado(true);\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Escribe en el texto del registro la información del avión\r\n\t\t\t\t\tescribeRegistro();\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Elimina del vector el avión\r\n\t\t\t\t\tcontrol.llegadaAviones.remove(0);\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Elimina de la tabla el avión\r\n\t\t\t\t\tlistaterminal.model.removeRow(0);\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Actualiza los paneles\r\n\t\t\t\t\tactualiza();\r\n\r\n\t\t\t\t}", "public void inicializa_controles() {\n bloquea_campos();\n bloquea_botones();\n carga_fecha();\n ocultar_labeles();\n }", "@Override\r\n\tpublic void realizarTransacción() {\n\t\tSystem.out.println(\"Transaccion en progreso\");\r\n\t}", "@Override\n\t\tpublic void onActive(AcStatusEvent event) {\n\n\t\t}", "public void enMarcha(){\n\t\t\n\t\tActionListener oyente=new DameLaHora2();//el metodo timer nos exije que tenemos que implementar la interfaz ActionListener\n\t\t//en este caso creo un objeto llamado oyente que es igual a una nueva instancia de la clase damelahora2\n\t\t\n\t\tTimer mitemporizador=new Timer(intervalo, oyente);//instancia de la clase timer, \n\t\t//la clase exige que se le pase como paremetros un objeto de tipo entero y un objeto de tipo actionlistener\n\t\t\n\t\tmitemporizador.start();//el objeto de tipo timer utiliza el metodo heredado start\n\t}", "public void activate()\n {\n }", "public void annualProcess() {\n super.withdraw(annualFee);\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tupdate();\n\t\t\t\tload(CustomersList.table);\n\t\t\t\tCustomersList.setTotalCompanyDemand();\n\t\t\t\tCustomersList.setTotalResive();\n\t\t\t\tCustomersList.setTotalShopping();\n\t\t\t\tCustomerPaidCheck();\n\t\t\t\tdispose();\n\n\t\t\t}", "public void calculoPersonal(){\n ayudantes = getAyudantesNecesarios();\n responsables = getResponsablesNecesarios();\n \n //Calculo atencion al cliente (30% total trabajadores) y RRPP (10% total trabajadores):\n \n int total = ayudantes + responsables;\n \n atencion_al_cliente = (total * 30) / 100;\n \n RRPP = (total * 10) / 100;\n \n //Creamos los trabajadores\n \n gestor_trabajadores.crearTrabajadores(RRPP, ayudantes,responsables,atencion_al_cliente);\n \n }", "@Override\r\n\tpublic void activate() {\n\t\tif(CID==true) {\r\n\t\t\tinter.setState(inter.getResults());\r\n\t\t}\r\n\t}", "@Override\n public void actionPerformed(ActionEvent evt) \n {\n Offre E2=new Offre(E.getId_etablissement(),C.getDate(),C2.getDate(),gui_Text_Field_2.getText(),gui_Text_Field_1.getText());\n OffreService service=new OffreService();\n if (E.getId_etablissement().getPartenaire()==0){\n E2.setCode(\"\");\n E2.setPourcentage(0);\n service.updateOffreSans(E, E2);\n \n }\n else {\n E2.setCode(gui_Text_Field_3.getText());\n \n E2.setPourcentage(Float.parseFloat(gui_Text_Field_4.getText()));\n service.updateOffreAvec(E, E2);\n }\n last.refreshTheme();\n last.show();\n \n }", "public int getCalorias() {return calorias;}", "private void actualizarEstado(){\n //--------------- Calcular tiempo transcurrido ---------------\n Date tiempoAnterior = tiempoActual;\n tiempoActual = new Date();\n double transcurridoAux = (tiempoActual.getTime() - tiempoAnterior.getTime());\n double transcurrido = transcurridoAux/1000.0;\n \n boolean puedeCrearTropas = false;\n boolean puedeRecogerRecursos = false;\n //--------------- Recorrer edificios ---------------\n for(Edificio e: aldea.edificios){\n \n // Actualizar minas y recolectores\n if(e.generadorRecursos() && e.estaHabilitado()){\n e.actualizarRecursos(transcurrido);\n puedeRecogerRecursos = true;\n if(e.tipo == vg.MINA){\n jTextFieldOroMina.setText(String.valueOf(e.cantidadRecurso));\n }\n else\n jTextFieldElixRec.setText(String.valueOf(e.cantidadRecurso));\n }\n \n // Verificar si hay un cuartel habilitado para poder crear tropas\n if(e.tipo == vg.CUARTEL && e.habilitado)\n puedeCrearTropas = true;\n \n }\n // Habilitar/deshabilitar boton crear tropas\n jButtonCrearTropa.setEnabled(puedeCrearTropas);\n \n // Habilitar/deshabilitar boton recoger recursos\n jButtonRecogerRecursos.setEnabled(puedeRecogerRecursos);\n \n // Verificar si hay constuctores libres para permitir la creacion de tropas\n if(aldea.constructoresLibres() > 0){\n jButtonCrearEdificio.setEnabled(true);\n jButtonMejorarEdificio.setEnabled(true);\n }\n else{\n jButtonCrearEdificio.setEnabled(false);\n jButtonMejorarEdificio.setEnabled(false);\n }\n \n //--------------- Revisar LEF ---------------\n // Recorrer en sentido inverso\n for(int i=LEF.size()-1;i>=0;i--){\n Date tiempoActual = new Date();\n // Si ocurre un evento\n if(tiempoActual.after(LEF.get(i).tiempo)){\n // Si el evento es culminar edificio\n if(LEF.get(i).tipo == vg.EV_CULMINAR_EDIF){\n culminarEdificio(aldea.edificios.get(LEF.get(i).id));\n LEF.remove(i); // Remover evento futuro de la lista\n }\n else if(LEF.get(i).tipo == vg.EV_CULMINAR_TROPA){\n boolean romperCiclo = false;\n // Recorrer edificio para buscar tropa en colaTropas\n for(Edificio e: aldea.edificios){\n // Buscar tropa\n for(Tropa t: e.colaTropas){\n if(t.id == LEF.get(i).id){\n culminarTropa(e, t); // En este evento se agrega la tropa a la aldea\n e.colaTropas.remove(t);// Remover tropa de colaTropas en edificio\n LEF.remove(i); // Remover evento futuro de la lista\n romperCiclo = true;\n break;\n }\n }\n if(romperCiclo)\n break;\n }\n }\n }\n }\n }", "@Override\n\tpublic String describirActividades() {\n\t\treturn (\"Soy el secretario, recibo documentos, atiendo llamadas telefónicas y atiendo visitas\");\n\t}", "@Override\n\tpublic String describirActividades() {\n\t\treturn (\"Soy el secretario, recibo documentos, atiendo llamadas telefónicas y atiendo visitas\");\n\t}", "private void IniciarCronometro() {\n ActionListener action = new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n currentSegundo++;\n\n if (currentSegundo == 60) {\n currentMinuto++;\n currentSegundo = 0;\n }\n\n if (currentMinuto == 60) {\n currentHora++;\n currentMinuto = 0;\n }\n\n String hr = currentHora <= 9 ? \"0\" + currentHora : currentHora + \"\";\n String min = currentMinuto <= 9 ? \"0\" + currentMinuto : currentMinuto + \"\";\n String seg = currentSegundo <= 9 ? \"0\" + currentSegundo : currentSegundo + \"\";\n\n lbcronometro.setText(hr + \":\" + min + \":\" + seg);\n tempo = hr + \":\" + min + \":\" + seg;\n }\n };\n this.timer = new Timer(velocidade, action);\n this.timer.start();\n }", "public void addDeActiveness(){\n deActiveInARow +=1;\n }", "public Collection getDTOCronogramaActividades() {\n return acts;\n }", "public void AumentarVictorias() {\r\n\t\tthis.victorias_actuales++;\r\n\t\tif (this.victorias_actuales >= 9) {\r\n\t\t\tthis.TituloNobiliario = 3;\r\n\t\t} else if (this.victorias_actuales >= 6) {\r\n\t\t\tthis.TituloNobiliario = 2;\r\n\t\t} else if (this.victorias_actuales >= 3) {\r\n\t\t\tthis.TituloNobiliario = 1;\r\n\t\t} else {\r\n\t\t\tthis.TituloNobiliario = 0;\r\n\t\t}\r\n\t}", "public void activateInterArrivalTimeTally() {\n\t\tactivateInterArrivalTimeTally(false);\n\t}", "public void action() {\n\t\t\n\t\tjugar.setOnAction(f->{\n\n\t\t\tMain.pantallaPersonaje();\n\t\t});\n\t\n\t\tpuntajes.setOnAction(f->{\n\t\t\tMain.pantallaPuntajes();\n\t\t});\n\t\n\t\n\t}", "public lectManage() {\n initComponents();\n tableComponents();\n viewSchedule();\n }", "public void setupDays() {\n\n //if(days.isEmpty()) {\n days.clear();\n int day_number = today.getActualMaximum(Calendar.DAY_OF_MONTH);\n SimpleDateFormat sdf = new SimpleDateFormat(\"EEEE\");\n SimpleDateFormat sdfMonth = new SimpleDateFormat(\"MMM\");\n today.set(Calendar.DATE, 1);\n for (int i = 1; i <= day_number; i++) {\n OrariAttivita data = new OrariAttivita();\n data.setId_utente(mActualUser.getID());\n\n //Trasformare in sql date\n java.sql.Date sqldate = new java.sql.Date(today.getTimeInMillis());\n data.setGiorno(sqldate.toString());\n\n data.setDay(i);\n data.setMonth(today.get(Calendar.MONTH) + 1);\n\n data.setDay_of_week(today.get(Calendar.DAY_OF_WEEK));\n Date date = today.getTime();\n String day_name = sdf.format(date);\n data.setDay_name(day_name);\n data.setMonth_name(sdfMonth.format(date));\n\n int indice;\n\n if (!attivitaMensili.isEmpty()) {\n if ((indice = attivitaMensili.indexOf(data)) > -1) {\n OrariAttivita temp = attivitaMensili.get(indice);\n if (temp.getOre_totali() == 0.5) {\n int occurence = Collections.frequency(attivitaMensili, temp);\n if (occurence == 2) {\n for (OrariAttivita other : attivitaMensili) {\n if (other.equals(temp) && other.getCommessa() != temp.getCommessa()) {\n data.setOtherHalf(other);\n data.getOtherHalf().setModifica(true);\n }\n }\n\n }\n }\n data.setFromOld(temp);\n data.setModifica(true);\n }\n }\n isFerie(data);\n\n\n //Aggiungi la data alla lista\n days.add(data);\n\n //Aggiugni un giorno alla data attuale\n today.add(Calendar.DATE, 1);\n }\n\n today.setTime(actualDate);\n\n mCalendarAdapter.notifyDataSetChanged();\n mCalendarList.setAdapter(mCalendarAdapter);\n showProgress(false);\n }", "public VentanaEventos(String categoria) {\n //usuarioMostrar = ControladorUsuario.buscarUsuario(nickUsuario);\n categoriaActual=categoria;\n initComponents();\n mostrarTabla();\n\n\n }", "public String getActivo() {\r\n\t\treturn activo;\r\n\t}", "public void zeraEmpates() {\r\n contaEmpates = 0;\r\n }", "void activate();", "void activate();", "private void inicializar() {\n\t\tactualizarComboboxCursos();\n\t\tactualizarTablaPeriodos();\n\t\tjfad.tPBody.setText(modelo.obtenerMensajeCorreo());\n\t\tjfad.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);\n\t\tjfad.addWindowListener(this);\n\t\tjfad.lbModCurso.setVisible(false);\n\n\t\t// Añadir las acciones a los botones del panel de crear periodos\n\t\tjfad.btnAadirCurso.setActionCommand(\"addCurso\");\n\t\tjfad.btnCrear.setActionCommand(\"addPeriodo\");\n\t\tjfad.cBCursosMod.setActionCommand(\"actualizarTabla\");\n\t\tjfad.btnModificar.setActionCommand(\"modificar\");\n\t\tjfad.btnMostrarReservas.setActionCommand(\"reservasPeriodo\");\n\t\tjfad.btnRealizarCambios.setActionCommand(\"actualizarCorreo\");\n\n\t\t// Ponemos a escuchar las acciones del usuario del panel de crear periodos\n\t\tjfad.btnAadirCurso.addActionListener(this);\n\t\tjfad.btnCrear.addActionListener(this);\n\t\tjfad.cBCursosMod.addActionListener(this);\n\t\tjfad.btnModificar.addActionListener(this);\n\t\tjfad.btnMostrarReservas.addActionListener(this);\n\t\tjfad.btnRealizarCambios.addActionListener(this);\n\t\t\n\t\tjfad.tPeriodos.addMouseListener(this);\n\t\t\n\t}", "public void atualizar() {\n System.out.println(\"Metodo atualizar chamado!\");\n setR1(0);\n setR2(0);\n setR3(0);\n setN(0);\n\n //context.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, \"Atualizado!\", \"\"));\n }", "private void getActivatedWeekdays() {\n }" ]
[ "0.6170299", "0.6100967", "0.60774034", "0.59587175", "0.58925015", "0.5888647", "0.58689284", "0.5858685", "0.57556015", "0.5748248", "0.574453", "0.5726041", "0.5708072", "0.570047", "0.56573147", "0.5656394", "0.5643602", "0.5637834", "0.56094295", "0.56065845", "0.5603147", "0.560165", "0.55930835", "0.5591459", "0.558738", "0.5557105", "0.5527859", "0.5523498", "0.55041546", "0.5494165", "0.5481949", "0.5479378", "0.5476525", "0.5451846", "0.5449095", "0.54464954", "0.5441641", "0.5438286", "0.54381543", "0.5438032", "0.54304683", "0.5418394", "0.5394017", "0.53900087", "0.53746456", "0.5374505", "0.5358133", "0.53502434", "0.53495455", "0.53429455", "0.53413934", "0.53395224", "0.5330082", "0.532428", "0.5320787", "0.5313476", "0.5309642", "0.53012764", "0.5295671", "0.52899456", "0.52819645", "0.5281189", "0.5277829", "0.5272029", "0.52673125", "0.5265185", "0.5264408", "0.5264051", "0.5261131", "0.5259902", "0.52571565", "0.5256482", "0.52558434", "0.52546734", "0.5253515", "0.52493376", "0.5247851", "0.52475", "0.5238038", "0.5236445", "0.52338094", "0.523155", "0.5231124", "0.5230515", "0.5230515", "0.5228299", "0.52257663", "0.52224946", "0.522092", "0.52205366", "0.52200294", "0.5215847", "0.52142984", "0.52122295", "0.5205979", "0.52056754", "0.5205148", "0.5205148", "0.5202148", "0.51980084", "0.5195484" ]
0.0
-1
Datos de las actividades
public String[][] datosActividades(String where) { ResultSet sql; try { Connection con = conexion.abrirConexion(); Statement s = con.createStatement(); sql = s.executeQuery("SELECT actividad.idActividad, actividad.nombre, tiene.foto FROM actividad " + "INNER JOIN tiene ON actividad.idActividad = tiene.Actividad_idActividad " + "INNER JOIN posee ON posee.tiene_idTiene = tiene.idTiene " + where); //número de registros obrenidos int count = 0; while (sql.next()) { ++count; } //declaración del array String [][] a = new String [count][4]; //se regresa al primero sql.beforeFirst(); //contador para copiar del resultset al array int i = 0; //copiar del resultset al array while (sql.next()) { a[i][0] = sql.getString(1); a[i][1] = sql.getString(2); a[i][2] = sql.getString(3); i++; } conexion.cerrarConexion(con); return a; } catch (SQLException ex) { return null; } catch(NullPointerException e){ JOptionPane.showMessageDialog(null, "Error al intentar conectar con el servidor."); return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void limpiarCamposActividadesYRecord() {\r\n try {\r\n opcionTableroControlSeguim = \"\";\r\n estadoPanelMisActivid = false;\r\n estadoPanelMisRecordat = false;\r\n estadoPanelActividAsign = false;\r\n estadoPanelRecordatAsign = false;\r\n } catch (Exception e) {\r\n mbTodero.setMens(\"Error en el metodo '\" + this.getClass() + \".limpiarCamposCita()' causado por: \" + e.getMessage());\r\n mbTodero.error();\r\n }\r\n\r\n }", "public DatosInvitado() {\n\t\tsuper(MensajesVentanas.ventanaActiva);\n\t\tinitialize();\n\n\t\tjButtonAceptar.addActionListener(this);\n\t\tjButtonAceptar.addKeyListener(this);\n\t\tjButtonCancelar.addActionListener(this);\n\t\tjButtonCancelar.addKeyListener(this);\n\t\tjTextField.addKeyListener(this);\n\t\tjTextPane.addKeyListener(this);\n\t\t\n\t\tif(CR.meVenta.getVenta() != null && CR.meVenta.getVenta().getCliente().getNombreCompleto() != null){\n\t\t\tgetJTextField().setText(CR.meVenta.getVenta().getCliente().getNombreCompleto());\n\t\t\tjTextPane.requestFocus();\n\t\t}else if(CR.meServ.getListaRegalos()!=null && CR.meServ.getListaRegalos().getCliente()!=null){\n\t\t\tgetJTextField().setText(CR.meServ.getListaRegalos().getCliente().getNombreCompleto());\n\t\t\tjTextPane.requestFocus();\n\t\t}\n\t\t\n\t\tif(CR.meServ.getListaRegalos()!=null && CR.meServ.getListaRegalos().getDedicatoria()!=null)\n\t\t\tjTextPane.setText(CR.meServ.getListaRegalos().getDedicatoria());\n\t}", "@Override\n\tpublic void ejecutarActividadesConProposito() {\n\t\t\n\t}", "@Override\n\tpublic String describirActividades() {\n\t\treturn (\"Soy el secretario, recibo documentos, atiendo llamadas telefónicas y atiendo visitas\");\n\t}", "@Override\n\tpublic String describirActividades() {\n\t\treturn (\"Soy el secretario, recibo documentos, atiendo llamadas telefónicas y atiendo visitas\");\n\t}", "private void solicitarDatos() {\n Intent intent = Henson.with(this).gotoAlumnoActivity().edad(mAlumno.getEdad()).nombre(\n mAlumno.getNombre()).build();\n startActivityForResult(intent, RC_ALUMNO);\n }", "public JFPrincipioActivo() {\n initComponents();\n this.activarControles(false);\n this.listarPrincipiosActivos();\n }", "public void setActividad(Actividad actividad) {\r\n\t\tthis.actividad = actividad;\r\n\t}", "public void activar(){\n\n }", "public String getActivo() {\r\n\t\treturn activo;\r\n\t}", "private void ingresarAplicacion() {\n\t\tXlinkUtils.shortTips(\"validarIngreso 11\");\r\n\t\tEquipoDataSource equipoDataSource = new EquipoDataSource(getApplicationContext());\r\n\t\tequipoDataSource.open();\r\n\t\tequipoDataSource.crearColumnas();\r\n\t\tEquipo equipoBusqueda = new Equipo();\r\n\t\tequipoBusqueda.setEstadoEquipo(EstadoDispositivoEnum.CONFIGURACION.getCodigo());\r\n\t\tArrayList<Equipo> equipos = equipoDataSource.getEquipoEstado(equipoBusqueda);\r\n\t\tequipoDataSource.close();\r\n\t\tif(equipos != null && equipos.size() > 0){\r\n\t\t\t//Cuenta activa y equipo en configuracion\r\n\t\t\tEquipo equipo = (Equipo) equipos.toArray()[0];\r\n\t\t\tdatosAplicacion.setEquipoSeleccionado(equipo);\r\n//\t\t\tIntent i = null;\r\n\t\t\tif(equipo.getTipoEquipo().equals(TipoEquipoEnum.PORTERO.getCodigo())){\r\n\t\t\t\tnumeroSerie = ((Equipo) equipos.toArray()[0]).getNumeroSerie();\r\n\t\t\t\tprimerEquipo = false;\r\n\t\t\t\tObtenerEquipoPorNumeroSerieAsyncTask numeroSerieAsyncTask = new ObtenerEquipoPorNumeroSerieAsyncTask(null, SplashActivity.this);\r\n\t\t\t\tnumeroSerieAsyncTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);\r\n//\t\t\t\ti = new Intent(SplashActivity.this, InstalarEquipoActivity.class);\r\n//\t\t\t\tstartActivity(i);\r\n\t\t\t}\r\n\r\n\t\t}else{\r\n\t\t\t//Cuenta activa y no hay dispositivos configurandose\r\n\t\t\tXlinkUtils.shortTips(\"validarIngreso 12\");\r\n\t\t\tSharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());\r\n\t\t\tString numeroSerie = sharedPrefs.getString(\"prefEquipo\", \"\").toString();\r\n\t\t\tequipoDataSource = new EquipoDataSource(getApplicationContext());\r\n\t\t\tequipoDataSource.open();\r\n\t\t\tequipoBusqueda = new Equipo();\r\n\t\t\tequipoBusqueda.setTipoEquipo(TipoEquipoEnum.PORTERO.getCodigo());\r\n\t\t\tequipos = equipoDataSource.getEquipoTipoEquipo(equipoBusqueda);\r\n\r\n\t\t\tif(equipos != null && equipos.size() > 0) {\r\n\t\t\t\tdatosAplicacion.setEquipoSeleccionado(equipos.get(0));\r\n\t\t\t\tdatosAplicacion.setPorteroInstalado(true);\r\n\t\t\t}else{\r\n\t\t\t\tdatosAplicacion.setPorteroInstalado(false);\r\n\t\t\t}\r\n\r\n\t\t\tequipoBusqueda = new Equipo();\r\n\t\t\tequipoBusqueda.setNumeroSerie(numeroSerie);\r\n\t\t\tEquipo equipoPreferencia = equipoDataSource.getEquipoNumSerie(equipoBusqueda);\r\n\t\t\tequipoPreferencia.setModo(YACSmartProperties.MODO_WIFI);\r\n//\t\t\tequipoPreferencia.setNombreWiFi(\"yacareWIFI\");\r\n//\t\t\tequipoDataSource.updateEquipo(equipoPreferencia);\r\n//\t\t\tequipoDataSource.close();\r\n\r\n\t\t\tif(equipoPreferencia != null && equipoPreferencia.getId() != null && equipoPreferencia.getTipoEquipo().equals(TipoEquipoEnum.PORTERO.getCodigo())) {\r\n\t\t\t\tXlinkUtils.shortTips(\"validarIngreso 13\");\r\n\t\t\t\tdatosAplicacion.setEquipoSeleccionado(equipoPreferencia);\r\n\t\t\t\tIntent i = new Intent(SplashActivity.this, Y4HomeActivity.class);\r\n\t\t\t\tstartActivity(i);\r\n\t\t\t}else if(equipoPreferencia != null && equipoPreferencia.getId() != null && equipoPreferencia.getTipoEquipo().equals(TipoEquipoEnum.LUCES.getCodigo())) {\r\n\t\t\t\tXlinkUtils.shortTips(\"validarIngreso 14\");\r\n\t\t\t\t\tdatosAplicacion.setEquipoSeleccionado(equipoPreferencia);\r\n\t\t\t\tIntent i = new Intent(SplashActivity.this, LucesFragment.class);\r\n\t\t\t\tstartActivity(i);\r\n\t\t\t}else{\r\n\t\t\t\tXlinkUtils.shortTips(\"validarIngreso 15\");\r\n\t\t\t\tif(datosAplicacion.getPorteroInstalado()){\r\n\t\t\t\t\tXlinkUtils.shortTips(\"validarIngreso 16\");\r\n\t\t\t\t\tIntent i = new Intent(SplashActivity.this, Y4HomeActivity.class);\r\n\t\t\t\t\tstartActivity(i);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tXlinkUtils.shortTips(\"validarIngreso 17\");\r\n\t\t\t\t\tequipoDataSource = new EquipoDataSource(getApplicationContext());\r\n\t\t\t\t\tequipoDataSource.open();\r\n\t\t\t\t\tequipoBusqueda = new Equipo();\r\n\t\t\t\t\tequipoBusqueda.setTipoEquipo(TipoEquipoEnum.LUCES.getCodigo());\r\n\t\t\t\t\tequipos = equipoDataSource.getEquipoTipoEquipo(equipoBusqueda);\r\n\t\t\t\t\tequipoDataSource.close();\r\n\t\t\t\t\tdatosAplicacion.setEquipoSeleccionado(equipos.get(0));\r\n\t\t\t\t\tIntent i = new Intent(SplashActivity.this, LucesFragment.class);\r\n\t\t\t\t\tstartActivity(i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n//\t\t\tdatosAplicacion.getEquipoSeleccionado().setNombreWiFi(\"yacareWIFI\");\r\n//\t\t\tequipoDataSource.updateEquipo(datosAplicacion.getEquipoSeleccionado());\r\n\t\t\tequipoDataSource.close();\r\n\t\t}\r\n\t}", "Activite getActiviteCourante();", "private void cargarAutorizaciones() {\r\n\t\tif (parametros_empresa != null) {\r\n\t\t\tif (parametros_empresa.getTrabaja_autorizacion()) {\r\n\t\t\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\t\t\tparametros.put(\"nro_identificacion\",\r\n\t\t\t\t\t\tadmision_seleccionada.getNro_identificacion());\r\n\t\t\t\tparametros.put(\"nro_ingreso\",\r\n\t\t\t\t\t\tadmision_seleccionada.getNro_ingreso());\r\n\t\t\t\tparametros.put(\"estado\", admision_seleccionada.getEstado());\r\n\t\t\t\tparametros.put(\"tipo_hc\", \"\");\r\n\t\t\t\tparametros.put(IVias_ingreso.ADMISION_PACIENTE,\r\n\t\t\t\t\t\tadmision_seleccionada);\r\n\r\n\t\t\t\ttabboxContendor.abrirPaginaTabDemanda(false,\r\n\t\t\t\t\t\tIRutas_historia.PAGINA_AUTORIZACIONES,\r\n\t\t\t\t\t\t\"AUTORIZACIONES\", parametros);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void cargarDatos()\n {\n // Pantalla carga\n showProgress(true, mView, mProgressView, getContext());\n Comando login = new LoginComando(KPantallas.PANTALLA_PERFIL);\n String email = UtilUI.getEmail(getContext());\n String password = UtilUI.getPassword(getContext());\n login.ejecutar(email,password);\n }", "public void acutualizarInfo(){\n String pibId = String.valueOf(comentario.getId());\n labelId.setText(\"#\" + pibId);\n\n String autor = comentario.getAutor().toString();\n labelAutor.setText(autor);\n\n String fecha = comentario.getFechaCreacion().toString();\n labelFecha.setText(fecha);\n \n String contenido = comentario.getContenido();\n textAreaContenido.setText(contenido);\n \n String likes = ((Integer)comentario.totalLikes()).toString();\n labelLikes.setText(likes);\n \n Collection<Comentario> comments = socialNetwork.searchSubComentarios(comentario);\n panelSubComentarios.loadItems(comments, 15);\n \n if(comentario.isSubcomentario()){\n jButton4.setEnabled(true);\n }\n else{\n jButton4.setEnabled(false);\n }\n }", "private void obterDadosActivityLista() {\r\n bNnovo = getIntent().getExtras().getBoolean(\"novo\");\r\n }", "public void activate(){\r\n\r\n\t}", "public void menuTipoActividad() {\n\t\tSystem.out.println(\"MENU TIPOS ACTIVIDAD\");\n\t\tSystem.out.println(\"1. LOW\");\n\t\tSystem.out.println(\"2. MEDIUM\");\n\t\tSystem.out.println(\"3. HIGH\");\n\t}", "public void setActivo(String activo) {\r\n\t\tthis.activo = activo;\r\n\t}", "private void limpiarDatos() {\n\t\t\n\t}", "public String[] getActivations(){\n return activations;\n }", "public void inicializa_controles() {\n bloquea_campos();\n bloquea_botones();\n carga_fecha();\n ocultar_labeles();\n }", "public void setActivo(Boolean activo) {\n this.activo = activo;\n }", "@Override\n\tpublic String[] getActividades() {\n\t\treturn this.actividades;\n\t}", "private void initVistas() {\n // La actividad responderá al pulsar el botón.\n Button btnSolicitar = (Button) this.findViewById(R.id.btnSolicitar);\n btnSolicitar.setOnClickListener(new OnClickListener() {\n @Override\n public void onClick(View v) {\n solicitarDatos();\n }\n });\n lblDatos = (TextView) this.findViewById(R.id.lblDatos);\n }", "List<Oficios> buscarActivas();", "public ManipularEstudiantes() {\n initComponents();\n cme = new Control_Mantenimiento_Estudiante(this);\n this.gUI_botones2.agregar_eventos(cme);\n }", "public void cargaDatosInicialesSoloParaModificacionDeCuenta() throws Exception {\n GestionContableWrapper gestionContableWrapper = parParametricasService.factoryGestionContable();\n gestionContableWrapper.getNormaContable3();\n parAjustesList = parParametricasService.listaTiposDeAjuste(obtieneEnumTipoAjuste(gestionContableWrapper.getNormaContable3()));\n selectAuxiliarParaAsignacionModificacion = cntEntidadesService.listaDeAuxiliaresPorEntidad(selectedEntidad);\n //Obtien Ajuste Fin\n\n //Activa formulario para automatico modifica \n switch (selectedEntidad.getNivel()) {\n case 1:\n swParAutomatico = true;\n numeroEspaciador = 200;\n break;\n case 2:\n swParAutomatico = true;\n swActivaBoton = true;\n numeroEspaciador = 200;\n break;\n case 3:\n swParAutomatico = false;\n numeroEspaciador = 1;\n break;\n default:\n break;\n }\n\n cntEntidad = (CntEntidad) getCntEntidadesService().find(CntEntidad.class, selectedEntidad.getIdEntidad());\n }", "public cambiarContrasenna() {\n initComponents();\n txtNombreUsuario.setEnabled(false);\n inicializarComponentes();\n cargarUsuarios();\n }", "public void menuListados() {\n\t\tSystem.out.println(\"MENU LISTADOS\");\n\t\tSystem.out.println(\"1. Personas con la misma actividad\");\n\t\tSystem.out.println(\"2. Cantidad de personas con la misma actividad\");\n\t\tSystem.out.println(\"0. Salir\");\n\t}", "public Asignacion_usuario_Perfil1() {\n int CodigoAplicacion = 120;\n initComponents();\n llenadoDeCombos();\n llenadoDeTablas();\n \n\n \n }", "@Override\n\tpublic void onActivityCreated(@Nullable Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t\t\n\t\tBundle args = getArguments();\n\t\t\n if (args != null) {\n \t\n \tactiv=(Actividad)args.get(\"Actividad\");\n \t\n \tObtenerVistas();\n \t\n \t//Verificar el tipo de gestion del proyecto: Por Cantidades o Por Porcentajes\n \ttGestion = Proyecto.ObtenerTipoGestionProyecto(getActivity(),\n \t\t\tactiv.getIdCliente(),activ.getIdProyecto());\n\n \tEstablecerVistas(tGestion);\n \t \t\n }\n\t}", "public ConsultoriosExtAntecedentes() {\n initComponents();\n QuitarLaBarraTitulo();\n mensaje.setVisible(false);\n }", "public Boolean getActivo() {\n return activo;\n }", "public vistaEjemplo() {\n initComponents();\n con=new Conexion();\n data = new Datas(con);\n usuario = new Usuario();\n jTApellido.setEnabled(false);\n jTMail.setEnabled(false);\n jTNombre.setEnabled(false);\n jTPassword.setEnabled(false);\n JdcFechaDeEntrada.setEnabled(false);\n jBPdf.setEnabled(false);\n }", "private void mostrarEstadoObjetosUsados() {\n Beneficiario beneficiario = null;\n FichaSocial fichaSocial = null;\n SolicitudBeneficio solicitudBeneficio = null;\n AspectoHabitacional aspectoHabitacional = null;\n AspectoEconomico aspectoEconomico = null;\n\n // CAMBIAR: Obtener datos del Request y asignarlos a los textField\n if (this.getRequestBean1().getObjetoABM() != null) {\n fichaSocial = (FichaSocial) this.getRequestBean1().getObjetoABM();\n aspectoHabitacional = (AspectoHabitacional) fichaSocial.getAspectoHabitacional();\n aspectoEconomico = (AspectoEconomico) fichaSocial.getAspectoEconomico();\n this.getElementoPila().getObjetos().set(0, fichaSocial);\n this.getElementoPila().getObjetos().set(1, aspectoHabitacional);\n this.getElementoPila().getObjetos().set(2, aspectoEconomico);\n }\n\n int ind = 0;\n fichaSocial = (FichaSocial) this.obtenerObjetoDelElementoPila(ind++, FichaSocial.class);\n aspectoHabitacional = (AspectoHabitacional) this.obtenerObjetoDelElementoPila(ind++, AspectoHabitacional.class);\n aspectoEconomico = (AspectoEconomico) this.obtenerObjetoDelElementoPila(ind++, AspectoEconomico.class);\n\n\n this.getTfCodigo().setText(fichaSocial.getNumero());\n this.getTfFecha().setText(Conversor.getStringDeFechaCorta(fichaSocial.getFecha()));\n ////\n //Beneficiarios:\n if (fichaSocial.getTitular() != null) {\n this.getTfTitular().setText(fichaSocial.toString());\n }\n\n this.setListaDelCommunication(new ArrayList(fichaSocial.getGrupoFamiliar()));\n this.getObjectListDataProvider().setList(new ArrayList(fichaSocial.getGrupoFamiliar()));\n\n //Aspecto habitacional:\n if (aspectoHabitacional.getNumeroPersonas() != null) {\n this.getTfNroPersonas().setText(aspectoHabitacional.getNumeroPersonas().toString());\n }\n this.getTfVivienda().setText(aspectoHabitacional.getVivienda());\n this.getTfTenencia().setText(aspectoHabitacional.getTenencia());\n this.getTfNroCamas().setText(aspectoHabitacional.getNumeroCamas());\n this.getTfNroAmbientes().setText(aspectoHabitacional.getNumeroAmbientes());\n this.getCbBanioCompleto().setValue(new Boolean(aspectoHabitacional.isBanioCompleto()));\n this.getCbBanioInterno().setValue(new Boolean(aspectoHabitacional.isBanioInterno()));\n this.getCbAgua().setValue(new Boolean(aspectoHabitacional.isAgua()));\n this.getCbLuz().setValue(new Boolean(aspectoHabitacional.isLuz()));\n this.getCbCloaca().setValue(new Boolean(aspectoHabitacional.isCloaca()));\n this.getCbGasNatural().setValue(new Boolean(aspectoHabitacional.isGasNatural()));\n\n //Aspecto Economico:\n this.getTfNroCasas().setText(aspectoEconomico.getNumeroCasas());\n this.getTfNroTerrenos().setText(aspectoEconomico.getNumeroTerrenos());\n this.getTfNroCampos().setText(aspectoEconomico.getNumeroCampos());\n this.getTfVehiculo().setText(aspectoEconomico.getVehiculo());\n this.getTfIndustria().setText(aspectoEconomico.getIndustria());\n this.getTfActividadLaboral().setText(aspectoEconomico.getActividadLaboral());\n this.getTfComercio().setText(aspectoEconomico.getComercio());\n\n //Solicitud Beneficio\n this.setListaDelCommunication2(new ArrayList(fichaSocial.getListaSolicitudBeneficio()));\n this.getObjectListDataProvider2().setList(new ArrayList(fichaSocial.getListaSolicitudBeneficio()));\n }", "public void inicia() { \r\n\t\tventana=new VentanaMuestraServicios(this);\r\n\t\tventana.abre();\r\n\t}", "@Override\r\n\tpublic void iniciarSesion() {\n\t\tthis.contextoOrdenMenosUno = new Contexto();\r\n\t\t//Obtengo el orden del xml de configuración\r\n\t\tthis.orden = Constantes.ORDER_MAX_PPMC;\r\n\t\t//Creo tantos Ordenes como dice el XML\r\n\t\tthis.listaOrdenes = new ArrayList<Orden>(this.orden+1);\r\n\t\tthis.inicializarListas();\r\n\t\tthis.compresorAritmetico = new LogicaAritmetica();\r\n\t\tthis.initSession = true;\r\n\t\tthis.tiraBits = \"\";\r\n\t\tthis.bitsBuffer = new StringBuffer();\r\n\t\tthis.finalizada = false;\r\n\t\tthis.contextoPrevio = false;\r\n\t\tthis.contextoActual = new String();\r\n\t}", "public List<ActividadEntitie> LoadAllActividades() {\r\n\t\t\r\n\t\tCursor cursor = this.myDatabase.query(ActividadTablaEntidad.nombre_tabla,\r\n\t\t\t\t new String[] {ActividadTablaEntidad.id,ActividadTablaEntidad.actividad_codigo,ActividadTablaEntidad.actividad_descripcion}, \r\n\t\t\t\t null,null,null,null,ActividadTablaEntidad.actividad_codigo);\r\n\t\t\r\n\t\tcursor.moveToFirst();\r\n\t\t\r\n\t\tActividadEntitie datos = null;\r\n\t\tArrayList<ActividadEntitie> actividadList = null;\r\n\t\t\r\n\t\tif (cursor != null ) {\r\n\t\t\t\r\n\t\t\tactividadList = new ArrayList<ActividadEntitie>();\r\n\t\t\t\r\n\t\t\t\r\n\t\t if (cursor.moveToFirst()) {\r\n\t\t do {\r\n\t\t \t\r\n\t\t \tdatos = new ActividadEntitie();\r\n\t\t \tdatos.set_codigoActividad(cursor.getString(cursor.getColumnIndex(ActividadTablaEntidad.actividad_codigo)));\r\n\t\t \tdatos.set_descripcionActividad(cursor.getString(cursor.getColumnIndex(ActividadTablaEntidad.actividad_descripcion)));\r\n\t\t \tdatos.set_id(cursor.getLong(cursor.getColumnIndex(ActividadTablaEntidad.id)));\r\n\t\t \t\r\n\t\t \tactividadList.add(datos);\r\n\t\t \t\r\n\t\t }while (cursor.moveToNext());\r\n\t\t }\r\n\t\t}\r\n\t\t\r\n\t\tif(cursor != null)\r\n cursor.close();\r\n\t\t\r\n\t\treturn actividadList;\r\n\t}", "public agendaVentana() {\n initComponents();\n setIconImage(new ImageIcon(this.getClass().getResource(\"/IMG/maqui.png\")).getImage());\n citasDAO = new CitasDAO();\n clienteDAO = new ClienteDAO();\n loadmodel();\n loadClientesCombo();\n loadClientesComboA();\n jTabbedPane1.setEnabledAt(2, false);\n\n }", "protected void activeActivity() {\n\t\tLog.i(STARTUP, \"active activity\");\n\t\tcheckActiveActivity();\n\t}", "private void getBaseDatos() {\r\n java.awt.EventQueue.invokeLater(new Runnable() {\r\n @Override\r\n public void run() {\r\n new IngresoBaseDeDatos(isAdministrador()).setVisible(true);\r\n }\r\n });\r\n }", "private void activarControles(boolean estado) {\n this.panPrincipioActivo.setEnabled(estado);\n this.lblNombre.setEnabled(estado);\n this.txtNombre.setEditable(estado);\n this.lblDescripcion.setEnabled(estado);\n this.txtDescripcion.setEditable(estado);\n this.chkVigente.setEnabled(estado);\n this.btnAceptar.setEnabled(estado);\n this.btnCancelar.setEnabled(estado);\n \n this.panListadoPA.setEnabled(! estado);\n this.tblListadoPA.setEnabled(! estado);\n this.btnNuevo.setEnabled(! estado);\n this.btnModificar.setEnabled(! estado);\n \n if(estado == true){\n this.txtNombre.requestFocusInWindow();\n }else{\n this.tblListadoPA.requestFocusInWindow();\n }\n }", "protected void agregarUbicacion(){\n\n\n\n }", "public void activate();", "int getActivacion();", "private void carregaInformacoes() {\n Pessoa pessoa = (Pessoa) getIntent().getExtras().getSerializable(\"pessoa\");\n edtNome.setText(pessoa.getNome());\n edtEmail.setText(pessoa.getEmail());\n edtTelefone.setText(pessoa.getTelefone());\n edtIdade.setText(pessoa.getIdade());\n edtCPF.setText(pessoa.getCpf());\n }", "public void cargaDatosInicialesSoloParaAdicionDeCuenta() throws Exception {\n GestionContableWrapper gestionContableWrapper = parParametricasService.factoryGestionContable();\n gestionContableWrapper.getNormaContable3();\n parAjustesList = parParametricasService.listaTiposDeAjuste(obtieneEnumTipoAjuste(gestionContableWrapper.getNormaContable3()));\n //Obtien Ajuste Fin\n //Activa formulario para automatico modifica \n if (selectedEntidad.getNivel() >= 3) {\n numeroEspaciadorAdicionar = 260;\n }\n\n if (selectedEntidad.getNivel() == 3) {\n swParAutomatico = false;\n numeroEspaciadorAdicionar = 230;\n }\n if (selectedEntidad.getNivel() == 2) {\n swParAutomatico = true;\n swActivaBoton = true;\n numeroEspaciadorAdicionar = 200;\n }\n if (selectedEntidad.getNivel() == 1) {\n swParAutomatico = true;\n numeroEspaciadorAdicionar = 130;\n cntParametroAutomaticoDeNivel2 = cntParametroAutomaticoService.obtieneObjetoDeParametroAutomatico(selectedEntidad);\n }\n\n mascaraNuevoOpcion = \"N\";\n cntEntidad = (CntEntidad) getCntEntidadesService().find(CntEntidad.class, selectedEntidad.getIdEntidad());\n mascaraNivel = getCntEntidadesService().generaCodigoNivelesSubAndPadre(selectedEntidad, \"N\");\n mascaraSubNivel = getCntEntidadesService().generaCodigoNivelesSubAndPadre(selectedEntidad, \"S\");\n longitudNivel = getCntEntidadesService().controlaLongitudNumero(selectedEntidad, \"N\");\n longitudSubNivel = getCntEntidadesService().controlaLongitudNumero(selectedEntidad, \"S\");\n }", "public void activarNuevoAlmacen() {\n\t\ttxtId.setVisible(false);\n\t\tpnAlmacen.setVisible(true);\n\t\tsetTxtUbicacion(\"\");\n\t\tgetPnTabla().setVisible(false);\n\t\tadd(pnAlmacen,BorderLayout.CENTER);\n\t \n\t}", "public void activate() {\n\t\t// TODO Auto-generated method stub\n\t}", "public AgendaController(){\n setService(new JavaServiceFacade());\n setActividadRegistrar(new CalendarActivityClinica());\n setModel(new CalendarModelClinica());\n if(this.isPermisoAgendaPersonal()){\n setUsuarioAgenda(LoginController.getUsuarioLogged());\n }\n generarActividades();\n setListaPacientes(service.getPacienteFindAll());\n setListaUsuarios(service.getUsuarioFindAll());\n setMensajeRegistrar(\"\");\n setMensajeEditar(\"\");\n }", "private void atualizarTela() {\n\t\tSystem.out.println(\"\\n*** Refresh da Pagina / Consultando Todos os Registro da Tabela PressaoArterial\\n\");\n\t\tpressaoArterial = new PressaoArterial();\n\t\tlistaPressaoArterial = pressaoArterialService.buscarTodos();\n\n\t}", "@Override\n public void activate() {\n \n }", "public ActividadTest()\n {\n prueba = new Actividad(\"Rumbear\",\"Salir a tomar y bailar con unos amigos\",2018,5,5,6,\n 15,8,30,30,new GregorianCalendar(2018,5,2,3,0),new GregorianCalendar(2018,5,7,8,0));\n }", "public void cargarTablas(){\n ControladorEmpleados empleados= new ControladorEmpleados();\n ControladorProyectos proyectos= new ControladorProyectos();\n ControladorCasos casos= new ControladorCasos();\n actualizarListadoObservable(empleados.consultarEmpleadosAdminProyectos(ESTADO_ASIGNADO, TIPO_3),casos.consultarCasos(devolverUser()),casos.consultarTiposCaso());\n }", "void inicializaComponentes(){\r\n\t\t\r\n\t\t//Botão com status\r\n\t\ttgbGeral = (ToggleButton) findViewById(R.id.tgbGeral);\r\n\t\ttgbGeral.setOnClickListener(this);\r\n\t\ttgbMovimento = (ToggleButton) findViewById(R.id.tgbMovimento);\r\n\t\ttgbMovimento.setOnClickListener(this);\r\n\t\ttgbfogo = (ToggleButton) findViewById(R.id.tgbFogo);\r\n\t\ttgbfogo.setOnClickListener(this);\r\n\r\n\t\t//botão\r\n\t\tbtnTemperatura = (Button) findViewById(R.id.btnTemperatura);\r\n\t\tbtnTemperatura.setOnClickListener(this);\r\n\t\t\r\n\t\t//label\r\n\t\ttxtLegenda = (TextView) findViewById(R.id.txtSensorLegenda);\r\n\t}", "public List<Permiso> obtenerTodosActivos();", "public void SolicitarDatos() {\n\t\t\r\n\t\tSystem.out.println(\"nombre:\");\r\n\t\tSystem.out.println(\"apellido\");\r\n\t\tSystem.out.println(\"numCedula\");\r\n\t\t\r\n\t}", "public void datosBundle()\n {\n //creamos un Bundle para recibir los datos de MascotasFavoritas al presionar el boton de atras en la ActionBar\n Bundle datosBundleAtras = getActivity().getIntent().getExtras();\n //preguntamos si este objeto viene con datos o esta vacio\n if(datosBundleAtras!=null)\n {//si hay datos estos se los agregamos a un ArrayList de mascotas\n mascotas = (ArrayList<Mascota>) datosBundleAtras.getSerializable(\"listamascotasatras\");\n }else{\n //si el bundle No trae datos entonces se inicializara la lista con datos\n validarBundle=1;\n //return;\n }\n }", "public void InicializarComponentes() {\n campoCadastroNome = findViewById(R.id.campoCadastroNome);\n campoCadastroEmail = findViewById(R.id.campoCadastroEmail);\n campoCadastroSenha = findViewById(R.id.campoCadastroSenha);\n switchEscolhaTipo = findViewById(R.id.switchCadastro);\n botaoFinalizarCadastro = findViewById(R.id.botaoFinalizarCriacao);\n\n\n }", "public void activate(){\r\n\t\tactive=true;\r\n\t}", "public void activate()\n {\n }", "private void cargaComonentes() {\n\t\trepoInstituciones = new InstitucionesRepository(session);\n\t\trepoInstitucion_usuario = new Institucion_UsuariosRepository(session);\n\t\tList upgdsList = null;\n\t\tif(mainApp.getUsuarioApp().getPer_Usu_Id().equalsIgnoreCase(\"Alcaldia\")){\n\t\t\tupgdsList = repoInstituciones.listByMunicipio(mainApp.getUsuarioApp().getMun_Usu_Id());\n\t\t\tInstituciones instiL=new Instituciones();\n\t\t\tIterator iter = upgdsList.iterator();\n\t\t\twhile (iter.hasNext()) {\n\t\t\t\tinstiL=(Instituciones) iter.next();\n\t\t\t\tinstitucionesList.add(instiL);\n\t\t\t}\n\t\t}else{\n\t\t\tInstitucion_Usuarios institucion_usuario = new Institucion_Usuarios();\n\t\t\tupgdsList = repoInstitucion_usuario.getListIpsByUsuario(mainApp.getUsuarioApp().getUsu_Id());\n\t\t\tIterator iter = upgdsList.iterator();\n\t\t\twhile (iter.hasNext()) {\n\t\t\t\tinstitucion_usuario = (Institucion_Usuarios) iter.next();\n\t\t\t\tinstitucionesList.add(repoInstituciones.findById(institucion_usuario.getIps_Ipsu_Id()));\n\t\t\t}\n\t\t}\n\t\t\n\t\tinstitucionesBox.setItems(institucionesList);\n\t\tinstitucionesBox.setValue(mainApp.getInstitucionApp());\n\n\t\tinstitucionesBox.valueProperty().addListener(new ChangeListener<Instituciones>() {\n\t\t\t@Override\n\t\t\tpublic void changed(ObservableValue<? extends Instituciones> observable, Instituciones oldValue,\n\t\t\t\t\tInstituciones newValue) {\n\t\t\t\tmainApp.setInstitucionApp(newValue);\n\t\t\t}\n\t\t});\n\t}", "public TblActividadUbicacion() {\r\n }", "private void RealizarAccion() {\n if (ValidarCampos()) {\n\n persona.setPrimerNombre(txtPrimerNombre.getText());\n persona.setSegundoNombre(txtSegundoNombre.getText());\n persona.setPrimerApellido(txtPrimerApellido.getText());\n persona.setSegundoApellido(txtSegundoApellido.getText());\n persona.setTelefono(txtTelefono.getText());\n persona.setCedula(txtCedula.getText());\n persona.setCorreo(txtCorreo.getText());\n persona.setDireccion(txtDireccion.getText());\n\n empleado.setFechaInicio(dcFechaInicio.getDate());\n empleado.setSalario(Double.parseDouble(txtSalario.getText()));\n empleado.setCargo(txtCargo.getText());\n empleado.setUsuarioByUserModificacion(SessionHelper.usuario);\n empleado.setFechaModificacion(new Date());\n empleado.setRegAnulado(false);\n\n switch (btnAction.getText()) {\n case \"Guardar\":\n int maxid = personaBean.MaxId() + 1;\n persona.setIdPersona(maxid);\n\n Dbcontext.guardar(persona);\n\n empleado.setIdEmpleado(maxid);\n empleado.setPersona(persona);\n empleado.setUsuarioByUserCreacion(SessionHelper.usuario);\n empleado.setFechaCreacion(new Date());\n\n Dbcontext.guardar(empleado);\n break;\n\n case \"Actualizar\":\n\n Dbcontext.actualizar(persona);\n\n Dbcontext.actualizar(empleado);\n break;\n }\n if (ifrRegistroEmpleados.isActive) {\n ifrRegistroEmpleados.CargarTabla();\n }\n\n Mensajes.OperacionExitosa(this);\n dispose();\n } else {\n Mensajes.InformacionIncompleta(this);\n }\n }", "public String verActividad() throws SQLException {\n\t\tFacesContext context = FacesContext.getCurrentInstance();\n\t\tActividad actividad = context.getApplication().evaluateExpressionGet(context, \"#{actividad}\", Actividad.class);\n\t\tSystem.out.println(\"resultado: \"+actividad.getNombresA().get(0));\n\t\t\n\t\t//Set the atributes\n\t\tCRUD crud = new CRUD();\n\t\tArrayList<String> temp = crud.select_Actividades(actividad.getNombreActividad());\n\t\tactividad.setTipoActividad(temp.get(0));\n\t\tactividad.setFechaActividad(temp.get(2));\n\t\tactividad.setHoraInicio(temp.get(3));\n\t\tactividad.setHoraFinal(temp.get(4));\n\t\tactividad.setDescripcionActividad(temp.get(5));\n\t\tSystem.out.println(\"resultado: \"+actividad.getNombreActividad()+\" \"+actividad.getTipoActividad());\n\t\t\n\t\t\n\t\t// put the user object into the POST request \n\t\tFacesContext.getCurrentInstance().getExternalContext().getRequestMap().put(\"actividad\", actividad);\n\t\t\n\t\treturn\"verActividad.xhtml\";\n\t}", "void activate();", "void activate();", "@Override\n\tpublic List<TipoAsiento> listaTipoAsientosActivas() throws Exception {\n\t\treturn null;\n\t}", "public void cargaComentPersonal(){\n List<Comentarios> list = new ArrayList<>();\n list.add(new Comentarios(Config.nombre_cli, comentario_ind[0], comentario_ind[1]));\n AdapterComentarios adpt_coment = new AdapterComentarios(list,InfoFragment.vistaInf.getContext());\n InfoFragment.listViewCP.setAdapter(adpt_coment);\n }", "private void iniciar() {\r\n\t\tprincipal = new Principal();\r\n\t\tgestionCientificos=new GestionCientificos();\r\n\t\tgestionProyectos=new GestionProyectos();\r\n\t\tgestionAsignado= new GestionAsignado();\r\n\t\tcontroller= new Controller();\r\n\t\tcientificoServ = new CientificoServ();\r\n\t\tproyectoServ = new ProyectoServ();\r\n\t\tasignadoA_Serv = new AsignadoA_Serv();\r\n\t\t\r\n\t\t/*Se establecen las relaciones entre clases*/\r\n\t\tprincipal.setControlador(controller);\r\n\t\tgestionCientificos.setControlador(controller);\r\n\t\tgestionProyectos.setControlador(controller);\r\n\t\tgestionAsignado.setControlador(controller);\r\n\t\tcientificoServ.setControlador(controller);\r\n\t\tproyectoServ.setControlador(controller);\r\n\t\t\r\n\t\t/*Se establecen relaciones con la clase coordinador*/\r\n\t\tcontroller.setPrincipal(principal);\r\n\t\tcontroller.setGestionCientificos(gestionCientificos);\r\n\t\tcontroller.setGestionProyectos(gestionProyectos);\r\n\t\tcontroller.setGestionAsignado(gestionAsignado);\r\n\t\tcontroller.setCientificoService(cientificoServ);\r\n\t\tcontroller.setProyectoService(proyectoServ);\r\n\t\tcontroller.setAsignadoService(asignadoA_Serv);\r\n\t\t\t\t\r\n\t\tprincipal.setVisible(true);\r\n\t}", "public String asignarActividad() throws SQLException {\n\t\tFacesContext context = FacesContext.getCurrentInstance();\n\t\t\n\t\t//Bloque bloque = context.getApplication().evaluateExpressionGet(context, \"#{bloque}\", Bloque.class);\n\t\tActividad actividad = context.getApplication().evaluateExpressionGet(context, \"#{actividad}\", Actividad.class);\n\t\tAsistente asistente = context.getApplication().evaluateExpressionGet(context, \"#{asistente}\", Asistente.class);\n\t\t\n\t\tSystem.out.println(\"resultado: \"+actividad.getNombreActividad());\n\t actividad.registrarActividad_Asistente(asistente.getCedula());\n\t\t\n\t\t// put the user object into the POST request \n\t\tFacesContext.getCurrentInstance().getExternalContext().getRequestMap().put(\"actividad\", actividad);\n\t\t\n\t\treturn\"principalAsistente.xhtml\";\n\t}", "private void atualizarTela() {\n\t\tSystem.out.println(\"\\n*** Refresh da Pagina / Consultando Todos os Registro da Tabela Paciente\\n\");\n\t\tpaciente = new Paciente();\n\t\tlistaPaciente = pacienteService.buscarTodos();\n\t\t\n\t}", "private void capturarControles() {\n \t\n \ttxtNombre = (TextView)findViewById(R.id.txtNombre);\n \timagenDestacada = (ImageView)findViewById(R.id.imagenDestacada);\n\t\ttxtDescripcion = (TextView)findViewById(R.id.txtDescripcion);\n\t\tlblTitulo = (TextView)findViewById(R.id.lblTitulo);\n\t\tbtnVolver = (Button)findViewById(R.id.btnVolver);\n\t\tbtnHome = (Button)findViewById(R.id.btnHome);\n\t\tpanelCargando = (RelativeLayout)findViewById(R.id.panelCargando);\n\t}", "private void dibujarEstado() {\n\n\t\tcantidadFichasNegras.setText(String.valueOf(juego.contarFichasNegras()));\n\t\tcantidadFichasBlancas.setText(String.valueOf(juego.contarFichasBlancas()));\n\t\tjugadorActual.setText(juego.obtenerJugadorActual());\n\t}", "public void inicializarAdaptador()\n {\n //creamos el adaptador y le pasamos el arreglo de mascotas, en que activity estamos\n //y el numero es para saber en la clase MascotaAdaptador como mostrara los datos y si seran clicables o no\n MascotaAdaptador adaptador = new MascotaAdaptador(mascotas, getActivity(), 1);\n listamascotas.setAdapter(adaptador);\n //agregamos iconos a cada TabLayout\n }", "public void iniciarBatalha() {\r\n\t\trede.iniciarPartidaRede();\r\n\t}", "public void aplicarDescuento();", "private void iniciaFrm() {\n statusLbls(false);\n statusBtnInicial();\n try {\n clientes = new Cliente_DAO().findAll();\n } catch (Exception ex) {\n Logger.getLogger(JF_CadastroCliente.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "private void agregarComponentes() {\n JButton botonEstudiante = new JButton(\"Estudiante\");\r\n JButton botonDocente = new JButton(\"Docente\");\r\n JButton botonEquipo = new JButton(\"Equipo\");\r\n\r\n botonEstudiante.addActionListener(new OyenteListaEstudiante(this));\r\n botonDocente.addActionListener(new OyenteListaDocente(this));\r\n botonEquipo.addActionListener(new OyenteListaEquipo(this));\r\n\r\n // crea objeto Box para manejar la colocación de areaConsulta y\r\n // botonEnviar en la GUI\r\n Box boxNorte = Box.createHorizontalBox();\r\n boxNorte.add(botonDocente);\r\n boxNorte.add(botonEstudiante);\r\n boxNorte.add(botonEquipo);\r\n\r\n // crea delegado de JTable para modeloTabla\r\n tablaDatosIngresdos = new JTable();\r\n add(boxNorte, BorderLayout.NORTH);\r\n\r\n add(new JScrollPane(tablaDatosIngresdos), BorderLayout.CENTER);\r\n\r\n }", "public GestorDeConseptos() {\n initComponents();\n service=new InformeService(); \n m=new ConseptoTableModel();\n this.jTable1.setModel(m);\n cuentas=new Vector<ConseptoEnCuenta>();\n }", "public GestaoUtilizador() {\n initComponents();\n listarutilizador();\n }", "public boolean hayPartidaActiva ()\n {\n return partidaActiva;\n }", "public void mostrarInstitucionAcceso(int institucion){\r\n periodoS=null;\r\n \r\n institucionAcceso=new institucionAccesoDAO().mostrarInstitucionAcceso(institucion);\r\n //LISTADO PERIODO INSTITUCION\r\n \r\n periodoL=new periodoDAO().mostrarPeriodoInstitucion(institucion);\r\n \r\n if (periodoL.size() >0){\r\n periodoS=periodoL.get(0).getPeriodo();\r\n }\r\n cargarMenu();\r\n }", "public void limpiarDatos() {\r\n FormularioUtil.limpiarComponentes(groupboxEditar, idsExcluyentes);\r\n tbxNro_identificacion.setValue(\"\");\r\n tbxNro_identificacion.setDisabled(false);\r\n deshabilitarCampos(true);\r\n\r\n }", "public GestionTemas() {\n initComponents();\n inicializarComponente();\n cargarTemas();\n }", "public creacionempresa() {\n initComponents();\n mostrardatos();\n }", "public ingresarDatos() {\n initComponents();\n Validacion();\n \n }", "@Override\r\n\tprotected void agregarObjeto() {\r\n\t\t// opcion 1 es agregar nuevo justificativo\r\n\t\tthis.setTitle(\"PROCESOS - PERMISOS INDIVIDUALES (AGREGANDO)\");\r\n\t\tthis.opcion = 1;\r\n\t\tactivarFormulario();\r\n\t\tlimpiarTabla();\r\n\t\tthis.panelBotones.habilitar();\r\n\t}", "public Long getActividad() {\n return this.actividad;\n }", "public vistaAlojamientos() {\n initComponents();\n \n try {\n miConn = new Conexion(\"jdbc:mysql://localhost/turismo\", \"root\", \"\");\n ad = new alojamientoData(miConn);\n \n } catch (ClassNotFoundException ex) {\n Logger.getLogger(vistaAlojamientos.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n \n }", "private void configurarEventos() {\n\n btnVoltar.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n //OBJETIVO: fecha a tela atual\n VerPessoaActivity.this.finish();\n }\n });\n }", "public Agenda() {\n initComponents();\n \n Deshabilitar();\n LlenarTabla();\n \n }", "public void activate() {\n\t\tactivated = true;\n\t}", "public Actividad(String id, String titulo, String descactividad, List<Recurso> recursos) {\n\t\t\tthis.id = id;\n\t\t\tthis.titulo = titulo;\n\t\t\tthis.descactividad = descactividad;\n\t\t\tthis.recursos = recursos;\n\t\t}", "private void mostrarDatosInterfaz() {\n\t\tif (this.opcion == CREAR) {\n\t\t\tthis.campoTextoNombreUsuario.setUserData(\"\");\n\t\t\tthis.campoTextoNombreUsuario.setDisable(false);\n\t\t\tthis.campoContrasena.setUserData(\"\");\n\t\t\tthis.campoContrasena.setDisable(false);\n\t\t\tthis.campoCorreo.setUserData(\"\");\n\t\t\tthis.campoCorreo.setDisable(false);\n\t\t\tthis.comboGrupoUsuario.getSelectionModel().select(\"\");\n\t\t\tthis.comboGrupoUsuario.setDisable(false);\n\t\t\tthis.comboStatus.getSelectionModel().select(\"\");\n\t\t\tthis.comboStatus.setDisable(false);\n\t\t\tthis.comboEmpleados.setDisable(false);\n\t\t} else if (this.opcion == EDITAR) {\n\t\t\tthis.campoTextoNombreUsuario.setText(this.usuario.getUsuario());\n\t\t\tthis.campoTextoNombreUsuario.setDisable(true);\n\t\t\tthis.campoContrasena.setText(this.usuario.getContrasena());\n\t\t\tthis.campoContrasena.setDisable(false);\n\t\t\tthis.campoCorreo.setText(this.usuario.getCorreoElectronico());\n\t\t\tthis.campoCorreo.setDisable(false);\n\t\t\tthis.comboGrupoUsuario.setValue(this.usuario.getNombreGrupoUsuario());\n\t\t\tthis.comboGrupoUsuario.setDisable(false);\n\t\t\tthis.comboStatus.setValue(this.usuario.getDescripcionStatus());\n\t\t\tthis.comboStatus.setDisable(false);\n\t\t\tthis.comboEmpleados.setValue(this.usuario.getNombreEmpleado());\n\t\t\tthis.comboEmpleados.setDisable(false);\n\t\t} else if (this.opcion == VER) {\n\t\t\tthis.campoTextoNombreUsuario.setText(this.usuario.getUsuario());\n\t\t\tthis.campoTextoNombreUsuario.setDisable(true);\n\t\t\tthis.campoContrasena.setText(this.usuario.getContrasena());\n\t\t\tthis.campoContrasena.setDisable(true);\n\t\t\tthis.campoCorreo.setText(this.usuario.getCorreoElectronico());\n\t\t\tthis.campoCorreo.setDisable(true);\n\t\t\tthis.comboGrupoUsuario.setValue(this.usuario.getNombreGrupoUsuario());\n\t\t\tthis.comboGrupoUsuario.setDisable(true);\n\t\t\tthis.comboStatus.setValue(this.usuario.getDescripcionStatus());\n\t\t\tthis.comboStatus.setDisable(true);\n\t\t\tthis.comboEmpleados.setValue(this.usuario.getNombreEmpleado());\n\t\t\tthis.comboEmpleados.setDisable(true);\n\t\t}//FIN IF ELSE\n\t}", "@Override\r\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tIntent datosSustento = new Intent(context,DatosSustentoActivity.class);\r\n\t\t\t\t\tdatosSustento.putExtra(DatosSustentoActivity.TIPO_ACCION, DatosSustentoActivity.ACCION_ACTUALIZAR);\r\n\t\t\t\t\tdatosSustento.putExtra(DatosSustentoActivity.CODIGO_CLIENTE, codigo_cliente);\r\n\t\t\t\t\tdatosSustento.putExtra(DatosSustentoActivity.CODIGO_PLAN, codigo_plan);\r\n\t\t\t\t\tdatosSustento.putExtra(DatosSustentoActivity.CODIGO_ACTIVIDAD, codigo_actividad);\t\t\t\t\t\r\n\t\t\t\t\tdatosSustento.putExtra(DatosSustentoActivity.CODIGO_SUSTENTO, sustentoTemporal.getCodigoSustento());\r\n\t\t\t\t\tdatosSustento.putExtra(DatosSustentoActivity.DESCRIPCION_SUSTENTO, sustentoTemporal.getDescripcionActividad());\r\n\t\t\t\t\tdatosSustento.putExtra(DatosSustentoActivity.TIPO_SUSTENTO, sustentoTemporal.getTipoActividad());\r\n\t\t\t\t\tdatosSustento.putExtra(DatosSustentoActivity.FECHA_VISITA, sustentoTemporal.getFechaVisita());\t\t\t\t\t\r\n\t\t\t\t\tcontext.startActivity(datosSustento);\r\n\t\t\t\t}", "private void IniciarTabla(){\n \n // limpia los datos de los Label y los datos relacionados a la actualizacion de los datos e inhabilita y habilitar botones\nthis.jLabelId.setText(\"Id\");\nthis.jnombre.setText(\"\");\ngrabarCambios.setEnabled(false);\njBotonAgregar.setEnabled(true);\n\n DefaultTableModel dfm = new DefaultTableModel();\n tabla = this.jTabla;\n tabla.setModel(dfm);\n \n // agrega los datos al index de la tabla \n dfm.setColumnIdentifiers(new Object[]{\"id\",\"Comuna\",\"Estado\"});\n Conexion cn = new Conexion();\n rs = cn.SeleccionarTodosComunas();\n try{\n // se recorre rs donde estan los resultados de la busqueda de los datos de la tabla comuna\n while(rs.next()){\n String activo =\"\";\n if (rs.getInt(\"COM_ESTADO\")==1) {\n activo = \"activo\";\n } else {\n activo = \"no activo\";};\n // se agrega la fila con los datos de la columna \n dfm.addRow(new Object[]{rs.getInt(\"COM_ID\"),rs.getString(\"COM_NOMBRE\"),activo});\n }\n \n } catch(Exception e){\n System.out.println(\"Error Revisar funcion TableModel\" + e);\n }\n }", "public IndexProyecto(Usuario session) {\n this.session=session;\n initComponents();\n setResizable(false); //Quitar Resize\n setLocationRelativeTo(null);//Centra pantalla\n setLayout(null); // Libre seleccion de tamaño\n getContentPane().setBackground(Color.decode(\"#FFFFFF\"));//Colocamos fondo blanco\n modelTblProgramadores=(DefaultTableModel)tblProgramadores.getModel();\n modelTblActividades=(DefaultTableModel)tblActividades.getModel();\n try\n {\n Bdd baseDatos= new Bdd();\n st = baseDatos.con.createStatement();\n rs=st.executeQuery(\"SELECT count(*) FROM Proyecto WHERE aceptado=1 AND eliminado=0\");\n rs.next();\n numeroProyectos=rs.getInt(\"count(*)\");\n \n idProyecto=new int[numeroProyectos];\n avanceProyecto=new int[numeroProyectos];\n nombreProyecto=new String[numeroProyectos];\n fechaCreacion=new String[numeroProyectos];\n fechaInicio=new String[numeroProyectos];\n \n if(numeroProyectos>0)\n {\n rs=st.executeQuery(\"SELECT idProyecto,titulo,fechaInicio,fechaCreacion FROM Proyecto WHERE aceptado=1 AND eliminado=0\");\n for(int i =0; i<numeroProyectos;i++)\n {\n rs.next();\n idProyecto[i]=rs.getInt(\"idProyecto\");\n nombreProyecto[i]=rs.getString(\"titulo\");\n fechaCreacion[i]=rs.getString(\"fechaCreacion\");\n fechaInicio[i]=rs.getString(\"fechaInicio\");\n }\n lblNumero.setText(\"/\"+String.valueOf(numeroProyectos));\n \n //Actividades\n for(int i =0;i<numeroProyectos;i++)\n {\n rs=st.executeQuery(\"SELECT count(*) FROM Actividades WHERE idProyecto=\"+idProyecto[i]+\" AND eliminado=0\");\n rs.next();\n int numeroActividadesTotales=rs.getInt(\"count(*)\");\n if(numeroActividadesTotales>0)\n {\n rs=st.executeQuery(\"SELECT count(*) FROM Actividades WHERE idProyecto=\"+idProyecto[i]+\" AND eliminado=0 AND estado=1\");\n rs.next();\n int numeroActividadesTerminadas=rs.getInt(\"count(*)\");\n avanceProyecto[i]=(int)(numeroActividadesTerminadas*100/numeroActividadesTotales);\n }\n else\n avanceProyecto[i]=0; \n } \n //Fin Actividades\n \n //PERMISOS (SeguridadProyectos(IDMODULO,IDUSUARIO,CONNECTION,AGREGAR[],MODIFICAR[],ELIMINAR[])\n Component[] agregar={btnNuevaActividad};\n Component[] eliminar={btnEliminarActividad,btnEliminarProgramador};\n Component[] modificar={btnEditarActividad};\n SeguridadProyectos Seg=new SeguridadProyectos(2,session,agregar,modificar,eliminar);\n // Fin PERMISOS\n mostrarDatos();\n }\n else\n JOptionPane.showMessageDialog(null, \"No hay ningun proyecto que gestionar\"); \n }\n catch(Exception e)\n {\n JOptionPane.showMessageDialog(null, \"Error en BDD: \"+e.toString());\n }\n\n }", "public Ficha_Ingreso_Egreso() {\n initComponents();\n limpiar();\n bloquear();\n \n }", "public void notifyJoueurActif();" ]
[ "0.66408294", "0.65064967", "0.64952666", "0.64927405", "0.64927405", "0.6492452", "0.6475209", "0.646996", "0.6420803", "0.6326416", "0.6293214", "0.62534004", "0.6239084", "0.6191878", "0.615435", "0.61423266", "0.6137362", "0.6089828", "0.6086854", "0.6084279", "0.60461867", "0.6039637", "0.6036971", "0.60156053", "0.60152406", "0.59987265", "0.59969926", "0.59862274", "0.5974799", "0.5940889", "0.5926557", "0.5920921", "0.5916208", "0.59140515", "0.59058255", "0.590476", "0.58960027", "0.5887047", "0.5882418", "0.5870696", "0.5870374", "0.58519953", "0.58465093", "0.58251953", "0.5824084", "0.5821985", "0.5815195", "0.58104503", "0.5809217", "0.5807027", "0.58028156", "0.57995987", "0.57946694", "0.5793023", "0.57926553", "0.57915044", "0.576738", "0.5763804", "0.5759038", "0.5754847", "0.574922", "0.57340145", "0.57274544", "0.5723667", "0.5722137", "0.57219166", "0.57212454", "0.57212454", "0.5718971", "0.57152396", "0.57150084", "0.5714801", "0.5712149", "0.57031524", "0.56998146", "0.5697909", "0.569563", "0.5689426", "0.5684985", "0.56816953", "0.5674165", "0.5658471", "0.56581867", "0.56570023", "0.56530714", "0.5649205", "0.56487817", "0.56423837", "0.56421465", "0.5639685", "0.5638871", "0.56288683", "0.56239396", "0.5616203", "0.5615661", "0.5615244", "0.56142384", "0.56116724", "0.56087893", "0.5602056", "0.56009513" ]
0.0
-1
Datos de los Estilos de viaje
public String[][] datosEstiloViaje() { ResultSet sql; try { Connection con = conexion.abrirConexion(); Statement s = con.createStatement(); sql = s.executeQuery("SELECT `idEstiloViaje`, `tipo` FROM `estiloviaje` ;"); //número de registros obrenidos int count = 0; while (sql.next()) { ++count; } //declaración del array String [][] a = new String [count][2]; //se regresa al primero sql.beforeFirst(); //contador para copiar del resultset al array int i = 0; //copiar del resultset al array while (sql.next()) { a[i][0] = sql.getString(1); a[i][1] = sql.getString(2); i++; } conexion.cerrarConexion(con); return a; } catch (SQLException ex) { return null; } catch(NullPointerException e){ JOptionPane.showMessageDialog(null, "Error al intentar conectar con el servidor."); return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void getDatosVisitasTerreno(){\n mDatosVisitasTerreno = estudioAdapter.getListaDatosVisitaTerrenosSinEnviar();\n //ca.close();\n }", "private void mostrarEstadoObjetosUsados() {\n Beneficiario beneficiario = null;\n FichaSocial fichaSocial = null;\n SolicitudBeneficio solicitudBeneficio = null;\n AspectoHabitacional aspectoHabitacional = null;\n AspectoEconomico aspectoEconomico = null;\n\n // CAMBIAR: Obtener datos del Request y asignarlos a los textField\n if (this.getRequestBean1().getObjetoABM() != null) {\n fichaSocial = (FichaSocial) this.getRequestBean1().getObjetoABM();\n aspectoHabitacional = (AspectoHabitacional) fichaSocial.getAspectoHabitacional();\n aspectoEconomico = (AspectoEconomico) fichaSocial.getAspectoEconomico();\n this.getElementoPila().getObjetos().set(0, fichaSocial);\n this.getElementoPila().getObjetos().set(1, aspectoHabitacional);\n this.getElementoPila().getObjetos().set(2, aspectoEconomico);\n }\n\n int ind = 0;\n fichaSocial = (FichaSocial) this.obtenerObjetoDelElementoPila(ind++, FichaSocial.class);\n aspectoHabitacional = (AspectoHabitacional) this.obtenerObjetoDelElementoPila(ind++, AspectoHabitacional.class);\n aspectoEconomico = (AspectoEconomico) this.obtenerObjetoDelElementoPila(ind++, AspectoEconomico.class);\n\n\n this.getTfCodigo().setText(fichaSocial.getNumero());\n this.getTfFecha().setText(Conversor.getStringDeFechaCorta(fichaSocial.getFecha()));\n ////\n //Beneficiarios:\n if (fichaSocial.getTitular() != null) {\n this.getTfTitular().setText(fichaSocial.toString());\n }\n\n this.setListaDelCommunication(new ArrayList(fichaSocial.getGrupoFamiliar()));\n this.getObjectListDataProvider().setList(new ArrayList(fichaSocial.getGrupoFamiliar()));\n\n //Aspecto habitacional:\n if (aspectoHabitacional.getNumeroPersonas() != null) {\n this.getTfNroPersonas().setText(aspectoHabitacional.getNumeroPersonas().toString());\n }\n this.getTfVivienda().setText(aspectoHabitacional.getVivienda());\n this.getTfTenencia().setText(aspectoHabitacional.getTenencia());\n this.getTfNroCamas().setText(aspectoHabitacional.getNumeroCamas());\n this.getTfNroAmbientes().setText(aspectoHabitacional.getNumeroAmbientes());\n this.getCbBanioCompleto().setValue(new Boolean(aspectoHabitacional.isBanioCompleto()));\n this.getCbBanioInterno().setValue(new Boolean(aspectoHabitacional.isBanioInterno()));\n this.getCbAgua().setValue(new Boolean(aspectoHabitacional.isAgua()));\n this.getCbLuz().setValue(new Boolean(aspectoHabitacional.isLuz()));\n this.getCbCloaca().setValue(new Boolean(aspectoHabitacional.isCloaca()));\n this.getCbGasNatural().setValue(new Boolean(aspectoHabitacional.isGasNatural()));\n\n //Aspecto Economico:\n this.getTfNroCasas().setText(aspectoEconomico.getNumeroCasas());\n this.getTfNroTerrenos().setText(aspectoEconomico.getNumeroTerrenos());\n this.getTfNroCampos().setText(aspectoEconomico.getNumeroCampos());\n this.getTfVehiculo().setText(aspectoEconomico.getVehiculo());\n this.getTfIndustria().setText(aspectoEconomico.getIndustria());\n this.getTfActividadLaboral().setText(aspectoEconomico.getActividadLaboral());\n this.getTfComercio().setText(aspectoEconomico.getComercio());\n\n //Solicitud Beneficio\n this.setListaDelCommunication2(new ArrayList(fichaSocial.getListaSolicitudBeneficio()));\n this.getObjectListDataProvider2().setList(new ArrayList(fichaSocial.getListaSolicitudBeneficio()));\n }", "private void getVisitas(){\n mVisitasTerreno = estudioAdapter.getListaVisitaTerrenosSinEnviar();\n //ca.close();\n }", "public void recargarDatos( ) {\n\t\tPAC_SHWEB_PROVEEDORES llamadaProv = null;\n\t\ttry {\n\t\t\tllamadaProv = new PAC_SHWEB_PROVEEDORES(service.plsqlDataSource.getConnection());\n\t\t} catch (SQLException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tHashMap respuestaCom = null;\n\n\t\ttry {\n\t\t\trespuestaCom = llamadaProv.ejecutaPAC_SHWEB_PROVEEDORES__F_COMUNICADOS_EXPEDIENTE(\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"user\").toString(),\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"origen\").toString(),\n\t\t\t\t\tnew BigDecimal(UI.getCurrent().getSession().getAttribute(\"expediente\").toString())\n\t\t\t\t\t);\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t\t// Mostramos el estado del expediente\n\t\tPAC_SHWEB_PROVEEDORES llamada = null;\n\t\ttry {\n\t\t\tllamada = new PAC_SHWEB_PROVEEDORES(service.plsqlDataSource.getConnection());\n\t\t} catch (SQLException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tHashMap respuesta = null;\n\t\ttry {\n\t\t\trespuesta = llamada.ejecutaPAC_SHWEB_PROVEEDORES__F_ESTADO_EXPEDIENTE(\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"user\").toString(),\n\t\t\t\t\tnew BigDecimal(UI.getCurrent().getSession().getAttribute(\"expediente\").toString())\n\t\t\t\t\t);\n\t\t\t\n\t\t\tMap<String, Object> retorno = new HashMap<String, Object>(respuesta);\n\n\t\t\tUI.getCurrent().getSession().setAttribute(\"estadoExpediente\",retorno.get(\"ESTADO\").toString());\n\t\t\t\n\t\t\tprovPantallaConsultaExpedienteInicial.setCaption(\"GESTIÓN DEL EXPEDIENTE Nº \" + UI.getCurrent().getSession().getAttribute(\"expediente\")\n\t\t\t\t\t+ \" ( \" + \n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"estadoExpediente\") + \" ) \");\n\t\t\t\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\n\t\t}\t\n\t\t\n\t\t// Maestro comunicados\n\n\t\tWS_AMA llamadaAMA = null;\n\t\ttry {\n\t\t\tllamadaAMA = new WS_AMA(service.plsqlDataSource.getConnection());\n\t\t} catch (SQLException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tHashMap respuestaMaestro = null;\n\t\t\n\t\t//System.out.println(\"Llamammos maestro comunicados: \" + UI.getCurrent().getSession().getAttribute(\"tipousuario\").toString().substring(1,1));;\n\t\ttry {\n\t\t\t// pPUSUARIO, pORIGEN, pTPCOMUNI, pTPUSUARIO, pESTADO)\n\t\t\t\n\t\t\trespuestaMaestro = llamadaAMA.ejecutaWS_AMA__MAESTRO_COMUNICADOS(\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"user\").toString(),\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"origen\").toString(),\n\t\t\t\t\tnull,\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"tipousuario\").toString().substring(1,1),\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"estadoExpediente\").toString()\n\t\t\t\t\t);\t\t\t\n\n\t\t\t\n\t\t\tMap<String, Object> retornoMaestro = new HashMap<String, Object>(respuestaMaestro);\n\t\t\tList<Map> valorMaestro = (List<Map>) retornoMaestro.get(\"COMUNICADOS\");\n\t\t\tUI.getCurrent().getSession().setAttribute(\"comunicadosExpediente\",valorMaestro);\n\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tUI.getCurrent().getSession().setAttribute(\"comunicadosExpediente\",null);\n\t\t}\n\t\t\n\t\t// \t\n\t\t\n\t\t\n\t\t// Validamos si tenemos que mostrar el bot�n de cerrar expediente\n\t\t\n\t\t/*if ( !ValidarComunicado.EsValido(\"CA\") && !ValidarComunicado.EsValido(\"FT\") ) {\n\t\t\tprovPantallaConsultaExpedienteInicial.provDatosDetalleExpediente.btCerrarExpediente.setVisible(false);\n\t\t}\n\t\telse {\n\t\t\tprovPantallaConsultaExpedienteInicial.provDatosDetalleExpediente.btCerrarExpediente.setVisible(true);\n\n\t\t\t\n\t\t\t\n\t\t}*/\n\t\t// Mostramos botonera de cerrar expediente\n\t\t// Validamos si tenemos que mostrar el bot�n de cerrar expediente\n\t\t\n\n\t}", "private void limpiarDatos() {\n\t\t\n\t}", "private void listadoEstados() {\r\n sessionProyecto.getEstados().clear();\r\n sessionProyecto.setEstados(itemService.buscarPorCatalogo(CatalogoEnum.ESTADOPROYECTO.getTipo()));\r\n }", "public void presenta_Estudiante(){\r\n System.out.println(\"Universidad Técnica Particular de Loja\\nInforme Semestral\\nEstudiante: \"+nombre+\r\n \"\\nAsignatura: \"+nAsignatura+\"\\nNota 1 Bimestre: \"+nota1B+\"\\nNota 2 Bimestre: \"+nota2B+\r\n \"\\nPromedio: \"+promedio()+\"\\nEstado de la Materia: \"+estado());\r\n }", "@Override\r\n\tpublic List<EstadoDTO> listaEstados() throws Exception {\n\t\treturn objDAO.listaEstados();\r\n\t}", "@Override\r\n\tpublic List<Object> consultarVehiculos() {\r\n\t\t\r\n\t\tFormat formato = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\r\n\t\t\r\n\t\treturn AdminEstacionamientoImpl.getParqueadero().stream().map(\r\n\t\t\t\t temp -> {HashMap<String, String> lista = new HashMap<String, String>(); \r\n\t\t\t\t lista.put( \"placa\", temp.getVehiculo().getPlaca() );\r\n\t\t\t\t lista.put( \"tipo\", temp.getVehiculo().getTipo() );\r\n\t\t\t\t lista.put( \"fechaInicio\", formato.format( temp.getFechaInicio() ) );\r\n\r\n\t\t\t\t return lista;\r\n\t\t\t\t }\r\n\t\t\t\t).collect(Collectors.toList());\r\n\t}", "public void obtener() {\r\n \t\r\n \tif (raiz!=null)\r\n {\r\n int informacion = raiz.dato;\r\n raiz = raiz.sig;\r\n end = raiz;\r\n System.out.println(\"Obtenemos el dato de la cima: \"+informacion);\r\n }\r\n else\r\n {\r\n System.out.println(\"No hay datos en la pila\");\r\n }\r\n }", "public static List<ViajeEntidad> getListaViajesEntidad(){\n List<ViajeEntidad> viajes = new ArrayList<>();\n Date date = new Date();\n ViajeEntidadPK viajePK = new ViajeEntidadPK();\n TaxiEntidad taxiByPkPlacaTaxi = new TaxiEntidad();\n ClienteEntidad clienteByPkCorreoCliente = new ClienteEntidad();\n clienteByPkCorreoCliente.setPkCorreoUsuario(\"gerente11@gerente.com\");\n TaxistaEntidad taxistaByCorreoTaxi = new TaxistaEntidad();\n taxistaByCorreoTaxi.setPkCorreoUsuario(\"gerente11@gerente.com\");\n OperadorEntidad agendaOperador = new OperadorEntidad();\n agendaOperador.setPkCorreoUsuario(\"gerente11@gerente.com\");\n\n viajePK.setPkPlacaTaxi(\"CCC11\");\n viajePK.setPkFechaInicio(\"2019-01-01 01:01:01\");\n viajes.add(new ViajeEntidad(viajePK, \"2019-01-01 02:01:01\",\"5000\", 2, \"origen\",\"destino\", \"agenda\", \"agenda2\", taxiByPkPlacaTaxi, clienteByPkCorreoCliente, taxistaByCorreoTaxi, agendaOperador));\n viajePK.setPkPlacaTaxi(\"DDD11\");\n viajes.add(new ViajeEntidad(viajePK, \"2019-01-01 02:01:01\",\"5000\", 2, \"origen\",\"destino\", \"agenda\", \"agenda2\", taxiByPkPlacaTaxi, clienteByPkCorreoCliente, taxistaByCorreoTaxi, agendaOperador));\n viajePK.setPkPlacaTaxi(\"EEE11\");\n viajes.add(new ViajeEntidad(viajePK, \"2019-01-01 02:01:01\",\"5000\", 2, \"origen\",\"destino\", \"agenda\", \"agenda2\", taxiByPkPlacaTaxi, clienteByPkCorreoCliente, taxistaByCorreoTaxi, agendaOperador));\n\n return viajes;\n }", "public datosTaller() {\n this.cedulaCliente = new int[100]; //Atributo de la clase\n this.nombreCliente = new String[100]; //Atributo de la clase\n this.compraRealizada = new String[100]; //Atributo de la clase\n this.valorCompra = new float[100]; //Atributo de la clase\n this.posicionActual = 0; //Inicializacion de la posicion en la que se almacenan datos\n }", "private static void statistique(){\n\t\tfor(int i = 0; i<7; i++){\n\t\t\tfor(int j = 0; j<7; j++){\n\t\t\t\tfor(int l=0; l<jeu.getJoueurs().length; l++){\n\t\t\t\t\tif(jeu.cases[i][j].getCouleurTapis() == jeu.getJoueurs()[l].getNumJoueur()){\n\t\t\t\t\t\tjeu.getJoueurs()[l].setTapis(jeu.getJoueurs()[l].getTapisRest()+1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tJoueur j;\n\t\tSystem.out.println(\"// Fin de la partie //\");\n\t\tfor(int i=0; i<jeu.getJoueurs().length; i++) {\n\t\t\tj =jeu.getJoueurs()[i];\n\t\t\tSystem.out.println(\"Joueur \"+ (j.getNumJoueur()+1) + \" a obtenue \"+j.getTapisRest()+j.getMonnaie()+\" points\" );\n\t\t}\n\t}", "private void getObsequios(){\n mObsequios = estudioAdapter.getListaObsequiosSinEnviar();\n //ca.close();\n }", "private void getPTs(){\n mPyTs = estudioAdapter.getListaPesoyTallasSinEnviar();\n //ca.close();\n }", "public void mostrarDatos(Object obj) throws Exception {\r\n\t\tHis_parto his_parto = (His_parto) obj;\r\n\t\ttry {\r\n\t\t\ttbxCodigo_historia.setValue(his_parto.getCodigo_historia());\r\n\t\t\tdtbxFecha_inicial.setValue(his_parto.getFecha_inicial());\r\n\r\n\t\t\tPaciente paciente = new Paciente();\r\n\t\t\tpaciente.setCodigo_empresa(his_parto.getCodigo_empresa());\r\n\t\t\tpaciente.setCodigo_sucursal(his_parto.getCodigo_sucursal());\r\n\t\t\tpaciente.setNro_identificacion(his_parto.getIdentificacion());\r\n\t\t\tpaciente = getServiceLocator().getPacienteService().consultar(\r\n\t\t\t\t\tpaciente);\r\n\r\n\t\t\tElemento elemento = new Elemento();\r\n\t\t\telemento.setCodigo(paciente.getSexo());\r\n\t\t\telemento.setTipo(\"sexo\");\r\n\t\t\telemento = getServiceLocator().getElementoService().consultar(\r\n\t\t\t\t\telemento);\r\n\r\n\t\t\ttbxIdentificacion.setValue(his_parto.getIdentificacion());\r\n\t\t\ttbxNomPaciente.setValue((paciente != null ? paciente.getNombre1()\r\n\t\t\t\t\t+ \" \" + paciente.getApellido1() : \"\"));\r\n\t\t\ttbxTipoIdentificacion.setValue((paciente != null ? paciente\r\n\t\t\t\t\t.getTipo_identificacion() : \"\"));\r\n\t\t\ttbxEdad.setValue(Util.getEdad(new java.text.SimpleDateFormat(\r\n\t\t\t\t\t\"dd/MM/yyyy\").format(paciente.getFecha_nacimiento()),\r\n\t\t\t\t\tpaciente.getUnidad_medidad(), false));\r\n\t\t\ttbxSexo.setValue((elemento != null ? elemento.getDescripcion() : \"\"));\r\n\t\t\tdbxNacimiento.setValue(paciente.getFecha_nacimiento());\r\n\t\t\ttbxDireccion.setValue(paciente.getDireccion());\r\n\r\n\t\t\tAdministradora administradora = new Administradora();\r\n\t\t\tadministradora.setCodigo(paciente.getCodigo_administradora());\r\n\t\t\tadministradora = getServiceLocator().getAdministradoraService()\r\n\t\t\t\t\t.consultar(administradora);\r\n\r\n\t\t\ttbxCodigo_eps.setValue(administradora != null ? administradora\r\n\t\t\t\t\t.getCodigo() : \"\");\r\n\t\t\ttbxNombre_eps.setValue(administradora != null ? administradora\r\n\t\t\t\t\t.getNombre() : \"\");\r\n\r\n\t\t\tContratos contratos = new Contratos();\r\n\t\t\tcontratos.setCodigo_empresa(his_parto.getCodigo_empresa());\r\n\t\t\tcontratos.setCodigo_sucursal(his_parto.getCodigo_sucursal());\r\n\t\t\tcontratos.setCodigo_administradora(paciente.getCodigo_administradora());\r\n//\t\t\tcontratos.setId_plan(paciente.getId_plan());\r\n\t\t\tcontratos = getServiceLocator().getContratosService().consultar(contratos);\r\n\r\n\t\t\ttbxCodigo_contrato.setValue(contratos != null ? contratos.getId_plan()\r\n\t\t\t\t\t: \"\");\r\n\t\t\ttbxContrato.setValue(contratos != null ? contratos.getNombre() : \"\");\r\n\r\n\t\t\tfor (int i = 0; i < lbxCodigo_dpto.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxCodigo_dpto.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(paciente.getCodigo_dpto())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxCodigo_dpto.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tlistarMunicipios(lbxCodigo_municipio, lbxCodigo_dpto);\r\n\r\n\t\t\ttbxConyugue.setValue(his_parto.getConyugue());\r\n\t\t\ttbxId_conyugue.setValue(his_parto.getId_conyugue());\r\n\t\t\ttbxEdad_conyugue.setValue(his_parto.getEdad_conyugue());\r\n\r\n\t\t\tNivel_educativo nivel_educativo = new Nivel_educativo();\r\n\t\t\tnivel_educativo.setId(his_parto.getEscolaridad_conyugue());\r\n\t\t\tnivel_educativo = getServiceLocator().getNivel_educativoService()\r\n\t\t\t\t\t.consultar(nivel_educativo);\r\n\t\t\ttbxEscolaridad_nombre\r\n\t\t\t\t\t.setValue(nivel_educativo != null ? nivel_educativo\r\n\t\t\t\t\t\t\t.getNombre() : \"\");\r\n\t\t\ttbxEscolaridad_conyugue\r\n\t\t\t\t\t.setValue(nivel_educativo != null ? nivel_educativo.getId()\r\n\t\t\t\t\t\t\t: \"\");\r\n\r\n\t\t\ttbxMotivo.setValue(his_parto.getMotivo());\r\n\t\t\ttbxEnfermedad_actual.setValue(his_parto.getEnfermedad_actual());\r\n\t\t\ttbxAntecedentes_familiares.setValue(his_parto\r\n\t\t\t\t\t.getAntecedentes_familiares());\r\n\t\t\tRadio radio = (Radio) rdbPreeclampsia.getFellow(\"Preeclampsia\"\r\n\t\t\t\t\t+ his_parto.getPreeclampsia());\r\n\t\t\tradio.setChecked(true);\r\n\t\t\tRadio radio1 = (Radio) rdbHipertension.getFellow(\"Hipertension\"\r\n\t\t\t\t\t+ his_parto.getHipertension());\r\n\t\t\tradio1.setChecked(true);\r\n\t\t\tRadio radio2 = (Radio) rdbEclampsia.getFellow(\"Eclampsia\"\r\n\t\t\t\t\t+ his_parto.getEclampsia());\r\n\t\t\tradio2.setChecked(true);\r\n\t\t\tRadio radio3 = (Radio) rdbH1.getFellow(\"H1\" + his_parto.getH1());\r\n\t\t\tradio3.setChecked(true);\r\n\t\t\tRadio radio4 = (Radio) rdbH2.getFellow(\"H2\" + his_parto.getH2());\r\n\t\t\tradio4.setChecked(true);\r\n\t\t\tRadio radio5 = (Radio) rdbPostimadurez.getFellow(\"Postimadurez\"\r\n\t\t\t\t\t+ his_parto.getPostimadurez());\r\n\t\t\tradio5.setChecked(true);\r\n\t\t\tRadio radio6 = (Radio) rdbRot_pre.getFellow(\"Rot_pre\"\r\n\t\t\t\t\t+ his_parto.getRot_pre());\r\n\t\t\tradio6.setChecked(true);\r\n\t\t\tRadio radio7 = (Radio) rdbPolihidramnios.getFellow(\"Polihidramnios\"\r\n\t\t\t\t\t+ his_parto.getPolihidramnios());\r\n\t\t\tradio7.setChecked(true);\r\n\t\t\tRadio radio8 = (Radio) rdbRcui.getFellow(\"Rcui\"\r\n\t\t\t\t\t+ his_parto.getRcui());\r\n\t\t\tradio8.setChecked(true);\r\n\t\t\tRadio radio9 = (Radio) rdbPelvis.getFellow(\"Pelvis\"\r\n\t\t\t\t\t+ his_parto.getPelvis());\r\n\t\t\tradio9.setChecked(true);\r\n\t\t\tRadio radio10 = (Radio) rdbFeto_macrosonico\r\n\t\t\t\t\t.getFellow(\"Feto_macrosonico\"\r\n\t\t\t\t\t\t\t+ his_parto.getFeto_macrosonico());\r\n\t\t\tradio10.setChecked(true);\r\n\t\t\tRadio radio11 = (Radio) rdbIsoinmunizacion\r\n\t\t\t\t\t.getFellow(\"Isoinmunizacion\"\r\n\t\t\t\t\t\t\t+ his_parto.getIsoinmunizacion());\r\n\t\t\tradio11.setChecked(true);\r\n\t\t\tRadio radio12 = (Radio) rdbAo.getFellow(\"Ao\" + his_parto.getAo());\r\n\t\t\tradio12.setChecked(true);\r\n\t\t\tRadio radio13 = (Radio) rdbCirc_cordon.getFellow(\"Circ_cordon\"\r\n\t\t\t\t\t+ his_parto.getCirc_cordon());\r\n\t\t\tradio13.setChecked(true);\r\n\t\t\tRadio radio14 = (Radio) rdbPostparto.getFellow(\"Postparto\"\r\n\t\t\t\t\t+ his_parto.getPostparto());\r\n\t\t\tradio14.setChecked(true);\r\n\t\t\tRadio radio15 = (Radio) rdbDiabetes.getFellow(\"Diabetes\"\r\n\t\t\t\t\t+ his_parto.getDiabetes());\r\n\t\t\tradio15.setChecked(true);\r\n\t\t\tRadio radio16 = (Radio) rdbCardiopatia.getFellow(\"Cardiopatia\"\r\n\t\t\t\t\t+ his_parto.getCardiopatia());\r\n\t\t\tradio16.setChecked(true);\r\n\t\t\tRadio radio17 = (Radio) rdbAnemias.getFellow(\"Anemias\"\r\n\t\t\t\t\t+ his_parto.getAnemias());\r\n\t\t\tradio17.setChecked(true);\r\n\t\t\tRadio radio18 = (Radio) rdbEnf_autoinmunes\r\n\t\t\t\t\t.getFellow(\"Enf_autoinmunes\"\r\n\t\t\t\t\t\t\t+ his_parto.getEnf_autoinmunes());\r\n\t\t\tradio18.setChecked(true);\r\n\t\t\tRadio radio19 = (Radio) rdbEnf_renales.getFellow(\"Enf_renales\"\r\n\t\t\t\t\t+ his_parto.getEnf_renales());\r\n\t\t\tradio19.setChecked(true);\r\n\t\t\tRadio radio20 = (Radio) rdbInf_urinaria.getFellow(\"Inf_urinaria\"\r\n\t\t\t\t\t+ his_parto.getInf_urinaria());\r\n\t\t\tradio20.setChecked(true);\r\n\t\t\tRadio radio21 = (Radio) rdbEpilepsia.getFellow(\"Epilepsia\"\r\n\t\t\t\t\t+ his_parto.getEpilepsia());\r\n\t\t\tradio21.setChecked(true);\r\n\t\t\tRadio radio22 = (Radio) rdbTbc\r\n\t\t\t\t\t.getFellow(\"Tbc\" + his_parto.getTbc());\r\n\t\t\tradio22.setChecked(true);\r\n\t\t\tRadio radio23 = (Radio) rdbMiomas.getFellow(\"Miomas\"\r\n\t\t\t\t\t+ his_parto.getMiomas());\r\n\t\t\tradio23.setChecked(true);\r\n\t\t\tRadio radio24 = (Radio) rdbHb.getFellow(\"Hb\" + his_parto.getHb());\r\n\t\t\tradio24.setChecked(true);\r\n\t\t\tRadio radio25 = (Radio) rdbFumadora.getFellow(\"Fumadora\"\r\n\t\t\t\t\t+ his_parto.getFumadora());\r\n\t\t\tradio25.setChecked(true);\r\n\t\t\tRadio radio26 = (Radio) rdbInf_puerperal.getFellow(\"Inf_puerperal\"\r\n\t\t\t\t\t+ his_parto.getInf_puerperal());\r\n\t\t\tradio26.setChecked(true);\r\n\t\t\tRadio radio27 = (Radio) rdbInfertilidad.getFellow(\"Infertilidad\"\r\n\t\t\t\t\t+ his_parto.getInfertilidad());\r\n\t\t\tradio27.setChecked(true);\r\n\t\t\ttbxMenarquia.setValue(his_parto.getMenarquia());\r\n\t\t\ttbxCiclos.setValue(his_parto.getCiclos());\r\n\t\t\ttbxVida_marital.setValue(his_parto.getVida_marital());\r\n\t\t\ttbxVida_obstetrica.setValue(his_parto.getVida_obstetrica());\r\n\t\t\tfor (int i = 0; i < lbxNo_gestaciones.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxNo_gestaciones.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_parto.getNo_gestaciones())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxNo_gestaciones.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < lbxParto.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxParto.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString().equals(his_parto.getParto())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxParto.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < lbxAborto.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxAborto.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_parto.getAborto())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxAborto.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < lbxCesarias.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxCesarias.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_parto.getCesarias())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxCesarias.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tdtbxFecha_um.setValue(his_parto.getFecha_um());\r\n\t\t\ttbxUm.setValue(his_parto.getUm());\r\n\t\t\ttbxFep.setValue(his_parto.getFep());\r\n\t\t\tfor (int i = 0; i < lbxGemerales.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxGemerales.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_parto.getGemerales())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxGemerales.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < lbxMalformados.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxMalformados.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_parto.getMalformados())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxMalformados.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < lbxNacidos_vivos.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxNacidos_vivos.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_parto.getNacidos_vivos())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxNacidos_vivos.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < lbxNacidos_muertos.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxNacidos_muertos.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_parto.getNacidos_muertos())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxNacidos_muertos.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < lbxPreterminos.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxPreterminos.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_parto.getPreterminos())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxPreterminos.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tchbMedico.setChecked(his_parto.getMedico());\r\n\t\t\tchbEnfermera.setChecked(his_parto.getEnfermera());\r\n\t\t\tchbAuxiliar.setChecked(his_parto.getAuxiliar());\r\n\t\t\tchbPartera.setChecked(his_parto.getPartera());\r\n\t\t\tchbOtros.setChecked(his_parto.getOtros());\r\n\t\t\tRadio radio28 = (Radio) rdbControlado.getFellow(\"Controlado\"\r\n\t\t\t\t\t+ his_parto.getControlado());\r\n\t\t\tradio28.setChecked(true);\r\n\t\t\tRadio radio29 = (Radio) rdbLugar_consulta\r\n\t\t\t\t\t.getFellow(\"Lugar_consulta\" + his_parto.getLugar_consulta());\r\n\t\t\tradio29.setChecked(true);\r\n\t\t\tfor (int i = 0; i < lbxNo_consultas.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxNo_consultas.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_parto.getNo_consultas())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxNo_consultas.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tchbEspecialistas.setChecked(his_parto.getEspecialistas());\r\n\t\t\tchbGeneral.setChecked(his_parto.getGeneral());\r\n\t\t\tchbPartera_consulta.setChecked(his_parto.getPartera_consulta());\r\n\t\t\tRadio radio30 = (Radio) rdbSangrado_vaginal\r\n\t\t\t\t\t.getFellow(\"Sangrado_vaginal\"\r\n\t\t\t\t\t\t\t+ his_parto.getSangrado_vaginal());\r\n\t\t\tradio30.setChecked(true);\r\n\t\t\tRadio radio31 = (Radio) rdbCefalias.getFellow(\"Cefalias\"\r\n\t\t\t\t\t+ his_parto.getCefalias());\r\n\t\t\tradio31.setChecked(true);\r\n\t\t\tRadio radio32 = (Radio) rdbEdema.getFellow(\"Edema\"\r\n\t\t\t\t\t+ his_parto.getEdema());\r\n\t\t\tradio32.setChecked(true);\r\n\t\t\tRadio radio33 = (Radio) rdbEpigastralgia.getFellow(\"Epigastralgia\"\r\n\t\t\t\t\t+ his_parto.getEpigastralgia());\r\n\t\t\tradio33.setChecked(true);\r\n\t\t\tRadio radio34 = (Radio) rdbVomitos.getFellow(\"Vomitos\"\r\n\t\t\t\t\t+ his_parto.getVomitos());\r\n\t\t\tradio34.setChecked(true);\r\n\t\t\tRadio radio35 = (Radio) rdbTinutus.getFellow(\"Tinutus\"\r\n\t\t\t\t\t+ his_parto.getTinutus());\r\n\t\t\tradio35.setChecked(true);\r\n\t\t\tRadio radio36 = (Radio) rdbEscotomas.getFellow(\"Escotomas\"\r\n\t\t\t\t\t+ his_parto.getEscotomas());\r\n\t\t\tradio36.setChecked(true);\r\n\t\t\tRadio radio37 = (Radio) rdbInfeccion_urinaria\r\n\t\t\t\t\t.getFellow(\"Infeccion_urinaria\"\r\n\t\t\t\t\t\t\t+ his_parto.getInfeccion_urinaria());\r\n\t\t\tradio37.setChecked(true);\r\n\t\t\tRadio radio38 = (Radio) rdbInfeccion_vaginal\r\n\t\t\t\t\t.getFellow(\"Infeccion_vaginal\"\r\n\t\t\t\t\t\t\t+ his_parto.getInfeccion_vaginal());\r\n\t\t\tradio38.setChecked(true);\r\n\t\t\ttbxOtros_embarazo.setValue(his_parto.getOtros_embarazo());\r\n\t\t\ttbxCardiaca.setValue(his_parto.getCardiaca());\r\n\t\t\ttbxRespiratoria.setValue(his_parto.getRespiratoria());\r\n\t\t\ttbxPeso.setValue(his_parto.getPeso());\r\n\t\t\ttbxTalla.setValue(his_parto.getTalla());\r\n\t\t\ttbxTempo.setValue(his_parto.getTempo());\r\n\t\t\ttbxPresion.setValue(his_parto.getPresion());\r\n\t\t\ttbxPresion2.setValue(his_parto.getPresion2());\r\n\t\t\ttbxInd_masa.setValue(his_parto.getInd_masa());\r\n\t\t\ttbxSus_masa.setValue(his_parto.getSus_masa());\r\n\t\t\ttbxCabeza_cuello.setValue(his_parto.getCabeza_cuello());\r\n\t\t\ttbxCardiovascular.setValue(his_parto.getCardiovascular());\r\n\t\t\ttbxMamas.setValue(his_parto.getMamas());\r\n\t\t\ttbxPulmones.setValue(his_parto.getPulmones());\r\n\t\t\ttbxAbdomen.setValue(his_parto.getAbdomen());\r\n\t\t\ttbxUterina.setValue(his_parto.getUterina());\r\n\t\t\ttbxSituacion.setValue(his_parto.getSituacion());\r\n\t\t\ttbxPresentacion.setValue(his_parto.getPresentacion());\r\n\t\t\ttbxV_presentacion.setValue(his_parto.getV_presentacion());\r\n\t\t\ttbxPosicion.setValue(his_parto.getPosicion());\r\n\t\t\ttbxV_posicion.setValue(his_parto.getV_posicion());\r\n\t\t\ttbxC_uterina.setValue(his_parto.getC_uterina());\r\n\t\t\ttbxTono.setValue(his_parto.getTono());\r\n\t\t\ttbxFcf.setValue(his_parto.getFcf());\r\n\t\t\ttbxGenitales.setValue(his_parto.getGenitales());\r\n\t\t\ttbxDilatacion.setValue(his_parto.getDilatacion());\r\n\t\t\ttbxBorramiento.setValue(his_parto.getBorramiento());\r\n\t\t\ttbxEstacion.setValue(his_parto.getEstacion());\r\n\t\t\ttbxMembranas.setValue(his_parto.getMembranas());\r\n\t\t\ttbxExtremidades.setValue(his_parto.getExtremidades());\r\n\t\t\ttbxSnc.setValue(his_parto.getSnc());\r\n\t\t\ttbxObservacion.setValue(his_parto.getObservacion());\r\n\t\t\tfor (int i = 0; i < lbxFinalidad_cons.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxFinalidad_cons.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_parto.getFinalidad_cons())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxFinalidad_cons.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tseleccionarProgramaPyp();\r\n\r\n\t\t\tfor (int i = 0; i < lbxCausas_externas.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxCausas_externas.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_parto.getCausas_externas())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxCausas_externas.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < lbxCodigo_consulta_pyp.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxCodigo_consulta_pyp.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_parto.getCodigo_consulta_pyp())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxCodigo_consulta_pyp.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < lbxTipo_disnostico.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxTipo_disnostico.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_parto.getTipo_disnostico())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxTipo_disnostico.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tCie cie = new Cie();\r\n\t\t\tcie.setCodigo(his_parto.getTipo_principal());\r\n\t\t\t//log.info(\"antes: \" + cie);\r\n\t\t\tcie = getServiceLocator().getServicio(GeneralExtraService.class).consultar(cie);\r\n\t\t\t//log.info(\"despues: \" + cie);\r\n\t\t\ttbxTipo_principal.setValue(his_parto.getTipo_principal());\r\n\t\t\ttbxNomDx.setValue((cie != null ? cie.getNombre() : \"\"));\r\n\r\n\t\t\t/* relacionado 1 */\r\n\t\t\tcie = new Cie();\r\n\t\t\tcie.setCodigo(his_parto.getTipo_relacionado_1());\r\n\t\t\t//log.info(\"antes: \" + cie);\r\n\t\t\tcie = getServiceLocator().getServicio(GeneralExtraService.class).consultar(cie);\r\n\t\t\t//log.info(\"despues: \" + cie);\r\n\r\n\t\t\ttbxTipo_relacionado_1.setValue(his_parto.getTipo_relacionado_1());\r\n\t\t\ttbxNomDxRelacionado_1\r\n\t\t\t\t\t.setValue((cie != null ? cie.getNombre() : \"\"));\r\n\r\n\t\t\t/* relacionado 2 */\r\n\t\t\tcie = new Cie();\r\n\t\t\tcie.setCodigo(his_parto.getTipo_relacionado_2());\r\n\t\t\t//log.info(\"antes: \" + cie);\r\n\t\t\tcie = getServiceLocator().getServicio(GeneralExtraService.class).consultar(cie);\r\n\t\t\t//log.info(\"despues: \" + cie);\r\n\r\n\t\t\ttbxTipo_relacionado_2.setValue(his_parto.getTipo_relacionado_2());\r\n\t\t\ttbxNomDxRelacionado_2\r\n\t\t\t\t\t.setValue((cie != null ? cie.getNombre() : \"\"));\r\n\r\n\t\t\t/* relacionado 3 */\r\n\t\t\tcie = new Cie();\r\n\t\t\tcie.setCodigo(his_parto.getTipo_relacionado_3());\r\n\t\t\t//log.info(\"antes: \" + cie);\r\n\t\t\tcie = getServiceLocator().getServicio(GeneralExtraService.class).consultar(cie);\r\n\t\t\t//log.info(\"despues: \" + cie);\r\n\r\n\t\t\ttbxTipo_relacionado_3.setValue(his_parto.getTipo_relacionado_3());\r\n\t\t\ttbxNomDxRelacionado_3\r\n\t\t\t\t\t.setValue((cie != null ? cie.getNombre() : \"\"));\r\n\r\n\t\t\ttbxTratamiento.setValue(his_parto.getTratamiento());\r\n\r\n\t\t\t// Mostramos la vista //\r\n\t\t\ttbxAccion.setText(\"modificar\");\r\n\t\t\taccionForm(true, tbxAccion.getText());\r\n\t\t} catch (Exception e) {\r\n\t\t\t\r\n\t\t\tlog.error(e.getMessage(), e);\r\n\t\t\tMessagebox.show(\"Este dato no se puede editar\", \"Error !!\",\r\n\t\t\t\t\tMessagebox.OK, Messagebox.ERROR);\r\n\t\t}\r\n\t}", "private void datosVehiculo(boolean esta_en_revista) {\n\t\ttry{\n\t\t\t String Sjson= Utils.doHttpConnection(\"http://datos.labplc.mx/movilidad/vehiculos/\"+placa+\".json\");\n\t\t\t JSONObject json= (JSONObject) new JSONTokener(Sjson).nextValue();\n\t\t\t JSONObject json2 = json.getJSONObject(\"consulta\");\n\t\t\t JSONObject jsonResponse = new JSONObject(json2.toString());\n\t\t\t JSONObject sys = jsonResponse.getJSONObject(\"tenencias\");\n\t\t\t \n\t\t\t if(sys.getString(\"tieneadeudos\").toString().equals(\"0\")){\n\t\t\t \tautoBean.setDescripcion_tenencia(getResources().getString(R.string.sin_adeudo_tenencia));\n\t\t\t \tautoBean.setImagen_teencia(imagen_verde);\n\t\t\t }else{\n\t\t\t \tautoBean.setDescripcion_tenencia(getResources().getString(R.string.con_adeudo_tenencia));\n\t\t\t \tautoBean.setImagen_teencia(imagen_rojo);\n\t\t\t \tPUNTOS_APP-=PUNTOS_TENENCIA;\n\t\t\t }\n\t\t\t \n\t\t\t JSONArray cast = jsonResponse.getJSONArray(\"infracciones\");\n\t\t\t String situacion;\n\t\t\t boolean hasInfraccion=false;\n\t\t\t for (int i=0; i<cast.length(); i++) {\n\t\t\t \tJSONObject oneObject = cast.getJSONObject(i);\n\t\t\t\t\t\t try {\n\t\t\t\t\t\t\t situacion = (String) oneObject.getString(\"situacion\");\n\t\t\t\t\t\t\t if(!situacion.equals(\"Pagada\")){\n\t\t\t\t\t\t\t\t hasInfraccion=true;\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t } catch (JSONException e) { \n\t\t\t\t\t\t\t DatosLogBean.setDescripcion(Utils.getStackTrace(e));\n\t\t\t\t\t\t }\n\t\t\t }\n\t\t\t if(hasInfraccion){\n\t\t\t \t autoBean.setDescripcion_infracciones(getResources().getString(R.string.tiene_infraccion));\n\t\t\t\t \tautoBean.setImagen_infraccones(imagen_rojo);\n\t\t\t\t \tPUNTOS_APP-=PUNTOS_INFRACCIONES;\n\t\t\t }else{\n\t\t\t \t autoBean.setDescripcion_infracciones(getResources().getString(R.string.no_tiene_infraccion));\n\t\t\t\t autoBean.setImagen_infraccones(imagen_verde);\n\t\t\t }\n\t\t\t JSONArray cast2 = jsonResponse.getJSONArray(\"verificaciones\");\n\t\t\t if(cast2.length()==0){\n\t\t\t \t autoBean.setDescripcion_verificacion(getResources().getString(R.string.no_tiene_verificaciones));\n\t\t\t\t\t autoBean.setImagen_verificacion(imagen_rojo);\n\t\t\t\t\t PUNTOS_APP-=PUNTOS_VERIFICACION;\n\t\t\t }\n\t\t\t\t\t Date lm = new Date();\n\t\t\t\t\t String lasmod = new SimpleDateFormat(\"yyyy-MM-dd\").format(lm);\n\t\t\t\t\t SimpleDateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\t\t\t\tBoolean yaValide=true;\n\t\t\t\t for (int i=0; i<cast2.length(); i++) {\n\t\t\t\t \tJSONObject oneObject = cast2.getJSONObject(i);\n\t\t\t\t\t\t\t try {\n\t\t\t\t\t\t\t\t\tif(!esta_en_revista&&yaValide){\n\t\t\t\t\t\t\t\t\t\t autoBean.setMarca((String) oneObject.getString(\"marca\"));\n\t\t\t\t\t\t\t\t\t\t autoBean.setSubmarca((String) oneObject.getString(\"submarca\"));\n\t\t\t\t\t\t\t\t\t\t autoBean.setAnio((String) oneObject.getString(\"modelo\"));\n\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t autoBean.setDescripcion_revista(getResources().getString(R.string.sin_revista));\n\t\t\t\t\t\t\t\t\t\t autoBean.setImagen_revista(imagen_rojo);\n\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t Calendar calendar = Calendar.getInstance();\n\t\t\t\t\t\t\t\t\t\t int thisYear = calendar.get(Calendar.YEAR);\n\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t if(thisYear-Integer.parseInt(autoBean.getAnio())<=10){\n\t\t\t\t\t\t\t\t\t\t\t autoBean.setDescripcion_vehiculo(getResources().getString(R.string.carro_nuevo)+\" \"+getResources().getString(R.string.Anio)+\" \"+autoBean.getAnio());\n\t\t\t\t\t\t\t\t\t\t\t autoBean.setImagen_vehiculo(imagen_verde);\n\t\t\t\t\t\t\t\t\t\t }else{\n\t\t\t\t\t\t\t\t\t\t\t autoBean.setDescripcion_vehiculo(getResources().getString(R.string.carro_viejo)+\" \"+getResources().getString(R.string.Anio)+\" \"+autoBean.getAnio());\n\t\t\t\t\t\t\t\t\t\t\t autoBean.setImagen_vehiculo(imagen_rojo);\n\t\t\t\t\t\t\t\t\t\t\t PUNTOS_APP-=PUNTOS_ANIO_VEHICULO;\n\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t yaValide=false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t Date date1 = formatter.parse(lasmod);\n\t\t\t\t\t\t\t\t Date date2 = formatter.parse(oneObject.getString(\"vigencia\").toString());\n\t\t\t\t\t\t\t\t int comparison = date2.compareTo(date1);\n\t\t\t\t\t\t\t\t if((comparison==1||comparison==0)&&!oneObject.getString(\"resultado\").toString().equals(\"RECHAZO\")){\n\t\t\t\t\t\t\t\t\t autoBean.setDescripcion_verificacion(getResources().getString(R.string.tiene_verificaciones)+\" \"+oneObject.getString(\"resultado\").toString());\n\t\t\t\t\t\t\t\t\t autoBean.setImagen_verificacion(imagen_verde); \n\t\t\t\t\t\t\t\t\t hasVerificacion=true;\n\t\t\t\t\t\t\t\t\t break;\n\t\t\t\t\t\t\t\t }else{\n\t\t\t\t\t\t\t\t\t autoBean.setDescripcion_verificacion(getResources().getString(R.string.no_tiene_verificaciones));\n\t\t\t\t\t\t\t\t\t autoBean.setImagen_verificacion(imagen_rojo);\n\t\t\t\t\t\t\t\t\t hasVerificacion=false;\n\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t } catch (JSONException e) { \n\t\t\t\t\t\t\t\t DatosLogBean.setDescripcion(Utils.getStackTrace(e));\n\t\t\t\t\t\t\t } catch (ParseException e) {\n\t\t\t\t\t\t\t\t DatosLogBean.setDescripcion(Utils.getStackTrace(e));\n\t\t\t\t\t\t\t}\n\t\t\t\t }\n\t\t\t\t if(!hasVerificacion){\n\t\t\t\t \t PUNTOS_APP-=PUNTOS_VERIFICACION;\n\t\t\t\t }\n\t\t\t \n\t\t\t}catch(JSONException e){\n\t\t\t\tDatosLogBean.setDescripcion(Utils.getStackTrace(e));\n\t\t\t}\n\t\t\n\t}", "public void buscarDatos() throws Exception {\n\t\ttry {\n\t\t\tString parameter = lbxParameter.getSelectedItem().getValue()\n\t\t\t\t\t.toString();\n\t\t\tString value = tbxValue.getValue().toUpperCase().trim();\n\n\t\t\tMap<String, Object> parameters = new HashMap<String, Object>();\n\t\t\tparameters.put(\"codigo_empresa\", codigo_empresa);\n\t\t\tparameters.put(\"codigo_sucursal\", codigo_sucursal);\n\n\t\t\tif (admision != null) {\n\t\t\t\tparameters.put(\"identificacion\",\n\t\t\t\t\t\tadmision.getNro_identificacion());\n\t\t\t}\n\n\t\t\tif (parameter.equalsIgnoreCase(\"fecha_inicial\")) {\n\t\t\t\tparameters.put(\"fecha_string\", value);\n\t\t\t} else {\n\t\t\t\tparameters.put(\"parameter\", parameter);\n\t\t\t\tparameters.put(\"value\", \"%\" + value + \"%\");\n\t\t\t}\n\n\t\t\tgetServiceLocator().getHisc_urgencia_odontologicoService()\n\t\t\t\t\t.setLimit(\"limit 25 offset 0\");\n\n\t\t\tList<Hisc_urgencia_odontologico> lista_datos = getServiceLocator()\n\t\t\t\t\t.getHisc_urgencia_odontologicoService().listar(parameters);\n\t\t\trowsResultado.getChildren().clear();\n\n\t\t\tfor (Hisc_urgencia_odontologico hisc_urgencia_odontologico : lista_datos) {\n\t\t\t\trowsResultado.appendChild(crearFilas(\n\t\t\t\t\t\thisc_urgencia_odontologico, this));\n\t\t\t}\n\n\t\t\tgridResultado.setVisible(true);\n\t\t\tgridResultado.setMold(\"paging\");\n\t\t\tgridResultado.setPageSize(20);\n\n\t\t\tgridResultado.applyProperties();\n\t\t\tgridResultado.invalidate();\n\n\t\t} catch (Exception e) {\n\t\t\tMensajesUtil.mensajeError(e, \"\", this);\n\t\t}\n\t}", "public void filtrarOfertas() {\n\n List<OfertaDisciplina> ofertas;\n \n ofertas = ofertaDisciplinaFacade.filtrarEixoCursoTurnoCampusQuad(getFiltrosSelecEixos(), getFiltrosSelecCursos(), turno, campus, quadrimestre);\n\n dataModel = new OfertaDisciplinaDataModel(ofertas);\n \n //Após filtrar volta os parametros para os valores default\n setFiltrosSelecEixos(null);\n setFiltrosSelecCursos(null);\n turno = \"\";\n quadrimestre = 0;\n campus = \"\";\n }", "private void getTiempo() {\n\t\ttry {\n\t\t\tStringBuilder url = new StringBuilder(URL_TIME);\n\t\t\tHttpGet get = new HttpGet(url.toString());\n\t\t\tHttpResponse r = client.execute(get);\n\t\t\tint status = r.getStatusLine().getStatusCode();\n\t\t\tif (status == 200) {\n\t\t\t\tHttpEntity e = r.getEntity();\n\t\t\t\tInputStream webs = e.getContent();\n\t\t\t\ttry {\n\t\t\t\t\tBufferedReader reader = new BufferedReader(\n\t\t\t\t\t\t\tnew InputStreamReader(webs, \"iso-8859-1\"), 8);\n\t\t\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\t\t\tString line = null;\n\t\t\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\t\t\tsb.append(line + \"\\n\");\n\t\t\t\t\t}\n\t\t\t\t\twebs.close();\n\t\t\t\t\tSuperTiempo = sb.toString();\n\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\tLog.e(\"log_tag\",\n\t\t\t\t\t\t\t\"Error convirtiendo el resultado\" + e1.toString());\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public ArrayList<EstacionServicio> getListadoEstacionServicio() throws Exception {\n\t\t\t\n\t\t\t\tConnection conn = ds.getConnection();\n\t\t\t\tArrayList<EstacionServicio> lista = new ArrayList<EstacionServicio>();\n\t\t\t\tPreparedStatement stmt = conn.prepareStatement(\"SELECT * FROM ESTACION_SERVICIO\");\n\t\t\t\tResultSet rs = stmt.executeQuery();\n\t\t\t\twhile(rs.next()){\n\t\t\t\t\tlista.add (new EstacionServicio(rs.getInt(1),rs.getString(2),rs.getDate(3),rs.getFloat(4),rs.getFloat(5),rs.getString(6)));\n\t\t\t\t}\n\t\t\t\tif (rs != null) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\trs.close();\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (stmt != null) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tstmt.close();\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\treturn lista;\n\t\t\t}", "public void GetVehiculos() {\n String A = \"&LOCATION=POR_ENTREGAR\";\n String Pahtxml = \"\";\n \n try {\n \n DefaultListModel L1 = new DefaultListModel();\n Pahtxml = Aso.SendGetPlacas(A);\n Lsvehiculo = Aso.Leerxmlpapa(Pahtxml);\n Lsvehiculo.forEach((veh) -> {\n System.out.println(\"Placa : \" + veh.Placa);\n L1.addElement(veh.Placa);\n });\n \n Lista.setModel(L1);\n \n } catch (Exception ex) {\n Logger.getLogger(Entrega.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }", "private void carregaInformacoes() {\n Pessoa pessoa = (Pessoa) getIntent().getExtras().getSerializable(\"pessoa\");\n edtNome.setText(pessoa.getNome());\n edtEmail.setText(pessoa.getEmail());\n edtTelefone.setText(pessoa.getTelefone());\n edtIdade.setText(pessoa.getIdade());\n edtCPF.setText(pessoa.getCpf());\n }", "private void GetAllInfo() {\n\t\tjetztStunde = Integer.parseInt(jetztStdTxt.getText().toString());\n\t\tjetztMinute = Integer.parseInt(jetztMinTxt.getText().toString());\n\n\t\tschlafStunde = Integer.parseInt(schlafStdTxt.getText().toString());\n\t\tschlafMinute = Integer.parseInt(schlafMinTxt.getText().toString());\n\n\t}", "public PanelInformesYEstadisticas() {\r\n\t\tinitComponents();\r\n\t\t//Util.personaSinResultados(lbSinResultados, true);\r\n\t}", "public String obtenerDetalles(){\r\n return \"Nombre: \" + this.nombre + \", sueldo = \" + this.sueldo;\r\n }", "public static ArrayList<Integer> estadisticageneral() {\n\n\t\tArrayList<Integer> mensaje = new ArrayList<>();\n\n\t\tArrayList<Res> resesAntes = ResCRUD.select();\n\t\tArrayList<Res> resess = new ArrayList<>();\n\n\t\t\n\t\tfor (int i = 0; i < resesAntes.size(); i++) {\n\t\t\t\n\t\t\tif (resesAntes.get(i).getVivo()==1) {\n\t\t\t\t\n\t\t\t\tresess.add(resesAntes.get(i));\n\t\t\t}\n\t\t}\t\t\n\n\t\tArrayList<Potrero> potrero = PotreroCRUD.select();\n\n\t\tRes res = null;\n\n\t\tint potreros = potrero.size();\n\t\tint reses = resess.size();\n\t\tint hembras = 0;\n\t\tint machos = 0;\n\t\tint ch = 0;\n\t\tint hl = 0;\n\t\tint nv = 0;\n\t\tint vh = 0;\n\t\tint vp = 0;\n\t\tint cm = 0;\n\t\tint ml = 0;\n\t\tint mc = 0;\n\t\tint tp = 0;\n\n\t\tfor (int i = 0; i < resess.size(); i++) {\n\n\t\t\tres = resess.get(i);\n\n\t\t\tif (res.getGenero().equalsIgnoreCase(\"H\")) {\n\t\t\t\thembras++;\n\n\t\t\t\tswitch (res.getTipo()) {\n\n\t\t\t\tcase \"CH\":\n\n\t\t\t\t\tch++;\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"HL\":\n\n\t\t\t\t\thl++;\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"NV\":\n\n\t\t\t\t\tnv++;\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"VH\":\n\n\t\t\t\t\tvh++;\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"VP\":\n\n\t\t\t\t\tvp++;\n\t\t\t\t\tbreak;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif (res.getGenero().equalsIgnoreCase(\"M\")) {\n\t\t\t\tmachos++;\n\n\t\t\t\tswitch (res.getTipo()) {\n\n\t\t\t\tcase \"CM\":\n\n\t\t\t\t\tcm++;\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"ML\":\n\n\t\t\t\t\tml++;\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"MC\":\n\n\t\t\t\t\tmc++;\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"TP\":\n\n\t\t\t\t\ttp++;\n\n\t\t\t\t\tbreak;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tmensaje.add(potreros);\n\t\tmensaje.add(reses);\n\t\tmensaje.add(hembras);\n\t\tmensaje.add(machos);\n\t\tmensaje.add(ch);\n\t\tmensaje.add(hl);\n\t\tmensaje.add(nv);\n\t\tmensaje.add(vh);\n\t\tmensaje.add(vp);\n\t\tmensaje.add(cm);\n\t\tmensaje.add(ml);\n\t\tmensaje.add(mc);\n\t\tmensaje.add(tp);\n\n\t\treturn mensaje;\n\t}", "public void mostrarDatos() {\r\n System.out.println(\"El nombre del cliente es: \" + this.getNombre());\r\n System.out.println(\"El primer apellido es: \" + this.getPrimerApellido());\r\n System.out.println(\"El segundo apellido es: \" + this.getSegundoApellido());\r\n System.out.println(\"La edad es: \" + this.getEdad());\r\n }", "public void SolicitarDatos() {\n\t\t\r\n\t\tSystem.out.println(\"nombre:\");\r\n\t\tSystem.out.println(\"apellido\");\r\n\t\tSystem.out.println(\"numCedula\");\r\n\t\t\r\n\t}", "public void cargaDatosInicialesSoloParaAdicionDeCuenta() throws Exception {\n GestionContableWrapper gestionContableWrapper = parParametricasService.factoryGestionContable();\n gestionContableWrapper.getNormaContable3();\n parAjustesList = parParametricasService.listaTiposDeAjuste(obtieneEnumTipoAjuste(gestionContableWrapper.getNormaContable3()));\n //Obtien Ajuste Fin\n //Activa formulario para automatico modifica \n if (selectedEntidad.getNivel() >= 3) {\n numeroEspaciadorAdicionar = 260;\n }\n\n if (selectedEntidad.getNivel() == 3) {\n swParAutomatico = false;\n numeroEspaciadorAdicionar = 230;\n }\n if (selectedEntidad.getNivel() == 2) {\n swParAutomatico = true;\n swActivaBoton = true;\n numeroEspaciadorAdicionar = 200;\n }\n if (selectedEntidad.getNivel() == 1) {\n swParAutomatico = true;\n numeroEspaciadorAdicionar = 130;\n cntParametroAutomaticoDeNivel2 = cntParametroAutomaticoService.obtieneObjetoDeParametroAutomatico(selectedEntidad);\n }\n\n mascaraNuevoOpcion = \"N\";\n cntEntidad = (CntEntidad) getCntEntidadesService().find(CntEntidad.class, selectedEntidad.getIdEntidad());\n mascaraNivel = getCntEntidadesService().generaCodigoNivelesSubAndPadre(selectedEntidad, \"N\");\n mascaraSubNivel = getCntEntidadesService().generaCodigoNivelesSubAndPadre(selectedEntidad, \"S\");\n longitudNivel = getCntEntidadesService().controlaLongitudNumero(selectedEntidad, \"N\");\n longitudSubNivel = getCntEntidadesService().controlaLongitudNumero(selectedEntidad, \"S\");\n }", "private void saveDatosVisitasTerreno(String estado) {\n int c = mDatosVisitasTerreno.size();\n for (DatosVisitaTerreno visita : mDatosVisitasTerreno) {\n visita.getMovilInfo().setEstado(estado);\n estudioAdapter.updateDatosVisitasSent(visita);\n publishProgress(\"Actualizando Datos Visitas\", Integer.valueOf(mDatosVisitasTerreno.indexOf(visita)).toString(), Integer\n .valueOf(c).toString());\n }\n //actualizar.close();\n }", "public void tipoDatos() {\n\t\tint num = 10;\n\t\t// Texto STring\n\t\tString cadena = \"cadena\";\n\n\t\t// Decimale O flotante\n\t\tdouble decimal = 12.16;\n\t\tfloat fl = new Float(10);\n\t\t// Bolean\n\t\tboolean bl = true;\n\n\t\t// ARREGLOS\n\t\t// string\n\t\tString[] veString = new String[5];\n\t\tveString[0] = \"hola mundo\";\n\t\tveString[1] = \"hola mundo\";\n\t\tveString[2] = \"hola mundo\";\n\t\tveString[3] = \"hola mundo\";\n\t\tveString[4] = \"hola mundo\";\n\n\t\tint[] varNum = new int[] { 0, 1, 2, 3, 4, 5 };\n\n\t}", "private void getCostAndEta() {\n\n GetVehiclesData vehiclesData = RetrofitClientInstance.getRetrofitInstance().create(GetVehiclesData.class);\n getVehicles.getVehiclesData(vehiclesData);\n setCostToLabel(getVehicles.getCost());\n setETAToLabel(getVehicles.getETA());\n\n }", "public PosicionDTO consultarInformacionSatelite(){\n logger.debug(\"MensajeService::PosicionDTO()\");\n PosicionDTO posicionDTO = new PosicionDTO();\n CoordenadasDTO posiciones = asignarCoordenadas();\n if(posiciones != null){\n posicionDTO.setCoordenadasDTO(posiciones);\n List<String[]> mensajeSatelites = obtenerMensajes(listaNave);\n String mensaje = organizarMensaje(mensajeSatelites);\n posicionDTO.setMensaje(mensaje);\n return posicionDTO;\n }\n return posicionDTO;\n }", "public void buscarDatos() throws Exception {\n\t\ttry {\n\t\t\tString parameter = lbxParameter.getSelectedItem().getValue()\n\t\t\t\t\t.toString();\n\t\t\tString value = tbxValue.getValue().toUpperCase().trim();\n\n\t\t\tMap<String, Object> parameters = new HashMap<String, Object>();\n\t\t\tparameters.put(\"codigo_empresa\", codigo_empresa);\n\t\t\tparameters.put(\"codigo_sucursal\", codigo_sucursal);\n\n\t\t\tif (parameter.equalsIgnoreCase(\"fecha_inicial\")) {\n\t\t\t\tparameters.put(\"fecha_string\", value);\n\t\t\t} else {\n\t\t\t\tparameters.put(\"parameter\", parameter);\n\t\t\t\tparameters.put(\"value\", \"%\" + value + \"%\");\n\t\t\t}\n\t\t\tif (admision != null) {\n\t\t\t\tparameters.put(\"identificacion\",\n\t\t\t\t\t\tadmision.getNro_identificacion());\n\t\t\t}\n\n\t\t\tgetServiceLocator().getFicha_epidemiologia_nnService().setLimit(\n\t\t\t\t\t\"limit 25 offset 0\");\n\n\t\t\tList<Ficha_epidemiologia_n3> lista_datos = getServiceLocator()\n\t\t\t\t\t.getFicha_epidemiologia_nnService().listar(\n\t\t\t\t\t\t\tFicha_epidemiologia_n3.class, parameters);\n\t\t\trowsResultado.getChildren().clear();\n\n\t\t\tfor (Ficha_epidemiologia_n3 ficha_epidemiologia_n3 : lista_datos) {\n\t\t\t\trowsResultado.appendChild(crearFilas(\n\t\t\t\t\t\tficha_epidemiologia_n3, this));\n\t\t\t}\n\n\t\t\tgridResultado.setVisible(true);\n\t\t\tgridResultado.setMold(\"paging\");\n\t\t\tgridResultado.setPageSize(20);\n\n\t\t\tgridResultado.applyProperties();\n\t\t\tgridResultado.invalidate();\n\n\t\t} catch (Exception e) {\n\t\t\tMensajesUtil.mensajeError(e, \"\", this);\n\t\t}\n\t}", "public void mostrarDatos(Object obj) throws Exception {\n\t\tHisc_urgencia_odontologico hisc_urgencia_odontologico = (Hisc_urgencia_odontologico) obj;\n\t\ttry {\n\t\t\tcargarInformacion_paciente();\n\t\t\tinfoPacientes.setCodigo_historia(hisc_urgencia_odontologico\n\t\t\t\t\t.getCodigo_historia());\n\n\t\t\tinitMostrar_datos(hisc_urgencia_odontologico);\n\n\t\t\t// tbxCodigo_historia.setValue(hisc_urgencia_odontologico.getCodigo_historia());\n\t\t\t// tbxIdentificacion.setValue(hisc_urgencia_odontologico.getIdentificacion());\n\t\t\t// dtbxFecha_inicial.setValue(hisc_urgencia_odontologico.getFecha_inicial());\n\t\t\t// tbxNro_ingreso.setValue(hisc_urgencia_odontologico.getNro_ingreso());\n\t\t\t// tbxCodigo_prestador.setValue(hisc_urgencia_odontologico\n\t\t\t// .getCodigo_prestador());\n\t\t\t// dtbxFecha_ingreso.setValue(hisc_urgencia_odontologico.getFecha_ingreso());\n\t\t\ttbxAcompaniante.setValue(hisc_urgencia_odontologico\n\t\t\t\t\t.getAcompaniante());\n\t\t\tfor (int i = 0; i < lbxRelacion.getItemCount(); i++) {\n\t\t\t\tListitem listitem = lbxRelacion.getItemAtIndex(i);\n\t\t\t\tif (listitem.getValue().toString()\n\t\t\t\t\t\t.equals(hisc_urgencia_odontologico.getRelacion())) {\n\t\t\t\t\tlistitem.setSelected(true);\n\t\t\t\t\ti = lbxRelacion.getItemCount();\n\t\t\t\t}\n\t\t\t}\n\t\t\ttbxTel_acompaniante.setValue(hisc_urgencia_odontologico\n\t\t\t\t\t.getTel_acompaniante());\n\t\t\ttbxMotivo_consulta.setValue(hisc_urgencia_odontologico\n\t\t\t\t\t.getMotivo_consulta());\n\t\t\ttbxEnfermedad_actual.setValue(hisc_urgencia_odontologico\n\t\t\t\t\t.getEnfermedad_actual());\n\t\t\tUtilidades.seleccionarRadio(rdbAnam_tratamiento,\n\t\t\t\t\thisc_urgencia_odontologico.getAnam_tratamiento());\n\t\t\ttbxAnam_cual_tratamiento.setValue(hisc_urgencia_odontologico\n\t\t\t\t\t.getAnam_cual_tratamiento());\n\t\t\tUtilidades.seleccionarRadio(rdbAnam_toma_medicamentos,\n\t\t\t\t\thisc_urgencia_odontologico.getAnam_toma_medicamentos());\n\t\t\ttbxAnam_cual_toma_medicamentos.setValue(hisc_urgencia_odontologico\n\t\t\t\t\t.getAnam_cual_toma_medicamentos());\n\t\t\tUtilidades.seleccionarRadio(rdbAnam_alergias,\n\t\t\t\t\thisc_urgencia_odontologico.getAnam_alergias());\n\t\t\ttbxAnam_cual_alergias.setValue(hisc_urgencia_odontologico\n\t\t\t\t\t.getAnam_cual_alergias());\n\t\t\tUtilidades.seleccionarRadio(rdbAnam_cardiopatias,\n\t\t\t\t\thisc_urgencia_odontologico.getAnam_cardiopatias());\n\t\t\ttbxAnam_cual_cardiopatias.setValue(hisc_urgencia_odontologico\n\t\t\t\t\t.getAnam_cual_cardiopatias());\n\t\t\tUtilidades.seleccionarRadio(rdbAnam_alteracion_presion,\n\t\t\t\t\thisc_urgencia_odontologico.getAnam_alteracion_presion());\n\t\t\ttbxAnam_cual_alteracion_presion.setValue(hisc_urgencia_odontologico\n\t\t\t\t\t.getAnam_cual_alteracion_presion());\n\t\t\tUtilidades.seleccionarRadio(rdbAnam_embarazo,\n\t\t\t\t\thisc_urgencia_odontologico.getAnam_embarazo());\n\t\t\ttbxAnam_cual_embarazo.setValue(hisc_urgencia_odontologico\n\t\t\t\t\t.getAnam_cual_embarazo());\n\t\t\tUtilidades.seleccionarRadio(rdbAnam_diabetes,\n\t\t\t\t\thisc_urgencia_odontologico.getAnam_diabetes());\n\t\t\tfor (int i = 0; i < lbxAnam_cual_diabetes.getItemCount(); i++) {\n\t\t\t\tListitem listitem = lbxAnam_cual_diabetes.getItemAtIndex(i);\n\t\t\t\tif (listitem\n\t\t\t\t\t\t.getValue()\n\t\t\t\t\t\t.toString()\n\t\t\t\t\t\t.equals(hisc_urgencia_odontologico\n\t\t\t\t\t\t\t\t.getAnam_cual_diabetes())) {\n\t\t\t\t\tlistitem.setSelected(true);\n\t\t\t\t\ti = lbxAnam_cual_diabetes.getItemCount();\n\t\t\t\t}\n\t\t\t}\n\t\t\tUtilidades.seleccionarRadio(rdbAnam_hepatitis,\n\t\t\t\t\thisc_urgencia_odontologico.getAnam_hepatitis());\n\t\t\tfor (int i = 0; i < lbxAnam_cual_hepatitis.getItemCount(); i++) {\n\t\t\t\tListitem listitem = lbxAnam_cual_hepatitis.getItemAtIndex(i);\n\t\t\t\tif (listitem\n\t\t\t\t\t\t.getValue()\n\t\t\t\t\t\t.toString()\n\t\t\t\t\t\t.equals(hisc_urgencia_odontologico\n\t\t\t\t\t\t\t\t.getAnam_cual_hepatitis())) {\n\t\t\t\t\tlistitem.setSelected(true);\n\t\t\t\t\ti = lbxAnam_cual_hepatitis.getItemCount();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tUtilidades.seleccionarRadio(rdbAnam_irradiaciones,\n\t\t\t\t\thisc_urgencia_odontologico.getAnam_irradiaciones());\n\t\t\ttbxAnam_cual_irradiaciones.setValue(hisc_urgencia_odontologico\n\t\t\t\t\t.getAnam_cual_irradiaciones());\n\t\t\tUtilidades.seleccionarRadio(rdbAnam_discracias,\n\t\t\t\t\thisc_urgencia_odontologico.getAnam_discracias());\n\t\t\ttbxAnam_cual_discracias.setValue(hisc_urgencia_odontologico\n\t\t\t\t\t.getAnam_cual_discracias());\n\t\t\tUtilidades.seleccionarRadio(rdbAnam_fiebre_reumatica,\n\t\t\t\t\thisc_urgencia_odontologico.getAnam_fiebre_reumatica());\n\t\t\ttbxAnam_cual_fiebre_reumatica.setValue(hisc_urgencia_odontologico\n\t\t\t\t\t.getAnam_cual_fiebre_reumatica());\n\t\t\tUtilidades.seleccionarRadio(rdbAnam_enfermedad_renal,\n\t\t\t\t\thisc_urgencia_odontologico.getAnam_enfermedad_renal());\n\t\t\ttbxAnam_cual_enfermedad_renal.setValue(hisc_urgencia_odontologico\n\t\t\t\t\t.getAnam_cual_enfermedad_renal());\n\t\t\tUtilidades.seleccionarRadio(rdbAnam_inmunosupresion,\n\t\t\t\t\thisc_urgencia_odontologico.getAnam_inmunosupresion());\n\t\t\ttbxAnam_cual_inmunosupresion.setValue(hisc_urgencia_odontologico\n\t\t\t\t\t.getAnam_cual_inmunosupresion());\n\t\t\tUtilidades.seleccionarRadio(rdbAnam_trastornos,\n\t\t\t\t\thisc_urgencia_odontologico.getAnam_trastornos());\n\t\t\ttbxAnam_cual_trastornos.setValue(hisc_urgencia_odontologico\n\t\t\t\t\t.getAnam_cual_trastornos());\n\t\t\tUtilidades.seleccionarRadio(rdbAnam_patologia,\n\t\t\t\t\thisc_urgencia_odontologico.getAnam_patologia());\n\t\t\ttbxAnam_cual_patologia.setValue(hisc_urgencia_odontologico\n\t\t\t\t\t.getAnam_cual_patologia());\n\t\t\tUtilidades.seleccionarRadio(rdbAnam_trastornos_gastricos,\n\t\t\t\t\thisc_urgencia_odontologico.getAnam_trastornos_gastricos());\n\t\t\ttbxAnam_cual_trastornos_gastricos\n\t\t\t\t\t.setValue(hisc_urgencia_odontologico\n\t\t\t\t\t\t\t.getAnam_cual_trastornos_gastricos());\n\t\t\tUtilidades.seleccionarRadio(rdbAnam_epilepsia,\n\t\t\t\t\thisc_urgencia_odontologico.getAnam_epilepsia());\n\t\t\ttbxAnam_cual_epilepsia.setValue(hisc_urgencia_odontologico\n\t\t\t\t\t.getAnam_cual_epilepsia());\n\t\t\tUtilidades.seleccionarRadio(rdbAnam_cirugias,\n\t\t\t\t\thisc_urgencia_odontologico.getAnam_cirugias());\n\t\t\ttbxAnam_cual_cirugias.setValue(hisc_urgencia_odontologico\n\t\t\t\t\t.getAnam_cual_cirugias());\n\t\t\tUtilidades.seleccionarRadio(rdbAnam_protasis,\n\t\t\t\t\thisc_urgencia_odontologico.getAnam_protasis());\n\t\t\tfor (int i = 0; i < lbxAnam_cual_protasis.getItemCount(); i++) {\n\t\t\t\tListitem listitem = lbxAnam_cual_protasis.getItemAtIndex(i);\n\t\t\t\tif (listitem\n\t\t\t\t\t\t.getValue()\n\t\t\t\t\t\t.toString()\n\t\t\t\t\t\t.equals(hisc_urgencia_odontologico\n\t\t\t\t\t\t\t\t.getAnam_cual_protasis())) {\n\t\t\t\t\tlistitem.setSelected(true);\n\t\t\t\t\ti = lbxAnam_cual_protasis.getItemCount();\n\t\t\t\t}\n\t\t\t}\n\t\t\tUtilidades.seleccionarRadio(rdbAnam_otro,\n\t\t\t\t\thisc_urgencia_odontologico.getAnam_otro());\n\t\t\ttbxAnam_cual_otros.setValue(hisc_urgencia_odontologico\n\t\t\t\t\t.getAnam_cual_otros());\n\t\t\tUtilidades.seleccionarRadio(rdbSintoma_respiratorio,\n\t\t\t\t\thisc_urgencia_odontologico.getSintoma_respiratorio());\n\t\t\tUtilidades.seleccionarRadio(rdbSintoma_piel,\n\t\t\t\t\thisc_urgencia_odontologico.getSintoma_piel());\n\n\t\t\tcargarImpresionDiagnostica(hisc_urgencia_odontologico);\n\n\t\t\t// dbxPulso.setValue(hisc_urgencia_odontologico.getPulso());\n\t\t\t// dbxTemperatura\n\t\t\t// .setValue(hisc_urgencia_odontologico.getTemperatura());\n\t\t\t// dbxTension_arterial.setValue(hisc_urgencia_odontologico\n\t\t\t// .getTension_arterial());\n\t\t\t// dbxPeso.setValue(hisc_urgencia_odontologico.getPeso());\n\t\t\t// dbxTalla.setValue(hisc_urgencia_odontologico.getTalla());\n\t\t\t// dbxRespiracion\n\t\t\t// .setValue(hisc_urgencia_odontologico.getRespiracion());\n\t\t\t// for (int i = 0; i < lbxGrupo_s.getItemCount(); i++) {\n\t\t\t// Listitem listitem = lbxGrupo_s.getItemAtIndex(i);\n\t\t\t// if (listitem.getValue().toString()\n\t\t\t// .equals(hisc_urgencia_odontologico.getGrupo_s())) {\n\t\t\t// listitem.setSelected(true);\n\t\t\t// i = lbxGrupo_s.getItemCount();\n\t\t\t// }\n\t\t\t// }\n\t\t\t// for (int i = 0; i < lbxRh.getItemCount(); i++) {\n\t\t\t// Listitem listitem = lbxRh.getItemAtIndex(i);\n\t\t\t// if (listitem.getValue().toString()\n\t\t\t// .equals(hisc_urgencia_odontologico.getRh())) {\n\t\t\t// listitem.setSelected(true);\n\t\t\t// i = lbxRh.getItemCount();\n\t\t\t// }\n\t\t\t// }\n\t\t\t// dbxDiastolica.setValue(hisc_urgencia_odontologico.getDiastolica());\n\t\t\t// tbxObservaciones_temp.setValue(hisc_urgencia_odontologico\n\t\t\t// .getObservaciones_temp());\n\t\t\tfor (int i = 0; i < lbxCausas_externas.getItemCount(); i++) {\n\t\t\t\tListitem listitem = lbxCausas_externas.getItemAtIndex(i);\n\t\t\t\tif (listitem\n\t\t\t\t\t\t.getValue()\n\t\t\t\t\t\t.toString()\n\t\t\t\t\t\t.equals(hisc_urgencia_odontologico.getCausas_externas())) {\n\t\t\t\t\tlistitem.setSelected(true);\n\t\t\t\t\ti = lbxCausas_externas.getItemCount();\n\t\t\t\t}\n\t\t\t\t// Muestra el texbox de otos cuando seleccionan la opcion en\n\t\t\t\t// causas externas\n\t\t\t\tif (lbxCausas_externas.getSelectedItem().getValue().toString()\n\t\t\t\t\t\t.equals(\"15\")) {\n\t\t\t\t\ttbxOtro_causas_externas.setVisible(true);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\ttbxOtro_causas_externas.setValue(hisc_urgencia_odontologico\n\t\t\t\t\t.getOtro_causas_externas());\n\t\t\tfor (int i = 0; i < lbxTipo_disnostico.getItemCount(); i++) {\n\t\t\t\tListitem listitem = lbxTipo_disnostico.getItemAtIndex(i);\n\t\t\t\tif (listitem\n\t\t\t\t\t\t.getValue()\n\t\t\t\t\t\t.toString()\n\t\t\t\t\t\t.equals(hisc_urgencia_odontologico.getTipo_disnostico())) {\n\t\t\t\t\tlistitem.setSelected(true);\n\t\t\t\t\ti = lbxTipo_disnostico.getItemCount();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\ttbxTratamiento\n\t\t\t\t\t.setValue(hisc_urgencia_odontologico.getTratamiento());\n\t\t\tUtilidades.seleccionarRadio(rdbHa_sufrido_violencia,\n\t\t\t\t\thisc_urgencia_odontologico.getHa_sufrido_violencia());\n\t\t\tUtilidades.seleccionarRadio(rdbFisico,\n\t\t\t\t\thisc_urgencia_odontologico.getFisico());\n\t\t\tUtilidades.seleccionarRadio(rdbSexual,\n\t\t\t\t\thisc_urgencia_odontologico.getSexual());\n\t\t\tUtilidades.seleccionarRadio(rdbEmocional,\n\t\t\t\t\thisc_urgencia_odontologico.getEmocional());\n\t\t\tUtilidades.seleccionarRadio(rdbSiente_riesgo,\n\t\t\t\t\thisc_urgencia_odontologico.getSiente_riesgo());\n\t\t\tUtilidades.seleccionarRadio(rdbQuiere_hablar_del_tema,\n\t\t\t\t\thisc_urgencia_odontologico.getQuiere_hablar_del_tema());\n\n\t\t\t// cargarSignosVitales(hisc_urgencia_odontologico);\n\t\t\t// Mostramos la vista //\n\t\t\ttbxAccion.setText(\"modificar\");\n\t\t\taccionForm(true, tbxAccion.getText());\n\t\t} catch (Exception e) {\n\t\t\tMensajesUtil.mensajeError(e, \"\", this);\n\t\t}\n\t}", "@Override\r\n\tpublic float chekearDatos(){\r\n\t\t\r\n\t\tfloat monto = 0f;\r\n\t\tfloat montoPorMes = creditoSolicitado/plazoEnMeses;\r\n\t\tdouble porcentajeDeSusIngesosMensuales = (cliente.getIngresosMensuales()*0.7);\r\n\t\t\r\n\t\tif(cliente.getIngresoAnual()>=15000f && montoPorMes<=porcentajeDeSusIngesosMensuales){\r\n\t\t\t\r\n\t\t\tmonto = this.creditoSolicitado;\r\n\t\t\tsetEstadoDeSolicitud(true);\r\n\t\t}\t\r\n\t\t\r\n\t\t\r\n\t\treturn monto;\r\n\t}", "private void solicitarDatos() {\n Intent intent = Henson.with(this).gotoAlumnoActivity().edad(mAlumno.getEdad()).nombre(\n mAlumno.getNombre()).build();\n startActivityForResult(intent, RC_ALUMNO);\n }", "private void obtenerEstampas(int tipo) {\n try {\n switch(tipo){\n case 0:\n listaSobreNormal = new ListaSobreNormal();\n for (int i = 0; i < 5; i++) {\n listaSobreNormal.insertar(App.listaEstampas.obtenerEstampaSobre(tipo).getEstampa());\n }\n //listaSobreNormal.mostrar();\n App.listaUsuarios.agregarEstampasObtenidas(listaSobreNormal);\n mostrarEstampas(listaSobreNormal.getActual().getEstampa());\n break;\n case 1:\n listaSobreDorado = new ListaSobreDorado();\n for (int i = 0; i < 5; i++) {\n listaSobreDorado.insertar(App.listaEstampas.obtenerEstampaSobre(tipo).getEstampa());\n }\n //listaSobreDorado.mostrar();\n App.listaUsuarios.agregarEstampasObtenidas(listaSobreDorado);\n mostrarEstampas(listaSobreDorado.getActual().getEstampa());\n break;\n }\n } catch (Exception e) {\n System.err.println(\"error\");\n e.printStackTrace();\n }\n }", "private void getEncuestaSatisfaccions(){\n mEncuestaSatisfaccions = estudioAdapter.getEncuestaSatisfaccionSinEnviar();\n //ca.close();\n }", "private void getDatosPartoBB(){\n mDatosPartoBB = estudioAdapter.getListaDatosPartoBBSinEnviar();\n //ca.close();\n }", "public static Estudiante buscarEstudiante(String Nro_de_ID) {\r\n //meter este método a la base de datos\r\n Estudiante est = new Estudiante();\r\n try {\r\n Class.forName(\"com.mysql.jdbc.Driver\");\r\n Connection conexion = DriverManager.getConnection(\"jdbc:mysql://localhost/registrolaboratorios\", \"root\", \"admin\");\r\n System.out.print(\"Conexion establecida!\");\r\n Statement sentencia = conexion.createStatement();\r\n ResultSet necesario = sentencia.executeQuery(\"select * from estudiante where Nro_de_ID ='\" + Nro_de_ID + \"'\");\r\n\r\n while (necesario.next()) {\r\n\r\n String ced = necesario.getString(\"Nro_de_ID\");\r\n String nomb = necesario.getString(\"Nombres\");\r\n String ape = necesario.getString(\"Apellidos\");\r\n String lab = necesario.getString(\"Laboratorio\");\r\n String carr = necesario.getString(\"Carrera\");\r\n String mod = necesario.getString(\"Modulo\");\r\n String mta = necesario.getString(\"Materia\");\r\n String fecha = necesario.getString(\"Fecha\");\r\n String HI = necesario.getString(\"Hora_Ingreso\");\r\n String HS = necesario.getString(\"Hora_Salida\");\r\n\r\n est.setNro_de_ID(ced);\r\n est.setNombres(nomb);\r\n est.setApellidos(ape);\r\n est.setLaboratorio(lab);\r\n est.setCarrera(carr);\r\n est.setModulo(mod);\r\n est.setMateria(mta);\r\n est.setFecha(fecha);\r\n est.setHora_Ingreso(HI);\r\n est.setHora_Salida(HS);\r\n\r\n }\r\n sentencia.close();\r\n conexion.close();\r\n\r\n } catch (Exception ex) {\r\n System.out.print(\"Error en la conexion\" + ex);\r\n }\r\n return est;\r\n }", "public void consultasSeguimiento() {\r\n try {\r\n switch (opcionMostrarAnalistaSeguim) {\r\n case \"Cita\":\r\n ListSeguimientoRadicacionesConCita = Rad.ConsultasRadicacionYSeguimiento(2, mBsesion.codigoMiSesion());\r\n break;\r\n case \"Entrega\":\r\n ListSeguimientoRadicacionesConCita = Rad.ConsultasRadicacionYSeguimiento(3, mBsesion.codigoMiSesion());\r\n break;\r\n }\r\n } catch (Exception e) {\r\n mbTodero.setMens(\"Error en el metodo '\" + this.getClass() + \".consultasSeguimiento()' causado por: \" + e.getMessage());\r\n mbTodero.error();\r\n }\r\n\r\n }", "public void getOrdini(){\n caricamento = ProgressDialog.show(getActivity(), \"Cerco i tuoi ordini!\",\r\n \"Connessione con il server in corso...\", true);\r\n caricamento.show();\r\n\r\n JSONObject postData = new JSONObject();\r\n try {\r\n postData.put(\"id_utente\", Parametri.id);\r\n\r\n } catch (Exception e) {\r\n caricamento.dismiss();\r\n return;\r\n }\r\n\r\n Connessione conn = new Connessione(postData, \"POST\");\r\n conn.addListener(this);\r\n //In Parametri.IP c'è la path a cui va aggiunta il nome della pagina.php\r\n conn.execute(Parametri.IP + \"/SistudiaMieiOrdiniAndroid.php\");\r\n\r\n }", "public void mostrarDatos(Object obj) throws Exception {\r\n\t\tHis_atencion_embarazada his_atencion_embarazada = (His_atencion_embarazada) obj;\r\n\t\ttry {\r\n\t\t\ttbxCodigo_historia.setValue(his_atencion_embarazada\r\n\t\t\t\t\t.getCodigo_historia());\r\n\t\t\tdtbxFecha_inicial.setValue(his_atencion_embarazada\r\n\t\t\t\t\t.getFecha_inicial());\r\n\r\n\t\t\tAdministradora administradora = new Administradora();\r\n\t\t\tadministradora.setCodigo(his_atencion_embarazada.getCodigo_eps());\r\n\t\t\tadministradora = getServiceLocator().getAdministradoraService()\r\n\t\t\t\t\t.consultar(administradora);\r\n\r\n\t\t\ttbxCodigo_eps.setValue(administradora != null ? administradora\r\n\t\t\t\t\t.getCodigo() : \"\");\r\n\t\t\ttbxNombre_eps.setValue(administradora != null ? administradora\r\n\t\t\t\t\t.getNombre() : \"\");\r\n\r\n\t\t\tfor (int i = 0; i < lbxCodigo_dpto.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxCodigo_dpto.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_atencion_embarazada.getCodigo_dpto())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxCodigo_dpto.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tlistarMunicipios(lbxCodigo_municipio, lbxCodigo_dpto);\r\n\r\n\t\t\tPaciente paciente = new Paciente();\r\n\t\t\tpaciente.setCodigo_empresa(his_atencion_embarazada\r\n\t\t\t\t\t.getCodigo_empresa());\r\n\t\t\tpaciente.setCodigo_sucursal(his_atencion_embarazada\r\n\t\t\t\t\t.getCodigo_sucursal());\r\n\t\t\tpaciente.setNro_identificacion(his_atencion_embarazada\r\n\t\t\t\t\t.getIdentificacion());\r\n\t\t\tpaciente = getServiceLocator().getPacienteService().consultar(\r\n\t\t\t\t\tpaciente);\r\n\r\n\t\t\tElemento elemento = new Elemento();\r\n\t\t\telemento.setCodigo(paciente.getSexo());\r\n\t\t\telemento.setTipo(\"sexo\");\r\n\t\t\telemento = getServiceLocator().getElementoService().consultar(\r\n\t\t\t\t\telemento);\r\n\r\n\t\t\ttbxIdentificacion.setValue(his_atencion_embarazada\r\n\t\t\t\t\t.getIdentificacion());\r\n\t\t\ttbxNomPaciente.setValue((paciente != null ? paciente.getNombre1()\r\n\t\t\t\t\t+ \" \" + paciente.getApellido1() : \"\"));\r\n\t\t\ttbxTipoIdentificacion.setValue((paciente != null ? paciente\r\n\t\t\t\t\t.getTipo_identificacion() : \"\"));\r\n\t\t\ttbxEdad_madre.setValue(Util.getEdad(new java.text.SimpleDateFormat(\r\n\t\t\t\t\t\"dd/MM/yyyy\").format(paciente.getFecha_nacimiento()),\r\n\t\t\t\t\tpaciente.getUnidad_medidad(), false));\r\n\t\t\ttbxSexo_madre.setValue((elemento != null ? elemento\r\n\t\t\t\t\t.getDescripcion() : \"\"));\r\n\t\t\tdbxNacimiento.setValue(paciente.getFecha_nacimiento());\r\n\r\n\t\t\ttbxMotivo.setValue(his_atencion_embarazada.getDireccion());\r\n\t\t\ttbxTelefono.setValue(his_atencion_embarazada.getTelefono());\r\n\t\t\tRadio radio = (Radio) rdbSeleccion.getFellow(\"Seleccion\"\r\n\t\t\t\t\t+ his_atencion_embarazada.getSeleccion());\r\n\t\t\tradio.setChecked(true);\r\n\t\t\tfor (int i = 0; i < lbxGestaciones.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxGestaciones.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_atencion_embarazada.getGestaciones())) {\r\n\t\t\t\t\ti = lbxGestaciones.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < lbxPartos.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxPartos.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_atencion_embarazada.getPartos())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxPartos.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < lbxCesarias.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxCesarias.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_atencion_embarazada.getCesarias())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxCesarias.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < lbxAbortos.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxAbortos.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_atencion_embarazada.getAbortos())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxAbortos.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < lbxEspontaneo.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxEspontaneo.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_atencion_embarazada.getEspontaneo())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxEspontaneo.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < lbxProvocado.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxProvocado.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_atencion_embarazada.getProvocado())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxProvocado.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < lbxNacido_muerto.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxNacido_muerto.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_atencion_embarazada.getNacido_muerto())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxNacido_muerto.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < lbxPrematuro.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxPrematuro.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_atencion_embarazada.getPrematuro())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxPrematuro.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < lbxHijos_menos.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxHijos_menos.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_atencion_embarazada.getHijos_menos())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxHijos_menos.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < lbxHijos_mayor.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxHijos_mayor.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_atencion_embarazada.getHijos_mayor())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxHijos_mayor.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < lbxMalformado.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxMalformado.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_atencion_embarazada.getMalformado())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxMalformado.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < lbxHipertension.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxHipertension.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_atencion_embarazada.getHipertension())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxHipertension.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tdtbxFecha_ultimo_parto.setValue(his_atencion_embarazada\r\n\t\t\t\t\t.getFecha_ultimo_parto());\r\n\t\t\tfor (int i = 0; i < lbxCirugia.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxCirugia.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_atencion_embarazada.getCirugia())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxCirugia.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\ttbxOtro_antecedente.setValue(his_atencion_embarazada\r\n\t\t\t\t\t.getOtro_antecedente());\r\n\t\t\tfor (int i = 0; i < lbxHemoclasificacion.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxHemoclasificacion.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_atencion_embarazada.getHemoclasificacion())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxHemoclasificacion.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < lbxRh.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxRh.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_atencion_embarazada.getRh())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxRh.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\ttbxPeso.setValue(his_atencion_embarazada.getPeso());\r\n\t\t\ttbxTalla.setValue(his_atencion_embarazada.getTalla());\r\n\t\t\ttbxImc.setValue(his_atencion_embarazada.getImc());\r\n\t\t\ttbxTa.setValue(his_atencion_embarazada.getTa());\r\n\t\t\ttbxFc.setValue(his_atencion_embarazada.getFc());\r\n\t\t\ttbxFr.setValue(his_atencion_embarazada.getFr());\r\n\t\t\ttbxTemperatura.setValue(his_atencion_embarazada.getTemperatura());\r\n\t\t\ttbxCroomb.setValue(his_atencion_embarazada.getCroomb());\r\n\t\t\tdtbxFecha_ultima_mestruacion.setValue(his_atencion_embarazada\r\n\t\t\t\t\t.getFecha_ultima_mestruacion());\r\n\t\t\tdtbxFecha_probable_parto.setValue(his_atencion_embarazada\r\n\t\t\t\t\t.getFecha_probable_parto());\r\n\t\t\ttbxEdad_gestacional.setValue(his_atencion_embarazada\r\n\t\t\t\t\t.getEdad_gestacional());\r\n\t\t\tfor (int i = 0; i < lbxControl.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxControl.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_atencion_embarazada.getControl())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxControl.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\ttbxNum_control.setValue(his_atencion_embarazada.getNum_control());\r\n\t\t\tfor (int i = 0; i < lbxFetales.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxFetales.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_atencion_embarazada.getFetales())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxFetales.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < lbxFiebre.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxFiebre.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_atencion_embarazada.getFiebre())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxFiebre.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < lbxLiquido.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxLiquido.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_atencion_embarazada.getLiquido())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxLiquido.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < lbxFlujo.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxFlujo.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_atencion_embarazada.getFlujo())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxFlujo.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < lbxEnfermedad.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxEnfermedad.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_atencion_embarazada.getEnfermedad())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxEnfermedad.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\ttbxCual_enfermedad.setValue(his_atencion_embarazada\r\n\t\t\t\t\t.getCual_enfermedad());\r\n\t\t\tfor (int i = 0; i < lbxCigarrillo.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxCigarrillo.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_atencion_embarazada.getCigarrillo())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxCigarrillo.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < lbxAlcohol.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxAlcohol.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_atencion_embarazada.getAlcohol())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxAlcohol.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\ttbxCual_alcohol.setValue(his_atencion_embarazada.getCual_alcohol());\r\n\t\t\tfor (int i = 0; i < lbxDroga.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxDroga.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_atencion_embarazada.getDroga())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxDroga.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\ttbxCual_droga.setValue(his_atencion_embarazada.getCual_droga());\r\n\t\t\tfor (int i = 0; i < lbxViolencia.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxViolencia.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_atencion_embarazada.getViolencia())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxViolencia.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\ttbxCual_violencia.setValue(his_atencion_embarazada\r\n\t\t\t\t\t.getCual_violencia());\r\n\t\t\tfor (int i = 0; i < lbxToxoide.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxToxoide.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_atencion_embarazada.getToxoide())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxToxoide.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < lbxDosis.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxDosis.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_atencion_embarazada.getDosis())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxDosis.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\ttbxObservaciones_gestion.setValue(his_atencion_embarazada\r\n\t\t\t\t\t.getObservaciones_gestion());\r\n\t\t\ttbxAltura_uterina.setValue(his_atencion_embarazada\r\n\t\t\t\t\t.getAltura_uterina());\r\n\t\t\tchbCorelacion.setChecked(his_atencion_embarazada.getCorelacion());\r\n\t\t\tchbEmbarazo_multiple.setChecked(his_atencion_embarazada\r\n\t\t\t\t\t.getEmbarazo_multiple());\r\n\t\t\tchbTrasmision_sexual.setChecked(his_atencion_embarazada\r\n\t\t\t\t\t.getTrasmision_sexual());\r\n\t\t\tRadio radio1 = (Radio) rdbAnomalia.getFellow(\"Anomalia\"\r\n\t\t\t\t\t+ his_atencion_embarazada.getAnomalia());\r\n\t\t\tradio1.setChecked(true);\r\n\t\t\tRadio radio2 = (Radio) rdbEdema_gestion.getFellow(\"Edema_gestion\"\r\n\t\t\t\t\t+ his_atencion_embarazada.getEdema_gestion());\r\n\t\t\tradio2.setChecked(true);\r\n\t\t\tRadio radio3 = (Radio) rdbPalidez.getFellow(\"Palidez\"\r\n\t\t\t\t\t+ his_atencion_embarazada.getPalidez());\r\n\t\t\tradio3.setChecked(true);\r\n\t\t\tRadio radio4 = (Radio) rdbConvulciones.getFellow(\"Convulciones\"\r\n\t\t\t\t\t+ his_atencion_embarazada.getConvulciones());\r\n\t\t\tradio4.setChecked(true);\r\n\t\t\tRadio radio5 = (Radio) rdbConciencia.getFellow(\"Conciencia\"\r\n\t\t\t\t\t+ his_atencion_embarazada.getConciencia());\r\n\t\t\tradio5.setChecked(true);\r\n\t\t\tRadio radio6 = (Radio) rdbCavidad_bucal.getFellow(\"Cavidad_bucal\"\r\n\t\t\t\t\t+ his_atencion_embarazada.getCavidad_bucal());\r\n\t\t\tradio6.setChecked(true);\r\n\t\t\ttbxHto.setValue(his_atencion_embarazada.getHto());\r\n\t\t\ttbxHb.setValue(his_atencion_embarazada.getHb());\r\n\t\t\ttbxToxoplasma.setValue(his_atencion_embarazada.getToxoplasma());\r\n\t\t\ttbxVdrl1.setValue(his_atencion_embarazada.getVdrl1());\r\n\t\t\ttbxVdrl2.setValue(his_atencion_embarazada.getVdrl2());\r\n\t\t\ttbxVih1.setValue(his_atencion_embarazada.getVih1());\r\n\t\t\ttbxVih2.setValue(his_atencion_embarazada.getVih2());\r\n\t\t\ttbxHepb.setValue(his_atencion_embarazada.getHepb());\r\n\t\t\ttbxOtro.setValue(his_atencion_embarazada.getOtro());\r\n\t\t\ttbxEcografia.setValue(his_atencion_embarazada.getEcografia());\r\n\t\t\tRadio radio7 = (Radio) rdbClasificacion_gestion\r\n\t\t\t\t\t.getFellow(\"Clasificacion_gestion\"\r\n\t\t\t\t\t\t\t+ his_atencion_embarazada\r\n\t\t\t\t\t\t\t\t\t.getClasificacion_gestion());\r\n\t\t\tradio7.setChecked(true);\r\n\t\t\tfor (int i = 0; i < lbxContracciones.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxContracciones.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_atencion_embarazada.getContracciones())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxContracciones.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < lbxNum_contracciones.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxNum_contracciones.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_atencion_embarazada.getNum_contracciones())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxNum_contracciones.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < lbxHemorragia.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxHemorragia.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_atencion_embarazada.getHemorragia())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxHemorragia.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < lbxLiquido_vaginal.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxLiquido_vaginal.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_atencion_embarazada.getLiquido_vaginal())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxLiquido_vaginal.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\ttbxColor_liquido.setValue(his_atencion_embarazada\r\n\t\t\t\t\t.getColor_liquido());\r\n\t\t\tfor (int i = 0; i < lbxDolor_cabeza.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxDolor_cabeza.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_atencion_embarazada.getDolor_cabeza())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxDolor_cabeza.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < lbxVision.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxVision.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_atencion_embarazada.getDolor_cabeza())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxVision.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < lbxConvulcion.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxConvulcion.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_atencion_embarazada.getConvulcion())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxConvulcion.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\ttbxObservaciones_parto.setValue(his_atencion_embarazada\r\n\t\t\t\t\t.getObservaciones_parto());\r\n\t\t\ttbxContracciones_min.setValue(his_atencion_embarazada\r\n\t\t\t\t\t.getContracciones_min());\r\n\t\t\ttbxFc_fera.setValue(his_atencion_embarazada.getFc_fera());\r\n\t\t\ttbxDilatacion_cervical.setValue(his_atencion_embarazada\r\n\t\t\t\t\t.getDilatacion_cervical());\r\n\t\t\tRadio radio8 = (Radio) rdbPreentacion.getFellow(\"Preentacion\"\r\n\t\t\t\t\t+ his_atencion_embarazada.getPreentacion());\r\n\t\t\tradio8.setChecked(true);\r\n\t\t\ttbxOtra_presentacion.setValue(his_atencion_embarazada\r\n\t\t\t\t\t.getOtra_presentacion());\r\n\t\t\tRadio radio9 = (Radio) rdbEdema.getFellow(\"Edema\"\r\n\t\t\t\t\t+ his_atencion_embarazada.getEdema());\r\n\t\t\tradio9.setChecked(true);\r\n\t\t\tfor (int i = 0; i < lbxHemorragia_vaginal.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxHemorragia_vaginal.getItemAtIndex(i);\r\n\t\t\t\tif (listitem\r\n\t\t\t\t\t\t.getValue()\r\n\t\t\t\t\t\t.toString()\r\n\t\t\t\t\t\t.equals(his_atencion_embarazada.getHemorragia_vaginal())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxHemorragia_vaginal.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\ttbxHto_parto.setValue(his_atencion_embarazada.getHto_parto());\r\n\t\t\ttbxHb_parto.setValue(his_atencion_embarazada.getHb_parto());\r\n\t\t\ttbxHepb_parto.setValue(his_atencion_embarazada.getHepb_parto());\r\n\t\t\ttbxVdrl_parto.setValue(his_atencion_embarazada.getVdrl_parto());\r\n\t\t\ttbxVih_parto.setValue(his_atencion_embarazada.getVih_parto());\r\n\t\t\tRadio radio10 = (Radio) rdbClasificacion_parto\r\n\t\t\t\t\t.getFellow(\"Clasificacion_parto\"\r\n\t\t\t\t\t\t\t+ his_atencion_embarazada.getClasificacion_parto());\r\n\t\t\tradio10.setChecked(true);\r\n\t\t\tdtbxFecha_nac.setValue(his_atencion_embarazada.getFecha_nac());\r\n\t\t\ttbxIdentificacion_nac.setValue(his_atencion_embarazada\r\n\t\t\t\t\t.getIdentificacion_nac());\r\n\t\t\tfor (int i = 0; i < lbxSexo.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxSexo.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_atencion_embarazada.getSexo())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxSexo.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\ttbxPeso_nac.setValue(his_atencion_embarazada.getPeso_nac());\r\n\t\t\ttbxTalla_nac.setValue(his_atencion_embarazada.getTalla_nac());\r\n\t\t\ttbxPc_nac.setValue(his_atencion_embarazada.getPc_nac());\r\n\t\t\ttbxFc_nac.setValue(his_atencion_embarazada.getFc_nac());\r\n\t\t\ttbxTemper_nac.setValue(his_atencion_embarazada.getTemper_nac());\r\n\t\t\ttbxEdad.setValue(his_atencion_embarazada.getEdad());\r\n\t\t\ttbxAdgar1.setValue(his_atencion_embarazada.getAdgar1());\r\n\t\t\ttbxAdgar5.setValue(his_atencion_embarazada.getAdgar5());\r\n\t\t\ttbxAdgar10.setValue(his_atencion_embarazada.getAdgar10());\r\n\t\t\ttbxAdgar20.setValue(his_atencion_embarazada.getAdgar20());\r\n\t\t\ttbxObservaciones_nac.setValue(his_atencion_embarazada\r\n\t\t\t\t\t.getObservaciones_nac());\r\n\t\t\tRadio radio11 = (Radio) rdbClasificacion_nac\r\n\t\t\t\t\t.getFellow(\"Clasificacion_nac\"\r\n\t\t\t\t\t\t\t+ his_atencion_embarazada.getClasificacion_nac());\r\n\t\t\tradio11.setChecked(true);\r\n\t\t\tchbReani_prematuro.setChecked(his_atencion_embarazada\r\n\t\t\t\t\t.getReani_prematuro());\r\n\t\t\tchbReani_meconio.setChecked(his_atencion_embarazada\r\n\t\t\t\t\t.getReani_meconio());\r\n\t\t\tchbReani_respiracion.setChecked(his_atencion_embarazada\r\n\t\t\t\t\t.getReani_respiracion());\r\n\t\t\tchbReani_hipotonico.setChecked(his_atencion_embarazada\r\n\t\t\t\t\t.getReani_hipotonico());\r\n\t\t\tchbReani_apnea.setChecked(his_atencion_embarazada.getReani_apnea());\r\n\t\t\tchbReani_jadeo.setChecked(his_atencion_embarazada.getReani_jadeo());\r\n\t\t\tchbReani_deficultosa.setChecked(his_atencion_embarazada\r\n\t\t\t\t\t.getReani_deficultosa());\r\n\t\t\tchbReani_gianosis.setChecked(his_atencion_embarazada\r\n\t\t\t\t\t.getReani_gianosis());\r\n\t\t\tchbReani_bradicardia.setChecked(his_atencion_embarazada\r\n\t\t\t\t\t.getReani_bradicardia());\r\n\t\t\tchbReani_hipoxemia.setChecked(his_atencion_embarazada\r\n\t\t\t\t\t.getReani_hipoxemia());\r\n\t\t\tchbReani_estimulacion.setChecked(his_atencion_embarazada\r\n\t\t\t\t\t.getReani_estimulacion());\r\n\t\t\tchbReani_ventilacion.setChecked(his_atencion_embarazada\r\n\t\t\t\t\t.getReani_ventilacion());\r\n\t\t\tchbReani_comprensiones.setChecked(his_atencion_embarazada\r\n\t\t\t\t\t.getReani_comprensiones());\r\n\t\t\tchbReani_intubacion.setChecked(his_atencion_embarazada\r\n\t\t\t\t\t.getReani_intubacion());\r\n\t\t\ttbxMedicina.setValue(his_atencion_embarazada.getMedicina());\r\n\t\t\tRadio radio12 = (Radio) rdbClasificacion_reani\r\n\t\t\t\t\t.getFellow(\"Clasificacion_reani\"\r\n\t\t\t\t\t\t\t+ his_atencion_embarazada.getClasificacion_reani());\r\n\t\t\tradio12.setChecked(true);\r\n\t\t\tfor (int i = 0; i < lbxRuptura.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxRuptura.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_atencion_embarazada.getRuptura())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxRuptura.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < lbxTiempo_ruptura.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxTiempo_ruptura.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_atencion_embarazada.getTiempo_ruptura())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxTiempo_ruptura.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\ttbxLiquido_neo.setValue(his_atencion_embarazada.getLiquido_neo());\r\n\t\t\tfor (int i = 0; i < lbxFiebre_neo.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxFiebre_neo.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_atencion_embarazada.getFiebre_neo())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxFiebre_neo.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < lbxTiempo_neo.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxTiempo_neo.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_atencion_embarazada.getTiempo_neo())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxTiempo_neo.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\ttbxCoricamniotis.setValue(his_atencion_embarazada\r\n\t\t\t\t\t.getCoricamniotis());\r\n\t\t\tRadio radio17 = (Radio) rdbIntrauterina.getFellow(\"Intrauterina\"\r\n\t\t\t\t\t+ his_atencion_embarazada.getIntrauterina());\r\n\t\t\tradio17.setChecked(true);\r\n\t\t\tfor (int i = 0; i < lbxMadre20.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxMadre20.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_atencion_embarazada.getMadre20())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxMadre20.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tchbAlcohol_neo.setChecked(his_atencion_embarazada.getAlcohol_neo());\r\n\t\t\tchbDrogas_neo.setChecked(his_atencion_embarazada.getDrogas_neo());\r\n\t\t\tchbCigarrillo_neo.setChecked(his_atencion_embarazada\r\n\t\t\t\t\t.getCigarrillo_neo());\r\n\t\t\tRadio radio13 = (Radio) rdbRespiracion_neo\r\n\t\t\t\t\t.getFellow(\"Respiracion_neo\"\r\n\t\t\t\t\t\t\t+ his_atencion_embarazada.getRespiracion_neo());\r\n\t\t\tradio13.setChecked(true);\r\n\t\t\tRadio radio14 = (Radio) rdbLlanto_neo.getFellow(\"Llanto_neo\"\r\n\t\t\t\t\t+ his_atencion_embarazada.getLlanto_neo());\r\n\t\t\tradio14.setChecked(true);\r\n\t\t\tRadio radio15 = (Radio) rdbVetalidad_neo.getFellow(\"Vetalidad_neo\"\r\n\t\t\t\t\t+ his_atencion_embarazada.getVetalidad_neo());\r\n\t\t\tradio15.setChecked(true);\r\n\t\t\tchbTaquicardia_neo.setChecked(his_atencion_embarazada\r\n\t\t\t\t\t.getTaquicardia_neo());\r\n\t\t\tchbBradicardia_neo.setChecked(his_atencion_embarazada\r\n\t\t\t\t\t.getBradicardia_neo());\r\n\t\t\tchbPalidez_neo.setChecked(his_atencion_embarazada.getPalidez_neo());\r\n\t\t\tchbCianosis_neo.setChecked(his_atencion_embarazada\r\n\t\t\t\t\t.getCianosis_neo());\r\n\t\t\tfor (int i = 0; i < lbxAnomalias_congenitas.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxAnomalias_congenitas.getItemAtIndex(i);\r\n\t\t\t\tif (listitem\r\n\t\t\t\t\t\t.getValue()\r\n\t\t\t\t\t\t.toString()\r\n\t\t\t\t\t\t.equals(his_atencion_embarazada\r\n\t\t\t\t\t\t\t\t.getAnomalias_congenitas())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxAnomalias_congenitas.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\ttbxCual_anomalias.setValue(his_atencion_embarazada\r\n\t\t\t\t\t.getCual_anomalias());\r\n\t\t\ttbxLesiones.setValue(his_atencion_embarazada.getLesiones());\r\n\t\t\ttbxOtras_alter.setValue(his_atencion_embarazada.getOtras_alter());\r\n\t\t\tRadio radio16 = (Radio) rdbClasificacion_neo\r\n\t\t\t\t\t.getFellow(\"Clasificacion_neo\"\r\n\t\t\t\t\t\t\t+ his_atencion_embarazada.getClasificacion_neo());\r\n\t\t\tradio16.setChecked(true);\r\n\t\t\ttbxAlarma.setValue(his_atencion_embarazada.getAlarma());\r\n\t\t\ttbxConsulta_control.setValue(his_atencion_embarazada\r\n\t\t\t\t\t.getConsulta_control());\r\n\t\t\ttbxMedidas_preventiva.setValue(his_atencion_embarazada\r\n\t\t\t\t\t.getMedidas_preventiva());\r\n\t\t\ttbxRecomendaciones.setValue(his_atencion_embarazada\r\n\t\t\t\t\t.getRecomendaciones());\r\n\t\t\ttbxDiagnostico.setValue(his_atencion_embarazada.getDiagnostico());\r\n\t\t\ttbxCodigo_diagnostico.setValue(his_atencion_embarazada\r\n\t\t\t\t\t.getCodigo_diagnostico());\r\n\t\t\ttbxTratamiento.setValue(his_atencion_embarazada.getTratamiento());\r\n\t\t\ttbxRecomendacion_alimentacion.setValue(his_atencion_embarazada\r\n\t\t\t\t\t.getRecomendacion_alimentacion());\r\n\t\t\ttbxEvolucion_servicio.setValue(his_atencion_embarazada\r\n\t\t\t\t\t.getEvolucion_servicio());\r\n\r\n\t\t\t// Mostramos la vista //\r\n\t\t\ttbxAccion.setText(\"modificar\");\r\n\t\t\taccionForm(true, tbxAccion.getText());\r\n\t\t} catch (Exception e) {\r\n\t\t\t\r\n\t\t\tlog.error(e.getMessage(), e);\r\n\t\t\tMessagebox.show(\"Este dato no se puede editar\", \"Error !!\",\r\n\t\t\t\t\tMessagebox.OK, Messagebox.ERROR);\r\n\t\t}\r\n\t}", "public List<Tripulante> obtenerTripulantes();", "private void listar() throws Exception{\n int resId=1;\n List<PlatoDia> lista = this.servicioRestaurante.listarMenuDia(resId);\n this.modelListEspecial.clear();\n lista.forEach(lse -> {\n this.modelListEspecial.addElement(\"ID: \" + lse.getId() \n + \" NOMBRE: \" + lse.getNombre()\n + \" DESCRIPCION: \" + lse.getDescripcion()\n + \" PRECIO: \" + lse.getPrecio()\n + \" ENTRADA: \"+lse.getEntrada() \n + \" PRINCIPIO: \"+lse.getPrincipio()\n + \" CARNE: \"+lse.getCarne()\n + \" BEBIDA: \"+lse.getBebida()\n + \" DIA: \"+lse.getDiaSemana());\n });\n }", "void stampaStatisticheNodo() {\r\n for(Object obj : this.nodes)\r\n {\r\n Nodo n = (Nodo)obj;\r\n \r\n TransportLayer tl = n.myTransportLayer;\r\n tl.stampaStatistiche();\r\n \r\n // System.out.println(\"=====STAMPA STATISTICHE NODO NETWORK LAYER====\");\r\n NetworkLayer nl = n.myNetLayer;\r\n // String s = nl.getStat();\r\n nl.stampaStatistiche();\r\n // System.out.println(s);\r\n // System.out.println(\"=====FINE====\");\r\n \r\n physicalLayer pl = n.myPhyLayer;\r\n pl.stampaStatistiche();\r\n }\r\n }", "public String verDatos(){\n return \"Ataque: \"+ataque+\"\\nDefensa: \"+defensa+\"\\nPunteria: \"+punteria;\n }", "private void calcularOtrosIngresos(Ingreso ingreso)throws Exception{\n\t\tfor(IngresoDetalle ingresoDetalle : ingreso.getListaIngresoDetalle()){\r\n\t\t\tif(ingresoDetalle.getIntPersPersonaGirado().equals(ingreso.getBancoFondo().getIntPersonabancoPk())\r\n\t\t\t&& ingresoDetalle.getBdAjusteDeposito()==null){\r\n\t\t\t\tbdOtrosIngresos = ingresoDetalle.getBdMontoAbono();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void getRecepcionSeros(){\n mRecepcionSeros = estudioAdapter.getListaRecepcionSeroSinEnviar();\n //ca.close();\n }", "private void inizia() throws Exception {\n this.setAllineamento(Layout.ALLINEA_CENTRO);\n this.creaBordo(\"Coperti serviti\");\n\n campoPranzo=CampoFactory.intero(\"a pranzo\");\n campoPranzo.setLarghezza(60);\n campoPranzo.setModificabile(false);\n campoCena=CampoFactory.intero(\"a cena\");\n campoCena.setLarghezza(60);\n campoCena.setModificabile(false);\n campoTotale=CampoFactory.intero(\"Totale\");\n campoTotale.setLarghezza(60); \n campoTotale.setModificabile(false);\n\n this.add(campoPranzo);\n this.add(campoCena);\n this.add(campoTotale);\n }", "private void getTempRojoBhcs(){\n mTempRojoBhcs = estudioAdapter.getListaTempRojoBhcSinEnviar();\n //ca.close();\n }", "private void getParticipantes() {\n mParticipantes = estudioAdapter.getParticipantes(MainDBConstants.estado + \"= '\" + Constants.STATUS_NOT_SUBMITTED+ \"'\", null);\n //ca.close();\n }", "public void buscarDatos() throws Exception {\r\n\t\ttry {\r\n\t\t\tString codigo_empresa = empresa.getCodigo_empresa();\r\n\t\t\tString codigo_sucursal = sucursal.getCodigo_sucursal();\r\n\t\t\tString parameter = lbxParameter.getSelectedItem().getValue()\r\n\t\t\t\t\t.toString();\r\n\t\t\tString value = tbxValue.getValue().toUpperCase().trim();\r\n\r\n\t\t\tMap<String, Object> parameters = new HashMap();\r\n\t\t\tparameters.put(\"codigo_empresa\", codigo_empresa);\r\n\t\t\tparameters.put(\"codigo_sucursal\", codigo_sucursal);\r\n\t\t\tparameters.put(\"parameter\", parameter);\r\n\t\t\tparameters.put(\"value\", \"%\" + value + \"%\");\r\n\r\n\t\t\tgetServiceLocator().getHis_partoService().setLimit(\r\n\t\t\t\t\t\"limit 25 offset 0\");\r\n\r\n\t\t\tList<His_parto> lista_datos = getServiceLocator()\r\n\t\t\t\t\t.getHis_partoService().listar(parameters);\r\n\t\t\trowsResultado.getChildren().clear();\r\n\r\n\t\t\tfor (His_parto his_parto : lista_datos) {\r\n\t\t\t\trowsResultado.appendChild(crearFilas(his_parto, this));\r\n\t\t\t}\r\n\r\n\t\t\tgridResultado.setVisible(true);\r\n\t\t\tgridResultado.setMold(\"paging\");\r\n\t\t\tgridResultado.setPageSize(20);\r\n\r\n\t\t\tgridResultado.applyProperties();\r\n\t\t\tgridResultado.invalidate();\r\n\t\t\tgridResultado.setVisible(true);\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\t\r\n\t\t\tlog.error(e.getMessage(), e);\r\n\t\t\tMessagebox.show(e.getMessage(), \"Mensaje de Error !!\",\r\n\t\t\t\t\tMessagebox.OK, Messagebox.ERROR);\r\n\t\t}\r\n\t}", "public void buscarDatos()throws Exception{\n\t\ttry {\n\t\t\tString parameter = lbxParameter.getSelectedItem().getValue().toString();\n\t\t\tString value = tbxValue.getValue().toUpperCase().trim();\n\n\t\t\tMap<String, Object> parameters = new HashMap<String, Object>();\n\t\t\tparameters.put(\"parameter\", parameter);\n\t\t\tparameters.put(\"value\", \"%\" + value + \"%\");\n\n\t\t\tif (admision != null) {\n\t\t\t\tparameters.put(\"identificacion\",\n\t\t\t\t\t\tadmision.getNro_identificacion());\n\t\t\t}\n\t\t\t\n\t\t\tgetServiceLocator().getFicha_epidemiologia_nnService().setLimit(\"limit 25 offset 0\");\n\t\t\t\n\t\t\tList<Ficha_epidemiologia_n13> lista_datos = getServiceLocator()\n\t\t\t\t\t.getFicha_epidemiologia_nnService().listar(\n\t\t\t\t\t\t\tFicha_epidemiologia_n13.class, parameters);\n\t\t\trowsResultado.getChildren().clear();\n\t\t\t\n\t\t\tfor (Ficha_epidemiologia_n13 ficha_epidemiologia_n13 : lista_datos) {\n\t\t\t\trowsResultado.appendChild(crearFilas(ficha_epidemiologia_n13, this));\n\t\t\t}\n\t\t\t\n\t\t\tgridResultado.setVisible(true);\n\t\t\tgridResultado.setMold(\"paging\");\n\t\t\tgridResultado.setPageSize(20);\n\t\t\t\n\t\t\tgridResultado.applyProperties();\n\t\t\tgridResultado.invalidate();\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tMensajesUtil.mensajeError(e, \"\", this);\n\t\t}\n\t}", "public void cargaDatosInicialesSoloParaModificacionDeCuenta() throws Exception {\n GestionContableWrapper gestionContableWrapper = parParametricasService.factoryGestionContable();\n gestionContableWrapper.getNormaContable3();\n parAjustesList = parParametricasService.listaTiposDeAjuste(obtieneEnumTipoAjuste(gestionContableWrapper.getNormaContable3()));\n selectAuxiliarParaAsignacionModificacion = cntEntidadesService.listaDeAuxiliaresPorEntidad(selectedEntidad);\n //Obtien Ajuste Fin\n\n //Activa formulario para automatico modifica \n switch (selectedEntidad.getNivel()) {\n case 1:\n swParAutomatico = true;\n numeroEspaciador = 200;\n break;\n case 2:\n swParAutomatico = true;\n swActivaBoton = true;\n numeroEspaciador = 200;\n break;\n case 3:\n swParAutomatico = false;\n numeroEspaciador = 1;\n break;\n default:\n break;\n }\n\n cntEntidad = (CntEntidad) getCntEntidadesService().find(CntEntidad.class, selectedEntidad.getIdEntidad());\n }", "private void getEncParticipantes() {\n mEncuestasParticipantes = estudioAdapter.getListaEncuestaParticipantesSinEnviar();\n //ca.close();\n }", "private void cargaInfoEmpleado(){\r\n Connection conn = null;\r\n Conexion conex = null;\r\n try{\r\n if(!Config.estaCargada){\r\n Config.cargaConfig();\r\n }\r\n conex = new Conexion();\r\n conex.creaConexion(Config.host, Config.user, Config.pass, Config.port, Config.name, Config.driv, Config.surl);\r\n conn = conex.getConexion();\r\n if(conn != null){\r\n ArrayList<Object> paramsIn = new ArrayList();\r\n paramsIn.add(txtLogin);\r\n QryRespDTO resp = new Consulta().ejecutaSelectSP(conn, IQryUsuarios.NOM_FN_OBTIENE_INFO_USUARIOWEB, paramsIn);\r\n System.out.println(\"resp: \" + resp.getRes() + \"-\" + resp.getMsg());\r\n if(resp.getRes() == 1){\r\n ArrayList<ColumnaDTO> listaColumnas = resp.getColumnas();\r\n for(HashMap<String, CampoDTO> fila : resp.getDatosTabla()){\r\n usuario = new UsuarioDTO();\r\n \r\n for(ColumnaDTO col: listaColumnas){\r\n switch(col.getIdTipo()){\r\n case java.sql.Types.INTEGER:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Integer.parseInt(fila.get(col.getEtiqueta()).getValor().toString().replaceAll(\",\", \"\").replaceAll(\"$\", \"\").replaceAll(\" \", \"\")));\r\n break;\r\n \r\n case java.sql.Types.DOUBLE:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Double.parseDouble(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n case java.sql.Types.FLOAT:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Float.parseFloat(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n case java.sql.Types.DECIMAL:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Float.parseFloat(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n case java.sql.Types.VARCHAR:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"\":fila.get(col.getEtiqueta()).getValor().toString());\r\n break;\r\n \r\n case java.sql.Types.NUMERIC:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Float.parseFloat(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n default:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"\":fila.get(col.getEtiqueta()).getValor().toString());\r\n break;\r\n } \r\n }\r\n }\r\n sesionMap.put(\"UsuarioDTO\", usuario);\r\n }else{\r\n context.getExternalContext().getApplicationMap().clear();\r\n context.getExternalContext().redirect(\"index.xhtml\");\r\n }\r\n }\r\n }catch(Exception ex){\r\n System.out.println(\"Excepcion en la cargaInfoEmpleado: \" + ex);\r\n }finally{\r\n try{\r\n conn.close();\r\n }catch(Exception ex){\r\n \r\n }\r\n }\r\n }", "public void receberValores() {\n Bundle b = getIntent().getExtras();\n if (b != null) {\n cpf3 = b.getString(\"valor2\");\n renda = b.getDouble(\"valor3\");\n data = b.getString(\"valor4\");\n data2 = b.getString(\"valor5\");\n }\n }", "public void Get() { ob = ti.Get(currentrowi, \"persoana\"); ID = ti.ID; CNP = ob[0]; Nume = ob[1]; Prenume = ob[2]; }", "public Estudiante() {\r\n\t\tsuper();\r\n\t\t// TODO Auto-generated constructor stub\r\n\t}", "public void llenarDatosConfiguracion(){\n\n hoseEntities = new ArrayList<>();\n //**********************************************************\n\n //Capturar Nombre Host WIFI\n int[] tramaNombreEmbedded = new int[16];\n int c = 0;\n for(int i = 8; i<= 23; i++){\n tramaNombreEmbedded[c] = bufferRecepcion[i];\n c++;\n }\n\n\n //Log.v(\"NOMBRE EMBEDDED\", \"\" + hexToAscii(byteArrayToHexString(tramaNombreEmbedded,tramaNombreEmbedded.length)));\n //**********************************************************\n //Capturar MAC TABLET\n int[] tramaMACTablet= new int[6];\n c = 0;\n for(int i = 24; i<= 29; i++){\n tramaMACTablet[c] = bufferRecepcion[i];\n c++;\n }\n //Log.v(\"MAC TABLET EMBEDDED\", \"\" + hexToAscii(byteArrayToHexString(tramaMACTablet,tramaMACTablet.length)));\n\n\n //**********************************************************\n //Capturar Contraseña Red Host\n int[] contrasenaHostEmbedded = new int[11];\n c = 0;\n for(int i = 30; i<= 40; i++){\n contrasenaHostEmbedded[c] = bufferRecepcion[i];\n c++;\n }\n\n //Log.v(\"CONTRASENA RED EMBEDDED\", \"\" + hexToAscii(byteArrayToHexString(contrasenaHostEmbedded,contrasenaHostEmbedded.length)));\n\n\n //**********************************************************\n //Capturar Nro Bombas\n int[] numeroBombas = new int[1];\n numeroBombas[0] = bufferRecepcion[41];\n numBombas = Integer.parseInt(byteArrayToHexIntGeneral(numeroBombas,1));\n //**********************************************************\n //int pIinicial = 42;\n\n //obtener solo IDbombas\n int[] idBombas = new int[numBombas];\n\n int pIinicial = 42;\n for(int i = 0; i< numBombas; i++){\n idBombas[i] = bufferRecepcion[pIinicial];\n pIinicial+=1;\n }\n\n int auxIdBomba=0;\n for(int i = 0; i< numBombas; i++){\n Hose hose = new Hose();\n TransactionEntity transactionEntity = new TransactionEntity();\n transactionEntity.setEstadoRegistro(\"P\");\n //**********************************************************\n //Capturar idBomba\n int[] idBomba = new int[1];\n idBomba[0] = bufferRecepcion[pIinicial];\n auxIdBomba=Integer.parseInt((byteArrayToHexIntGeneral(idBomba,1)));\n transactionEntity.setIdBomba(auxIdBomba);\n transactionEntity.setNombreManguera(\"\"+auxIdBomba);\n hose.setHoseNumber(auxIdBomba);\n hose.setHoseName(\"\"+auxIdBomba);\n hose.setHardwareId(1);\n hose.setLastTicket(0);\n hose.setFuelQuantity(0.0);\n\n //**********************************************************\n //Capturar idProducto\n int[] idProducto = new int[1];\n idProducto[0] = bufferRecepcion[pIinicial + 1];\n transactionEntity.setIdProducto(Integer.parseInt(byteArrayToHexIntGeneral(idProducto,1)));\n //**********************************************************\n //Capturar cantidadDecimales\n int[] cantidadDecimales = new int[1];\n cantidadDecimales[0] = bufferRecepcion[pIinicial + 2];\n transactionEntity.setCantidadDecimales(Integer.parseInt(byteArrayToHexIntGeneral(cantidadDecimales,1)));\n //**********************************************************\n //Capturar nombreManguera\n int[] nombreManguera = new int[10];\n int contadorMangueraInicial = pIinicial + 3;\n int contadorMangueraFinal = contadorMangueraInicial + 9;\n int contadorIteracionesManguera = 0;\n for(int j=contadorMangueraInicial; j<=contadorMangueraFinal; j++){\n nombreManguera[contadorIteracionesManguera] = bufferRecepcion[j];\n contadorIteracionesManguera ++;\n }\n //transactionEntity.setNombreManguera(hexToAscii(byteArrayToHexString(nombreManguera,nombreManguera.length)));\n Log.v(\"Nombre Manguera\", hexToAscii(byteArrayToHexString(nombreManguera,nombreManguera.length)));\n\n //Capturar nombreProducto\n int[] nombreProducto = new int[10];\n int contadorProductoInicial = pIinicial + 13;\n int contadorProductoFinal = contadorProductoInicial + 9;\n int contadorIteracionesProducto = 0;\n for(int k=contadorProductoInicial; k<=contadorProductoFinal; k++){\n nombreProducto[contadorIteracionesProducto] = bufferRecepcion[k];\n contadorIteracionesProducto ++;\n }\n transactionEntity.setNombreProducto(hexToAscii(byteArrayToHexString(nombreProducto,nombreProducto.length)));\n Log.v(\"Nombre Producto\",hexToAscii(byteArrayToHexString(nombreProducto,nombreProducto.length)));\n hose.setNameProduct(hexToAscii(byteArrayToHexString(nombreProducto,nombreProducto.length)));\n\n hoseEntities.add(transactionEntity);\n hoseMasters.add(hose);\n pIinicial = pIinicial + 23;\n }\n\n }", "private List<Arbeitspaket> retrieveData() {\r\n\t\treturn Arrays.asList(new Arbeitspaket(\"A\", 0, 0, 0, 0, 0, 0, 0), new Arbeitspaket(\"B\", 0, 0, 0, 0, 0, 0, 0),\r\n\t\t\t\tnew Arbeitspaket(\"C\", 0, 0, 0, 0, 0, 0, 0), new Arbeitspaket(\"D\", 0, 0, 0, 0, 0, 0, 0));\r\n\t}", "String getDataNascimento();", "private static void grabarYllerPaciente() {\r\n\t\tPaciente paciente = new Paciente(\"Juan\", \"Garcia\", \"65\", \"casa\", \"2\", \"1998\");\r\n\t\tPaciente pacienteDos = new Paciente(\"MArta\", \"Garcia\", \"65\", \"casa\", \"3\", \"1998\");\r\n\t\tPaciente pacienteTres = new Paciente(\"MAria\", \"Garcia\", \"65\", \"casa\", \"4\", \"1998\");\r\n\t\tString ruta = paciente.getIdUnico();\r\n\t\tString rutaDos = pacienteDos.getIdUnico();\r\n\t\tString rutaTres = pacienteTres.getIdUnico();\r\n\t\tDTO<Paciente> dtoPacienteDos = new DTO<>(\"src/Almacen/\" + rutaDos + \".dat\");\r\n\t\tDTO<Paciente> dtoPaciente = new DTO<>(\"src/Almacen/\" + ruta + \".dat\");\r\n\t\tDTO<Paciente> dtoPacienteTres = new DTO<>(\"src/Almacen/\" + rutaTres + \".dat\");\r\n\t\tif (dtoPaciente.grabar(paciente) == true) {\r\n\r\n\t\t\tSystem.out.println(paciente.getNombre() + \" grabado\");\r\n\t\t}\r\n\t\t;\r\n\t\tif (dtoPacienteDos.grabar(pacienteDos) == true) {\r\n\r\n\t\t\tSystem.out.println(pacienteDos.getNombre() + \" grabado\");\r\n\t\t}\r\n\t\t;\r\n\t\tif (dtoPacienteTres.grabar(pacienteTres) == true) {\r\n\t\t\tSystem.out.println(pacienteTres.getNombre() + \" grabado\");\r\n\t\t}\r\n\t\t;\r\n\t\tPaciente pacienteLeer = dtoPaciente.leer();\r\n\t\tSystem.out.println(pacienteLeer);\r\n\t\tSystem.out.println(pacienteLeer.getNombre());\r\n\t}", "private void dibujarEstado() {\n\n\t\tcantidadFichasNegras.setText(String.valueOf(juego.contarFichasNegras()));\n\t\tcantidadFichasBlancas.setText(String.valueOf(juego.contarFichasBlancas()));\n\t\tjugadorActual.setText(juego.obtenerJugadorActual());\n\t}", "public void fetcherLesEo() {\r\n\t\r\n\t// Commence par fetcher les params ... et si Ok, fetche les EO !\r\n\tif (recupererValParams() && valParams != null) {\r\n\r\n\t NSArray bindings = new NSArray(valParams);\r\n\t EOQualifier qualifier = EOQualifier.qualifierWithQualifierFormat(chaineQualif, bindings);\r\n\t EOFetchSpecification fetchSpec = new EOFetchSpecification(nomEntite,qualifier, eoSortOrderings);\r\n\r\n\t fetchSpec.setRefreshesRefetchedObjects(true);\r\n\r\n\t NSArray res = null;\r\n\t res = monEc.objectsWithFetchSpecification(fetchSpec);\r\n\t listeEOFetches = res;\r\n\t \r\n\t // si on demande � ce qu'� l'init il n'y ait pas de ligne s�lectionn�e par d�faut, alors pas d'Item choisi (en cascade)\r\n\t if (noSelectionPossible) setItemChoisi(null);\r\n\t else {\r\n\t\tif (listeEOFetches != null && listeEOFetches.count() > 0)\r\n\t\t setItemChoisi((EOGenericRecord)listeEOFetches.objectAtIndex(0));\r\n\t\telse setItemChoisi(null);\r\n\t }\r\n\t}\r\n\t// les parametres n'ont pu être récupérés : vider le popUp...\r\n\telse {\r\n listeEOFetches = null;\r\n // pas d'Item choisi (en cascade)\r\n setItemChoisi(null);\r\n\t}\r\n }", "private void remplirUtiliseData() {\n\t}", "public void buscarDatos() throws Exception {\r\n\t\ttry {\r\n\t\t\tString codigo_empresa = empresa.getCodigo_empresa();\r\n\t\t\tString codigo_sucursal = sucursal.getCodigo_sucursal();\r\n\t\t\tString parameter = lbxParameter.getSelectedItem().getValue()\r\n\t\t\t\t\t.toString();\r\n\t\t\tString value = tbxValue.getValue().toUpperCase().trim();\r\n\r\n\t\t\tMap<String, Object> parameters = new HashMap();\r\n\t\t\tparameters.put(\"codigo_empresa\", codigo_empresa);\r\n\t\t\tparameters.put(\"codigo_sucursal\", codigo_sucursal);\r\n\t\t\tparameters.put(\"parameter\", parameter);\r\n\t\t\tparameters.put(\"value\", \"%\" + value + \"%\");\r\n\r\n\t\t\tgetServiceLocator().getHis_atencion_embarazadaService().setLimit(\r\n\t\t\t\t\t\"limit 25 offset 0\");\r\n\r\n\t\t\tList<His_atencion_embarazada> lista_datos = getServiceLocator()\r\n\t\t\t\t\t.getHis_atencion_embarazadaService().listar(parameters);\r\n\t\t\trowsResultado.getChildren().clear();\r\n\r\n\t\t\tfor (His_atencion_embarazada his_atencion_embarazada : lista_datos) {\r\n\t\t\t\trowsResultado.appendChild(crearFilas(his_atencion_embarazada,\r\n\t\t\t\t\t\tthis));\r\n\t\t\t}\r\n\r\n\t\t\tgridResultado.setVisible(true);\r\n\t\t\tgridResultado.setMold(\"paging\");\r\n\t\t\tgridResultado.setPageSize(20);\r\n\r\n\t\t\tgridResultado.applyProperties();\r\n\t\t\tgridResultado.invalidate();\r\n\t\t\tgridResultado.setVisible(true);\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\t\r\n\t\t\tlog.error(e.getMessage(), e);\r\n\t\t\tMessagebox.show(e.getMessage(), \"Mensaje de Error !!\",\r\n\t\t\t\t\tMessagebox.OK, Messagebox.ERROR);\r\n\t\t}\r\n\t}", "List<Venta1> consultarVentaPorFecha(Date desde, Date hasta, Persona cliente) throws Exception;", "private void retrieveDatos(Long codProfesor, Long anio) {\n recuperaPerfDoc(codProfesor, anio);\r\n }", "int getDatenvolumen();", "public void buscarEntidad(){\r\n\t\tlistaEstructuraDetalle.clear();\r\n\t\tPersona persona = null;\r\n\t\tList<EstructuraDetalle> lstEstructuraDetalle = null;\r\n\t\ttry {\r\n\t\t\tstrFiltroTextoPersona = strFiltroTextoPersona.trim();\r\n\t\t\tif(intTipoPersonaC.equals(Constante.PARAM_T_TIPOPERSONA_JURIDICA)){\r\n\t\t\t\tif (intPersonaRolC.equals(Constante.PARAM_T_TIPOROL_ENTIDAD)) {\r\n\t\t\t\t\tlstEstructuraDetalle = estructuraFacade.getListaEstructuraDetalleIngresos(SESION_IDSUCURSAL,SESION_IDSUBSUCURSAL);\r\n\t\t\t\t\tif (lstEstructuraDetalle!=null && !lstEstructuraDetalle.isEmpty()) {\r\n\t\t\t\t\t\tfor (EstructuraDetalle estructuraDetalle : lstEstructuraDetalle) {\r\n\t\t\t\t\t\t\tpersona = personaFacade.getPersonaPorPK(estructuraDetalle.getEstructura().getJuridica().getIntIdPersona());\r\n\t\t\t\t\t\t\tif (persona.getStrRuc().trim().equals(\"strFiltroTextoPersona\")) {\r\n\t\t\t\t\t\t\t\testructuraDetalle.getEstructura().getJuridica().setPersona(persona);\r\n\t\t\t\t\t\t\t\tlistaEstructuraDetalle.add(estructuraDetalle);\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} catch (Exception e) {\r\n\t\t\tlog.error(e.getMessage(), e);\r\n\t\t}\r\n\t}", "public Evento getEvento() { \n\t\t Evento evento = new Evento();\n\t\t List<Prenda> Lprendas = new ArrayList<Prenda>();\n\t\t Sugerencia sug = new Sugerencia();\n\t Prenda prend = new Prenda();\n Categoria categoria = new Categoria();\n\n categoria.setCodCategoria(1);\n categoria.setDescripcion(\"Zapatillas\");\n TipoPrenda tp = new TipoPrenda();\n tp.setDescripcion(\"lalal\");\n tp.setCategoria(categoria);\n tp.setCodTipoPrenda(1);\n \n \n Guardarropa guard = new Guardarropa();\n guard.setCompartido(false);\n guard.setDescripcion(\"guardarropa\");\n guard.setId(0); \n prend.setGuardarropa(guard);\n prend.setColorPrimario(\"rojo\");\n prend.setTipoPrenda(tp);\n prend.setColorSecundario(\"azul\");\n prend.setDescripcion(\"prenda 1\");\n prend.setNumeroDeCapa(EnumCapa.Primera);\n \tfor( int i = 0 ; i <= 4; i++) {\n prend.setCodPrenda(i);\n\t\t\tLprendas.add(prend);\t\t\t\n\t\t}\n \tsug.setIdSugerencia(1);\n \tsug.setMaxCapaInferior(0);\n \tsug.setMaxCapaSuperior(2);\t\n \tsug.setUsuario(new Usuario());\n \tsug.setListaPrendasSugeridas(Lprendas);\n \tevento.AgregarSugerenciaAEvento(sug);\n \tevento.AgregarSugerenciaAEvento(sug);\n \tevento.AgregarSugerenciaAEvento(sug);\n \tevento.AgregarSugerenciaAEvento(sug);\n \tevento.AgregarSugerenciaAEvento(sug);\n\n \t return evento;\n\t }", "public String generarEstadisticasGenerales(){\n \n String estadisticaGeneral = \"En general en la universidad del valle: \\n\";\n estadisticaGeneral += \"se encuentran: \" + EmpleadosPrioridadAlta.size() + \" empleados en prioridad alta\\n\"\n + empleadosPorPrioridad(EmpleadosPrioridadAlta)\n + \"se encuentran: \" + EmpleadosPrioridadMediaAlta.size() + \" empleados en prioridad media alta\\n\"\n + empleadosPorPrioridad(EmpleadosPrioridadMediaAlta)\n + \"se encuentran: \" + EmpleadosPrioridadMedia.size() + \" empleados en prioridad media\\n\"\n + empleadosPorPrioridad(EmpleadosPrioridadMedia)\n + \"se encuentran: \" + EmpleadosPrioridadBaja.size() + \" empleados en prioridad baja\\n\"\n + empleadosPorPrioridad(EmpleadosPrioridadBaja);\n return estadisticaGeneral;\n }", "private ArrayList<Tarea> getTareas(Date desde, Date hasta) {\n BDConsulter consulter = new BDConsulter(DATABASE_URL, DATABASE_USER, DATABASE_PASS);//genero la clase, que se conecta a la base postgresql\n consulter.connect();//establezco la conexion\n\n //Si no hay ningun integrante seleccionado, selecciono todos\n List<String> integrantesSeleccionados = jListIntegrantes.getSelectedValuesList();\n DefaultListModel<String> model = (DefaultListModel<String>) jListIntegrantes.getModel();\n List<String> integrantes = new ArrayList<String>();\n if (integrantesSeleccionados.size() == 0) {\n for (int i = 0; i < model.getSize(); i++) {\n System.out.println((model.getElementAt(i)));\n integrantes.add(model.getElementAt(i));\n }\n integrantesSeleccionados = integrantes;\n }\n\n ArrayList<Tarea> tareas = new ArrayList<>();\n for (String s : integrantesSeleccionados) {\n tareas.addAll(consulter.getTareas(desde, hasta, (String) jComboBoxProyecto.getSelectedItem(), (String) jComboBoxGrupos.getSelectedItem(), s));//obtengo las tareas creadas entre un rango de fecha dado\n }\n consulter.disconnect();//termino la conexion con la base//termino la conexion con la base\n return tareas;\n }", "public ManipularEstudiantes() {\n initComponents();\n cme = new Control_Mantenimiento_Estudiante(this);\n this.gUI_botones2.agregar_eventos(cme);\n }", "Reserva Obtener();", "public void mostrarDatos() {\n\t\tSystem.out.println(\"DNI: \" + dni);\n\t\tSystem.out.println(\"Nombre: \" + nombre);\n\t\tdireccion.mostrarDatos();\n\t\tSystem.out.println(\"Telefono 1: \" + telefonos[0]);\n\t\tSystem.out.println(\"Telefono 2: \" + telefonos[1]);\n\t\tSystem.out.println(\"Fecha de Nacimiento: \" + fecha_nac.getDayOfMonth() + \"-\" + fecha_nac.getMonth() + \"-\"\n\t\t\t\t+ fecha_nac.getYear());\n\t\tcurso.mostrarDatos();\n\t\tSystem.out.println(\"Motrando todas las notas registradas:\");\n\t\tnotas.stream().forEach(notas -> notas.mostrarDatos());\n\t}", "private DefaultTableModel getDatos3(){\n String folio = String.valueOf(venta.ns);\n //consulta sql\n String SQL_SELECT = \"SELECT p.Nombres,dv.Cantidad,dv.PrecioVenta FROM ventas v JOIN detalle_ventas dv ON v.IdVentas=dv.IdVentas JOIN producto p ON p.IdProducto=dv.IdProducto WHERE v.NumeroSerie = \"+folio+\"\";\n try {\n setTitutlos3();\n ps = con.getConnection().prepareStatement(SQL_SELECT);\n RS = ps.executeQuery();\n Object[] fila = new Object[3];\n while (RS.next()){\n fila[0] = RS.getString(1);\n fila[1] = RS.getInt(2);\n fila[2] = RS.getDouble(3);\n DT.addRow(fila);\n }\n //System.out.println(\"si hizo el desmadre\");\n } catch (SQLException e) {\n System.out.println(\"error en la tabla de ticket\");\n }\n \n return DT;\n \n }", "private void getDataModern(){\n UserAPIService api = Config.getRetrofit().create(UserAPIService.class);\n Call<Value> call = api.lihat_jenis(\"Modern\");\n call.enqueue(new Callback<Value>() {\n @Override\n public void onResponse(Call<Value> call, Response<Value> response) {\n// pDialog.dismiss();\n String value1 = response.body().getStatus();\n if (value1.equals(\"1\")){\n Value value = response.body();\n resultAlls = new ArrayList<>(Arrays.asList(value.getResult()));\n adapter = new RecyclerAdapterListAll(resultAlls,getApplicationContext());\n recyclerView.setAdapter(adapter);\n }else {\n Toast.makeText(ListPonpesActivity.this,\"Maaf Data Tidak Ada\",Toast.LENGTH_SHORT).show();\n }\n }\n\n @Override\n public void onFailure(Call<Value> call, Throwable t) {\n // pDialog.dismiss();\n Toast.makeText(ListPonpesActivity.this,\"Respon gagal\",Toast.LENGTH_SHORT).show();\n Log.d(\"Hasil internet\",t.toString());\n }\n });\n }", "@RequestMapping(method = RequestMethod.GET, value = \"/pruebaConsulta.do\")\n public @ResponseBody\n void pruebaConsulta(Model model)\n {\n String idEstado = \"15\";\n// //Fabricacion de objeto\n MunicipiosJSON municipiosJSON = new MunicipiosJSON();\n try\n {\n //Track tiempo\n Calendar ahora1 = Calendar.getInstance();\n long tiempo1 = ahora1.getTimeInMillis();\n municipiosJSON = daoCodigosPostales.municipiosEstado(\"15\");\n\n //Operacion realizada con exito\n municipiosJSON.setStatusJSON(true);\n Calendar ahora2 = Calendar.getInstance();\n long tiempo2 = ahora2.getTimeInMillis();\n long total = tiempo2 - tiempo1;\n System.out.println(\"Operacion con exito en \" + total + \"ms\");\n\n } catch(Exception e)\n {\n e.printStackTrace();\n //Error en consulta\n municipiosJSON.setStatusJSON(false);\n\n }\n\n }", "private void saveVisitas(String estado) {\n int c = mVisitasTerreno.size();\n for (VisitaTerreno visita : mVisitasTerreno) {\n visita.getMovilInfo().setEstado(estado);\n estudioAdapter.updateVisitasSent(visita);\n publishProgress(\"Actualizando Visitas\", Integer.valueOf(mVisitasTerreno.indexOf(visita)).toString(), Integer\n .valueOf(c).toString());\n }\n //actualizar.close();\n }", "public List<Tripulante> buscarTodosTripulantes();", "public Estudiante(String name, double for1, double cha1, double vid1, double tra1, double pre1, double for2, double cha2, double vid2, double tra2, double pre2) {\n this.name = name;\n this.for1 = for1;\n this.cha1 = cha1;\n this.vid1 = vid1;\n this.tra1 = tra1;\n this.pre1 = pre1;\n this.for2 = for2;\n this.cha2 = cha2;\n this.vid2 = vid2;\n this.tra2 = tra2;\n this.pre2 = pre2;\n this.fin1 = 0;\n this.fin2 = 0;\n this.total = 0;\n this.alerta = \"\";\n this.promocion = \"\";\n this.total1Bim = 0;\n this.total2Bim = 0;\n }", "public void datos_elegidos(){\n\n\n }", "private void listarEntidades() {\r\n\t\tsetListEntidades(new ArrayList<EntidadDTO>());\r\n\t\tgetListEntidades().addAll(entidadController.encontrarTodos());\r\n\t\tif (!getListEntidades().isEmpty()) {\r\n\t\t\tfor (EntidadDTO entidadDTO : getListEntidades()) {\r\n\t\t\t\t// Conversión de decimales.\r\n\t\t\t\tDouble porcentaje = entidadDTO.getPorcentajeValorAsegurable() * 100;\r\n\t\t\t\tdouble por = Math.round(porcentaje * Math.pow(10, 2)) / Math.pow(10, 2);\r\n\t\t\t\tentidadDTO.setPorcentajeValorAsegurable(por);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void gestionAlarmeTpsReel() {\r\n\t\tint cptCapteur = 0;\r\n\t\tboolean blAlert = false;\r\n\t\tboolean blTrouve = false;\r\n\t\tString strSql = \"\";\r\n\t\tResultSet result = null;\r\n\t\tint voieApi = -1;\r\n\r\n\t\t// Lecture de la table AlarmeEnCours\r\n\t\tstrSql = \"SELECT V2_AlarmeEnCours.*, Capteur.VoieApi AS CapteurVoieApi, Capteur.Alarme, Capteur.Description, Capteur.TypeCapteur, Capteur.Nom, Capteur.Inhibition, Capteur.idAlarmeService,\"\r\n\t\t\t + \" Equipement.NumeroInventaire \"\r\n\t\t\t + \" FROM (V2_AlarmeEnCours LEFT JOIN (Capteur LEFT JOIN Equipement ON Capteur.idEquipement = Equipement.idEquipement)\"\r\n\t\t\t + \" ON V2_AlarmeEnCours.idCapteur = Capteur.idCapteur)\"\r\n\t\t\t + \" WHERE Capteur.idAlarmeService = \" + EFS_Constantes.gestionUtilisateur.getIdAlarmeService();\r\n\t\tresult = ctn.lectureData(strSql);\r\n\t\ttry {\r\n\t\t\twhile(result.next()) {\r\n\t\t\t\tcptCapteur++;\r\n\t\t\t\t// voie traitée\r\n\t\t\t\tvoieApi = result.getInt(\"CapteurVoieApi\") - 1;\r\n\t\t\t\t// Regarder si déjà dans la liste\r\n\t\t\t\tblTrouve = false;\r\n\t\t\t\tfor(int i = 0; i < mdlTpsReelAlarme.getRowCount(); i++) {\r\n\t\t\t\t\tif(mdlTpsReelAlarme.getIdCapteur(i) == result.getInt(\"idCapteur\")) {\r\n\t\t\t\t\t\t// Mettre à jour la valeur\r\n\t\t\t\t\t\tif(result.getInt(\"TypeCapteur\") == CAPTEUR_ANALOGIQUE_ENTREE) {\r\n\t\t\t\t\t\t\tmdlTpsReelAlarme.setValueAt((EFS_Client_Variable.tbValeurAI[voieApi] + EFS_Client_Variable.tbCalibrationAI[voieApi]) / 10, i, JTABLE_ALARME_VALEUR);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tmdlTpsReelAlarme.setValueAt((double)EFS_Client_Variable.tbValeurDI[voieApi], i, JTABLE_ALARME_VALEUR);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tmdlTpsReelAlarme.setValueAt(result.getDate(\"DateDisparition\"), i, JTABLE_ALARME_DISPARITION);\r\n\t\t\t\t\t\tmdlTpsReelAlarme.setValueAt(result.getDate(\"DateApparition\"), i, JTABLE_ALARME_APPARITION);\r\n\t\t\t\t\t\tmdlTpsReelAlarme.setValueAt(result.getDate(\"DatePriseEnCompte\"), i, JTABLE_ALARME_PRISE_EN_COMPTE);\r\n\t\t\t\t\t\tblTrouve = true;\r\n\t\t\t\t\t} // Fin if\r\n\t\t\t\t} // Fin for i\r\n\t\t\t\tif(!blTrouve) {\r\n\t\t\t\t\tif(result.getInt(\"Alarme\") == ALARME_ALERT) {\r\n\t\t\t\t\t\tblAlert = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tblAlert = false;\r\n\t\t\t\t\t}\r\n//\t\t\t\t\tif ((result.getInt(\"Inhibition\") != ALARME_INHIBITION) && (result.getInt(\"blTempo\") == ALARME_TEMPO_DEPASSEE)) {\r\n\t\t\t\t\t\tmdlTpsReelAlarme.addAlarme(new TpsReelAlarme(result.getInt(\"idCapteur\"), result.getString(\"Nom\")\r\n\t\t\t\t\t\t\t\t, result.getString(\"Description\"), result.getString(\"NumeroInventaire\"), result.getDate(\"DateApparition\"),\r\n\t\t\t\t\t\t\t\tresult.getDate(\"DatePriseEnCompte\"), result.getString(\"DescriptionAlarme\")\r\n\t\t\t\t\t\t\t\t, result.getInt(\"VoieApi\"), blAlert, result.getDate(\"DateDisparition\"), result.getInt(\"Alarme\")));\r\n//\t\t\t\t\t} // fin mise en tableau\r\n\t\t\t\t} // fin blTrouve\r\n\t\t\t} // fin while\r\n\t\t} \r\n\t\tcatch (SQLException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tctn.closeLectureData();\r\n\t\ttry {\r\n\t\t\tresult.close();\r\n\t\t\tresult = null;\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tif (mdlTpsReelAlarme.getRowCount() != cptCapteur) {\r\n\t\t\tmdlTpsReelAlarme.removeAllAlarme();\r\n\t\t\tgestionAlarmeTpsReel();\r\n\t\t}\r\n\t}", "public void grabarLineasInvestigacionProyecto() {\r\n try {\r\n if (!sessionProyecto.getEstadoActual().getCodigo().equalsIgnoreCase(EstadoProyectoEnum.INICIO.getTipo())) {\r\n return;\r\n }\r\n for (LineaInvestigacionProyecto lineaInvestigacionProyecto : sessionProyecto.getLineasInvestigacionSeleccionadasTransfer()) {\r\n if (lineaInvestigacionProyecto.getId() == null) {\r\n lineaInvestigacionProyecto.setProyectoId(sessionProyecto.getProyectoSeleccionado());\r\n lineaInvestigacionProyectoService.guardar(lineaInvestigacionProyecto);\r\n grabarIndividuoLP(lineaInvestigacionProyecto);\r\n logDao.create(logDao.crearLog(\"LineaInvestigacionProyecto\", lineaInvestigacionProyecto.getId() + \"\",\r\n \"CREAR\", \"Proyecto=\" + sessionProyecto.getProyectoSeleccionado().getId() + \"|LineaInvestigacion=\"\r\n + lineaInvestigacionProyecto.getLineaInvestigacionId().getId(), sessionUsuario.getUsuario()));\r\n continue;\r\n }\r\n lineaInvestigacionProyectoService.actulizar(lineaInvestigacionProyecto);\r\n }\r\n } catch (Exception e) {\r\n }\r\n \r\n }", "private void grabarIndividuoPCO(final ProyectoCarreraOferta proyectoCarreraOferta) {\r\n /**\r\n * PERIODO ACADEMICO ONTOLOGÍA\r\n */\r\n OfertaAcademica ofertaAcademica = ofertaAcademicaService.find(proyectoCarreraOferta.getOfertaAcademicaId());\r\n PeriodoAcademico periodoAcademico = ofertaAcademica.getPeriodoAcademicoId();\r\n PeriodoAcademicoOntDTO periodoAcademicoOntDTO = new PeriodoAcademicoOntDTO(periodoAcademico.getId(), \"S/N\",\r\n cabeceraController.getUtilService().formatoFecha(periodoAcademico.getFechaInicio(), \"yyyy-MM-dd\"),\r\n cabeceraController.getUtilService().formatoFecha(periodoAcademico.getFechaFin(), \"yyyy-MM-dd\"));\r\n cabeceraController.getOntologyService().getPeriodoAcademicoOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getPeriodoAcademicoOntService().write(periodoAcademicoOntDTO);\r\n /**\r\n * OFERTA ACADEMICA ONTOLOGÍA\r\n */\r\n OfertaAcademicaOntDTO ofertaAcademicaOntDTO = new OfertaAcademicaOntDTO(ofertaAcademica.getId(), ofertaAcademica.getNombre(),\r\n cabeceraController.getUtilService().formatoFecha(ofertaAcademica.getFechaInicio(),\r\n \"yyyy-MM-dd\"), cabeceraController.getUtilService().formatoFecha(ofertaAcademica.getFechaFin(), \"yyyy-MM-dd\"),\r\n periodoAcademicoOntDTO);\r\n cabeceraController.getOntologyService().getOfertaAcademicoOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getOfertaAcademicoOntService().write(ofertaAcademicaOntDTO);\r\n\r\n /**\r\n * NIVEL ACADEMICO ONTOLOGIA\r\n */\r\n Carrera carrera = carreraService.find(proyectoCarreraOferta.getCarreraId());\r\n Nivel nivel = carrera.getNivelId();\r\n NivelAcademicoOntDTO nivelAcademicoOntDTO = new NivelAcademicoOntDTO(nivel.getId(), nivel.getNombre(),\r\n cabeceraController.getValueFromProperties(PropertiesFileEnum.URI, \"nivel_academico\"));\r\n cabeceraController.getOntologyService().getNivelAcademicoOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getNivelAcademicoOntService().write(nivelAcademicoOntDTO);\r\n /**\r\n * AREA ACADEMICA ONTOLOGIA\r\n */\r\n AreaAcademicaOntDTO areaAcademicaOntDTO = new AreaAcademicaOntDTO(carrera.getAreaId().getId(), \"UNIVERSIDAD NACIONAL DE LOJA\",\r\n carrera.getAreaId().getNombre(), carrera.getAreaId().getSigla(),\r\n cabeceraController.getValueFromProperties(PropertiesFileEnum.URI, \"area_academica\"));\r\n cabeceraController.getOntologyService().getAreaAcademicaOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getAreaAcademicaOntService().write(areaAcademicaOntDTO);\r\n /**\r\n * CARRERA ONTOLOGÍA\r\n */\r\n CarreraOntDTO carreraOntDTO = new CarreraOntDTO(carrera.getId(), carrera.getNombre(), carrera.getSigla(), nivelAcademicoOntDTO,\r\n areaAcademicaOntDTO);\r\n cabeceraController.getOntologyService().getCarreraOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getCarreraOntService().write(carreraOntDTO);\r\n /**\r\n * PROYECTO CARRERA OFERTA ONTOLOGY\r\n */\r\n \r\n ProyectoCarreraOfertaOntDTO proyectoCarreraOfertaOntDTO = new ProyectoCarreraOfertaOntDTO(proyectoCarreraOferta.getId(),\r\n ofertaAcademicaOntDTO, sessionProyecto.getProyectoOntDTO(), carreraOntDTO);\r\n cabeceraController.getOntologyService().getProyectoCarreraOfertaOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getProyectoCarreraOfertaOntService().write(proyectoCarreraOfertaOntDTO);\r\n }", "public List<SelectItem> getlistEstados() {\n\t\tList<SelectItem> lista = new ArrayList<SelectItem>();\n\t\tlista.add(new SelectItem(Funciones.estadoActivo, Funciones.estadoActivo\n\t\t\t\t+ \" : \" + Funciones.valorEstadoActivo));\n\t\tlista.add(new SelectItem(Funciones.estadoInactivo,\n\t\t\t\tFunciones.estadoInactivo + \" : \"\n\t\t\t\t\t\t+ Funciones.valorEstadoInactivo));\n\t\treturn lista;\n\t}", "private void llenarEntidadConLosDatosDeLosControles() {\n clienteActual.setNombre(txtNombre.getText());\n clienteActual.setApellido(txtApellido.getText());\n clienteActual.setDui(txtDui.getText());\n //clienteActual.setNumero(txtNumero.getText());\n //clienteActual.setNumero(Integer.parseInt(this.txtNumero.getText()));\n clienteActual.setNumero(Integer.parseInt(this.txtNumero.getText()));\n }", "public List<TransporteTerrestreEntity> getTransportes() {\n LOGGER.log(Level.INFO, \"Inicia proceso de consultar todos los transportes.\");\n List<TransporteTerrestreEntity> transportes = persistence.findAll(); \n LOGGER.log(Level.INFO, \"Termina proceso de consultar todos los transportes\");\n return transportes; \n }", "private void getRazonNoData(){\n mRazonNoData = estudioAdapter.getListaRazonNoDataSinEnviar();\n //ca.close();\n }", "private void getDataSalaf(){\n UserAPIService api = Config.getRetrofit().create(UserAPIService.class);\n Call<Value> call = api.lihat_jenis(\"Salaf\");\n call.enqueue(new Callback<Value>() {\n @Override\n public void onResponse(Call<Value> call, Response<Value> response) {\n// pDialog.dismiss();\n String value1 = response.body().getStatus();\n if (value1.equals(\"1\")){\n Value value = response.body();\n resultAlls = new ArrayList<>(Arrays.asList(value.getResult()));\n adapter = new RecyclerAdapterListAll(resultAlls,getApplicationContext());\n recyclerView.setAdapter(adapter);\n }else {\n Toast.makeText(ListPonpesActivity.this,\"Maaf Data Tidak Ada\",Toast.LENGTH_SHORT).show();\n }\n }\n\n @Override\n public void onFailure(Call<Value> call, Throwable t) {\n // pDialog.dismiss();\n Toast.makeText(ListPonpesActivity.this,\"Respon gagal\",Toast.LENGTH_SHORT).show();\n Log.d(\"Hasil internet\",t.toString());\n }\n });\n }", "public void llenarDatosTransaccion(TransactionEntity entity, int indiceLayoutHose){\n //**********************************************************\n int contador = 0;\n Log.v(\"INICIO\",\"**********************************************************\");\n\n Log.v(\"Bomba\",String.valueOf(entity.getIdBomba()));\n //**********************************************************\n //EstadoActual\n int[] tramaEstadoActual = new int[1];\n contador = 0;\n for(int i = 8; i<= 8; i++){\n tramaEstadoActual[contador] = bufferRecepcion[i];\n contador++;\n }\n //String estadoActual = byteArrayToHexString(tramaEstadoActual,tramaEstadoActual.length);\n int estadoActual = Integer.parseInt(byteArrayToHexIntGeneral(tramaEstadoActual,1));\n entity.setEstadoActual(estadoActual);\n\n Log.v(\"Estado\",String.valueOf(entity.getEstadoActual()));\n cambioEstado(indiceLayoutHose, estadoActual);\n\n //**********************************************************\n //Capturar Nro Transaccion\n int[] tramaNroTransaccion = new int[3];\n contador = 0;\n for(int i = 9; i<= 11; i++){\n tramaNroTransaccion[contador] = bufferRecepcion[i];\n contador++;\n }\n String nroTransaccion = \"\" + byteArrayToHexInt(tramaNroTransaccion,tramaNroTransaccion.length);\n entity.setNumeroTransaccion(nroTransaccion);\n Log.v(\"Nro. Transacción\",entity.getNumeroTransaccion());\n\n //**********************************************************\n //Capturar Fecha Inicio\n int[] tramaFechaInicio = new int[1];\n tramaFechaInicio[0] = bufferRecepcion[12];\n String dia = \"\" + byteArrayToHexString(tramaFechaInicio,tramaFechaInicio.length);\n tramaFechaInicio[0] = bufferRecepcion[13];\n String mes = \"\" + byteArrayToHexString(tramaFechaInicio,tramaFechaInicio.length);\n tramaFechaInicio[0] = bufferRecepcion[14];\n String anio = \"20\" + byteArrayToHexString(tramaFechaInicio,tramaFechaInicio.length);\n tramaFechaInicio[0] = bufferRecepcion[17];\n String hora = \"\" + byteArrayToHexString(tramaFechaInicio,tramaFechaInicio.length);\n tramaFechaInicio[0] = bufferRecepcion[16];\n String minuto = \"\" + byteArrayToHexString(tramaFechaInicio,tramaFechaInicio.length);\n tramaFechaInicio[0] = bufferRecepcion[15];\n String segundo = \"\" + byteArrayToHexString(tramaFechaInicio,tramaFechaInicio.length);\n\n String fechaInicio = dia + \"-\" + mes + \"-\" + anio + \"\";\n String horaInicio = hora + \":\" + minuto + \":\" + segundo;\n //fechaInicio = \"\" + hexToAscii(byteArrayToHexString(tramaFechaInicio,tramaFechaInicio.length));\n entity.setFechaInicio(fechaInicio);\n entity.setHoraInicio(horaInicio);\n Log.v(\"Fecha Inicio\",entity.getFechaInicio());\n Log.v(\"Hora Inicio\",entity.getHoraInicio());\n\n //**********************************************************\n //Capturar Turno\n int[] tramaTurno = new int[2];\n contador = 0;\n for(int i = 18; i<= 19; i++){\n tramaTurno[contador] = bufferRecepcion[i];\n contador++;\n }\n int turno = byteArrayToHexInt2(tramaTurno,tramaTurno.length);\n entity.setTurno(turno);\n Log.v(\"Turno\",\"\"+entity.getTurno());\n\n //**********************************************************\n //Numero de Tanque\n int[] tramaNumeroTanque = new int[1];\n contador = 0;\n for(int i = 21; i<= 21; i++){\n tramaNumeroTanque[contador] = bufferRecepcion[i];\n contador++;\n }\n\n int numeroTanque = Integer.parseInt(byteArrayToHexIntGeneral(tramaNumeroTanque,1));\n entity.setNumeroTanque(numeroTanque);\n\n Log.v(\"Tanque\",\"\"+entity.getNumeroTanque());\n\n //**********************************************************\n //Tipo de Vehiculo\n int[] tramaTipoVehiculo = new int[1];\n contador = 0;\n for(int i = 22; i<= 22; i++){\n tramaTipoVehiculo[contador] = bufferRecepcion[i];\n contador++;\n }\n\n int tipoVehiculo = Integer.parseInt(byteArrayToHexIntGeneral(tramaTipoVehiculo,1));\n entity.setTipoVehiculo(tipoVehiculo);\n\n Log.v(\"Tipo Vehiculo\",\"\"+entity.getTipoVehiculo());\n\n\n //**********************************************************\n //Capturar IdVehiculo\n int[] tramaIdVehiculo = new int[8];\n contador = 0;\n for(int i = 23; i<= 30; i++){\n tramaIdVehiculo[contador] = bufferRecepcion[i];\n contador++;\n }\n String IdVehiculo = hexToAscii(byteArrayToHexString(tramaIdVehiculo,tramaIdVehiculo.length));\n entity.setIdVehiculo(IdVehiculo);\n\n Log.v(\"IdVehiculo\",entity.getIdVehiculo());\n\n //**********************************************************\n //Capturar Placa\n int[] tramaPlaca = new int[10];\n contador = 0;\n for(int i = 31; i<= 40; i++){\n tramaPlaca[contador] = bufferRecepcion[i];\n contador++;\n }\n String placa = hexToAscii(byteArrayToHexString(tramaPlaca,tramaPlaca.length));\n entity.setPlaca(placa);\n\n Log.v(\"Placa\",entity.getPlaca());\n\n //**********************************************************\n //Capturar Kilometro\n\n int[] tramaKilometroParteEntera = new int[3];\n contador = 0;\n for(int i = 41; i<= 43; i++){\n tramaKilometroParteEntera[contador] = bufferRecepcion[i];\n contador++;\n }\n int kilometroParteEntera = byteArrayToHexInt(tramaKilometroParteEntera,tramaKilometroParteEntera.length);\n\n int[] tramaKilometroParteDecimal = new int[1];\n contador = 0;\n for(int i = 44; i<= 44; i++){\n tramaKilometroParteDecimal[contador] = bufferRecepcion[i];\n contador++;\n }\n int kilometroParteDecimal = byteArrayToHexInt(tramaKilometroParteDecimal,tramaKilometroParteDecimal.length);\n\n //double kilometro = kilometroParteEntera + kilometroParteDecimal*0.1;\n double kilometro = Double.valueOf(kilometroParteEntera + \".\"+kilometroParteDecimal);\n entity.setKilometraje(\"\"+kilometro);\n\n Log.v(\"Kilometro\",\"\"+kilometro);\n\n //**********************************************************\n //Capturar Horometro\n\n int[] tramaHorometroParteEntera = new int[3];\n contador = 0;\n for(int i = 45; i<= 47; i++){\n tramaHorometroParteEntera[contador] = bufferRecepcion[i];\n contador++;\n }\n int horometroParteEntera = byteArrayToHexInt(tramaHorometroParteEntera,tramaHorometroParteEntera.length);\n\n int[] tramaHorometroParteDecimal = new int[1];\n contador = 0;\n for(int i = 48; i<= 48; i++){\n tramaKilometroParteDecimal[contador] = bufferRecepcion[i];\n contador++;\n }\n\n double horometro = 0.0;\n\n if(tramaHorometroParteDecimal[0]==255){\n horometro = horometroParteEntera/10D;\n }else{\n int horometroParteDecimal = byteArrayToHexInt(tramaKilometroParteDecimal,tramaKilometroParteDecimal.length);\n //horometro = horometroParteEntera + horometroParteDecimal*0.1;\n horometro = Double.valueOf(horometroParteEntera + \".\"+horometroParteDecimal);\n }\n\n entity.setHorometro(\"\"+horometro);\n\n Log.v(\"Horometro\",\"\"+horometro);\n\n //**********************************************************\n //Capturar IdConductor\n int[] tramaIdConductor = new int[8];\n contador = 0;\n for(int i = 49; i<= 56; i++){\n tramaIdConductor[contador] = bufferRecepcion[i];\n contador++;\n }\n String IdConductor = hexToAscii(byteArrayToHexString(tramaIdConductor,tramaIdConductor.length));\n entity.setIdConductor(IdConductor);\n\n Log.v(\"IdConductor\",entity.getIdConductor());\n\n //**********************************************************\n //Capturar IdOperador\n int[] tramaIdOperador = new int[8];\n contador = 0;\n for(int i = 57; i<= 64; i++){\n tramaIdOperador[contador] = bufferRecepcion[i];\n contador++;\n }\n String IdOperador = hexToAscii(byteArrayToHexString(tramaIdOperador,tramaIdOperador.length));\n entity.setIdOperador(IdOperador);\n\n Log.v(\"IdOperador\",entity.getIdOperador());\n\n //**********************************************************\n //Tipo de Transacción\n int[] tramaTipoTransaccion = new int[1];\n contador = 0;\n for(int i = 65; i<= 65; i++){\n tramaTipoTransaccion[contador] = bufferRecepcion[i];\n contador++;\n }\n\n int tipoTransaccion = Integer.parseInt(byteArrayToHexIntGeneral(tramaTipoTransaccion,1));\n entity.setTipoTransaccion(tipoTransaccion);\n\n Log.v(\"Tipo Transacción\",\"\"+entity.getTipoTransaccion());\n\n //**********************************************************\n //Capturar Latitud\n int[] tramaLatitud = new int[12];\n contador = 0;\n for(int i = 66; i<= 77; i++){\n tramaLatitud[contador] = bufferRecepcion[i];\n contador++;\n }\n String latitud = hexToAscii(byteArrayToHexString(tramaLatitud,tramaLatitud.length));\n entity.setLatitud(latitud);\n\n Log.v(\"Latitud\",entity.getLatitud());\n\n //**********************************************************\n //Capturar Longitud\n int[] tramaLongitud = new int[12];\n contador = 0;\n for(int i = 78; i<= 89; i++){\n tramaLongitud[contador] = bufferRecepcion[i];\n contador++;\n }\n String longitud = hexToAscii(byteArrayToHexString(tramaLongitud,tramaLongitud.length));\n entity.setLongitud(longitud);\n\n Log.v(\"Longitud\",entity.getLongitud());\n\n //**********************************************************\n //Capturar Tipo Error Pre-Seteo\n int[] tramaTipoErrorPreseteo = new int[1];\n contador = 0;\n for(int i = 90; i<= 90; i++){\n tramaTipoErrorPreseteo[contador] = bufferRecepcion[i];\n contador++;\n }\n\n int tipoErrorPreseteo= Integer.parseInt(byteArrayToHexIntGeneral(tramaTipoErrorPreseteo,1));\n entity.setTipoErrorPreseteo(tipoErrorPreseteo);\n\n Log.v(\"Tipo Error Preseteo\",\"\"+entity.getTipoErrorPreseteo());\n\n //**********************************************************\n //Capturar Volumen Autorizado\n int[] tramaVolumenAutorizado = new int[2];\n contador = 0;\n for(int i = 91; i<= 92; i++){\n tramaVolumenAutorizado[contador] = bufferRecepcion[i];\n contador++;\n }\n int volumenAutorizado = byteArrayToHexInt2(tramaVolumenAutorizado,tramaVolumenAutorizado.length);\n entity.setVolumenAutorizado(volumenAutorizado);\n Log.v(\"Volumen Autorizado\",\"\"+entity.getVolumenAutorizado());\n\n //**********************************************************\n //Capturar Volumen Aceptado\n int[] tramaVolumenAceptado = new int[2];\n contador = 0;\n for(int i = 93; i<= 94; i++){\n tramaVolumenAceptado[contador] = bufferRecepcion[i];\n contador++;\n }\n int volumenAceptado = byteArrayToHexInt2(tramaVolumenAceptado,tramaVolumenAceptado.length);\n entity.setVolumenAceptado(volumenAceptado);\n Log.v(\"Volumen Aceptado\",\"\"+entity.getVolumenAceptado());\n\n //**********************************************************\n //Capturar Código Cliente\n int[] tramaCodigoCliente = new int[2];\n contador = 0;\n for(int i = 100; i<= 101; i++){\n tramaCodigoCliente[contador] = bufferRecepcion[i];\n contador++;\n }\n int codigoCliente = byteArrayToHexInt2(tramaCodigoCliente,tramaCodigoCliente.length);\n entity.setCodigoCliente(codigoCliente);\n Log.v(\"Codigo Cliente\",\"\"+entity.getCodigoCliente());\n\n //**********************************************************\n //Capturar codigo area\n int[] tramaCodigoArea = new int[1];\n contador = 0;\n for(int i = 102; i<= 102; i++){\n tramaCodigoArea[contador] = bufferRecepcion[i];\n contador++;\n }\n\n int CodigoArea = Integer.parseInt(byteArrayToHexIntGeneral(tramaCodigoArea,1));\n entity.setCodigoArea(CodigoArea);\n\n Log.v(\"Codigo Area\",\"\"+entity.getCodigoArea());\n\n //**********************************************************\n //Capturar tipo TAG\n int[] tramaTipoTAG = new int[1];\n contador = 0;\n for(int i = 103; i<= 103; i++){\n tramaTipoTAG[contador] = bufferRecepcion[i];\n contador++;\n }\n\n int tipoTAG = Integer.parseInt(byteArrayToHexIntGeneral(tramaTipoTAG,1));\n entity.setTipoTag(tipoTAG);\n\n Log.v(\"Tipo TAG\",\"\"+entity.getTipoTag());\n\n //**********************************************************\n //Capturar Volumen Abastecido\n int[] tramaVolumen = new int[9];\n contador = 0;\n for(int i = 104; i<= 112; i++){\n tramaVolumen[contador] = bufferRecepcion[i];\n contador++;\n }\n String volumen = \"\"+ hexToAscii(byteArrayToHexString(tramaVolumen,tramaVolumen.length));\n String[] parts = volumen.split(\"\\\\.\");\n if(parts.length > 1) {\n volumen = parts[0] + \".\" + parts[1].substring(0,(0+entity.getCantidadDecimales()));\n }\n\n entity.setVolumen(volumen);\n\n Log.v(\"Volumen Abastecido\",entity.getVolumen());\n\n //**********************************************************\n //Capturar Temperatura\n int[] tramaTemperatura = new int[5];\n contador = 0;\n for(int i = 113; i<= 117; i++){\n tramaTemperatura[contador] = bufferRecepcion[i];\n contador++;\n }\n String temperatura = \"\" + hexToAscii(byteArrayToHexString(tramaTemperatura,tramaTemperatura.length));\n temperatura = temperatura.substring(0,temperatura.length()-1);\n entity.setTemperatura(temperatura);\n\n Log.v(\"Temperatura\",entity.getTemperatura());\n\n //**********************************************************\n //Capturar Fecha Fin\n int[] tramaFechaFin = new int[1];\n tramaFechaFin[0] = bufferRecepcion[118];\n String diaFin = \"\" + byteArrayToHexString(tramaFechaFin,tramaFechaFin.length);\n tramaFechaFin[0] = bufferRecepcion[119];\n String mesFin = \"\" + byteArrayToHexString(tramaFechaFin,tramaFechaFin.length);\n tramaFechaFin[0] = bufferRecepcion[120];\n String anioFin = \"20\" + byteArrayToHexString(tramaFechaFin,tramaFechaFin.length);\n tramaFechaFin[0] = bufferRecepcion[123];\n String horaFin = \"\" + byteArrayToHexString(tramaFechaFin,tramaFechaFin.length);\n tramaFechaFin[0] = bufferRecepcion[122];\n String minutoFin = \"\" + byteArrayToHexString(tramaFechaFin,tramaFechaFin.length);\n tramaFechaFin[0] = bufferRecepcion[121];\n String segundoFin = \"\" + byteArrayToHexString(tramaFechaFin,tramaFechaFin.length);\n\n String fechaFin = diaFin + \"-\" + mesFin + \"-\" + anioFin + \"\" ;\n String horaFin1 = horaFin + \":\" + minutoFin + \":\" + segundoFin;\n //fechaInicio = \"\" + hexToAscii(byteArrayToHexString(tramaFechaInicio,tramaFechaInicio.length));\n entity.setFechaFin(fechaFin);\n entity.setHoraFin(horaFin1);\n\n Log.v(\"Fecha Fin\",entity.getFechaFin());\n Log.v(\"Hora Fin\",entity.getHoraFin());\n\n //**********************************************************\n //Capturar Tipo de Cierre\n int[] tramaTipoCierre = new int[1];\n contador = 0;\n for(int i = 124; i<= 124; i++){\n tramaTipoCierre[contador] = bufferRecepcion[i];\n contador++;\n }\n\n int tipoCierre = Integer.parseInt(byteArrayToHexIntGeneral(tramaTipoCierre,1));\n entity.setTipoCierre(tipoCierre);\n\n Log.v(\"Tipo Cierre\",\"\"+entity.getTipoCierre());\n\n txt_galones = (TextView) layoutsHose.get(indiceLayoutHose).inflater.findViewById(R.id.txt_galones);\n txt_ultimo_ticket = (TextView) layoutsHose.get(indiceLayoutHose).inflater.findViewById(R.id.txt_ultimo_ticket);\n txt_placa = layoutsHose.get(indiceLayoutHose).inflater.findViewById(R.id.txt_placa);\n txt_producto = layoutsHose.get(indiceLayoutHose).inflater.findViewById(R.id.txt_producto);\n txt_ultimo_galon_p2 = layoutsHose.get(indiceLayoutHose).inflater.findViewById(R.id.txt_ultimo_galon_p2);\n txt_ultimo_ticket_p2= layoutsHose.get(indiceLayoutHose).inflater.findViewById(R.id.txt_ultimo_ticket_p2);\n\n txt_producto.setText(entity.getNombreProducto());\n txt_placa.setText(entity.getPlaca());\n txt_galones.setText(entity.getVolumen());\n txt_ultimo_galon_p2.setText(entity.getVolumen());\n txt_ultimo_ticket.setText(entity.getNumeroTransaccion());\n txt_ultimo_ticket_p2.setText(entity.getNumeroTransaccion());\n\n\n guardarTransaccionBD(entity);\n\n }", "public String cambiarEstado() {\n\t\ttry {\n\t\t\tMensaje.crearMensajeINFO(managergest.cambioEstadoItem(getOfertadelsita().getOferId()));\n\t\t\tgetListaOferta().clear();\n\t\t\tgetListaOferta().addAll(managergest.findAllofertasOrdenadas());\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn \"\";\n\t}", "public void buscarEstudiante(String codEstudiante){\n estudianteModificar=new Estudiante();\n estudianteGradoModificar=new EstudianteGrado();\n StringBuilder query=new StringBuilder();\n query.append(\"select e.idestudiante,e.nombre,e.apellido,e.ci,e.cod_est,e.idgrado,e.idcurso,g.grado,c.nombre_curso \" );\n query.append(\" from estudiante e \");\n query.append(\" inner join grado g on e.idgrado=g.idgrado \");\n query.append(\" inner join cursos c on e.idcurso=c.idcurso \");\n query.append(\" where idestudiante=? \");\n try {\n PreparedStatement pst=connection.prepareStatement(query.toString());\n pst.setInt(1, Integer.parseInt(codEstudiante));\n ResultSet resultado=pst.executeQuery();\n //utilizamos una condicion porque la busqueda nos devuelve 1 registro\n if(resultado.next()){\n //cargando la informacion a nuestro objeto categoriaModificarde tipo categoria\n estudianteModificar.setCodEstudiante(resultado.getInt(1));\n estudianteModificar.setNomEstudiante(resultado.getString(2));\n estudianteModificar.setApEstudiante(resultado.getString(3));\n estudianteModificar.setCiEstudiante(resultado.getInt(4));\n estudianteModificar.setCodigoEstudiante(resultado.getString(5));\n estudianteModificar.setIdgradoEstudiante(resultado.getInt(6));\n estudianteModificar.setIdCursoEstudiante(resultado.getInt(7));\n estudianteGradoModificar.setNomGrado(resultado.getString(8));\n estudianteGradoModificar.setNomCurso(resultado.getString(9));\n }\n } catch (SQLException e) {\n System.out.println(\"Error de conexion\");\n e.printStackTrace();\n }\n }", "public void recibir_estado_partida(){\n\n }" ]
[ "0.66409963", "0.65409213", "0.6371203", "0.63184637", "0.6279996", "0.62182254", "0.61429507", "0.6114012", "0.6101791", "0.61003745", "0.60913527", "0.6069392", "0.6037395", "0.60159814", "0.60034955", "0.59851193", "0.5973809", "0.5972739", "0.5957089", "0.5950152", "0.59379643", "0.59159577", "0.5908166", "0.59073645", "0.58903766", "0.58879805", "0.5887195", "0.58735", "0.58654153", "0.5850194", "0.5825743", "0.58216023", "0.5813747", "0.5807969", "0.57985616", "0.5786549", "0.5783818", "0.57798976", "0.57744753", "0.5772202", "0.57716346", "0.57669497", "0.57630295", "0.57620215", "0.57509834", "0.574497", "0.57447994", "0.57371736", "0.57339555", "0.5724697", "0.5721609", "0.5717976", "0.5714625", "0.57115424", "0.5708295", "0.56991947", "0.5695268", "0.5694233", "0.56885785", "0.56877905", "0.5669451", "0.5667499", "0.56672007", "0.56647474", "0.56640315", "0.56638116", "0.5659768", "0.5656171", "0.565091", "0.56457204", "0.5639607", "0.56355524", "0.5633098", "0.5632648", "0.5628216", "0.5626648", "0.5626322", "0.5626136", "0.5621234", "0.56187236", "0.56173193", "0.56154037", "0.5613423", "0.5613158", "0.5611969", "0.56114763", "0.5609664", "0.5608844", "0.5605812", "0.5601822", "0.55979747", "0.5592629", "0.55919665", "0.55912787", "0.5587081", "0.5584664", "0.5580023", "0.5575002", "0.5572656", "0.55726516" ]
0.59028685
24
TODO Autogenerated method stub
public static void main(String[] args) { int[] arr = {60,12,8,24,32}; bubbleSort(arr); for(int i=0;i<arr.length;i++) { System.out.println(arr[i]); } }
{ "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
add the pref from the xml file
@Override public void onCreatePreferences(Bundle bundle, String s) { addPreferencesFromResource(R.xml.pref); sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getActivity()); //onSharedPreferenceChanged(sharedPreferences, getString(R.string.language_key)); onSharedPreferenceChanged(sharedPreferences, getString(R.string.difficulty_key)); onSharedPreferenceChanged(sharedPreferences, getString(R.string.word_category_key)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onCreatePreferences(Bundle bundle, String s) {\n addPreferencesFromResource(R.xml.preferences);\n }", "public XmlParserPref(Context cont, String name) {\n\t\tcontext = cont;\n\t\tprefEdit = PreferenceManager.getDefaultSharedPreferences(context).edit();\n\t\tprofileName = name;\n\t}", "@Override\r\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\r\n getPreferenceManager().setSharedPreferencesName(PreferManager.PPEFER_FILE);\r\n addPreferencesFromResource(R.xml.preference);\r\n }", "public void loadFromLocalXML(Context context) {\n\n AccountManager.getInstance().reset();\n int _cnt = PreferenceManager.getDefaultSharedPreferences(context).getInt(\"Account_amount\", 0);\n for (int _iter = 0; _iter < _cnt; _iter++) {\n String[] _tmp;\n _tmp = PreferenceManager.getDefaultSharedPreferences(context).getString(\"Account_\" + String.valueOf(_iter), \"\").split(String.valueOf(separator));\n this.addAccount(_tmp[0], _tmp[1], _tmp[2], Integer.valueOf(_tmp[3]));\n }\n\n }", "@Override\n public void onCreate(@Nullable Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n addPreferencesFromResource(R.xml.settings);\n }", "@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\taddPreferencesFromResource(R.xml.task_preference);\r\n\t}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tPreferenceManager prefMgr = getPreferenceManager();\n\t\tprefMgr.setSharedPreferencesName(\"appPreferences\");\n\t\t\n\t\taddPreferencesFromResource(R.xml.mappreference);\n\t}", "@SuppressWarnings(\"deprecation\")\n\t@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\t\n\t\taddPreferencesFromResource(R.xml.preference);\n\t}", "public void fromXML ( Element element )\r\n {\n String name = element.getAttribute( \"name\" );\r\n if ( name.compareTo( gadgetclass.getName() ) == 0 )\r\n {\r\n // load each user preference\r\n NodeList userPrefs = element.getElementsByTagName( \"UserPref\" );\r\n for ( int i = 0; i < userPrefs.getLength(); i++ )\r\n {\r\n Element prefElement = (Element) userPrefs.item( i );\r\n String prefName = prefElement.getAttribute( \"name\" );\r\n Text prefValue = (Text) prefElement.getChildNodes().item( 0 );\r\n for ( int j = 0; j < gadgetclass.getUserPrefsCount(); j++ )\r\n {\r\n UserPref up = gadgetclass.getUserPref( i );\r\n if ( prefName.compareTo( up.getName() ) == 0 )\r\n {\r\n setUserPrefValue( up, prefValue.getNodeValue() );\r\n j = gadgetclass.getUserPrefsCount();\r\n }\r\n }\r\n }\r\n }\r\n }", "public void loadPreferecences()\n {\n // Load preferences for chapter\n chapterPref = Activator.getDefault().getPluginPreferences().getBoolean(PREFERENCE_FOR_CHAPTER);\n if (controller != null)\n { \n\t\t\tcontroller.setHierarchical(chapterPref);\n\t\t}\n // Load preferences for value to recognize req\n String pref = Activator.getDefault().getPluginPreferences().getString(PREFERENCE_FOR_VALUE_TO_RECOGNIZE_REQ);\n if (pref != null && pref.length() > 0)\n {\n Serializer<RecognizedElement> serializer = new Serializer<RecognizedElement>();\n RecognizedElement element = serializer.unSerialize(pref);\n if (element != null)\n {\n valueToRecognizeReq = element;\n }\n }\n\n // Load preferences for attributes list\n pref = Activator.getDefault().getPluginPreferences().getString(PREFERENCE_FOR_LIST_RECOGNIZED_ELEMENT);\n if (pref != null && pref.length() > 0)\n {\n Serializer<Collection<RecognizedElement>> serializer = new Serializer<Collection<RecognizedElement>>();\n Collection<RecognizedElement> paramDecoded = serializer.unSerialize(pref);\n if (paramDecoded != null && paramDecoded.size() > 0)\n {\n for (Iterator<RecognizedElement> iterator = paramDecoded.iterator(); iterator.hasNext();)\n {\n tree.add((RecognizedElement) iterator.next());\n }\n }\n }\n \n // Load preferences for the description\n descriptionChecked = Activator.getDefault().getPluginPreferences().getBoolean(PREFERENCE_FOR_DESCRIPTION);\n }", "@Override\r\n \tpublic void onCreate() {\r\n \t\tsuper.onCreate();\r\n \t\t// keep a copy of resources for later use in application\r\n \t\tres = getResources();\r\n \t\t// read preferences\r\n \t\treadPreferences();\r\n \t}", "@Override \r\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState); \r\n addPreferencesFromResource(R.xml.preference);\r\n initPreferenceCategory(\"pref_key_allow_typedefine_commond\");\r\n }", "@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\taddPreferencesFromResource(R.xml.talk_robot_settings);\n\t}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tprefMgr = getPreferenceManager();\n\t\t\n\t\taddPreferencesFromResource(R.xml.layout_pref);\n\t\t\n\t\tprefName = (EditTextPreference) prefMgr.findPreference(\"name\");\n\t\tprefName.setSummary(prefName.getText());\n\t\t\n\t\tprefName.setOnPreferenceChangeListener(new OnPreferenceChangeListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic boolean onPreferenceChange(Preference preference, Object newValue) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t\tprefName.setSummary((CharSequence) newValue);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t});\n\t}", "private static void ImportSubtree(Preferences prefsNode, Element xmlNode) {\n List<Element> xmlKids = getChildElements(xmlNode);\n synchronized (((AbstractPreferences) prefsNode).lock) {\n if (((AbstractPreferences) prefsNode).isRemoved()) {\n return;\n }\n ImportPrefs(prefsNode, (Element) xmlKids.get(0));\n Preferences[] prefsKids = new Preferences[(xmlKids.size() - 1)];\n for (int i = 1; i < xmlKids.size(); i++) {\n prefsKids[i - 1] = prefsNode.node(((Element) xmlKids.get(i)).getAttribute(\"name\"));\n }\n }\n }", "void loadConfig() {\r\n\t\tFile file = new File(\"open-ig-mapeditor-config.xml\");\r\n\t\tif (file.canRead()) {\r\n\t\t\ttry {\r\n\t\t\t\tElement root = XML.openXML(file);\r\n\t\t\t\t\r\n\t\t\t\t// reposition the window\r\n\t\t\t\tElement eWindow = XML.childElement(root, \"window\");\r\n\t\t\t\tif (eWindow != null) {\r\n\t\t\t\t\tsetBounds(\r\n\t\t\t\t\t\tInteger.parseInt(eWindow.getAttribute(\"x\")),\r\n\t\t\t\t\t\tInteger.parseInt(eWindow.getAttribute(\"y\")),\r\n\t\t\t\t\t\tInteger.parseInt(eWindow.getAttribute(\"width\")),\r\n\t\t\t\t\t\tInteger.parseInt(eWindow.getAttribute(\"height\"))\r\n\t\t\t\t\t);\r\n\t\t\t\t\tsetExtendedState(Integer.parseInt(eWindow.getAttribute(\"state\")));\r\n\t\t\t\t}\r\n\t\t\t\tElement eLanguage = XML.childElement(root, \"language\");\r\n\t\t\t\tif (eLanguage != null) {\r\n\t\t\t\t\tString langId = eLanguage.getAttribute(\"id\");\r\n\t\t\t\t\tif (\"hu\".equals(langId)) {\r\n\t\t\t\t\t\tui.languageHu.setSelected(true);\r\n\t\t\t\t\t\tui.languageHu.doClick();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tui.languageEn.setSelected(true);\r\n\t\t\t\t\t\tui.languageEn.doClick();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tElement eSplitters = XML.childElement(root, \"splitters\");\r\n\t\t\t\tif (eSplitters != null) {\r\n\t\t\t\t\tsplit.setDividerLocation(Integer.parseInt(eSplitters.getAttribute(\"main\")));\r\n\t\t\t\t\ttoolSplit.setDividerLocation(Integer.parseInt(eSplitters.getAttribute(\"preview\")));\r\n\t\t\t\t\tfeaturesSplit.setDividerLocation(Integer.parseInt(eSplitters.getAttribute(\"surfaces\")));\r\n\t\t\t\t}\r\n\r\n\t\t\t\tElement eTabs = XML.childElement(root, \"tabs\");\r\n\t\t\t\tif (eTabs != null) {\r\n\t\t\t\t\tpropertyTab.setSelectedIndex(Integer.parseInt(eTabs.getAttribute(\"selected\")));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tElement eLights = XML.childElement(root, \"lights\");\r\n\t\t\t\tif (eLights != null) {\r\n\t\t\t\t\talphaSlider.setValue(Integer.parseInt(eLights.getAttribute(\"preview\")));\r\n\t\t\t\t\talpha = Float.parseFloat(eLights.getAttribute(\"map\"));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tElement eMode = XML.childElement(root, \"editmode\");\r\n\t\t\t\tif (eMode != null) {\r\n\t\t\t\t\tif (\"true\".equals(eMode.getAttribute(\"type\"))) {\r\n\t\t\t\t\t\tui.buildButton.doClick();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tElement eView = XML.childElement(root, \"view\");\r\n\t\t\t\tif (eView != null) {\r\n\t\t\t\t\tui.viewShowBuildings.setSelected(false);\r\n\t\t\t\t\tif (\"true\".equals(eView.getAttribute(\"buildings\"))) {\r\n\t\t\t\t\t\tui.viewShowBuildings.doClick();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tui.viewSymbolicBuildings.setSelected(false);\r\n\t\t\t\t\tif (\"true\".equals(eView.getAttribute(\"minimap\"))) {\r\n\t\t\t\t\t\tui.viewSymbolicBuildings.doClick();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tui.viewTextBackgrounds.setSelected(false);\r\n\t\t\t\t\tif (\"true\".equals(eView.getAttribute(\"textboxes\"))) {\r\n\t\t\t\t\t\tui.viewTextBackgrounds.doClick();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tui.viewTextBackgrounds.setSelected(false);\r\n\t\t\t\t\tif (\"true\".equals(eView.getAttribute(\"textboxes\"))) {\r\n\t\t\t\t\t\tui.viewTextBackgrounds.doClick();\r\n\t\t\t\t\t}\r\n\t\t\t\t\trenderer.scale = Double.parseDouble(eView.getAttribute(\"zoom\"));\r\n\t\t\t\t\t\r\n\t\t\t\t\tui.viewStandardFonts.setSelected(\"true\".equals(eView.getAttribute(\"standard-fonts\")));\r\n\t\t\t\t\tui.viewPlacementHints.setSelected(!\"true\".equals(eView.getAttribute(\"placement-hints\")));\r\n\t\t\t\t\tui.viewPlacementHints.doClick();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tElement eSurfaces = XML.childElement(root, \"custom-surface-names\");\r\n\t\t\t\tif (eSurfaces != null) {\r\n\t\t\t\t\tfor (Element tile : XML.childrenWithName(eSurfaces, \"tile\")) {\r\n\t\t\t\t\t\tTileEntry te = new TileEntry();\r\n\t\t\t\t\t\tte.id = Integer.parseInt(tile.getAttribute(\"id\"));\r\n\t\t\t\t\t\tte.surface = tile.getAttribute(\"type\");\r\n\t\t\t\t\t\tte.name = tile.getAttribute(\"name\");\r\n\t\t\t\t\t\tcustomSurfaceNames.add(te);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tElement eBuildigns = XML.childElement(root, \"custom-building-names\");\r\n\t\t\t\tif (eBuildigns != null) {\r\n\t\t\t\t\tfor (Element tile : XML.childrenWithName(eBuildigns, \"tile\")) {\r\n\t\t\t\t\t\tTileEntry te = new TileEntry();\r\n\t\t\t\t\t\tte.id = Integer.parseInt(tile.getAttribute(\"id\"));\r\n\t\t\t\t\t\tte.surface = tile.getAttribute(\"type\");\r\n\t\t\t\t\t\tte.name = tile.getAttribute(\"name\");\r\n\t\t\t\t\t\tcustomBuildingNames.add(te);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tElement eFilter = XML.childElement(root, \"filter\");\r\n\t\t\t\tif (eFilter != null) {\r\n\t\t\t\t\tfilterSurface.setText(eFilter.getAttribute(\"surface\"));\r\n\t\t\t\t\tfilterBuilding.setText(eFilter.getAttribute(\"building\"));\r\n\t\t\t\t}\r\n\t\t\t\tElement eAlloc = XML.childElement(root, \"allocation\");\r\n\t\t\t\tif (eAlloc != null) {\r\n\t\t\t\t\tui.allocationPanel.availableWorkers.setText(eAlloc.getAttribute(\"worker\"));\r\n\t\t\t\t\tui.allocationPanel.strategies.setSelectedIndex(Integer.parseInt(eAlloc.getAttribute(\"strategy\")));\r\n\t\t\t\t}\r\n\t\t\t\tElement eRecent = XML.childElement(root, \"recent\");\r\n\t\t\t\tif (eRecent != null) {\r\n\t\t\t\t\tfor (Element r : XML.childrenWithName(eRecent, \"entry\")) {\r\n\t\t\t\t\t\taddRecentEntry(r.getAttribute(\"file\")); \r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} catch (IOException ex) {\r\n\t\t\t\tex.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void addPreferencesFromResource(int preferencesResId, @Nonnull Context themeContext) {\n\t\ttry {\n\t\t\tMethod m = PreferenceManager.class.getDeclaredMethod(\"inflateFromResource\", Context.class, int.class, PreferenceScreen.class);\n\t\t\tm.setAccessible(true);\n\t\t\tfinal PreferenceScreen preferenceScreen = (PreferenceScreen) m.invoke(preferenceManager, themeContext, preferencesResId, getPreferenceScreen());\n\t\t\tif (preferenceScreen != null) {\n\t\t\t\tsetPreferenceScreen(preferenceScreen);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}", "private void readAndApplyTags(XmlPullParser parser) throws XmlPullParserException, IOException {\n\n\t\tprefEdit.putString(\"name\", profileName);\n\n\t\tparser.require(XmlPullParser.START_TAG, null, \"resources\");\n\n\t\twhile (parser.next() != XmlPullParser.END_TAG) {\n\n if (parser.getEventType() != XmlPullParser.START_TAG) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tString name = parser.getName();\n\n switch (name) {\n case \"lockscreen\":\n setLockscreen(parser);\n break;\n case \"wifi\":\n setWifi(parser);\n break;\n case \"mobile_data\":\n setMobileData(parser);\n break;\n case \"bluetooth\":\n setBluetooth(parser);\n break;\n case \"display\":\n setDisplay(parser);\n break;\n case \"ringer_mode\":\n setRingerMode(parser);\n break;\n default:\n Log.i(\"XmlParser\", \"Skip!\");\n parser.nextTag();\n break;\n }\n\t\t\tprefEdit.commit();\n\t\t}\n\t}", "public void loadConfig(XMLElement xml) {\r\n\r\n }", "protected void onPref(String name, String value){}", "@Override\n public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {\n setPreferencesFromResource(R.xml.preferences, rootKey);\n }", "private static void putPreferencesInXml(Element elt, Document doc, Preferences prefs, boolean subTree) throws BackingStoreException {\n Preferences[] kidsCopy = null;\n String[] kidNames = null;\n synchronized (((AbstractPreferences) prefs).lock) {\n if (((AbstractPreferences) prefs).isRemoved()) {\n elt.getParentNode().removeChild(elt);\n return;\n }\n int i;\n String[] keys = prefs.keys();\n Element map = (Element) elt.appendChild(doc.createElement(PolicyMappingsExtension.MAP));\n for (i = 0; i < keys.length; i++) {\n Element entry = (Element) map.appendChild(doc.createElement(\"entry\"));\n entry.setAttribute(\"key\", keys[i]);\n entry.setAttribute(\"value\", prefs.get(keys[i], null));\n }\n if (subTree) {\n kidNames = prefs.childrenNames();\n kidsCopy = new Preferences[kidNames.length];\n for (i = 0; i < kidNames.length; i++) {\n kidsCopy[i] = prefs.node(kidNames[i]);\n }\n }\n }\n }", "public static void loadXml(XML xml) {\n if (xml.getChild(\"shortcut\") == null) {\n KyUI.err(\"ShortcutLoader - failed to load shortcut xml : xml has no shortcut section.\");\n return;\n }\n xml=xml.getChild(\"shortcut\");\n XML[] data=xml.getChildren(\"shortcut\");\n for (XML d : data) {\n KyUI.addShortcut(new KyUI.Shortcut(d.getContent(), b(d.getString(\"ctrl\")), b(d.getString(\"alt\")), b(d.getString(\"shift\")), d.getInt(\"key\"), d.getInt(\"keyCode\"), null));\n }\n }", "public void readxml() throws JAXBException, FileNotFoundException {\n Player loadplayer = xml_methods.load();\n logger.info(\"player name: \" + loadplayer.getName());\n if (!item.isEmpty()) {\n logger.trace(loadplayer.getitem(0).getName());\n }\n tfName.setText(loadplayer.getName());\n isset = true;\n player = loadplayer;\n\n }", "public void load () {\n hasSoundOn = preference.getBoolean(\"sound effect\", true);\n hasMusicOn = preference.getBoolean(\"background music\", true);\n soundVolume = MathUtils.clamp(preference.getFloat(\"sound volume\", 0.5f), 0.0f, 1.0f);\n musicVolume = MathUtils.clamp(preference.getFloat(\"music volume\", 0.5f), 0.0f, 1.0f);\n }", "private void jButtonCreateInsexActionPerformed(java.awt.event.ActionEvent evt) {\n try {\n lstPerson = new ArrayList();\n Properties prop = new Properties();//почти тоже самое что ini файлы\n content = Files.readAllLines(Paths.get(PATH_FILE_SOURCE), Charset.forName(\"cp1251\"));\n String s = content.get(0);\n for (int i = 0, j = 1; i < s.length(); i += 128, j++) {\n Person p = new Person(\n s.substring(i, i + 30).trim(),\n s.substring(i + 30, i + 50).trim(),\n s.substring(i + 50, i + 70).trim(),\n s.substring(i + 70, i + 78).trim(),\n s.substring(i + 78).trim(), j);\n lstPerson.add(p);\n }\n\n for (Person person : lstPerson) {\n prop.put(person.getSurname().toUpperCase(), Integer.toString(person.getID()));\n }\n prop.storeToXML(new FileOutputStream(FILE_PATH_INDEX_SURNAME), \"LIB\");//можно и без xml\n jLabelStatusBar.setForeground(Color.magenta);\n jLabelStatusBar.setText(\"Индексный файл создан!\");\n jLabelStatusBar.setForeground(Color.BLACK);\n\n } catch (IOException ex) {\n jLabelStatusBar.setForeground(Color.red);\n jLabelStatusBar.setText(\"Индексный файл не создан!\");\n Logger.getLogger(NewJFrame1.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void load()\n\t{\n\t\ttry {\n\t\t\tIFile file = project.getFile(PLAM_FILENAME);\n\t\t if (file.exists()) {\n\t\t\t\tInputStream stream= null;\n\t\t\t\ttry {\n\t\t\t\t\tstream = new BufferedInputStream(file.getContents(true));\n\t\t\t\t SAXReader reader = new SAXReader();\n\t\t\t\t Document document = reader.read(stream);\n\t\t\t\t \n\t\t\t\t Element root = document.getRootElement();\n\n\t\t\t\t String url = root.elementTextTrim(\"server-url\");\n\t\t\t\t setServerURL((url != null) ? new URL(url) : null);\n\t\t\t\t \n\t\t\t\t setUserName(root.elementTextTrim(\"username\"));\n\t\t\t\t setPassword(root.elementTextTrim(\"password\"));\n\t\t\t\t setProductlineId(root.elementTextTrim(\"pl-id\"));\n \n\t\t\t\t} catch (CoreException e) {\n\t\t\t\t\t\n\t\t\t\t} finally {\n\t\t\t\t if (stream != null)\n\t\t\t\t stream.close();\n\t\t\t\t}\n\t\t }\n\t\t} catch (DocumentException e) {\n\t\t\tlogger.info(\"Error while parsing PLAM config.\", e);\n\t\t} catch (IOException e) {\n\t\t}\n\t}", "public void savetoxml() throws FileNotFoundException, JAXBException {\n xml_methods.save(player);\n }", "public void setPreference() {\n prefs = Preferences.userRoot().node(this.getClass().getName());\n String ID1 = \"Test1\";\n String ID2 = \"Test2\";\n String ID3 = \"Test3\";\n// First we will get the values\n// Define a boolean value\n System.out.println(prefs.getBoolean(ID1, true));\n// Define a string with default \"Hello World\n System.out.println(prefs.get(ID2, \"Hello World\"));\n// Define a integer with default 50\n System.out.println(prefs.getInt(ID3, 50));\n// Now set the values\n prefs.putBoolean(ID1, false);\n prefs.put(ID2, \"Hello Europa\");\n prefs.putInt(ID3, 45);\n\t\t\n prefs.remove(ID1);// Delete the preference settings for the first value\n }", "public void showLoadXML(Properties p);", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n addPreferencesFromResource(R.xml.settings_main);\n // Find the preference we’re interested in and then bind the current preference value to be displayed\n // Use its findPreference() method to get the Preference object. To help us with binding the value that’s in SharedPreferences to what will show up in the preference summary, we’ll create a help method and call it\n Preference minNews = findPreference(getString(R.string.settings_number_of_news_key));\n // in order to update the preference summary when the settings activity is launched we setup the bindPreferenceSummaryToValue() helper method and which we used in onCreate()\n bindPreferenceSummaryToValue(minNews);\n\n Preference orderBy = findPreference(getString(R.string.settings_order_by_key));\n bindPreferenceSummaryToValue(orderBy);\n\n }", "void setup(String value, String loadResource, String saveResource);", "public void toXML ( Element element )\r\n {\n element.setAttribute( \"name\", gadgetclass.getName() );\r\n\r\n // add each user preference\r\n for ( int i = 0; i < gadgetclass.getUserPrefsCount(); i++ )\r\n {\r\n UserPref up = gadgetclass.getUserPref( i );\r\n Object pref = getUserPrefValue( up );\r\n Element prefElement = element.getOwnerDocument().createElement(\r\n \"UserPref\" );\r\n prefElement.setAttribute( \"name\", up.getName() );\r\n Text prefText = element.getOwnerDocument().createTextNode(\r\n pref.toString() );\r\n prefElement.appendChild( prefText );\r\n element.appendChild( prefElement );\r\n }\r\n }", "@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\taddPreferencesFromResource(net.zhuoweizhang.mcpelauncher.R.xml.preferences);\n\t\ttexturePackPreference = findPreference(\"zz_texture_pack\");\n\t\tif (texturePackPreference != null) texturePackPreference.setOnPreferenceClickListener(this);\n\t\ttexturePackEnablePreference = findPreference(\"zz_texture_pack_enable\");\n\t\tif (texturePackEnablePreference != null) texturePackEnablePreference.setOnPreferenceClickListener(this);\n\t\ttexturePackDemoPreference = findPreference(\"zz_texture_pack_demo\");\n\t\tif (texturePackDemoPreference != null) texturePackDemoPreference.setOnPreferenceClickListener(this);\n\t\tmanagePatchesPreference = findPreference(\"zz_manage_patches\");\n\t\tmanagePatchesPreference.setOnPreferenceClickListener(this);\n\t\tsafeModePreference = findPreference(\"zz_safe_mode\");\n\t\tsafeModePreference.setOnPreferenceClickListener(this);\n\t\taboutPreference = findPreference(\"zz_about\");\n\t\taboutPreference.setOnPreferenceClickListener(this);\n\t\tgetProPreference = findPreference(\"zz_get_pro\");\n\t\tif (getProPreference != null) getProPreference.setOnPreferenceClickListener(this);\n\t\tloadNativeAddonsPreference = findPreference(\"zz_load_native_addons\");\n\t\tif (loadNativeAddonsPreference != null) loadNativeAddonsPreference.setOnPreferenceClickListener(this);\n\t\textractOriginalTexturesPreference = findPreference(\"zz_extract_original_textures\");\n\t\tif (extractOriginalTexturesPreference != null) {\n\t\t\textractOriginalTexturesPreference.setOnPreferenceClickListener(this);\n\t\t\tif (Build.VERSION.SDK_INT < 16 /*Build.VERSION_CODES.JELLY_BEAN*/) { //MCPE original textures not accessible on Jelly Bean\n\t\t\t\tgetPreferenceScreen().removePreference(extractOriginalTexturesPreference);\n\t\t\t}\n\t\t}\n\t\tskinPreference = findPreference(\"zz_skin\");\n\t\tif (skinPreference != null) skinPreference.setOnPreferenceClickListener(this);\n\t\tmanageAddonsPreference = findPreference(\"zz_manage_addons\");\n\t\tif (manageAddonsPreference != null) manageAddonsPreference.setOnPreferenceClickListener(this);\n\t}", "private void loadFromXml(String fileName) throws IOException {\n\t\tElement root = new XmlReader().parse(Gdx.files.internal(fileName));\n\n\t\tthis.name = root.get(\"name\");\n\t\tGdx.app.log(\"Tactic\", \"Loading \" + this.name + \"...\");\n\n\t\tArray<Element> players = root.getChildrenByName(\"player\");\n\t\tint playerIndex = 0;\n\t\tfor (Element player : players) {\n\t\t\t//int shirt = player.getInt(\"shirt\"); // shirt number\n\t\t\t//Gdx.app.log(\"Tactic\", \"Location for player number \" + shirt);\n\n\t\t\t// regions\n\t\t\tArray<Element> regions = player.getChildrenByName(\"region\");\n\t\t\tfor (Element region : regions) {\n\t\t\t\tString regionName = region.get(\"name\"); // region name\n\n\t\t\t\tthis.locations[playerIndex][Location.valueOf(regionName).ordinal()] = new Vector2(region.getFloat(\"x\"), region.getFloat(\"y\"));\n\n\t\t\t\t//Gdx.app.log(\"Tactic\", locationId + \" read\");\n\t\t\t}\n\t\t\tplayerIndex++;\n\t\t}\t\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n \n ThemeApplication.activities.add(this);\n \n addPreferencesFromResource(R.xml.customize);\n\n }", "public Preferences(Arguments args) {\r\n\t\tsuper(Preferences.Key.class);\r\n\t\tportable = args.getBool(Arguments.Key.PORTABLE);\r\n\r\n\t\tFile file = new File(args.getPath(), FileAtlas.PREF_FILENAME);\r\n\t\ttry (\tFileInputStream input = new FileInputStream(file);\r\n\t\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(input)) ) {\r\n\t\t\tString line;\r\n\t\t\twhile ((line = reader.readLine()) != null) {\r\n\t\t\t\tif (line.length() < 1 || line.charAt(0) == '#')\r\n\t\t\t\t\tcontinue;\r\n\r\n\t\t\t\tint split = line.indexOf('=');\r\n\t\t\t\tif (split > -1) {\r\n\t\t\t\t\tKey key = Key.fromId(line.substring(0, split));\r\n\r\n\t\t\t\t\tif (key != null)\r\n\t\t\t\t\t\tmap.put(key, line.substring(split+1));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.out.println(\"Unable to load runeframe.pref\");\r\n\t\t}\r\n\t}", "@Override\n public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {\n setPreferencesFromResource(R.xml.prefs, rootKey);\n setVersionName();\n }", "private static boolean loadSharedPreferencesFromFile(File src) {\n\t\tboolean res = false;\n\t\tObjectInputStream input = null;\n\t\ttry {\n\t\t\tinput = new ObjectInputStream(new FileInputStream(src));\n\t\t\tEditor prefEdit = PreferenceManager.getDefaultSharedPreferences(mContext).edit();\n\t\t\tprefEdit.clear();\n\t\t\t// first object is preferences\n\t\t\tMap<String, ?> entries = (Map<String, ?>) input.readObject();\n\t\t\t\t\n\t\t\tfor (Entry<String, ?> entry : entries.entrySet()) {\n\t\t\t\tObject v = entry.getValue();\n\t\t\t\tString key = entry.getKey();\n\t\n\t\t\t\tif (v instanceof Boolean)\n\t\t\t\t\tprefEdit.putBoolean(key, ((Boolean) v).booleanValue());\n\t\t\t\telse if (v instanceof Float)\n\t\t\t\t\tprefEdit.putFloat(key, ((Float) v).floatValue());\n\t\t\t\telse if (v instanceof Integer)\n\t\t\t\t\tprefEdit.putInt(key, ((Integer) v).intValue());\n\t\t\t\telse if (v instanceof Long)\n\t\t\t\t\tprefEdit.putLong(key, ((Long) v).longValue());\n\t\t\t\telse if (v instanceof String)\n\t\t\t\t\tprefEdit.putString(key, ((String) v));\n\t\t\t}\n\t\t\tprefEdit.commit();\n\t\n\t\t\t// second object is admin options\n\t\t\tEditor adminEdit = mContext.getSharedPreferences(AdminPreferencesActivity.ADMIN_PREFERENCES, 0).edit();\n\t\t\tadminEdit.clear();\n\t\t\t// first object is preferences\n\t\t\tMap<String, ?> adminEntries = (Map<String, ?>) input.readObject();\n\t\t\tfor (Entry<String, ?> entry : adminEntries.entrySet()) {\n\t\t\t\tObject v = entry.getValue();\n\t\t\t\tString key = entry.getKey();\n\t\n\t\t\t\tif (v instanceof Boolean)\n\t\t\t\t\tadminEdit.putBoolean(key, ((Boolean) v).booleanValue());\n\t\t\t\telse if (v instanceof Float)\n\t\t\t\t\tadminEdit.putFloat(key, ((Float) v).floatValue());\n\t\t\t\telse if (v instanceof Integer)\n\t\t\t\t\tadminEdit.putInt(key, ((Integer) v).intValue());\n\t\t\t\telse if (v instanceof Long)\n\t\t\t\t\tadminEdit.putLong(key, ((Long) v).longValue());\n\t\t\t\telse if (v instanceof String)\n\t\t\t\t\tadminEdit.putString(key, ((String) v));\n\t\t\t}\n\t\t\tadminEdit.commit();\n\t\n\t\t\tLog.i(t, \"Loaded hashmap settings into preferences\");\n\t\t\tres = true;\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (input != null) {\n\t\t\t\t\tinput.close();\n\t\t\t\t}\n\t\t\t} catch (IOException ex) {\n\t\t\t\tex.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}", "@SuppressWarnings(\"deprecation\")\n @Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n if (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB) {\n addPreferencesFromResource(R.xml.prefs);\n }\n }", "@Override\n protected void load(ScanningContext context) {\n ResourceItem item = getRepository().getResourceItem(mType, mResourceName);\n\n // add this file to the list of files generating this resource item.\n item.add(this);\n\n // Ask for an ID refresh since we're adding an item that will generate an ID\n context.requestFullAapt();\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n // Load the preferences from an XML resource\n addPreferencesFromResource(R.xml.preferences);\n\n wifi = (CheckBoxPreference) findPreference(KEY_PREF_UPLOAD_WIFI);\n wifiData = (CheckBoxPreference) findPreference(KEY_PREF_UPLOAD_WIFI_DATA);\n data = (CheckBoxPreference) findPreference(KEY_PREF_UPLOAD_DATA);\n\n wifi.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {\n @Override\n public boolean onPreferenceChange(Preference preference, Object newVal) {\n final boolean value = (Boolean) newVal;\n if(value) {\n wifiData.setChecked(false);\n data.setChecked(false);\n wifi.setChecked(true);\n }\n return true;\n }\n });\n\n wifiData.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {\n @Override\n public boolean onPreferenceChange(Preference preference, Object newVal) {\n final boolean value = (Boolean) newVal;\n if(value) {\n wifi.setChecked(false);\n data.setChecked(false);\n wifiData.setChecked(true);\n }\n return true;\n }\n });\n\n data.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {\n @Override\n public boolean onPreferenceChange(Preference preference, Object newVal) {\n final boolean value = (Boolean) newVal;\n if(value) {\n wifiData.setChecked(false);\n wifi.setChecked(false);\n data.setChecked(true);\n }\n return true;\n }\n });\n\n Preference button = findPreference(KEY_PREF_UPDATE);\n button.setSummary(getString(R.string.current_version) + \" \" + ApplicationController.VERSION);\n\n button.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {\n @Override\n public boolean onPreferenceClick(Preference preference) {\n UpdateController.getInstance(getActivity()).checkVersion();\n return true;\n }\n });\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tSalinlahiFour.getBgm().start();\n\t\t\n\t\t\n\t\t//Load File from res or assets\n\t\t//InputStream ins = getResources().openRawResource( getResources().getIdentifier(\"raw/properties\", \"raw\", getPackageName()));\n\t\tFile properties = new File(\"/sdcard/properties.txt\");\n\t\tif(!properties.exists()){\n\t\t\tFile config = new File (\"/sdcard/config.txt\");\n\t\t\tFile dhistory = new File (\"/sdcard/dhistory.txt\");\n\t\t\tFile lessonlibrary = new File (\"/sdcard/lessonlibrary.xml\");\n\t\t\tFile lexicon = new File (\"/sdcard/lexicon.xml\");\n\t\t\tFile lexicon_cooking = new File (\"/sdcard/lexicon_cooking.xml\");\n\t\t\tFile lexicon_family = new File (\"/sdcard/lexicon_family.xml\");\n\t\t\tFile lexicon_house = new File (\"/sdcard/lexicon_house.xml\");\n\t\t\tFile lexicon_shape = new File (\"/sdcard/lexicon_shape.xml\");\n\t\t\tFile templatecatalogue = new File (\"/sdcard/templatecatalogue.xml\");\n\t\ttry {\n\t\t\tproperties.createNewFile();\n\t\t\tconfig.createNewFile();\n\t\t\tdhistory.createNewFile();\n\t\t\tlessonlibrary.createNewFile();\n\t\t\tlexicon.createNewFile();\n\t\t\tlexicon_cooking.createNewFile();\n\t\t\ttemplatecatalogue.createNewFile();\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}\n\t\t//Copy file from res/assets to file from SDCARD\n\t\t InputStream in = getResources().openRawResource(R.raw.properties);\n\t\t try{\n\t\t FileOutputStream out = new FileOutputStream(\"/sdcard/properties.txt\");\n\t\t byte[] buff = new byte[1024];\n\t\t int read = 0;\n\n\t\t \n\t\t while ((read = in.read(buff)) > 0) {\n\t\t out.write(buff, 0, read);\n\t\t \n\t\t \n\t\t in.close();\n\n\t\t out.close();\n\t\t }\n\t\t }catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t }\n\t\t in = getResources().openRawResource(R.raw.config);\n\t\t try{\n\t\t FileOutputStream out = new FileOutputStream(\"/sdcard/config.txt\");\n\t\t byte[] buff = new byte[4096];\n\t\t int read = 0;\n\t\t while ((read = in.read(buff)) > 0) {\n\t\t out.write(buff, 0, read);\n\t\t in.close();\n\t\t out.close();\n\t\t }\n\t\t }catch(Exception e){\n\t\t }\n\t\t in = getResources().openRawResource(R.raw.dhistory);\n\t\t try{\n\t\t FileOutputStream out = new FileOutputStream(\"/sdcard/dhistory.txt\");\n\t\t byte[] buff = new byte[4096];\n\t\t int read = 0;\n\t\t while ((read = in.read(buff)) > 0) {\n\t\t out.write(buff, 0, read);\n\t\t in.close();\n\t\t out.close();\n\t\t }\n\t\t }catch(Exception e){\n\t\t }\n\t\t in = getResources().openRawResource(R.raw.lessonlibrary);\n\t\t try{\n\t\t FileOutputStream out = new FileOutputStream(\"/sdcard/lessonlibrary.xml\");\n\t\t byte[] buff = new byte[4096];\n\t\t int read = 0;\n\t\t while ((read = in.read(buff)) > 0) {\n\t\t out.write(buff, 0, read);\n\t\t in.close();\n\t\t out.close();\n\t\t \n\t\t }\n\t\t }catch(Exception e){\n\t\t }\n\t\t in = getResources().openRawResource(R.raw.lexicon);\n\t\t try{\n\t\t FileOutputStream out = new FileOutputStream(\"/sdcard/lexicon.xml\");\n\t\t byte[] buff = new byte[4096];\n\t\t int read = 0;\n\t\t while ((read = in.read(buff)) > 0) {\n\t\t out.write(buff, 0, read);\n\t\t in.close();\n\t\t out.close();\n\t\t }\n\t\t }catch(Exception e){\n\t\t }\n\t\t in = getResources().openRawResource(R.raw.lexicon_cooking);\n\t\t try{\n\t\t FileOutputStream out = new FileOutputStream(\"/sdcard/lexicon_cooking.xml\");\n\t\t byte[] buff = new byte[4096];\n\t\t int read = 0;\n\t\t while ((read = in.read(buff)) > 0) {\n\t\t out.write(buff, 0, read);\n\t\t in.close();\n\t\t out.close();\n\t\t }\n\t\t }catch(Exception e){\n\t\t }\n\t\t in = getResources().openRawResource(R.raw.lexicon_family);\n\t\t try{\n\t\t FileOutputStream out = new FileOutputStream(\"/sdcard/lexicon_family.xml\");\n\t\t byte[] buff = new byte[4096];\n\t\t int read = 0;\n\t\t while ((read = in.read(buff)) > 0) {\n\t\t out.write(buff, 0, read);\n\t\t in.close();\n\t\t out.close();\n\t\t }\n\t\t }catch(Exception e){\n\t\t }\n\t\t in = getResources().openRawResource(R.raw.lexicon_house);\n\t\t try{\n\t\t FileOutputStream out = new FileOutputStream(\"/sdcard/lexicon_house.xml\");\n\t\t byte[] buff = new byte[4096];\n\t\t int read = 0;\n\t\t while ((read = in.read(buff)) > 0) {\n\t\t out.write(buff, 0, read);\n\t\t in.close();\n\t\t out.close();\n\t\t }\n\t\t }catch(Exception e){\n\t\t }\n\t\t in = getResources().openRawResource(R.raw.lexicon_shape);\n\t\t try{\n\t\t FileOutputStream out = new FileOutputStream(\"/sdcard/lexicon_shape.xml\");\n\t\t byte[] buff = new byte[4096];\n\t\t int read = 0;\n\t\t while ((read = in.read(buff)) > 0) {\n\t\t out.write(buff, 0, read);\n\t\t in.close();\n\t\t out.close();\n\t\t }\n\t\t }catch(Exception e){\n\t\t }\n\t\t in = getResources().openRawResource(R.raw.templatecatalogue);\n\t\t try{\n\t\t FileOutputStream out = new FileOutputStream(\"/sdcard/templatecatalogue.xml\");\n\t\t byte[] buff = new byte[4096];\n\t\t int read = 0;\n\t\t while ((read = in.read(buff)) > 0) {\n\t\t out.write(buff, 0, read);\n\t\t \n\t\t in.close();\n\t\t \n\t\t out.flush();\n\t\t out.close();\n\t\t }\n\t\t }catch(Exception e){\n\t\t }\n\t\t \n\t\tSharedPreferences prefs = getSharedPreferences(\"appData\", MODE_PRIVATE);\n\t\tfinal int lastUserID = prefs.getInt(\"lastUserID\", -1);\n\t\tfinal int firstTime = prefs.getInt(\"firstTime\", -1);\n\t\t\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.activity_main);\n\t\t\n\t\tDatabaseHandler dbhandler = new DatabaseHandler(this);\n\n\t\tuserDetailOperator = new UserDetailOperations(this);\n\t\t\n\t\t ImageView cloud1 = (ImageView) findViewById(R.id.Splash_Cloud1);\n\t\t ImageView cloud2 = (ImageView) findViewById(R.id.Splash_Cloud2);\n\t\t //ImageView logo = (ImageView) findViewById(R.id.Splash_Logo);\n\t\t TranslateAnimation animation = new TranslateAnimation(0.0f, 100.0f,0.0f, 0.0f);\n\t\t TranslateAnimation animation2 = new TranslateAnimation(0.0f, 100.0f,0.0f, 0.0f);\n\t\t// TranslateAnimation animation3 = new TranslateAnimation(0.0f, 0.0f,0.0f, -400.0f);\n\t\t animation.setDuration(SPLASH_TIME);\n\t\t \n\t\t animation.setRepeatCount(1);\n\t\t //animation.setRepeatMode(2);\n\t\t //animation.setFillAfter(true);\n\t\t animation2.setDuration(SPLASH_TIME+3000);\n\t\t animation2.setRepeatCount(1);\n\t\t //animation2.setRepeatMode(2);\n\t\t// animation2.setFillAfter(true);\n\t\t //animation3.setDuration(SPLASH_TIME);\n\t\t// animation3.setRepeatCount(1);\n\t\t //animation3.setRepeatMode(2);\n\t\t //animation3.setFillAfter(true);\n\t\t cloud1.startAnimation(animation);\n\t\t cloud2.startAnimation(animation2);\n\t\t //logo.startAnimation(animation3);\n\t\t new Handler().postDelayed(new Runnable() {\n\n\t\t public void run() {\n\t\t \tif(firstTime == -1){\t//If app is launched for the first time ever, go to Register Screen\n\t\t \t\tIntent intent = new Intent();\n\t\t \t\tintent.setClass(getApplicationContext(), RegistrationActivityName.class);\n\t\t \t\tstartActivity(intent);\n\n\t\t \t}\n\t\t \telse if(lastUserID == -1){ //If there is no last logged in user, go to Login Screen\n\t\t\t \tIntent intent = new Intent();\n\t\t\t \tintent.setClass(getApplicationContext(), LoginActivity.class);\n\t\t\t \tstartActivity(intent);\t\t\t\n\t\t \t}\n\t\t \telse{\t\t\t\t\t\t//If there is a last logged in user, go to Map Screen\n\t\t \t\tuserDetailOperator.open();\n\t\t \t\tUserDetail user = userDetailOperator.getUserDetail(lastUserID);\n\t\t \t\tuserDetailOperator.close();\n\t\t \t\tIntent intent = new Intent();\n\t\t \t\t\n\t\t \t\tintent.putExtra(\"UserID\", user.getId());\t\t \t\t\n\t\t \t\tif(lastUserID != -1){\n\t\t\t \t\t((SalinlahiFour)getApplication()).setLoggedInUser(user);\n\t\t\t \t\tintent.setClass(getApplicationContext(), MapActivity.class);\n\t\t \t\t}else\n\t\t\t \t\tintent.setClass(getApplicationContext(), RegistrationActivityName.class);\n\t\t \t\t\tstartActivity(intent);\n\t\t \t\t}\n//\t\t MainActivity.this.finish();\n\t\t } \n\n\t\t }, SPLASH_TIME);\n\t\t \n\t}", "public void add(Load load){\n\t\t}", "@Override\n\t\tprotected void onPreExecute(){\n\t\t\tpref=new Preferences(mContext);\n\t\t}", "@Override\n public void loadFromPreferencesAdditional(PortletPreferences pp) {\n }", "public void saveInPreference(String name, String content) {\n\t\tSharedPreferences preferences = PreferenceManager\n\t\t\t\t.getDefaultSharedPreferences(this);\n\t\tSharedPreferences.Editor editor = preferences.edit();\n\t\teditor.putString(name, content);\n\t\teditor.commit();\n\t}", "@Override\n public void onCreatePreferences(Bundle bundle, String s) {\n addPreferencesFromResource(R.xml.settings_main);\n\n Preference orderBy = findPreference(getString(R.string.settings_order_by_key));\n bindPreferenceSummaryToValue(orderBy);\n\n Preference filterByCompany = findPreference(getString(R.string.settings_filter_by_company_key));\n bindPreferenceSummaryToValue(filterByCompany);\n\n Preference filterBySection = findPreference(getString(R.string.settings_filter_by_section_key));\n bindPreferenceSummaryToValue(filterBySection);\n }", "private void changePreferences (String prefItem, String prefValue){\n SharedPreferences.Editor prefEditor = sharedPreferences.edit();\n //store the cards array and append the deck id\n prefEditor.putString(prefItem, prefValue);\n prefEditor.apply();\n }", "public static void editXML(String dim) throws Exception {\n\t\tDocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance();\n\t\tDocumentBuilder builder = builderFactory.newDocumentBuilder();\n\t\tString fileName = PropertiesFile.getInstance().getProperty(\"input_qualifier\")+ \".xml\";\n\t\tDocument xmlDocument = builder.parse(new File(getFullyQualifiedFileName(fileName)));\n\n\t\t/*\n\t\t * String expression = \"ConfigFramework/DCDpp/Servers/Server/Zone\"; XPath xPath\n\t\t * = XPathFactory.newInstance().newXPath(); NodeList nodeList = (NodeList)\n\t\t * xPath.compile(expression).evaluate(xmlDocument, XPathConstants.NODESET); Node\n\t\t * zone = nodeList.item(0);\n\t\t * \n\t\t * String zoneRange = zone.getTextContent(); zoneRange = zoneRange.substring(0,\n\t\t * zoneRange.lastIndexOf(\".\") + 1) + dim; zone.setTextContent(zoneRange);\n\t\t */\n\n\t\tTransformerFactory transformerFactory = TransformerFactory.newInstance();\n\t\tTransformer transformer = transformerFactory.newTransformer();\n\t\tDOMSource domSource = new DOMSource(xmlDocument);\n\t\tString s = getOutputFolderName() + \"/\" + fileName;\n\t\tStreamResult streamResult = new StreamResult(new File(s));\n\t\ttransformer.transform(domSource, streamResult);\n\n\t}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\t//requestWindowFeature(Window.FEATURE_NO_TITLE);\n\t\taddPreferencesFromResource(R.xml.setting_preference);\n\t}", "public void saveToLocalXML(Context context){\n\n PreferenceManager.getDefaultSharedPreferences(context).edit().putInt(\"Account_amount\",\n this.size()).commit();\n for (int _iter = 0; _iter < AccountManager.getInstance().size(); _iter++) {\n PreferenceManager.getDefaultSharedPreferences(context).edit().putString(\"Account_\" + String.valueOf(_iter),\n this.getAccount(_iter).getName() + separator +\n this.getAccount(_iter).getUsername() + separator +\n this.getAccount(_iter).getPassword() + separator +\n String.valueOf(this.getAccount(_iter).getDepartment())).commit();\n }\n }", "public void crearConfiguracion (){\n\t\tInputStream streamMenues = FileUtil.getResourceAsStream(\"organizacionMenues.xml\");\r\n\t\tgruposModulos = new ArrayList<GrupoModulos>();\r\n\t\ttry {\r\n\t\t\tif (streamMenues != null){\r\n\t\t\t\tgruposModulos = leerGruposModulos(streamMenues);\t\r\n\t\t\t}\r\n\t\t} catch(XPathExpressionException e) {\r\n\t\t\tManejadorMenues.logger.error(\"Error procesando xml de menues\",e);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tif (gruposModulos.isEmpty()){\r\n\t\t\tGrupoModulos gm = new GrupoModulos();\r\n\t\t\tgm.setNombre(\"Módulos\");\r\n\t\t\tgm.setEsDefault(true);\r\n\t\t\tgruposModulos.add(gm);\r\n\t\t}\r\n\t\t\r\n\t}", "private void loadPreferences() {\n\t\tXSharedPreferences prefApps = new XSharedPreferences(PACKAGE_NAME);\n\t\tprefApps.makeWorldReadable();\n\n\t\tthis.debugMode = prefApps.getBoolean(\"waze_audio_emphasis_debug\", false);\n }", "com.synergyj.cursos.webservices.ordenes.XMLBFactura addNewXMLBFactura();", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n addPreferencesFromResource(R.xml.preferences);\n\n SharedPreferences SP = PreferenceManager.getDefaultSharedPreferences(getBaseContext());\n\n //String ip = SP.getString(\"ip\", \"NULL\");\n // Config.ip = SP.getString(\"ip\", \"NULL\");\n // Log.e(\"IP\",Config.ip );\n String language = SP.getString(\"language\",\"NULL\");\n // Toast.makeText(getApplicationContext(),Config.ip,Toast.LENGTH_SHORT).show();\n //Toast.makeText(getApplicationContext(),language,Toast.LENGTH_SHORT).show();\n }", "public void readXmlFile() {\r\n try {\r\n ClassLoader classLoader = getClass().getClassLoader();\r\n File credentials = new File(classLoader.getResource(\"credentials_example.xml\").getFile());\r\n DocumentBuilderFactory Factory = DocumentBuilderFactory.newInstance();\r\n DocumentBuilder Builder = Factory.newDocumentBuilder();\r\n Document doc = Builder.parse(credentials);\r\n doc.getDocumentElement().normalize();\r\n username = doc.getElementsByTagName(\"username\").item(0).getTextContent();\r\n password = doc.getElementsByTagName(\"password\").item(0).getTextContent();\r\n url = doc.getElementsByTagName(\"url\").item(0).getTextContent();\r\n setUsername(username);\r\n setPassword(password);\r\n setURL(url);\r\n } catch (Exception error) {\r\n System.out.println(\"Error in parssing the given xml file: \" + error.getMessage());\r\n }\r\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n requestWindowFeature(Window.FEATURE_NO_TITLE);\n super.onCreate(savedInstanceState);\n\n addPreferencesFromResource(R.xml.preferences);\n\n // Intent intent = getIntent();\n }", "@Override\n protected void onCreate(Bundle arg0) {\n super.onCreate(arg0);\n addPreferencesFromResource(R.xml.settings_prefs);\n\n initActionBar();\n initViews();\n }", "public void readXML(String xml){\n\t\tint maxId = 0;\n\t\ttry {\n \tFile xmlFile = new File(xml); \n \tDocumentBuilderFactory documentFactory = DocumentBuilderFactory.newInstance(); \n \tDocumentBuilder documentBuilder = documentFactory.newDocumentBuilder(); \n \tDocument doc = documentBuilder.parse(xmlFile); \n \tdoc.getDocumentElement().normalize();\n \tNodeList nodeList = doc.getElementsByTagName(\"node\");\n \tHashMap<Integer,Artifact> artifactTable = new HashMap<Integer, Artifact>();\n \tHashMap<Integer,Element> nodeTable = new HashMap<Integer, Element>();\n \n \tfor (int i = 0; i < nodeList.getLength(); i++) { \n \t\tNode xmlItem = nodeList.item(i);\n \t\tif (xmlItem.getNodeType() == Node.ELEMENT_NODE) { \n \t\t\tElement node = (Element) xmlItem;\n \t\t\tArtifact newNode = new Artifact(Rel.getContext());\n \t\t\tRel.addView(newNode,100,100);\n \t\t\tnewNode.setId(Integer.parseInt(node.getElementsByTagName(\"id\").item(0).getTextContent()));\n \t\t\tnewNode.setPrevWidth(100);\n \t\t\tnewNode.setPrevHeight(100);\n \t\t\tnewNode.setTag(\"node\");\n \t\t\tnewNode.setText(node.getElementsByTagName(\"label\").item(0).getTextContent());\n \t\t\tnewNode.setType(node.getElementsByTagName(\"type\").item(0).getTextContent());\n \t\t\tnewNode.setInformation(node.getElementsByTagName(\"information\").item(0).getTextContent());\n \t\t\tnewNode.setPosition(node.getElementsByTagName(\"position\").item(0).getTextContent());\n \t\t\tnewNode.setAge(Long.parseLong(node.getElementsByTagName(\"age\").item(0).getTextContent()));\n \t\t\tnewNode.setBackgroundResource(Utility.getDrawableType(newNode));\n \t\t\tif(\"\".compareTo((String) newNode.getText()) != 0){\n \t\t\t\tnewNode.matchWithText();\n \t\t\t}\n \t\t\tartifactTable.put(newNode.getId(), newNode);\n \t\t\tnodeTable.put(newNode.getId(), node);\n \t\t\tif(Integer.parseInt(node.getElementsByTagName(\"id\").item(0).getTextContent())>maxId){\n \t\t\t\tmaxId = Integer.parseInt(node.getElementsByTagName(\"id\").item(0).getTextContent());\n \t\t\t}\n \t\t} \n \t\t\n \t}\n \t\n \t//once we created all the artifacts now we can set the fathers and sons for every node with the artifact and xmlnode tables we have filled while reading\n \tIterator it = artifactTable.entrySet().iterator();\n while (it.hasNext()) {\n Map.Entry pairs = (Map.Entry)it.next();\n NodeList sonsList = nodeTable.get(pairs.getKey()).getElementsByTagName(\"son\");\n if(sonsList != null){\n\t for (int j = 0; j < sonsList.getLength(); j++) {\n\t \tartifactTable.get(pairs.getKey()).addSon(artifactTable.get(Integer.parseInt(sonsList.item(j).getTextContent())));\n\t }\n }\n \n NodeList fathersList = nodeTable.get(pairs.getKey()).getElementsByTagName(\"father\");\n if(fathersList != null){\n\t for (int j = 0; j < fathersList.getLength(); j++) {\n\t \tartifactTable.get(pairs.getKey()).addFather(artifactTable.get(Integer.parseInt(fathersList.item(j).getTextContent())));\n\t }\n }\n \n }\n \n \n }catch(Exception e){\n \tLog.v(\"error reading xml\",e.toString());\n }\n\t\tGlobal.ID = maxId+1;\n\t}", "public void loadXML(){\n new DownloadXmlTask().execute(URL);\n }", "public PreferencesUI(FileObject serviceXml) {\n super(WindowManager.getDefault().getMainWindow(), true);\n Frame parent = WindowManager.getDefault().getMainWindow();\n initComponents();\n setLocation(parent.getX() +\n (parent.getWidth() - getWidth()) / 2, parent.getY() + \n (parent.getHeight() - getHeight()) / 2);\n \n getRootPane().setDefaultButton(cancelButton);\n initData(serviceXml);\n \n setVisible(true);\n }", "public void initializeQuestion(){\n\t\ttry{Element root = new XmlReader().parse(Gdx.files.internal(xmlFile));\n\t\tElement artist = root.getChildByName(formatName(game.getArtist()));\n\t\tElement quesNum = artist.getChildByName(Integer.toString(game.getQuestion()));\n\t\tElement question = quesNum.getChildByName(\"Question\");\n\t\tques = question.getText();\n\t\t}\n\t\tcatch(IOException e){\n\t\t}\n\t}", "public void addSwitches(){\r\n switchPatch.getItems().clear();\r\n switchPatch.setPromptText(\"Switch/Patch\");\r\n switchPatch.setButtonCell(new ListCell<String>() {\r\n @Override\r\n protected void updateItem(String item, boolean empty) {\r\n super.updateItem(item, empty);\r\n if (empty || item == null)\r\n setText(\"Switch/Patch\");\r\n else\r\n setText(item);\r\n }\r\n });\r\n switchPatch.setValue(null);\r\n\r\n if (tx_cb.getValue() != null) {\r\n DocumentBuilderFactory switchFactory = DocumentBuilderFactory.newInstance();\r\n DocumentBuilder switchBuilder = null;\r\n\r\n try {\r\n switchBuilder = switchFactory.newDocumentBuilder();\r\n } catch (ParserConfigurationException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n // Load the input XML document, parse it and return an instance of the document class.\r\n Document switchDocument = null;\r\n try {\r\n switchDocument = switchBuilder.parse(new File(\"switches.xml\"));\r\n } catch (SAXException e) {\r\n e.printStackTrace();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n /** refer to Switches.java **/\r\n List<sample.Switches> theSwitches = new ArrayList<sample.Switches>();\r\n NodeList switchNodeList = switchDocument.getDocumentElement().getChildNodes();\r\n for (int i = 0; i < switchNodeList.getLength(); i++) { //loop through to get every item and its attributes from the test.xml\r\n Node switchNode = switchNodeList.item(i);\r\n if (switchNode.getNodeType() == Node.ELEMENT_NODE) {\r\n Element switchElement = (Element) switchNode;\r\n\r\n ID = switchNode.getAttributes().getNamedItem(\"ID\").getNodeValue();\r\n switchPower = Double.parseDouble(switchElement.getElementsByTagName(\"powerlimit\").item(0).getChildNodes().item(0).getNodeValue());\r\n channelLimit = Double.parseDouble(switchElement.getElementsByTagName(\"channel\").item(0).getChildNodes().item(0).getNodeValue());\r\n\r\n if (switchPower > powerRating)\r\n if (channelNumber < 18 && channelLimit < 18) {\r\n theSwitches.add(new sample.Switches(ID, switchPower, channelLimit));\r\n switchPatch.getItems().add(ID);\r\n } else if (channelNumber > 17 && channelLimit > 17 || channelLimit == 0) {\r\n theSwitches.add(new sample.Switches(ID, switchPower, channelLimit));\r\n switchPatch.getItems().add(ID);\r\n }\r\n }\r\n }\r\n }\r\n }", "public void addFile(final String file);", "private void savePrefsData() {\n SharedPreferences pref = getApplicationContext().getSharedPreferences(\"myPrefs\", MODE_PRIVATE);\n SharedPreferences.Editor editor = pref.edit();\n editor.putBoolean(\"isIntroOpnend\", true);\n editor.commit();\n }", "private void procesarConfiguracion() {\n try {\n\n\n IXMLParser parser = XMLParserFactory.createDefaultXMLParser();\n IXMLReader reader = StdXMLReader.fileReader(Servidor.path_config);\n parser.setReader(reader);\n IXMLElement xml = (IXMLElement) parser.parse();\n Enumeration e = xml.enumerateChildren();\n\n Vector v, c;\n IXMLElement proc, caso;\n\n\n while (e.hasMoreElements()) {\n proc = (IXMLElement) e.nextElement();\n v = proc.getChildren();\n int n = 0;\n LinkedList<Caso> list = new LinkedList<>();\n while (n < v.size()) {\n caso = (IXMLElement) v.get(n);\n\n Caso ca = new Caso(((IXMLElement) caso.getChildrenNamed(\"solucion\").get(0)).getContent(), ((IXMLElement) caso.getChildrenNamed(\"normal\").get(0)).getContent(), ((IXMLElement) caso.getChildrenNamed(\"error\").get(0)).getContent());\n list.add(ca);\n n++;\n\n }\n config.put(proc.getName(), list);\n }\n\n\n\n\n\n } catch (XMLException | IOException | ClassNotFoundException | InstantiationException | IllegalAccessException ex) {\n Servidor.logger.severe(ex.toString());\n }\n\n\n }", "public void createXMLFile() {\n\t int jmax = listOfRules.size();\n\t int j = 0;\n\t try {\n\t try {\n\n\t DocumentBuilderFactory docFactory = DocumentBuilderFactory\n\t .newInstance();\n\t DocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n\n\t // root elements\n\t Document doc = docBuilder.newDocument();\n\t Element rootElement = doc.createElement(\"profile\");\n\t doc.appendChild(rootElement);\n\t // name\n\t Element name = doc.createElement(\"name\");\n\t name.appendChild(doc.createTextNode(\"Android Lint\"));\n\t rootElement.appendChild(name);\n\t // language\n\t Element language = doc.createElement(\"language\");\n\t language.appendChild(doc.createTextNode(\"Java\"));\n\t rootElement.appendChild(language);\n\t // rules\n\t Element rules = doc.createElement(\"rules\");\n\t rootElement.appendChild(rules);\n\n\t for (j = 0; j < jmax; j++) {\n\t Element rule = doc.createElement(\"rule\");\n\t rules.appendChild(rule);\n\t // repositoryKey\n\t Element repositoryKey = doc.createElement(\"repositoryKey\");\n\t repositoryKey\n\t .appendChild(doc.createTextNode(\"AndroidLint\"));\n\t rule.appendChild(repositoryKey);\n\t // key\n\t Element key = doc.createElement(\"key\");\n\t key.appendChild(doc.createTextNode(listOfRules.get(j)));\n\t rule.appendChild(key);\n\t }\n\n\t // write the content into xml file\n\t TransformerFactory transformerFactory = TransformerFactory\n\t .newInstance();\n\t Transformer transformer = transformerFactory.newTransformer();\n\t DOMSource source = new DOMSource(doc);\n\t StreamResult result = new StreamResult(new File(pathProfileXml+ANDROID_LINT_PROFILE_FILENAME\n\t ));\n\n\t transformer.transform(source, result);\n\n\t System.out.println(\"File \\\"\"+pathProfileXml+ANDROID_LINT_PROFILE_FILENAME+\"\\\" written.\");\n\t System.out.println(\"Quit.\");\n\n\t } catch (ParserConfigurationException pce) {\n\t pce.printStackTrace();\n\t } catch (TransformerException tfe) {\n\t tfe.printStackTrace();\n\t }\n\t } catch (Exception e) {\n\n\t }\n\t }", "private void loadPreferences() {\n SharedPreferences sp = getActivity().getSharedPreferences(SETTINGS, Context.MODE_PRIVATE );\n boolean lm = sp.getBoolean(getString(R.string.live_match), true);\n boolean ls = sp.getBoolean(getString(R.string.live_score), true);\n\n if(lm) live_match.setChecked(true);\n else live_match.setChecked(false);\n\n if(ls) live_score.setChecked(true);\n else live_score.setChecked(false);\n }", "@SuppressWarnings(\"deprecation\")\n\tprivate void setupSimplePreferencesScreen() {\n\t\tif (!isSimplePreferences(this)) {\n\t\t\treturn;\n\t\t}\n\n\t\taddPreferencesFromResource(R.xml.pref_blank);\n\n\t\t// Add 'filters' preferences.\n\t\tPreferenceCategory fakeHeader = new PreferenceCategory(this);\n\n\t\t// Add 'appearance' preferences.\n\t\tfakeHeader = new PreferenceCategory(this);\n\t\tfakeHeader.setTitle(R.string.appearance);\n\t\tgetPreferenceScreen().addPreference(fakeHeader);\n\t\taddPreferencesFromResource(R.xml.pref_appearance);\n\n\t\t// Add 'text color' preferences.\n\t\tfakeHeader = new PreferenceCategory(this);\n\t\tfakeHeader.setTitle(R.string.text_color);\n\t\tgetPreferenceScreen().addPreference(fakeHeader);\n\t\taddPreferencesFromResource(R.xml.pref_textcolor);\n\n\t\t// Add 'info' preferences.\n\t\tfakeHeader = new PreferenceCategory(this);\n\t\tfakeHeader.setTitle(R.string.information);\n\t\tgetPreferenceScreen().addPreference(fakeHeader);\n\t\taddPreferencesFromResource(R.xml.pref_info);\n\n\t\t// Add others\n\t\tsetupOpenSourceInfoPreference(this, findPreference(getString(R.string.pref_info_open_source)));\n\t\tsetupVersionPref(this, findPreference(getString(R.string.pref_version)));\n\n\t}", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n addPreferencesFromResource(R.xml.framework_setting);\n SharedPreferences sharedPreferences = this.getPreferenceManager().getSharedPreferences();\n String preference_smartbar_default_type = getResources().getString(R.string.preference_smartbar_default_type);\n final ListPreference listPreference = (ListPreference) findPreference(preference_smartbar_default_type);\n //修改Smartbar类型\n String smart_type = sharedPreferences.getString(preference_smartbar_default_type, null);\n int index = listPreference.findIndexOfValue(String.valueOf(smart_type));\n if (index != -1) {\n CharSequence[] entries = listPreference.getEntries();\n listPreference.setTitle(entries[index]);\n }\n if (listPreference != null) {\n listPreference.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {\n @Override\n public boolean onPreferenceChange(Preference preference, Object newValue) {\n int index = listPreference.findIndexOfValue(newValue.toString());\n CharSequence[] entries = listPreference.getEntries();\n listPreference.setTitle(entries[index]);\n return true;\n }\n });\n }\n }", "public final void addPseudoFile(PseudoFile pfile)\n {\n if ( m_pseudoFiles == null)\n m_pseudoFiles = new PseudoFileList();\n m_pseudoFiles.addFile( pfile);\n }", "public void save () {\n preference.putBoolean(\"sound effect\", hasSoundOn);\n preference.putBoolean(\"background music\", hasMusicOn);\n preference.putFloat(\"sound volume\", soundVolume);\n preference.putFloat(\"music volume\", musicVolume);\n preference.flush(); //this is called to write the changed data into the file\n }", "public void loadFromPreferences(SharedPreferences preferences){\r\n\t\tinitialSetuped = preferences.getBoolean(\"initialSetupped\", false);\r\n\t\tuserName = preferences.getString(\"username\", \"\");\r\n\t\tuserEmail = preferences.getString(\"useremail\", \"\");\r\n\t\trecipientEmail = preferences.getString(\"recipientemail\", \"\");\r\n\t\toption = WeightUnitOption.loadPreference(preferences.getBoolean(\"option\", true));\r\n\t}", "public void save() {\n try {\n FileOutputStream fos = new FileOutputStream(file);\n properties.store(fos, \"Preferences\");\n } catch (FileNotFoundException e) {\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "public synchronized void addProjectCP(File f) { projectCP.add(f); }", "@Override\r\n\tpublic void initializeFromFile(File inputXmlFile) {\n\t\tDocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\r\n\t\ttry {\r\n\t\t\tDocumentBuilder builder = factory.newDocumentBuilder();\r\n\t\t\tDocument doc = builder.parse(inputXmlFile);\r\n\t\t\tNodeList xmlNodeList;\r\n\t\t\tNodeList xmlEdgeList;\r\n\t\t\txmlNodeList = doc.getElementsByTagName(\"node\");\r\n\r\n\t\t\tfor(int i=0;i<xmlNodeList.getLength();i++) {\r\n\r\n\t\t\t\tNode p=xmlNodeList.item(i);\r\n\t\t\t\tElement xmlNode =(Element) p;\r\n\t\t\t\tNodeList.add(xmlNode);\r\n\t\t\t\tNodeMap.put(Integer.parseInt(xmlNode.getAttribute(\"id\")),xmlNode);\r\n\r\n\r\n\t\t\t\t}\r\n\t\t\txmlEdgeList = doc.getElementsByTagName(\"edge\");\r\n\r\n\r\n\t\t\tfor(int j=0;j<xmlEdgeList.getLength();j++) {\r\n\t\t\t\tNode p = xmlEdgeList.item(j);\r\n\t\t\t\tElement xmlNode = (Element) p;\r\n\t\t\t\tEdgeList.add(xmlNode);\r\n\r\n\t\t\t}\r\n\r\n\t\t} catch (ParserConfigurationException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (SAXException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch(IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}", "@Test\n\tpublic void addProperty() {\n\t\tXMLTagParser.addNewElement(\"Person\");\n\t\tXMLTagParser.editElement(\"Person\", \"residence\", \"milan\");\n\n\t\tXMLTagParser.editProperty(\"Person\", \"residence\", \"isRenting\", \"false\");\n\t\tassertEquals(XMLTagParser.getPropertyValueFromTag(\"Person\", \"residence\", \"isRenting\"), \"false\");\n\t\tXMLTagParser.editProperty(\"Person\", \"residence\", \"hasGarage\", \"true\");\n\t\tassertEquals(XMLTagParser.getPropertyValueFromTag(\"Person\", \"residence\", \"hasGarage\"), \"true\");\n\t}", "private void loadXMLForOtherButtons() {\n try {\n FXMLLoader viewLoader = new FXMLLoader();\n viewLoader.setLocation(getClass().getResource(\"/components/ViewInfo/ViewMainContainer.fxml\"));\n viewMenuRef = viewLoader.load();\n viewMainController = viewLoader.getController();\n viewMainController.bindToMainChildAnchorPane(mainChildAnchorPane);\n\n // System.out.println(\"Going to try and store ref to orderMenu.fxml\");\n\n FXMLLoader newOrderLoader = new FXMLLoader();\n newOrderLoader.setLocation(getClass().getResource(\"/components/PlaceAnOrder/PlaceAnOrderMain/NewOrderContainer.fxml\"));\n orderMenuRef = newOrderLoader.load();\n newOrderContainerController = newOrderLoader.getController();\n newOrderContainerController.bindToMainChildAnchorPane(mainChildAnchorPane);\n\n FXMLLoader updateLoader = new FXMLLoader();\n updateLoader.setLocation(getClass().getResource(\"/components/UpdateInventory/UpdateInventoryContainer.fxml\"));\n updateRef = updateLoader.load();\n updateController = updateLoader.getController();\n updateController.bindToMainChildAnchorPane(mainChildAnchorPane);\n\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public XMLElement(PApplet sketch, String filename)\n/* */ {\n/* 174 */ this();\n/* 175 */ this.sketch = sketch;\n/* 176 */ init(sketch.createReader(filename));\n/* */ }", "private void saveRecipeOnPrefs(Recipe recipe) {\n Gson gson = new Gson();\n String recipeString = gson.toJson(recipe);\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(getActivity());\n SharedPreferences.Editor editor = preferences.edit();\n editor.putString(KEY_CURRENT_RECIPE, recipeString);\n editor.apply();\n }", "public void load() ;", "public void loadxml ()\n\t{\n\t\t\t\tString [] kategorienxml;\n\t\t\t\tString [] textbausteinexml;\n\t\t\t\tString [] textexml;\n\t\t\t\t\n\t\t\t\tString filenamexml = \"Katalogname_gekuerzt_lauffaehig-ja.xml\";\n\t\t\t\tFile xmlfile = new File (filenamexml);\n\t\t\t\t\n\t\t\t\t// lies gesamten text aus: String gesamterhtmlcode = \"\";\n\t\t\t\tString gesamterhtmlcode = \"\";\n\t\t\t\tString [] gesamtertbarray = new String[1001];\n\t\t BufferedReader inx = null;\n\t\t try {\n\t\t inx = new BufferedReader(new FileReader(xmlfile));\n\t\t String zeilex = null;\n\t\t while ((zeilex = inx.readLine()) != null) {\n\t\t \tSystem.out.println(zeilex + \"\\n\");\n\t\t \tRandom rand = new Random();\n\t\t \tint n = 0;\n\t\t \t// Obtain a number between [0 - 49].\n\t\t \tif (zeilex.contains(\"w:type=\\\"Word.Bookmark.End\\\"/>\")) // dann ab hier speichern bis zum ende:\n\t\t \t{\n\t\t \t\t// \terstelle neue random zahl und speichere alle folgenden zeilen bis zum .Start in diesen n rein\n\t\t \t\tn = rand.nextInt(1001);\n\n\t\t \t\t\n\t\t \t}\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n] + zeilex;\n\t\t \tFile f = new File (\"baustein_\"+ n + \".txt\");\n\t\t \t\n\t\t \tFileWriter fw = new FileWriter (f);\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"\\\"</w:t></w:r></w:r></w:hlink><w:hlink w:dest=\\\"\",\"\");\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"w:val=\\\"Hyperlink\\\"/></w:rPr><w:r><w:rPr><w:rStyle w:val=\\\"T8\\\"/></w:rPr>\",\"\");\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"\t\t \t<w:rStyle\" , \"\");\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"</w:t></w:r></w:p>\",\"\");\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"w:val=\\\"Hyperlink\\\"/>\",\"\");\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"<w:pStyle w:val=\\\"_37_b._20_Text\\\"/>\",\"\");\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"</w:rPr><w:r><w:t>\",\"\");\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"</w:t></w:r></w:r></w:hlink><w:hlink w:dest=\",\"\");\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"</w:rPr></w:r></w:hlink><w:hlink w:dest=\",\"\");\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"<w:r><w:rPr><w:rStyle\",\"\");\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"xmlns:fo=\\\"urn:oasis:names:tc:opendocument:xmlns:xsl-fo-\",\"\");\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"</w:t></w:r></w:r></w:hlink></w:p><w:p\",\"\");\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"</w:t></w:r></w:r></w:hlink></w:p><w:p\",\"\");\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"xmlns:fo=\\\"urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0\\\"><w:pPr></\",\"\");\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"w:pPr><w:r>\",\"\");\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"compatible:1.0\\\"><w:pPr></w:pPr>\",\"\");\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"</w:p><w:p\",\"\");\n\t\t \n\n\t\t \t\n\n\t\t \tfw.write(gesamtertbarray[n]);\n\t\t \tfw.flush();\n\t\t \tfw.close();\n\t\t \t\n\t\t \tif (zeilex.contains(\"w:type=\\\"Word.Bookmark.Start\\\"))\"))\n \t\t\t{\n\t\t \t\t// dann erhöhe speicher id für neue rand zahl, weil ab hier ist ende des vorherigen textblocks;\n\t\t\t \tn = rand.nextInt(1001);\n \t\t\t}\n\t\t \n\t\t }}\n\t\t \tcatch (Exception s)\n\t\t {}\n\t\t \n\t\t\n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t}", "ArrayList<WordListItem> addDataFromFile(){\n BufferedReader br;\n InputStream inputStream = context.getResources().openRawResource(R.raw.animal_list);\n br = new BufferedReader(\n new InputStreamReader(inputStream, Charset.forName(\"UTF-8\"))\n );\n String currentLine;\n ArrayList<WordListItem> wordListItems = new ArrayList<WordListItem>();\n try {\n while ((currentLine = br.readLine()) != null) {\n String[] tokens = currentLine.split(\";\");\n\n String word = tokens[0];\n String pronunciation = tokens[1];\n String description = tokens[2];\n\n WordListItem wordItem = new WordListItem(word, pronunciation, description);\n wordItem.setImgResNbr(setImgResFromWord(wordItem.getWord().toLowerCase()));\n wordListItems.add(wordItem);\n }\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n if (br != null) br.close();\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n }\n\n return wordListItems;\n }", "public void add(PhotonDoc doc);", "private void setPrefs( File build_file ) {\n if ( _settings != null )\n _settings.load( build_file );\n else\n _settings = new OptionSettings( build_file );\n _prefs = _settings.getPrefs();\n }", "private void loadPreferences() {\n SharedPreferences sp = getSharedPreferences(MY_PREFS, MODE_PRIVATE);\n\n int entreeIndex = sp.getInt(\"entreeIndex\", 0);\n int drinkIndex = sp.getInt(\"drinkIndex\", 0);\n int dessertIndex = sp.getInt(\"dessertIndex\", 0);\n\n // Setting inputs from SharedPreferences\n spEntree.setSelection(entreeIndex);\n spDrink.setSelection(drinkIndex);\n spDessert.setSelection(dessertIndex);\n\n edtTxtEntreePrice.setText(alEntreePrices.get(entreeIndex));\n edtTxtDrinkPrice.setText(alDrinkPrices.get(drinkIndex));\n edtTxtDessertPrice.setText(alDessertPrices.get(dessertIndex));\n }", "org.landxml.schema.landXML11.FeatureDocument.Feature addNewFeature();", "org.landxml.schema.landXML11.FeatureDocument.Feature addNewFeature();", "private void affichagePeuDeQuestions() {\n\t\ttry {\n\t\t\tstage = (Stage)buttonRetour.getScene().getWindow();\n\t\t\tsetDynamicPane(FXMLLoader.load(getClass().getResource(\"FenetrePasAssezDeQuestions.fxml\")));\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void parseXml(String file) {\n\n try {\n\n debug(\"\\n\\nIn the beginning God created the heaven and the world...\\n\\n\");\n\n File fXmlFile = new File(\"./levels/\" + file);\n DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();\n Document doc = dBuilder.parse(fXmlFile);\n\n doc.getDocumentElement().normalize();\n debug(\"Chosen entity: \" + doc.getDocumentElement().getNodeName());\n\n NodeList placeList = doc.getElementsByTagName(\"place\");\n NodeList passageList = doc.getElementsByTagName(\"passage\");\n NodeList furnitureList = doc.getElementsByTagName(\"furniture\");\n NodeList storyList = doc.getElementsByTagName(\"story\");\n\n // Create object arrays\n ArrayList<Place> places = new ArrayList<>();\n ArrayList<Item> items = new ArrayList<>();\n ArrayList<Passage> passages = new ArrayList<>();\n ArrayList<Furniture> furnitures = new ArrayList<Furniture>();\n\n // parse story text\n Node storyNode = storyList.item(0);\n Element storyElement = (Element) storyNode;\n debug(\"Intro: \" + storyElement.getElementsByTagName(\"introduction\").item(0).getTextContent());\n debug(\"Level: \" + storyElement.getElementsByTagName(\"name\").item(0).getTextContent());\n debug(\"Version: \" + storyElement.getElementsByTagName(\"version\").item(0).getTextContent());\n // add story elements to world\n world.setIntroduction(\n storyElement.getElementsByTagName(\"introduction\").item(0).getTextContent());\n world.setLevelName(storyElement.getElementsByTagName(\"name\").item(0).getTextContent());\n world.setLevelVersion(storyElement.getElementsByTagName(\"version\").item(0).getTextContent());\n\n // parse all existing Places\n for (int placeCounter = 0; placeCounter < placeList.getLength(); placeCounter++) {\n Node placeNode = placeList.item(placeCounter);\n\n debug(\"\\nCurrent Element: \" + placeNode.getNodeName());\n\n if (placeNode.getNodeType() == Node.ELEMENT_NODE) {\n Element placeElement = (Element) placeNode;\n\n debug(\"- Ending: \" + placeElement.getAttribute(\"end\"));\n debug(\"- id: \" + placeElement.getAttribute(\"id\"));\n debug(\"- Name: \" + placeElement.getElementsByTagName(\"name\").item(0).getTextContent());\n debug(\"- Description: \"\n + placeElement.getElementsByTagName(\"description\").item(0).getTextContent());\n\n // Create Places.\n places.add(new Place(placeElement.getElementsByTagName(\"name\").item(0).getTextContent(),\n placeElement.getElementsByTagName(\"description\").item(0).getTextContent().replace(\"\\\\n\", \"\\n\")));\n\n // add EndingPlace to World, set endingText to Places' Description\n if (placeElement.getAttribute(\"end\").equals(\"bad\")) {\n world.addBadEnding(places.get(placeCounter),\n places.get(placeCounter).getDescription());\n } else if(placeElement.getAttribute(\"end\").equals(\"good\")) {\n world.addGoodEnding(places.get(placeCounter),\n places.get(placeCounter).getDescription());\n }\n \n // parse all existing Place Items\n NodeList itemList = placeElement.getElementsByTagName(\"item\");\n\n for (int itemCounter = 0; itemCounter < itemList.getLength(); itemCounter++) {\n Node itemNode = itemList.item(itemCounter);\n\n Element itemElement = (Element) itemNode;\n\n debug(\"- Item\" + itemCounter + \":\");\n debug(\"- - Name: \" + itemElement.getElementsByTagName(\"name\").item(0).getTextContent());\n debug(\"- - Description: \"\n + itemElement.getElementsByTagName(\"description\").item(0).getTextContent());\n\n // Create items.\n items.add(new Item(itemElement.getElementsByTagName(\"name\").item(0).getTextContent(),\n itemElement.getElementsByTagName(\"description\").item(0).getTextContent()));\n // Set items in current place.\n places.get(placeCounter).addObjectToPlace(getIncludedItem(itemElement, items));\n\n }\n }\n }\n\n // parse all furniture\n for (int furnitureCounter = 0; furnitureCounter < furnitureList\n .getLength(); furnitureCounter++) {\n Node furnitureNode = furnitureList.item(furnitureCounter);\n\n Element furnitureElement = (Element) furnitureNode;\n\n debug(\"\\nCurrent Element: \" + furnitureNode.getNodeName());\n\n debug(\"- Furniture\" + furnitureCounter);\n debug(\"- - In Place: \"\n + furnitureElement.getElementsByTagName(\"in-place\").item(0).getTextContent());\n debug(\n \"- - Name: \" + furnitureElement.getElementsByTagName(\"name\").item(0).getTextContent());\n debug(\"- - Description: \"\n + furnitureElement.getElementsByTagName(\"description\").item(0).getTextContent());\n\n // Create furniture objects\n furnitures.add(\n new Furniture(furnitureElement.getElementsByTagName(\"name\").item(0).getTextContent(), // name\n furnitureElement.getElementsByTagName(\"description\").item(0).getTextContent(), // description\n furnitureElement.getElementsByTagName(\"in-place\").item(0).getTextContent()));\n\n NodeList furnitureItemList = furnitureElement.getElementsByTagName(\"content-item\");\n\n // parse all Furniture Items\n for (int furnitureItemCounter = 0; furnitureItemCounter < furnitureItemList\n .getLength(); furnitureItemCounter++) {\n Node furnitureItemNode = furnitureItemList.item(furnitureItemCounter);\n\n Element furnitureItemElement = (Element) furnitureItemNode;\n\n debug(\"- - Content Items:\");\n debug(\"- - - Name: \"\n + furnitureItemElement.getElementsByTagName(\"name\").item(0).getTextContent());\n debug(\"- - - Description: \"\n + furnitureItemElement.getElementsByTagName(\"description\").item(0).getTextContent());\n\n addItems(furnitureItemElement, furnitures, items, furnitureCounter);\n\n }\n\n NodeList furnitureObstacleList = furnitureElement.getElementsByTagName(\"obstacle\");\n\n // parse all Furniture Obstacles\n for (int furnitureObstacleCounter = 0; furnitureObstacleCounter < furnitureObstacleList\n .getLength(); furnitureObstacleCounter++) {\n Node furnitureObstacleNode = furnitureObstacleList.item(furnitureObstacleCounter);\n\n Element furnitureObstacleElement = (Element) furnitureObstacleNode;\n\n debug(\"- - Obstacle:\");\n debug(\"- - - Description: \" + furnitureObstacleElement.getElementsByTagName(\"description\")\n .item(0).getTextContent());\n debug(\"- - - Resolution: \" + furnitureObstacleElement.getElementsByTagName(\"resolution\")\n .item(0).getTextContent());\n // debug(\"- - - Requirement: \" +\n // furnitureObstacleElement.getElementsByTagName(\"requiredItem\").item(0).getTextContent());\n\n // create furniture obstacle\n if (furnitureObstacleElement.getAttribute(\"type\").equals(\"double\")) {\n // double Item obstacle\n furnitures.get(furnitureCounter)\n .setObstalce(new DoubleItemObstacle(\"\",\n furnitureObstacleElement.getElementsByTagName(\"description\").item(0)\n .getTextContent(),\n furnitureObstacleElement.getElementsByTagName(\"resolution\").item(0)\n .getTextContent(),\n getRequiredItem(items,\n furnitureObstacleElement.getElementsByTagName(\"requiredItem\").item(0)\n .getTextContent()),\n getRequiredItem(items, furnitureObstacleElement\n .getElementsByTagName(\"additionalItem\").item(0).getTextContent())));\n\n } else if (furnitureObstacleElement.getAttribute(\"type\").equals(\"riddle\")) {\n // riddle Obstacle\n furnitures.get(furnitureCounter)\n .setObstalce(new RiddleObstacle(\"\",\n furnitureObstacleElement.getElementsByTagName(\"description\").item(0)\n .getTextContent(),\n furnitureObstacleElement.getElementsByTagName(\"resolution\").item(0)\n .getTextContent(),\n furnitureObstacleElement.getElementsByTagName(\"requiredAnswer\").item(0)\n .getTextContent()));\n\n } else {\n // normal Obstacle\n furnitures.get(furnitureCounter)\n .setObstalce(new ItemObstacle(\"\",\n furnitureObstacleElement.getElementsByTagName(\"description\").item(0)\n .getTextContent(),\n furnitureObstacleElement.getElementsByTagName(\"resolution\").item(0)\n .getTextContent(),\n getRequiredItem(items, furnitureObstacleElement\n .getElementsByTagName(\"requiredItem\").item(0).getTextContent())));\n }\n // add damage points to obstacle\n if (!furnitureObstacleElement.getAttribute(\"damage\").equals(\"\")) {\n passages.get(furnitureCounter).getObstacle()\n .setDamagepoints(Integer.parseInt(furnitureObstacleElement.getAttribute(\"damage\")));\n }\n\n }\n\n }\n\n // Add current furniture to its containing Place\n setFurnitureInPlace(furnitures, places);\n\n // parse all existing passages\n for (int passageCounter = 0; passageCounter < passageList.getLength(); passageCounter++) {\n Node passageNode = passageList.item(passageCounter);\n\n debug(\"\\nCurrent Element: \" + passageNode.getNodeName());\n\n if (passageNode.getNodeType() == Node.ELEMENT_NODE) {\n Element passageElement = (Element) passageNode;\n\n debug(\"- id: \" + passageElement.getAttribute(\"id\"));\n debug(\"- Name: \" + passageElement.getElementsByTagName(\"name\").item(0).getTextContent());\n debug(\"- Description: \"\n + passageElement.getElementsByTagName(\"description\").item(0).getTextContent());\n debug(\"- Comes from: \"\n + passageElement.getElementsByTagName(\"comeFrom\").item(0).getTextContent());\n debug(\"- Connects to: \"\n + passageElement.getElementsByTagName(\"connectTo\").item(0).getTextContent());\n\n // Create Passage with connected Places.\n passages\n .add(new Passage(passageElement.getElementsByTagName(\"name\").item(0).getTextContent(),\n passageElement.getElementsByTagName(\"description\").item(0).getTextContent(),\n getFromPlace(passageElement, places), // from this Place\n getFollowPlace(passageElement, places)) // to that Place\n );\n\n // parse all existing Passage Obstacles\n NodeList obstacleList = passageElement.getElementsByTagName(\"obstacle\");\n\n for (int obstacleCounter = 0; obstacleCounter < obstacleList\n .getLength(); obstacleCounter++) {\n Node obstacleNode = obstacleList.item(obstacleCounter);\n\n Element obstacleElement = (Element) obstacleNode;\n\n debug(\"- Obstacle\" + passageCounter + \":\");\n debug(\"- - Description: \"\n + obstacleElement.getElementsByTagName(\"description\").item(0).getTextContent());\n debug(\"- - Resolution: \"\n + obstacleElement.getElementsByTagName(\"resolution\").item(0).getTextContent());\n // debug(\"- - Required Item: \" +\n // obstacleElement.getElementsByTagName(\"requiredItem\").item(0).getTextContent());\n\n // Create the obstacle for each passage.\n if (obstacleElement.getAttribute(\"type\").equals(\"double\")) {\n // double Item obstacle\n passages.get(passageCounter)\n .setObstacle(new DoubleItemObstacle(\"\",\n obstacleElement.getElementsByTagName(\"description\").item(0).getTextContent(),\n obstacleElement.getElementsByTagName(\"resolution\").item(0).getTextContent(),\n getRequiredItem(items,\n obstacleElement.getElementsByTagName(\"requiredItem\").item(0)\n .getTextContent()),\n getRequiredItem(items, obstacleElement.getElementsByTagName(\"additionalItem\")\n .item(0).getTextContent())));\n\n } else if (obstacleElement.getAttribute(\"type\").equals(\"riddle\")) {\n // riddle Obstacle\n passages.get(passageCounter).setObstacle(new RiddleObstacle(\"\",\n obstacleElement.getElementsByTagName(\"description\").item(0).getTextContent(),\n obstacleElement.getElementsByTagName(\"resolution\").item(0).getTextContent(),\n obstacleElement.getElementsByTagName(\"requiredAnswer\").item(0).getTextContent()));\n\n } else {\n // normal Obstacle\n passages.get(passageCounter)\n .setObstacle(new ItemObstacle(\"\",\n obstacleElement.getElementsByTagName(\"description\").item(0).getTextContent(),\n obstacleElement.getElementsByTagName(\"resolution\").item(0).getTextContent(),\n getRequiredItem(items, obstacleElement.getElementsByTagName(\"requiredItem\")\n .item(0).getTextContent())));\n }\n\n // add damage points to obstacle\n if (!obstacleElement.getAttribute(\"damage\").equals(\"\")) {\n passages.get(passageCounter).getObstacle()\n .setDamagepoints(Integer.parseInt(obstacleElement.getAttribute(\"damage\")));\n }\n\n\n }\n }\n }\n\n startingPlace = places.get(0);\n\n // Add Places to GameWorld\n addPlacesToWorld(places, world);\n\n // set starting Place in GameWorld\n if (world.getStartingPlace() == null) {\n world.setStartingPlace(startingPlace);\n }\n\n debug(\"\\n\\n\");\n debug(\"World has successfully been created! God saw all that he had made, and it was good.\");\n debug(\"\\n\\n\\n\\n\");\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "@Override\n\t\t\tprotected void onCreate(Bundle savedInstanceState){\n\t\t\t\tsuper.onCreate(savedInstanceState);\n\t\t\t\tsetContentView(R.layout.draweralone);\n\t\t\t\tfindViewById(R.id.addmcpe).setOnClickListener(new View.OnClickListener(){\n\t\t\t\t\t\tpublic void onClick(View p){\n\t\t\t\t\t\t\tif(!isMcpeInstalled()){\n\t\t\t\t\t\t\t\tToast.makeText(MenuActivity.this,R.string.errMcpeNotInstalled,Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(!isMcpeConfigAvaliable()){\n\t\t\t\t\t\t\t\tToast.makeText(MenuActivity.this,R.string.errMcpeConfigNotFound,Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(alreadyAddedInList()){\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\tFileWriter fw = new FileWriter(file, true);\n\t\t\t\t\t\t\t\tfw.append(\"900:mura syou server:222.2.87.59:19132\\n\");\n\t\t\t\t\t\t\t\tfw.close();\n\t\t\t\t\t\t\t}catch (IOException e){\n\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t}", "@Override\n public void addPreferenceAndUpdateWidget(Context context, Pastry pastry) {\n IngredientSharedPreference.setIngredientListPreference(context, pastry.getIngredientsList());\n IngredientSharedPreference.setRecipeNamePreference(pastry.getName(), context);\n updateWidget(context);\n\n }", "public void loadWorkflow(String filename);", "public void setUserPreferences (int outdoorPref, int nightlifePref, int hotelPref, int shoppingPref, int restaurantPref) {\n\t\tpreferences.clear(); \n\t\tpreferences.add(outdoorPref); \n\t\tpreferences.add(nightlifePref); \n\t\tpreferences.add(hotelPref); \n\t\tpreferences.add(shoppingPref); \n\t\tpreferences.add(restaurantPref); \n\t}", "private void loadScheme(File file)\n\t{\n\t\tString name = file.getName();\n\n\t\ttry\n\t\t{\n\t\t\tBedrockScheme particle = BedrockScheme.parse(FileUtils.readFileToString(file, Charset.defaultCharset()));\n\n\t\t\tthis.presets.put(name.substring(0, name.indexOf(\".json\")), particle);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void readXML(){\n try{\n Document doc = getDoc(\"config.xml\");\n Element root = doc.getRootElement();\n\n //Muestra los elementos dentro de la configuracion del xml\n \n System.out.println(\"Color : \" + root.getChildText(\"color\"));\n System.out.println(\"Pattern : \" + root.getChildText(\"pattern\"));\n System.out.println(\"Background : \" + root.getChildText(\"background\"));\n \n\n } catch(Exception e){\n System.out.println(e.getMessage());\n }\n }", "org.landxml.schema.landXML11.RoadsideDocument.Roadside addNewRoadside();", "@Override\n\tprotected void onCreate(Bundle savedInstanceState)\n\t{\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.activity_config);\n\n\t\tPreferenceFragmentCompat preference = new SettingsPreference();\n\t\tIntent intent = getIntent();\n\t\t\n\t\tString action = intent.getAction();\n\t\tif (action != null && action.equals(OPEN_SETTINGS_SSH)) {\n\t\t\tsetTitle(R.string.settings_ssh);\n\t\t\tpreference = new SettingsSSHPreference();\n\t\t}\n\t\t\n\t\t// add preference settings\n\t\tgetSupportFragmentManager().beginTransaction()\n\t\t\t.replace(R.id.fragment_configLinearLayout, preference)\n\t\t\t.commit();\n\n\t\t// toolbar\n\t\tToolbar mToolbar = (Toolbar) findViewById(R.id.toolbar_main);\n\t\tsetSupportActionBar(mToolbar);\n\t\tgetSupportActionBar().setDisplayHomeAsUpEnabled(true);\n\t\t\n\t\t//SkProtect.CharlieProtect();\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n prefs = PreferenceManager.getDefaultSharedPreferences(this);\n currentMood = new Mood(moodDate, moodNumber, moodComment); //new mood=currentMood\n\n initViews();\n initGestureListener();\n initButtons();\n }" ]
[ "0.610242", "0.591872", "0.58630776", "0.5674038", "0.5550915", "0.55343544", "0.5528672", "0.5489243", "0.5441654", "0.52949786", "0.52382296", "0.52237505", "0.52092427", "0.51802003", "0.5154113", "0.5153295", "0.50719607", "0.50635386", "0.50257164", "0.5023442", "0.5015282", "0.50017107", "0.4999432", "0.4979033", "0.49200892", "0.49179283", "0.48953554", "0.4865787", "0.4854321", "0.48494247", "0.48418114", "0.48164362", "0.48039204", "0.47864568", "0.47792146", "0.47664338", "0.47486982", "0.47291687", "0.4724864", "0.47065353", "0.4688426", "0.46757883", "0.4675219", "0.46601057", "0.46586195", "0.4644018", "0.46257848", "0.46221036", "0.46208602", "0.4617348", "0.46117508", "0.46101224", "0.46090892", "0.4604338", "0.4602572", "0.46016556", "0.45878434", "0.45820412", "0.4576838", "0.45658898", "0.45551938", "0.45544", "0.45509678", "0.4540301", "0.45218748", "0.4517136", "0.45124024", "0.45109025", "0.4499762", "0.44949612", "0.44946983", "0.4493066", "0.4489277", "0.4488812", "0.44881043", "0.44871238", "0.447583", "0.44749552", "0.44727603", "0.44722468", "0.44656184", "0.446487", "0.4461586", "0.4460188", "0.44586673", "0.4452567", "0.4440396", "0.44337338", "0.44337338", "0.44314897", "0.44286478", "0.44263798", "0.4418063", "0.44176218", "0.44171172", "0.44162762", "0.4413493", "0.44111097", "0.44079757", "0.44047675" ]
0.5364627
9
Get the preference that changed
@Override public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) { Preference preference = findPreference(key); if (preference instanceof ListPreference) { // if the preference is a ListPreference ListPreference listPreference = (ListPreference) preference; // cast it to a ListPreference int prefIndex = listPreference.findIndexOfValue(sharedPreferences.getString(key, "")); // The index of the key that changed // now update the changed value's summary preference.setSummary(prefIndex >= 0 ? listPreference.getEntries()[prefIndex] : null); } else { // Not a ListPreference, update the summary directly preference.setSummary(sharedPreferences.getString(key, "")); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean onPreferenceChange(Preference preference, Object newValue) {\n \t\t\treturn false;\r\n \t\t}", "private void getPrefStatus() {\n Log.i(TAG, \"getPrefStatus()\");\n mPref = getSharedPreferences(PREF_NAME, Context.MODE_WORLD_READABLE\n | Context.MODE_WORLD_WRITEABLE);\n mHasGotPref = true;\n for (int i = SPEED_DIAL_MIN; i < SPEED_DIAL_MAX + 1; ++i) {\n mPrefNumState[i] = mPref.getString(String.valueOf(i), \"\");\n mPrefMarkState[i] = mPref.getInt(String.valueOf(offset(i)), -1);\n }\n }", "public NetworkCallInformation getPreferences() {\n return preferencesModel.getPreferences();\n\n }", "private int getSavedOption(){\n SharedPreferences preferences = getSharedPreferences(PREFERENCE_FILE_NAME, MODE_PRIVATE);\n\n return preferences.getInt(SAVED_WORKSPACE_POSITION_PREFERENCE_FIELD, -1);\n }", "private void readPref() {\n // get the last update; if not set, lastUpdate gets 31/12/69\n lastUpdate = sp.getLong(UPDATE, 0); \n System.out.println(\"Time of last update: \" + getDateFromLong(lastUpdate));\n }", "@Override\n public boolean onPreferenceChange(Preference preference, Object newValue) {\n String difficultySummary = \"Current difficulty: \" + newValue;\n difficultyLevelPref.setSummary(difficultySummary);\n // Since we are handling the pref, we must save it\n SharedPreferences.Editor ed = sharedPrefs.edit();\n ed.putString(\"difficulty_level\", newValue.toString());\n ed.apply();\n setDifficultyLevel(newValue.toString());\n return true;\n }", "public String getPreference(String key) {\n return preferences.get(key).value;\n }", "boolean getPausePreviewPref();", "public String getPreference(DataPreferenceEnum key)\n {\n return (preferencesHashMap.get(key));\n }", "public Preferences getPrefs() {\n return _prefs;\n }", "@Override\n public void onSettingChanged(ListPreference pref) {\n }", "public String getPreference(String key) {\n return prefs.get(key, null);\n }", "@JavascriptInterface\n public String getPreference(String name) {\n Log.d(TAG, \"getPreference: \" + name);\n return preferences.getString(name, \"\");\n }", "long getLastChanged();", "private boolean hasChanges() {\n for (Map.Entry<EditText, Integer> e : mPrefKeys.entrySet()) {\n String field = e.getKey().getText().toString();\n String pref = Pref.get(this, e.getValue()).replace(Data.DEACTIVATED_MARKER, \"\");\n if (!field.equals(pref))\n return true;\n }\n return false;\n }", "public String prefsAutomaticallyCheck();", "public static Boolean getKeyTippNotifications() {\n\n\t\tSharedPreferences sharedPref = PreferenceManager\n\t\t\t\t.getDefaultSharedPreferences(MainActivity.getContext());\n\t\tBoolean syncConnPref = sharedPref.getBoolean(keyTippNotifications,\n\t\t\t\tfalse);\n\n\t\treturn syncConnPref;\n\t}", "public static BleTrackerPreferences getPreferences() {\n return preferences;\n }", "public SharedPreferences getPrefs() { return this.prefs; }", "public boolean getKeepChangedValues();", "Boolean getIsChanged();", "int getTelecommutePreferenceValue();", "public String getChangedflag() {\n return (String) getAttributeInternal(CHANGEDFLAG);\n }", "Object getPreference(String prefKey, Object defaultValue);", "public GamePreferences getPrefs() {\n\t\treturn prefs;\n\t}", "public String getPref(String key) {\n\t SharedPreferences settings = activity.getSharedPreferences(PREFS_NAME, 0);\n\t settings = activity.getSharedPreferences(PREFS_NAME, 0);\n\t String value = settings.getString(key, \"\");\n\t return value;\n\t}", "@Override\r\n \tpublic void onSharedPreferenceChanged(SharedPreferences sp, String key) {\r\n \t\tif (localLOGV) {\r\n \t\t\tLog.i(TAG, \"Pref \" + key + \"changed... reading new value...\");\r\n \t\t}\r\n \t\tif (key.equals(res.getString(R.string.pref_data_file_key))) {\r\n \t\t\t// get new value\r\n \t\t\tString newPath = sp.getString(\r\n \t\t\t\t\tres.getString(R.string.pref_data_file_key), null);\r\n \t\t\tif (localLOGV) {\r\n \t\t\t\tLog.i(TAG, \"New value \" + String.valueOf(newPath));\r\n \t\t\t}\r\n \t\t\t// change value\r\n \t\t\tsetDataFileChanged(newPath);\r\n \t\t} else if (key.equals(res.getString(R.string.pref_data_file_gzip))) {\r\n \t\t\t// get new value\r\n \t\t\tgzipFile = sp.getBoolean(\r\n \t\t\t\t\tres.getString(R.string.pref_data_file_gzip), false);\r\n \t\t\tif (localLOGV) {\r\n \t\t\t\tLog.i(TAG, \"New value \" + String.valueOf(gzipFile));\r\n \t\t\t}\r\n \t\t\t// Set to reload file\r\n \t\t\treloadFile = true;\r\n \t\t} \r\n \t}", "public String fetchRecentChange(){\n\t\treturn recentChange;\n\t}", "@Override\n public boolean onPreferenceChange(Preference preference, Object value) {\n setPreferenceSummary(preference, value);\n Log.i(LOG_TAG, \"onPreferenceChange: \" + value.toString());\n return true;\n }", "public boolean isChanged() {\r\n return isChanged;\r\n }", "ClassInfo getPreference(int index) {\n\t\treturn this.preferences[index];\n\t}", "public Long getDevicePreference() {\r\n return devicePreference;\r\n }", "public Long getDevicePreference() {\r\n return devicePreference;\r\n }", "public ArrayList<Color> getPreferences() {\n\t\treturn preferences;\n\t}", "@Override\r\n\tpublic boolean onPreferenceChange(Preference preference, Object newValue) {\n\t\tmcallback.onReturnFromPreFragment(3);\r\n\t\treturn false;\r\n\t}", "public PreferenceService getPreferenceService() {\n return preferenceService;\n }", "String getFocusPref(boolean is_video);", "NetworkCallInformation getPreferences();", "String getFlashPref();", "@SuppressWarnings(\"deprecation\")\n\tpublic void onSharedPreferenceChanged(SharedPreferences sharedPreferences,\n\t\t\tString key) {\n\t\t// 갱신 시간 간격\n\t\tif (key.equals(IBRConstants.KEY_PREF_REFRESH_INTERVAL)) {\n\t\t\tPreference refreshInterval = findPreference(key);\n\t\t\tint position = Integer.parseInt(sharedPreferences\n\t\t\t\t\t.getString(key, \"\"));\n\t\t\t// Set summary to be the user-description for the selected value\n\t\t\trefreshInterval.setSummary(mRefreshIntervals[position]);\n\n setLocationFinderRefreshInterval(position);\n\n\t\t} else if (key.equals(IBRConstants.KEY_PREF_FACEBOOK_PROFILE)) {\n Preference refreshInterval = findPreference(key);\n boolean isChecked =sharedPreferences\n .getBoolean(key, true);\n\n sendFacebookProfilePolicyToServer(isChecked);\n\n }\n\t\t// else if (key.equals(PBNConstants.KEY_PREF_ZOOM_LEVEL)) {\n\t\t// eventLabel = \"keep_draft\";\n\t\t// boolean value = sharedPreferences.getBoolean(key, false);\n\t\t// eventValue = (value) ? 1 : 0;\n\t\t//\n\t\t// }\n\t}", "public boolean onPreferenceChange(Preference preference, Object objValue) {\n if (preference == mButtonDTMF) {\n int index = mButtonDTMF.findIndexOfValue((String) objValue);\n Settings.System.putInt(mPhone.getContext().getContentResolver(),\n Settings.System.DTMF_TONE_TYPE_WHEN_DIALING, index);\n } else if (preference == mButtonTTY) {\n handleTTYChange(preference, objValue);\n } else if (preference == mVoicemailProviders) {\n updateVMPreferenceWidgets((String)objValue);\n \n // If the user switches to a voice mail provider and we have a\n // number stored for it we will automatically change the phone's\n // voice mail number to the stored one.\n // Otherwise we will bring up provider's config UI.\n \n final String providerVMNumber = loadNumberForVoiceMailProvider(\n (String)objValue);\n \n if (providerVMNumber == null) {\n // Force the user into a configuration of the chosen provider\n simulatePreferenceClick(mVoicemailSettings);\n } else {\n saveVoiceMailNumber(providerVMNumber);\n }\n }\n // always let the preference setting proceed.\n return true;\n }", "public String getLastChange() {\n return lastChange;\n }", "public String getPreferences(String key) {\n return getPreferencesImpl(key);\n }", "public String getPreferences(String key) {\n return getPreferencesImpl(key);\n }", "public int getOldTrack() {\n return oldTrack;\n }", "@Override\n\tpublic void notifySettingChanged() {\n\t}", "public boolean isChanged() {\n return this.editorPane.getChangedProperty();\n }", "public static Boolean getKeyTippAuto() {\n\n\t\tSharedPreferences sharedPref = PreferenceManager\n\t\t\t\t.getDefaultSharedPreferences(MainActivity.getContext());\n\t\tBoolean syncConnPref = sharedPref.getBoolean(keyTippAuto, false);\n\n\t\treturn syncConnPref;\n\t}", "@Override\n \tpublic void onSharedPreferenceChanged(SharedPreferences prefs, String key) {\n \t\tcheckDefaults();\n \t}", "public static String getAppliedValue(Context context) {\n return Utilities.getDevicePrefs(context).getString(KEY_PREFERENCE, \"\");\n }", "public String getUserPreference(String aKey) {\r\n\t\tString result = null;\r\n\t\tif (this.getUserPreferences().containsKey(aKey)) {\r\n\t\t\tresult = this.getUserPreferences().get(aKey);\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public synchronized void onSharedPreferenceChanged(SharedPreferences sharedPrefs, String key){\n\t\tif(key.equals(\"vibrate_feedback\")){\n\t\t\tLog.d(TAG_APPLICATION,\"Vibrate setting changed\");\n\t\t\tisVibrateFeedbackOn = sharedPrefs.getBoolean(key,false);\n\t\t\tLog.d(TAG_APPLICATION, \"vibrate value changed to \"+isVibrateFeedbackOn);\n\t\t}\n\t\tif(key.equals(\"alert_feedback\")){\n\t\t\tLog.d(TAG_APPLICATION,\"Alert setting changed\");\n\t\t\tisSoundFeedbackOn = sharedPrefs.getBoolean(key, false);\n\t\t\tLog.d(TAG_APPLICATION, \"Alert setting changed to \"+isSoundFeedbackOn);\n\t\t}\n\t\tif(key.equals(\"set_threshold\")){\n\t\t\tif(!(sharedPrefs.getString(\"set_threshold\", \"3.0\").equals(\"\"))){\n\t\t\t\tthresholdSetting = Float.parseFloat(sharedPrefs.getString(\"set_threshold\", \"3.0\")); // getting changed threshold setting from shared preference\n\t\t\t\tLog.d(TAG_APPLICATION, \"threshold Setting changed to \"+thresholdSetting);\n\t\t\t} else\n\t\t\t\tthresholdSetting = 3.0f;\n\t\t}\n\t\tif(key.equals(\"set_height\")){\n\t\t\tif(!(sharedPrefs.getString(\"set_height\", \"1.83\").equals(\"\"))){\n\t\t\t\tpersonsHeight = Float.parseFloat(sharedPrefs.getString(\"set_height\", \"1.83\"));\n\t\t\t\t//Segment.initialCross[0][2] = 100*personsHeight*3/(8*GRID_ROWS*2); // getting changed height setting from shared preference\n\t\t\t\t//Segment.initialCross[2][2] = -100*personsHeight*3/(8*GRID_ROWS*2);\n\t\t\t\t//Log.d(TAG_APPLICATION, \"acc segment distance changed to \"+accSegmentDistance+\" Persons height: \"+personsHeight+\"$\"+ 100*personsHeight*3/(8*GRID_ROWS*2)+\"$segments coords: \"+Segment.initialCross[0][2]+\" \"+Segment.initialCross[1][2]+\" \"+Segment.initialCross[2][2]+\" \"+Segment.initialCross[3][2]);\n\t\t\t} else{\n\t\t\t\t//Segment.initialCross[0][2] = (float)100*1.83f*3/(8*GRID_ROWS*2); // getting changed height setting from shared preference\n\t\t\t // Segment.initialCross[2][2] = (float)-100*1.83f*3/(8*GRID_ROWS*2)key.;\n\t\t\t}\n\t\t}\n\t\tif(key.equals(\"set_statistics_interval\")){\n\t\t\tif(!(sharedPrefs.getString(\"set_statistics_interval\", \"1.0\").equals(\"\"))){\n\t\t\t\tstatisticsIntervalSetting=Float.parseFloat(sharedPrefs.getString(\"set_statistics_interval\", \"1.0\"));\n\t\t\t\tLog.d(\"statistics updated\",\"\"+statisticsIntervalSetting);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tstatisticsIntervalSetting=1.0f;\n\t\t\t\tLog.d(\"statistics updated\",\"\"+statisticsIntervalSetting);\n\t\t\t}\n\t\t\t\t\n\t\t\t\n\t\t}\n\t\tif(key.equals(\"select_algorithm\")){\n\t\t\talgorithm = sharedPrefs.getString(\"select_algorithm\", \"distances\");\n\t\t\tLog.d(TAG_APPLICATION, \"algorithm select setting changed to \"+algorithm );\n\t\t}\n\t\tif(key.equals(\"log_enable\")){\n\t\t\tisLoggingFeatureEnabled=sharedPrefs.getBoolean(key,false);\n\t\t\tLog.d(TAG_APPLICATION, \"log enable setting changed to \"+ isLoggingFeatureEnabled);\n\t\t\t\n\t\t}\n\t\tif(key.equals(\"set_angle1\")){\n\t\t\tif(!(sharedPrefs.getString(\"set_angle1\", \"0.0\").equals(\"\"))){\n\t\t\t\tZ_ANGLE1 = Float.parseFloat(sharedPrefs.getString(\"set_angle1\", \"0.0\")); // getting changed threshold setting from shared preference\n\t\t\t\tLog.d(TAG_APPLICATION, \"angle1 changed to \"+Z_ANGLE1);\n\t\t\t} else{\n\t\t\t\tZ_ANGLE1 = 0.0f;\n\t\t }\n\t\t\tfor(int i=0;i<GRID_ROWS;i++){\n\t\t\t\tcurrentStateSegments[i][0].setSegmentZRotation(-(float)Math.toRadians(Z_ANGLE1));\n\t\t\t\trefferenceStateSegments[i][0].setSegmentZRotation(-(float)Math.toRadians(Z_ANGLE1));\n\t\t\t\trefferenceStateSegmentsInitial[i][0].setSegmentZRotation(-(float)Math.toRadians(Z_ANGLE1));\n\t\t\t\t\n\t\t\t\tcurrentStateSegments[i][6].setSegmentZRotation((float)Math.toRadians(Z_ANGLE1));\n\t\t\t\trefferenceStateSegments[i][6].setSegmentZRotation((float)Math.toRadians(Z_ANGLE1));\n\t\t\t\trefferenceStateSegmentsInitial[i][6].setSegmentZRotation((float)Math.toRadians(Z_ANGLE1));\n\t\t\t}\n\t\t}\n\t\tif(key.equals(\"set_angle2\")){\n\t\t\tif(!(sharedPrefs.getString(\"set_angle2\", \"0.0\").equals(\"\"))){\n\t\t\t\tZ_ANGLE2 = Float.parseFloat(sharedPrefs.getString(\"set_angle2\", \"0.0\")); // getting changed threshold setting from shared preference\n\t\t\t\tLog.d(TAG_APPLICATION, \"angle2 changed to \"+Z_ANGLE2);\n\t\t\t} else{\n\t\t\t\tZ_ANGLE2 = 0.0f;\n\t\t }\n\t\t\t\n\t\t\tfor(int i=0;i<GRID_ROWS;i++){\n\t\t\t\tcurrentStateSegments[i][1].setSegmentZRotation(-(float)Math.toRadians(Z_ANGLE2));\n\t\t\t\trefferenceStateSegments[i][1].setSegmentZRotation(-(float)Math.toRadians(Z_ANGLE2));\n\t\t\t\trefferenceStateSegmentsInitial[i][1].setSegmentZRotation(-(float)Math.toRadians(Z_ANGLE2));\n\t\t\t\t\n\t\t\t\tcurrentStateSegments[i][5].setSegmentZRotation((float)Math.toRadians(Z_ANGLE2));\n\t\t\t\trefferenceStateSegments[i][5].setSegmentZRotation((float)Math.toRadians(Z_ANGLE2));\n\t\t\t\trefferenceStateSegmentsInitial[i][5].setSegmentZRotation((float)Math.toRadians(Z_ANGLE2));\n\t\t\t}\n\n\t\t}\n\t\t\n\t\tif(key.equals(\"set_angle3\")){\n\t\t\tif(!(sharedPrefs.getString(\"set_angle3\", \"0.0\").equals(\"\"))){\n\t\t\t\tZ_ANGLE3 = Float.parseFloat(sharedPrefs.getString(\"set_angle3\", \"0.0\")); // getting changed threshold setting from shared preference\n\t\t\t\tLog.d(TAG_APPLICATION, \"angle3 changed to \"+Z_ANGLE3);\n\t\t\t} else{\n\t\t\t\tZ_ANGLE3 = 0.0f;\n\t\t }\n\t\t\t\n\t\t\tfor(int i=0;i<GRID_ROWS;i++){\n\t\t\t\tcurrentStateSegments[i][2].setSegmentZRotation(-(float)Math.toRadians(Z_ANGLE3));\n\t\t\t\trefferenceStateSegments[i][2].setSegmentZRotation(-(float)Math.toRadians(Z_ANGLE3));\n\t\t\t\trefferenceStateSegmentsInitial[i][2].setSegmentZRotation(-(float)Math.toRadians(Z_ANGLE3));\n\t\t\t\t\n\t\t\t\tcurrentStateSegments[i][4].setSegmentZRotation((float)Math.toRadians(Z_ANGLE3));\n\t\t\t\trefferenceStateSegments[i][4].setSegmentZRotation((float)Math.toRadians(Z_ANGLE3));\n\t\t\t\trefferenceStateSegmentsInitial[i][4].setSegmentZRotation((float)Math.toRadians(Z_ANGLE3));\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(key.equals(\"set_reference_row\")){\n\t\t\tif(!(sharedPrefs.getString(\"set_reference_row\", \"1\").equals(\"\"))){\n\t\t\t\treferenceRow = Integer.parseInt(sharedPrefs.getString(\"set_reference_row\", \"1\")); // getting changed threshold setting from shared preference\n\t\t\t\tcurrentStateSegments[referenceRow][referenceCol].center[0]=0;\n\t\t\t\tcurrentStateSegments[referenceRow][referenceCol].center[1]=0;\n\t\t\t\tcurrentStateSegments[referenceRow][referenceCol].center[2]=0;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\trefferenceStateSegments[referenceRow][referenceCol].center[0]=0;\n\t\t\t\trefferenceStateSegments[referenceRow][referenceCol].center[1]=0;\n\t\t\t\trefferenceStateSegments[referenceRow][referenceCol].center[2]=0;\n\t\t\t\t\n\t\t\t\trefferenceStateSegmentsInitial[referenceRow][referenceCol].center[0]=0;\n\t\t\t\trefferenceStateSegmentsInitial[referenceRow][referenceCol].center[1]=0;\n\t\t\t\trefferenceStateSegmentsInitial[referenceRow][referenceCol].center[2]=0;\n\t\t\t\t\n\t\t\t\tSegment.setSegmentCenters(refferenceStateSegments, (short)getReferenceRow(), (short)getReferenceCol());\n\t\t\t\tSegment.setSegmentCenters(refferenceStateSegmentsInitial, (short)getReferenceRow(), (short)getReferenceCol());\n\t\t\t\tsaveDefaultPosture(SmartWearApplication.DEFAULT_POSTURE_FILE, refferenceStateSegments);\n\t\t\t\t\n\t\t\t\tLog.d(TAG_APPLICATION, \"reference row changed to \"+referenceRow);\n\t\t\t} else{\n\t\t\t\treferenceRow = 1;\n\t\t }\n\t\t}\n\t\t\n\t\tif(key.equals(\"set_reference_col\")){\n\t\t\tif(!(sharedPrefs.getString(\"set_reference_col\", \"3\").equals(\"\"))){\n\t\t\t\treferenceCol = Integer.parseInt(sharedPrefs.getString(\"set_reference_col\", \"3\")); // getting changed threshold setting from shared preference\n\t\t\t\tLog.d(TAG_APPLICATION, \"reference col changed to \"+referenceCol);\n\t\t\t\t\n\t\t\t\tcurrentStateSegments[referenceRow][referenceCol].center[0]=0;\n\t\t\t\tcurrentStateSegments[referenceRow][referenceCol].center[1]=0;\n\t\t\t\tcurrentStateSegments[referenceRow][referenceCol].center[2]=0;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\trefferenceStateSegments[referenceRow][referenceCol].center[0]=0;\n\t\t\t\trefferenceStateSegments[referenceRow][referenceCol].center[1]=0;\n\t\t\t\trefferenceStateSegments[referenceRow][referenceCol].center[2]=0;\n\t\t\t\t\n\t\t\t\trefferenceStateSegmentsInitial[referenceRow][referenceCol].center[0]=0;\n\t\t\t\trefferenceStateSegmentsInitial[referenceRow][referenceCol].center[1]=0;\n\t\t\t\trefferenceStateSegmentsInitial[referenceRow][referenceCol].center[2]=0;\n\t\t\t\t\n\t\t\t\tSegment.setSegmentCenters(refferenceStateSegments, (short)getReferenceRow(), (short)getReferenceCol());\n\t\t\t\tSegment.setSegmentCenters(refferenceStateSegmentsInitial, (short)getReferenceRow(), (short)getReferenceCol());\n\t\t\t\tsaveDefaultPosture(SmartWearApplication.DEFAULT_POSTURE_FILE, refferenceStateSegments);\n\t\t\t} else{\n\t\t\t\treferenceCol = 3;\n\t\t }\n\t\t}\n\t\tif(key.equals(\"set_colormap_sensitivity\")){\n\t\t\tif(!(sharedPrefs.getString(\"set_colormap_sensitivity\", \"1\").equals(\"\"))){\n\t\t\t\tcolormapSensitivity = Float.parseFloat(sharedPrefs.getString(\"set_colormap_sensitivity\", \"1\")); // getting changed threshold setting from shared preference\n\t\t\t\tLog.d(TAG_APPLICATION, \"colormap sensitivity changed to \"+colormapSensitivity);\n\t\t\t} else{\n\t\t\t\tcolormapSensitivity = 1;\n\t\t }\n\t\t}\n\t}", "String getUpdated();", "public boolean isChanged()\r\n\t{\r\n\t\treturn changed;\r\n\t}", "long getTimerPref();", "long getStateChange();", "private MinesweeperPreferences getPrefs() {\n return Main.getPrefs();\n }", "int getUpdateModeValue();", "public boolean wasChangeDetected() {\n return bChangeDetected;\n }", "public ReactivePreferences preferences() {\n\t\treturn ReactivePreferences.userRoot();\n\t}", "public void onSettingChanged(ListPreference pref) {\n\t\tLog.v(\"yang\", \"+++ onSettingChanged: \" + pref.getKey() + \" +++ \");\n\t\tif (notSame(pref, CameraSettings.KEY_VIDEO_TIME_LAPSE_FRAME_INTERVAL,\n\t\t\t\tmActivity.getString(R.string.pref_video_time_lapse_frame_interval_default))) {\n\t\t\tListPreference hfrPref = mPreferenceGroup.findPreference(CameraSettings.KEY_VIDEO_HIGH_FRAME_RATE);\n\t\t\tif (hfrPref != null && !\"off\".equals(hfrPref.getValue())) {\n\t\t\t\tRotateTextToast.makeText(mActivity, R.string.error_app_unsupported_hfr_selection,Toast.LENGTH_LONG).show();\n\t\t\t}\n\t\t\tsetPreference(CameraSettings.KEY_VIDEO_HIGH_FRAME_RATE, \"off\");\n\t\t}\n\t\tif (notSame(pref, CameraSettings.KEY_VIDEO_HIGH_FRAME_RATE, \"off\")) {\n\t\t\tString defaultValue = mActivity.getString(R.string.pref_video_time_lapse_frame_interval_default);\n\t\t\tListPreference lapsePref = mPreferenceGroup.findPreference(CameraSettings.KEY_VIDEO_TIME_LAPSE_FRAME_INTERVAL);\n\t\t\tif (lapsePref != null && !defaultValue.equals(lapsePref.getValue())) {\n\t\t\t\tRotateTextToast.makeText(mActivity, R.string.error_app_unsupported_hfr_selection,Toast.LENGTH_LONG).show();\n\t\t\t}\n\t\t\tsetPreference(CameraSettings.KEY_VIDEO_TIME_LAPSE_FRAME_INTERVAL, defaultValue);\n\t\t}\n\t\tif (notSame(pref, CameraSettings.KEY_RECORD_LOCATION, \"off\")) {\n\t\t\tmActivity.requestLocationPermission();\n\t\t}\n\t\tsuper.onSettingChanged(pref);\t// call VideoModule's CameraPreference.OnPreferenceChangedListener\n\t\tLog.v(\"yang\", \"--- onSettingChanged: \" + pref.getKey() + \" --- \" );\n\t}", "public synchronized long getCheckpoint() {\n return globalCheckpoint;\n }", "public String getRecentColors() {\n return (String) data[GENERAL_RECENT_COLORS][PROP_VAL_VALUE];\n }", "@ZAttr(id=586)\n public String getPasswordChangeListener() {\n return getAttr(Provisioning.A_zimbraPasswordChangeListener, null);\n }", "protected abstract IPreferenceStore getPreferenceStore();", "public long getTimeOfLastValuesChanged();", "long getChangeset();", "public String getOldValue() {\n return this.oldValue;\n }", "public IPreferenceStore getTextPreferenceStore() {\n return fPreferenceStore;\n }", "public boolean isChanged() {\n return this.changed;\n }", "private int mo115910f() {\n BaseApplication baseApplication;\n SettingsPreferenceInterface settingsPreferenceInterface = (SettingsPreferenceInterface) InstanceProvider.m107964b(SettingsPreferenceInterface.class);\n if (settingsPreferenceInterface == null || (baseApplication = BaseApplication.INSTANCE) == null) {\n return 1;\n }\n return settingsPreferenceInterface.isOpenDoubleClickVoteup(baseApplication) ? 1 : 0;\n }", "@Override\r\n public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {\r\n if (somethingIsBeingProcessed) {\r\n return;\r\n }\r\n if (onSharedPreferenceChanged_busy || !MyPreferences.isInitialized()) {\r\n return;\r\n }\r\n onSharedPreferenceChanged_busy = true;\r\n \r\n try {\r\n String value = \"(not set)\";\r\n if (sharedPreferences.contains(key)) {\r\n try {\r\n value = sharedPreferences.getString(key, \"\");\r\n } catch (ClassCastException e) {\r\n try {\r\n value = Boolean.toString(sharedPreferences.getBoolean(key, false));\r\n } catch (ClassCastException e2) {\r\n value = \"??\";\r\n }\r\n }\r\n }\r\n MyLog.d(TAG, \"onSharedPreferenceChanged: \" + key + \"='\" + value + \"'\");\r\n \r\n // Here and below:\r\n // Check if there are changes to avoid \"ripples\": don't set new\r\n // value if no changes\r\n \r\n if (key.equals(MyAccount.Builder.KEY_ORIGIN_NAME)) {\r\n if (state.getAccount().getOriginName().compareToIgnoreCase(mOriginName.getValue()) != 0) {\r\n // If we have changed the System, we should recreate the\r\n // Account\r\n state.builder = MyAccount.Builder.newOrExistingFromAccountName(\r\n AccountName.fromOriginAndUserNames(mOriginName.getValue(),\r\n state.getAccount().getUsername()).toString(),\r\n TriState.fromBoolean(state.getAccount().isOAuth()));\r\n showUserPreferences();\r\n }\r\n }\r\n if (key.equals(MyAccount.Builder.KEY_OAUTH)) {\r\n if (state.getAccount().isOAuth() != mOAuth.isChecked()) {\r\n state.builder = MyAccount.Builder.newOrExistingFromAccountName(\r\n AccountName.fromOriginAndUserNames(mOriginName.getValue(),\r\n state.getAccount().getUsername()).toString(),\r\n TriState.fromBoolean(mOAuth.isChecked()));\r\n showUserPreferences();\r\n }\r\n }\r\n if (key.equals(MyAccount.Builder.KEY_USERNAME_NEW)) {\r\n String usernameNew = mEditTextUsername.getText();\r\n if (usernameNew.compareTo(state.getAccount().getUsername()) != 0) {\r\n boolean isOAuth = state.getAccount().isOAuth();\r\n String originName = state.getAccount().getOriginName();\r\n state.builder = MyAccount.Builder.newOrExistingFromAccountName(\r\n AccountName.fromOriginAndUserNames(originName, usernameNew).toString(),\r\n TriState.fromBoolean(isOAuth));\r\n showUserPreferences();\r\n }\r\n }\r\n if (key.equals(Connection.KEY_PASSWORD)) {\r\n if (state.getAccount().getPassword().compareTo(mEditTextPassword.getText()) != 0) {\r\n state.builder.setPassword(mEditTextPassword.getText());\r\n showUserPreferences();\r\n }\r\n }\r\n } finally {\r\n onSharedPreferenceChanged_busy = false;\r\n }\r\n }", "public boolean changed() {\r\n\t\treturn changed;\r\n\t}", "private void getSettings(){\n SharedPreferences sp = getSharedPreferences(\"PACERUNNER_SETTINGS\", Activity.MODE_PRIVATE);\n AMOUNT_OF_SECONDS_WHEN_TRIGGERING_NOTIFICATION = sp.getInt(\"NOTIFICATION_SENSITIVITY\", -15);\n REQUIRED_METERS_BEFORE_SHOWING_AVGPACE = sp.getInt(\"NOTIFICATION_METERS_BEFORE_START\", 500);\n }", "public int getPauseAfterChangePatch()\n {\n return 0;\n }", "public String getPreference(Preference preference) {\n String value = this.preferences.get(preference.getName());\n return (value != null) ? value : preference.getDefaultValue();\n }", "private void saveCurrentPreferences() {\n\t\toldUnitType = preferences.getInt(\"displayUnit\", UnitType.FOOTINCH.getId());\n\t\toldPrecision = preferences.getInt(\"precision\", 16);\n\t\toldRounding = preferences.getBoolean(\"roundUp\", true);\n\t\toldDisplayOptions = preferences.getString(\"displayOptions\", context.getString(R.string.displayAutomatic));\n\t}", "public int getChange() {\n\t\treturn player.getDay(0).calculateChangeFactor();\n\t\t\n\t}", "com.google.ads.googleads.v6.resources.ChangeStatus getChangeStatus();", "private void bindPreferenceSummaryToValue(Preference preference) {\n preference.setOnPreferenceChangeListener(this);\n // We also read the current value of the preference stored in the SharedPreferences on the device,\n // and display that in the preference summary (so that the user can see the current value of the preference):\n SharedPreferences preferences =\n PreferenceManager.getDefaultSharedPreferences(preference.getContext());\n String preferenceString = preferences.getString(preference.getKey(), \"\");\n onPreferenceChange(preference, preferenceString);\n }", "public String getPropertyWatcherClass()\n {\n return propertyWatcherClass;\n }", "private void bindPreferenceSummaryToValue(Preference preference) {\n preference.setOnPreferenceChangeListener(this);\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(preference.getContext());\n String preferenceString = preferences.getString(preference.getKey(), \"\");\n onPreferenceChange(preference, preferenceString);\n }", "private void showPreferenceSettings() {\n \tfor(PrefKeysE k: PrefKeysE.values()) {\n \t\tString key = k.getKey();\n \t\tboolean isFound = Tt.isPreferencePresent(key);\n \t\tint prtFlags = 0; //don't print from getPreference()\n// \t\tboolean valB;\n// \t\tint valI;\n// \t\tdouble valD;\n \t\tString valFoundStr = \"\";\n \t\tString prefix = String.format(\"%-40s: %-7s: found? %s, default \", key, k.getType().name(), (isFound ? \"Y\" : \"N\"));\n \t\tswitch(k.getType()) {\n \t\tcase BOOLEAN:\n \t\t\tboolean dfltB = k.getDefaultBoolean();\n \t\t\tvalFoundStr += dfltB;\n \t\t\tif(isFound) {\n \t\t\t\tboolean val = Tt.getPreference(k, dfltB, prtFlags, PrefCreateE.DO_NOT_CREATE);\n \t\t\t\tvalFoundStr += \", current \" + val;\n \t\t\t}\n \t\t\tbreak;\n \t\tcase INT:\n \t\t\tint dfltI = k.getDefaultInt();\n \t\t\tvalFoundStr += dfltI;\n \t\t\tif(isFound) {\n \t\t\t\tint val = Tt.getPreference(k, dfltI, prtFlags, PrefCreateE.DO_NOT_CREATE);\n \t\t\t\tvalFoundStr += \", current \" + val;\n \t\t\t}\n \t\t\tbreak;\n \t\tcase DOUBLE:\n \t\t\tdouble dfltD = k.getDefaultDouble();\n \t\t\tvalFoundStr = String.format(\"% 1.4f\", dfltD);\n \t\t\tif(isFound) {\n \t\t\t\tdouble val = Tt.getPreference(k, dfltD, prtFlags, PrefCreateE.DO_NOT_CREATE);\n \t\t\t\tvalFoundStr += String.format(\", current % 1.4f\", val);\n \t\t\t}\n \t\t\tbreak;\n \t\tcase STRING:\n \t\t\tString dfltS = k.getDefaultString();\n\t\t\t\tvalFoundStr += \"'\" + dfltS + \"'\";\n \t\t\tif(isFound) {\n \t\t\t\tString val = Tt.getPreference(k, dfltS, prtFlags, PrefCreateE.DO_NOT_CREATE);\n \t\t\t\tvalFoundStr += \", current '\" + val + \"'\";\n \t\t\t}\n \t\t\tbreak;\n \t\t}\n\t\t\tP.println(prefix + valFoundStr);\n\n// \t\tif(k.getType().equals(PrefTypeE.BOOLEAN)) \n \t}\n }", "public BwPreferences getUserPreferences() {\n return userPreferences;\n }", "protected abstract String getHintGivenSharedPreferencesKey();", "public abstract SharedPreferences getStateSettings();", "boolean getStartupFocusPref();", "public File getPreferencesFile() {\n\t\treturn preferencesFile;\n\t}", "public boolean onPreferenceChange(android.preference.Preference r8, java.lang.Object r9) {\n /*\n r7 = this;\n r2 = 0;\n r3 = 1;\n r4 = com.whatsapp.DialogToastActivity.f;\n r0 = android.os.Build.MODEL;\n r1 = z;\n r5 = 5;\n r1 = r1[r5];\n r0 = r0.contains(r1);\n if (r0 != 0) goto L_0x001d;\n L_0x0011:\n r0 = android.os.Build.MODEL;\n r1 = z;\n r1 = r1[r2];\n r0 = r0.contains(r1);\n if (r0 == 0) goto L_0x0032;\n L_0x001d:\n r0 = r9.toString();\n r1 = z;\n r5 = 4;\n r1 = r1[r5];\n r0 = r0.equals(r1);\n if (r0 != 0) goto L_0x0032;\n L_0x002c:\n r0 = r7.a;\n r1 = 7;\n r0.showDialog(r1);\n L_0x0032:\n r0 = r8;\n r0 = (android.preference.ListPreference) r0;\n r1 = r9;\n r1 = (java.lang.String) r1;\n r1 = r0.findIndexOfValue(r1);\n r0 = r0.getEntries();\n r0 = r0[r1];\n r0 = r0.toString();\n r8.setSummary(r0);\n r1 = r8.getKey();\n r0 = -1;\n r5 = r1.hashCode();\n switch(r5) {\n case -1806012668: goto L_0x0059;\n case -1040361276: goto L_0x0067;\n default: goto L_0x0055;\n };\n L_0x0055:\n switch(r0) {\n case 0: goto L_0x0074;\n case 1: goto L_0x0089;\n default: goto L_0x0058;\n };\n L_0x0058:\n return r3;\n L_0x0059:\n r5 = z;\n r6 = 2;\n r5 = r5[r6];\n r5 = r1.equals(r5);\n if (r5 == 0) goto L_0x0055;\n L_0x0064:\n if (r4 == 0) goto L_0x009b;\n L_0x0066:\n r0 = r2;\n L_0x0067:\n r2 = z;\n r5 = 6;\n r2 = r2[r5];\n r1 = r1.equals(r2);\n if (r1 == 0) goto L_0x0055;\n L_0x0072:\n r0 = r3;\n goto L_0x0055;\n L_0x0074:\n r0 = r8.getContext();\n r1 = com.whatsapp.a3b.a(r0);\n r0 = z;\n r2 = 3;\n r2 = r0[r2];\n r0 = r9;\n r0 = (java.lang.String) r0;\n r1.e(r2, r0);\n if (r4 == 0) goto L_0x0058;\n L_0x0089:\n r0 = r8.getContext();\n r0 = com.whatsapp.a3b.a(r0);\n r1 = z;\n r1 = r1[r3];\n r9 = (java.lang.String) r9;\n r0.e(r1, r9);\n goto L_0x0058;\n L_0x009b:\n r0 = r2;\n goto L_0x0055;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.whatsapp.awk.onPreferenceChange(android.preference.Preference, java.lang.Object):boolean\");\n }", "public Preferences getActionPreferences() {\n return actionPrefs;\n }", "public int getChangeType() {\r\n return changeType;\r\n }", "private final SharedPreferences m43714a() {\n SharedPreferences sharedPreferences = this.f35814a.getSharedPreferences(\"LastActivityDatePreferencesRepository_last_activity_date\", 0);\n C2668g.a(sharedPreferences, \"context.getSharedPrefere…EF, Context.MODE_PRIVATE)\");\n return sharedPreferences;\n }", "public boolean hasChanged();", "public boolean hasChanged();", "public static String getSharedPrefs() {\n return SHARED_PREFS;\n }", "public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {\r\n if (AccountSettings.this.mSomethingIsBeingProcessed) {\r\n return;\r\n }\r\n if (onSharedPreferenceChanged_busy || !MyPreferences.isInitialized()) {\r\n return;\r\n }\r\n onSharedPreferenceChanged_busy = true;\r\n\r\n try {\r\n String value = \"(not set)\";\r\n if (sharedPreferences.contains(key)) {\r\n try {\r\n value = sharedPreferences.getString(key, \"\");\r\n } catch (ClassCastException e) {\r\n try {\r\n value = Boolean.toString(sharedPreferences.getBoolean(key, false));\r\n } catch (ClassCastException e2) {\r\n value = \"??\";\r\n }\r\n }\r\n }\r\n MyLog.d(TAG, \"onSharedPreferenceChanged: \" + key + \"='\" + value + \"'\");\r\n\r\n // Here and below:\r\n // Check if there are changes to avoid \"ripples\": don't set new value if no changes\r\n \r\n if (key.equals(MyAccount.Builder.KEY_ORIGIN_NAME)) {\r\n if (state.getMyAccount().getOriginName().compareToIgnoreCase(mOriginName.getValue()) != 0) {\r\n // If we have changed the System, we should recreate the Account\r\n state.builder = MyAccount.Builder.valueOf(mOriginName.getValue() + \"/\" + state.getMyAccount().getUsername());\r\n showUserPreferences();\r\n }\r\n }\r\n if (key.equals(MyAccount.Builder.KEY_OAUTH)) {\r\n if (state.getMyAccount().isOAuth() != mOAuth.isChecked()) {\r\n state.builder.setOAuth(mOAuth.isChecked());\r\n showUserPreferences();\r\n }\r\n }\r\n if (key.equals(MyAccount.Builder.KEY_USERNAME_NEW)) {\r\n String usernameNew = mEditTextUsername.getText();\r\n if (usernameNew.compareTo(state.getMyAccount().getUsername()) != 0) {\r\n boolean oauth = state.getMyAccount().isOAuth();\r\n String originName = state.getMyAccount().getOriginName();\r\n // TODO: maybe this is not enough...\r\n state.builder = MyAccount.Builder.valueOf(originName + \"/\" + usernameNew);\r\n state.builder.setOAuth(oauth);\r\n showUserPreferences();\r\n }\r\n }\r\n if (key.equals(ConnectionBasicAuth.KEY_PASSWORD)) {\r\n if (state.getMyAccount().getPassword().compareTo(mEditTextPassword.getText()) != 0) {\r\n state.builder.setPassword(mEditTextPassword.getText());\r\n showUserPreferences();\r\n }\r\n }\r\n } finally {\r\n onSharedPreferenceChanged_busy = false;\r\n }\r\n }", "public int getRecord(){\n SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this.getContext()); return prefs.getInt(\"record\", -1);\n }", "public long getNotify() {\n\t\treturn notify;\n\t}", "@javax.annotation.Nullable\n public String getChange() {\n return change;\n }", "static int getCurrentSettingTab() {\n return currentSettingTab;\n }", "public long getStateChange() {\n return stateChange_;\n }" ]
[ "0.63911873", "0.6365511", "0.6177052", "0.59028345", "0.58972174", "0.5873083", "0.58409566", "0.58073276", "0.576072", "0.5758831", "0.5730942", "0.5726929", "0.5724034", "0.5721623", "0.5702294", "0.5664588", "0.56543285", "0.5636981", "0.5625692", "0.5619121", "0.55916435", "0.5569532", "0.55555856", "0.55518174", "0.5547181", "0.55156", "0.5474232", "0.54652196", "0.54605794", "0.5458833", "0.5434837", "0.5432356", "0.5432356", "0.5432113", "0.542599", "0.5424799", "0.5399876", "0.5395868", "0.5369851", "0.53582215", "0.53549147", "0.5352525", "0.5341543", "0.5341543", "0.5340464", "0.5328953", "0.53251994", "0.5324335", "0.5316894", "0.5283995", "0.5256645", "0.52555066", "0.5253914", "0.5253027", "0.52434826", "0.5238705", "0.5238014", "0.5236459", "0.5231699", "0.5231392", "0.52303004", "0.52262557", "0.5226215", "0.5211882", "0.5208387", "0.51981616", "0.51938945", "0.5191437", "0.51881206", "0.518101", "0.51784754", "0.51753443", "0.517481", "0.5174536", "0.5173364", "0.51715297", "0.51692516", "0.51634294", "0.51537853", "0.5150658", "0.51460767", "0.5143234", "0.5140197", "0.51374507", "0.5134685", "0.5129597", "0.5120882", "0.51195925", "0.5113215", "0.5109373", "0.5108127", "0.51063675", "0.51022357", "0.51022357", "0.50987685", "0.5094741", "0.5092947", "0.50883216", "0.5080188", "0.5080086", "0.50783175" ]
0.0
-1
Class : Task : This class
public interface Reload { public void reloadDataNow(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Task(){}", "public Task(){\n super();\n }", "public Task() { }", "public Task() {\r\n }", "public abstract void task();", "public Task() {\n }", "public Task() {\n\t}", "public Task getTask() { return task; }", "Task createTask();", "Task createTask();", "Task createTask();", "Task(String name) {\n this.name = name;\n }", "protected TaskFlow( ) { }", "public Task(String description){\n this.description = description;\n this.isDone = false;\n }", "public Task(String description){\n this.description = description;\n this.isDone = false;\n }", "public Task(String name) {\n\t\tthis.name=name;\n\t}", "public interface TaskBase {\n\t/**\n\t * @return Returns the name of the task\n\t */\n\tpublic String GetName();\n\n\t/**\n\t * Called upon entering autonomous mode\n\t */\n\tpublic void Initialize();\n\n\t/**\n\t * Called every autonomous update\n\t * \n\t * @return Return task result enum\n\t */\n\tpublic TaskReturnType Run();\n\n}", "public interface Task extends Runnable {\n\n /**\n * Get the task name\n *\n * @return\n */\n public String getTaskName();\n\n /**\n *\n * @return true if the task is in active, else false\n */\n public boolean isActive();\n\n /**\n * @return priority of the task\n */\n public int getPriority();\n\n /**\n *\n * @return the sequence number of the task. If two tasks has same priority,\n * then the task with less sequence number executes first.\n */\n public int getSequenceNumber();\n}", "public TaskCurrent() {\n\t}", "public interface Task {\n\t\t/** Insertion tuples */\n\t\tpublic TupleSet insertions();\n\n\t\t/** Deletion tuples. */\n\t\tpublic TupleSet deletions();\n\n\t\t/** The program name that should evaluate the tuples. */\n\t\tpublic String program();\n\n\t\t/** The name of the table to which the tuples belong. */\n\t\tpublic TableName name();\n\t}", "public Task(String name) {\n this.name = name;\n this.isDone = false;\n }", "public interface Task {\n void execute() ;\n}", "public Tasks() {\n }", "@Override\n public void taskStarting() {\n\n }", "public TimedTask(String task) {\n this.task = task;\n timeStart = System.currentTimeMillis();\n }", "public void startTask() {\n\t}", "int getTask() {\n return task;\n }", "public AnemoCheckTask() {\n }", "@Override\n\t\t\tpublic void subTask(String name) {\n\t\t\t\t\n\t\t\t}", "Task1(String c){\n\t\n}", "public Task getTask() {\n return task;\n }", "@Override\r\n\tpublic void doTask() {\n\t}", "public abstract void execute(Task t);", "@Override\n\tpublic void addTask(Task task) {\n\t\t\n\t}", "@Override\r\n\tvoid execute(Runnable task);", "public interface ITask extends PropertyChangeListener{\n\tvoid execute();\n\tvoid interrupt();\n\tboolean toBeRemoved();\n\n\t//Using update tick\n\tboolean updateTick();\n\n\t//Using time\n\t//long getWaittime();\n\t//long getEndtime();\n\n\n}", "@Override\n public void execute(final Task<T> task) {\n }", "public Task(String description) {\n this.description = description;\n this.isDone = false;\n }", "public Task(String description) {\n this.description = description;\n this.isDone = false;\n }", "@Override\n public void run() {\n task.run();\n }", "public interface SingletonTask extends Task {\n}", "public Task getTask(){\n return punchTask;\n }", "public interface JsonTask extends Task {\n}", "public String getTask(){\n\treturn task;\n}", "@Override\n\t\t\tpublic void beginTask(String name, int totalWork) {\n\t\t\t\t\n\t\t\t}", "public Task(String description) {\n this.description = description;\n this.isDone = false;\n this.taskType = \"\";\n }", "public ITask getTask() {\n \t\treturn task;\n \t}", "public interface Task {\n\n /**\n * Getter for the conversaitonal object concerned with this task.\n * @return the conversational object owning this task\n */\n ConversationalObject getTaskOwner();\n\n /**\n * Stter for the conversaitonal object concerned with this task.\n * @param taskOwner the task owner to set.\n */\n void setTaskOwner(ConversationalObject taskOwner);\n\n /**\n * Getter for the status of this task\n * @return the current status of this task\n */\n TaskStatus getStatus();\n\n /**\n * Setter for the status of this task\n * @param status\n */\n void setStatus(TaskStatus status);\n\n /**\n * Getter for the stage of this task. It is strongly recomended that concrete\n * task classes declare static final string variables to refer to there\n * possible stages.\n * @return The current stage of this task\n */\n String getStage();\n\n /**\n * Getter for the result of this task.\n * @return the result of this task, or {@code null} if the task is not\n * finished.\n */\n TaskResult getResult();\n\n /**\n * Getter for the set of tasks that depend from this task\n * @return The set of dependent tasks (can be null)\n */\n Set<Task> getDependentTasks();\n\n /**\n * Setter for the set of tasks that depend from this task\n * @param dependentTasks the set of dependent tasks to set\n */\n void setDependentTasks(Set<Task> dependentTasks);\n\n /**\n * Getter for the aggregated task this task has generated and is dependent on.\n * @return The aggregated task, if any (can be null)\n */\n Task getAggregatedTask();\n\n /**\n * Setter for the aggregated task this task has generated and is dependent on.\n * @param aggregatedTask the aggregated task to set\n */\n void setAggregatedTask(Task aggregatedTask);\n\n // TODO Other references could be added to extend the tasks model: e.g.\n // (1) subtasks: list of tasks composing this task, i.e. that should be\n // executed\n // in sequence in order to complete this task, and\n // (2) supertask: reversely, task this task is a subtask of.\n\n /**\n * Getter for the set of conversations this task generated and is now\n * dependent on.\n * @return the set of generated conversations\n */\n Set<OnGoingConversation> getGeneratedConversations();\n\n /**\n * Setter for generatedConversations.\n * @param generatedConversations the set of generatedConversations to set\n */\n void setGeneratedConversations(\n Set<OnGoingConversation> generatedConversations);\n\n /**\n * Cuts all references to other objects so that the garbage collector can\n * destroy them after having destroyed this task, if they are not referenced\n * by other objects than this task. Should be executed before removing the\n * last reference to this task (usually before removing this task from the set\n * of tasks of a conversational object)\n */\n void clean();\n\n /**\n * Executes the task. Specific to each concrete task class.\n */\n void execute();\n}", "public interface Task<T> extends Callable<T> {\n\n String getTaskName();\n void onComplete(T result);\n\n}", "@Override\n public Class<? extends Task> taskClass() {\n return AmpoolSourceTask.class;\n }", "public ServiceTask() {\n\t}", "public interface TaskBase {\n public void executeTask();\n\n}", "@Override\n\t\tpublic void run() {\n\t\t\ttask();\n\t\t}", "protected abstract void createTasks();", "public interface Task<T> {\r\n /**\r\n * run the task.\r\n *\r\n * @return T a generic type.\r\n */\r\n T run();\r\n}", "protected void setupTask(Task task) {\n }", "public Task(String description) {\n this.description = description;\n this.isDone = false;\n this.tag = \"\";\n }", "public Task(String description) {\n this.description = description;\n this.isDone = false;\n this.logo = \"N\";\n }", "protected TaskChain() {\n\t}", "public TaskList(){}", "public Task(String name) {\r\n this(name, false);\r\n }", "public AddCommand(Task task){\r\n this.task = task;\r\n }", "public String getTask() {\n return task;\n }", "public String getTask() {\n return task;\n }", "public Task(String name, int number) {\r\n this.name = name;\r\n this.id = number;\r\n this.timer = new Timer();\r\n }", "public Task(String description) {\n\n this.description = description;\n this.isDone = false;\n taskCounter++;\n }", "public void setTask(Task task) {\n this.task = task;\n }", "public void updateTask() {}", "@Override\r\n\tpublic void subTask(String name) {\n\t}", "int createParentTask();", "public interface Executor {\n void setTask(Task task);\n Task getTask();\n void startTask();\n}", "public void beginTask(String tr) {\n\t\t\n\t}", "@Override\n public String getTaskType() {\n return \"T\";\n }", "public Task(String taskDescription) {\n this.taskDescription = taskDescription;\n this.isDone = false;\n this.completed = \"0\";\n }", "public TaskReturnType Run();", "public abstract void task() throws InterruptedException;", "Task(String n, int s, int c, boolean f,\n\t\t String m, int w)\n\t\t{\n\t\t\tmaster = m;\n\t\t\tweight = w;\n\n\t\t\tname = n;\n\t\t\ts_reqt = s;\n\t\t\tcmb_rec = c;\n\t\t\tfblock = f;\n\t\t}", "@Override\n public void run() {\n runTask();\n\n }", "String addTask(Task task);", "public interface TaskManager {\n\t/**\n\t * @return all the tasks that have to be executed\n\t */\n\tvoid getTasks();\n}", "private static void executeTask02() {\n }", "public interface TaskCallback extends RunningTaskCallback {\r\n\r\n\r\n /**\r\n * Calling when the task is preparing to start .\r\n */\r\n void onTaskStart();\r\n\r\n @Override\r\n void onTaskRunning(PreTaskResult preTaskResult, int numerator, int denominator);\r\n\r\n /**\r\n * Calling while the task is completed.\r\n *\r\n * @param taskResult TaskResult bean\r\n */\r\n void onTaskCompleted(TaskResult taskResult);\r\n}", "public interface AsyncTask {\n\n\n /**\n * 这里判断任务是否需要停止,如是否超时\n */\n Boolean needStop();\n\n /**\n * 任务id\n */\n Long getTaskId();\n\n /**\n * 任务类型\n * @see com.pousheng.middle.task.enums.TaskTypeEnum\n */\n String getTaskType();\n\n ThreadPoolExecutor getTaskExecutor();\n\n Response<Long> init();\n\n void preStart();\n\n void start();\n\n void onStop();\n\n void onError(Exception e);\n\n void manualStop();\n\n AsyncTask getTask(TaskDTO task);\n}", "public interface TaskAction {\n\n /**\n * This method will define an asynchronous action to take.\n * The parameter is a simpler interface of Task that only allows progress reporting, to encapsulate actions and\n * prevent them from seeing or modifying the task hierarchy that triggers and manages them.\n */\n public void action (ProgressListener progressListener) throws Exception;\n\n}", "public HomographyTask(){\n\n }", "public Task(String msg) {\n this.msg = msg;\n completed = false;\n }", "TaskFactory getTaskFactory();", "public Task(String task, boolean isDone) {\n this.task = task;\n this.isDone = isDone;\n }", "public Task(String description) {\n this.description = description.trim();\n this.isDone = false;\n }", "public Task(String taskDescription) {\n this.taskDescription = taskDescription;\n this.isDone = false;\n }", "public Task makeTask() {\n Task new_task = new Task();\n new_task.setAction(this);\n new_task.setDeadline(\n new Date(System.currentTimeMillis() + deadlineSeconds() * 1000L));\n\n return new_task;\n }", "@Override\n\t\tpublic void beginTask(String arg0, int arg1) {\n\n\t\t}", "@Override\n\t\tpublic void subTask(String arg0) {\n\n\t\t}", "void addTask(Task task);", "@Override\n\tpublic void task() {\n\t\tst.subTask();\n System.out.println(\"This is UI Task\");\n\t}", "public Todo(String task) {\n super(task);\n }", "public String getType() {\n return \"Task\";\n }", "public interface Task<T> {\n T execute();\n}", "public abstract String getTaskName();", "public interface Task {\n public void run(Object o);\n}", "LogoTask()\n {\n //create instance of LogoTask()\n }" ]
[ "0.82330376", "0.80494094", "0.78120977", "0.78106815", "0.7753145", "0.7701986", "0.76280504", "0.75008243", "0.74462205", "0.74462205", "0.74462205", "0.7424874", "0.73489904", "0.7248551", "0.7248551", "0.7247897", "0.7243319", "0.72044754", "0.71658987", "0.71182656", "0.71116364", "0.708988", "0.7081473", "0.70617217", "0.7049572", "0.7035645", "0.70171815", "0.7017151", "0.70017856", "0.6985006", "0.6981733", "0.6980255", "0.69635564", "0.6918352", "0.6913722", "0.6906076", "0.6903925", "0.6898388", "0.6898388", "0.68907577", "0.6889622", "0.68885493", "0.68838614", "0.6860152", "0.68397695", "0.68228084", "0.68212223", "0.6818059", "0.6810038", "0.6804668", "0.6795757", "0.67571235", "0.6747439", "0.6746278", "0.6745183", "0.6739265", "0.67312634", "0.6726538", "0.6716929", "0.6712013", "0.6709705", "0.6707873", "0.67061335", "0.67061335", "0.6702652", "0.6699699", "0.6697118", "0.6677862", "0.6670505", "0.6660463", "0.66438186", "0.6642116", "0.6637349", "0.6626376", "0.6623126", "0.6616853", "0.66091514", "0.6608858", "0.6601387", "0.6592708", "0.65922254", "0.65841764", "0.6577178", "0.6570842", "0.65603733", "0.6556261", "0.65519655", "0.6549204", "0.6541897", "0.6541804", "0.65386784", "0.6532214", "0.6530059", "0.65295076", "0.65275836", "0.6523969", "0.65186447", "0.6508698", "0.6507227", "0.6491207", "0.6485105" ]
0.0
-1
///createFromRNASequence test cases//// /TEST 1 INPUT: "CCGUUGGCACUGUUG" EXPECTED OUTPUT = P,L,A ACTUAL OUTPUT = P,L,A With a string that has repeated codons, this also checks that the addCodon method and increaseCount method work properly.
@Test public void rnatest1(){ AminoAcidLL first = AminoAcidLL.createFromRNASequence(a); char[] firstArr = new char[3]; char[] answer = {'P','L','A'}; for(int i = 0; i < firstArr.length; i++){ firstArr[i] = first.aminoAcid; System.out.println(first.aminoAcid); first = first.next; } assertArrayEquals(answer, firstArr); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\r\n\t\t P187RepeatedDNASequences p = new P187RepeatedDNASequences();\r\n\t\t List<String> r = p.findRepeatedDnaSequences(\"AAAAACCCCCAAAAACCCCCCAAAAAGGGTTT\"); //\r\n\t\t for(String t : r) {\r\n\t\t\t System.out.println(t);\t\t\t \r\n\t\t }\r\n\t }", "public List<String> findRepeatedDnaSequences(String s){\n HashMap<Character,Integer> map=new HashMap<>();\n Set<Integer> firstSet=new HashSet<>();\n Set<Integer> dupSet=new HashSet<>();\n List<String> res=new ArrayList<>();\n map.put('A',0);\n map.put('C',1);\n map.put('G',2);\n map.put('T',3);\n char[] chars=s.toCharArray();\n for(int i=0;i<chars.length-9;i++){\n int v=0;\n for(int j=i;j<i+10;j++){\n v<<=2;\n v|=map.get(chars[j]);\n }\n if(!firstSet.add(v)&&dupSet.add(v)){\n res.add(s.substring(i,i+10));\n }\n }\n return res;\n }", "@Test\n public void subSequencesTest2() {\n String text = \"hashco\"\n + \"llisio\"\n + \"nsarep\"\n + \"ractic\"\n + \"allyun\"\n + \"avoida\"\n + \"blewhe\"\n + \"nhashi\"\n + \"ngaran\"\n + \"domsub\"\n + \"setofa\"\n + \"larges\"\n + \"etofpo\"\n + \"ssible\"\n + \"keys\";\n\n String[] expected = new String[6];\n expected[0] = \"hlnraabnndslesk\";\n expected[1] = \"alsalvlhgoeatse\";\n expected[2] = \"siacloeaamtroiy\";\n expected[3] = \"hsrtyiwsrsogfbs\";\n expected[4] = \"cieiudhhaufepl\";\n expected[5] = \"oopcnaeinbasoe\";\n String[] owns = this.ic.subSequences(text, 6);\n for (int i = 0; i < expected.length; i++) {\n assertEquals(expected[i], owns[i]);\n }\n }", "public abstract void createLongestRepeatedSubstring();", "@Test\n public void aminoCountsTest2(){\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(b);\n int[] expected = {2,1,1,1};\n assertArrayEquals(expected, first.aminoAcidCounts());\n }", "@Test\n public void rnatest2(){\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(b);\n char[] firstArr = new char[4];\n char[] answer = {'T','S', 'V', 'F'};\n for(int i = 0; i < firstArr.length; i++){\n firstArr[i] = first.aminoAcid;\n System.out.println(first.aminoAcid);\n first = first.next;\n }\n assertArrayEquals(answer,firstArr);\n }", "@Test\n public void aminoListTest2(){\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(d);\n char[] expected = {'C','F','K','N','T'};\n assertArrayEquals(expected, first.aminoAcidList());\n }", "public List<String> findRepeatedDnaSequences(String s) {\n if(s.length() < 10) return new ArrayList<String>();\n \n int[] map = new int[256];\n map['A'] = 0;\n map['T'] = 1;\n map['C'] = 2;\n map['G'] = 3;\n \n List<String> result = new ArrayList<String>();\n \n //this set contains string that occurs before\n Set<Integer> visited = new HashSet<Integer>();\n //this set contains string that we have inserted into result\n Set<Integer> inResult = new HashSet<Integer>();\n \n int key = 0;\n \n //Since we only partially modify the key, we need to firstly initialize it\n for(int i = 0; i < 9; i++){\n key <<= 2;\n key |= map[s.charAt(i)];\n }\n \n for(int i = 9; i < s.length(); i++){\n key <<= 2;\n key |= map[s.charAt(i)];\n //our valid key has 20 digits, we use 0xFFFFF to remove digits that beyong this range\n key &= 0xFFFFF;\n \n String temp = s.substring(i - 9, i+1);\n \n //if this is not the first time we visit this substring\n if(!visited.add(key)){\n //if this is the first time we add this substring into result\n if(inResult.add(key)){\n result.add(temp);\n }\n }\n }\n \n return result;\n }", "@Test\n public void subSequencesTest3() {\n String text = \"wnylazlzeqntfpwtsmabjqinaweaocfewgpsrmyluadlybfgaltgljrlzaaxvjehhygggdsrygvnjmpyklvyilykdrphepbfgdspjtaap\"\n + \"sxrpayholutqfxstptffbcrkxvvjhorawfwaejxlgafilmzrywpfxjgaltdhjvjgtyguretajegpyirpxfpagodmzrhstrxjrpirlbfgkhhce\"\n + \"wgpsrvtuvlvepmwkpaeqlstaqolmsvjwnegmzafoslaaohalvwfkttfxdrphepqobqzdqnytagtrhspnmprtfnhmsrmznplrcijrosnrlwgds\"\n + \"bylapqgemyxeaeucgulwbajrkvowsrhxvngtahmaphhcyjrmielvqbbqinawepsxrewgpsrqtfqpveltkfkqiymwtqssqxvchoilmwkpzermw\"\n + \"eokiraluaammkwkownrawpedhcklrthtftfnjmtfbftazsclmtcssrlluwhxahjeagpmgvfpceggluadlybfgaltznlgdwsglfbpqepmsvjha\"\n + \"lwsnnsajlgiafyahezkbilxfthwsflgkiwgfmtrawtfxjbbhhcfsyocirbkhjziixdlpcbcthywwnrxpgvcropzvyvapxdrogcmfebjhhsllu\"\n + \"aqrwilnjolwllzwmncxvgkhrwlwiafajvgzxwnymabjgodfsclwneltrpkecguvlvepmwkponbidnebtcqlyahtckk\";\n\n String[] expected = new String[6];\n expected[0] = \"wlfaafrdarvgypipgaputcjflmftgepfmrrhpvwllnfofdqqtmhnjlyeewvxhceqpgftysopelkrhhjtmlapcagllpasazflfthohdtrrvobliwnhazafeevpnlk\";\n expected[1] = \"nzpbwemllljggylhdaatprhwgzxdttypzxlhslksmeohkronrpmprwlmubovmylispqkmqizouwactmatlhmedagfmlafktgmfhcjlhxoagjullcrfxbslceoeyk\";\n expected[2] = \"yewjewyytzegvkyespyqtkoaarjhyaiarjbcrvptsgsatpbyhrslogaycawnajvnxspfwxlekakwkftzcujgglldbswjybhktxcizpypppchanlxwawjctgpnba\";\n expected[3] = \"lqtqaglbgahdnlkppshffxrefygjgjrghrfeveaavmllthqtstrrsdpxgjsgprqarrvktvmriaopltfsswevgytwpvslaiwirjfricwgzxmhqjzvljnglrumbth\";\n expected[4] = \"ansiopuflahsjvdbjxoxfvajiwavuepospgwtpeqjzavfezapfmcnsqeurrthmbweqeqqcwmrmwerfbcshaflbzsqjnghlswabsbibwvvdfsrowgwvyowpvwict\";\n expected[5] = \"ztmncsagjxyrmyrftrlsbvwxlpljrgxdtikgumqowaawxpdgnnzirbgalkhahibewtlishkwamndtnflrxgpufngehniexfgwbykxcncyrelwlmkigmdnklkdqc\";\n int keyLen = 6;\n String[] owns = this.ic.subSequences(text, keyLen);\n for (int i = 0; i < expected.length; i++) {\n assertEquals(expected[i], owns[i]);\n }\n }", "@Test\n public void aminoCountsTest1(){\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(a);\n int[] expected = {1,3,1};\n assertArrayEquals(expected, first.aminoAcidCounts());\n }", "public static void main (String args []) {\n\r\n String str = \"\\\"क\\\", \\\"का\\\", \\\"कि\\\", \\\"की\\\", \\\"कु\\\", \\\"कू\\\", \\\"के\\\", \\\"कै\\\", \\\"को\\\", \\\"कौ\\\", \\\"कं\\\", \\\"क:\\\"\" ;\r\n String strEng = \"\\\"ka\\\", \\\"kā\\\", \\\"ki\\\", \\\"kī\\\", \\\"ku\\\", \\\"kū\\\", \\\"kē\\\", \\\"kai\\\", \\\"ko\\\", \\\"kau\\\", \\\"kṁ\\\", \\\"ka:\\\"\" ;\r\n\r\n String additionalConsonants = \"\\\"क़\\\", \\\"क़ा\\\", \\\"क़ि\\\", \\\"क़ी\\\", \\\"क़ु\\\", \\\"क़ू\\\", \\\"क़े\\\", \\\"क़ै\\\", \\\"क़ो\\\", \\\"क़ौ\\\", \\\"क़ं\\\", \\\"क़:\\\"\"; \r\n String additionalConsonantsEng = \"\\\"qa\\\", \\\"qā\\\", \\\"qi\\\", \\\"qī\\\", \\\"qu\\\", \\\"qū\\\", \\\"qē\\\", \\\"qai\\\", \\\"qo\\\", \\\"qau\\\", \\\"qṁ\\\", \\\"qa:\\\"\" ;\r\n\r\n //String str = \"क, का, कि, की, कु, कू, के, कै, को, कौ, कं, क:\" ;\r\n \r\n \r\n \r\n //generateNP(str);\r\n //generateEN(strEng);\r\n //System.out.println();\r\n generateNPAdditionalConsonants(additionalConsonants);\r\n generateENAdditionalConsonants(additionalConsonantsEng);\r\n\r\n\r\n\r\n }", "static void codonfreq(String s) {\n int[] fromNuc = new int[128];\r\n for (int i = 0; i < fromNuc.length; i++)\r\n fromNuc[i] = -1;\r\n fromNuc['a'] = fromNuc['A'] = 0;\r\n fromNuc['c'] = fromNuc['C'] = 1;\r\n fromNuc['g'] = fromNuc['G'] = 2;\r\n fromNuc['t'] = fromNuc['T'] = 3;\r\n // Count frequencies of codons (triples of nucleotides)\r\n int[][][] freq = new int[4][4][4];\r\n for (int i = 0; i + 2 < s.length(); i += 3) {\r\n int nuc1 = fromNuc[s.charAt(i)];\r\n int nuc2 = fromNuc[s.charAt(i + 1)];\r\n int nuc3 = fromNuc[s.charAt(i + 2)];\r\n freq[nuc1][nuc2][nuc3] += 1;\r\n }\r\n // The translation from index 0123 to nucleotide ACGT\r\n final char[] toNuc = {'A', 'C', 'G', 'T'};\r\n for (int i = 0; i < 4; i++)\r\n for (int j = 0; j < 4; j++) {\r\n for (int k = 0; k < 4; k++)\r\n System.out.print(\" \" + toNuc[i] + toNuc[j] + toNuc[k]\r\n + \": \" + freq[i][j][k]);\r\n System.out.println();\r\n }\r\n }", "@Test\n public void subSequencesTest1() {\n String text = \"crypt\"\n + \"ograp\"\n + \"hyand\"\n + \"crypt\"\n + \"analy\"\n + \"sis\";\n\n String[] expected = new String[5];\n expected[0] = \"cohcas\";\n expected[1] = \"rgyrni\";\n expected[2] = \"yrayas\";\n expected[3] = \"panpl\";\n expected[4] = \"tpdty\";\n String[] owns = this.ic.subSequences(text, 5);\n for (int i = 0; i < expected.length; i++) {\n assertEquals(expected[i], owns[i]);\n }\n }", "public List<String> findRepeatedDnaSequences(String s) {\n if (s == null) return null;\n HashSet<String> result = new HashSet<String>();\n HashSet<Integer> set = new HashSet<Integer>();\n for (int i = 0; i < s.length() - 9; ++i) {\n String seq = s.substring(i, i + 10);\n int code = encode(seq);\n if (!set.contains(code)) {\n set.add(code);\n } else {\n result.add(seq);\n }\n }\n return new ArrayList<String>(result);\n }", "@Test\n public void aminoListTest1(){\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(a);\n char[] expected = {'P','L','A'};\n assertArrayEquals(expected, first.aminoAcidList());\n }", "public int[] contarCodons(String seq){\n int [] countCodons=new int[65];\n for (int i=0;i<seq.length()-2;i=i+3){\n String c=seq.substring(i, i+3);\n int j=0;\n while (j<nameCodon.length && nameCodon[j].compareTo(c)!=0) j++;\n if (j<nameCodon.length)\n countCodons[j]++;\n else\n countCodons[64]++;\n }\n return countCodons;\n\n }", "public String processSeq (String seq)\n {\n\n\n unknownStatus = 0; // reinitialize this to 0\n\n // take out any spaces and numbers\n StringBuffer tempSeq = new StringBuffer(\"\");;\n for (int i = 0; i < seq.length(); i++)\n {\n if (Character.isLetter(seq.charAt(i)))\n tempSeq.append(seq.charAt(i));\n else\n continue;\n }\n seq = tempSeq.toString();\n\n if (seq.length() > 0)\n {\n\n // the three 5'3' reading frame translations\n\n String fiveThreeFrame1 = match (seq);\n String fiveThreeFrame2 = match (seq.substring(1, seq.length()));\n String fiveThreeFrame3 = match (seq.substring(2, seq.length()));\n\n \n\n // reverse and complement the string seq and rename rev\n\n String rev = \"\";\n for (int i = 0; i < seq.length(); i++)\n {\n // the unambiguous nucleotides\n if (seq.charAt(i) == 'A')\n rev = \"U\" + rev;\n else if ((seq.charAt(i) == 'U') || (seq.charAt(i) == 'T'))\n rev = \"A\" + rev;\n else if (seq.charAt(i) == 'C')\n rev = \"G\" + rev;\n else if (seq.charAt(i) == 'G')\n rev = \"C\" + rev;\n else // any other non-nucleotides\n rev = String.valueOf (seq.charAt(i)) + rev;\n }\n\n\n // the three 3'5' reading frame translations\n\n String threeFiveFrame1 = match (rev); \n String threeFiveFrame2 = match (rev.substring(1, rev.length()));\n String threeFiveFrame3 = match (rev.substring(2, rev.length()));\n\n return (\"5'3' Frame1: \" + \"<BR>\" + fiveThreeFrame1 + \n \"<BR><BR>5'3' Frame2: \" + \"<BR>\" + fiveThreeFrame2 +\n \"<BR><BR>5'3' Frame3: \" + \"<BR>\" + fiveThreeFrame3 +\n \"<BR><BR>3'5' Frame1: \" + \"<BR>\" + threeFiveFrame1 +\n \"<BR><BR>3'5' Frame2: \" + \"<BR>\" + threeFiveFrame2 +\n \"<BR><BR>3'5' Frame3: \" + \"<BR>\" + threeFiveFrame3 + \"<BR>\");\n }\n\n return \"\";\n }", "public static List<String> findRepeatedDnaSequences(String s) {\n \tList<String> re=new ArrayList<String>();\n \tif(s.length()<=10){\n \t\treturn re;\n \t}\n \tMap<String, Integer> map=new HashMap<String, Integer>(); \t\n \tfor(int i=10; i<=s.length(); i++){\n \t\tString k=s.substring(i-10, i);\n \t\tif(map.containsKey(k)){\n \t\t\tint val=map.get(k);\n \t\t\tif(val==1){\n \t\t\t\tre.add(k);\n \t\t\t}\n \t\t\tmap.put(k, val+1);\n \t\t}else{\n \t\t\tmap.put(k, 1);\n \t\t}\n \t}\n \treturn re;\n }", "public static void main(String[] args) {\n\t\tString s = \"AAAAAAAAAAA\";\n\t\tSystem.out.println(s.substring(0, 10));\n\t\tRepeatedDNAsequences hp = new RepeatedDNAsequences();\n\t\tSystem.out.println(hp.findRepeatedDnaSequences(s));\n\t}", "public static List<String> findRepeatedDnaSequences(String s) {\n if (s == null || s.length() < 10){\n return new ArrayList<String>();\n }\n Map<String,Integer> map = new HashMap<String,Integer>();\n List<String> res = new ArrayList<String>();\n for (int i = 0; i < s.length()-10; i++) {\n String tmp = s.substring(i,i+10);\n map.put(tmp,map.getOrDefault(tmp,0)+1);\n if (map.get(tmp)>1){\n res.add(tmp);\n }\n }\n return res;\n }", "ArrayList<Character> nextCountAndSay(ArrayList<Character> sequence) {\n \tArrayList<Character> next = new ArrayList<Character>();\n \tint count = 0;\n \tCharacter c = sequence.get(0);\n \tfor(int i = 0; i < sequence.size(); i++) \n \t//@loop_invariant count represents the length of the longest \n \t// consecutive sequence s in sequence[0, i), all Characters in s\n \t// equal to c and s contains the last element of sequence[0, i) if \n \t// exists\n \t{\n \t\tif(count == 0) {\n \t\t\tcount = 1;\n \t\t\tc = sequence.get(i);\n \t\t}\n \t\telse {\n \t\t\tif(c == sequence.get(i)) {\n \t\t\t\tcount++;\n \t\t\t}\n \t\t\telse {\n \t\t\t\tthis.addCount(next, count);\n \t\t\t\tthis.addSay(next, c);\n \t\t\t\tcount = 1;\n \t\t\t\tc = sequence.get(i);\n \t\t\t}\n \t\t} \t\t\n \t}\n \tthis.addCount(next, count);\n \tthis.addSay(next, c);\n \treturn next;\n }", "@Deprecated\n@ProwideDeprecated(phase4 = TargetYear.SRU2021)\npublic interface SequenceName {\n String A = \"A\";\n String A1 = \"A1\";\n String A1a = \"A1a\";\n String A1b = \"A1b\";\n String A1c = \"A1c\";\n String A1d = \"A1d\";\n String A1e = \"A1e\";\n String A2 = \"A2\";\n String A2a = \"A2a\";\n String A2b = \"A2b\";\n String A2c = \"A2c\";\n String A2d = \"A2d\";\n String A2e = \"A2e\";\n String A3 = \"A3\";\n String A3a = \"A3a\";\n String A3b = \"A3b\";\n String A3c = \"A3c\";\n String A3d = \"A3d\";\n String A3e = \"A3e\";\n String A4 = \"A4\";\n String A4a = \"A4a\";\n String A4b = \"A4b\";\n String A4c = \"A4c\";\n String A4d = \"A4d\";\n String A4e = \"A4e\";\n String A5 = \"A5\";\n String A5a = \"A5a\";\n String A5b = \"A5b\";\n String A5c = \"A5c\";\n String A5d = \"A5d\";\n String A5e = \"A5e\";\n String B = \"B\";\n String B1 = \"B1\";\n String B1a = \"B1a\";\n String B1b = \"B1b\";\n String B1c = \"B1c\";\n String B1d = \"B1d\";\n String B1e = \"B1e\";\n String B2 = \"B2\";\n String B2a = \"B2a\";\n String B2b = \"B2b\";\n String B2c = \"B2c\";\n String B2d = \"B2d\";\n String B2e = \"B2e\";\n String B3 = \"B3\";\n String B3a = \"B3a\";\n String B3b = \"B3b\";\n String B3c = \"B3c\";\n String B3d = \"B3d\";\n String B3e = \"B3e\";\n String B4 = \"B4\";\n String B4a = \"B4a\";\n String B4b = \"B4b\";\n String B4c = \"B4c\";\n String B4d = \"B4d\";\n String B4e = \"B4e\";\n String B5 = \"B5\";\n String B5a = \"B5a\";\n String B5b = \"B5b\";\n String B5c = \"B5c\";\n String B5d = \"B5d\";\n String B5e = \"B5e\";\n String C = \"C\";\n String C1 = \"C1\";\n String C1a = \"C1a\";\n String C1b = \"C1b\";\n String C1c = \"C1c\";\n String C1d = \"C1d\";\n String C1e = \"C1e\";\n String C2 = \"C2\";\n String C2a = \"C2a\";\n String C2b = \"C2b\";\n String C2c = \"C2c\";\n String C2d = \"C2d\";\n String C2e = \"C2e\";\n String C3 = \"C3\";\n String C3a = \"C3a\";\n String C3b = \"C3b\";\n String C3c = \"C3c\";\n String C3d = \"C3d\";\n String C3e = \"C3e\";\n String C4 = \"C4\";\n String C4a = \"C4a\";\n String C4b = \"C4b\";\n String C4c = \"C4c\";\n String C4d = \"C4d\";\n String C4e = \"C4e\";\n String C5 = \"C5\";\n String C5a = \"C5a\";\n String C5b = \"C5b\";\n String C5c = \"C5c\";\n String C5d = \"C5d\";\n String C5e = \"C5e\";\n String D = \"D\";\n String D1 = \"D1\";\n String D1a = \"D1a\";\n String D1b = \"D1b\";\n String D1c = \"D1c\";\n String D1d = \"D1d\";\n String D1e = \"D1e\";\n String D2 = \"D2\";\n String D2a = \"D2a\";\n String D2b = \"D2b\";\n String D2c = \"D2c\";\n String D2d = \"D2d\";\n String D2e = \"D2e\";\n String D3 = \"D3\";\n String D3a = \"D3a\";\n String D3b = \"D3b\";\n String D3c = \"D3c\";\n String D3d = \"D3d\";\n String D3e = \"D3e\";\n String D4 = \"D4\";\n String D4a = \"D4a\";\n String D4b = \"D4b\";\n String D4c = \"D4c\";\n String D4d = \"D4d\";\n String D4e = \"D4e\";\n String D5 = \"D5\";\n String D5a = \"D5a\";\n String D5b = \"D5b\";\n String D5c = \"D5c\";\n String D5d = \"D5d\";\n String D5e = \"D5e\";\n String E = \"E\";\n String E1 = \"E1\";\n String E2 = \"E2\";\n String E2a = \"E2a\";\n String E2b = \"E2b\";\n String E2c = \"E2c\";\n String E2d = \"E2d\";\n String E2e = \"E2e\";\n String E3 = \"E3\";\n String E3a = \"E3a\";\n String E3b = \"E3b\";\n String E3c = \"E3c\";\n String E3d = \"E3d\";\n String E3e = \"E3e\";\n String E4 = \"E4\";\n String E4a = \"E4a\";\n String E4b = \"E4b\";\n String E4c = \"E4c\";\n String E4d = \"E4d\";\n String E4e = \"E4e\";\n String E5 = \"E5\";\n String E5a = \"E5a\";\n String E5b = \"E5b\";\n String E5c = \"E5c\";\n String E5d = \"E5d\";\n String E5e = \"E5e\";\n\n String F = \"F\";\n String F1 = \"F1\";\n String F2 = \"F2\";\n String F3 = \"F3\";\n String F3a = \"F3a\";\n String F3b = \"F3b\";\n String F3c = \"F3c\";\n String F3d = \"F3d\";\n String F3e = \"F3e\";\n String F4 = \"F4\";\n String F4a = \"F4a\";\n String F4b = \"F4b\";\n String F4c = \"F4c\";\n String F4d = \"F4d\";\n String F4e = \"F4e\";\n String F5 = \"F5\";\n String F5a = \"F5a\";\n String F5b = \"F5b\";\n String F5c = \"F5c\";\n String F5d = \"F5d\";\n String F5e = \"F5e\";\n String G = \"G\";\n String G1 = \"G1\";\n String G1a = \"G1a\";\n String G1b = \"G1b\";\n String G1c = \"G1c\";\n String G1d = \"G1d\";\n String G1e = \"G1e\";\n String G2 = \"G2\";\n String G3 = \"G3\";\n String G4 = \"G4\";\n String G4a = \"G4a\";\n String G4b = \"G4b\";\n String G4c = \"G4c\";\n String G4d = \"G4d\";\n String G4e = \"G4e\";\n String G5 = \"G5\";\n String G5a = \"G5a\";\n String G5b = \"G5b\";\n String G5c = \"G5c\";\n String G5d = \"G5d\";\n String G5e = \"G5e\";\n String H = \"H\";\n String H1 = \"H1\";\n String H1a = \"H1a\";\n String H1b = \"H1b\";\n String H1c = \"H1c\";\n String H1d = \"H1d\";\n String H1e = \"H1e\";\n String H2 = \"H2\";\n String H2a = \"H2a\";\n String H2b = \"H2b\";\n String H2c = \"H2c\";\n String H2d = \"H2d\";\n String H2e = \"H2e\";\n String H3 = \"H3\";\n String H4 = \"H4\";\n String H5 = \"H5\";\n String H5a = \"H5a\";\n String H5b = \"H5b\";\n String H5c = \"H5c\";\n String H5d = \"H5d\";\n String H5e = \"H5e\";\n String I = \"I\";\n String I1 = \"I1\";\n String I1a = \"I1a\";\n String I1b = \"I1b\";\n String I1c = \"I1c\";\n String I1d = \"I1d\";\n String I1e = \"I1e\";\n String I2 = \"I2\";\n String I2a = \"I2a\";\n String I2b = \"I2b\";\n String I2c = \"I2c\";\n String I2d = \"I2d\";\n String I2e = \"I2e\";\n String I3 = \"I3\";\n String I3a = \"I3a\";\n String I3b = \"I3b\";\n String I3c = \"I3c\";\n String I3d = \"I3d\";\n String I3e = \"I3e\";\n String I4 = \"I4\";\n String I5 = \"I5\";\n String J = \"J\";\n String J1 = \"J1\";\n String J1a = \"J1a\";\n String J1b = \"J1b\";\n String J1c = \"J1c\";\n String J1d = \"J1d\";\n String J1e = \"J1e\";\n String J2 = \"J2\";\n String J2a = \"J2a\";\n String J2b = \"J2b\";\n String J2c = \"J2c\";\n String J2d = \"J2d\";\n String J2e = \"J2e\";\n String J3 = \"J3\";\n String J3a = \"J3a\";\n String J3b = \"J3b\";\n String J3c = \"J3c\";\n String J3d = \"J3d\";\n String J3e = \"J3e\";\n String J4 = \"J4\";\n String J4a = \"J4a\";\n String J4b = \"J4b\";\n String J4c = \"J4c\";\n String J4d = \"J4d\";\n String J4e = \"J4e\";\n String J5 = \"J5\";\n String K = \"K\";\n String K1 = \"K1\";\n String K1a = \"K1a\";\n String K1b = \"K1b\";\n String K1c = \"K1c\";\n String K1d = \"K1d\";\n String K1e = \"K1e\";\n String K2 = \"K2\";\n String K2a = \"K2a\";\n String K2b = \"K2b\";\n String K2c = \"K2c\";\n String K2d = \"K2d\";\n String K2e = \"K2e\";\n String K3 = \"K3\";\n String K3a = \"K3a\";\n String K3b = \"K3b\";\n String K3c = \"K3c\";\n String K3d = \"K3d\";\n String K3e = \"K3e\";\n String K4 = \"K4\";\n String K4a = \"K4a\";\n String K4b = \"K4b\";\n String K4c = \"K4c\";\n String K4d = \"K4d\";\n String K4e = \"K4e\";\n String K5 = \"K5\";\n String K5a = \"K5a\";\n String K5b = \"K5b\";\n String K5c = \"K5c\";\n String K5d = \"K5d\";\n String K5e = \"K5e\";\n String L = \"L\";\n String L1 = \"L1\";\n String L2 = \"L2\";\n String L2a = \"L2a\";\n String L2b = \"L2b\";\n String L2c = \"L2c\";\n String L2d = \"L2d\";\n String L2e = \"L2e\";\n String L3 = \"L3\";\n String L3a = \"L3a\";\n String L3b = \"L3b\";\n String L3c = \"L3c\";\n String L3d = \"L3d\";\n String L3e = \"L3e\";\n String L4 = \"L4\";\n String L4a = \"L4a\";\n String L4b = \"L4b\";\n String L4c = \"L4c\";\n String L4d = \"L4d\";\n String L4e = \"L4e\";\n String L5 = \"L5\";\n String L5a = \"L5a\";\n String L5b = \"L5b\";\n String L5c = \"L5c\";\n String L5d = \"L5d\";\n String L5e = \"L5e\";\n\n String M1 = \"M1\";\n String M2 = \"M2\";\n String M3 = \"M3\";\n String M3a = \"M3a\";\n String M3b = \"M3b\";\n String M3c = \"M3c\";\n String M3d = \"M3d\";\n String M3e = \"M3e\";\n String M4 = \"M4\";\n String M4a = \"M4a\";\n String M4b = \"M4b\";\n String M4c = \"M4c\";\n String M4d = \"M4d\";\n String M4e = \"M4e\";\n String M5 = \"M5\";\n String M5a = \"M5a\";\n String M5b = \"M5b\";\n String M5c = \"M5c\";\n String M5d = \"M5d\";\n String M5e = \"M5e\";\n\n String N1 = \"N1\";\n String N1a = \"N1a\";\n String N1b = \"N1b\";\n String N1c = \"N1c\";\n String N1d = \"N1d\";\n String N1e = \"N1e\";\n String N2 = \"N2\";\n String N3 = \"N3\";\n String N4 = \"N4\";\n String N4a = \"N4a\";\n String N4b = \"N4b\";\n String N4c = \"N4c\";\n String N4d = \"N4d\";\n String N4e = \"N4e\";\n String N5 = \"N5\";\n String N5a = \"N5a\";\n String N5b = \"N5b\";\n String N5c = \"N5c\";\n String N5d = \"N5d\";\n String N5e = \"N5e\";\n String O = \"O\";\n\n String O1 = \"O1\";\n String O1a = \"O1a\";\n String O1b = \"O1b\";\n String O1c = \"O1c\";\n String O1d = \"O1d\";\n String O1e = \"O1e\";\n String O2 = \"O2\";\n String O2a = \"O2a\";\n String O2b = \"O2b\";\n String O2c = \"O2c\";\n String O2d = \"O2d\";\n String O2e = \"O2e\";\n String O3 = \"O3\";\n String O4 = \"O4\";\n String O5 = \"O5\";\n String O5a = \"O5a\";\n String O5b = \"O5b\";\n String O5c = \"O5c\";\n String O5d = \"O5d\";\n String O5e = \"O5e\";\n String P = \"P\";\n\n String P1 = \"P1\";\n String P1a = \"P1a\";\n String P1b = \"P1b\";\n String P1c = \"P1c\";\n String P1d = \"P1d\";\n String P1e = \"P1e\";\n String P2 = \"P2\";\n String P2a = \"P2a\";\n String P2b = \"P2b\";\n String P2c = \"P2c\";\n String P2d = \"P2d\";\n String P2e = \"P2e\";\n String P3 = \"P3\";\n String P3a = \"P3a\";\n String P3b = \"P3b\";\n String P3c = \"P3c\";\n String P3d = \"P3d\";\n String P3e = \"P3e\";\n String P4 = \"P4\";\n String P5 = \"P5\";\n\n String Q1 = \"Q1\";\n String Q1a = \"Q1a\";\n String Q1b = \"Q1b\";\n String Q1c = \"Q1c\";\n String Q1d = \"Q1d\";\n String Q1e = \"Q1e\";\n String Q2 = \"Q2\";\n String Q2a = \"Q2a\";\n String Q2b = \"Q2b\";\n String Q2c = \"Q2c\";\n String Q2d = \"Q2d\";\n String Q2e = \"Q2e\";\n String Q3 = \"Q3\";\n String Q3a = \"Q3a\";\n String Q3b = \"Q3b\";\n String Q3c = \"Q3c\";\n String Q3d = \"Q3d\";\n String Q3e = \"Q3e\";\n String Q4 = \"Q4\";\n String Q4a = \"Q4a\";\n String Q4b = \"Q4b\";\n String Q4c = \"Q4c\";\n String Q4d = \"Q4d\";\n String Q4e = \"Q4e\";\n String Q5 = \"Q5\";\n String R = \"R\";\n String R1 = \"R1\";\n String R1a = \"R1a\";\n String R1b = \"R1b\";\n String R1c = \"R1c\";\n String R1d = \"R1d\";\n String R1e = \"R1e\";\n String R2 = \"R2\";\n String R2a = \"R2a\";\n String R2b = \"R2b\";\n String R2c = \"R2c\";\n String R2d = \"R2d\";\n String R2e = \"R2e\";\n String R3 = \"R3\";\n String R3a = \"R3a\";\n String R3b = \"R3b\";\n String R3c = \"R3c\";\n String R3d = \"R3d\";\n String R3e = \"R3e\";\n String R4 = \"R4\";\n String R4a = \"R4a\";\n String R4b = \"R4b\";\n String R4c = \"R4c\";\n String R4d = \"R4d\";\n String R4e = \"R4e\";\n String R5 = \"R5\";\n String R5a = \"R5a\";\n String R5b = \"R5b\";\n String R5c = \"R5c\";\n String R5d = \"R5d\";\n String R5e = \"R5e\";\n String S = \"S\";\n String S1 = \"S1\";\n String S2 = \"S2\";\n String S2a = \"S2a\";\n String S2b = \"S2b\";\n String S2c = \"S2c\";\n String S2d = \"S2d\";\n String S2e = \"S2e\";\n String S3 = \"S3\";\n String S3a = \"S3a\";\n String S3b = \"S3b\";\n String S3c = \"S3c\";\n String S3d = \"S3d\";\n String S3e = \"S3e\";\n String S4 = \"S4\";\n String S4a = \"S4a\";\n String S4b = \"S4b\";\n String S4c = \"S4c\";\n String S4d = \"S4d\";\n String S4e = \"S4e\";\n String S5 = \"S5\";\n String S5a = \"S5a\";\n String S5b = \"S5b\";\n String S5c = \"S5c\";\n String S5d = \"S5d\";\n String S5e = \"S5e\";\n\n String T = \"T\";\n String T1 = \"T1\";\n String T2 = \"T2\";\n String T3 = \"T3\";\n String T3a = \"T3a\";\n String T3b = \"T3b\";\n String T3c = \"T3c\";\n String T3d = \"T3d\";\n String T3e = \"T3e\";\n String T4 = \"T4\";\n String T4a = \"T4a\";\n String T4b = \"T4b\";\n String T4c = \"T4c\";\n String T4d = \"T4d\";\n String T4e = \"T4e\";\n String T5 = \"T5\";\n String T5a = \"T5a\";\n String T5b = \"T5b\";\n String T5c = \"T5c\";\n String T5d = \"T5d\";\n String T5e = \"T5e\";\n\n String U = \"U\";\n String U1 = \"U1\";\n String U1a = \"U1a\";\n String U1b = \"U1b\";\n String U1c = \"U1c\";\n String U1d = \"U1d\";\n String U1e = \"U1e\";\n String U2 = \"U2\";\n String U3 = \"U3\";\n String U4 = \"U4\";\n String U4a = \"U4a\";\n String U4b = \"U4b\";\n String U4c = \"U4c\";\n String U4d = \"U4d\";\n String U4e = \"U4e\";\n String U5 = \"U5\";\n String U5a = \"U5a\";\n String U5b = \"U5b\";\n String U5c = \"U5c\";\n String U5d = \"U5d\";\n String U5e = \"U5e\";\n String V = \"V\";\n\n String V1 = \"V1\";\n String V1a = \"V1a\";\n String V1b = \"V1b\";\n String V1c = \"V1c\";\n String V1d = \"V1d\";\n String V1e = \"V1e\";\n String V2 = \"V2\";\n String V2a = \"V2a\";\n String V2b = \"V2b\";\n String V2c = \"V2c\";\n String V2d = \"V2d\";\n String V2e = \"V2e\";\n String V3 = \"V3\";\n String V4 = \"V4\";\n String V5 = \"V5\";\n String V5a = \"V5a\";\n String V5b = \"V5b\";\n String V5c = \"V5c\";\n String V5d = \"V5d\";\n String V5e = \"V5e\";\n String W = \"W\";\n\n String W1 = \"W1\";\n String W1a = \"W1a\";\n String W1b = \"W1b\";\n String W1c = \"W1c\";\n String W1d = \"W1d\";\n String W1e = \"W1e\";\n String W2 = \"W2\";\n String W2a = \"W2a\";\n String W2b = \"W2b\";\n String W2c = \"W2c\";\n String W2d = \"W2d\";\n String W2e = \"W2e\";\n String W3 = \"W3\";\n String W3a = \"W3a\";\n String W3b = \"W3b\";\n String W3c = \"W3c\";\n String W3d = \"W3d\";\n String W3e = \"W3e\";\n String W4 = \"W4\";\n String W5 = \"W5\";\n\n String X1 = \"X1\";\n String X1a = \"X1a\";\n String X1b = \"X1b\";\n String X1c = \"X1c\";\n String X1d = \"X1d\";\n String X1e = \"X1e\";\n String X2 = \"X2\";\n String X2a = \"X2a\";\n String X2b = \"X2b\";\n String X2c = \"X2c\";\n String X2d = \"X2d\";\n String X2e = \"X2e\";\n String X3 = \"X3\";\n String X3a = \"X3a\";\n String X3b = \"X3b\";\n String X3c = \"X3c\";\n String X3d = \"X3d\";\n String X3e = \"X3e\";\n String X4 = \"X4\";\n String X4a = \"X4a\";\n String X4b = \"X4b\";\n String X4c = \"X4c\";\n String X4d = \"X4d\";\n String X4e = \"X4e\";\n String X5 = \"X5\";\n String Y = \"Y\";\n String Y1 = \"Y1\";\n String Y1a = \"Y1a\";\n String Y1b = \"Y1b\";\n String Y1c = \"Y1c\";\n String Y1d = \"Y1d\";\n String Y1e = \"Y1e\";\n String Y2 = \"Y2\";\n String Y2a = \"Y2a\";\n String Y2b = \"Y2b\";\n String Y2c = \"Y2c\";\n String Y2d = \"Y2d\";\n String Y2e = \"Y2e\";\n String Y3 = \"Y3\";\n String Y3a = \"Y3a\";\n String Y3b = \"Y3b\";\n String Y3c = \"Y3c\";\n String Y3d = \"Y3d\";\n String Y3e = \"Y3e\";\n String Y4 = \"Y4\";\n String Y4a = \"Y4a\";\n String Y4b = \"Y4b\";\n String Y4c = \"Y4c\";\n String Y4d = \"Y4d\";\n String Y4e = \"Y4e\";\n String Y5 = \"Y5\";\n String Y5a = \"Y5a\";\n String Y5b = \"Y5b\";\n String Y5c = \"Y5c\";\n String Y5d = \"Y5d\";\n String Y5e = \"Y5e\";\n String Z = \"Z\";\n String Z1 = \"Z1\";\n String Z2 = \"Z2\";\n String Z2a = \"Z2a\";\n String Z2b = \"Z2b\";\n String Z2c = \"Z2c\";\n String Z2d = \"Z2d\";\n String Z2e = \"Z2e\";\n String Z3 = \"Z3\";\n String Z3a = \"Z3a\";\n String Z3b = \"Z3b\";\n String Z3c = \"Z3c\";\n String Z3d = \"Z3d\";\n String Z3e = \"Z3e\";\n String Z4 = \"Z4\";\n String Z4a = \"Z4a\";\n String Z4b = \"Z4b\";\n String Z4c = \"Z4c\";\n String Z4d = \"Z4d\";\n String Z4e = \"Z4e\";\n String Z5 = \"Z5\";\n String Z5a = \"Z5a\";\n String Z5b = \"Z5b\";\n String Z5c = \"Z5c\";\n String Z5d = \"Z5d\";\n String Z5e = \"Z5e\";\n}", "@Test\n public void testICCDuplicateSequence() throws IOException {\n JPEGImageReader reader = createReader();\n reader.setInput(ImageIO.createImageInputStream(getClassLoaderResource(\"/jpeg/invalid-icc-duplicate-sequence-numbers-rgb-internal-kodak-srgb-jfif.jpg\")));\n\n assertEquals(345, reader.getWidth(0));\n assertEquals(540, reader.getHeight(0));\n\n BufferedImage image = reader.read(0);\n\n assertNotNull(image);\n assertEquals(345, image.getWidth());\n assertEquals(540, image.getHeight());\n\n reader.dispose();\n }", "public List<String> findRepeatedDnaSequences2(String s) {\n if(s == null || s.length() <= 10){\n return new ArrayList<String>();\n }\n \n int n = s.length();\n Set<String> visited = new HashSet<String>();\n Set<String> duplicated = new HashSet<String>();\n \n for(int i = 0; i <= n - 10; ++i){\n String subStr = s.substring(i, i + 10);\n \n if(!visited.add(subStr)) {\n \tduplicated.add(subStr);\n }\n }\n \n return new ArrayList<String>(duplicated);\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n DefaultNucleotideCodec defaultNucleotideCodec0 = DefaultNucleotideCodec.INSTANCE;\n DefaultNucleotideCodec defaultNucleotideCodec1 = DefaultNucleotideCodec.INSTANCE;\n DefaultNucleotideCodec defaultNucleotideCodec2 = DefaultNucleotideCodec.INSTANCE;\n Nucleotide nucleotide0 = Nucleotide.Pyrimidine;\n Set<Nucleotide> set0 = nucleotide0.getBasesFor();\n byte[] byteArray0 = defaultNucleotideCodec1.encode((Collection<Nucleotide>) set0);\n Nucleotide nucleotide1 = defaultNucleotideCodec0.decode(byteArray0, 0L);\n assertEquals(Nucleotide.Cytosine, nucleotide1);\n \n defaultNucleotideCodec1.getNumberOfGapsUntil(byteArray0, 1717986918);\n DefaultNucleotideCodec defaultNucleotideCodec3 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec3.getUngappedLength(byteArray0);\n DefaultNucleotideCodec defaultNucleotideCodec4 = DefaultNucleotideCodec.INSTANCE;\n int int0 = defaultNucleotideCodec4.getUngappedOffsetFor(byteArray0, (-1209));\n assertEquals((-1209), int0);\n \n int int1 = defaultNucleotideCodec2.getGappedOffsetFor(byteArray0, (-1209));\n assertEquals(2, int1);\n \n defaultNucleotideCodec2.getGappedOffsetFor(byteArray0, 1717986918);\n DefaultNucleotideCodec defaultNucleotideCodec5 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec5.decodedLengthOf(byteArray0);\n defaultNucleotideCodec0.decodedLengthOf(byteArray0);\n DefaultNucleotideCodec defaultNucleotideCodec6 = DefaultNucleotideCodec.INSTANCE;\n DefaultNucleotideCodec defaultNucleotideCodec7 = DefaultNucleotideCodec.INSTANCE;\n int int2 = defaultNucleotideCodec7.getGappedOffsetFor(byteArray0, 0);\n int int3 = defaultNucleotideCodec6.getNumberOfGapsUntil(byteArray0, 5);\n assertTrue(int3 == int2);\n assertArrayEquals(new byte[] {(byte)0, (byte)0, (byte)0, (byte)2, (byte) (-34)}, byteArray0);\n assertEquals(0, int3);\n }", "Sequence(String inString) {\r\n // Allocate bytes for the sequence\r\n seqArray = new byte[(int)Math.ceil(inString.length() / 4.0)];\r\n seqLength = inString.length();\r\n\r\n for (int i = 0; i < inString.length(); i++) {\r\n // Begin at the start of byte minus 2, then subtract\r\n // the number of bits into the byte we are\r\n int bytePos = 6 - (i % 4) * 2;\r\n // Divide by the current position in string to find current byte\r\n int currByte = i / 4;\r\n char currChar = inString.charAt(i);\r\n if (currChar == 'A') {\r\n seqArray[currByte] |= 0 << bytePos;\r\n }\r\n else if (currChar == 'C') {\r\n seqArray[currByte] |= 1 << bytePos;\r\n }\r\n else if (currChar == 'G') {\r\n seqArray[currByte] |= 2 << bytePos;\r\n }\r\n else if (currChar == 'T') {\r\n seqArray[currByte] |= 3 << bytePos;\r\n }\r\n else {\r\n System.out.print(\"Could not create sequence!\");\r\n }\r\n }\r\n }", "public static String findRepeatingSequence(String input){\n\t char [] inputArray = input.toCharArray();\n\t StringBuffer sequence = new StringBuffer();\n\t\tfor (int i = 0; i < inputArray.length - 1; i++) {\n\t\t\tif (Character.toString(inputArray[i]).equals(Character.toString(inputArray[i + 1]))) {\n\t\t\t\t\n\t\t\t\tsequence.append(Character.toString(inputArray[i]));\n\t\t\t\t\n\t\t\t\t\twhile (Character.toString(inputArray[i]).equals(Character.toString(inputArray[i + 1]))) {\n\t\t\t\t\t\tsequence.append(Character.toString(inputArray[i]));\n\t\t\t\t\t\tif (i + 1 < inputArray.length - 1) {\n\t\t\t\t\t\t\ti++;\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t \n\n\t\t\t}else{\n\t\t\t\tif (sequence.length()>0){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\n\t }\n\t\n\treturn sequence.toString();\t\n\t}", "@Test\n public void codonCompare2(){\n //these list are already sorted\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(c);\n AminoAcidLL second = AminoAcidLL.createFromRNASequence(d);\n int expected = 1;\n assertEquals(expected, first.codonCompare(second));\n\n }", "@Test\n public void repeatedSubstringPattern() {\n assertTrue(new Solution1().repeatedSubstringPattern(\"abcabcabcabc\"));\n }", "public String translateDNA(String dnaseq) throws AnnotationException {\n\tStringBuilder aminoAcidSeq = new StringBuilder();\n\tint len = dnaseq.length();\n\tif (! (len%3 == 0) ) {\n\t len = len - (len%3);\n\t /* this forces len to be a multiple of 3. */\n\t //String err = String.format(\"Attempt to translate sequence [%s] with length %d (should be 3n)\",dnaseq,len);\n\t //throw new AnnotationException(err);\n\t}\n\tfor (int i=0; i<len; i += 3) {\n\t String nt3 = dnaseq.substring(i,i+3);\n\t String aa = this.codon1.get(nt3);\n\t if (aa == null) {\n\t\t/*\n\t\t String err = String.format(\"Could not find translation for codon:\\\"%s\\\" in sequence:\\\"%s\\\"\", \n\t\t\t\t\t nt3, dnaseq);\n\t\t\t\t\t throw new AnnotationException(err);\n\t\t*/\n\t\tbreak; /* stop translation */\n\t }\n\t aminoAcidSeq.append(aa);\n\t}\n\treturn aminoAcidSeq.toString();\n }", "@Test\r\n\tpublic void testPositiveGenerateIntegerSequences_9() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tint[][] response = roc.generateIntegerSequences(4, LENGTH, MIN, MAX, \r\n\t\t\t\t\t\tREPLACEMENT, identifier);\r\n\t\t\t\tcollector.checkThat(response, notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tint[][] response2 = roc.generateIntegerSequences(4, LENGTH, MIN, MAX, \r\n\t\t\t\t\t\tREPLACEMENT, identifier);\r\n\t\t\t\tcollector.checkThat(response, equalTo(response2));\r\n\t\t\t\t\r\n\t\t\t\tresponse = roc.generateIntegerSequences(4, LENGTH, MIN, MAX, \r\n\t\t\t\t\t\tREPLACEMENT, date);\r\n\t\t\t\tcollector.checkThat(response, notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tresponse2 = roc.generateIntegerSequences(4, LENGTH, MIN, MAX, \r\n\t\t\t\t\t\tREPLACEMENT, date);\r\n\t\t\t\tcollector.checkThat(response, equalTo(response2));\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "public static void main(String [] args) {\n\t\tString str = \"ccacacabccacabaaaabbcbccbabcbbcaccabaababcbcacabcabacbbbccccabcbcabbaaaaabacbcbbbcababaabcbbaa\"\n\t\t\t\t+ \"ababababbabcaabcaacacbbaccbbabbcbbcbacbacabaaaaccacbaabccabbacabaabaaaabbccbaaaab\"\n\t\t\t\t+ \"acabcacbbabbacbcbccbbbaaabaaacaabacccaacbcccaacbbcaabcbbccbccacbbcbcaaabbaababacccbaca\"\n\t\t\t\t+ \"cbcbcbbccaacbbacbcbaaaacaccbcaaacbbcbbabaaacbaccaccbbabbcccbcbcbcbcabbccbacccbacabcaacbcac\"\n\t\t\t\t+ \"cabbacbbccccaabbacccaacbbbacbccbcaaaaaabaacaaabccbbcccaacbacbccaaacaacaaaacbbaaccacbcbaaaccaab\"\n\t\t\t\t+ \"cbccacaaccccacaacbcacccbcababcabacaabbcacccbacbbaaaccabbabaaccabbcbbcaabbcabaacabacbcabbaaabccab\"\n\t\t\t\t+ \"cacbcbabcbccbabcabbbcbacaaacaabb\"\n\t\t\t\t+ \"babbaacbbacaccccabbabcbcabababbcbaaacbaacbacacbabbcacccbccbbbcbcabcabbbcaabbaccccabaa\"\n\t\t\t\t+ \"bbcbcccabaacccccaaacbbbcbcacacbabaccccbcbabacaaaabcccaaccacbcbbcccaacccbbcaaaccccaabacabc\"\n\t\t\t\t+ \"abbccaababbcabccbcaccccbaaabbbcbabaccacaabcabcbacaccbaccbbaabccbbbccaccabccbabbbccbaabcaab\"\n\t\t\t\t+ \"cabcbbabccbaaccabaacbbaaaabcbcabaacacbcaabbaaabaaccacbaacababcbacbaacacccacaacbacbbaacbcbbbabc\"\n\t\t\t\t+ \"cbababcbcccbccbcacccbababbcacaaaaacbabcabcacaccabaabcaaaacacbccccaaccbcbccaccacbcaaaba\";\n\t\tSystem.out.println(substrCount2(1017, str));\n\t}", "@Test\n public void testConstructorTransformations() {\n\n String t1 = \"A C G T A C G T A A A A\";\n Sequence seq1 = new Sequence(\"t1\", t1, five);\n assertTrue(s1.equals(seq1.sequence()));\n\n String t2 = \"acgtacgtaaaa\";\n Sequence seq2 = new Sequence(\"t2\", t2, five);\n assertTrue(s1.equals(seq2.sequence()));\n\n }", "public void addCount(ArrayList<Character> sequence, int n) {\n \tString s = Integer.toString(n);\n \tfor(int i = 0; i < s.length(); i++) {\n \t\tsequence.add(s.charAt(i));\n \t}\n \treturn;\n }", "private boolean comparacionOblicuaID(String[] dna) {\n boolean repetir;\n int aux = 0;\n final int CASO = 3;\n int largo = dna.length - CASO - 1;\n int repaso = 1, fila,columna;\n do {\n do {\n repetir = true;\n if (repaso == 1) {\n fila = 0;\n columna = largo - aux;\n } else {\n fila = largo - aux;\n columna = 0;\n }\n for (int i = 0; i <= (CASO + aux); i += 2) {\n int colum = columna + i;\n int fil = fila + i;\n if ((colum) == (fil) && repaso == 1) {\n repetir = false; break;\n }\n if (((dna.length-CASO)>=colum && repaso==1) || ((dna.length-CASO)>=fil && repaso==0)) {\n if (dna[fil].charAt(colum) == dna[fil + 2].charAt(colum + 2)) {\n if (dna[fil].charAt(colum) == dna[fil + 1].charAt(colum + 1)) {\n if (((fil - 1) >= 0 && (colum - 1) >= 0) && (dna[fil].charAt(colum) == dna[fil - 1].charAt(colum - 1))) {\n cantidadSec++;\n if(cantidadSec>1)return true;\n if (colum == fil) repetir = false;\n break;\n } else {\n if (((dna.length - CASO+1) >= (colum + 3) && repaso == 1) || ((dna.length-1) >= (fil + 3) && repaso == 0)) {\n if ((dna[fil].charAt(colum) == dna[fil + 3].charAt(colum + 3))) {\n cantidadSec++;\n if(cantidadSec>1)return true;\n if (colum == fil) repetir = false;\n break;\n }\n }\n }\n }\n }\n } else {\n if (colum == fil) repetir = false;\n }\n }\n aux++;\n } while (repetir);\n repaso--;\n aux = 0;\n } while (repaso >= 0);\n return false;\n }", "@Test\r\n\tpublic void testPositiveGenerateStrings_3() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tString[] response = roc.generateStrings(10, 5, \"abcd\", false, identifier);\r\n\t\t\t\tcollector.checkThat(response, notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tString[] response2 = roc.generateStrings(10, 5, \"abcd\", false, identifier);\r\n\t\t\t\tcollector.checkThat(response, equalTo(response2));\r\n\t\t\t\r\n\t\t\t\tresponse = roc.generateStrings(10, 5, \"abcd\", false, date);\r\n\t\t\t\tcollector.checkThat(response, notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tresponse2 = roc.generateStrings(10, 5, \"abcd\", false, date);\r\n\t\t\t\tcollector.checkThat(response, equalTo(response2));\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "@Test(timeout = 4000)\n public void test17() throws Throwable {\n DefaultNucleotideCodec defaultNucleotideCodec0 = DefaultNucleotideCodec.INSTANCE;\n byte[] byteArray0 = new byte[9];\n defaultNucleotideCodec0.toString(byteArray0);\n defaultNucleotideCodec0.decodedLengthOf(byteArray0);\n defaultNucleotideCodec0.decodedLengthOf(byteArray0);\n defaultNucleotideCodec0.getUngappedLength(byteArray0);\n Nucleotide nucleotide0 = Nucleotide.Gap;\n Set<Nucleotide> set0 = nucleotide0.getBasesFor();\n byte[] byteArray1 = defaultNucleotideCodec0.encode((Collection<Nucleotide>) set0);\n DefaultNucleotideCodec defaultNucleotideCodec1 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec1.decode(byteArray0, 0);\n DefaultNucleotideCodec defaultNucleotideCodec2 = DefaultNucleotideCodec.INSTANCE;\n byte[] byteArray2 = defaultNucleotideCodec2.encode((Collection<Nucleotide>) set0);\n DefaultNucleotideCodec defaultNucleotideCodec3 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec3.toString(byteArray1);\n DefaultNucleotideCodec defaultNucleotideCodec4 = DefaultNucleotideCodec.INSTANCE;\n DefaultNucleotideCodec defaultNucleotideCodec5 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec5.toString(byteArray0);\n DefaultNucleotideCodec defaultNucleotideCodec6 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec6.getNumberOfGapsUntil(byteArray1, 4);\n DefaultNucleotideCodec.values();\n defaultNucleotideCodec1.isGap(byteArray2, 0);\n defaultNucleotideCodec4.getGappedOffsetFor(byteArray1, (-16908803));\n defaultNucleotideCodec0.getNumberOfGapsUntil(byteArray0, 1497825280);\n // Undeclared exception!\n try { \n DefaultNucleotideCodec.valueOf(\"\");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // No enum constant org.jcvi.jillion.core.residue.nt.DefaultNucleotideCodec.\n //\n verifyException(\"java.lang.Enum\", e);\n }\n }", "private boolean comparacionOblicuaDI (String [] dna){\n int largo=3, repaso=1, aux=0, contador=0, fila, columna;\n boolean repetir;\n char caracter;\n do {\n do {\n repetir=true;\n if(repaso==1){\n fila=0;\n columna=largo + aux;\n }else{\n fila=dna.length-1-largo-aux;\n columna=dna.length-1;\n }\n\n caracter = dna[fila].charAt(columna);\n\n for (int i = 1; i <= (largo+aux); i++) {\n int colum=columna-i;\n int fil=fila+i;\n if((colum==dna.length-2 && fil==1) && repaso==1){\n repetir=false;\n break;\n }\n if (caracter != dna[fil].charAt(colum)) {\n contador = 0;\n\n if(((dna.length-largo)>(colum) && repaso==1) || ((dna.length-largo)<=(fil) && repaso!=1)){\n if((fil+colum)==dna.length-1){\n repetir=false;\n }\n break;\n }\n caracter = dna[fil].charAt(colum);\n\n } else {\n contador++;\n }\n if (contador == largo) {\n cantidadSec++;\n if(cantidadSec>1){\n return true;\n }\n if((fil+colum)==dna.length-1){\n repetir=false;\n }\n break;\n }\n }\n aux++;\n } while (repetir);\n repaso--;\n aux=0;\n\n }while(repaso>=0);\n return false;\n }", "@Test\n public void shouldReturnUniqueCodenames()\n {\n String[] codenames = DatabaseHelper.getRandomCodenames(25);\n boolean noMatches = true;\n\n\n for (int i = 0; i < codenames.length-1; i++)\n {\n for (int j = i+1; j < codenames.length; j++)\n {\n if (codenames[i] == codenames[j])\n {\n noMatches = false;\n // Here to give more detailed feedback in case the test fails.\n System.out.println(\"Match found: \" + codenames[i] + \" \" + codenames[j]);\n }\n }\n }\n\n assert(noMatches);\n }", "@Test\r\n\tpublic void testPositiveGenerateIntegerSequences_4() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tint[][] response = roc.generateIntegerSequences(3, 5, 0, 10, false, identifier);\r\n\t\t\t\tcollector.checkThat(response, notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tint[][] response2 = roc.generateIntegerSequences(3, 5, 0, 10, false, identifier);\r\n\t\t\t\tcollector.checkThat(response, equalTo(response2));\r\n\t\t\t\t\r\n\t\t\t\tresponse = roc.generateIntegerSequences(3, 5, 0, 10, false, date);\r\n\t\t\t\tcollector.checkThat(response, notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tresponse2 = roc.generateIntegerSequences(3, 5, 0, 10, false, date);\r\n\t\t\t\tcollector.checkThat(response, equalTo(response2));\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "@Test\r\n\tpublic void testPositiveGenerateIntegerSequences_5() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tString[][] response = roc.generateIntegerSequences(3, 5, 0, 10, false, 16, identifier);\r\n\t\t\t\tcollector.checkThat(response, notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tString[][] response2 = roc.generateIntegerSequences(3, 5, 0, 10, false, 16, identifier);\r\n\t\t\t\tcollector.checkThat(response, equalTo(response2));\r\n\t\t\t\t\r\n\t\t\t\tresponse = roc.generateIntegerSequences(3, 5, 0, 10, false, 16, date);\r\n\t\t\t\tcollector.checkThat(response, notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tresponse2 = roc.generateIntegerSequences(3, 5, 0, 10, false, 16, date);\r\n\t\t\t\tcollector.checkThat(response, equalTo(response2));\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "public String guessSequenceType(final String seq) {\n\n\t int canonicalNucStates = 0;\n\t int undeterminedStates = 0;\n\t // true length, excluding any gaps\n\t int sequenceLength = seq.length();\n\t final int seqLen = sequenceLength;\n\n\t boolean onlyValidNucleotides = true;\n\t boolean onlyValidAminoAcids = true;\n\n\t // do not use toCharArray: it allocates an array size of sequence\n\t for(int k = 0; (k < seqLen) && (onlyValidNucleotides || onlyValidAminoAcids); ++k) {\n\t final char c = seq.charAt(k);\n\t final boolean isNucState = (\"ACGTUXNacgtuxn?_-\".indexOf(c) > -1);\n\t final boolean isAminoState = true;\n\n\t onlyValidNucleotides &= isNucState;\n\t onlyValidAminoAcids &= isAminoState;\n\n\t if (onlyValidNucleotides) {\n\t assert(isNucState);\n\t if ((\"ACGTacgt\".indexOf(c) > -1)) {\n\t ++canonicalNucStates;\n\t } else {\n\t if ((\"?_-\".indexOf(c) > -1)) {\n\t --sequenceLength;\n\t } else if( (\"UXNuxn\".indexOf(c) > -1)) {\n\t ++undeterminedStates;\n\t }\n\t }\n\t }\n\t }\n\n\t String result = \"aminoacid\";\n\t if (onlyValidNucleotides) { // only nucleotide states\n\t // All sites are nucleotides (actual or ambigoues). If longer than 100 sites, declare it a nuc\n\t if( sequenceLength >= 100 ) {\n\t result = \"nucleotide\";\n\t } else {\n\t // if short, ask for 70% of ACGT or N\n\t final double threshold = 0.7;\n\t final int nucStates = canonicalNucStates + undeterminedStates;\n\t // note: This implicitely assumes that every valid nucleotide\n\t // symbol is also a valid amino acid. This is true since we\n\t // added support for the 21st amino acid, U (Selenocysteine)\n\t // in AminoAcids.java.\n\t result = nucStates >= sequenceLength * threshold ? \"nucleotide\" : \"aminoacid\";\n\t }\n\t } else if (onlyValidAminoAcids) {\n\t result = \"aminoacid\";\n\t } else {\n\t result = null;\n\t }\n\t return result;\n\t }", "@Test\r\n\tpublic void testPositiveGenerateIntegerSequences_10() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tString[][] response = roc.generateIntegerSequences(4, LENGTH, MIN, MAX, \r\n\t\t\t\t\t\tREPLACEMENT, BASE, identifier);\r\n\t\t\t\tcollector.checkThat(response, notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tString[][] response2 = roc.generateIntegerSequences(4, LENGTH, MIN, MAX, \r\n\t\t\t\t\t\tREPLACEMENT, BASE, identifier);\r\n\t\t\t\tcollector.checkThat(response, equalTo(response2));\r\n\t\t\t\t\r\n\t\t\t\tresponse = roc.generateIntegerSequences(4, LENGTH, MIN, MAX, \r\n\t\t\t\t\t\tREPLACEMENT, BASE, date);\r\n\t\t\t\tcollector.checkThat(response, notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tresponse2 = roc.generateIntegerSequences(4, LENGTH, MIN, MAX, \r\n\t\t\t\t\t\tREPLACEMENT, BASE, date);\r\n\t\t\t\tcollector.checkThat(response, equalTo(response2));\r\n\t\t\t\t\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "@Test\n public void testICCDuplicateSequenceZeroBased() throws IOException {\n JPEGImageReader reader = createReader();\n reader.setInput(ImageIO.createImageInputStream(getClassLoaderResource(\"/jpeg/invalid-icc-duplicate-sequence-numbers-rgb-xerox-dc250-heavyweight-1-progressive-jfif.jpg\")));\n\n assertEquals(3874, reader.getWidth(0));\n assertEquals(5480, reader.getHeight(0));\n\n ImageReadParam param = reader.getDefaultReadParam();\n param.setSourceRegion(new Rectangle(0, 0, 3874, 16)); // Save some memory\n BufferedImage image = reader.read(0, param);\n\n assertNotNull(image);\n assertEquals(3874, image.getWidth());\n assertEquals(16, image.getHeight());\n\n reader.dispose();\n }", "@Test\n public void codonCompare1(){\n //these list are already sorted\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(a);\n AminoAcidLL second = AminoAcidLL.createFromRNASequence(b);\n int expected = 0;\n assertEquals(expected, first.codonCompare(second));\n }", "@Test\r\n\tpublic void testPositiveGenerateIntegerSequences_7() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tcollector.checkThat(roc.generateIntegerSequences(4, LENGTH, MIN, MAX, REPLACEMENT), notNullValue());\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "@Test(timeout = 4000)\n public void test11() throws Throwable {\n DefaultNucleotideCodec defaultNucleotideCodec0 = DefaultNucleotideCodec.valueOf(\"INSTANCE\");\n byte[] byteArray0 = new byte[7];\n byteArray0[0] = (byte) (-50);\n byteArray0[1] = (byte) (-38);\n DefaultNucleotideCodec defaultNucleotideCodec1 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec1.decodedLengthOf(byteArray0);\n defaultNucleotideCodec0.decodedLengthOf(byteArray0);\n DefaultNucleotideCodec defaultNucleotideCodec2 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec2.getUngappedLength(byteArray0);\n Nucleotide nucleotide0 = Nucleotide.NotGuanine;\n Set<Nucleotide> set0 = nucleotide0.getBasesFor();\n byte[] byteArray1 = defaultNucleotideCodec0.encode((Collection<Nucleotide>) set0);\n Nucleotide nucleotide1 = defaultNucleotideCodec0.decode(byteArray0, 0L);\n assertEquals(Nucleotide.Gap, nucleotide1);\n \n defaultNucleotideCodec0.getNumberOfGapsUntil(byteArray0, 1717986918);\n long long0 = defaultNucleotideCodec1.getUngappedLength(byteArray0);\n assertEquals((-824573952L), long0);\n \n defaultNucleotideCodec1.getUngappedOffsetFor(byteArray1, (-651));\n defaultNucleotideCodec2.getGappedOffsetFor(byteArray0, (byte) (-38));\n defaultNucleotideCodec0.getGappedOffsetFor(byteArray0, (byte) (-50));\n DefaultNucleotideCodec defaultNucleotideCodec3 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec3.decodedLengthOf(byteArray1);\n defaultNucleotideCodec3.decodedLengthOf(byteArray1);\n DefaultNucleotideCodec defaultNucleotideCodec4 = DefaultNucleotideCodec.INSTANCE;\n int int0 = defaultNucleotideCodec4.getGappedOffsetFor(byteArray1, (byte) (-38));\n assertEquals(3, int0);\n \n DefaultNucleotideCodec defaultNucleotideCodec5 = DefaultNucleotideCodec.INSTANCE;\n int int1 = defaultNucleotideCodec5.getNumberOfGapsUntil(byteArray1, (byte) (-38));\n assertArrayEquals(new byte[] {(byte)0, (byte)0, (byte)0, (byte)3, (byte)29, (byte) (-32)}, byteArray1);\n assertEquals(0, int1);\n }", "public static String creaCodiceCognome(String cognomePersona) {\n\t\tString codiceCognomePersona = \"\";\n\t\n\t\tcodiceCognomePersona = estraiTreConsonanti(cognomePersona, \"cognome\");\n\t\t\n\t\t//se vengono trovate 3 consonanti viene ritornato il codice composto da 3 consonanti\n\t\tif (codiceCognomePersona.length() == 3) return codiceCognomePersona;\n\t\telse {\n\t\t\t//altrimenti chiamo il metodo che completa la stringa ottenuta fin qua\n\t\t\treturn seConsonantiNonBastano(codiceCognomePersona, cognomePersona);\n\t\t\t}\n\t}", "public static void main(String[] args) {\n\t\tString string1 = \"acbdfbdfacb\";\n\t\tint length = string1.length();\n\t\tString[] sub = new String[length*(length+1)/2];\n\t\tint temp = 0;\n\t\tfor(int i =0;i<length;i++) {\n\t\t\tfor(int j = i;j<length;j++) {\n\t\t\t\tString parts = string1.substring(i,j+1);\n\t\t\t\tsub[temp] = parts;\n\t\t\t\ttemp++;\n\t\t\t}\n\t\t}\n\t\tfor(int j =0;j<sub.length;j++) {\n\t\t\tSystem.out.println(sub[j]);\n\t\t}\n\t\tArrayList<String> rep = new ArrayList<String>();\n\t\tfor(int i=0;i<sub.length;i++) {\n\t\t\tfor(int j =i+1;j<sub.length;j++) {\n\t\t\t\tif(sub[i].equals(sub[j])) {\n\t\t\t\t\trep.add(sub[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tint largestString = 0;\n\t\tSystem.out.println(rep);\n\t\tfor(int k =0;k<rep.size();k++) {\n\t\t\tif(rep.get(k).length()>largestString) {\n\t\t\t\tlargestString = rep.get(k).length();\n\t\t\t}\t\t\n\t\t}\n\t\tfor(int k =0;k<rep.size();k++) {\n\t\tif(rep.get(k).length()==largestString) {\n\t\t\tSystem.out.println(\"the longest repeating sequence in a string : \"+rep.get(k));\n\t\t}\n\t\t}\n\t}", "@Test\n public void validClueShouldReturnCodenames()\n {\n String clue = DatabaseHelper.getRandomClue();\n assertTrue(DatabaseHelper.getCodenamesForClue(clue).length > 0);\n }", "static long repeatedString(String s, long n) {\n\n char[] str = s.toCharArray();\n\n String temp = \"\";\n\n int i=0;\n long count=0;\n\n while(i<str.length){\n if(str[i]=='a'){\n count++;\n }\n i++;\n }\n\n long occurance = n/str.length;\n long remainder = n%str.length;\n count = count*occurance;\n\n i=0;\n while(i<remainder){\n if(str[i]=='a'){\n count++;\n }\n i++;\n }\n\n return count;\n\n }", "@Test\r\n\tpublic void testPositiveGenerateIntegerSequences_8() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tcollector.checkThat(roc.generateIntegerSequences(4, LENGTH, MIN, MAX, REPLACEMENT, BASE), notNullValue());\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "@Test\n public void removeDuplicatesFromString() {\n\n assertEquals(\"IAMDREW\", Computation.removeDuplicates(\"IIIAAAAMDREEEWW\"));\n }", "public int distinctSubseqII(String S) {\n int[] end = new int[26]; // 本字符添加之前的长度\n int res = 0;\n int added; // 当前额外增加的数量\n int mod = (int) 1e9 + 7;\n\n System.out.println('\\n' + S);\n for (char c : S.toCharArray()) {\n // 额外增加的数量等于前面的数量加上1(当前字符串)减去最后一次相同字符添加之前的数量\n added = (res + 1 - end[c - 'a']) % mod;\n\n end[c - 'a'] = (res + 1) % mod; // 影响的为前一个字符的数量加上单字符的数量\n\n res = (res + added) % mod;\n System.out.printf(\"%2c, %2d, %2d\\n\", c, res, end[c - 'a']);\n }\n return (res + mod) % mod;\n }", "@Before\r\n\tpublic void constructObj (){\r\n\t\tproteinSeq = new ProteinSequence(new char[]{'A','A','T','G','C','C','A','G','T','C','A','G','C','A','T','A','G','C','G'});\r\n\t}", "private void createAA() {\r\n\r\n\t\tfor( int x = 0 ; x < dnasequence.size(); x++) {\r\n\t\t\tString str = dnasequence.get(x);\r\n\t\t\t//put catch for missing 3rd letter\r\n\t\t\tif(str.substring(0, 1).equals(\"G\")) {\r\n\t\t\t\taasequence.add(getG(str));\r\n\t\t\r\n\t\t\t}else if(str.substring(0, 1).equals(\"C\")) {\r\n\t\t\t\taasequence.add(getC(str));\r\n\t\t\t\t\r\n\t\t\t}else if(str.substring(0, 1).equals(\"A\")) {\r\n\t\t\t\taasequence.add(getA(str));\r\n\t\t\t\t\r\n\t\t\t}else if(str.substring(0, 1).equals(\"T\")) {\r\n\t\t\t\taasequence.add(getT(str));\r\n\t\t\t\t\r\n\t\t\t}else if(str.substring(0,1).equals(\"N\")) {\r\n\t\t\t\taasequence.add(\"ERROR\");\r\n\t\t\t}else\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t}\r\n\t}", "@Test\n\tvoid testLongestRepeatingCharacterReplacement() {\n\t\tLongestRepeatingCharacterReplacement tester = new LongestRepeatingCharacterReplacement();\n\t\tassertEquals(4, tester.characterReplacement(\"ABAB\", 2));\n\t\tassertEquals(4, tester.characterReplacement(\"AABABBA\", 1));\n\t\tassertEquals(4, tester.characterReplacement(\"ABBB\", 2));\n\t\tassertEquals(1, tester.characterReplacement(\"A\", 2));\n\t\tassertEquals(0, tester.characterReplacement(\"\", 2));\n\t}", "public SequenceNumberTest() {}", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n String string0 = \"iody27>B{<G\";\n NucleotideSequence nucleotideSequence0 = mock(NucleotideSequence.class, new ViolatedAssumptionAnswer());\n doReturn(0L).when(nucleotideSequence0).getLength();\n QualitySequence qualitySequence0 = mock(QualitySequence.class, new ViolatedAssumptionAnswer());\n NucleotideSequence nucleotideSequence1 = mock(NucleotideSequence.class, new ViolatedAssumptionAnswer());\n doReturn(0L).when(nucleotideSequence1).getLength();\n ArtificialPhd artificialPhd0 = ArtificialPhd.createNewbler454Phd(\"iody27>B{<G\", nucleotideSequence1, qualitySequence0);\n Map<String, String> map0 = artificialPhd0.getComments();\n ArtificialPhd artificialPhd1 = ArtificialPhd.createNewbler454Phd(\"iody27>B{<G\", nucleotideSequence0, qualitySequence0, map0);\n PhdBuilder phdBuilder0 = null;\n try {\n phdBuilder0 = new PhdBuilder(artificialPhd1);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // initial capacity should be > 0 :0\n //\n verifyException(\"org.jcvi.jillion.internal.core.util.GrowableShortArray\", e);\n }\n }", "public String countAndSay(int n) {\n if (n<=0)\n return \"\";\n \n int count = 0;\n StringBuilder str = new StringBuilder();\n \n // Append 1 to the string as the sequence start with 1.\n str.append(\"1\");\n \n // In a loop, generate the next string in the sequence 'n'-1 times. \n // Since \"1\" is already the first element in the sequence.\n for(int i=1; i<n; i++){\n \n // Creating the next sequence, looking at the previous one\n int j=0, len=str.length();\n StringBuilder result = new StringBuilder();\n \n // Loop through each element in the current i'th sequence string, and generate the next one.\n // If the j'th and the (j+1)'th element are the same, increase the count. Else, append the \n // string with the count and the j'th element and continue with the next element in the string.\n while(j<len){\n count = 1;\n while(j<len-1 && str.charAt(j) == str.charAt(j+1)){\n count++;\n j++;\n }\n result.append(count);\n result.append(str.charAt(j));\n j++;\n }\n\n // Update the string 'str' to be the result string, as that will be used to create the \n // next string in the sequence.\n str = result;\n }\n \n return str.toString();\n }", "@Test\n\tpublic void testRealWorldCase_uc010nov_3() throws InvalidGenomeChange {\n\t\tthis.builderForward = TranscriptModelFactory\n\t\t\t\t.parseKnownGenesLine(\n\t\t\t\t\t\trefDict,\n\t\t\t\t\t\t\"uc010nov.3\tchrX\t+\t103031438\t103047547\t103031923\t103045526\t8\t103031438,103031780,103040510,103041393,103042726,103043365,103044261,103045454,\t103031575,103031927,103040697,103041655,103042895,103043439,103044327,103047547,\tP60201\tuc010nov.3\");\n\t\tthis.builderForward\n\t\t.setSequence(\"atggcttctcacgcttgtgctgcatatcccacaccaattagacccaaggatcagttggaagtttccaggacatcttcattttatttccaccctcaatccacatttccagatgtctctgcagcaaagcgaaattccaggagaagaggacaaagatactcagagagaaaaagtaaaagaccgaagaaggaggctggagagaccaggatccttccagctgaacaaagtcagccacaaagcagactagccagccggctacaattggagtcagagtcccaaagacatgggcttgttagagtgctgtgcaagatgtctggtaggggccccctttgcttccctggtggccactggattgtgtttctttggggtggcactgttctgtggctgtggacatgaagccctcactggcacagaaaagctaattgagacctatttctccaaaaactaccaagactatgagtatctcatcaatgtgatccatgccttccagtatgtcatctatggaactgcctctttcttcttcctttatggggccctcctgctggctgagggcttctacaccaccggcgcagtcaggcagatctttggcgactacaagaccaccatctgcggcaagggcctgagcgcaacggtaacagggggccagaaggggaggggttccagaggccaacatcaagctcattctttggagcgggtgtgtcattgtttgggaaaatggctaggacatcccgacaagtttgtgggcatcacctatgccctgaccgttgtgtggctcctggtgtttgcctgctctgctgtgcctgtgtacatttacttcaacacctggaccacctgccagtctattgccttccccagcaagacctctgccagtataggcagtctctgtgctgatgccagaatgtatggtgttctcccatggaatgctttccctggcaaggtttgtggctccaaccttctgtccatctgcaaaacagctgagttccaaatgaccttccacctgtttattgctgcatttgtgggggctgcagctacactggtttccctgctcaccttcatgattgctgccacttacaactttgccgtccttaaactcatgggccgaggcaccaagttctgatcccccgtagaaatccccctttctctaatagcgaggctctaaccacacagcctacaatgctgcgtctcccatcttaactctttgcctttgccaccaactggccctcttcttacttgatgagtgtaacaagaaaggagagtcttgcagtgattaaggtctctctttggactctcccctcttatgtacctcttttagtcattttgcttcatagctggttcctgctagaaatgggaaatgcctaagaagatgacttcccaactgcaagtcacaaaggaatggaggctctaattgaattttcaagcatctcctgaggatcagaaagtaatttcttctcaaagggtacttccactgatggaaacaaagtggaaggaaagatgctcaggtacagagaaggaatgtctttggtcctcttgccatctataggggccaaatatattctctttggtgtacaaaatggaattcattctggtctctctattaccactgaagatagaagaaaaaagaatgtcagaaaaacaataagagcgtttgcccaaatctgcctattgcagctgggagaagggggtcaaagcaaggatctttcacccacagaaagagagcactgaccccgatggcgatggactactgaagccctaactcagccaaccttacttacagcataagggagcgtagaatctgtgtagacgaagggggcatctggccttacacctcgttagggaagagaaacagggtgttgtcagcatcttctcactcccttctccttgataacagctaccatgacaaccctgtggtttccaaggagctgagaatagaaggaaactagcttacatgagaacagactggcctgaggagcagcagttgctggtggctaatggtgtaacctgagatggccctctggtagacacaggatagataactctttggatagcatgtctttttttctgttaattagttgtgtactctggcctctgtcatatcttcacaatggtgctcatttcatgggggtattatccattcagtcatcgtaggtgatttgaaggtcttgatttgttttagaatgatgcacatttcatgtattccagtttgtttattacttatttggggttgcatcagaaatgtctggagaataattctttgattatgactgttttttaaactaggaaaattggacattaagcatcacaaatgatattaaaaattggctagttgaatctattgggattttctacaagtattctgcctttgcagaaacagatttggtgaatttgaatctcaatttgagtaatctgatcgttctttctagctaatggaaaatgattttacttagcaatgttatcttggtgtgttaagagttaggtttaacataaaggttattttctcctgatatagatcacataacagaatgcaccagtcatcagctattcagttggtaagcttccaggaaaaaggacaggcagaaagagtttgagacctgaatagctcccagatttcagtcttttcctgtttttgttaactttgggttaaaaaaaaaaaaagtctgattggttttaattgaaggaaagatttgtactacagttcttttgttgtaaagagttgtgttgttcttttcccccaaagtggtttcagcaatatttaaggagatgtaagagctttacaaaaagacacttgatacttgttttcaaaccagtatacaagataagcttccaggctgcatagaaggaggagagggaaaatgttttgtaagaaaccaatcaagataaaggacagtgaagtaatccgtaccttgtgttttgttttgatttaataacataacaaataaccaacccttccctgaaaacctcacatgcatacatacacatatatacacacacaaagagagttaatcaactgaaagtgtttccttcatttctgatatagaattgcaattttaacacacataaaggataaacttttagaaacttatcttacaaagtgtattttataaaattaaagaaaataaaattaagaatgttctcaatcaaaaaaaaaaaaaaa\"\n\t\t\t\t.toUpperCase());\n\t\tthis.builderForward.setGeneSymbol(\"PLP1\");\n\t\tthis.infoForward = builderForward.build();\n\t\t// RefSeq NM_001128834.1\n\n\t\tGenomeChange change1 = new GenomeChange(new GenomePosition(refDict, '+', refDict.contigID.get(\"X\"), 103041655,\n\t\t\t\tPositionType.ONE_BASED), \"GGTGATC\", \"A\");\n\t\tAnnotation annotation1 = new BlockSubstitutionAnnotationBuilder(infoForward, change1).build();\n\t\tAssert.assertEquals(infoForward.accession, annotation1.transcript.accession);\n\t\tAssert.assertEquals(AnnotationLocation.INVALID_RANK, annotation1.annoLoc.rank);\n\t\tAssert.assertEquals(\"c.453_453+6delinsA\", annotation1.ntHGVSDescription);\n\t\tAssert.assertEquals(\"p.=\", annotation1.aaHGVSDescription);\n\t\tAssert.assertEquals(ImmutableSortedSet.of(VariantType.NON_FS_SUBSTITUTION, VariantType.SPLICE_DONOR),\n\t\t\t\tannotation1.effects);\n\t}", "public String match (String frameSeq)\n {\n // keeps track of how many times match is called (i.e. how many codons/AA's there are) \n \n\n StringBuffer newSeq = new StringBuffer (\"\");\n int begin = 0;\n int end = 3;\n int countAA = 0;\n\n for (int i = 0; i < frameSeq.length(); i += 3)\n {\n // keeps track of how many codons/AA's there are so that breaks can be inserted\n countAA++;\n\n if (frameSeq.length() < 3)\n break;\n String codon = frameSeq.substring(begin,end); // takes one codon at a time\n\n String letter = lookupCodon(codon);\n \n newSeq.append(letter);\n\n begin +=3;\n end +=3;\n\n if ((end > frameSeq.length())||(begin > frameSeq.length()-1)) // reached end of translational sequence\n break;\n else if (countAA == 50) // format the output 50 chars per line\n {\n newSeq.append(\"<BR>\");\n countAA = 0; // reset counter\n }\n }\n \n // returns the sequence in typewriter font (for standard spacing)\n return (\"<TT>\" + newSeq.toString() + \"</TT>\");\n }", "private String[] condicionGeneral(String condicion) {\n String retorno[] = new String[2];\n try {\n String[] simbolos = {\"<=\", \">=\", \"==\", \"!=\", \"<\", \">\"};\n String simbolo = \"0\";\n\n if (condicion.length() > 3) {\n condicion = condicion.substring(1, condicion.length());\n for (int i = 0; i < simbolos.length; i++) {//selecciona el simbolo de la condicion\n if (condicion.contains(simbolos[i])) {\n simbolo = simbolos[i];\n break;\n }\n }\n if (simbolo.equals(\"0\")) {\n retorno[0] = \"0\";\n retorno[1] = \"mala construcción de la sentencia.\";\n } else {\n String var[] = condicion.split(simbolo);\n if (var.length == 2) {\n if (esNumero(var[0])) {\n if (esNumero(var[1])) {\n retorno[0] = \"1\";\n retorno[1] = \"\";\n } else {\n if (var[1].matches(\"[a-zA-Z]*\")) { //comprueba que solo contenga letas \n byte aux = 0;\n\n for (int i = 0; i < codigo.size(); i++) {\n if (var[1].equals(codigo.get(i).toString())) {\n aux++;\n }\n }\n if (aux > 0) {\n retorno[0] = \"1\";\n retorno[1] = \"\";\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"no se reconoce la variable \" + var[1] + \".\";\n }\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"mala construcción de la sentencia.\";\n }\n }\n } else {\n if (var[0].matches(\"[a-zA-Z]*\")) { //comprueba que solo contenga letras \n byte aux = 0;\n for (int i = 0; i < codigo.size(); i++) {\n if (var[0].equals(codigo.get(i).toString())) {\n aux++;\n }\n }\n if (aux > 0) {\n if (esNumero(var[1])) {\n retorno[0] = \"1\";\n retorno[1] = \"\";\n } else {\n if (var[0].matches(\"[a-zA-Z]*\")) { //comprueba que solo contenga letas \n aux = 0;\n\n for (int i = 0; i < codigo.size(); i++) {\n if (var[1].equals(codigo.get(i).toString())) {\n aux++;\n }\n }\n if (aux > 0) {\n retorno[0] = \"1\";\n retorno[1] = \"\";\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"no se reconoce la variable \" + var[1] + \".\";\n }\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"mala construcción de la sentencia.\";\n }\n }\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"no se reconoce la variable \" + var[0] + \".\";\n }\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"mala construcción de la sentencia.\";\n }\n\n }\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"mala construcción de la sentencia.\";\n }\n }\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"mala construcción de la sentencia.\";\n }\n\n\n\n } catch (Exception e) {\n System.out.println(\"Error en condicion \" + e.getClass());\n } finally {\n return retorno;\n }\n }", "static long repeatedString(String s, long n) {\n long l=s.length();\n long k=n/l;\n long r=n%l;\n long count=0;\n long count1=0;\n char ch[]=s.toCharArray();\n for(int t=0;t<ch.length;t++){\n if(ch[t]=='a')\n count1++;\n }\n for(int t=0;t<r;t++){\n if(ch[t]=='a')\n count++;\n }\n return k*count1+count;\n\n }", "@Test\r\n\tpublic void testPositiveGenerateIntegerSequences_3() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tcollector.checkThat(roc.generateIntegerSequences(3, 5, 0, 10, false, 16), notNullValue());\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "@Test\n public void clueFromCodenameShouldReturnSaidCodename()\n {\n String codename = DatabaseHelper.getRandomCodename();\n String[] clues = DatabaseHelper.getCluesForCodename(codename);\n int errors = 0;\n\n for (int i = 0; i < clues.length; i++)\n {\n int index = Arrays.binarySearch(DatabaseHelper.getCodenamesForClue(clues[i]), codename);\n if (!(index >= 0))\n {\n errors++;\n }\n\n }\n\n assertEquals(0, errors);\n }", "@Test\r\n\tpublic void testPositiveGenerateIntegerSequences_2() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tcollector.checkThat(roc.generateIntegerSequences(3, 5, 0, 10, false), notNullValue());\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "private boolean verificarCnpj(String cnpj) {\n return true;\n \n// if (cnpj.length() != 14) {\n// return false;\n// }\n//\n// int soma = 0;\n// int dig = 0;\n//\n// String digitosIniciais = cnpj.substring(0, 12);\n// char[] cnpjCharArray = cnpj.toCharArray();\n//\n// /* Primeira parte da validação */\n// for (int i = 0; i < 4; i++) {\n// if (cnpjCharArray[i] - 48 >= 0 && cnpjCharArray[i] - 48 <= 9) {\n// soma += (cnpjCharArray[i] - 48) * (6 - (i + 1));\n// }\n// }\n//\n// for (int i = 0; i < 8; i++) {\n// if (cnpjCharArray[i + 4] - 48 >= 0 && cnpjCharArray[i + 4] - 48 <= 9) {\n// soma += (cnpjCharArray[i + 4] - 48) * (10 - (i + 1));\n// }\n// }\n//\n// dig = 11 - (soma % 11);\n//\n// digitosIniciais += (dig == 10 || dig == 11) ? \"0\" : Integer.toString(dig);\n//\n// /* Segunda parte da validação */\n// soma = 0;\n//\n// for (int i = 0; i < 5; i++) {\n// if (cnpjCharArray[i] - 48 >= 0 && cnpjCharArray[i] - 48 <= 9) {\n// soma += (cnpjCharArray[i] - 48) * (7 - (i + 1));\n// }\n// }\n//\n// for (int i = 0; i < 8; i++) {\n// soma += (cnpjCharArray[i + 5] - 48) * (10 - (i + 1));\n// }\n//\n// dig = 11 - (soma % 11);\n// digitosIniciais += (dig == 10 || dig == 11) ? \"0\" : Integer.toString(dig);\n\n// return cnpj.equals(digitosIniciais);\n }", "public abstract void mo2153a(CharSequence charSequence);", "@Test(timeout = 4000)\n public void test18() throws Throwable {\n DefaultNucleotideCodec defaultNucleotideCodec0 = DefaultNucleotideCodec.INSTANCE;\n byte[] byteArray0 = new byte[9];\n defaultNucleotideCodec0.toString(byteArray0);\n defaultNucleotideCodec0.decodedLengthOf(byteArray0);\n defaultNucleotideCodec0.decodedLengthOf(byteArray0);\n defaultNucleotideCodec0.getUngappedLength(byteArray0);\n Nucleotide nucleotide0 = Nucleotide.Gap;\n Set<Nucleotide> set0 = nucleotide0.getBasesFor();\n byte[] byteArray1 = defaultNucleotideCodec0.encode((Collection<Nucleotide>) set0);\n DefaultNucleotideCodec defaultNucleotideCodec1 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec1.decode(byteArray0, 0);\n DefaultNucleotideCodec defaultNucleotideCodec2 = DefaultNucleotideCodec.INSTANCE;\n byte[] byteArray2 = defaultNucleotideCodec2.encode((Collection<Nucleotide>) set0);\n DefaultNucleotideCodec defaultNucleotideCodec3 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec3.toString(byteArray1);\n DefaultNucleotideCodec defaultNucleotideCodec4 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec4.isGap(byteArray0, 1553);\n defaultNucleotideCodec0.getNumberOfGapsUntil(byteArray2, (-3166));\n DefaultNucleotideCodec defaultNucleotideCodec5 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec5.isGap(byteArray0, 75);\n DefaultNucleotideCodec defaultNucleotideCodec6 = DefaultNucleotideCodec.INSTANCE;\n byte[] byteArray3 = new byte[0];\n // Undeclared exception!\n try { \n defaultNucleotideCodec6.isGap(byteArray3, (-1));\n fail(\"Expecting exception: BufferUnderflowException\");\n \n } catch(BufferUnderflowException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"java.nio.Buffer\", e);\n }\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n StringReader stringReader0 = new StringReader(\";{\\\"9n/s(2C'#tQX*\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.ReInit(javaCharStream0);\n assertEquals(0, javaCharStream0.getBeginLine());\n }", "static long repeatedString(String s, long n) {\n \t\n \tchar first;\n \tfirst = s.charAt(0);\n \t\n \tint count = 0;\n \tlong[] fill = new long[n];\n \t\n \tfor(int i=1; i<n; i++) {\n \t\tif(first == s.charAt(i)) count++;\n \t}\n \t\n \tlong result = ((n / s.length()) * count) + (n % s.length());\n \treturn result;\n\n }", "public static void main(String[] args) {\n\t\t\t\n\tString str = \"aaabbbddddcccaabd\";\n\t\n\tString RemoveDup = \"\";//to store non-duplicate values of the str\n\t\n\t\n\t\n\tfor(int i = 0; i < str.length(); i++) {\n\t\tif (!RemoveDup.contains(str.substring(i, i+1))) {\n\t\t\tRemoveDup += str.substring(i, i+1);//will concat character from str to RemoveDup\n\t\t}\n\t\t\n\t}\n\tSystem.out.println(RemoveDup);\t\n\t\t\n\t\t\n\t// str = \"aaabbbddddcccaabd\"; RemoveDup = \"abcd\"\n\t//\t\t\t\t\t\t\t\t\t\t j, j+1\n\t\t// result = a5b4c3d5\n\t\t\n\t\tString result = \"\";//store expected result\n\t\t int count = 0;//count the numbers occurred characters\n\t\t\n\t\tfor(int j=0; j < RemoveDup.length(); j++) {\n\t\t for(int i=0; i <str.length(); i++) {\n\t\t\t if(str.substring(i, i+1).equals(RemoveDup.substring(j, j+1))) {\n\t\t\t\t count++;\n\t\t\t }\n\t\t }\n\t\t result += RemoveDup.substring(j, j+1)+count;\n\t\t\n\t\t}\n\t\t System.out.println(result);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "int readRepetitionCount();", "static long repeatedString(String s, long n) {\n char[] arr=s.toCharArray();\n int i,count=0,cnt=0;\n for(i=0;i<arr.length;i++){\n if(arr[i]=='a'){\n count++;\n }\n }\n long len=(n/arr.length)*count;\n long extra=n%arr.length;\n if(extra==0){\n return len;\n }else{\n for(i=0;i<extra;i++){\n if(arr[i]=='a'){\n cnt++;\n }\n }\n return len+cnt;\n }\n\n\n }", "private static void longestRepeatingSubsequence(String string) {\n\t\t\n\t}", "@Override\n\tprotected String getCreateSequenceString(String sequenceName) {\n\t\tsequenceName = sequenceName.replaceFirst(\".*\\\\.\", \"\");\n\t\treturn \"create sequence \" + sequenceName + \" start with 999\";\n\t}", "public static int longestRepeatingSubsequenceNaive(String sequence) {\r\n\t\tint i1 = 0;\r\n\t\tint i2 = 0;\r\n\t\treturn longestRepeatingSubsequenceNaiveHelper(sequence, i1, i2);\r\n\t}", "@Test(timeout = 4000)\n public void test06() throws Throwable {\n String string0 = \"confidences must all have the same length\";\n NucleotideSequence nucleotideSequence0 = mock(NucleotideSequence.class, new ViolatedAssumptionAnswer());\n doReturn(0L).when(nucleotideSequence0).getLength();\n QualitySequence qualitySequence0 = mock(QualitySequence.class, new ViolatedAssumptionAnswer());\n doReturn(0L).when(qualitySequence0).getLength();\n PhdBuilder phdBuilder0 = new PhdBuilder(\"confidences must all have the same length\", nucleotideSequence0, qualitySequence0);\n PhdBuilder phdBuilder1 = phdBuilder0.copy();\n phdBuilder0.build();\n PhdBuilder phdBuilder2 = phdBuilder0.copy();\n LinkedList<PhdReadTag> linkedList0 = new LinkedList<PhdReadTag>();\n PhdBuilder phdBuilder3 = phdBuilder1.readTags(linkedList0);\n phdBuilder3.readTags(linkedList0);\n PhdBuilder phdBuilder4 = phdBuilder0.readTags(linkedList0);\n phdBuilder0.build();\n phdBuilder1.build();\n phdBuilder4.copy();\n phdBuilder0.build();\n phdBuilder2.fakePeaks(908, 908);\n NucleotideSequence nucleotideSequence1 = mock(NucleotideSequence.class, new ViolatedAssumptionAnswer());\n doReturn(0L).when(nucleotideSequence1).getLength();\n QualitySequence qualitySequence1 = mock(QualitySequence.class, new ViolatedAssumptionAnswer());\n ArtificialPhd artificialPhd0 = new ArtificialPhd(\"nil20l,4'/-(tXQZ&X\", nucleotideSequence1, qualitySequence1, 908);\n // Undeclared exception!\n try { \n artificialPhd0.getPositionSequence();\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // initial capacity should be > 0 :0\n //\n verifyException(\"org.jcvi.jillion.internal.core.util.GrowableShortArray\", e);\n }\n }", "public static String encode (String original){\n\n // WRITE YOUR CODE HERE\n String encodeString = new String();\n int n = original.length();\n for (int i = 0; i < n; i++){\n int count = 1;\n while (i < n - 1 && original.charAt(i) == original.charAt(i + 1)){\n count++;\n i++;\n }\n if (count != 1) {\n \tencodeString = encodeString + count;\n }\n encodeString = encodeString + original.charAt(i);\n }\n return encodeString;\n\n }", "@Test\r\n\tpublic void testPositiveGenerateStrings_2() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tcollector.checkThat(roc.generateStrings(10, 5, \"abcd\", false), notNullValue());\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "@Override\n public char[][] buildDnaTable(String[] dna) {\n var table = new char[dna.length][dna.length];\n\n // loop of dna\n for (var row = 0; row < dna.length; row++) {\n char[] rowData = dna[row].toCharArray();\n // validate structured & content\n validateSequenceData(rowData, dna.length);\n table[row] = rowData;\n }\n\n\n return table;\n }", "public void testSimpleGene()\n {\n String dna = \"GTACGTAGATCGGCTATCTAGATAA\";\n System.out.println(\"Without ATG, with TAA\");\n System.out.println(findSimpleGene(dna, \"ATG\", \"TAA\"));\n\n // With ATG, without TAA\n dna = \"GTACGTAGATGGGCTATCTAGATGA\";\n System.out.println(\"With ATG, without TAA\");\n System.out.println(findSimpleGene(dna, \"ATG\", \"TAA\"));\n\n // Without ATG, without TAA\n dna = \"GTACGTAGATCGGCTATCTAGATGA\";\n System.out.println(\"Without ATG, without TAA\");\n System.out.println(findSimpleGene(dna, \"ATG\", \"TAA\"));\n\n // With ATG, with TAA, multiple of 3\n dna = \"gtacgtagatgggctagatctgataagt\";\n System.out.println(\"With ATG, with TAA, multiple of 3\");\n System.out.println(findSimpleGene(dna, \"ATG\", \"TAA\"));\n\n // With ATG, with TAA, not multiple of 3\n dna = \"GTACGTAGATGGGCTATCTAGATAAGT\";\n System.out.println(\"With ATG, with TAA, not multiple of 3\");\n System.out.println(findSimpleGene(dna, \"ATG\", \"TAA\"));\n }", "@Test\n public void aminoCompareTest1(){\n //these list are already sorted\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(c);\n AminoAcidLL second = AminoAcidLL.createFromRNASequence(d);\n int expected = 1;\n assertEquals(expected, first.aminoAcidCompare(second));\n }", "@Test\r\n\tpublic void testPositiveGenerateIntegerSequences_1() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tcollector.checkThat(roc.generateIntegerSequences(3, 5, 0, 10), notNullValue());\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "static void stringConstruction(String s) {\n\n StringBuilder buildUniq = new StringBuilder();\n boolean[] uniqCheck = new boolean[128];\n\n for (int i = 0; i < s.length(); i++) {\n if (!uniqCheck[s.charAt(i)]) {\n uniqCheck[s.charAt(i)] = true;\n if (uniqCheck[s.charAt(i)]){\n buildUniq.append(s.charAt(i));\n }\n }\n }\n String unique=buildUniq.toString();\n int n = unique.length();\n System.out.println(n);\n }", "SpCharInSeq create(@Valid SpCharInSeq spCharInSeq);", "public boolean isCNPJ(String CNPJ) {\n\t\t// considera-se erro CNPJ's formados por uma sequencia de numeros iguais\n if (CNPJ.equals(\"00000000000000\") || CNPJ.equals(\"11111111111111\") ||\n CNPJ.equals(\"22222222222222\") || CNPJ.equals(\"33333333333333\") ||\n CNPJ.equals(\"44444444444444\") || CNPJ.equals(\"55555555555555\") ||\n CNPJ.equals(\"66666666666666\") || CNPJ.equals(\"77777777777777\") ||\n CNPJ.equals(\"88888888888888\") || CNPJ.equals(\"99999999999999\") ||\n (CNPJ.length() != 14))\n return(false);\n\n char dig13, dig14;\n int sm, i, r, num, peso;\n\n// \"try\" - protege o codigo para eventuais erros de conversao de tipo (int)\n try {\n// Calculo do 1o. Digito Verificador\n sm = 0;\n peso = 2;\n for (i=11; i>=0; i--) {\n// converte o i-�simo caractere do CNPJ em um n�mero:\n// por exemplo, transforma o caractere '0' no inteiro 0\n// (48 eh a posi��o de '0' na tabela ASCII)\n num = (int)(CNPJ.charAt(i) - 48);\n sm = sm + (num * peso);\n peso = peso + 1;\n if (peso == 10)\n peso = 2;\n }\n\n r = sm % 11;\n if ((r == 0) || (r == 1))\n dig13 = '0';\n else dig13 = (char)((11-r) + 48);\n\n// Calculo do 2o. Digito Verificador\n sm = 0;\n peso = 2;\n for (i=12; i>=0; i--) {\n num = (int)(CNPJ.charAt(i)- 48);\n sm = sm + (num * peso);\n peso = peso + 1;\n if (peso == 10)\n peso = 2;\n }\n\n r = sm % 11;\n if ((r == 0) || (r == 1))\n dig14 = '0';\n else dig14 = (char)((11-r) + 48);\n\n// Verifica se os d�gitos calculados conferem com os d�gitos informados.\n if ((dig13 == CNPJ.charAt(12)) && (dig14 == CNPJ.charAt(13)))\n return(true);\n else return(false);\n } catch (InputMismatchException erro) {\n return(false);\n }\n\t}", "@Test(timeout = 4000)\n public void test161() throws Throwable {\n StringReader stringReader0 = new StringReader(\"...\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 62, 62);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(2, javaCharStream0.bufpos);\n assertEquals(62, javaCharStream0.getLine());\n }", "public void testNmCode() throws Exception {\n String nmCode = \"E1-541-392740-1-img.E1-543-392740-1-a.E1-4-DengLu-1-a.E1-38-red&ChaDian-1-a.UT-601-392740-2*2-a\";\r\n //Pattern p = Pattern.compile(\"\\\\w+-(?:543|601)-(\\\\w+)-(\\\\d+(\\\\*\\\\d+)?)-\\\\w+\\\\.?\");\r\n Pattern p = Pattern.compile(\"(\\\\w+)-(\\\\w+)-(\\\\w+)-(\\\\d+(\\\\*\\\\d+)?)-\\\\w+\\\\.?\");\r\n //Pattern p = Pattern.compile(\".+-(?:639|640)-(\\\\w+)-(\\\\d+(\\\\*\\\\d+)?)-.*\");\r\n Matcher m = p.matcher(nmCode);\r\n while (m.find()) {\r\n p(m.group(1) + \",\" + m.group(2) + \",\" + m.group(3));\r\n }\r\n }", "@Test(timeout = 4000)\n public void test139() throws Throwable {\n StringReader stringReader0 = new StringReader(\"NXMnbm>`7-o(jz g3N\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n char[] charArray0 = new char[7];\n stringReader0.read(charArray0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals(\"7\", token0.toString());\n }", "@Test\r\n\tpublic void testPositiveGenerateIntegerSequences_6() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tcollector.checkThat(roc.generateIntegerSequences(4, LENGTH, MIN, MAX), notNullValue());\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "static long repeatedString(String s, long n) {\n long a_count = 0;\n long total_a_count = 0;\n long modulo_s = 0;\n\n if(n>s.length()){\n for (int i=0; i<s.length(); i++)\n if(s.charAt(i)=='a') a_count++;\n\n total_a_count = a_count*(n/s.length());\n modulo_s = n%s.length();\n\n for (int i=0; i<modulo_s; i++)\n if(s.charAt(i)=='a') total_a_count++;\n\n return total_a_count;\n }\n\n else {\n for (int i=0; i<n; i++)\n if(s.charAt(i)=='a') a_count++;\n return a_count;\n }\n }", "public static void main(String[] args) throws Exception {\n String patronA = \"[0-5]\";\n\n // conjunto de letras de \"a\" a \"c\"\n String patronB = \"[a-c]\";\n\n // conjunto de todas las letras minusculas\n String patronC = \"[a-z]\";\n\n // conjunto de numeros\n String patronD = \"[0-9]\";\n\n // ejemplo con tipo de dato string\n String textoAlfanumerico = \"0123aaaa\";\n System.out.println(\"Texto alfanumerico:\" + textoAlfanumerico);\n\n String replace1 = textoAlfanumerico.replaceAll(patronA, \"X\");\n System.out.println(\"Reemplazo de numeros con X: \" + replace1);\n\n String replace2 = textoAlfanumerico.replaceAll(patronB, \"X\");\n System.out.println(\"Reemplazo de letras con X: \" + replace2);\n\n\n //[0-5][a-c];\n //String patronComplejo = patronA + patronB;\n\n //[a-c]*[0-5]*\n //String patronComplejo = patronA + \"*\" + patronB + \"*\";\n\n //\"[a-z]+\"\n\n // + = una coincidencia\n // * = ninguna o muchas\n\n //String patronComplejo = \"(\" + patronA + patronC + \")+\";\n String patronComplejo = \"(\" + patronC + \")+\";\n\n String texto = \"hola, aacc este bbcc es mi 55222aaa texto 2663aaaa blah blah\";\n System.out.println(\"patron complejo:\" + patronComplejo);\n System.out.println(texto);\n\n Pattern pattern = Pattern.compile(patronComplejo);\n Matcher matcher = pattern.matcher(texto);\n\n // buscar ocurrencias\n while (matcher.find()) {\n System.out.println(\"Encontrado:\" + matcher.group());\n }\n\n\n }", "@Test\n public void validCodenameShouldReturnClues()\n {\n String codename = DatabaseHelper.getRandomCodename();\n assertTrue(DatabaseHelper.getCluesForCodename(codename).length > 0);\n }", "@Test\r\n\tpublic void testPositiveGenerateStrings_1() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tcollector.checkThat(roc.generateStrings(10, 5, \"abcd\"), notNullValue());\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "public boolean canConstruct(String ransomNote, String magazine) {\n int[] count = new int[26];\n System.out.println(Arrays.toString(count));\n for (char ch : magazine.toCharArray()) {\n count[(int) ch - (int) 'a'] += 1;\n }\n System.out.println(Arrays.toString(count));\n for (char ch : ransomNote.toCharArray()) {\n count[(int) ch - (int) 'a'] -= 1;\n }\n System.out.println(Arrays.toString(count));\n for (int i : count) {\n if (i < 0)\n return false;\n }\n return true;\n }", "@Test(timeout = 4000)\n public void test101() throws Throwable {\n StringReader stringReader0 = new StringReader(\"q,rv8PAfKjbSw`H(r\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n char[] charArray0 = new char[8];\n stringReader0.read(charArray0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(3, javaCharStream0.bufpos);\n assertEquals(74, token0.kind);\n }", "private boolean matchSequences ( String sequence1, String sequence2 )\n{\n int matches = 0;\n\n // Check for sequences with less than 20 characters.\n if ( ( sequence1.length () <= 20 ) ||\n ( sequence2.length () <= 20 ) )\n {\n return sequence1.equalsIgnoreCase ( sequence2 );\n } // if\n\n // Count the matching bases in the first 20 characters.\n for ( int i = 0; i < 20; i++ )\n\n // Count the matching characters (but not N bases).\n if ( ( sequence1.charAt ( i ) == sequence2.charAt ( i ) ) &&\n ( sequence1.charAt ( i ) != 'x' ) &&\n ( sequence1.charAt ( i ) != 'n' ) )\n\n matches++;\n\n // Check for 90% identity (18/20) for a valid match\n if ( matches >= 18 ) return true;\n return false;\n}", "public Sequence nextSequence(Alphabet alphabet) throws IOException{\t\t\t \t\t\t\t\n\t\t\t//array to hold indexes of nucleotides\n\t\t\tif (alphabet == null){\n\t\t\t\talphabet = Alphabet.DNA16();//The most conservative\n\t\t\t}\n\n\t\t\tStringBuilder header = new StringBuilder();\n\n\t\t\tseqIndex = 0;//the number of nucletiodes read\t\t\n\t\t\tif (pos >= count){\n\t\t\t\tcount = in.read(buff);\n\t\t\t\tpos = 0;\n\t\t\t}\n\t\t\t//No more in the stream\n\t\t\tif (count <=0 ) return null;\n\n\t\t\tif (buff[pos++] != 62){// 62 = '>'\n\t\t\t\tpos --;\n\t\t\t\tthrow new RuntimeException(\"> is expected at the start of Fasta No \" + seqNo);\n\t\t\t}\n\n\t\t\tboolean seqMode = false; \n\n\t\t\tfor (;;){\n\t\t\t\t//make sure there is something in the buffer\n\t\t\t\t//this could be replaced with nextByte()\n\t\t\t\tif (pos >= count){\n\t\t\t\t\tcount = in.read(buff);\n\t\t\t\t\tif (count <= 0) break;//no more to read\n\t\t\t\t\tpos = 0;\n\t\t\t\t}\n\t\t\t\t//process buffer\n\t\t\t\twhile (pos < count){\n\t\t\t\t\tbyte currentByte = buff[pos++];\t\t\t\t\n\n\t\t\t\t\tif (seqMode){//reading header\n\t\t\t\t\t\t//reading sequence\t\t\t\t\t\n\t\t\t\t\t\tbyte nucleotide = alphabet.byte2index(currentByte);\n\t\t\t\t\t\t//assert nucleotide < dna.size()\n\t\t\t\t\t\tif (nucleotide >= 0){\n\t\t\t\t\t\t\tif (seqIndex >= seq.length) {// Full\n\t\t\t\t\t\t\t\tint newLength = seq.length * 2;\n\t\t\t\t\t\t\t\tif (newLength < 0) {\n\t\t\t\t\t\t\t\t\tnewLength = Integer.MAX_VALUE;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// if the array is extended\n\t\t\t\t\t\t\t\tif (newLength <= seqIndex) {\n\t\t\t\t\t\t\t\t\t// in.close();\n\t\t\t\t\t\t\t\t\tthrow new RuntimeException(\n\t\t\t\t\t\t\t\t\t\t\t\"Sequence is too long to handle\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// create new array of byte\n\t\t\t\t\t\t\t\tseq = Arrays.copyOf(seq, newLength);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tseq[seqIndex++] = nucleotide;\n\t\t\t\t\t\t\t//seqIndex++;\t\t\t\t\t\n\t\t\t\t\t\t}else if(currentByte == 62){\n\t\t\t\t\t\t\t//start of a new sequence\n\t\t\t\t\t\t\tpos --;\n\t\t\t\t\t\t\tseqNo ++;\n\t\t\t\t\t\t\treturn new Sequence(alphabet, seq, seqIndex, header.toString());\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tif (nucleotide == -1){\n\t\t\t\t\t\t\t\tthrow new RuntimeException(\"Unexecpected character '\" + (char) currentByte + \"' for dna {\" + alphabet + \"} for sequence \" + seqNo);\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}//mode == 0\n\t\t\t\t\telse{\n\t\t\t\t\t\tif (currentByte == 10 ){//CR \n\t\t\t\t\t\t\tseqMode = true;\n\t\t\t\t\t\t\t//\t\t\t\t\t\tlineNo ++;\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}else if (currentByte == 13){//LF\n\t\t\t\t\t\t\tseqMode = true;\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\theader.append((char) currentByte);\n\t\t\t\t\t}\n\t\t\t\t}//while\t\t\t\t\t\n\t\t\t}//for\n\t\t\tseqNo ++;\n\t\t\treturn new Sequence(alphabet, seq, seqIndex, header.toString());\n\t\t}" ]
[ "0.5956345", "0.5849933", "0.57949096", "0.5786242", "0.5766592", "0.57316786", "0.5698466", "0.5686408", "0.5673016", "0.5666142", "0.5649741", "0.564798", "0.56158626", "0.5613893", "0.5562133", "0.5536902", "0.5524142", "0.55085766", "0.5473711", "0.54443115", "0.5437689", "0.5403479", "0.5367261", "0.5308502", "0.5271596", "0.52387834", "0.5237523", "0.52309483", "0.5184027", "0.5172674", "0.51308197", "0.5121469", "0.51192975", "0.5117972", "0.51077986", "0.51008534", "0.5100381", "0.5098983", "0.50931185", "0.50896", "0.50851756", "0.50720215", "0.5052538", "0.5044866", "0.5035144", "0.503447", "0.5025166", "0.50187564", "0.4998652", "0.4986125", "0.4947997", "0.49418694", "0.49384728", "0.4919517", "0.4917955", "0.49036455", "0.4900801", "0.4898884", "0.4896408", "0.48856634", "0.48786598", "0.48751345", "0.4874783", "0.48726478", "0.4868278", "0.4865456", "0.48618546", "0.4843335", "0.48394525", "0.48364264", "0.48176003", "0.4816544", "0.481229", "0.4810237", "0.47986296", "0.4790952", "0.47878054", "0.47857594", "0.4783405", "0.477803", "0.47748178", "0.47728464", "0.47702497", "0.47653827", "0.47642642", "0.47516873", "0.4751677", "0.47451", "0.4742515", "0.47309342", "0.4719979", "0.4715375", "0.47027278", "0.4697354", "0.46949437", "0.46941987", "0.46877775", "0.46802485", "0.46761242", "0.46728432" ]
0.57620865
5
/TEST 2 INPUT: "UAUAGCGUGUUUUAUUGAUCUUGC" EXPECTED OUTPUT = T, S, V, F ACTUAL OUTPUT = T, S, V, F With a string that has a STOP codon to check the condition on createFromRNASequence that stops the creation of codons even if there are more codons in front of the stop.
@Test public void rnatest2(){ AminoAcidLL first = AminoAcidLL.createFromRNASequence(b); char[] firstArr = new char[4]; char[] answer = {'T','S', 'V', 'F'}; for(int i = 0; i < firstArr.length; i++){ firstArr[i] = first.aminoAcid; System.out.println(first.aminoAcid); first = first.next; } assertArrayEquals(answer,firstArr); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int findStopCodon(String sequentie,int start){\n\t for(int i = start; i+3<sequentie.length();i+=3){\n\t if(sequentie.substring(i,i+3).contains(\"TAG\")||sequentie.substring(i,i+3).contains(\"TAA\")||sequentie.substring(i,i+3).contains(\"TGA\")){\n\t return i+3;\n\t }\n\t }\n\t return -1;\n }", "private void handleNonFrameShiftCaseStartsWithNoStopCodon() {\n\t\t\tif (aaChange.getPos() == 0) {\n\t\t\t\t// The mutation affects the start codon, is start loss (in the case of keeping the start codon\n\t\t\t\t// intact, we would have jumped into a shifted duplication case earlier.\n\t\t\t\tproteinChange = ProteinMiscChange.build(true, ProteinMiscChangeType.NO_PROTEIN);\n\t\t\t\tvarTypes.add(VariantEffect.START_LOST);\n\t\t\t\tvarTypes.add(VariantEffect.INFRAME_INSERTION);\n\t\t\t} else {\n\t\t\t\t// The start codon is not affected. Since it is a non-FS insertion, the stop codon cannot be\n\t\t\t\t// affected.\n\t\t\t\tif (varAAStopPos == varAAInsertPos) {\n\t\t\t\t\t// The insertion directly starts with a stop codon, is stop gain.\n\t\t\t\t\tproteinChange = ProteinSubstitution.build(true, toString(wtAASeq.charAt(varAAInsertPos)),\n\t\t\t\t\t\tvarAAInsertPos, \"*\");\n\t\t\t\t\tvarTypes.add(VariantEffect.STOP_GAINED);\n\n\t\t\t\t\t// Differentiate the case of disruptive and non-disruptive insertions.\n\t\t\t\t\tif (insertPos.getPos() % 3 == 0)\n\t\t\t\t\t\tvarTypes.add(VariantEffect.INFRAME_INSERTION);\n\t\t\t\t\telse\n\t\t\t\t\t\tvarTypes.add(VariantEffect.DISRUPTIVE_INFRAME_INSERTION);\n\t\t\t\t} else {\n\t\t\t\t\tif (varAAStopPos != -1 && wtAAStopPos != -1\n\t\t\t\t\t\t&& varAASeq.length() - varAAStopPos != wtAASeq.length() - wtAAStopPos) {\n\t\t\t\t\t\t// The insertion does not directly start with a stop codon but the insertion leads to a stop\n\t\t\t\t\t\t// codon in the affected amino acids. This leads to an \"delins\" protein annotation.\n\t\t\t\t\t\tproteinChange = ProteinIndel.buildWithSeqDescription(true,\n\t\t\t\t\t\t\ttoString(wtAASeq.charAt(varAAInsertPos)), varAAInsertPos,\n\t\t\t\t\t\t\ttoString(wtAASeq.charAt(varAAInsertPos + 1)), varAAInsertPos + 1,\n\t\t\t\t\t\t\tnew ProteinSeqDescription(),\n\t\t\t\t\t\t\tnew ProteinSeqDescription(varAASeq.substring(varAAInsertPos, varAAStopPos)));\n\t\t\t\t\t\tvarTypes.add(VariantEffect.STOP_GAINED);\n\n\t\t\t\t\t\taddNonFrameshiftInsertionEffect();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// The changes on the amino acid level do not lead to a new stop codon, is non-FS insertion.\n\n\t\t\t\t\t\t// Differentiate the ins and the delins case.\n\t\t\t\t\t\tif (aaChange.getRef().equals(\"\")) {\n\t\t\t\t\t\t\t// Clean insertion.\n\t\t\t\t\t\t\tif (DuplicationChecker.isDuplication(wtAASeq, aaChange.getAlt(), varAAInsertPos)) {\n\t\t\t\t\t\t\t\t// We have a duplication, can only be duplication of AAs to the left because of\n\t\t\t\t\t\t\t\t// normalization in CDSExonicAnnotationBuilder constructor.\n\t\t\t\t\t\t\t\tif (aaChange.getAlt().length() == 1) {\n\t\t\t\t\t\t\t\t\tproteinChange = ProteinDuplication.buildWithSeqDescription(true,\n\t\t\t\t\t\t\t\t\t\ttoString(wtAASeq.charAt(varAAInsertPos - 1)), varAAInsertPos - 1,\n\t\t\t\t\t\t\t\t\t\ttoString(wtAASeq.charAt(varAAInsertPos - 1)), varAAInsertPos - 1,\n\t\t\t\t\t\t\t\t\t\tnew ProteinSeqDescription());\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tproteinChange = ProteinDuplication.buildWithSeqDescription(true,\n\t\t\t\t\t\t\t\t\t\ttoString(wtAASeq.charAt(varAAInsertPos - aaChange.getAlt().length())),\n\t\t\t\t\t\t\t\t\t\tvarAAInsertPos - aaChange.getAlt().length(),\n\t\t\t\t\t\t\t\t\t\ttoString(wtAASeq.charAt(varAAInsertPos - 1)), varAAInsertPos - 1,\n\t\t\t\t\t\t\t\t\t\tnew ProteinSeqDescription());\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\taddNonFrameshiftInsertionEffect();\n\t\t\t\t\t\t\t\tvarTypes.add(VariantEffect.DIRECT_TANDEM_DUPLICATION);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// We have a simple insertion.\n\t\t\t\t\t\t\t\tproteinChange = ProteinInsertion.buildWithSequence(true,\n\t\t\t\t\t\t\t\t\ttoString(wtAASeq.charAt(varAAInsertPos - 1)), varAAInsertPos - 1,\n\t\t\t\t\t\t\t\t\ttoString(wtAASeq.charAt(varAAInsertPos)), varAAInsertPos, aaChange.getAlt());\n\n\t\t\t\t\t\t\t\taddNonFrameshiftInsertionEffect();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// The delins/substitution case.\n\t\t\t\t\t\t\tproteinChange = ProteinIndel.buildWithSeqDescription(true, aaChange.getRef(),\n\t\t\t\t\t\t\t\tvarAAInsertPos, aaChange.getRef(), varAAInsertPos, new ProteinSeqDescription(),\n\t\t\t\t\t\t\t\tnew ProteinSeqDescription(aaChange.getAlt()));\n\t\t\t\t\t\t\taddNonFrameshiftInsertionEffect();\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}", "private void handleNonFrameShiftCaseStartsWithStopCodon() {\n\t\t\tif (varAAStopPos == 0) {\n\t\t\t\t// varAA starts with a stop codon\n\t\t\t\tproteinChange = ProteinMiscChange.build(true, ProteinMiscChangeType.NO_CHANGE);\n\t\t\t\tvarTypes.add(VariantEffect.SYNONYMOUS_VARIANT);\n\t\t\t} else if (varAAStopPos > 0) {\n\t\t\t\t// varAA contains a stop codon\n\t\t\t\tproteinChange = ProteinExtension.build(true, \"*\", aaChange.getPos(),\n\t\t\t\t\ttoString(varAASeq.charAt(aaChange.getPos())), (varAAStopPos - aaChange.getPos()));\n\t\t\t\t// last is stop codon AA pos\n\t\t\t\tvarTypes.add(VariantEffect.STOP_LOST);\n\t\t\t} else {\n\t\t\t\t// varAA contains no stop codon\n\t\t\t\tproteinChange = ProteinExtension.buildWithoutTerminal(true, toString(wtAASeq.charAt(aaChange.getPos())),\n\t\t\t\t\taaChange.getPos(), toString(varAASeq.charAt(aaChange.getPos())));\n\t\t\t\tvarTypes.add(VariantEffect.STOP_LOST);\n\t\t\t}\n\t\t}", "private void handleFrameShiftCaseWTStartWithStopCodon() {\n\t\t\tif (varAAStopPos == varAAInsertPos) {\n\t\t\t\t// The variant peptide also starts with a stop codon, is synonymous frameshift insertion.\n\t\t\t\tproteinChange = ProteinMiscChange.build(true, ProteinMiscChangeType.NO_CHANGE);\n\t\t\t\tvarTypes.add(VariantEffect.SYNONYMOUS_VARIANT);\n\t\t\t} else if (varAAStopPos > varAAInsertPos) {\n\t\t\t\t// The variant peptide contains a stop codon but does not start with it, is frameshift insertion. In\n\t\t\t\t// this case we cannot really differentiate this from a non-frameshift insertion but we still call\n\t\t\t\t// it so.\n\t\t\t\tproteinChange = ProteinExtension.build(true, \"*\", varAAInsertPos,\n\t\t\t\t\ttoString(varAASeq.charAt(varAAInsertPos)), (varAAStopPos - varAAInsertPos));\n\t\t\t\tvarTypes.add(VariantEffect.FRAMESHIFT_ELONGATION);\n\t\t\t} else {\n\t\t\t\t// The variant AA does not contain a stop codon, is stop loss.\n\t\t\t\tproteinChange = ProteinFrameshift.buildWithoutTerminal(true, toString(varAASeq.charAt(varAAInsertPos)),\n\t\t\t\t\tvarAAInsertPos, toString(varAASeq.charAt(varAAInsertPos)));\n\t\t\t\tvarTypes.add(VariantEffect.STOP_LOST);\n\t\t\t}\n\t\t}", "private boolean handleInsertionAtEndInCaseOfNoStopCodon() {\n\t\t\t// TODO(holtgrew): At some point, try to merge these corner cases that are caused by bogus transcript\n\t\t\t// entries into the main cases or decide to ignore these bad cases.\n\n\t\t\t// Return false if this is not the case this function deals with.\n\t\t\tif (varAAInsertPos != wtAASeq.length() || wtAAStopPos != -1)\n\t\t\t\treturn false;\n\n\t\t\t// TODO(holtgrew): Check for duplication? This is a very rare corner case with bogus transcript.\n\t\t\t// TODO(holtgrew): This is wrong.\n\t\t\tproteinChange = ProteinInsertion.buildWithSequence(true, toString(wtAASeq.charAt(varAAInsertPos - 1)),\n\t\t\t\tvarAAInsertPos, toString(wtAASeq.charAt(varAAInsertPos - 1)), varAAInsertPos,\n\t\t\t\tvarAASeq.substring(varAAInsertPos - 1, varAASeq.length()));\n\t\t\tif (varAAStopPos != -1)\n\t\t\t\tvarTypes.add(VariantEffect.STOP_GAINED);\n\t\t\tvarTypes.add(VariantEffect.INFRAME_INSERTION);\n\n\t\t\treturn true;\n\t\t}", "@Test\n public void subSequencesTest3() {\n String text = \"wnylazlzeqntfpwtsmabjqinaweaocfewgpsrmyluadlybfgaltgljrlzaaxvjehhygggdsrygvnjmpyklvyilykdrphepbfgdspjtaap\"\n + \"sxrpayholutqfxstptffbcrkxvvjhorawfwaejxlgafilmzrywpfxjgaltdhjvjgtyguretajegpyirpxfpagodmzrhstrxjrpirlbfgkhhce\"\n + \"wgpsrvtuvlvepmwkpaeqlstaqolmsvjwnegmzafoslaaohalvwfkttfxdrphepqobqzdqnytagtrhspnmprtfnhmsrmznplrcijrosnrlwgds\"\n + \"bylapqgemyxeaeucgulwbajrkvowsrhxvngtahmaphhcyjrmielvqbbqinawepsxrewgpsrqtfqpveltkfkqiymwtqssqxvchoilmwkpzermw\"\n + \"eokiraluaammkwkownrawpedhcklrthtftfnjmtfbftazsclmtcssrlluwhxahjeagpmgvfpceggluadlybfgaltznlgdwsglfbpqepmsvjha\"\n + \"lwsnnsajlgiafyahezkbilxfthwsflgkiwgfmtrawtfxjbbhhcfsyocirbkhjziixdlpcbcthywwnrxpgvcropzvyvapxdrogcmfebjhhsllu\"\n + \"aqrwilnjolwllzwmncxvgkhrwlwiafajvgzxwnymabjgodfsclwneltrpkecguvlvepmwkponbidnebtcqlyahtckk\";\n\n String[] expected = new String[6];\n expected[0] = \"wlfaafrdarvgypipgaputcjflmftgepfmrrhpvwllnfofdqqtmhnjlyeewvxhceqpgftysopelkrhhjtmlapcagllpasazflfthohdtrrvobliwnhazafeevpnlk\";\n expected[1] = \"nzpbwemllljggylhdaatprhwgzxdttypzxlhslksmeohkronrpmprwlmubovmylispqkmqizouwactmatlhmedagfmlafktgmfhcjlhxoagjullcrfxbslceoeyk\";\n expected[2] = \"yewjewyytzegvkyespyqtkoaarjhyaiarjbcrvptsgsatpbyhrslogaycawnajvnxspfwxlekakwkftzcujgglldbswjybhktxcizpypppchanlxwawjctgpnba\";\n expected[3] = \"lqtqaglbgahdnlkppshffxrefygjgjrghrfeveaavmllthqtstrrsdpxgjsgprqarrvktvmriaopltfsswevgytwpvslaiwirjfricwgzxmhqjzvljnglrumbth\";\n expected[4] = \"ansiopuflahsjvdbjxoxfvajiwavuepospgwtpeqjzavfezapfmcnsqeurrthmbweqeqqcwmrmwerfbcshaflbzsqjnghlswabsbibwvvdfsrowgwvyowpvwict\";\n expected[5] = \"ztmncsagjxyrmyrftrlsbvwxlpljrgxdtikgumqowaawxpdgnnzirbgalkhahibewtlishkwamndtnflrxgpufngehniexfgwbykxcncyrelwlmkigmdnklkdqc\";\n int keyLen = 6;\n String[] owns = this.ic.subSequences(text, keyLen);\n for (int i = 0; i < expected.length; i++) {\n assertEquals(expected[i], owns[i]);\n }\n }", "@Test\n public void subSequencesTest2() {\n String text = \"hashco\"\n + \"llisio\"\n + \"nsarep\"\n + \"ractic\"\n + \"allyun\"\n + \"avoida\"\n + \"blewhe\"\n + \"nhashi\"\n + \"ngaran\"\n + \"domsub\"\n + \"setofa\"\n + \"larges\"\n + \"etofpo\"\n + \"ssible\"\n + \"keys\";\n\n String[] expected = new String[6];\n expected[0] = \"hlnraabnndslesk\";\n expected[1] = \"alsalvlhgoeatse\";\n expected[2] = \"siacloeaamtroiy\";\n expected[3] = \"hsrtyiwsrsogfbs\";\n expected[4] = \"cieiudhhaufepl\";\n expected[5] = \"oopcnaeinbasoe\";\n String[] owns = this.ic.subSequences(text, 6);\n for (int i = 0; i < expected.length; i++) {\n assertEquals(expected[i], owns[i]);\n }\n }", "private void handleFrameShiftCaseWTStartsWithNoStopCodon() {\n\t\t\tif (varAAInsertPos == 0) {\n\t\t\t\t// The mutation affects the start codon, is start loss.\n\t\t\t\tproteinChange = ProteinMiscChange.build(true, ProteinMiscChangeType.NO_PROTEIN);\n\t\t\t\tvarTypes.add(VariantEffect.START_LOST);\n\t\t\t} else {\n\t\t\t\t// The start codon is not affected.\n\t\t\t\tif (varAAStopPos == varAAInsertPos) {\n\t\t\t\t\t// The insertion directly creates a stop codon, is stop gain.\n\t\t\t\t\tproteinChange = ProteinSubstitution.build(true, toString(wtAASeq.charAt(varAAInsertPos)),\n\t\t\t\t\t\tvarAAInsertPos, \"*\");\n\t\t\t\t\tvarTypes.add(VariantEffect.STOP_GAINED);\n\t\t\t\t} else if (varAAStopPos > varAAInsertPos) {\n\t\t\t\t\t// The insertion is a frameshift variant that leads to a transcript still having a stop codon,\n\t\t\t\t\t// simple frameshift insertion.\n\t\t\t\t\tproteinChange = ProteinFrameshift.build(true, toString(wtAASeq.charAt(varAAInsertPos)),\n\t\t\t\t\t\tvarAAInsertPos, toString(varAASeq.charAt(varAAInsertPos)),\n\t\t\t\t\t\t(varAAStopPos + 1 - varAAInsertPos));\n\n\t\t\t\t\tif (varAASeq.length() > wtAASeq.length())\n\t\t\t\t\t\tvarTypes.add(VariantEffect.FRAMESHIFT_ELONGATION);\n\t\t\t\t\telse if (varAASeq.length() < wtAASeq.length())\n\t\t\t\t\t\tvarTypes.add(VariantEffect.FRAMESHIFT_TRUNCATION);\n\t\t\t\t\telse\n\t\t\t\t\t\tvarTypes.add(VariantEffect.FRAMESHIFT_VARIANT);\n\t\t\t\t} else {\n\t\t\t\t\t// The insertion is a frameshift variant that leads to the loss of the stop codon, we mark this as\n\t\t\t\t\t// frameshift elongation and the \"fs*?\" indicates that the stop codon is lost.\n\t\t\t\t\tproteinChange = ProteinFrameshift.buildWithoutTerminal(true,\n\t\t\t\t\t\ttoString(wtAASeq.charAt(varAAInsertPos)), varAAInsertPos,\n\t\t\t\t\t\ttoString(varAASeq.charAt(varAAInsertPos)));\n\t\t\t\t\tvarTypes.add(VariantEffect.FRAMESHIFT_ELONGATION);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "@Test\n\tpublic void testForwardStopLoss() throws InvalidGenomeChange {\n\t\tGenomeChange change1 = new GenomeChange(new GenomePosition(refDict, '+', 1, 6649271, PositionType.ZERO_BASED),\n\t\t\t\t\"ACG\", \"CGTT\");\n\t\t// Note that the transcript here differs to the one Mutalyzer uses after the CDS.\n\t\tAnnotation annotation1 = new BlockSubstitutionAnnotationBuilder(infoForward, change1).build();\n\t\tAssert.assertEquals(infoForward.accession, annotation1.transcript.accession);\n\t\tAssert.assertEquals(10, annotation1.annoLoc.rank);\n\t\tAssert.assertEquals(\"c.2067_*2delinsCGTT\", annotation1.ntHGVSDescription);\n\t\tAssert.assertEquals(\"p.*689Tyrext*25\", annotation1.aaHGVSDescription);\n\t\tAssert.assertEquals(ImmutableSortedSet.of(VariantType.NON_FS_SUBSTITUTION, VariantType.STOPLOSS),\n\t\t\t\tannotation1.effects);\n\n\t\t// Replace stop codon by 6 nucleotides, non-frameshift case.\n\t\tGenomeChange change2 = new GenomeChange(new GenomePosition(refDict, '+', 1, 6649270, PositionType.ZERO_BASED),\n\t\t\t\t\"ACT\", \"CGGTCG\");\n\t\tAnnotation annotation2 = new BlockSubstitutionAnnotationBuilder(infoForward, change2).build();\n\t\tAssert.assertEquals(infoForward.accession, annotation2.transcript.accession);\n\t\tAssert.assertEquals(10, annotation2.annoLoc.rank);\n\t\tAssert.assertEquals(\"c.2066_*1delinsCGGTCG\", annotation2.ntHGVSDescription);\n\t\tAssert.assertEquals(\"p.*689Serext*17\", annotation2.aaHGVSDescription);\n\t\t// Note that the transcript here differs to the one Mutalyzer uses after the CDS.\n\t\tAssert.assertEquals(ImmutableSortedSet.of(VariantType.FS_SUBSTITUTION, VariantType.STOPLOSS),\n\t\t\t\tannotation2.effects);\n\n\t\t// Delete first base of stop codon, leads to complete loss.\n\t\tGenomeChange change3 = new GenomeChange(new GenomePosition(refDict, '+', 1, 6649269, PositionType.ZERO_BASED),\n\t\t\t\t\"ACG\", \"CGGT\");\n\t\tAnnotation annotation3 = new BlockSubstitutionAnnotationBuilder(infoForward, change3).build();\n\t\tAssert.assertEquals(infoForward.accession, annotation3.transcript.accession);\n\t\tAssert.assertEquals(10, annotation3.annoLoc.rank);\n\t\tAssert.assertEquals(\"c.2065_2067delinsCGGT\", annotation3.ntHGVSDescription);\n\t\tAssert.assertEquals(\"p.*689Argext*16\", annotation3.aaHGVSDescription);\n\t\t// Note that the transcript here differs to the one Mutalyzer uses after the CDS.\n\t\tAssert.assertEquals(ImmutableSortedSet.of(VariantType.FS_SUBSTITUTION, VariantType.STOPLOSS),\n\t\t\t\tannotation3.effects);\n\t}", "@Test\n public void subSequencesTest1() {\n String text = \"crypt\"\n + \"ograp\"\n + \"hyand\"\n + \"crypt\"\n + \"analy\"\n + \"sis\";\n\n String[] expected = new String[5];\n expected[0] = \"cohcas\";\n expected[1] = \"rgyrni\";\n expected[2] = \"yrayas\";\n expected[3] = \"panpl\";\n expected[4] = \"tpdty\";\n String[] owns = this.ic.subSequences(text, 5);\n for (int i = 0; i < expected.length; i++) {\n assertEquals(expected[i], owns[i]);\n }\n }", "@Test\n\tpublic void testP2(){\n\t\tList<Token> list = pa.getTokens(str);\n\t\tSystem.out.println(\">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\");\n\t\tfor(Token t : list){\n\t\t\tSystem.out.println(t.toString());\n\t\t}\n\t\tSystem.out.println(\"<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\");\n\t\tboolean a = false;\n\t\ttry {\n\t\t\ta = pa.runSentence(str,null);\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\tSystem.out.println(\"end res : \"+a);\n\t}", "public static int Main()\n\t{\n\t\tint len;\n\t\tint i;\n\t\tint j;\n\t\tint p;\n\t\tint l;\n\t\tMain_str = new Scanner(System.in).nextLine();\n\t\tfor (len = 0;Main_str.charAt(len) != '\\0';len++)\n\t\t{\n\t\t\t;\n\t\t}\n\t\tfor (l = 2;l <= len;l++)\n\t\t{\n\t\t\tfor (i = 0;i <= len - l;i++)\n\t\t\t{\n\t\t\t\tfor (j = 0;j < l / 2;j++)\n\t\t\t\t{\n\t\t\t\t\tif (Main_str.charAt(i + j) != Main_str.charAt(i + l - 1 - j))\n\t\t\t\t\t{\n//C++ TO JAVA CONVERTER TODO TASK: There are no gotos or labels in Java:\n\t\t\t\t\t\tgoto here;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\tfor (p = i;p < i + l;p++)\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.printf(\"%c\",Main_str.charAt(p));\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.print(\"\\n\");\n//C++ TO JAVA CONVERTER TODO TASK: There are no gotos or labels in Java:\n\t\t\t\t\there:\n\t\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\treturn 0;\n\t}", "public int findStopCodon(String dna,int startIndex,String stopCodon)\n {\n\n int currindex=dna.indexOf(stopCodon,startIndex+3);\n\n while(currindex!=-1) {\n int diff=currindex-startIndex;\n\n if (diff% 3== 0)\n return currindex;\n else\n currindex=dna.indexOf(stopCodon,currindex+2);\n }\n\n return dna.length();\n }", "public static int findStopCodon(String dnaStr, int startIndex, String stopCodon) {\n\t\tint currIndex = dnaStr.indexOf(stopCodon, startIndex + 3);\r\n\t\twhile (currIndex != -1) {\r\n\t\t\tint diff = currIndex - startIndex;\r\n\t\t\tif (diff % 3 == 0) {\r\n\t\t\t\treturn currIndex;\r\n\t\t\t} else {\r\n\t\t\t\tcurrIndex = dnaStr.indexOf(stopCodon, currIndex + 1);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn -1;\r\n\t}", "@Test(timeout = 4000)\n public void test058() throws Throwable {\n StringReader stringReader0 = new StringReader(\"b|}T=mM,PuM8AP|}\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 10, 0, 0);\n assertEquals((-1), javaCharStream0.bufpos);\n \n char[] charArray0 = javaCharStream0.GetSuffix(0);\n assertEquals(0, charArray0.length);\n }", "public static void main (String args []) {\n\r\n String str = \"\\\"क\\\", \\\"का\\\", \\\"कि\\\", \\\"की\\\", \\\"कु\\\", \\\"कू\\\", \\\"के\\\", \\\"कै\\\", \\\"को\\\", \\\"कौ\\\", \\\"कं\\\", \\\"क:\\\"\" ;\r\n String strEng = \"\\\"ka\\\", \\\"kā\\\", \\\"ki\\\", \\\"kī\\\", \\\"ku\\\", \\\"kū\\\", \\\"kē\\\", \\\"kai\\\", \\\"ko\\\", \\\"kau\\\", \\\"kṁ\\\", \\\"ka:\\\"\" ;\r\n\r\n String additionalConsonants = \"\\\"क़\\\", \\\"क़ा\\\", \\\"क़ि\\\", \\\"क़ी\\\", \\\"क़ु\\\", \\\"क़ू\\\", \\\"क़े\\\", \\\"क़ै\\\", \\\"क़ो\\\", \\\"क़ौ\\\", \\\"क़ं\\\", \\\"क़:\\\"\"; \r\n String additionalConsonantsEng = \"\\\"qa\\\", \\\"qā\\\", \\\"qi\\\", \\\"qī\\\", \\\"qu\\\", \\\"qū\\\", \\\"qē\\\", \\\"qai\\\", \\\"qo\\\", \\\"qau\\\", \\\"qṁ\\\", \\\"qa:\\\"\" ;\r\n\r\n //String str = \"क, का, कि, की, कु, कू, के, कै, को, कौ, कं, क:\" ;\r\n \r\n \r\n \r\n //generateNP(str);\r\n //generateEN(strEng);\r\n //System.out.println();\r\n generateNPAdditionalConsonants(additionalConsonants);\r\n generateENAdditionalConsonants(additionalConsonantsEng);\r\n\r\n\r\n\r\n }", "public String processSeq (String seq)\n {\n\n\n unknownStatus = 0; // reinitialize this to 0\n\n // take out any spaces and numbers\n StringBuffer tempSeq = new StringBuffer(\"\");;\n for (int i = 0; i < seq.length(); i++)\n {\n if (Character.isLetter(seq.charAt(i)))\n tempSeq.append(seq.charAt(i));\n else\n continue;\n }\n seq = tempSeq.toString();\n\n if (seq.length() > 0)\n {\n\n // the three 5'3' reading frame translations\n\n String fiveThreeFrame1 = match (seq);\n String fiveThreeFrame2 = match (seq.substring(1, seq.length()));\n String fiveThreeFrame3 = match (seq.substring(2, seq.length()));\n\n \n\n // reverse and complement the string seq and rename rev\n\n String rev = \"\";\n for (int i = 0; i < seq.length(); i++)\n {\n // the unambiguous nucleotides\n if (seq.charAt(i) == 'A')\n rev = \"U\" + rev;\n else if ((seq.charAt(i) == 'U') || (seq.charAt(i) == 'T'))\n rev = \"A\" + rev;\n else if (seq.charAt(i) == 'C')\n rev = \"G\" + rev;\n else if (seq.charAt(i) == 'G')\n rev = \"C\" + rev;\n else // any other non-nucleotides\n rev = String.valueOf (seq.charAt(i)) + rev;\n }\n\n\n // the three 3'5' reading frame translations\n\n String threeFiveFrame1 = match (rev); \n String threeFiveFrame2 = match (rev.substring(1, rev.length()));\n String threeFiveFrame3 = match (rev.substring(2, rev.length()));\n\n return (\"5'3' Frame1: \" + \"<BR>\" + fiveThreeFrame1 + \n \"<BR><BR>5'3' Frame2: \" + \"<BR>\" + fiveThreeFrame2 +\n \"<BR><BR>5'3' Frame3: \" + \"<BR>\" + fiveThreeFrame3 +\n \"<BR><BR>3'5' Frame1: \" + \"<BR>\" + threeFiveFrame1 +\n \"<BR><BR>3'5' Frame2: \" + \"<BR>\" + threeFiveFrame2 +\n \"<BR><BR>3'5' Frame3: \" + \"<BR>\" + threeFiveFrame3 + \"<BR>\");\n }\n\n return \"\";\n }", "public static void main(String[] args) {\n String s = \"abc\";\n String t = \"ahbgdc\";\n boolean res = isSubsequence(s,t);\n System.out.println(res);\n }", "public static String translateSequence(String sequence, TranslationTable translationTable,\n\t\t\tboolean includeStop, boolean translateThroughStop) {\n//\t\tif (sequence.length() % 3 != 0) {\n//\t\t\tthrow new GBOLUtilException(\"Sequence to be translated must have length of factor of 3\");\n//\t\t}\n\t\tStringBuilder buffer = new StringBuilder();\n\t\tint stopCodonCount = 0;\n\t\tfor (int i = 0; i + 3 <= sequence.length(); i += 3) {\n\t\t\tString codon = sequence.substring(i, i + 3);\n\t\t\tString aminoAcid = translationTable.translateCodon(codon);\n\t\t\tif (aminoAcid.equals(TranslationTable.STOP)) {\n\t\t\t\tif (includeStop) {\n\t\t\t\t\tbuffer.append(aminoAcid);\n\t\t\t\t}\n\t\t\t\tif (!translateThroughStop) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (++stopCodonCount > 1) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tbuffer.append(aminoAcid);\n\t\t\t}\n\t\t}\n\t\treturn buffer.toString();\n\t}", "@Test\n public void getExtracpy() {\n String input = \"A303:C203:\";\n boolean expected = true;\n boolean output = true;\n String[] input1 = input.split(\":\");\n String[] expectedarray = {\"A303\",\"C203\"};\n\n for (int i = 0; i < input1.length; i++) {\n if(!input1[i].equals(expectedarray[i]))\n {\n output = false;\n break;\n }\n }\n assertEquals(expected,output);\n\n }", "@Test(timeout = 4000)\n public void test004() throws Throwable {\n StringReader stringReader0 = new StringReader(\"b|}T=mM,PuM8AP|}\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 10, 0, 0);\n char char0 = javaCharStream0.BeginToken();\n assertEquals('b', char0);\n \n char[] charArray0 = javaCharStream0.GetSuffix(0);\n assertEquals(0, charArray0.length);\n assertEquals(0, javaCharStream0.getBeginColumn());\n assertEquals(10, javaCharStream0.getBeginLine());\n }", "public static void main(String[] args) {\nScanner sc=new Scanner(System.in);\r\nString s=sc.nextLine();\r\nchar c[]=s.toCharArray();\r\nint flag=0;\r\nfor(int i=0;i<c.length;i++)\r\n{ for(int j=i+1;j<c.length;j++)\r\n\tif(c[i]==c[j])\r\n\t\tflag=1;\r\n\telse\r\n\tcontinue;\r\n}\r\nif(flag==1)\r\n\tSystem.out.println(\"No\");\r\nelse\r\n\tSystem.out.println(\"Yes\");\r\n\t}", "Sequence(String inString) {\r\n // Allocate bytes for the sequence\r\n seqArray = new byte[(int)Math.ceil(inString.length() / 4.0)];\r\n seqLength = inString.length();\r\n\r\n for (int i = 0; i < inString.length(); i++) {\r\n // Begin at the start of byte minus 2, then subtract\r\n // the number of bits into the byte we are\r\n int bytePos = 6 - (i % 4) * 2;\r\n // Divide by the current position in string to find current byte\r\n int currByte = i / 4;\r\n char currChar = inString.charAt(i);\r\n if (currChar == 'A') {\r\n seqArray[currByte] |= 0 << bytePos;\r\n }\r\n else if (currChar == 'C') {\r\n seqArray[currByte] |= 1 << bytePos;\r\n }\r\n else if (currChar == 'G') {\r\n seqArray[currByte] |= 2 << bytePos;\r\n }\r\n else if (currChar == 'T') {\r\n seqArray[currByte] |= 3 << bytePos;\r\n }\r\n else {\r\n System.out.print(\"Could not create sequence!\");\r\n }\r\n }\r\n }", "@Deprecated\n@ProwideDeprecated(phase4 = TargetYear.SRU2021)\npublic interface SequenceName {\n String A = \"A\";\n String A1 = \"A1\";\n String A1a = \"A1a\";\n String A1b = \"A1b\";\n String A1c = \"A1c\";\n String A1d = \"A1d\";\n String A1e = \"A1e\";\n String A2 = \"A2\";\n String A2a = \"A2a\";\n String A2b = \"A2b\";\n String A2c = \"A2c\";\n String A2d = \"A2d\";\n String A2e = \"A2e\";\n String A3 = \"A3\";\n String A3a = \"A3a\";\n String A3b = \"A3b\";\n String A3c = \"A3c\";\n String A3d = \"A3d\";\n String A3e = \"A3e\";\n String A4 = \"A4\";\n String A4a = \"A4a\";\n String A4b = \"A4b\";\n String A4c = \"A4c\";\n String A4d = \"A4d\";\n String A4e = \"A4e\";\n String A5 = \"A5\";\n String A5a = \"A5a\";\n String A5b = \"A5b\";\n String A5c = \"A5c\";\n String A5d = \"A5d\";\n String A5e = \"A5e\";\n String B = \"B\";\n String B1 = \"B1\";\n String B1a = \"B1a\";\n String B1b = \"B1b\";\n String B1c = \"B1c\";\n String B1d = \"B1d\";\n String B1e = \"B1e\";\n String B2 = \"B2\";\n String B2a = \"B2a\";\n String B2b = \"B2b\";\n String B2c = \"B2c\";\n String B2d = \"B2d\";\n String B2e = \"B2e\";\n String B3 = \"B3\";\n String B3a = \"B3a\";\n String B3b = \"B3b\";\n String B3c = \"B3c\";\n String B3d = \"B3d\";\n String B3e = \"B3e\";\n String B4 = \"B4\";\n String B4a = \"B4a\";\n String B4b = \"B4b\";\n String B4c = \"B4c\";\n String B4d = \"B4d\";\n String B4e = \"B4e\";\n String B5 = \"B5\";\n String B5a = \"B5a\";\n String B5b = \"B5b\";\n String B5c = \"B5c\";\n String B5d = \"B5d\";\n String B5e = \"B5e\";\n String C = \"C\";\n String C1 = \"C1\";\n String C1a = \"C1a\";\n String C1b = \"C1b\";\n String C1c = \"C1c\";\n String C1d = \"C1d\";\n String C1e = \"C1e\";\n String C2 = \"C2\";\n String C2a = \"C2a\";\n String C2b = \"C2b\";\n String C2c = \"C2c\";\n String C2d = \"C2d\";\n String C2e = \"C2e\";\n String C3 = \"C3\";\n String C3a = \"C3a\";\n String C3b = \"C3b\";\n String C3c = \"C3c\";\n String C3d = \"C3d\";\n String C3e = \"C3e\";\n String C4 = \"C4\";\n String C4a = \"C4a\";\n String C4b = \"C4b\";\n String C4c = \"C4c\";\n String C4d = \"C4d\";\n String C4e = \"C4e\";\n String C5 = \"C5\";\n String C5a = \"C5a\";\n String C5b = \"C5b\";\n String C5c = \"C5c\";\n String C5d = \"C5d\";\n String C5e = \"C5e\";\n String D = \"D\";\n String D1 = \"D1\";\n String D1a = \"D1a\";\n String D1b = \"D1b\";\n String D1c = \"D1c\";\n String D1d = \"D1d\";\n String D1e = \"D1e\";\n String D2 = \"D2\";\n String D2a = \"D2a\";\n String D2b = \"D2b\";\n String D2c = \"D2c\";\n String D2d = \"D2d\";\n String D2e = \"D2e\";\n String D3 = \"D3\";\n String D3a = \"D3a\";\n String D3b = \"D3b\";\n String D3c = \"D3c\";\n String D3d = \"D3d\";\n String D3e = \"D3e\";\n String D4 = \"D4\";\n String D4a = \"D4a\";\n String D4b = \"D4b\";\n String D4c = \"D4c\";\n String D4d = \"D4d\";\n String D4e = \"D4e\";\n String D5 = \"D5\";\n String D5a = \"D5a\";\n String D5b = \"D5b\";\n String D5c = \"D5c\";\n String D5d = \"D5d\";\n String D5e = \"D5e\";\n String E = \"E\";\n String E1 = \"E1\";\n String E2 = \"E2\";\n String E2a = \"E2a\";\n String E2b = \"E2b\";\n String E2c = \"E2c\";\n String E2d = \"E2d\";\n String E2e = \"E2e\";\n String E3 = \"E3\";\n String E3a = \"E3a\";\n String E3b = \"E3b\";\n String E3c = \"E3c\";\n String E3d = \"E3d\";\n String E3e = \"E3e\";\n String E4 = \"E4\";\n String E4a = \"E4a\";\n String E4b = \"E4b\";\n String E4c = \"E4c\";\n String E4d = \"E4d\";\n String E4e = \"E4e\";\n String E5 = \"E5\";\n String E5a = \"E5a\";\n String E5b = \"E5b\";\n String E5c = \"E5c\";\n String E5d = \"E5d\";\n String E5e = \"E5e\";\n\n String F = \"F\";\n String F1 = \"F1\";\n String F2 = \"F2\";\n String F3 = \"F3\";\n String F3a = \"F3a\";\n String F3b = \"F3b\";\n String F3c = \"F3c\";\n String F3d = \"F3d\";\n String F3e = \"F3e\";\n String F4 = \"F4\";\n String F4a = \"F4a\";\n String F4b = \"F4b\";\n String F4c = \"F4c\";\n String F4d = \"F4d\";\n String F4e = \"F4e\";\n String F5 = \"F5\";\n String F5a = \"F5a\";\n String F5b = \"F5b\";\n String F5c = \"F5c\";\n String F5d = \"F5d\";\n String F5e = \"F5e\";\n String G = \"G\";\n String G1 = \"G1\";\n String G1a = \"G1a\";\n String G1b = \"G1b\";\n String G1c = \"G1c\";\n String G1d = \"G1d\";\n String G1e = \"G1e\";\n String G2 = \"G2\";\n String G3 = \"G3\";\n String G4 = \"G4\";\n String G4a = \"G4a\";\n String G4b = \"G4b\";\n String G4c = \"G4c\";\n String G4d = \"G4d\";\n String G4e = \"G4e\";\n String G5 = \"G5\";\n String G5a = \"G5a\";\n String G5b = \"G5b\";\n String G5c = \"G5c\";\n String G5d = \"G5d\";\n String G5e = \"G5e\";\n String H = \"H\";\n String H1 = \"H1\";\n String H1a = \"H1a\";\n String H1b = \"H1b\";\n String H1c = \"H1c\";\n String H1d = \"H1d\";\n String H1e = \"H1e\";\n String H2 = \"H2\";\n String H2a = \"H2a\";\n String H2b = \"H2b\";\n String H2c = \"H2c\";\n String H2d = \"H2d\";\n String H2e = \"H2e\";\n String H3 = \"H3\";\n String H4 = \"H4\";\n String H5 = \"H5\";\n String H5a = \"H5a\";\n String H5b = \"H5b\";\n String H5c = \"H5c\";\n String H5d = \"H5d\";\n String H5e = \"H5e\";\n String I = \"I\";\n String I1 = \"I1\";\n String I1a = \"I1a\";\n String I1b = \"I1b\";\n String I1c = \"I1c\";\n String I1d = \"I1d\";\n String I1e = \"I1e\";\n String I2 = \"I2\";\n String I2a = \"I2a\";\n String I2b = \"I2b\";\n String I2c = \"I2c\";\n String I2d = \"I2d\";\n String I2e = \"I2e\";\n String I3 = \"I3\";\n String I3a = \"I3a\";\n String I3b = \"I3b\";\n String I3c = \"I3c\";\n String I3d = \"I3d\";\n String I3e = \"I3e\";\n String I4 = \"I4\";\n String I5 = \"I5\";\n String J = \"J\";\n String J1 = \"J1\";\n String J1a = \"J1a\";\n String J1b = \"J1b\";\n String J1c = \"J1c\";\n String J1d = \"J1d\";\n String J1e = \"J1e\";\n String J2 = \"J2\";\n String J2a = \"J2a\";\n String J2b = \"J2b\";\n String J2c = \"J2c\";\n String J2d = \"J2d\";\n String J2e = \"J2e\";\n String J3 = \"J3\";\n String J3a = \"J3a\";\n String J3b = \"J3b\";\n String J3c = \"J3c\";\n String J3d = \"J3d\";\n String J3e = \"J3e\";\n String J4 = \"J4\";\n String J4a = \"J4a\";\n String J4b = \"J4b\";\n String J4c = \"J4c\";\n String J4d = \"J4d\";\n String J4e = \"J4e\";\n String J5 = \"J5\";\n String K = \"K\";\n String K1 = \"K1\";\n String K1a = \"K1a\";\n String K1b = \"K1b\";\n String K1c = \"K1c\";\n String K1d = \"K1d\";\n String K1e = \"K1e\";\n String K2 = \"K2\";\n String K2a = \"K2a\";\n String K2b = \"K2b\";\n String K2c = \"K2c\";\n String K2d = \"K2d\";\n String K2e = \"K2e\";\n String K3 = \"K3\";\n String K3a = \"K3a\";\n String K3b = \"K3b\";\n String K3c = \"K3c\";\n String K3d = \"K3d\";\n String K3e = \"K3e\";\n String K4 = \"K4\";\n String K4a = \"K4a\";\n String K4b = \"K4b\";\n String K4c = \"K4c\";\n String K4d = \"K4d\";\n String K4e = \"K4e\";\n String K5 = \"K5\";\n String K5a = \"K5a\";\n String K5b = \"K5b\";\n String K5c = \"K5c\";\n String K5d = \"K5d\";\n String K5e = \"K5e\";\n String L = \"L\";\n String L1 = \"L1\";\n String L2 = \"L2\";\n String L2a = \"L2a\";\n String L2b = \"L2b\";\n String L2c = \"L2c\";\n String L2d = \"L2d\";\n String L2e = \"L2e\";\n String L3 = \"L3\";\n String L3a = \"L3a\";\n String L3b = \"L3b\";\n String L3c = \"L3c\";\n String L3d = \"L3d\";\n String L3e = \"L3e\";\n String L4 = \"L4\";\n String L4a = \"L4a\";\n String L4b = \"L4b\";\n String L4c = \"L4c\";\n String L4d = \"L4d\";\n String L4e = \"L4e\";\n String L5 = \"L5\";\n String L5a = \"L5a\";\n String L5b = \"L5b\";\n String L5c = \"L5c\";\n String L5d = \"L5d\";\n String L5e = \"L5e\";\n\n String M1 = \"M1\";\n String M2 = \"M2\";\n String M3 = \"M3\";\n String M3a = \"M3a\";\n String M3b = \"M3b\";\n String M3c = \"M3c\";\n String M3d = \"M3d\";\n String M3e = \"M3e\";\n String M4 = \"M4\";\n String M4a = \"M4a\";\n String M4b = \"M4b\";\n String M4c = \"M4c\";\n String M4d = \"M4d\";\n String M4e = \"M4e\";\n String M5 = \"M5\";\n String M5a = \"M5a\";\n String M5b = \"M5b\";\n String M5c = \"M5c\";\n String M5d = \"M5d\";\n String M5e = \"M5e\";\n\n String N1 = \"N1\";\n String N1a = \"N1a\";\n String N1b = \"N1b\";\n String N1c = \"N1c\";\n String N1d = \"N1d\";\n String N1e = \"N1e\";\n String N2 = \"N2\";\n String N3 = \"N3\";\n String N4 = \"N4\";\n String N4a = \"N4a\";\n String N4b = \"N4b\";\n String N4c = \"N4c\";\n String N4d = \"N4d\";\n String N4e = \"N4e\";\n String N5 = \"N5\";\n String N5a = \"N5a\";\n String N5b = \"N5b\";\n String N5c = \"N5c\";\n String N5d = \"N5d\";\n String N5e = \"N5e\";\n String O = \"O\";\n\n String O1 = \"O1\";\n String O1a = \"O1a\";\n String O1b = \"O1b\";\n String O1c = \"O1c\";\n String O1d = \"O1d\";\n String O1e = \"O1e\";\n String O2 = \"O2\";\n String O2a = \"O2a\";\n String O2b = \"O2b\";\n String O2c = \"O2c\";\n String O2d = \"O2d\";\n String O2e = \"O2e\";\n String O3 = \"O3\";\n String O4 = \"O4\";\n String O5 = \"O5\";\n String O5a = \"O5a\";\n String O5b = \"O5b\";\n String O5c = \"O5c\";\n String O5d = \"O5d\";\n String O5e = \"O5e\";\n String P = \"P\";\n\n String P1 = \"P1\";\n String P1a = \"P1a\";\n String P1b = \"P1b\";\n String P1c = \"P1c\";\n String P1d = \"P1d\";\n String P1e = \"P1e\";\n String P2 = \"P2\";\n String P2a = \"P2a\";\n String P2b = \"P2b\";\n String P2c = \"P2c\";\n String P2d = \"P2d\";\n String P2e = \"P2e\";\n String P3 = \"P3\";\n String P3a = \"P3a\";\n String P3b = \"P3b\";\n String P3c = \"P3c\";\n String P3d = \"P3d\";\n String P3e = \"P3e\";\n String P4 = \"P4\";\n String P5 = \"P5\";\n\n String Q1 = \"Q1\";\n String Q1a = \"Q1a\";\n String Q1b = \"Q1b\";\n String Q1c = \"Q1c\";\n String Q1d = \"Q1d\";\n String Q1e = \"Q1e\";\n String Q2 = \"Q2\";\n String Q2a = \"Q2a\";\n String Q2b = \"Q2b\";\n String Q2c = \"Q2c\";\n String Q2d = \"Q2d\";\n String Q2e = \"Q2e\";\n String Q3 = \"Q3\";\n String Q3a = \"Q3a\";\n String Q3b = \"Q3b\";\n String Q3c = \"Q3c\";\n String Q3d = \"Q3d\";\n String Q3e = \"Q3e\";\n String Q4 = \"Q4\";\n String Q4a = \"Q4a\";\n String Q4b = \"Q4b\";\n String Q4c = \"Q4c\";\n String Q4d = \"Q4d\";\n String Q4e = \"Q4e\";\n String Q5 = \"Q5\";\n String R = \"R\";\n String R1 = \"R1\";\n String R1a = \"R1a\";\n String R1b = \"R1b\";\n String R1c = \"R1c\";\n String R1d = \"R1d\";\n String R1e = \"R1e\";\n String R2 = \"R2\";\n String R2a = \"R2a\";\n String R2b = \"R2b\";\n String R2c = \"R2c\";\n String R2d = \"R2d\";\n String R2e = \"R2e\";\n String R3 = \"R3\";\n String R3a = \"R3a\";\n String R3b = \"R3b\";\n String R3c = \"R3c\";\n String R3d = \"R3d\";\n String R3e = \"R3e\";\n String R4 = \"R4\";\n String R4a = \"R4a\";\n String R4b = \"R4b\";\n String R4c = \"R4c\";\n String R4d = \"R4d\";\n String R4e = \"R4e\";\n String R5 = \"R5\";\n String R5a = \"R5a\";\n String R5b = \"R5b\";\n String R5c = \"R5c\";\n String R5d = \"R5d\";\n String R5e = \"R5e\";\n String S = \"S\";\n String S1 = \"S1\";\n String S2 = \"S2\";\n String S2a = \"S2a\";\n String S2b = \"S2b\";\n String S2c = \"S2c\";\n String S2d = \"S2d\";\n String S2e = \"S2e\";\n String S3 = \"S3\";\n String S3a = \"S3a\";\n String S3b = \"S3b\";\n String S3c = \"S3c\";\n String S3d = \"S3d\";\n String S3e = \"S3e\";\n String S4 = \"S4\";\n String S4a = \"S4a\";\n String S4b = \"S4b\";\n String S4c = \"S4c\";\n String S4d = \"S4d\";\n String S4e = \"S4e\";\n String S5 = \"S5\";\n String S5a = \"S5a\";\n String S5b = \"S5b\";\n String S5c = \"S5c\";\n String S5d = \"S5d\";\n String S5e = \"S5e\";\n\n String T = \"T\";\n String T1 = \"T1\";\n String T2 = \"T2\";\n String T3 = \"T3\";\n String T3a = \"T3a\";\n String T3b = \"T3b\";\n String T3c = \"T3c\";\n String T3d = \"T3d\";\n String T3e = \"T3e\";\n String T4 = \"T4\";\n String T4a = \"T4a\";\n String T4b = \"T4b\";\n String T4c = \"T4c\";\n String T4d = \"T4d\";\n String T4e = \"T4e\";\n String T5 = \"T5\";\n String T5a = \"T5a\";\n String T5b = \"T5b\";\n String T5c = \"T5c\";\n String T5d = \"T5d\";\n String T5e = \"T5e\";\n\n String U = \"U\";\n String U1 = \"U1\";\n String U1a = \"U1a\";\n String U1b = \"U1b\";\n String U1c = \"U1c\";\n String U1d = \"U1d\";\n String U1e = \"U1e\";\n String U2 = \"U2\";\n String U3 = \"U3\";\n String U4 = \"U4\";\n String U4a = \"U4a\";\n String U4b = \"U4b\";\n String U4c = \"U4c\";\n String U4d = \"U4d\";\n String U4e = \"U4e\";\n String U5 = \"U5\";\n String U5a = \"U5a\";\n String U5b = \"U5b\";\n String U5c = \"U5c\";\n String U5d = \"U5d\";\n String U5e = \"U5e\";\n String V = \"V\";\n\n String V1 = \"V1\";\n String V1a = \"V1a\";\n String V1b = \"V1b\";\n String V1c = \"V1c\";\n String V1d = \"V1d\";\n String V1e = \"V1e\";\n String V2 = \"V2\";\n String V2a = \"V2a\";\n String V2b = \"V2b\";\n String V2c = \"V2c\";\n String V2d = \"V2d\";\n String V2e = \"V2e\";\n String V3 = \"V3\";\n String V4 = \"V4\";\n String V5 = \"V5\";\n String V5a = \"V5a\";\n String V5b = \"V5b\";\n String V5c = \"V5c\";\n String V5d = \"V5d\";\n String V5e = \"V5e\";\n String W = \"W\";\n\n String W1 = \"W1\";\n String W1a = \"W1a\";\n String W1b = \"W1b\";\n String W1c = \"W1c\";\n String W1d = \"W1d\";\n String W1e = \"W1e\";\n String W2 = \"W2\";\n String W2a = \"W2a\";\n String W2b = \"W2b\";\n String W2c = \"W2c\";\n String W2d = \"W2d\";\n String W2e = \"W2e\";\n String W3 = \"W3\";\n String W3a = \"W3a\";\n String W3b = \"W3b\";\n String W3c = \"W3c\";\n String W3d = \"W3d\";\n String W3e = \"W3e\";\n String W4 = \"W4\";\n String W5 = \"W5\";\n\n String X1 = \"X1\";\n String X1a = \"X1a\";\n String X1b = \"X1b\";\n String X1c = \"X1c\";\n String X1d = \"X1d\";\n String X1e = \"X1e\";\n String X2 = \"X2\";\n String X2a = \"X2a\";\n String X2b = \"X2b\";\n String X2c = \"X2c\";\n String X2d = \"X2d\";\n String X2e = \"X2e\";\n String X3 = \"X3\";\n String X3a = \"X3a\";\n String X3b = \"X3b\";\n String X3c = \"X3c\";\n String X3d = \"X3d\";\n String X3e = \"X3e\";\n String X4 = \"X4\";\n String X4a = \"X4a\";\n String X4b = \"X4b\";\n String X4c = \"X4c\";\n String X4d = \"X4d\";\n String X4e = \"X4e\";\n String X5 = \"X5\";\n String Y = \"Y\";\n String Y1 = \"Y1\";\n String Y1a = \"Y1a\";\n String Y1b = \"Y1b\";\n String Y1c = \"Y1c\";\n String Y1d = \"Y1d\";\n String Y1e = \"Y1e\";\n String Y2 = \"Y2\";\n String Y2a = \"Y2a\";\n String Y2b = \"Y2b\";\n String Y2c = \"Y2c\";\n String Y2d = \"Y2d\";\n String Y2e = \"Y2e\";\n String Y3 = \"Y3\";\n String Y3a = \"Y3a\";\n String Y3b = \"Y3b\";\n String Y3c = \"Y3c\";\n String Y3d = \"Y3d\";\n String Y3e = \"Y3e\";\n String Y4 = \"Y4\";\n String Y4a = \"Y4a\";\n String Y4b = \"Y4b\";\n String Y4c = \"Y4c\";\n String Y4d = \"Y4d\";\n String Y4e = \"Y4e\";\n String Y5 = \"Y5\";\n String Y5a = \"Y5a\";\n String Y5b = \"Y5b\";\n String Y5c = \"Y5c\";\n String Y5d = \"Y5d\";\n String Y5e = \"Y5e\";\n String Z = \"Z\";\n String Z1 = \"Z1\";\n String Z2 = \"Z2\";\n String Z2a = \"Z2a\";\n String Z2b = \"Z2b\";\n String Z2c = \"Z2c\";\n String Z2d = \"Z2d\";\n String Z2e = \"Z2e\";\n String Z3 = \"Z3\";\n String Z3a = \"Z3a\";\n String Z3b = \"Z3b\";\n String Z3c = \"Z3c\";\n String Z3d = \"Z3d\";\n String Z3e = \"Z3e\";\n String Z4 = \"Z4\";\n String Z4a = \"Z4a\";\n String Z4b = \"Z4b\";\n String Z4c = \"Z4c\";\n String Z4d = \"Z4d\";\n String Z4e = \"Z4e\";\n String Z5 = \"Z5\";\n String Z5a = \"Z5a\";\n String Z5b = \"Z5b\";\n String Z5c = \"Z5c\";\n String Z5d = \"Z5d\";\n String Z5e = \"Z5e\";\n}", "private boolean verifySequence(String seq) {\n for (int i = 0; i < seq.length(); i++) {\n if (seq.charAt(i) != 'A' && seq.charAt(i) != 'T'\n && seq.charAt(i) != 'C' && seq.charAt(i) != 'G') {\n return false;\n }\n }\n return true;\n }", "private boolean matchSequences ( String sequence1, String sequence2 )\n{\n int matches = 0;\n\n // Check for sequences with less than 20 characters.\n if ( ( sequence1.length () <= 20 ) ||\n ( sequence2.length () <= 20 ) )\n {\n return sequence1.equalsIgnoreCase ( sequence2 );\n } // if\n\n // Count the matching bases in the first 20 characters.\n for ( int i = 0; i < 20; i++ )\n\n // Count the matching characters (but not N bases).\n if ( ( sequence1.charAt ( i ) == sequence2.charAt ( i ) ) &&\n ( sequence1.charAt ( i ) != 'x' ) &&\n ( sequence1.charAt ( i ) != 'n' ) )\n\n matches++;\n\n // Check for 90% identity (18/20) for a valid match\n if ( matches >= 18 ) return true;\n return false;\n}", "@Test\n public void repeatedSubstringPattern() {\n assertTrue(new Solution1().repeatedSubstringPattern(\"abcabcabcabc\"));\n }", "public String findSimpleGene(String dna){\n String result = \"\";\n \n int startIndex = dna.indexOf(\"ATG\");\n if (startIndex == -1){\n return \"Not valid - no ATG\";}\n \n int stopIndex = dna.indexOf(\"TAA\", startIndex +3);\n if (stopIndex == -1){\n return \"Not valid - no TAA\";}\n \n result = dna.substring(startIndex, stopIndex +3);\n if (result.length() % 3 == 0){\n result = result; \n } else {\n result = \" not valid\";\n }\n return result;\n}", "public boolean genStringAsCharArray();", "private static Circuit buildCircuit(String s, int start, int end){\n int middle = findMiddle(s, start, end);\n if (middle == -1)\n return new SingleResistor(Double.parseDouble(s.substring(start, end)));\n else {\n int aStart = findNextComma(s, start, middle)+1;\n int aEnd = s.charAt(middle-1) == ')'?middle-1:middle;\n Circuit a = buildCircuit(s, aStart, aEnd);\n\n int bStart = middle+1;\n int bEnd = s.charAt(end-1) == ')'?end-1:end;\n Circuit b = buildCircuit(s, bStart, bEnd);\n\n if (s.charAt(start+1) == '-')\n return new SeriesNetwork(a, b);\n else\n return new ParallelNetwork(a, b);\n }\n }", "@Test\n\tpublic void testRealWorldCase_uc011ayb_2() throws InvalidGenomeChange {\n\t\tthis.builderForward = TranscriptModelFactory\n\t\t\t\t.parseKnownGenesLine(\n\t\t\t\t\t\trefDict,\n\t\t\t\t\t\t\"uc011ayb.2\tchr3\t+\t37034840\t37092337\t37055968\t37092144\t18\t37034840,37042445,37045891,37048481,37050304,37053310,37053501,37055922,37058996,37061800,37067127,37070274,37081676,37083758,37089009,37090007,37090394,37091976,\t37035154,37042544,37045965,37048554,37050396,37053353,37053590,37056035,37059090,37061954,37067498,37070423,37081785,37083822,37089174,37090100,37090508,37092337,\tNP_001245203\tuc011ayb.2\");\n\t\tthis.builderForward\n\t\t.setSequence(\"gaagagacccagcaacccacagagttgagaaatttgactggcattcaagctgtccaatcaatagctgccgctgaagggtggggctggatggcgtaagctacagctgaaggaagaacgtgagcacgaggcactgaggtgattggctgaaggcacttccgttgagcatctagacgtttccttggctcttctggcgccaaaatgtcgttcgtggcaggggttattcggcggctggacgagacagtggtgaaccgcatcgcggcgggggaagttatccagcggccagctaatgctatcaaagagatgattgagaactgaaagaagatctggatattgtatgtgaaaggttcactactagtaaactgcagtcctttgaggatttagccagtatttctacctatggctttcgaggtgaggctttggccagcataagccatgtggctcatgttactattacaacgaaaacagctgatggaaagtgtgcatacagagcaagttactcagatggaaaactgaaagcccctcctaaaccatgtgctggcaatcaagggacccagatcacggtggaggaccttttttacaacatagccacgaggagaaaagctttaaaaaatccaagtgaagaatatgggaaaattttggaagttgttggcaggtattcagtacacaatgcaggcattagtttctcagttaaaaaacaaggagagacagtagctgatgttaggacactacccaatgcctcaaccgtggacaatattcgctccatctttggaaatgctgttagtcgagaactgatagaaattggatgtgaggataaaaccctagccttcaaaatgaatggttacatatccaatgcaaactactcagtgaagaagtgcatcttcttactcttcatcaaccatcgtctggtagaatcaacttccttgagaaaagccatagaaacagtgtatgcagcctatttgcccaaaaacacacacccattcctgtacctcagtttagaaatcagtccccagaatgtggatgttaatgtgcaccccacaaagcatgaagttcacttcctgcacgaggagagcatcctggagcgggtgcagcagcacatcgagagcaagctcctgggctccaattcctccaggatgtacttcacccagactttgctaccaggacttgctggcccctctggggagatggttaaatccacaacaagtctgacctcgtcttctacttctggaagtagtgataaggtctatgcccaccagatggttcgtacagattcccgggaacagaagcttgatgcatttctgcagcctctgagcaaacccctgtccagtcagccccaggccattgtcacagaggataagacagatatttctagtggcagggctaggcagcaagatgaggagatgcttgaactcccagcccctgctgaagtggctgccaaaaatcagagcttggagggggatacaacaaaggggacttcagaaatgtcagagaagagaggacctacttccagcaaccccagaaagagacatcgggaagattctgatgtggaaatggtggaagatgattcccgaaaggaaatgactgcagcttgtaccccccggagaaggatcattaacctcactagtgttttgagtctccaggaagaaattaatgagcagggacatgaggttctccgggagatgttgcataaccactccttcgtgggctgtgtgaatcctcagtgggccttggcacagcatcaaaccaagttataccttctcaacaccaccaagcttagtgaagaactgttctaccagatactcatttatgattttgccaattttggtgttctcaggttatcggagccagcaccgctctttgaccttgccatgcttgccttagatagtccagagagtggctggacagaggaagatggtcccaaagaaggacttgctgaatacattgttgagtttctgaagaagaaggctgagatgcttgcagactatttctctttggaaattgatgaggaagggaacctgattggattaccccttctgattgacaactatgtgccccctttggagggactgcctatcttcattcttcgactagccactgaggtgaattgggacgaagaaaaggaatgttttgaaagcctcagtaaagaatgcgctatgttctattccatccggaagcagtacatatctgaggagtcgaccctctcaggccagcagagtgaagtgcctggctccattccaaactcctggaagtggactgtggaacacattgtctataaagccttgcgctcacacattctgcctcctaaacatttcacagaagatggaaatatcctgcagcttgctaacctgcctgatctatacaaagtctttgagaggtgttaaatatggttatttatgcactgtgggatgtgttcttctttctctgtattccgatacaaagtgttgtatcaaagtgtgatatacaaagtgtaccaacataagtgttggtagcacttaagacttatacttgccttctgatagtattcctttatacacagtggattgattataaataaatagatgtgtcttaacataaaaaaaaaaaaaaaaaa\"\n\t\t\t\t.toUpperCase());\n\t\tthis.builderForward.setGeneSymbol(\"NP_001245203\");\n\t\tthis.infoForward = builderForward.build();\n\t\t// RefSeq NM_001258273\n\n\t\tGenomeChange change1 = new GenomeChange(new GenomePosition(refDict, '+', 3, 37090097, PositionType.ONE_BASED),\n\t\t\t\t\"TGAGG\", \"C\");\n\t\tAnnotation annotation1 = new BlockSubstitutionAnnotationBuilder(infoForward, change1).build();\n\t\tAssert.assertEquals(infoForward.accession, annotation1.transcript.accession);\n\t\tAssert.assertEquals(AnnotationLocation.INVALID_RANK, annotation1.annoLoc.rank);\n\t\tAssert.assertEquals(\"c.1263_1266+1delinsC\", annotation1.ntHGVSDescription);\n\t\tAssert.assertEquals(\"p.Glu422del\", annotation1.aaHGVSDescription);\n\t\tAssert.assertEquals(ImmutableSortedSet.of(VariantType.NON_FS_SUBSTITUTION, VariantType.SPLICE_DONOR),\n\t\t\t\tannotation1.effects);\n\t}", "public String[] inStringtoCheck(String[] stringArray) {\n\t\t\n\t\tstringCheck = stringArray;\n\t\toutArr = new String[stringCheck.length];\n\t\t\n\t\t//System.out.print(\"\\n\");\n\t\t\n\t\t/* Check the Local String Array */\n\t\tfor (int i = 0; i < stringCheck.length; i++) {\n\t\t\tint j = i - 1;\n\t\t\tint k = i - 2;\n\t\t\tint l = i - 3;\n\t\t\t\n\t\t\texitCheck = false; \n\t\t\tpariralaCheck = true;\n\t\t\tpackageCheck = true;\n\t\t\tkomentoCheck = true;\n\t\t\t\n\t\t\tif (searchValue(stringCheck[i])) {\n\t\t\t\t\n\t\t\t\t// String append\n\t\t\t\tif(stringCheck[i].equals(op_parirala_dagdag[0]) && !exitCheck && \n\t\t\t\t\t\t(outArr[j].equals(\"String Declarator (End)\") || outArr[k].equals(\"Append\") || outArr[l].equals(\"Keyword\")/*|| *//* outArr[j].equals(\"Identifier\")\n\t\t\t\t\t\t\t\t||*/ /*outArr[k].equals(\"Delimiter Parenthesis (Start)\")*/)) {\n\t\t\t\t\toutArr[i] = \"Append\";\n\t\t\t\t\texitCheck = true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\n\t\t\t \t\n\n\n \n\t\t\t \t\n\t\t\t\t\n\t\t\t\t// Keywords\n \t\tfor (int a = 0; a < abakada_mahalaga.length; a++) {\n \t\t\tif (stringCheck[i].equals(abakada_mahalaga[a]) && !exitCheck) {\n \t\t\t\t\n \t\t\t\tif(stringCheck[i].equals(\"isulat\")) {\n \t\t\t\t\toutArr[i] = \"Keyword (Pre-defined Function)\";\n \t\t\t\t}\n \t\t\t\telse if (stringCheck[i].equals(\"basahin\")) {\n \t\t\t\t\toutArr[i] = \"Keyword (Pre-defined Function)\";\n \t\t\t\t}\n \t\t\t\telse if (stringCheck[i].equals(\"kawalan\")) {\n \t\t\t\t\toutArr[i] = \"Keyword (Modifier)\";\n \t\t\t\t}\n \t\t\t\telse {\n \t\t\t\t\toutArr[i] = \"Keyword\";\n \t\t\t\t}\n \t\t\t\texitCheck = true;\n \tbreak;\n \t\t\t}\n \t\t}\n \t\t\n \t\t// Reserved Words\n \t\tfor (int a = 0; a < abakada_nakalaan.length; a++) {\n \t\t\tif (stringCheck[i].equals(abakada_nakalaan[a]) && !exitCheck) {\n \t\t\t\toutArr[i] = \"Reserved Word\";\n \t\t\t\texitCheck = true;\n \tbreak;\n }\n \t\t}\n \t\t\n \t\t// Noise Words\n \t\tif (stringCheck[i].equals(abakada_ingay[0]) && !exitCheck) {\n \t\t\t\toutArr[i] = \"Noise Word\";\n \t\t\t\texitCheck = true;\n \t//break;\n }\n \t\t \n \t\t// Data Type\n \t\tfor (int a = 0; a < pang_uri.length; a++) {\n \t\t\tif (stringCheck[i].equals(pang_uri[a]) && !exitCheck) {\n \t\t\t\t\n \t\t\t\tif(stringCheck[i].equals(\"pambuo\")) {\n \t\t\t\t\toutArr[i] = \"Keyword (Integer)\";\n \t\t\t\t}\n \t\t\t\telse if(stringCheck[i].equals(\"hatimbuo\")) {\n \t\t\t\t\toutArr[i] = \"Keyword (Float)\";\n \t\t\t\t}\n\t\t\t\t\t\telse if(stringCheck[i].equals(\"bulyan\")) {\n\t\t\t\t\t\t\toutArr[i] = \"Keyword (Booleanr)\";\t\t\t\t\n\t\t\t\t\t\t \t\t\t\t}\n\t\t\t\t\t\telse if(stringCheck[i].equals(\"titik\")) {\n\t\t\t\t\t\t\toutArr[i] = \"Keyword (Character)\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(stringCheck[i].equals(\"parirala\")) {\n\t\t\t\t\t\t\toutArr[i] = \"Keyword (String)\";\n\t\t\t\t\t\t\t}\n\t \t\t\t\t\n \t\t\t\t//outArr[i] = \"Keyword (Data Type)\";\n \t\t\t\texitCheck = true;\n \tbreak;\n }\n \t\t}\n \t\t \n \t\t// Boolean\n \t\tfor (int a = 0; a < bulyan.length; a++) {\n \t\t\tif (stringCheck[i].equals(bulyan[a]) && !exitCheck) {\n \t\t\t\t\n \t\t\t\tif(stringCheck[i].equals(\"tama\")) {\n \t\t\t\t\toutArr[i] = \"Boolean (True)\";\n \t\t\t\t}\n \t\t\t\telse if(stringCheck[i].equals(\"mali\")) {\n \t\t\t\t\toutArr[i] = \"Boolean (False)\";\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\toutArr[i] = \"Boolean\";\n \t\t\t\texitCheck = true;\n \tbreak;\n }\n \t\t}\n \t\t \n \t\t // Operators\n \t\t for (int a = 0; a < op_takda.length; a++) {\t\t\t// Assignment Operator\n \t\t\t if (stringCheck[i].equals(op_takda[a]) && !exitCheck) {\n \t\t\t\t outArr[i] = \"Assignment Operator\";\n \t\t\t\texitCheck = true;\n \t\t\t\t break;\n \t\t\t }\n \t\t }\n \t\t \n \t\tfor (int a = 0; a < op_palatuusan.length; a++) {\t\t// Arithmetic Operator\n \t\t\tif (stringCheck[i].equals(op_palatuusan[a]) && !exitCheck) {\n \t\t\t\tif(stringCheck[i].equals(\"+\")) {\n \t\t\t\t\toutArr[i] = \"Arithmetic Operator Plus\";\n \t\t\t\t}\n \t\t\t\telse if(stringCheck[i].equals(\"-\")) {\n \t\t\t\t\toutArr[i] = \"Arithmetic Operator Minus\";\n \t\t\t\t}\n \t\t\t\telse if(stringCheck[i].equals(\"*\")) {\n \t\t\t\t\toutArr[i] = \"Arithmetic Operator Multiplication\";\n \t\t\t\t}\n \t\t\t\telse if(stringCheck[i].equals(\"/\")) {\n \t\t\t\t\toutArr[i] = \"Arithmetic Operator Division\";\n \t\t\t\t}\n \t\t\t\telse if(stringCheck[i].equals(\"%\")) {\n \t\t\t\t\toutArr[i] = \"Arithmetic Operator Modulo\";\n \t\t\t\t}\n \t\t\t\t//outArr[i] = \"Arithmetic Operator\";\n \t\t\t\texitCheck = true;\n \tbreak;\n }\n \t\t}\n \t\t \n \t\t for (int a = 0; a < op_yunari.length; a++) {\t\t\t// Unary Operator\n \t\t\t if (stringCheck[i].equals(op_yunari[a]) && !exitCheck) {\n \t\t\t\t outArr[i] = \"Unary Operator\";\n \t\t\t\texitCheck = true;\n \t\t\t\t break;\n \t\t\t }\n \t\t }\n \t\t\n \t\t \n \t\t for (int a = 0; a < op_relasyunal.length; a++) {\t\t// Relational Operator\n \t\t\t if (stringCheck[i].equals(op_relasyunal[a]) && !exitCheck) {\n \t\t\t\t\n \t\t\t\t if(stringCheck[i].equals(\"@\")) {\n \t\t\t\t\t outArr[i] = \"Relational Operator(EQUALS)\";\n \t\t\t\t }\n \t\t\t\t else if(stringCheck[i].equals(\"$\")) {\n \t\t\t\t\t outArr[i] = \"Relational Operator(NOT EQUALS)\";\n \t\t\t\t }\n \t\t\t\t else if(stringCheck[i].equals(\">\")) {\n \t\t\t\t\t outArr[i] = \"Relational Operator(GREATER THAN)\";\n \t\t\t\t } \n \t\t\t\t else if(stringCheck[i].equals(\"<\")) {\n \t\t\t\t\t outArr[i] = \"Relational Operator(LESS THAN)\";\n \t\t\t\t }\n \t\t\t\t \n \t\t\t\t //outArr[i] = \"Relational Operator\";\n \t\t\t\texitCheck = true;\n \t break;\n }\n \t\t }\n \t\t \n \t\t for (int a = 0; a < op_lohikal.length; a++) {\t\t\t// Logical Operator\n \t\t\t if (stringCheck[i].equals(op_lohikal[a]) && !exitCheck) {\n \t\t\t\t \n \t\t\t\t if(stringCheck[i].equals(\"at\")) {\n \t\t\t\t\t outArr[i] = \"Logical Operator(AND)\";\n \t\t\t\t }\n \t\t\t\t else if(stringCheck[i].equals(\"odikaya\")){\n \t\t\t\t\t outArr[i] = \"Logical Operator(OR)\";\n \t\t\t\t }\n \t\t\t\t else if(stringCheck[i].equals(\"hindi\")) {\n \t\t\t\t\t outArr[i] = \"Logical Operator(INVERSE)\";\n \t\t\t\t }\n \t\t\t\t \n \t\t\t\t \n \t\t\t\t //outArr[i] = \"Logical Operator\";\n \t\t\t\t exitCheck = true;\n \t\t\t\t break;\n }\n \t\t }\n \t\t \n \t\t for (int a = 0; a < op_kondisyunal.length; a++) {\t\t// Conditional Operator\n \t\t\t if (stringCheck[i].equals(op_kondisyunal[a]) && !exitCheck) {\n \t\t\t\t \n \t\t\t\t if(stringCheck[i].equals(\"?\")) {\n \t\t\t\t\t outArr[i] = \"Conditional Operator(?)\";\n \t\t\t\t }\n \t\t\t\t else if(stringCheck[i].equals(\":\")) {\n \t\t\t\t\t outArr[i] = \"Conditional Operator(:)\";\n \t\t\t\t }\n \t\t\t\t// outArr[i] = \"Conditional Operator\";\n \t\t\t\t exitCheck = true;\n \t break;\n }\n \t\t }\n \t\t \n \t\t for (int a = 0; a < op_pirasong_pantas.length; a++) {\t// Bitwise Operator\n \t\t\t if (stringCheck[i].equals(op_pirasong_pantas[a]) && !exitCheck) {\n \t\t\t\t \n \t\t\t\t if(stringCheck[i].equals(\"&\")) {\n \t\t\t\t\t outArr[i] = \"Bitwise Operator(&)\";\n \t\t\t\t }\n \t\t\t\t else if(stringCheck[i].equals(\"^\")){\n \t\t\t\t\t outArr[i] = \"Bitwise Operator(^)\";\n \t\t\t\t }\n \t\t\t\t else if(stringCheck[i].equals(\"|\")) {\n \t\t\t\t\t outArr[i] = \"Bitwise Operator(|)\";\n \t\t\t\t }\n \t\t\t\t \n \t\t\t\t \n \t\t\t\t \n \t\t\t\t \n \t\t\t\t //outArr[i] = \"Bitwise Operator\";\n \t\t\t\t exitCheck = true;\n \t break;\n }\n \t\t }\n \t\t \n \t\t// Comments\n \t\tfor (int a = 0; a < kom_marami_check.length; a++) {\n \t\t\t if (stringCheck[i].equals(kom_marami_check[0]) && !exitCheck) {\n \t\t\t\t \n \t\t\t\t outArr[i] = \"Multiple-line Comment (Start)\";\n \t\t\t\t \n \t\t\t\t while(komentoCheck) {\n \t\t\t\t\t\n \t\t\t\t\t i++;\n \t\n \t\t\t\t\t if(stringCheck[i].equals(kom_marami_check[0])) {\n \t\t\t\t\t\t outArr[i] = \"Multiple-line Comment (End)\";\n \t\t\t\t\t\t komentoCheck = false;\n \t\t\t\t\t }\n \t\t\t\t\t \n \t\t\t\t\t else {\n \t\t\t\t\t\t outArr[i] = \"Comment\";\n \t\t\t\t\t }\n \t\t\t\t\t \n \t\t\t\t\t if(i >= stringCheck.length) {\n \t\t\t\t\t\t System.out.println(\"No closing\");\n \t\t\t\t\t\t break;\n \t\t\t\t\t }\n \t\t\t\t\t \n \t\t\t\t }\n \t\t\t\t \n \t\t\t\t exitCheck = true;\n \t\t\t\t break;\n }\n \t\t }\n \t\t\n \t\t\n \t//[package\n \tfor (int a = 0; a < kom_marami_check.length; a++) {\n \t\tif (stringCheck[i].equals(abakada_angkat[0]) && !exitCheck) {\n \t\t\t\t \n \t\t\t outArr[i] = \"Keyword (PACKAGE)\";\n \t\t\t\t \n \t\t\t\twhile(packageCheck) {\n \t\t\t\t\t\n \t\t\t\t\t i++;\n \t\n \t\t\t\t\t if(stringCheck[i].equals(\";\")) {\n \t\t\t\t\t\t outArr[i] = \"Delimiter Semicolon\";\n \t\t\t\t\t\t packageCheck = false;\n \t\t\t\t\t }\n \t\t\t\t\t \n \t\t\t\t\t else if(stringCheck[i].equals(\".\")) {\n \t\t\t\t\t\t outArr[i] = \"Period\";\n \t\t\t\t\t }\n \t\t\t\t\t \n \t\t\t\t\t else if(stringCheck[i-1].equals(\".\") && !stringCheck[i].equals(\".\")) {\n \t\t\t\t\t\t outArr[i] = \"Package Extension\";\n \t\t\t\t\t }\n \t\t\t\t\t else {\n \t\t\t\t\t\t outArr[i] = \"Package\";\n \t\t\t\t\t }\n \t\t\t\t\t \n \t\t\t\t\t if(i >= stringCheck.length) {\n \t\t\t\t\t\t System.out.println(\"No closing\");\n \t\t\t\t\t\t break;\n \t\t\t\t\t }\n \t\t\t\t\t \n \t\t\t\t }\n \t\t\t\t \n \t\t\t\t exitCheck = true;\n \t\t\t\t break;\n }\n \t}\n \t\t\n \t\t\n \t\t\n \t\t\n \t\t\n \t\t \n \t\t // Delimiters and Brackets\n \t\t for (int a = 0; a < tuldok_kuwit.length; a++) {\t\t// Semicolon\n \t\t\t if (stringCheck[i].equals(tuldok_kuwit[a]) && !exitCheck) {\n \t\t\t\t outArr[i] = \"Delimiter Semicolon\";\n \t\t\t\texitCheck = true;\n \t break;\n }\n \t\t }\n \t\t \n \t\t for (int a = 0; a < del_separator.length; a++) {\t\t// Separator\n \t\t\t if (stringCheck[i].equals(del_separator[a]) && !exitCheck) {\n \t\t\t\t outArr[i] = \"Separator\";\n \t\t\t\texitCheck = true;\n \t break;\n }\n \t\t }\n\n \t\t // Character Declarator\n \t\t for (int a = 0; a < del_titik.length; a++) {\t\n \t\t\t oneTitik = false;\n \t\t\t if (stringCheck[i].equals(del_titik[a]) && !exitCheck) {\n \t\t\n \t\t\t\t outArr[i] = \"Character Declarator (Start)\";\n \t\t\t\t \n \t\t\t\t while(pariralaCheck) {\n \t\t\t\t\t\n \t\t\t\t\t i++;\n \t\t\t\t\t \n \t\t\t\t\t if(stringCheck[i].equals(del_titik[a])) {\n \t\t\t\t\t\t outArr[i] = \"Character Declarator (End)\";\n \t\t\t\t\t\t pariralaCheck = false;\n \t\t\t\t\t }\n \t\t\t\t\t \n \t\t\t\t\t else if (!oneTitik ){\n \t\t\t\t\t\t if(stringCheck[i].length() == 1) {\n \t\t\t\t\t\t\t oneTitik = true;\n \t\t\t\t\t\t outArr[i] = \"titik\";\n \t\t\t\t\t\t }\n \t\t\t\t\t\t \n \t\t\t\t\t\t else {\n \t\t\t\t\t\t\toutArr[i] = \"Invalid Token\";\n \t\t\t\t\t\t }\n \t\t\t\t\t\n \t\t\t\t\t }\n \t\t\t\t\t \n \t\t\t\t\t if(i >= stringCheck.length) {\n \t\t\t\t\t\t System.out.println(\"No closing\");\n \t\t\t\t\t\t break;\n \t\t\t\t\t }\n \t\t\t\t }\n \t\t\t\t \n \t\t\t\t exitCheck = true;\n \t\t\t\t break;\n }\n \t\t }\n \t\t \n \t\t // String Declarator\n \t\t for (int a = 0; a < del_parirala.length; a++) {\n \t\t\t if (stringCheck[i].equals(del_parirala[a]) && !exitCheck) {\n \t\t\n \t\t\t\t outArr[i] = \"String Declarator (Start)\";\n \t\t\t\t \n \t\t\t\t while(pariralaCheck) {\n \t\t\t\t\t\n \t\t\t\t\t i++;\n \t\t\t\t\t System.out.println(stringCheck[i]+\" value of i: \"+i);\n \t\t\t\t\t if(stringCheck[i].equals(del_parirala[a])) {\n \t\t\t\t\t\toutArr[i] = \"String Declarator (End)\";\n \t\t\t\t\t\t pariralaCheck = false;\n \t\t\t\t\t }\n \t\t\t\t\t \n \t\t\t\t\t else {\n \t\t\t\t\t\t outArr[i] = \"String\";\n \t\t\t\t\t }\n \t\t\t\t\t \n \t\t\t\t\t if(i >= stringCheck.length) {\n \t\t\t\t\t\t System.out.println(\"No closing\");\n \t\t\t\t\t\t break;\n \t\t\t\t\t }\n \t\t\t\t }\n \t\t\t\t \n \t\t\t\t exitCheck = true;\n \t\t\t\t break;\n }\n \t\t }\n \t\t \n \t\t for (int a = 0; a < del_saklong_una.length; a++) {\t\t// Parenthesis\n \t\t\t if (stringCheck[i].equals(del_saklong_una[a]) && !exitCheck) {\n \t\t\t\t outArr[i] = \"Delimiter Parenthesis (Start)\";\n \t\t\t\texitCheck = true;\n \t break;\n }\n \t\t }\n \t\t \n \t\tfor (int a = 0; a < del_saklong_huli.length; a++) {\t\t \n \t\t\t if (stringCheck[i].equals(del_saklong_huli[a]) && !exitCheck) {\n \t\t\t\t outArr[i] = \"Delimiter Parenthesis (End)\";\n \t\t\t\texitCheck = true;\n \t break;\n }\n \t\t }\n \t\t \n \t\t for (int a = 0; a < del_kulong_una.length; a++) {\t\t// Curly Bracket\n \t\t\t if (stringCheck[i].equals(del_kulong_una[a]) && !exitCheck) {\n \t\t\t\t outArr[i] = \"Delimiter Curly Bracket (Start)\";\n \t\t\t\texitCheck = true;\n \t break;\n }\n \t\t }\n \t\t \n \t\tfor (int a = 0; a < del_kulong_huli.length; a++) {\t\t \n \t\t\t if (stringCheck[i].equals(del_kulong_huli[a]) && !exitCheck) {\n \t\t\t\t outArr[i] = \"Delimiter Curly Bracket (End)\";\n \t\t\t\texitCheck = true;\n \t\t\t\t break;\n }\n \t\t }\n \t\t \n \t\t for (int a = 0; a < del_palong_una.length; a++) {\t\t// Bracket\n \t\t\t if (stringCheck[i].equals(del_palong_una[a]) && !exitCheck) {\n \t\t\t\t outArr[i] = \"Bracket (Start)\";\n \t\t\t\texitCheck = true;\n \t break;\n }\n \t\t }\n \t\t \n \t\tfor (int a = 0; a < del_palong_huli.length; a++) {\t\t\t \n \t\t\t if (stringCheck[i].equals(del_palong_huli[a]) && !exitCheck) {\n \t\t\t\toutArr[i] = \"Bracket (End)\";\n \t\t\t\texitCheck = true;\n \t break;\n }\n \t\t }\n \t\t\n \t\t// Pre-defined Functions\n \t\tfor (int a = 0; a < abakada_pdf_basa.length; a++) {\t\t// Read Function \n \t\t\t if (stringCheck[i].equals(abakada_pdf_basa[a]) && !exitCheck) {\n \t\t\t\t outArr[i] = \"Read function\";\n \t\t\t\t exitCheck = true;\n \t break;\n \t\t\t }\n \t\t }\n \t\t\n \t\tfor (int a = 0; a < abakada_pdf_sulat.length; a++) {\t// Write Function\t \n \t\t\tif (stringCheck[i].equals(abakada_pdf_sulat[a]) && !exitCheck) {\n \t\t\t\t outArr[i] = \"Write function\";\n \t\t\t\texitCheck = true;\n \t break;\n \t\t\t}\n \t\t}\n \t\t\n \t\tif(!exitCheck) {\n \t\t\toutArr[i] = \"Constant Number\"; // next line if ever\n \t\t\t\n \t\t}\n \t\t\t\n \t \t}\n \t\n\t\t\telse if (checkConNum(stringCheck[i])) {\n outArr[i] = \"Constant Number\";\n\t\t\t}\n\t\t\t\n\t\t\telse if (checkVar(stringCheck[i])) {\n outArr[i] = \"Identifier\";\n\t\t\t}\n \n\t\t\telse {\n outArr[i] = \"Invalid Identifier\";\n\t\t\t}\n \n\t\t} // for loop\n\t\t\n\t\treturn outArr;\n\t}", "public abstract void createLongestRepeatedSubstring();", "public String lookupCodon( String codon )\n {\n // capitalize and replace U's with T's because the code tables are in terms of T's\n codon = codon.toUpperCase();\n codon = codon.replace('U','T');\n\n\n\n String letter = \"\";\n String outputStr = \"\";\n\n if (code.equals(\"Standard\"))\n {\n for (int i = 0; i < stdTranCodeAA.length(); i++)\n {\n\n letter = String.valueOf(stdTranCodeAA.charAt(i)); // takes one char as a string\n\n if ( stdTranCode[i].equals( codon ) )\n {\n for (int j = 0; j < stdTranCodeStart.length; j++)\n {\n if ( stdTranCodeStart[j].equals( codon ) )\n return (\"<B><FONT COLOR=red>\" + letter + \"</FONT></B>\"); // colors the start AA red\n }\n if (letter.equals(\"*\"))\n {\n if (stopFormat.length() > 0)\n return (\"<B><FONT COLOR=blue>\" + String.valueOf(stopFormat.charAt(0)) + \"</FONT></B>\");\n else\n return (\"<B><FONT COLOR=blue>*</B></FONT>\");\n }\n\n return letter; // found letter and it is not from a stop or start codon\n }\n else\n continue; // not found so continue searching\n }\n\n }\n\n else if (code.equals(\"Drosophila Mitochondrial\"))\n {\n for (int i = 0; i < drosMitoCodeAA.length(); i++)\n {\n\n letter = String.valueOf(drosMitoCodeAA.charAt(i)); // takes one char as a string\n\n if ( drosMitoCode[i].equals( codon ) )\n {\n if ( ( letter.equals(\"I\") ) || ( letter.equals(\"M\") ) )\n {\n return (\"<B><FONT COLOR=red>\" + letter + \"</FONT></B>\"); // colors the start AA red\n }\n if (letter.equals(\"*\"))\n {\n if (stopFormat.length() > 0)\n return (\"<B><FONT COLOR=blue>\" + String.valueOf(stopFormat.charAt(0)) + \"</FONT></B>\");\n else\n return (\"<B><FONT COLOR=blue>*</B></FONT>\");\n }\n\n return letter; // found letter and it is not from a stop or start codon\n }\n else\n continue; // not found so continue searching\n }\n\n }\n \n else if (code.equals(\"Vertebrate Mitochondrial\"))\n {\n for (int i = 0; i < vertMitoCodeAA.length(); i++)\n {\n\n letter = String.valueOf(vertMitoCodeAA.charAt(i)); // takes one char as a string\n\n if ( vertMitoCode[i].equals( codon ) )\n {\n for (int j = 0; j < vertMitoCodeStart.length; j++)\n {\n if ( vertMitoCodeStart[j].equals( codon ) )\n return (\"<B><FONT COLOR=red>\" + letter + \"</FONT></B>\"); // colors the start AA red\n }\n if (letter.equals(\"*\"))\n {\n if (stopFormat.length() > 0)\n return (\"<B><FONT COLOR=blue>\" + String.valueOf(stopFormat.charAt(0)) + \"</FONT></B>\");\n else\n return (\"<B><FONT COLOR=blue>*</B></FONT>\");\n }\n\n return letter; // found letter and it is not from a stop or start codon\n }\n else\n continue; // not found so continue searching\n }\n\n }\n\n else if (code.equals(\"Yeast Mitochondrial\"))\n {\n for (int i = 0; i < yeastMitoCodeAA.length(); i++)\n {\n\n letter = String.valueOf(yeastMitoCodeAA.charAt(i)); // takes one char as a string\n\n if ( yeastMitoCode[i].equals( codon ) )\n {\n for (int j = 0; j < yeastMitoCodeStart.length; j++)\n {\n if ( yeastMitoCodeStart[j].equals( codon ) )\n return (\"<B><FONT COLOR=red>\" + letter + \"</FONT></B>\"); // colors the start AA red\n }\n if (letter.equals(\"*\"))\n {\n if (stopFormat.length() > 0)\n return (\"<B><FONT COLOR=blue>\" + String.valueOf(stopFormat.charAt(0)) + \"</FONT></B>\");\n else\n return (\"<B><FONT COLOR=blue>*</B></FONT>\");\n }\n\n return letter; // found letter and it is not from a stop or start codon\n }\n else\n continue; // not found so continue searching\n }\n\n }\n\n else if (code.equals(\"Mold Protozoan Coelenterate Mycoplasma Mitochondrial\"))\n {\n for (int i = 0; i < moldProtoMitoCodeAA.length(); i++)\n {\n\n letter = String.valueOf(moldProtoMitoCodeAA.charAt(i)); // takes one char as a string\n\n if ( moldProtoMitoCode[i].equals( codon ) )\n {\n for (int j = 0; j < moldProtoMitoCodeStart.length; j++)\n {\n if ( moldProtoMitoCodeStart[j].equals( codon ) )\n return (\"<B><FONT COLOR=red>\" + letter + \"</FONT></B>\"); // colors the start AA red\n }\n if (letter.equals(\"*\"))\n {\n if (stopFormat.length() > 0)\n return (\"<B><FONT COLOR=blue>\" + String.valueOf(stopFormat.charAt(0)) + \"</FONT></B>\");\n else\n return (\"<B><FONT COLOR=blue>*</B></FONT>\");\n }\n\n return letter; // found letter and it is not from a stop or start codon\n }\n else\n continue; // not found so continue searching\n }\n\n }\n\n else if (code.equals(\"Invertebrate Mitochondrial\"))\n {\n for (int i = 0; i < invertMitoCodeAA.length(); i++)\n {\n\n letter = String.valueOf(invertMitoCodeAA.charAt(i)); // takes one char as a string\n\n if ( invertMitoCode[i].equals( codon ) )\n {\n for (int j = 0; j < invertMitoCodeStart.length; j++)\n {\n if ( invertMitoCodeStart[j].equals( codon ) )\n return (\"<B><FONT COLOR=red>\" + letter + \"</FONT></B>\"); // colors the start AA red\n }\n if (letter.equals(\"*\"))\n {\n if (stopFormat.length() > 0)\n return (\"<B><FONT COLOR=blue>\" + String.valueOf(stopFormat.charAt(0)) + \"</FONT></B>\");\n else\n return (\"<B><FONT COLOR=blue>*</B></FONT>\");\n }\n\n return letter; // found letter and it is not from a stop or start codon\n }\n else\n continue; // not found so continue searching\n }\n\n }\n\n else if (code.equals(\"Ciliate Dasycladacean Hexamita Nuclear\"))\n {\n for (int i = 0; i < cilDasHexNucCodeAA.length(); i++)\n {\n\n letter = String.valueOf(cilDasHexNucCodeAA.charAt(i)); // takes one char as a string\n\n if ( cilDasHexNucCode[i].equals( codon ) )\n {\n for (int j = 0; j < cilDasHexNucCodeStart.length; j++)\n {\n if ( cilDasHexNucCodeStart[j].equals( codon ) )\n return (\"<B><FONT COLOR=red>\" + letter + \"</FONT></B>\"); // colors the start AA red\n }\n if (letter.equals(\"*\"))\n {\n if (stopFormat.length() > 0)\n return (\"<B><FONT COLOR=blue>\" + String.valueOf(stopFormat.charAt(0)) + \"</FONT></B>\");\n else\n return (\"<B><FONT COLOR=blue>*</B></FONT>\");\n }\n\n return letter; // found letter and it is not from a stop or start codon\n }\n else\n continue; // not found so continue searching\n }\n\n }\n\n else if (code.equals(\"Echinoderm Mitochondrial\"))\n {\n for (int i = 0; i < echinoMitoCodeAA.length(); i++)\n {\n\n letter = String.valueOf(echinoMitoCodeAA.charAt(i)); // takes one char as a string\n\n if ( echinoMitoCode[i].equals( codon ) )\n {\n for (int j = 0; j < echinoMitoCodeStart.length; j++)\n {\n if ( echinoMitoCodeStart[j].equals( codon ) )\n return (\"<B><FONT COLOR=red>\" + letter + \"</FONT></B>\"); // colors the start AA red\n }\n if (letter.equals(\"*\"))\n {\n if (stopFormat.length() > 0)\n return (\"<B><FONT COLOR=blue>\" + String.valueOf(stopFormat.charAt(0)) + \"</FONT></B>\");\n else\n return (\"<B><FONT COLOR=blue>*</B></FONT>\");\n }\n\n return letter; // found letter and it is not from a stop or start codon\n }\n else\n continue; // not found so continue searching\n }\n\n }\n\n else if (code.equals(\"Euplotid Nuclear\"))\n {\n for (int i = 0; i < euplotidNucCodeAA.length(); i++)\n {\n\n letter = String.valueOf(euplotidNucCodeAA.charAt(i)); // takes one char as a string\n\n if ( euplotidNucCode[i].equals( codon ) )\n {\n if ( letter.equals(\"M\") )\n {\n return (\"<B><FONT COLOR=red>M</FONT></B>\"); // colors the start AA red\n }\n if (letter.equals(\"*\"))\n {\n if (stopFormat.length() > 0)\n return (\"<B><FONT COLOR=blue>\" + String.valueOf(stopFormat.charAt(0)) + \"</FONT></B>\");\n else\n return (\"<B><FONT COLOR=blue>*</B></FONT>\");\n }\n\n return letter; // found letter and it is not from a stop or start codon\n }\n else\n continue; // not found so continue searching\n }\n\n }\n\n else if (code.equals(\"Bacterial\"))\n {\n for (int i = 0; i < bacterialTranCodeAA.length(); i++)\n {\n\n letter = String.valueOf(bacterialTranCodeAA.charAt(i)); // takes one char as a string\n\n if ( bacterialTranCode[i].equals( codon ) )\n {\n for (int j = 0; j < bacterialTranCodeStart.length; j++)\n {\n if ( bacterialTranCodeStart[j].equals( codon ) )\n return (\"<B><FONT COLOR=red>\" + letter + \"</FONT></B>\"); // colors the start AA red\n }\n if (letter.equals(\"*\"))\n {\n if (stopFormat.length() > 0)\n return (\"<B><FONT COLOR=blue>\" + String.valueOf(stopFormat.charAt(0)) + \"</FONT></B>\");\n else\n return (\"<B><FONT COLOR=blue>*</B></FONT>\");\n }\n\n return letter; // found letter and it is not from a stop or start codon\n }\n else\n continue; // not found so continue searching\n }\n\n }\n\n else if (code.equals(\"Alternative Yeast Nuclear\"))\n {\n for (int i = 0; i < altYeastCodeAA.length(); i++)\n {\n\n letter = String.valueOf(altYeastCodeAA.charAt(i)); // takes one char as a string\n\n if ( altYeastCode[i].equals( codon ) )\n {\n for (int j = 0; j < altYeastCodeStart.length; j++)\n {\n if ( altYeastCodeStart[j].equals( codon ) )\n return (\"<B><FONT COLOR=red>\" + letter + \"</FONT></B>\"); // colors the start AA red\n }\n if (letter.equals(\"*\"))\n {\n if (stopFormat.length() > 0)\n return (\"<B><FONT COLOR=blue>\" + String.valueOf(stopFormat.charAt(0)) + \"</FONT></B>\");\n else\n return (\"<B><FONT COLOR=blue>*</B></FONT>\");\n }\n\n return letter; // found letter and it is not from a stop or start codon\n }\n else\n continue; // not found so continue searching\n }\n\n }\n\n else if (code.equals(\"Ascidian Mitochondrial\"))\n {\n for (int i = 0; i < ascidianMitoCodeAA.length(); i++)\n {\n\n letter = String.valueOf(ascidianMitoCodeAA.charAt(i)); // takes one char as a string\n\n if ( ascidianMitoCode[i].equals( codon ) )\n {\n for (int j = 0; j < ascidianMitoCodeStart.length; j++)\n {\n if ( ascidianMitoCodeStart[j].equals( codon ) )\n return (\"<B><FONT COLOR=red>\" + letter + \"</FONT></B>\"); // colors the start AA red\n }\n if (letter.equals(\"*\"))\n {\n if (stopFormat.length() > 0)\n return (\"<B><FONT COLOR=blue>\" + String.valueOf(stopFormat.charAt(0)) + \"</FONT></B>\");\n else\n return (\"<B><FONT COLOR=blue>*</B></FONT>\");\n }\n\n return letter; // found letter and it is not from a stop or start codon\n }\n else\n continue; // not found so continue searching\n }\n\n }\n\n else if (code.equals(\"Flatworm Mitochondrial\"))\n {\n for (int i = 0; i < flatMitoCodeAA.length(); i++)\n {\n\n letter = String.valueOf(flatMitoCodeAA.charAt(i)); // takes one char as a string\n\n if ( flatMitoCode[i].equals( codon ) )\n {\n for (int j = 0; j < flatMitoCodeStart.length; j++)\n {\n if ( flatMitoCodeStart[j].equals( codon ) )\n return (\"<B><FONT COLOR=red>\" + letter + \"</FONT></B>\"); // colors the start AA red\n }\n if (letter.equals(\"*\"))\n {\n if (stopFormat.length() > 0)\n return (\"<B><FONT COLOR=blue>\" + String.valueOf(stopFormat.charAt(0)) + \"</FONT></B>\");\n else\n return (\"<B><FONT COLOR=blue>*</B></FONT>\");\n }\n return letter; // found letter and it is not from a stop or start codon\n }\n else\n continue; // not found so continue searching\n }\n\n }\n\n else // (code.equals(\"Blepharisma Mitochondrial\"))\n {\n for (int i = 0; i < blephMitoCodeAA.length(); i++)\n {\n\n letter = String.valueOf(blephMitoCodeAA.charAt(i)); // takes one char as a string\n\n if ( blephMitoCode[i].equals( codon ) )\n {\n for (int j = 0; j < blephMitoCodeStart.length; j++)\n {\n if ( blephMitoCodeStart[j].equals( codon ) )\n return (\"<B><FONT COLOR=red>\" + letter + \"</FONT></B>\"); // colors the start AA red\n }\n if (letter.equals(\"*\"))\n {\n if (stopFormat.length() > 0)\n return (\"<B><FONT COLOR=blue>\" + String.valueOf(stopFormat.charAt(0)) + \"</FONT></B>\");\n else\n return (\"<B><FONT COLOR=blue>*</B></FONT>\");\n }\n return letter; // found letter and it is not from a stop or start codon\n }\n else\n continue; // not found so continue searching\n }\n\n }\n\n unknownStatus = 1; // encountered an unknown codon so print this in legend\n\n return \"<FONT COLOR=#ff6633><B>u</B></FONT>\"; // unknown codon\n\n\n }", "private boolean isSubSequence(char str1[], char str2[]) {\n int j = 0;\n int m = str1.length;\n int n = str2.length;\n for (int i=0; i<n&&j<m; i++)\n if (str1[j] == str2[i])\n j++;\n return (j==m);\n }", "private boolean comparacionOblicuaDI (String [] dna){\n int largo=3, repaso=1, aux=0, contador=0, fila, columna;\n boolean repetir;\n char caracter;\n do {\n do {\n repetir=true;\n if(repaso==1){\n fila=0;\n columna=largo + aux;\n }else{\n fila=dna.length-1-largo-aux;\n columna=dna.length-1;\n }\n\n caracter = dna[fila].charAt(columna);\n\n for (int i = 1; i <= (largo+aux); i++) {\n int colum=columna-i;\n int fil=fila+i;\n if((colum==dna.length-2 && fil==1) && repaso==1){\n repetir=false;\n break;\n }\n if (caracter != dna[fil].charAt(colum)) {\n contador = 0;\n\n if(((dna.length-largo)>(colum) && repaso==1) || ((dna.length-largo)<=(fil) && repaso!=1)){\n if((fil+colum)==dna.length-1){\n repetir=false;\n }\n break;\n }\n caracter = dna[fil].charAt(colum);\n\n } else {\n contador++;\n }\n if (contador == largo) {\n cantidadSec++;\n if(cantidadSec>1){\n return true;\n }\n if((fil+colum)==dna.length-1){\n repetir=false;\n }\n break;\n }\n }\n aux++;\n } while (repetir);\n repaso--;\n aux=0;\n\n }while(repaso>=0);\n return false;\n }", "@Test\r\n\tpublic void testPositiveGenerateStrings_2() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tcollector.checkThat(roc.generateStrings(10, 5, \"abcd\", false), notNullValue());\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "@Test\n public void shouldNotFindSubstringWithMismatchedFirstCharacterAtTheEndOfThString() {\n // Given\n String string = \"123ABc\";\n CharSequence charSequence = new StringBuilder(\"cBc\");\n\n // When\n boolean containsCharSequence = string.contains(charSequence);\n\n // Then\n assertFalse(containsCharSequence);\n }", "private static String getCorrespondingNEPosSegment(String textConcept, CustomXMLRepresentation nePosText, boolean isConcept) {\n\n\t\tString output = \"\";\n\n\t\t//textConcept = textConcept.replaceAll(\"\\\\p{Punct} \",\" $0 \");\n\t\t/*textConcept = textConcept.replaceAll(\"[.]\",\". \").replaceAll(\"[,]\",\", \").replaceAll(\"[']\",\"' \")\n\t\t\t\t.replaceAll(\"[\\\\[]\",\" [ \" ).replaceAll(\"[\\\\]]\",\" ] \").replaceAll(\"[(]\", \" ( \").replaceAll(\"[)]\",\" ) \")\n\t\t\t\t.replaceAll(\"[<]\", \" < \").replaceAll(\"[>]\", \" > \");*/\n\t\t//textConcept = textConcept.replaceAll(\"[\\\\.,']\",\"$0 \").replaceAll(\"[\\\\[\\\\](){}!@#$%^&*+=]\",\" $0 \");\n\t\ttextConcept = textConcept.replaceAll(\"[']\",\"$0 \").replaceAll(\"[\\\\[\\\\](){}!@#$%^&*+=]\",\" $0 \");\n\t\tString[] lemmas = textConcept.split(\" \");\n\t\tArrayList<String> wordList = new ArrayList(Arrays.asList(lemmas));\n\n\t\tnePosText.escapeXMLCharacters();\n\n\t\tboolean goOn = true;\n\t\t//while wordList is not empty, repeat\n\t\twhile(wordList.size()>0 && goOn){\n\n\t\t\tDocument docNePos = null;\n\t\t\ttry {\n\t\t\t\tDocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();\n\t\t\t\tDocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();\n\t\t\t\tInputStream streamNePos = new ByteArrayInputStream(nePosText.getXml().getBytes(StandardCharsets.UTF_8));\n\t\t\t\tdocNePos = docBuilder.parse(streamNePos);\n\t\t\t} catch (ParserConfigurationException | SAXException | IOException e) {\n\t\t\t\tSystem.err.print(\"KIndex :: Pipeline.getCorrespondingNEPosSegment() Could not create a document text.\");\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t\tNodeList npSegments = docNePos.getElementsByTagName(\"content\").item(0).getChildNodes(); // concept or text segments (children of content)\n\n\t\t\tfor (int i = 0; i < npSegments.getLength(); i++) {\n\t\t\t\tNode n = npSegments.item(i);\n\t\t\t\tif (n.getNodeType() == Node.ELEMENT_NODE) {\n\t\t\t\t\tElement segment = (Element) n;\n\t\t\t\t\tString tag = segment.getNodeName();\n\t\t\t\t\tString stLemma = (segment.hasAttribute(\"lemma\")) ? segment.getAttribute(\"lemma\") : \"\";\n\t\t\t\t\tString lemma = segment.getTextContent();\n\n\t\t\t\t\t//Debug\n\t\t\t\t\t//if (wordList.get(0).equals(\"take\")){\n\t\t\t\t\t//\tSystem.out.println(\"take!\");\n\t\t\t\t\t//}\n\n\t\t\t\t\tif ((wordList.size() == 0) && (tag.equals(\"Punctuation\"))){\n\t\t\t\t\t\toutput += lemma + \" \" ;\n\t\t\t\t\t\tnePosText.removeElement(\"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \">\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tint initSize = wordList.size();\n\t\t\t\t\tint initXMLSize = nePosText.getXml().length();\n\t\t\t\t\tif (wordList.get(0).replaceAll(\"[^a-zA-Z0-9 ]\", \"\").equals(\"\")){\n\t\t\t\t\t\twordList.remove(0);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (tag.equals(\"ne\")){\n\t\t\t\t\t\tString NEtype = segment.getAttribute(\"type\");\n\t\t\t\t\t\tNodeList NEchildren = segment.getChildNodes();\n\t\t\t\t\t\t//if this text segment is concept, do not add the NamedEntity tag.\n\t\t\t\t\t\tString NEstring = (isConcept) ? \"\" : \"<ne type=\\\"\" + NEtype + \"\\\">\";\n\t\t\t\t\t\tfor (int c = 0; c < NEchildren.getLength(); c++) {\n\t\t\t\t\t\t\tNode child = NEchildren.item(c);\n\t\t\t\t\t\t\tif (child.getNodeType() == Node.ELEMENT_NODE) {\n\t\t\t\t\t\t\t\tElement Echild = (Element) child;\n\t\t\t\t\t\t\t\tString Ctag = Echild.getNodeName();\n\t\t\t\t\t\t\t\tString OrigLemma = Echild.getAttribute(\"lemma\");\n\t\t\t\t\t\t\t\tString Clemma = Echild.getTextContent();\n\t\t\t\t\t\t\t\tif (wordList.get(0).replaceAll(\"[^a-zA-Z0-9 ]\", \"\").toLowerCase().equals(Clemma.replaceAll(\"[^a-zA-Z0-9 ]\", \"\").replaceAll(\" \",\"\").toLowerCase())) {\n\t\t\t\t\t\t\t\t\tNEstring += \"<\" + Ctag + \" lemma=\\\"\"+OrigLemma+\"\\\">\" + Clemma + \"</\" + Ctag + \"> \";\n\t\t\t\t\t\t\t\t\twordList.remove(0);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse if (!Clemma.equals(\"\")){\n\t\t\t\t\t\t\t\t\tNEstring += \"<\" + Ctag + \" lemma=\\\"\"+OrigLemma+\"\\\">\" + Clemma + \"</\" + Ctag + \"> \";\n\t\t\t\t\t\t\t\t\tif (wordList.get(0).contains(Clemma)){\n\t\t\t\t\t\t\t\t\t\twordList.set(0,wordList.get(0).replace(Clemma,\"\"));\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse if (Clemma.contains(wordList.get(0))){\n\t\t\t\t\t\t\t\t\t\tString ClemmaRemaining = Clemma.replaceAll(\"[^\\\\x00-\\\\x7F]\", \"\"); //replace all non-ascii characters\n\t\t\t\t\t\t\t\t\t\twhile (Clemma.contains(wordList.get(0))){\n\t\t\t\t\t\t\t\t\t\t\tClemmaRemaining = ClemmaRemaining.replace(wordList.get(0),\" \");\n\t\t\t\t\t\t\t\t\t\t\twordList.remove(0);\n\t\t\t\t\t\t\t\t\t\t\tif (Clemma.endsWith(wordList.get(0))){\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tClemmaRemaining = (ClemmaRemaining.startsWith(\" \")) ? ClemmaRemaining.replace(\" \",\"\") : ClemmaRemaining;\n\t\t\t\t\t\t\t\t\t\tif ((!ClemmaRemaining.equals(\"\")) && wordList.get(0).startsWith(ClemmaRemaining)){\n\t\t\t\t\t\t\t\t\t\t\twordList.set(0, wordList.get(0).replace(ClemmaRemaining,\"\"));\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t/*else if (Clemma.contains(wordList.get(0))){\n\t\t\t\t\t\t\t\t\twordList.remove(0);\n\t\t\t\t\t\t\t\t\tif (Clemma.endsWith(wordList.get(0))) {\n\t\t\t\t\t\t\t\t\t\tNEstring += \"<\" + Ctag + \" lemma=\\\"\" + OrigLemma + \"\\\">\" + Clemma + \"</\" + Ctag + \"> \";\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}*/\n\t\t\t\t\t\t\t\t/*else if ((!Clemma.replaceAll(\"[^a-zA-Z0-9 ]\", \"\").replaceAll(\" \",\"\").toLowerCase().equals(\"\")) &&\n\t\t\t\t\t\t\t\t\t\twordList.get(0).replaceAll(\"[^a-zA-Z0-9 ]\", \"\").toLowerCase().contains(Clemma.replaceAll(\"[^a-zA-Z0-9 ]\", \"\").replaceAll(\" \",\"\").toLowerCase())){\n\t\t\t\t\t\t\t\t\tNEstring += \"<\" + Ctag + \" lemma=\\\"\"+OrigLemma+\"\\\">\" + Clemma + \"</\" + Ctag + \"> \";\n\t\t\t\t\t\t\t\t\twordList.set(0,wordList.get(0).replace(OrigLemma,\"\"));\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\tNEstring += (isConcept) ? \"\" : \"</ne>\";\n\t\t\t\t\t\toutput += NEstring;\n\t\t\t\t\t\tNEstring = (isConcept) ? \"<ne type=\\\"\" + NEtype + \"\\\">\" + NEstring + \"</ne>\" : NEstring;\n\t\t\t\t\t\tnePosText.removeElement(NEstring);\n\n\t\t\t\t\t\t//avoid infinite loop\n\t\t\t\t\t\tif (wordList.size() == initSize && NEstring.length() == initXMLSize){\n\t\t\t\t\t\t\treturn \"--ERROR-- \\r\\n Error: 1200 \\r\\n In word:\" + wordList.get(0) + \", lemma:\"+lemma;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse if(tag.equals(\"NoPOS\") || tag.equals(\"Punctuation\")){\n\t\t\t\t\t\t//output += \"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \"> \";\n\t\t\t\t\t\toutput += lemma + \" \" ;\n\t\t\t\t\t\tnePosText.removeElement(\"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \">\");\n\t\t\t\t\t\tif (wordList.get(0).replaceAll(\"[^a-zA-Z0-9 ]\", \"\").toLowerCase().equals(lemma.toLowerCase())){\n\t\t\t\t\t\t\twordList.remove(0);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t//avoid infinite loop\n\t\t\t\t\t\telse if (nePosText.getXml().length() == initXMLSize){\n\t\t\t\t\t\t\treturn \"--ERROR-- \\r\\n Error: 1201 \\r\\n In word:\" + wordList.get(0) + \", lemma:\"+lemma +\"\\r\\n nePosText: \"+ nePosText.getXml();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse if (wordList.get(0).replaceAll(\"[^a-zA-Z0-9 ]\", \"\").toLowerCase().equals(lemma.replaceAll(\"[^a-zA-Z0-9 ]\", \"\").toLowerCase())) {\n\t\t\t\t\t\toutput += \"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \"> \";\n\t\t\t\t\t\twordList.remove(0);\n\t\t\t\t\t\tnePosText.removeElement(\"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \">\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t//we have the example of \"Cannot\" -> <MD>Can</MD><RB>not</RB>\n\t\t\t\t\t//in that case, in the first loop the first lemma will be added\n\t\t\t\t\t//in second loop the lemma will be added and wordList.get(0) will be removed\n\t\t\t\t\telse if (wordList.get(0).replaceAll(\"[^a-zA-Z0-9 ]\", \"\").toLowerCase().contains(lemma.replaceAll(\"[^a-zA-Z0-9 ]\", \"\").toLowerCase())){\n\t\t\t\t\t\tif (wordList.get(0).startsWith(lemma)){\n\t\t\t\t\t\t\toutput += \"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \"> \";\n\t\t\t\t\t\t\twordList.set(0,wordList.get(0).replaceFirst(Pattern.quote(lemma),\"\"));\n\t\t\t\t\t\t\tnePosText.removeElement(\"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \">\");\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (wordList.get(0).replaceAll(\"[^a-zA-Z0-9 ]\", \"\").toLowerCase().startsWith(lemma.replaceAll(\"[^a-zA-Z0-9 ]\", \"\").toLowerCase())){\n\t\t\t\t\t\t\toutput += \"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \"> \";\n\t\t\t\t\t\t\twordList.set(0,wordList.get(0).replaceFirst(lemma.replaceAll(\"[^a-zA-Z0-9 ]\", \"\"),\"\"));\n\t\t\t\t\t\t\tnePosText.removeElement(\"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \">\");\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (wordList.get(0).endsWith(lemma)){\n\t\t\t\t\t\t\toutput += \"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \"> \";\n\t\t\t\t\t\t\twordList.remove(0);\n\t\t\t\t\t\t\tnePosText.removeElement(\"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \">\");\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (wordList.get(0).replaceAll(\"[^a-zA-Z0-9 ]\", \"\").toLowerCase().endsWith(lemma.replaceAll(\"[^a-zA-Z0-9 ]\", \"\").toLowerCase())){\n\t\t\t\t\t\t\toutput += \"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \"> \";\n\t\t\t\t\t\t\twordList.remove(0);\n\t\t\t\t\t\t\tnePosText.removeElement(\"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \">\");\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if (lemma.contains(wordList.get(0))){\n\t\t\t\t\t\twhile(lemma.contains(wordList.get(0))){\n\t\t\t\t\t\t\tif (lemma.endsWith(wordList.get(0))) {\n\t\t\t\t\t\t\t\twordList.remove(0);\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\twordList.remove(0);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\toutput += \"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \"> \";\n\t\t\t\t\t\tnePosText.removeElement(\"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \">\");\n\t\t\t\t\t\tif (wordList.size() == 0){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if (lemma.contains(wordList.get(0).replaceAll(\"[^a-zA-Z0-9 ]\", \"\"))){\n\t\t\t\t\t\twhile(lemma.contains(wordList.get(0).replaceAll(\"[^a-zA-Z0-9 ]\", \"\"))){\n\t\t\t\t\t\t\tif (lemma.endsWith(wordList.get(0).replaceAll(\"[^a-zA-Z0-9 ]\", \"\"))) {\n\t\t\t\t\t\t\t\twordList.remove(0);\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\twordList.remove(0);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\toutput += \"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \"> \";\n\t\t\t\t\t\tnePosText.removeElement(\"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \">\");\n\t\t\t\t\t\tif (wordList.size() == 0){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t//avoid infinite loop\n\t\t\t\t\tif (wordList.size() == initSize){\n\t\t\t\t\t\treturn \"--ERROR-- \\r\\n Error: 1202 \\r\\n In word:\" + wordList.get(0) + \", lemma:\"+lemma;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{ //if n.getNodeType() != Node.ELEMENT_NODE\n\t\t\t\t\tif (npSegments.getLength() == 1){\n\t\t\t\t\t\tgoOn = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (wordList.size()>0 && wordList.get(0).replaceAll(\"[^a-zA-Z0-9 ]\", \"\").equals(\"\")){\n\t\t\t\twordList.remove(0);\n\t\t\t}\n\n\t\t\tif(npSegments.getLength() == 0 && wordList.size() == 1){\n\t\t\t\twordList.remove(0);\n\t\t\t}\n\t\t}\n\n\t\t//in case wordList is empty but the next element in nePosText is punctuation, this element has to be added in output\n\t\tDocument docNePos = null;\n\t\ttry {\n\t\t\tDocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();\n\t\t\tInputStream streamNePos = new ByteArrayInputStream(nePosText.getXml().getBytes(StandardCharsets.UTF_8));\n\t\t\tdocNePos = docBuilder.parse(streamNePos);\n\t\t} catch (ParserConfigurationException | SAXException | IOException e) {\n\t\t\tSystem.err.print(\"KIndex :: Pipeline.getCorrespondingNEPosSegment() Could not create a document text.\");\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tNodeList npSegments = docNePos.getElementsByTagName(\"content\").item(0).getChildNodes(); // concept or text segments (children of content)\n\t\tfor (int i = 0; i < npSegments.getLength(); i++) {\n\t\t\tNode n = npSegments.item(i);\n\t\t\tif (n.getNodeType() == Node.ELEMENT_NODE) {\n\t\t\t\tElement segment = (Element) n;\n\t\t\t\tString tag = segment.getNodeName();\n\t\t\t\tString lemma = segment.getTextContent();\n\t\t\t\tif (tag.equals(\"Punctuation\")){\n\t\t\t\t\toutput += lemma + \" \";\n\t\t\t\t\tnePosText.removeElement(\"<\" + tag + \" lemma=\\\"\"+lemma+\"\\\">\" + lemma + \"</\" + tag + \">\");\n\t\t\t\t}\n\t\t\t\tbreak; // it will break after the first time an element will be checked\n\t\t\t}\n\t\t}\n\n\n\n\t\treturn output;\n\t}", "public boolean doWeHaveSameStops(String corridorA, String corridorB);", "public static String alexBrokenContest(String s){\n\t\tString[] names={\"Danil\", \"Olya\", \"Slava\", \"Ann\",\"Nikita\"};\n\t\tint count=0;\n\t\tfor (int i=0;i<5 ;i++)\n\t\t{\n\t\t\t\n\t\t\tint index = s.indexOf(name[i]);\n\t\t\twhile (index!=-1)\n\t\t\t{\n\t\t\t\t\n\t\t\t\tcount++;\n\t\t\t\tindex=s.indexOf(name[i],index+1);\n\t\t\t}\n\t\t}\n\t\tif(count==1)\n\t\t{\n\t\t\n\t\tSystem.out.println(\"YES\");\n\t\t}\n\t\telse\n\t\t{\n\n\t\tSystem.out.println(\"NO\");\n\t\t}\n\t}", "@Test\n void testParseTestcaseFrom50Specification(){\n String testcase = \"\\r\\n\" +\n \"/ISk5\\\\2MT382-1000\\r\\n\" +\n \"\\r\\n\" +\n \"1-3:0.2.8(50)\\r\\n\" +\n \"0-0:1.0.0(101209113020W)\\r\\n\" +\n \"0-0:96.1.1(4B384547303034303436333935353037)\\r\\n\" +\n \"1-0:1.8.1(123456.789*kWh)\\r\\n\" +\n \"1-0:1.8.2(123456.789*kWh)\\r\\n\" +\n \"1-0:2.8.1(123456.789*kWh)\\r\\n\" +\n \"1-0:2.8.2(123456.789*kWh)\\r\\n\" +\n \"0-0:96.14.0(0002)\\r\\n\" +\n \"1-0:1.7.0(01.193*kW)\\r\\n\" +\n \"1-0:2.7.0(00.000*kW)\\r\\n\" +\n \"0-0:96.7.21(00004)\\r\\n\" +\n \"0-0:96.7.9(00002)\\r\\n\" +\n \"1-0:99.97.0(2)(0-0:96.7.19)(101208152415W)(0000000240*s)(101208151004W)(0000000301*s)\\r\\n\" +\n \"1-0:32.32.0(00002)\\r\\n\" +\n \"1-0:52.32.0(00001)\\r\\n\" +\n \"1-0:72.32.0(00000)\\r\\n\" +\n \"1-0:32.36.0(00000)\\r\\n\" +\n \"1-0:52.36.0(00003)\\r\\n\" +\n \"1-0:72.36.0(00000)\\r\\n\" +\n \"0-0:96.13.0(303132333435363738393A3B3C3D3E3F303132333435363738393A3B3C3D3E3F30313233343536373839\" +\n \"3A3B3C3D3E3F303132333435363738393A3B3C3D3E3F303132333435363738393A3B3C3D3E3F)\\r\\n\" +\n \"1-0:32.7.0(220.1*V)\\r\\n\" +\n \"1-0:52.7.0(220.2*V)\\r\\n\" +\n \"1-0:72.7.0(220.3*V)\\r\\n\" +\n \"1-0:31.7.0(001*A)\\r\\n\" +\n \"1-0:51.7.0(002*A)\\r\\n\" +\n \"1-0:71.7.0(003*A)\\r\\n\" +\n \"1-0:21.7.0(01.111*kW)\\r\\n\" +\n \"1-0:41.7.0(02.222*kW)\\r\\n\" +\n \"1-0:61.7.0(03.333*kW)\\r\\n\" +\n \"1-0:22.7.0(04.444*kW)\\r\\n\" +\n \"1-0:42.7.0(05.555*kW)\\r\\n\" +\n \"1-0:62.7.0(06.666*kW)\\r\\n\" +\n \"0-1:24.1.0(003)\\r\\n\" +\n \"0-1:96.1.0(3232323241424344313233343536373839)\\r\\n\" +\n \"0-1:24.2.1(101209112500W)(12785.123*m3)\\r\\n\" +\n \"!EF2F\\r\\n\" +\n \"\\r\\n\";\n DSMRTelegram dsmrTelegram = ParseDsmrTelegram.parse(testcase);\n\n // CHECKSTYLE.OFF: ParenPad\n assertEquals(\"/ISk5\\\\2MT382-1000\", dsmrTelegram.getRawIdent());\n assertEquals(\"ISK\", dsmrTelegram.getEquipmentBrandTag());\n assertEquals(\"MT382-1000\", dsmrTelegram.getIdent());\n\n assertEquals(\"5.0\", dsmrTelegram.getP1Version());\n assertEquals(ZonedDateTime.parse(\"2010-12-09T11:30:20+01:00\"), dsmrTelegram.getTimestamp());\n\n assertEquals(\"K8EG004046395507\", dsmrTelegram.getEquipmentId());\n assertEquals(\"0123456789:;<=>?0123456789:;<=>?0123456789:;<=>?0123456789:;<=>?0123456789:;<=>?\", dsmrTelegram.getMessage());\n\n assertEquals( 2, dsmrTelegram.getElectricityTariffIndicator());\n assertEquals( 123456.789, dsmrTelegram.getElectricityReceivedLowTariff(), 0.001);\n assertEquals( 123456.789, dsmrTelegram.getElectricityReceivedNormalTariff(), 0.001);\n assertEquals( 123456.789, dsmrTelegram.getElectricityReturnedLowTariff(), 0.001);\n assertEquals( 123456.789, dsmrTelegram.getElectricityReturnedNormalTariff(), 0.001);\n assertEquals( 1.193, dsmrTelegram.getElectricityPowerReceived(), 0.001);\n assertEquals( 0.0, dsmrTelegram.getElectricityPowerReturned(), 0.001);\n assertEquals( 4, dsmrTelegram.getPowerFailures());\n assertEquals( 2, dsmrTelegram.getLongPowerFailures());\n\n assertEquals(2, dsmrTelegram.getPowerFailureEventLogSize());\n\n List<PowerFailureEvent> powerFailureEventLog = dsmrTelegram.getPowerFailureEventLog();\n assertEquals(2, powerFailureEventLog.size());\n assertPowerFailureEvent(powerFailureEventLog.get(0), \"2010-12-08T15:20:15+01:00\", \"2010-12-08T15:24:15+01:00\", \"PT4M\");\n assertPowerFailureEvent(powerFailureEventLog.get(1), \"2010-12-08T15:05:03+01:00\", \"2010-12-08T15:10:04+01:00\", \"PT5M1S\");\n\n assertEquals( 2, dsmrTelegram.getVoltageSagsPhaseL1());\n assertEquals( 1, dsmrTelegram.getVoltageSagsPhaseL2());\n assertEquals( 0, dsmrTelegram.getVoltageSagsPhaseL3());\n assertEquals( 0, dsmrTelegram.getVoltageSwellsPhaseL1());\n assertEquals( 3, dsmrTelegram.getVoltageSwellsPhaseL2());\n assertEquals( 0, dsmrTelegram.getVoltageSwellsPhaseL3());\n assertEquals( 220.1, dsmrTelegram.getVoltageL1(), 0.001);\n assertEquals( 220.2, dsmrTelegram.getVoltageL2(), 0.001);\n assertEquals( 220.3, dsmrTelegram.getVoltageL3(), 0.001);\n assertEquals( 1, dsmrTelegram.getCurrentL1(), 0.001);\n assertEquals( 2, dsmrTelegram.getCurrentL2(), 0.001);\n assertEquals( 3, dsmrTelegram.getCurrentL3(), 0.001);\n assertEquals( 1.111, dsmrTelegram.getPowerReceivedL1(), 0.001);\n assertEquals( 2.222, dsmrTelegram.getPowerReceivedL2(), 0.001);\n assertEquals( 3.333, dsmrTelegram.getPowerReceivedL3(), 0.001);\n assertEquals( 4.444, dsmrTelegram.getPowerReturnedL1(), 0.001);\n assertEquals( 5.555, dsmrTelegram.getPowerReturnedL2(), 0.001);\n assertEquals( 6.666, dsmrTelegram.getPowerReturnedL3(), 0.001);\n assertEquals( 1, dsmrTelegram.getMBusEvents().size());\n\n assertEquals( 3, dsmrTelegram.getMBusEvents().get(1).getDeviceType());\n assertEquals(\"2222ABCD123456789\", dsmrTelegram.getMBusEvents().get(1).getEquipmentId());\n assertEquals(ZonedDateTime.parse(\"2010-12-09T11:25+01:00\"), dsmrTelegram.getMBusEvents().get(1).getTimestamp());\n assertEquals( 12785.123, dsmrTelegram.getMBusEvents().get(1).getValue(), 0.001);\n assertEquals( \"m3\", dsmrTelegram.getMBusEvents().get(1).getUnit());\n\n assertEquals(\"2222ABCD123456789\", dsmrTelegram.getGasEquipmentId());\n assertEquals(ZonedDateTime.parse(\"2010-12-09T11:25+01:00\"), dsmrTelegram.getGasTimestamp());\n assertEquals(12785.123, dsmrTelegram.getGasM3(), 0.001);\n\n assertEquals(\"EF2F\", dsmrTelegram.getCrc());\n\n // The CRC of this testcase is invalid.\n // Or better: I have not been able to copy it from the documentation and\n // recreate the \"original\" record for which the provided CRC was calculated.\n // assertTrue(dsmrTelegram.isValidCRC());\n }", "@SuppressWarnings(\"unused\")\n\tprivate static void testFromStringToCompiledByteCode()\n\t{\n\t\tfinal String test = \"do end\";\n\t\tfinal int[] raw = compileFromRawString(test);\n\t\tfinal OpCodeMapper mapper = OpCodeMapper_v5_1.getInstance();\n\n\t\tfor (int i = raw.length - 1; i < raw.length; i++)\n\t\t{\n\t\t\tfinal int ByteCode = raw[i] & 0x3f;\n\t\t\tfinal AbstractOpCodes OpType = mapper.getOpCodeFor(ByteCode);\n\t\t\tfinal InstructionTypes instType = mapper.getTypeOf(OpType);\n\t\t\tfinal Instruction curInstruct;\n\n\t\t\tswitch (instType)\n\t\t\t{\n\t\t\t\tcase iABC:\n\t\t\t\t{\n\t\t\t\t\tcurInstruct = RawInstruction_iABC.parseFromRaw(raw[i], mapper);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase iABx:\n\t\t\t\t{\n\t\t\t\t\tcurInstruct = RawInstruction_iABx.parseFromRaw(raw[i], mapper);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase iAsBx:\n\t\t\t\t{\n\t\t\t\t\tcurInstruct = RawInstruction_iAsBx.parseFromRaw(raw[i], mapper);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdefault:\n\t\t\t\t{\n\t\t\t\t\tthrow new IllegalArgumentException();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//System.out.println(curInstruct.toString() + \"\\r\\n\\r\\n\");\n\t\t}\n\t}", "@Test\n public void aminoListTest2(){\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(d);\n char[] expected = {'C','F','K','N','T'};\n assertArrayEquals(expected, first.aminoAcidList());\n }", "public static boolean goodEnd(String sequence) {\n\t\tint endGCCount = 0;\n\t\tfor (int i = sequence.length() - 5; i < sequence.length(); i++)\n\t\t\tif (sequence.charAt(i) == 'g' || sequence.charAt(i) == 'c') endGCCount++;\n\t\treturn endGCCount <= MAX_GC_END;\n\t}", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n StringReader stringReader0 = new StringReader(\"\\\"break\\\"\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(4, javaCharStream0.bufpos);\n assertEquals(1, javaCharStream0.getEndLine());\n }", "static boolean stop_instruction(String instruction){\n\t\tString code = instruction.split(\" \")[0];\n\t\tswitch(code){\n\t\tcase \"HLT\":\n\t\tcase \"RST\":\n\t\tcase \"RET\":\n\t\t\treturn true;\n\t\tdefault:\n\t\t\treturn false;\n\t\t}\n\t}", "public static String longestSubSequence(String str1, int st1, String str2, int st2) {\n if ((st1 >= str1.length()) || (st2 >= str2.length()))\n return null;\n String subStr1 = str1.substring(st1, str1.length());\n String subStr2 = str2.substring(st2, str2.length());\n String lonSeq1 = null;\n String lonSeq2 = null;\n if (subStr1.length() == 1) {\n lonSeq1 = (str2.contains(subStr1)) ? subStr1 : null;\n } else {\n lonSeq1 = longestSubSequence(str1, st1 + 1, str2, st2);\n if ((lonSeq1 != null) && (!lonSeq1.isEmpty())) {\n String sub2 = str2.substring(0, str2.indexOf(lonSeq1.charAt(0)));\n if ((sub2 != null) && (!sub2.isEmpty())) {\n if (sub2.contains(String.valueOf(str1.charAt(st1)))) {\n lonSeq1 = str1.charAt(st1) + lonSeq1;\n }\n }\n }\n }\n if (subStr2.length() == 1) {\n lonSeq2 = (str1.contains(subStr2)) ? subStr2 : null;\n } else {\n // find longestSequence with str1 index increased\n lonSeq2 = longestSubSequence(str1, st1, str2, st2 + 1);\n if ((lonSeq2 != null) && (!lonSeq2.isEmpty())) {\n // find the index of longSeq2 in str1\n String sub1 = str1.substring(0, str1.indexOf(lonSeq2.charAt(0)));\n if ((sub1 != null) && (!sub1.isEmpty())) {\n if (sub1.contains(String.valueOf(str2.charAt(st2)))) {\n lonSeq2 = str2.charAt(st2) + lonSeq2;\n }\n }\n }\n\n }\n\n if ((lonSeq1 == null) || (lonSeq1.isEmpty())) return lonSeq2;\n if ((lonSeq2 == null) || (lonSeq2.isEmpty())) return lonSeq1;\n return (lonSeq1.length() > lonSeq2.length()) ? lonSeq1 : lonSeq2;\n }", "public String guessSequenceType(final String seq) {\n\n\t int canonicalNucStates = 0;\n\t int undeterminedStates = 0;\n\t // true length, excluding any gaps\n\t int sequenceLength = seq.length();\n\t final int seqLen = sequenceLength;\n\n\t boolean onlyValidNucleotides = true;\n\t boolean onlyValidAminoAcids = true;\n\n\t // do not use toCharArray: it allocates an array size of sequence\n\t for(int k = 0; (k < seqLen) && (onlyValidNucleotides || onlyValidAminoAcids); ++k) {\n\t final char c = seq.charAt(k);\n\t final boolean isNucState = (\"ACGTUXNacgtuxn?_-\".indexOf(c) > -1);\n\t final boolean isAminoState = true;\n\n\t onlyValidNucleotides &= isNucState;\n\t onlyValidAminoAcids &= isAminoState;\n\n\t if (onlyValidNucleotides) {\n\t assert(isNucState);\n\t if ((\"ACGTacgt\".indexOf(c) > -1)) {\n\t ++canonicalNucStates;\n\t } else {\n\t if ((\"?_-\".indexOf(c) > -1)) {\n\t --sequenceLength;\n\t } else if( (\"UXNuxn\".indexOf(c) > -1)) {\n\t ++undeterminedStates;\n\t }\n\t }\n\t }\n\t }\n\n\t String result = \"aminoacid\";\n\t if (onlyValidNucleotides) { // only nucleotide states\n\t // All sites are nucleotides (actual or ambigoues). If longer than 100 sites, declare it a nuc\n\t if( sequenceLength >= 100 ) {\n\t result = \"nucleotide\";\n\t } else {\n\t // if short, ask for 70% of ACGT or N\n\t final double threshold = 0.7;\n\t final int nucStates = canonicalNucStates + undeterminedStates;\n\t // note: This implicitely assumes that every valid nucleotide\n\t // symbol is also a valid amino acid. This is true since we\n\t // added support for the 21st amino acid, U (Selenocysteine)\n\t // in AminoAcids.java.\n\t result = nucStates >= sequenceLength * threshold ? \"nucleotide\" : \"aminoacid\";\n\t }\n\t } else if (onlyValidAminoAcids) {\n\t result = \"aminoacid\";\n\t } else {\n\t result = null;\n\t }\n\t return result;\n\t }", "@Test\r\n\tpublic void testPositiveGenerateStrings_3() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tString[] response = roc.generateStrings(10, 5, \"abcd\", false, identifier);\r\n\t\t\t\tcollector.checkThat(response, notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tString[] response2 = roc.generateStrings(10, 5, \"abcd\", false, identifier);\r\n\t\t\t\tcollector.checkThat(response, equalTo(response2));\r\n\t\t\t\r\n\t\t\t\tresponse = roc.generateStrings(10, 5, \"abcd\", false, date);\r\n\t\t\t\tcollector.checkThat(response, notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tresponse2 = roc.generateStrings(10, 5, \"abcd\", false, date);\r\n\t\t\t\tcollector.checkThat(response, equalTo(response2));\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "public static boolean goodRuns(String sequence) {\n\t\tString run = sequence.charAt(0) + \"\";\n\t\tint longestRun = 0;\n\t\tfor (int i = 1; i < sequence.length(); i++) {\n\t\t\tif (run.contains(sequence.charAt(i) + \"\")) run += sequence.charAt(i);\n\t\t\telse {\n\t\t\t\tif (longestRun < run.length()) longestRun = run.length();\n\t\t\t\trun = sequence.charAt(i) + \"\";\n\t\t\t}\n\t\t}\n\t\treturn longestRun <= MAX_RUN;\n\t}", "@Test\n public void testConstructorTransformations() {\n\n String t1 = \"A C G T A C G T A A A A\";\n Sequence seq1 = new Sequence(\"t1\", t1, five);\n assertTrue(s1.equals(seq1.sequence()));\n\n String t2 = \"acgtacgtaaaa\";\n Sequence seq2 = new Sequence(\"t2\", t2, five);\n assertTrue(s1.equals(seq2.sequence()));\n\n }", "private boolean comparacionOblicuaID(String[] dna) {\n boolean repetir;\n int aux = 0;\n final int CASO = 3;\n int largo = dna.length - CASO - 1;\n int repaso = 1, fila,columna;\n do {\n do {\n repetir = true;\n if (repaso == 1) {\n fila = 0;\n columna = largo - aux;\n } else {\n fila = largo - aux;\n columna = 0;\n }\n for (int i = 0; i <= (CASO + aux); i += 2) {\n int colum = columna + i;\n int fil = fila + i;\n if ((colum) == (fil) && repaso == 1) {\n repetir = false; break;\n }\n if (((dna.length-CASO)>=colum && repaso==1) || ((dna.length-CASO)>=fil && repaso==0)) {\n if (dna[fil].charAt(colum) == dna[fil + 2].charAt(colum + 2)) {\n if (dna[fil].charAt(colum) == dna[fil + 1].charAt(colum + 1)) {\n if (((fil - 1) >= 0 && (colum - 1) >= 0) && (dna[fil].charAt(colum) == dna[fil - 1].charAt(colum - 1))) {\n cantidadSec++;\n if(cantidadSec>1)return true;\n if (colum == fil) repetir = false;\n break;\n } else {\n if (((dna.length - CASO+1) >= (colum + 3) && repaso == 1) || ((dna.length-1) >= (fil + 3) && repaso == 0)) {\n if ((dna[fil].charAt(colum) == dna[fil + 3].charAt(colum + 3))) {\n cantidadSec++;\n if(cantidadSec>1)return true;\n if (colum == fil) repetir = false;\n break;\n }\n }\n }\n }\n }\n } else {\n if (colum == fil) repetir = false;\n }\n }\n aux++;\n } while (repetir);\n repaso--;\n aux = 0;\n } while (repaso >= 0);\n return false;\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n StringReader stringReader0 = new StringReader(\";{\\\"9n/s(2C'#tQX*\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.ReInit(javaCharStream0);\n assertEquals(0, javaCharStream0.getBeginLine());\n }", "public char dna_to_code (String codon) {\n\r\n String code = (String) dna_to_code.get(codon.toUpperCase());\r\n if (code == null) {\r\n // failed lookup; sequence with Ns, etc\r\n return '?';\r\n } else if (code.length() == 1) {\r\n return code.charAt(0);\r\n } else if (code.equals(STOP_STRING)) {\r\n return STOP_CODE;\r\n } else {\r\n System.out.println(\"dna_to_code: wtf???\"); // debug\r\n }\r\n return '?';\r\n }", "@Test\n\tpublic void testRealWorldCase_uc010nov_3() throws InvalidGenomeChange {\n\t\tthis.builderForward = TranscriptModelFactory\n\t\t\t\t.parseKnownGenesLine(\n\t\t\t\t\t\trefDict,\n\t\t\t\t\t\t\"uc010nov.3\tchrX\t+\t103031438\t103047547\t103031923\t103045526\t8\t103031438,103031780,103040510,103041393,103042726,103043365,103044261,103045454,\t103031575,103031927,103040697,103041655,103042895,103043439,103044327,103047547,\tP60201\tuc010nov.3\");\n\t\tthis.builderForward\n\t\t.setSequence(\"atggcttctcacgcttgtgctgcatatcccacaccaattagacccaaggatcagttggaagtttccaggacatcttcattttatttccaccctcaatccacatttccagatgtctctgcagcaaagcgaaattccaggagaagaggacaaagatactcagagagaaaaagtaaaagaccgaagaaggaggctggagagaccaggatccttccagctgaacaaagtcagccacaaagcagactagccagccggctacaattggagtcagagtcccaaagacatgggcttgttagagtgctgtgcaagatgtctggtaggggccccctttgcttccctggtggccactggattgtgtttctttggggtggcactgttctgtggctgtggacatgaagccctcactggcacagaaaagctaattgagacctatttctccaaaaactaccaagactatgagtatctcatcaatgtgatccatgccttccagtatgtcatctatggaactgcctctttcttcttcctttatggggccctcctgctggctgagggcttctacaccaccggcgcagtcaggcagatctttggcgactacaagaccaccatctgcggcaagggcctgagcgcaacggtaacagggggccagaaggggaggggttccagaggccaacatcaagctcattctttggagcgggtgtgtcattgtttgggaaaatggctaggacatcccgacaagtttgtgggcatcacctatgccctgaccgttgtgtggctcctggtgtttgcctgctctgctgtgcctgtgtacatttacttcaacacctggaccacctgccagtctattgccttccccagcaagacctctgccagtataggcagtctctgtgctgatgccagaatgtatggtgttctcccatggaatgctttccctggcaaggtttgtggctccaaccttctgtccatctgcaaaacagctgagttccaaatgaccttccacctgtttattgctgcatttgtgggggctgcagctacactggtttccctgctcaccttcatgattgctgccacttacaactttgccgtccttaaactcatgggccgaggcaccaagttctgatcccccgtagaaatccccctttctctaatagcgaggctctaaccacacagcctacaatgctgcgtctcccatcttaactctttgcctttgccaccaactggccctcttcttacttgatgagtgtaacaagaaaggagagtcttgcagtgattaaggtctctctttggactctcccctcttatgtacctcttttagtcattttgcttcatagctggttcctgctagaaatgggaaatgcctaagaagatgacttcccaactgcaagtcacaaaggaatggaggctctaattgaattttcaagcatctcctgaggatcagaaagtaatttcttctcaaagggtacttccactgatggaaacaaagtggaaggaaagatgctcaggtacagagaaggaatgtctttggtcctcttgccatctataggggccaaatatattctctttggtgtacaaaatggaattcattctggtctctctattaccactgaagatagaagaaaaaagaatgtcagaaaaacaataagagcgtttgcccaaatctgcctattgcagctgggagaagggggtcaaagcaaggatctttcacccacagaaagagagcactgaccccgatggcgatggactactgaagccctaactcagccaaccttacttacagcataagggagcgtagaatctgtgtagacgaagggggcatctggccttacacctcgttagggaagagaaacagggtgttgtcagcatcttctcactcccttctccttgataacagctaccatgacaaccctgtggtttccaaggagctgagaatagaaggaaactagcttacatgagaacagactggcctgaggagcagcagttgctggtggctaatggtgtaacctgagatggccctctggtagacacaggatagataactctttggatagcatgtctttttttctgttaattagttgtgtactctggcctctgtcatatcttcacaatggtgctcatttcatgggggtattatccattcagtcatcgtaggtgatttgaaggtcttgatttgttttagaatgatgcacatttcatgtattccagtttgtttattacttatttggggttgcatcagaaatgtctggagaataattctttgattatgactgttttttaaactaggaaaattggacattaagcatcacaaatgatattaaaaattggctagttgaatctattgggattttctacaagtattctgcctttgcagaaacagatttggtgaatttgaatctcaatttgagtaatctgatcgttctttctagctaatggaaaatgattttacttagcaatgttatcttggtgtgttaagagttaggtttaacataaaggttattttctcctgatatagatcacataacagaatgcaccagtcatcagctattcagttggtaagcttccaggaaaaaggacaggcagaaagagtttgagacctgaatagctcccagatttcagtcttttcctgtttttgttaactttgggttaaaaaaaaaaaaagtctgattggttttaattgaaggaaagatttgtactacagttcttttgttgtaaagagttgtgttgttcttttcccccaaagtggtttcagcaatatttaaggagatgtaagagctttacaaaaagacacttgatacttgttttcaaaccagtatacaagataagcttccaggctgcatagaaggaggagagggaaaatgttttgtaagaaaccaatcaagataaaggacagtgaagtaatccgtaccttgtgttttgttttgatttaataacataacaaataaccaacccttccctgaaaacctcacatgcatacatacacatatatacacacacaaagagagttaatcaactgaaagtgtttccttcatttctgatatagaattgcaattttaacacacataaaggataaacttttagaaacttatcttacaaagtgtattttataaaattaaagaaaataaaattaagaatgttctcaatcaaaaaaaaaaaaaaa\"\n\t\t\t\t.toUpperCase());\n\t\tthis.builderForward.setGeneSymbol(\"PLP1\");\n\t\tthis.infoForward = builderForward.build();\n\t\t// RefSeq NM_001128834.1\n\n\t\tGenomeChange change1 = new GenomeChange(new GenomePosition(refDict, '+', refDict.contigID.get(\"X\"), 103041655,\n\t\t\t\tPositionType.ONE_BASED), \"GGTGATC\", \"A\");\n\t\tAnnotation annotation1 = new BlockSubstitutionAnnotationBuilder(infoForward, change1).build();\n\t\tAssert.assertEquals(infoForward.accession, annotation1.transcript.accession);\n\t\tAssert.assertEquals(AnnotationLocation.INVALID_RANK, annotation1.annoLoc.rank);\n\t\tAssert.assertEquals(\"c.453_453+6delinsA\", annotation1.ntHGVSDescription);\n\t\tAssert.assertEquals(\"p.=\", annotation1.aaHGVSDescription);\n\t\tAssert.assertEquals(ImmutableSortedSet.of(VariantType.NON_FS_SUBSTITUTION, VariantType.SPLICE_DONOR),\n\t\t\t\tannotation1.effects);\n\t}", "private boolean prepareInput(SequenceI[] seqs, int minlen)\n {\n int nseqs = 0;\n if (minlen < 0)\n {\n throw new Error(\n \"Implementation error: minlen must be zero or more.\");\n }\n for (int i = 0; i < seqs.length; i++)\n {\n if (seqs[i].getEnd() - seqs[i].getStart() > minlen - 1)\n {\n nseqs++;\n }\n }\n boolean valid = nseqs > 1; // need at least two seqs\n vamsas.objects.simple.Sequence[] seqarray = (valid) ? new vamsas.objects.simple.Sequence[nseqs]\n : null;\n for (int i = 0, n = 0; i < seqs.length; i++)\n {\n\n String newname = jalview.analysis.SeqsetUtils.unique_name(i); // same\n // for\n // any\n // subjob\n SeqNames.put(newname,\n jalview.analysis.SeqsetUtils.SeqCharacterHash(seqs[i]));\n if (valid && seqs[i].getEnd() - seqs[i].getStart() > minlen - 1)\n {\n seqarray[n] = new vamsas.objects.simple.Sequence();\n seqarray[n].setId(newname);\n seqarray[n++].setSeq((submitGaps) ? seqs[i].getSequenceAsString()\n : AlignSeq.extractGaps(jalview.util.Comparison.GapChars,\n seqs[i].getSequenceAsString()));\n }\n else\n {\n String empty = null;\n if (seqs[i].getEnd() >= seqs[i].getStart())\n {\n empty = (submitGaps) ? seqs[i].getSequenceAsString() : AlignSeq\n .extractGaps(jalview.util.Comparison.GapChars,\n seqs[i].getSequenceAsString());\n }\n emptySeqs.add(new String[]\n { newname, empty });\n }\n }\n this.seqs = new vamsas.objects.simple.SequenceSet();\n this.seqs.setSeqs(seqarray);\n return valid;\n }", "@Test\n public void prefixTrimNotReachingSequencer() throws Exception {\n final int tableSize = PARAMETERS.NUM_ITERATIONS_LOW;\n CorfuRuntime rt = getNewRuntime();\n\n TestRule dropSequencerTrim = new TestRule()\n .requestMatches(msg -> msg.getPayload().getPayloadCase()\n .equals(CorfuMessage.RequestPayloadMsg.PayloadCase.SEQUENCER_TRIM_REQUEST))\n .drop();\n addClientRule(rt, dropSequencerTrim);\n\n try {\n PersistentCorfuTable<String, Long> tableA = openTable(rt, streamNameA);\n PersistentCorfuTable<String, Long> tableB = openTable(rt, streamNameB);\n\n // thread 1: populates the maps with mapSize items\n scheduleConcurrently(1, ignored_task_num -> {\n populateMaps(tableSize, tableA, tableB);\n });\n\n // thread 2: periodic checkpoint of the maps, repeating ITERATIONS_VERY_LOW times,\n // and immediate prefix-trim of the log up to the checkpoint position\n scheduleConcurrently(1, ignored_task_num -> {\n mapCkpointAndTrim(rt, tableA, tableB);\n });\n\n // thread 3: repeated ITERATION_LOW times starting a fresh runtime, and instantiating the maps.\n // they should rebuild from the latest checkpoint (if available).\n // performs some sanity checks on the map state\n\n // In this test checkpoints and trims are happening in a loop for several iterations,\n // so a trim exception can occur if after loading from the latest checkpoint,\n // updates to the stream have been already trimmed (1st trimmedException), the stream\n // is reset, and on the second iteration the same scenario can happen (2nd trimmedException)\n // which is the total number of retries.\n scheduleConcurrently(PARAMETERS.NUM_ITERATIONS_LOW, ignored_task_num -> {\n validateMapRebuild(tableSize, false, true);\n });\n\n executeScheduled(PARAMETERS.CONCURRENCY_SOME, PARAMETERS.TIMEOUT_LONG);\n\n // Verify that last trim cycle completed (async task) before validating map rebuild\n Token currentTrimMark = Token.UNINITIALIZED;\n while(currentTrimMark.getSequence() != lastValidCheckpoint.getSequence() + 1L) {\n currentTrimMark = getNewRuntime().getAddressSpaceView().getTrimMark();\n }\n\n // finally, after all three threads finish, again we start a fresh runtime and instantiate the maps.\n // This time we check that the new map instances contain all values\n validateMapRebuild(tableSize, true, false);\n } finally {\n rt.shutdown();\n }\n }", "public int findGeneStop(int geneStart)\n {\n //TODO: find the location of the next stop codon (TGA/TAA/TAG)\n // after the start of the gene.\n return -1;\n }", "@Test(timeout = 4000)\n public void test002() throws Throwable {\n String string0 = SQLUtil.substituteMarkers(\"create unique indexalter tableoeqdkmcg0dtw\", \"05#)Ij0`/j^^LJ{\", \"/2Wp5dC9l(vh\");\n assertEquals(\"create unique indexalter tableoeqdkmcg0dtw\", string0);\n }", "@Test void test2() {\n\t\tAztecCode marker = new AztecEncoder().addLower(\"c\").addPunctuation(\"!!\").addMixed(\"^\").addPunctuation(\"!!\").fixate();\n\n\t\tclearMarker(marker);\n\n\t\tassertTrue(new AztecDecoder().process(marker));\n\n\t\tassertEquals(\"c!!^!!\", marker.message);\n\t\tassertEquals(0, marker.totalBitErrors);\n\t}", "@Test\n\tpublic void predFuncTest() \n\t{\n\t\tPath filePath = Paths.get(\"src/test/testfile/test.txt\");\n\t\tScanner scanner;\n\t\ttry {\n\t\t\tscanner = new Scanner(filePath);\n\t\t\tTranslator translator = new Translator();\n\t\t\tList<String> startCodons = new ArrayList<String>();\n\t\t\tstartCodons.add(\"ATG\");\n\t\t\tList<List<String>> result = translator.translation(scanner.next(), startCodons );\n\t\t\tfor(List<String> r : result){\n\t\t\t\tfor(String s : r){\n\t\t\t\t\tif(scanner.hasNext()){\n\t\t\t\t\t\tassertEquals(s, scanner.next());\n\t\t\t\t\t\t\n\t\t\t\t\t}else{\n\t\t\t\t\t\tfail();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t \n\n\t\t} catch (IOException e) {\n\t\t\tfail(e.getLocalizedMessage());\n\t\t}\n\t}", "public static void main(String args[]) {\n Scanner in=new Scanner(System.in);\n String str1=in.nextLine();\n String str2=in.nextLine();\n int slen1=str1.length();\n \n int slen2=str2.length();\n int count=0;\n for(int i=0;i<(slen1-slen2+1);i++)\n {\n int num=1;\n for(int j=0;j<slen2;j++)\n {\n if(str1.charAt(i+j)!=(str2.charAt(j)))\n {\n num=0;\n }\n \n } \n if(num==1)\n {\n count++;\n }\n \n }\n System.out.println(count); \n }", "@Test\r\n\tpublic void testL1IsSubSeqOfL2WithSeveralOccurenceOfOneInL2() {\r\n\t\tl1 = Arrays.asList(2, 4, 5,5,5,5);\r\n\t\tl2 = Arrays.asList(2, 3, 1, 5, 1, 3);\r\n\t\tassertFalse(\"The list L1 is a subseq of L2\", sequencer.subSeq(l1, l2));\r\n\t}", "SpCharInSeq create(@Valid SpCharInSeq spCharInSeq);", "public static void main(String[] args) {\n\r\n\t\tString s1=\"abcd\";\r\n\t\tString s2=\"vbvabcdqwe\";\r\n\t\tchar arr1[]=s1.toCharArray();\r\n\t\tchar arr2[]=s2.toCharArray();\r\n\r\n\t\tint flag=0;\r\n\t\tfor(int i=0;i<arr1.length;i++)\r\n\t\t{\r\n\t\t\tfor(int j=i;j<arr2.length;j++)\r\n\t\t\t{\r\n\t\t\t\tif(arr1[i]==arr2[j])\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t}\t\r\n\t\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}", "public static void main(String[] args) {\r\n\t\t P187RepeatedDNASequences p = new P187RepeatedDNASequences();\r\n\t\t List<String> r = p.findRepeatedDnaSequences(\"AAAAACCCCCAAAAACCCCCCAAAAAGGGTTT\"); //\r\n\t\t for(String t : r) {\r\n\t\t\t System.out.println(t);\t\t\t \r\n\t\t }\r\n\t }", "@Override\n\tprotected String getCreateSequenceString(String sequenceName) {\n\t\tsequenceName = sequenceName.replaceFirst(\".*\\\\.\", \"\");\n\t\treturn \"create sequence \" + sequenceName + \" start with 999\";\n\t}", "public static void main(String[] args) {\n\t\tString text = \"abcdefgghijkfil\";\r\n\t\tboolean flag2 = ((new Uniquechar1_1(text)).detect());\r\n\t\tSystem.out.println(flag2);\r\n\r\n\t}", "@Test(timeout = 4000)\n public void test20() throws Throwable {\n StringReader stringReader0 = new StringReader(\"0(Hu\");\n StreamTokenizer streamTokenizer0 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer1 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer2 = new StreamTokenizer(stringReader0);\n JSTerm jSTerm0 = new JSTerm(streamTokenizer0);\n stringReader0.reset();\n StreamTokenizer streamTokenizer3 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer4 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer5 = new StreamTokenizer(stringReader0);\n streamTokenizer0.commentChar((-4));\n StreamTokenizer streamTokenizer6 = new StreamTokenizer(stringReader0);\n streamTokenizer6.ordinaryChars((-1), (-322070664));\n streamTokenizer1.parseNumbers();\n jSTerm0.add((Object) \"JSTerm: Error reading control parameters: \");\n StreamTokenizer streamTokenizer7 = new StreamTokenizer(stringReader0);\n streamTokenizer7.pushBack();\n streamTokenizer1.nextToken();\n StreamTokenizer streamTokenizer8 = new StreamTokenizer(stringReader0);\n streamTokenizer2.slashSlashComments(false);\n JSTerm jSTerm1 = new JSTerm(streamTokenizer5);\n streamTokenizer1.slashStarComments(false);\n streamTokenizer3.eolIsSignificant(false);\n streamTokenizer7.commentChar((-4));\n StreamTokenizer streamTokenizer9 = new StreamTokenizer(stringReader0);\n JSSubstitution jSSubstitution0 = new JSSubstitution();\n jSSubstitution0.listIterator();\n JSSubstitution jSSubstitution1 = jSTerm1.matches((JSPredicateForm) jSTerm0, jSSubstitution0);\n assertTrue(jSSubstitution1.fail());\n }", "public static String instrLogic(String curr_instr){\n Log.d(\"instrLogic\", \"doing logic\");\n if(prev_instr.equalsIgnoreCase(\"Connected\"))return curr_instr;\n else{\n //doing something, check that we are not stopping\n if(!curr_instr.equals(\"done\")){\n //check if we are stopping some action\n if(curr_instr.contains(\"done\")){\n curr_instr = curr_instr.replace(\"done\", \"\");\n prev_instr = prev_instr.replace(curr_instr,\"\");\n }else prev_instr += curr_instr;\n }else prev_instr = curr_instr;\n }\n Log.d(\"Leaving instrLogic\", \"Returning: \" + prev_instr);\n return prev_instr;\n }", "public static void splitOnVoid(String input, String pathToSave) {\n int testStartIndex = 0;\n int testEndIndex = 0;\n\n int fileIndexName = 0;\n boolean foundTest = false;\n String testName = \"\";\n String overRComp = \"Override\";\n int caseCounter = 0;\n for (int i = 0; i < input.length(); i++) {\n try {\n // void is used as a delimiter between tests\n\n if (i <= input.length() - 4 &&\n input.substring(i, i + 4).equals(\"void\") &&\n input.substring(i - 7, i).equals(\"public \") &&\n !input.substring(i - 28, i - 20).equals(overRComp)) {\n String a = input.substring(i - 28, i - 20);\n if (!foundTest) {\n testStartIndex = i - 7;\n foundTest = true;\n boolean foundName = false;\n for (int x = 1; x < input.length() && !foundName; x++) {\n if (input.charAt(i + x) == '(') {\n foundName = true;\n testName = input.substring(i + 5, i + x);\n }\n }\n } else {\n boolean foundEnd = false;\n for (int y = 1; y < i && !foundEnd; y++) {\n Character compare = input.charAt(i - y);\n Character comparator = '}';\n if (compare.equals(comparator)) {\n testEndIndex = i - y;\n foundEnd = true;\n foundTest = false;\n }\n }\n\n\n prepareForPrint(testName, input, testStartIndex,testEndIndex, pathToSave);\n if (i != input.length() - 1) {\n i--;\n }\n }\n } else if (i == input.length() - 1) {\n boolean foundEnd = false;\n boolean foundClass = false;\n\n\n for ( int x = 1; !foundEnd && i - x != testStartIndex; x++) {\n Character compare = input.charAt(i - x);\n Character comparator = '}';\n\n if (compare.equals(comparator) && !foundClass) {\n foundClass = true;\n continue;\n }\n if (foundClass && compare.equals(comparator)) {\n foundEnd = true;\n testEndIndex = (i - x);\n }\n }\n if (foundEnd) {\n prepareForPrint(testName, input, testStartIndex,testEndIndex, pathToSave);\n }\n\n }\n } catch (StringIndexOutOfBoundsException e) {\n e.printStackTrace();\n System.out.println(pathToSave + \"_\" + testName);\n\n }\n }\n }", "boolean generateDFA(){\n\t\tdfa_start=new DFA_State();\t\t\n\t\tfor(ReservedWord res:table_res){\n\t\t\tint index=0,length;\n\t\t\tchar chr;\n\t\t\tString str;\n\t\t\tDFA_State dfa=new DFA_State();\n\t\t\t\n\t\t\tif(res.value.isEmpty())\n\t\t\t\tcontinue;\n\t\t\tstr=res.value;\n\t\t\tlength=str.length();\n\t\t\tchr=str.charAt(0);//first char\n\t\t\tif(!dfa_start.dfa_edges.containsKey(chr)){\n\t\t\t\tdfa_start.dfa_edges.put(chr, new DFA_State());\t\t\t\t\n\t\t\t}\n\t\t\tdfa=dfa_start.dfa_edges.get(chr);\t\t\t\n\t\t\twhile(++index < length){\n\t\t\t\tchr=str.charAt(index);\n\t\t\t\tif(!dfa.dfa_edges.containsKey(chr)){\n\t\t\t\t\tdfa.dfa_edges.put(chr, new DFA_State());\t\t\t\t\n\t\t\t\t}\n\t\t\t\tdfa=dfa.dfa_edges.get(chr);\t\t\t\t\n\t\t\t}\n\t\t\tdfa.isFinal=true;\t\t\t//last char\n\t\t\tdfa.value=str;\t\t\t\n\t\t\t\n\t\t\tif(table_op.contains(res)){\n\t\t\t\tdfa.type=TokenType.t_opt;\n\t\t\t}else\n\t\t\t\tdfa.type=TokenType.t_res;\n\t\t}\n\t\t\n\t\treturn true;\t\t\n\t}", "@Test\n public void Exercitiu14() {\n\n String[] instruments = new String[6];\n instruments[0] = \"cello\";\n instruments[1] = \"piano\";\n instruments[2] = \"clapsticks\";\n instruments[3] = \"steelpan\";\n instruments[4] = \"triangle\";\n instruments[5] = \"xylophone\";\n\n String[] instrumentsNew = new String[6];\n\n String[] vowels = new String[5];\n vowels[0] = \"a\";\n vowels[1] = \"e\";\n vowels[2] = \"i\";\n vowels[3] = \"o\";\n vowels[4] = \"u\";\n\n String temp = \"\";\n String temporary = \"\";\n boolean status = true;\n\n for (int i = 0; i <= instruments.length-1; i++) {\n temp = instruments[i];\n for (int j = 0; j <= (temp.length()-1); j++) {\n status = true;\n for (int k = 0; k <= (vowels.length-1); k++) {\n if (temp.charAt(j) == vowels[k].charAt(0)) {\n status = false;\n }\n }\n if (status) {\n temporary += temp.charAt(j);\n }\n }\n instruments[i] = temporary;\n temporary = \"\";\n }\n System.out.println(Arrays.toString(instruments));\n }", "public static String findGeneNew(String dna) {\n int startIdx = dna.indexOf(\"ATG\");\n if (startIdx == -1) {\n return \"\";\n }\n int taAIdx = findStopCodonIDX(dna,startIdx,\"TAA\");\n int taGIdx = findStopCodonIDX(dna,startIdx,\"TAG\");\n int tGAIdx = findStopCodonIDX(dna,startIdx,\"TGA\");\n\n\n int minIdx = 0;\n // bool 1\n if (taAIdx == -1 || (tGAIdx != -1 && tGAIdx < taAIdx)) {\n minIdx = tGAIdx;\n }\n else {\n minIdx = taAIdx;\n }\n\n // bool 2\n if (minIdx == -1 || (taGIdx != -1 && taGIdx < minIdx)) {\n minIdx = taGIdx;\n }\n\n\n if (minIdx == -1) {return \"\";}\n\n\n return dna.substring(startIdx,minIdx+3);\n }", "private List<AnnotatedPluginDocument> cutSequence(Enzyme enzyme, AnnotatedPluginDocument document) throws DocumentOperationException {\n //Retrieve the inner nucleotide sequence document and return null if this fails.\n DefaultNucleotideSequence nucleotideSequence;\n nucleotideSequence = convertDocument(document);\n\n //Clear any restriction site annotations already in the sequence to make sure it is cut in the right places.\n //The rest of the sequence annotations are not affected.\n List<SequenceAnnotation> annotations = nucleotideSequence.getSequenceAnnotations();\n List<SequenceAnnotation> toRemove = SequenceUtilities.getAnnotationsOfType(annotations, SequenceAnnotation.TYPE_RESTRICTION_SITE);\n annotations.removeAll(toRemove);\n\n //Find and enter the needed restriction site annotations, based on the selected enzyme.\n //This should also be possible to do with a built in DocumentOperation, but I am not sure how to set the needed\n //+options for it.\n String sequence = nucleotideSequence.getSequenceString();\n sequence.toUpperCase(); //Change to upper case to make sure matching works well.\n int index = 0;\n do {\n index = sequence.indexOf(enzyme.recognitionSite(), index);\n if (index > 0) {\n SequenceAnnotation anno = new SequenceAnnotation(enzyme.dispName(), SequenceAnnotation.TYPE_RESTRICTION_SITE);\n anno.addQualifier(\"Recognition pattern\", enzyme.recognitionPattern());\n anno.addInterval(index + 1, index + enzyme.recognitionSite().length(), SequenceAnnotationInterval.Direction.leftToRight);\n annotations.add(anno);\n index += 1;\n }\n } while (index > 0);\n index = 0; //Reset counter to next pass... looking for backward recognition sites. Needed because GreenGate\n //+enzyme recognition sites are not palindromic.\n do {\n index = sequence.indexOf(enzyme.revRecSite(), index);\n if (index > 0) {\n SequenceAnnotation anno = new SequenceAnnotation(enzyme.dispName(), SequenceAnnotation.TYPE_RESTRICTION_SITE);\n anno.addQualifier(\"Recognition pattern\", enzyme.recognitionPattern());\n anno.addInterval(index + 1, index + enzyme.recognitionSite().length(), SequenceAnnotationInterval.Direction.rightToLeft);\n annotations.add(anno);\n index += 1;\n }\n } while (index > 0);\n\n nucleotideSequence.setAnnotations(annotations); //Add the new annotations to the nucleotide sequence.\n final AnnotatedPluginDocument digestDocument = DocumentUtilities.createAnnotatedPluginDocument(nucleotideSequence);\n //Perform digestion\n //Needed to get around AWT thread problems\n final DocumentOperation digest = PluginUtilities.getDocumentOperation(\"com.biomatters.plugins.restrictionAnalysis.DigestOperation\");\n final AtomicReference<Options> options = new AtomicReference<Options>();\n ThreadUtilities.invokeNowOrWait(new Runnable() {\n public void run() {\n try {\n options.set(digest.getOptions(digestDocument));\n } catch (DocumentOperationException e) {\n e.printStackTrace();\n }\n }\n });\n //Dialogs.showMessageDialog(options.get().getDescriptionAndState()); //For debugging and testing purposes.\n return digest.performOperation(ProgressListener.EMPTY, options.get(), digestDocument); //returns a DefaultSequenceListDocument\n\n }", "@Test\n void multiConstruct() {\n var multicons = \"(define conCar_a (cons 1 2))(define conCar_b (cons 3 conCar_a))(define conCar_c (cons conCar_b 4))(define conCar_d (cons conCar_b conCar_c))\";\n Main.parseInputString(multicons);\n assertEquals(\"(3 1 . 2)\", Main.parseInputString(\"(display (car conCar_d)) \"));\n }", "@Test\n public void testSubSequence() {\n LOGGER.info(\"testSubSequence\");\n final AtomString atomString1 = new AtomString(\"Hello\");\n final CharSequence expected = \"el\";\n final CharSequence actual = atomString1.subSequence(1, 3);\n assertEquals(expected, actual);\n }", "@Test\r\n\tpublic void testIsOBGYN() {\r\n\t\tAssert.assertFalse(oic.isOBGYN(\"a\"));\r\n\t\t\r\n\t\tAssert.assertFalse(oic.isOBGYN(\"123\"));\r\n\t\t\r\n\t\tAssert.assertFalse(oic.isOBGYN(\"9000000003\"));\r\n\t\t\r\n\t\tAssert.assertFalse(oic.isOBGYN(\"9900000000\"));\r\n\t\t\r\n\t\tAssert.assertTrue(oic.isOBGYN(\"9000000012\"));\r\n\t}", "private boolean becomesConsecutiveSameVowelsAfterChanging\n (String word, StringBuilder sb, int i, char c, char randomVowel) {\n return\n // check the next character\n (i + 1 < word.length() && isVowel(word.charAt(i + 1)) &&\n word.charAt(i + 1) != c && randomVowel == word.charAt(i + 1)) ||\n // check the previous character\n (i - 1 >= 0 && isVowel(word.charAt(i - 1)) &&\n word.charAt(i - 1) != c && randomVowel == sb.charAt(i - 1));\n }", "static String getSeq(String line)\n{\n\tString pattern = \"SEQ=\";\n\tint idx = line.indexOf(pattern);\n\tif(idx == -1) return \"\";\n\tline = line.toUpperCase();\n\tidx += pattern.length();\n\tint end = idx;\n\twhile(end < line.length() && isBasePair(line.charAt(end))) end++;\n\treturn line.substring(idx, end);\n}", "public Boolean stringScramble(String str1, String str2) {\n // code goes here\n return null;\n }", "@Test\n void labTask() {\n String s = \"abczefoh\";\n List<String> result = StringSplitter.labTask(s);\n\n String first = result.get(0);\n assertEquals(3, first.length());\n assertEquals('a', first.charAt(0));\n assertFalse(\"abc\".contains(String.valueOf(first.charAt(1))));\n assertEquals('c', first.charAt(2));\n\n String second = result.get(1);\n assertEquals(2, second.length());\n assertEquals('o', second.charAt(0));\n assertFalse(\"oh\".contains(String.valueOf(second.charAt(1))));\n\n String third = result.get(2);\n assertEquals(3, third.length());\n assertEquals('z', third.charAt(0));\n assertFalse(\"zef\".contains(String.valueOf(second.charAt(1))));\n assertEquals('f', third.charAt(2));\n }", "@Test(timeout = 4000)\n public void test167() throws Throwable {\n StringReader stringReader0 = new StringReader(\"else\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(1, javaCharStream0.getBeginColumn());\n assertEquals(1, javaCharStream0.getLine());\n }", "@Test\n public void test_06_hgvs_upstream_negative_strand() {\n Log.debug(\"Test\");\n List<VcfEntry> list = snpEffect(\"testHg38Chr1\", path(\"hgvs_upstream_negative_strand_06.vcf\"), null);\n checkHgvscForTr(list, \"NM_016176.3\");\n }", "private String[] condicionGeneral(String condicion) {\n String retorno[] = new String[2];\n try {\n String[] simbolos = {\"<=\", \">=\", \"==\", \"!=\", \"<\", \">\"};\n String simbolo = \"0\";\n\n if (condicion.length() > 3) {\n condicion = condicion.substring(1, condicion.length());\n for (int i = 0; i < simbolos.length; i++) {//selecciona el simbolo de la condicion\n if (condicion.contains(simbolos[i])) {\n simbolo = simbolos[i];\n break;\n }\n }\n if (simbolo.equals(\"0\")) {\n retorno[0] = \"0\";\n retorno[1] = \"mala construcción de la sentencia.\";\n } else {\n String var[] = condicion.split(simbolo);\n if (var.length == 2) {\n if (esNumero(var[0])) {\n if (esNumero(var[1])) {\n retorno[0] = \"1\";\n retorno[1] = \"\";\n } else {\n if (var[1].matches(\"[a-zA-Z]*\")) { //comprueba que solo contenga letas \n byte aux = 0;\n\n for (int i = 0; i < codigo.size(); i++) {\n if (var[1].equals(codigo.get(i).toString())) {\n aux++;\n }\n }\n if (aux > 0) {\n retorno[0] = \"1\";\n retorno[1] = \"\";\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"no se reconoce la variable \" + var[1] + \".\";\n }\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"mala construcción de la sentencia.\";\n }\n }\n } else {\n if (var[0].matches(\"[a-zA-Z]*\")) { //comprueba que solo contenga letras \n byte aux = 0;\n for (int i = 0; i < codigo.size(); i++) {\n if (var[0].equals(codigo.get(i).toString())) {\n aux++;\n }\n }\n if (aux > 0) {\n if (esNumero(var[1])) {\n retorno[0] = \"1\";\n retorno[1] = \"\";\n } else {\n if (var[0].matches(\"[a-zA-Z]*\")) { //comprueba que solo contenga letas \n aux = 0;\n\n for (int i = 0; i < codigo.size(); i++) {\n if (var[1].equals(codigo.get(i).toString())) {\n aux++;\n }\n }\n if (aux > 0) {\n retorno[0] = \"1\";\n retorno[1] = \"\";\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"no se reconoce la variable \" + var[1] + \".\";\n }\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"mala construcción de la sentencia.\";\n }\n }\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"no se reconoce la variable \" + var[0] + \".\";\n }\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"mala construcción de la sentencia.\";\n }\n\n }\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"mala construcción de la sentencia.\";\n }\n }\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"mala construcción de la sentencia.\";\n }\n\n\n\n } catch (Exception e) {\n System.out.println(\"Error en condicion \" + e.getClass());\n } finally {\n return retorno;\n }\n }", "public java.lang.String c(java.lang.String r9, java.lang.String r10) {\n /*\n r8 = this;\n r0 = 0;\n if (r9 == 0) goto L_0x0071;\n L_0x0003:\n r1 = r9.length();\n if (r1 != 0) goto L_0x000a;\n L_0x0009:\n goto L_0x0071;\n L_0x000a:\n r1 = r9.length();\n r2 = 59;\n r3 = r9.indexOf(r2);\n r4 = 1;\n r3 = r3 + r4;\n if (r3 == 0) goto L_0x0070;\n L_0x0018:\n if (r3 != r1) goto L_0x001b;\n L_0x001a:\n goto L_0x0070;\n L_0x001b:\n r5 = r9.indexOf(r2, r3);\n r6 = -1;\n if (r5 != r6) goto L_0x0023;\n L_0x0022:\n r5 = r1;\n L_0x0023:\n if (r3 >= r5) goto L_0x006f;\n L_0x0025:\n r7 = 61;\n r7 = r9.indexOf(r7, r3);\n if (r7 == r6) goto L_0x0066;\n L_0x002d:\n if (r7 >= r5) goto L_0x0066;\n L_0x002f:\n r3 = r9.substring(r3, r7);\n r3 = r3.trim();\n r3 = r10.equals(r3);\n if (r3 == 0) goto L_0x0066;\n L_0x003d:\n r7 = r7 + 1;\n r3 = r9.substring(r7, r5);\n r3 = r3.trim();\n r7 = r3.length();\n if (r7 == 0) goto L_0x0066;\n L_0x004d:\n r9 = 2;\n if (r7 <= r9) goto L_0x0065;\n L_0x0050:\n r9 = 0;\n r9 = r3.charAt(r9);\n r10 = 34;\n if (r10 != r9) goto L_0x0065;\n L_0x0059:\n r7 = r7 - r4;\n r9 = r3.charAt(r7);\n if (r10 != r9) goto L_0x0065;\n L_0x0060:\n r9 = r3.substring(r4, r7);\n return r9;\n L_0x0065:\n return r3;\n L_0x0066:\n r3 = r5 + 1;\n r5 = r9.indexOf(r2, r3);\n if (r5 != r6) goto L_0x0023;\n L_0x006e:\n goto L_0x0022;\n L_0x006f:\n return r0;\n L_0x0070:\n return r0;\n L_0x0071:\n return r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: io.fabric.sdk.android.services.network.HttpRequest.c(java.lang.String, java.lang.String):java.lang.String\");\n }", "public static String findRepeatingSequence(String input){\n\t char [] inputArray = input.toCharArray();\n\t StringBuffer sequence = new StringBuffer();\n\t\tfor (int i = 0; i < inputArray.length - 1; i++) {\n\t\t\tif (Character.toString(inputArray[i]).equals(Character.toString(inputArray[i + 1]))) {\n\t\t\t\t\n\t\t\t\tsequence.append(Character.toString(inputArray[i]));\n\t\t\t\t\n\t\t\t\t\twhile (Character.toString(inputArray[i]).equals(Character.toString(inputArray[i + 1]))) {\n\t\t\t\t\t\tsequence.append(Character.toString(inputArray[i]));\n\t\t\t\t\t\tif (i + 1 < inputArray.length - 1) {\n\t\t\t\t\t\t\ti++;\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t \n\n\t\t\t}else{\n\t\t\t\tif (sequence.length()>0){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\n\t }\n\t\n\treturn sequence.toString();\t\n\t}", "static String twoStrings(String s1, String s2) {\n String bigstr = s1.length() > s2.length() ? s1 : s2;\n String smallstr = s1.length() > s2.length() ? s2 : s1;\n int bigstrSize = bigstr.length();\n int smallstrSize = smallstr.length();\n\n boolean string_check[] = new boolean[1000];\n\n for (int i = 0; i < bigstrSize; i++) {\n string_check[bigstr.charAt(i) - 'A'] = true;\n }\n // if at least one char is present in boolean array\n for (int i = 0; i < smallstrSize; i++) {\n if (string_check[smallstr.charAt(i) - 'A'] == true) {\n return \"YES\";\n }\n }\n return \"NO\";\n }", "public boolean isStrobogrammatic(String num) {\n char input[] = num.toCharArray();\n int p1 = 0, p2 = num.length() - 1;//pointers\n while(p1 <= p2) {\n if(input[p1] == '6') {\n if(input[p2] != '9') return false;\n } else if (input[p1] == '9') {\n if(input[p2] != '6') return false;\n } else if (input[p1] == '1' || input[p1] == '8'||input[p1] == '0') {\n if (input[p2] != input[p1]) return false;\n } else {\n return false;\n }\n p1++;\n p2--;\n }\n return true;\n }", "@Before\r\n\tpublic void constructObj (){\r\n\t\tproteinSeq = new ProteinSequence(new char[]{'A','A','T','G','C','C','A','G','T','C','A','G','C','A','T','A','G','C','G'});\r\n\t}", "public static void main(String[] args) {\n\n\n String str = \"ABAB\";\n // index number:123\n\n\n String result = \"\"; // \"CD\" We store expected result\n\n for(int i=0; i <= str.length()-1 ; i++){ // 0 , 1, 2 ,3\n /*\n if( !result.contains( \"\"+str.charAt(i)) ) {\n result += str.charAt(i);\n }\n */\n\n if(result.contains( \"\"+str.charAt(i) )){// is in the index number\n continue;// if the string result does not contains str.charAt(i), then we concate it to the result,\n // if it does we will not concate it to the result\n }\n\n result += str.charAt(i);\n\n }\n\n System.out.println(result);\n\n\n\n\n\n\n\n\n }", "@Test\n public void testComp1()\n {\n System.out.println(\"comp\");\n String compString = \"A+1\";\n assertEquals(\"0110111\", N2TCode.comp(compString));\n }", "private void runTest(){\t\t\n\t\t// begin by urueda\n\t\tLogSerialiser.finish(); LogSerialiser.exit();\n\t\tsequenceCount = 1;\n\t\tlastStamp = System.currentTimeMillis();\n\t\tescAttempts = 0; nopAttempts = 0;\n\t\t// end by urueda\t\t\n\t\tboolean problems;\n\t\twhile(mode() != Modes.Quit && moreSequences()){\n\n\t\t\tString generatedSequence = Util.generateUniqueFile(settings.get(ConfigTags.OutputDir) + File.separator + \"sequences\", \"sequence\").getName(); // by urueda\n\t\t\tgeneratedSequenceNumber = new Integer(generatedSequence.replace(\"sequence\", \"\")).intValue();\n\t\t\t// begin by urueda\n\n\t\t\tsutRAMbase = Double.MAX_VALUE; sutRAMpeak = 0.0; sutCPUpeak = 0.0; testRAMpeak = 0.0; testCPUpeak = 0.0;\n\n\t\t\ttry {\n\t\t\t\tLogSerialiser.start(new PrintStream(new BufferedOutputStream(new FileOutputStream(new File(\n\t\t\t\t\tsettings.get(OutputDir) + File.separator + \"logs\" + File.separator + generatedSequence + \".log\")))),\n\t\t\t\t\tsettings.get(LogLevel));\n\t\t\t} catch (NoSuchTagException e3) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te3.printStackTrace();\n\t\t\t} catch (FileNotFoundException e3) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te3.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tif (mode() == Modes.GenerateManual)\n\t\t\t\tsetMode(Modes.Spy);\n\t\t\tjipWrapper = new JIPrologWrapper();\n\t\t\t\n\t\t\tGrapher.grapher(generatedSequence,\n\t\t\t\t\t\t\tsettings.get(ConfigTags.SequenceLength).intValue(),\n\t\t\t\t\t\t\tsettings.get(ConfigTags.AlgorithmFormsFilling).booleanValue(),\n\t\t\t\t\t\t\tsettings.get(ConfigTags.TypingTextsForExecutedAction).intValue(),\n\t\t\t\t\t\t\tsettings.get(ConfigTags.TestGenerator),\n\t\t\t\t\t\t\tsettings.get(ConfigTags.MaxReward),\n\t\t\t\t\t\t\tsettings.get(ConfigTags.Discount),\n\t\t\t\t\t\t\tsettings.get(ConfigTags.ExplorationSampleInterval),\n\t\t\t\t\t\t\tsettings.get(ConfigTags.GraphsActivated),\n\t\t\t\t\t\t\tsettings.get(ConfigTags.PrologActivated),\n\t\t\t\t\t\t\tsettings.get(ConfigTags.ForceToSequenceLength) && this.forceToSequenceLengthAfterFail ?\n\t\t\t\t\t\t\t\t\ttrue :\n\t\t\t\t\t\t\t\t\tsettings.get(ConfigTags.GraphResuming),\n\t\t\t\t\t\t\tsettings.get(ConfigTags.OfflineGraphConversion),\n\t\t\t\t\t\t\tsettings.get(ConfigTags.Strategy),\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tjipWrapper);\n\t\t\tGrapher.waitEnvironment();\n\t\t\tScreenshotSerialiser.start(generatedSequence);\n\t\t\t// end by urueda\n\t\t\t\n\t\t\tproblems = false;\n\t\t\tif (!forceToSequenceLengthAfterFail) passSeverity = Verdict.SEVERITY_OK; // by urueda\n\t\t\t//actionCount = 0;\n\t\t\t// begin by urueda\n\t\t\tif (this.forceToSequenceLengthAfterFail){\n\t\t\t\tthis.forceToSequenceLengthAfterFail = false;\n\t\t\t\tthis.testFailTimes++;\n\t\t\t} else{\n\t\t\t\tactionCount = 1;\n\t\t\t\tthis.testFailTimes = 0;\n\t\t\t}\n\t\t\t// end by urueda\n\n\t\t\tLogSerialiser.log(\"Creating new sequence file...\\n\", LogSerialiser.LogLevel.Debug);\n\t\t\tfinal File currentSeq = new File(settings.get(ConfigTags.TempDir) + File.separator + \"tmpsequence\");\n\t\t\ttry {\n\t\t\t\tUtil.delete(currentSeq);\n\t\t\t} catch (IOException e2) {\n\t\t\t\tLogSerialiser.log(\"I/O exception deleting <\" + currentSeq + \">\\n\", LogSerialiser.LogLevel.Critical);\n\t\t\t}\n\t\t\t//oos = new ObjectOutputStream(new BufferedOutputStream(new FileOutputStream(currentSeq), 50000000));\n\t\t\t//raf = new RandomAccessFile(currentSeq, \"rw\");\n\t\t\t//oos = new ObjectOutputStream(new FileOutputStream(raf.getFD()));\n\t\t\t// begin by urueda\n\t\t\ttry {\n\t\t\t\t//TestSerialiser.start(new RandomAccessFile(currentSeq, \"rw\"));\n\t\t\t\tTestSerialiser.start(new ObjectOutputStream(new BufferedOutputStream(new FileOutputStream(currentSeq))));\n\t\t\t\tLogSerialiser.log(\"Created new sequence file!\\n\", LogSerialiser.LogLevel.Debug);\n\t\t\t} catch (IOException e) {\n\t\t\t\tLogSerialiser.log(\"I/O exception creating new sequence file\\n\", LogSerialiser.LogLevel.Critical);\n\t\t\t}\n\t\t\t//} catch (FileNotFoundException e1) {\n\t\t\t//\tLogSerialiser.log(\"File not found exception creating random test file\\n\", LogSerialiser.LogLevel.Critical);\n\t\t\t//}\n\t\t\t// end by urueda\n\n\t\t\tLogSerialiser.log(\"Building canvas...\\n\", LogSerialiser.LogLevel.Debug);\n\t\t\t//Canvas cv = buildCanvas();\n\t\t\tthis.cv = buildCanvas(); // by urueda\n\t\t\t//logln(Util.dateString(\"dd.MMMMM.yyyy HH:mm:ss\") + \" Starting system...\", LogLevel.Info);\n\t\t\t// begin by urueda\n\t\t\tString startDateString = Util.dateString(DATE_FORMAT);\n\t\t\tLogSerialiser.log(startDateString + \" Starting SUT ...\\n\", LogSerialiser.LogLevel.Info);\n\t\t\t// end by urueda\n\t\t\t\n\t\t\tSUT system = null;\n\t\t\t\n\t\t\ttry{ // by urueda\n\n\t\t\t\tsystem = startSystem();\n\n\t\t\t\tlastCPU = NativeLinker.getCPUsage(system); // by urueda\n\t\t\t\t\n\t\t\t\t//SUT system = WinProcess.fromProcName(\"firefox.exe\");\n\t\t\t\t//logln(\"System is running!\", LogLevel.Debug);\n\t\t\t\tLogSerialiser.log(\"SUT is running!\\n\", LogSerialiser.LogLevel.Debug); // by urueda\n\t\t\t\t//logln(\"Starting sequence \" + sequenceCount, LogLevel.Info);\n\t\t\t\tLogSerialiser.log(\"Starting sequence \" + sequenceCount + \" (output as: \" + generatedSequence + \")\\n\\n\", LogSerialiser.LogLevel.Info); // by urueda\n\t\t\t\tbeginSequence();\n\t\t\t\tLogSerialiser.log(\"Obtaining system state...\\n\", LogSerialiser.LogLevel.Debug);\n\t\t\t\tState state = getState(system);\n\t\t\t\tLogSerialiser.log(\"Successfully obtained system state!\\n\", LogSerialiser.LogLevel.Debug);\n\t\t\t\tsaveStateSnapshot(state);\n\t\n\t\t\t\tTaggable fragment = new TaggableBase();\n\t\t\t\tfragment.set(SystemState, state);\n\t\t\t\t\t\t\t\n\t\t\t\tVerdict verdict = state.get(OracleVerdict, Verdict.OK);\n\t\t\t\tif (faultySequence) problems = true;\n\t\t\t\tfragment.set(OracleVerdict, verdict); // by urueda\t\t\t\t\t\n\t\t\t\tint waitCycleIdx = 0;\n\t\t\t\tlong[] waitCycles = new long[]{1, 10, 25, 50}; // ms\n\t\t\t\tlong spyCycle = -1;\n\t\t\t\tString stateID, lastStateID = state.get(Tags.ConcreteID);\n\t\t\t\t// end by urueda\n\t\t\t\twhile(mode() != Modes.Quit && moreActions(state)){\n\t\t\t\t\tif (problems)\n\t\t\t\t\t\tfaultySequence = true; // by urueda\n\t\t\t\t\telse{\n\t\t\t\t\t\tproblems = runAction(cv,system,state,fragment);\n\t\t\t\t\t\t// begin by urueda\n\t\t\t\t\t\tif (mode() == Modes.Spy){\n\t\t\t\t\t\t\tstateID = state.get(Tags.ConcreteID);\n\t\t\t\t\t\t\tif (stateID.equals(lastStateID)){\n\t\t\t\t\t\t\t\tif (System.currentTimeMillis() - spyCycle > waitCycles[waitCycleIdx]){\n\t\t\t\t\t\t\t\t\tspyCycle = System.currentTimeMillis();\n\t\t\t\t\t\t\t\t\tif (waitCycleIdx < waitCycles.length - 1)\n\t\t\t\t\t\t\t\t\t\twaitCycleIdx++;\n\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t} else{\n\t\t\t\t\t\t\t\tlastStateID = stateID;\n\t\t\t\t\t\t\t\twaitCycleIdx = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// end by urueda\n\t\t\t\t\t\tLogSerialiser.log(\"Obtaining system state...\\n\", LogSerialiser.LogLevel.Debug);\n\t\t\t\t\t\tstate = getState(system);\n\t\t\t\t\t\tif (faultySequence) problems = true; // by urueda\n\t\t\t\t\t\tLogSerialiser.log(\"Successfully obtained system state!\\n\", LogSerialiser.LogLevel.Debug);\n\t\t\t\t\t\tif (mode() != Modes.Spy){ // by urueda\n\t\t\t\t\t\t\tsaveStateSnapshot(state);\n\t\t\t\t\t\t\tverdict = state.get(OracleVerdict, Verdict.OK);\n\t\t\t\t\t\t\tfragment.set(OracleVerdict, verdict); // by urueda\t\t\t\t\t\t\n\t\t\t\t\t\t\tfragment = new TaggableBase();\n\t\t\t\t\t\t\tfragment.set(SystemState, state);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\n\t\t\t\t//logln(\"Shutting down system...\", LogLevel.Info);\n\t\t\t\tLogSerialiser.log(\"Shutting down the SUT...\\n\", LogSerialiser.LogLevel.Info); // by urueda\n\t\t\t\tstopSystem(system); // by urueda\n\t\t\t\tif (system != null && system.isRunning()) // by urueda\n\t\t\t\t\tsystem.stop();\n\t\t\t\t//logln(\"System has been shut down!\", LogLevel.Debug);\n\t\t\t\t// begin by urueda\n\t\t\t\tLogSerialiser.log(\"... SUT has been shut down!\\n\", LogSerialiser.LogLevel.Debug);\t\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\tScreenshotSerialiser.finish();\n\t\t\t\tLogSerialiser.log(\"Writing fragment to sequence file...\\n\", LogSerialiser.LogLevel.Debug);\n\t\t\t\t//oos.writeObject(fragment);\n\t\t\t\tTestSerialiser.write(fragment);\n\t\t\t\tTestSerialiser.finish();\n\t\t\t\tLogSerialiser.log(\"Wrote fragment to sequence file!\\n\", LogSerialiser.LogLevel.Debug);\n\t\t\t\t\n\t\t\t\tGrapher.walkFinished(!problems,\n\t\t\t\t\t\t \t\t\t mode() == Modes.Spy ? null : state,\n\t\t\t\t\t\t \t\t\t protocolUtil.getStateshot(state));\n\t\t\t\t\n\t\t\t\tLogSerialiser.log(\"Sequence \" + sequenceCount + \" finished.\\n\", LogSerialiser.LogLevel.Info);\n\t\t\t\tif(problems)\n\t\t\t\t\tLogSerialiser.log(\"Sequence contained problems!\\n\", LogSerialiser.LogLevel.Critical);\n\t\t\t\t\t\t\t\t\n\t\t\t\tfinishSequence(currentSeq);\n\t\n\t\t\t\tSystem.out.println(\"currentseq: \" + currentSeq);\n\t\t\t\t\n\t\t\t\tVerdict finalVerdict = verdict.join(new Verdict(passSeverity,\"\",Util.NullVisualizer));\n\t\t\t\t\n\t\t\t\tif (!settings().get(ConfigTags.OnlySaveFaultySequences) ||\n\t\t\t\t\tfinalVerdict.severity() >= settings().get(ConfigTags.FaultThreshold)){ // by urueda{\n\t\t\t\t\t//String generatedSequence = Util.generateUniqueFile(settings.get(ConfigTags.OutputDir) + File.separator + \"sequences\", \"sequence\").getName();\n\t\t\t\t\tLogSerialiser.log(\"Copying generated sequence (\\\"\" + generatedSequence + \"\\\") to output directory...\\n\", LogSerialiser.LogLevel.Info);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tUtil.copyToDirectory(currentSeq.getAbsolutePath(),\n\t\t\t\t\t\t\t\tsettings.get(ConfigTags.OutputDir) + File.separator + \"sequences\", \n\t\t\t\t\t\t\t\tgeneratedSequence,\n\t\t\t\t\t\t\t\ttrue); // by urueda\n\t\t\t\t\t\tLogSerialiser.log(\"Copied generated sequence to output directory!\\n\", LogSerialiser.LogLevel.Debug);\t\t\t\t\t\n\t\t\t\t\t} catch (NoSuchTagException e) {\n\t\t\t\t\t\tLogSerialiser.log(\"No such tag exception copying test sequence\\n\", LogSerialiser.LogLevel.Critical);\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\tLogSerialiser.log(\"I/O exception copying test sequence\\n\", LogSerialiser.LogLevel.Critical);\n\t\t\t\t\t}\n\t\t\t\t\tcopyClassifiedSequence(generatedSequence, currentSeq, finalVerdict);\n\t\t\t\t}\n\t\t\t\tif(!problems)\n\t\t\t\t\tthis.forceToSequenceLengthAfterFail = false;\n\t\n\t\t\t\tLogSerialiser.log(\"Releasing canvas...\\n\", LogSerialiser.LogLevel.Debug);\n\t\t\t\tcv.release();\n\t\t\t\t\n\t\t\t\tsaveSequenceMetrics(generatedSequence,problems);\n\t\t\t\t\n\t\t\t\tif (ConfigTags.Strategy != null && !ConfigTags.Strategy.equals(\"\")){\n\t\t\t\t\tSystem.out.println(\"It's a strategy test generator\");\n\t\t\t\t\tsaveStrategyMetrics(generatedSequence,problems);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tScreenshotSerialiser.exit(); final String[] report = Grapher.getReport(); // screenshots must be serialised\n\t\t\t\tTestSerialiser.exit();\n\t\t\t\tString stopDateString = Util.dateString(DATE_FORMAT),\n\t\t\t\t\t durationDateString = Util.diffDateString(DATE_FORMAT, startDateString, stopDateString);\n\t\t\t\tLogSerialiser.log(\"TESTAR stopped execution at \" + stopDateString + \"\\n\", LogSerialiser.LogLevel.Critical);\n\t\t\t\tLogSerialiser.log(\"Test duration was \" + durationDateString + \"\\n\", LogSerialiser.LogLevel.Critical);\n\t\t\t\tLogSerialiser.flush(); LogSerialiser.finish(); LogSerialiser.exit();\n\n\t\t\t\t// save report\n\t\t\t\tthis.saveReportPage(generatedSequence, \"clusters\", report[0]);\n\t\t\t\tthis.saveReportPage(generatedSequence, \"testable\", report[1]);\n\t\t\t\tthis.saveReportPage(generatedSequence, \"curve\", report[2]);\n\t\t\t\tthis.saveReportPage(generatedSequence, \"stats\", report[3]);\n\t\t\t\t// end by urueda\n\t\t\t\t\n\t\t\t\tsequenceCount++;\n\t\t\t\t\n\t\t\t// begin by urueda\n\t\t\t} catch(Exception e){\n\t\t\t\tthis.killTestLaunchedProcesses();\n\t\t\t\tScreenshotSerialiser.finish();\n\t\t\t\tTestSerialiser.finish();\t\t\t\t\n\t\t\t\tGrapher.walkFinished(false, null, null);\n\t\t\t\tScreenshotSerialiser.exit(); LogSerialiser.log(Grapher.getReport() + \"\\n\", LogSerialiser.LogLevel.Info); // screenshots must be serialised\n\t\t\t\tLogSerialiser.log(\"Exception <\" + e.getMessage() + \"> has been caught\\n\", LogSerialiser.LogLevel.Critical); // screenshots must be serialised\n\t\t\t\tint i=1; StringBuffer trace = new StringBuffer();\n\t\t\t\tfor(StackTraceElement t : e.getStackTrace())\n\t\t\t\t trace.append(\"\\n\\t[\" + i++ + \"] \" + t.toString());\n\t\t\t\tSystem.out.println(\"Exception <\" + e.getMessage() + \"> has been caught; Stack trace:\" + trace.toString());\n\t\t\t\tif (system != null)\n\t\t\t\t\tsystem.stop();\n\t\t\t\tTestSerialiser.exit();\n\t\t\t\tLogSerialiser.flush(); LogSerialiser.finish(); LogSerialiser.exit();\n\t\t\t\tthis.mode = Modes.Quit; // System.exit(1);\n\t\t\t}\n\t\t}\n\t\tif (settings().get(ConfigTags.ForceToSequenceLength).booleanValue() && // force a test sequence length in presence of FAIL\n\t\t\t\tthis.actionCount <= settings().get(ConfigTags.SequenceLength) && mode() != Modes.Quit){\n\t\t\tthis.forceToSequenceLengthAfterFail = true;\n\t\t\tSystem.out.println(\"Resuming test after FAIL at action number <\" + this.actionCount + \">\");\n \t\t\trunTest(); // continue testing\n\t\t} else\n\t\t\tthis.forceToSequenceLengthAfterFail = false;\t\t\t\n\t\t// end by urueda\n\t}", "private boolean isFitPatternStr(char startC, String patternStr) {\n\n if (startC != patternStr.charAt(0)) {\n return false;\n }\n char inputChar = ' ';\n char patternchar = ' ';\n for (int i = 1; i < patternStr.length(); i++) {//the post\n patternchar = patternStr.charAt(i);\n inputChar = getNextChar();\n if (inputChar != patternchar) {\n throwParseError();\n }\n\n }\n return true;\n }", "@Before\n public void createString(){\n s1 = \"casa\";\n\ts2 = \"cassa\";\n\ts3 = \"\";\n\ts4 = \"casa\";\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_B() {\n CuteNetlibCase.doTest(\"CRE-B.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "public static boolean isCompound(String a, String b) {\n\t\t\n\t\tboolean test = false;\n\n\t\tString[] acompounds = a.split(\"(?<=.)(?=\\\\p{Lu})\");\n\t\tString[] bcompounds = b.split(\"(?<=.)(?=\\\\p{Lu})\");\n\t\t\n\t\tSystem.out.println(\"length-1: \" + bcompounds[bcompounds.length-1]);\n\t\tSystem.out.println(\"length-2: \" + bcompounds[bcompounds.length-2]);\n\t\tSystem.out.println(\"length-3: \" + bcompounds[bcompounds.length-3]);\n\n\t\tif (acompounds.length > 2 && bcompounds.length > 2) {\n\t\t\t\n\t\t\tSystem.err.println(\"true\");\n\n\t\t\t//if (RadioNavigationAid.equals(Aid) || (RadioNavigationAid.equals(X|X|Aid)\n\t\t\tif (b.equals(acompounds[acompounds.length-1]) || b.equals(acompounds[acompounds.length-1]+acompounds[acompounds.length-2] + acompounds[acompounds.length-3])) {\n\n\t\t\t\ttest = true;\t\t\t\t\n\t\t\t} \n\t\t\t\n\t\t\t//if (NavigationAid.equals(Aid) || (NavigationAid.equals(Radio|Navigation|Aid)\n\t\t\tSystem.out.println(\"Trying: \" + a + \" = \" + bcompounds[bcompounds.length-1]);\n\t\t\tif (a.equals(bcompounds[bcompounds.length-1]) || a.equals(bcompounds[bcompounds.length-1]+bcompounds[acompounds.length-2] + bcompounds[bcompounds.length-3])) {\n\t\t\t\t\n\t\t\t\ttest = true;\n\t\t\t}\n\t\t\t\n\t\t\t//if (NavigationAid.equals(NavigationAid) || (NavigationAid.equals(Radio|Navigation|Aid)\n\t\t\tSystem.out.println(\"Trying: \" + a + \" = \" + bcompounds[bcompounds.length-1]);\n\t\t\tif (a.equals(bcompounds[bcompounds.length-1]) || a.equals(bcompounds[bcompounds.length-3]+bcompounds[acompounds.length-2] + bcompounds[bcompounds.length-1])) {\n\t\t\t\t\n\t\t\t\ttest = true;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\t else if (acompounds.length > 1) {\n\n\t\t\tif (b.equals(acompounds[acompounds.length-1]) || b.equals(acompounds[acompounds.length-1]+acompounds[acompounds.length-2])) {\n\n\t\t\t\ttest = true;\n\t\t\t}\n\t\t}\n\t\treturn test;\n\n\t}", "public static void main(String[] args){\n\t\tString st = \"attabababab\"; \n\t\t// finding the longest pallindrome from the given sequence \n\t\tSystem.out.println(findlongestpalindrome(st));\n\t\t//System.out.println(ispalindrome1(\"atata\"));\n\t}", "private boolean secondCharIs(char expected) {\n if (reachedEnd()) {\n return false;\n }\n\n if (source.charAt(current) != expected) {\n return false;\n }\n\n current++;\n return true;\n }", "public String match (String frameSeq)\n {\n // keeps track of how many times match is called (i.e. how many codons/AA's there are) \n \n\n StringBuffer newSeq = new StringBuffer (\"\");\n int begin = 0;\n int end = 3;\n int countAA = 0;\n\n for (int i = 0; i < frameSeq.length(); i += 3)\n {\n // keeps track of how many codons/AA's there are so that breaks can be inserted\n countAA++;\n\n if (frameSeq.length() < 3)\n break;\n String codon = frameSeq.substring(begin,end); // takes one codon at a time\n\n String letter = lookupCodon(codon);\n \n newSeq.append(letter);\n\n begin +=3;\n end +=3;\n\n if ((end > frameSeq.length())||(begin > frameSeq.length()-1)) // reached end of translational sequence\n break;\n else if (countAA == 50) // format the output 50 chars per line\n {\n newSeq.append(\"<BR>\");\n countAA = 0; // reset counter\n }\n }\n \n // returns the sequence in typewriter font (for standard spacing)\n return (\"<TT>\" + newSeq.toString() + \"</TT>\");\n }" ]
[ "0.60219514", "0.5818157", "0.5659575", "0.5401181", "0.5357437", "0.53478867", "0.5299153", "0.528141", "0.52808356", "0.5279741", "0.5254995", "0.52371037", "0.5186963", "0.5100393", "0.50917816", "0.504794", "0.50426394", "0.49887747", "0.49801263", "0.49191016", "0.48934278", "0.48510015", "0.48489824", "0.4822802", "0.47955075", "0.47775072", "0.4777049", "0.47422236", "0.47288585", "0.47235918", "0.47201192", "0.46897465", "0.4682713", "0.46393657", "0.46301064", "0.46223447", "0.4598022", "0.4585237", "0.4574536", "0.45739675", "0.4555679", "0.4553398", "0.45509872", "0.45498118", "0.45447737", "0.4540883", "0.45386356", "0.45383304", "0.45381767", "0.45354152", "0.452675", "0.45225117", "0.45127708", "0.45100155", "0.4502403", "0.4502221", "0.45017976", "0.4501608", "0.45004657", "0.44976956", "0.44782498", "0.44725445", "0.44714457", "0.44710085", "0.44670272", "0.44654354", "0.4464825", "0.44619903", "0.4453579", "0.44512466", "0.4449371", "0.44418138", "0.44416612", "0.44403097", "0.44400087", "0.44395682", "0.44370642", "0.44313192", "0.44304264", "0.44233868", "0.44229522", "0.4421186", "0.4421104", "0.4418954", "0.4415087", "0.44110525", "0.44096822", "0.44044086", "0.44039655", "0.43998146", "0.43976754", "0.4397077", "0.43965903", "0.4394998", "0.43898028", "0.4385322", "0.43804562", "0.43793833", "0.43744954", "0.43726698", "0.43706277" ]
0.0
-1
///aminoAcidList test cases///// /TEST 3 INPUT: "CCGUUGGCACUGUUG" EXPECTED OUTPUT = T, S, V, F ACTUAL OUTPUT = T, S, V, F This test ensures that the method returns an array with the aminoacids of the linked list in the order they appear.
@Test public void aminoListTest1(){ AminoAcidLL first = AminoAcidLL.createFromRNASequence(a); char[] expected = {'P','L','A'}; assertArrayEquals(expected, first.aminoAcidList()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void aminoListTest2(){\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(d);\n char[] expected = {'C','F','K','N','T'};\n assertArrayEquals(expected, first.aminoAcidList());\n }", "@Test\n public void rnatest1(){\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(a);\n char[] firstArr = new char[3];\n char[] answer = {'P','L','A'};\n for(int i = 0; i < firstArr.length; i++){\n firstArr[i] = first.aminoAcid;\n System.out.println(first.aminoAcid);\n first = first.next;\n }\n assertArrayEquals(answer, firstArr);\n }", "@Test\n public void rnatest2(){\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(b);\n char[] firstArr = new char[4];\n char[] answer = {'T','S', 'V', 'F'};\n for(int i = 0; i < firstArr.length; i++){\n firstArr[i] = first.aminoAcid;\n System.out.println(first.aminoAcid);\n first = first.next;\n }\n assertArrayEquals(answer,firstArr);\n }", "@Test\n public void aminoCompareTest2() {\n //these list are already sorted\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(c);\n AminoAcidLL second = AminoAcidLL.createFromRNASequence(c);\n int expected = 0;\n assertEquals(expected, first.aminoAcidCompare(second));\n }", "@Test\n public void aminoCompareTest1(){\n //these list are already sorted\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(c);\n AminoAcidLL second = AminoAcidLL.createFromRNASequence(d);\n int expected = 1;\n assertEquals(expected, first.aminoAcidCompare(second));\n }", "@Test\n public void aminoCountsTest1(){\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(a);\n int[] expected = {1,3,1};\n assertArrayEquals(expected, first.aminoAcidCounts());\n }", "@Test\n public void aminoCountsTest2(){\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(b);\n int[] expected = {2,1,1,1};\n assertArrayEquals(expected, first.aminoAcidCounts());\n }", "public static void main(String[] args) {\r\n\t\t P187RepeatedDNASequences p = new P187RepeatedDNASequences();\r\n\t\t List<String> r = p.findRepeatedDnaSequences(\"AAAAACCCCCAAAAACCCCCCAAAAAGGGTTT\"); //\r\n\t\t for(String t : r) {\r\n\t\t\t System.out.println(t);\t\t\t \r\n\t\t }\r\n\t }", "private void createAA() {\r\n\r\n\t\tfor( int x = 0 ; x < dnasequence.size(); x++) {\r\n\t\t\tString str = dnasequence.get(x);\r\n\t\t\t//put catch for missing 3rd letter\r\n\t\t\tif(str.substring(0, 1).equals(\"G\")) {\r\n\t\t\t\taasequence.add(getG(str));\r\n\t\t\r\n\t\t\t}else if(str.substring(0, 1).equals(\"C\")) {\r\n\t\t\t\taasequence.add(getC(str));\r\n\t\t\t\t\r\n\t\t\t}else if(str.substring(0, 1).equals(\"A\")) {\r\n\t\t\t\taasequence.add(getA(str));\r\n\t\t\t\t\r\n\t\t\t}else if(str.substring(0, 1).equals(\"T\")) {\r\n\t\t\t\taasequence.add(getT(str));\r\n\t\t\t\t\r\n\t\t\t}else if(str.substring(0,1).equals(\"N\")) {\r\n\t\t\t\taasequence.add(\"ERROR\");\r\n\t\t\t}else\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t}\r\n\t}", "public List<String> getAEIsOutputFromAttacDecls(List<AttacDecl> list) \r\n\t\t{\r\n\t\tList<String> list2 = new ArrayList<String>();\r\n\t\tfor (AttacDecl attacDecl : list)\r\n\t\t\t{\r\n\t\t\tlist2.add(attacDecl.getOutputAei());\r\n\t\t\t}\r\n\t\treturn list2;\r\n\t\t}", "public List<String> getAEIsInputFromAttacDecls(List<AttacDecl> list) \r\n\t\t{\r\n\t\tList<String> list2 = new ArrayList<String>();\r\n\t\tfor (AttacDecl attacDecl : list)\r\n\t\t\t{\r\n\t\t\tlist2.add(attacDecl.getInputAei());\r\n\t\t\t}\r\n\t\treturn list2;\r\n\t\t}", "@Test\n public void subSequencesTest2() {\n String text = \"hashco\"\n + \"llisio\"\n + \"nsarep\"\n + \"ractic\"\n + \"allyun\"\n + \"avoida\"\n + \"blewhe\"\n + \"nhashi\"\n + \"ngaran\"\n + \"domsub\"\n + \"setofa\"\n + \"larges\"\n + \"etofpo\"\n + \"ssible\"\n + \"keys\";\n\n String[] expected = new String[6];\n expected[0] = \"hlnraabnndslesk\";\n expected[1] = \"alsalvlhgoeatse\";\n expected[2] = \"siacloeaamtroiy\";\n expected[3] = \"hsrtyiwsrsogfbs\";\n expected[4] = \"cieiudhhaufepl\";\n expected[5] = \"oopcnaeinbasoe\";\n String[] owns = this.ic.subSequences(text, 6);\n for (int i = 0; i < expected.length; i++) {\n assertEquals(expected[i], owns[i]);\n }\n }", "public void tacoArray() {\n\n\n ArrayList<String> tacos = new ArrayList<>();\n tacos.add(\"blah\");\n tacos.add(\"blah2\");\n tacos.add(\"blah3\");\n tacos.add(\"blah4\");\n tacos.add(\"blah5\");\n }", "@Test\n public void subSequencesTest1() {\n String text = \"crypt\"\n + \"ograp\"\n + \"hyand\"\n + \"crypt\"\n + \"analy\"\n + \"sis\";\n\n String[] expected = new String[5];\n expected[0] = \"cohcas\";\n expected[1] = \"rgyrni\";\n expected[2] = \"yrayas\";\n expected[3] = \"panpl\";\n expected[4] = \"tpdty\";\n String[] owns = this.ic.subSequences(text, 5);\n for (int i = 0; i < expected.length; i++) {\n assertEquals(expected[i], owns[i]);\n }\n }", "@Test\n public void codonCompare2(){\n //these list are already sorted\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(c);\n AminoAcidLL second = AminoAcidLL.createFromRNASequence(d);\n int expected = 1;\n assertEquals(expected, first.codonCompare(second));\n\n }", "private ArrayList<ArrayList<String>> generateExpectedList(Alias[][] testAliasList) {\n ArrayList<ArrayList<String>> expectedList = new ArrayList<ArrayList<String>>();\n for (Alias[] row : testAliasList) {\n ArrayList<String> innerList = populateEmptyAlias();\n insertAliasAtPositions(row, innerList);\n expectedList.add(innerList);\n }\n return expectedList;\n }", "@Test\n public void codonCompare1(){\n //these list are already sorted\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(a);\n AminoAcidLL second = AminoAcidLL.createFromRNASequence(b);\n int expected = 0;\n assertEquals(expected, first.codonCompare(second));\n }", "public static void main(String[] args) {\n\n\t\tInteger [] t = new Integer [ 6 ];\n\n\t\tTestAnagrams ta = new TestAnagrams ();\n\t\tTestAnagrams [] taA = new TestAnagrams [4];\n\n\n\n\n\n\t\tArrayList<Integer> foo = new ArrayList<Integer>();\n\t\tfoo.add(1);\n\t\tfoo.add(1);\n\t\tfoo.add(2);\n\t\tfoo.add(3);\n\t\tfoo.add(5);\n\t\tjava.lang.Integer[] bar = foo.toArray(new Integer[0]);\n\t\tSystem.out.println(\"bar.length = \" + bar.length);\n\n\t\t//\n\t\t//\n\t\t//String [] sA = { \"tt\", \"hh\" };\n\t\t//\n\t\t//java.util.ArrayList < String > sAl = new java.util.ArrayList < String > ( java.util.Arrays.asList ( sA ) ) ; \n\t\t//\n\t\t//sAl.add ( \"qq\");\n\t\t//\n\t\t//Collections.sort(sAl);\n\t\t//\n\t\t//String [] sA2 = sAl.toArray ( new String [ 0 ] );\n\t\t//\n\t\t//System.out.println ( sA2 [ 0 ] );\n\t\t//\n\t\t//long [] a = { 5,7,6,3,4,9,8,1,0,2};\n\t\t//\n\t\t//java.util.Arrays.sort (a);\n\t\t//\n\t\t//for ( int i = 0; i < a.length; i++ ){\n\t\t//\tSystem.out.print( a [ i ] + \" \");\n\t\t//}\n\n\n\t\tString [] sArray = { \n\t\t\t\t\"acaballadero \", \n\t\t\t\t\"acaballerado \", \n\t\t\t\t\"gallardeaba \", \n\t\t\t\t\"acaballerad \", \n\t\t\t\t\"abogadeara \", \n\t\t\t\t\"acebollado \", \n\t\t\t\t\"acebollada \", \n\t\t\t\t\"acaballero \", \n\t\t\t\t\"acogollara \", \n\t\t\t\t\"acollarado \", \n\t\t\t\t\"decoloraba \", \n\t\t\t\t\"acogollaba \", \n\t\t\t\t\"cagalaolla \", \n\t\t\t\t\"acordelaba \", \n\t\t\t\t\"bacaladero \", \n\t\t\t\t\"acabellado \", \n\t\t\t\t\"acaballara \", \n\t\t\t\t\"cabalgador \", \n\t\t\t\t\"alcaldable \", \n\t\t\t\t\"acollarada \", \n\t\t\t\t\"acaballare \", \n\t\t\t\t\"acollaraba \", \n\t\t\t\t\"acogollare \", \n\t\t\t\t\"bacaladera \", \n\t\t\t\t\"acaballera \", \n\t\t\t\t\"elaborado \", \n\t\t\t\t\"cabellado \", \n\t\t\t\t\"colgadera \", \n\t\t\t\t\"acaballar \", \n\t\t\t\t\"cabalgare \", \n\t\t\t\t\"acaballad \", \n\t\t\t\t\"albardela \", \n\t\t\t\t\"agradable \", \n\t\t\t\t\"cabalgada \", \n\t\t\t\t\"acodalare \", \n\t\t\t\t\"alegadora \", \n\t\t\t\t\"acogollar \", \n\t\t\t\t\"alboreado \", \n\t\t\t\t\"caballada \", \n\t\t\t\t\"caballera \", \n\t\t\t\t\"acogedora \", \n\t\t\t\t\"regoldaba \", \n\t\t\t\t\"gallardea \", \n\t\t\t\t\"abocelada \", \n\t\t\t\t\"acaloraba \", \n\t\t\t\t\"acebadara \", \n\t\t\t\t\"caballear \", \n\t\t\t\t\"coleadora \", \n\t\t\t\t\"alboreada \", \n\t\t\t\t\"colgadero \", \n\t\t\t\t\"gallardeo \", \n\t\t\t\t\"acollador \", \n\t\t\t\t\"alabadora \", \n\t\t\t\t\"cebollada \", \n\t\t\t\t\"coloreaba \", \n\t\t\t\t\"bolaceara \", \n\t\t\t\t\"acallador \", \n\t\t\t\t\"cabalgara \", \n\t\t\t\t\"agaleraba \", \n\t\t\t\t\"acabadora \", \n\t\t\t\t\"ardaleaba \", \n\t\t\t\t\"rodaballo \", \n\t\t\t\t\"baleadora \", \n\t\t\t\t\"abogadear \", \n\t\t\t\t\"colaborad \", \n\t\t\t\t\"cordelaba \", \n\t\t\t\t\"acollarad \", \n\t\t\t\t\"acogollad \", \n\t\t\t\t\"bellacada \", \n\t\t\t\t\"abocelado \", \n\t\t\t\t\"alardeaba \", \n\t\t\t\t\"adoloraba \", \n\t\t\t\t\"laceadora \", \n\t\t\t\t\"acodalaba \", \n\t\t\t\t\"declaraba \", \n\t\t\t\t\"caballero \", \n\t\t\t\t\"aldabeara \", \n\t\t\t\t\"abaleador \", \n\t\t\t\t\"acodalara \", \n\t\t\t\t\"lacerado \", \n\t\t\t\t\"cagalera \", \n\t\t\t\t\"cogedora \", \n\t\t\t\t\"recolado \", \n\t\t\t\t\"coladora \", \n\t\t\t\t\"alcaller \", \n\t\t\t\t\"recalaba \", \n\t\t\t\t\"collalba \", \n\t\t\t\t\"bacalada \", \n\t\t\t\t\"acebadar \", \n\t\t\t\t\"acollaro \", \n\t\t\t\t\"cabalgar \", \n\t\t\t\t\"recodaba \", \n\t\t\t\t\"carabela \", \n\t\t\t\t\"lacerada \", \n\t\t\t\t\"coloraba \", \n\t\t\t\t\"coleador \", \n\t\t\t\t\"gallardo \", \n\t\t\t\t\"aballara \", \n\t\t\t\t\"rebalgad \", \n\t\t\t\t\"ladreaba \", \n\t\t\t\t\"bolacero \", \n\t\t\t\t\"galleara \", \n\t\t\t\t\"lardacea \", \n\t\t\t\t\"legadora \", \n\t\t\t\t\"celadora \", \n\t\t\t\t\"calleara \", \n\t\t\t\t\"cebadara \", \n\t\t\t\t\"cobardea \", \n\t\t\t\t\"acobrada \", \n\t\t\t\t\"albacara \", \n\t\t\t\t\"bolacear \", \n\t\t\t\t\"ocaleaba \", \n\t\t\t\t\"laboread \", \n\t\t\t\t\"galerada \", \n\t\t\t\t\"colargol \", \n\t\t\t\t\"abogadeo \", \n\t\t\t\t\"acobrado \", \n\t\t\t\t\"debocara \", \n\t\t\t\t\"aladraba \", \n\t\t\t\t\"agalerad \", \n\t\t\t\t\"alargaba \", \n\t\t\t\t\"cabalgad \", \n\t\t\t\t\"algarada \", \n\t\t\t\t\"regalado \", \n\t\t\t\t\"allegara \", \n\t\t\t\t\"caldeara \", \n\t\t\t\t\"regalaba \", \n\t\t\t\t\"caldeaba \", \n\t\t\t\t\"adorable \", \n\t\t\t\t\"acabador \", \n\t\t\t\t\"abocarde \", \n\t\t\t\t\"arboleda \", \n\t\t\t\t\"balacera \", \n\t\t\t\t\"alargado \", \n\t\t\t\t\"arbolada \", \n\t\t\t\t\"caladora \", \n\t\t\t\t\"acodalar \", \n\t\t\t\t\"alegador \", \n\t\t\t\t\"cobardeo \", \n\t\t\t\t\"baleador \", \n\t\t\t\t\"aballare \", \n\t\t\t\t\"adargaba \", \n\t\t\t\t\"albeldar \", \n\t\t\t\t\"decalogo \", \n\t\t\t\t\"acallare \", \n\t\t\t\t\"gallarda \", \n\t\t\t\t\"baldeara \", \n\t\t\t\t\"braceada \", \n\t\t\t\t\"cobreado \", \n\t\t\t\t\"cebollar \", \n\t\t\t\t\"allegada \", \n\t\t\t\t\"boleador \", \n\t\t\t\t\"acordela \", \n\t\t\t\t\"goleador \", \n\t\t\t\t\"acordaba \", \n\t\t\t\t\"cagadero \", \n\t\t\t\t\"caladero \", \n\t\t\t\t\"recalada \", \n\t\t\t\t\"clareaba \", \n\t\t\t\t\"acaballa \", \n\t\t\t\t\"alobroge \", \n\t\t\t\t\"acollare \", \n\t\t\t\t\"alabador \", \n\t\t\t\t\"acaballe \", \n\t\t\t\t\"abocardo \", \n\t\t\t\t\"abogador \", \n\t\t\t\t\"acollara \", \n\t\t\t\t\"caladera \", \n\t\t\t\t\"allegado \", \n\t\t\t\t\"cableara \", \n\t\t\t\t\"acollaba \", \n\t\t\t\t\"acogolle \", \n\t\t\t\t\"alcabala \", \n\t\t\t\t\"alboroce \", \n\t\t\t\t\"caballar \", \n\t\t\t\t\"colgador \", \n\t\t\t\t\"cegadora \", \n\t\t\t\t\"acogolla \", \n\t\t\t\t\"alborada \", \n\t\t\t\t\"acogedor \", \n\t\t\t\t\"bacallao \", \n\t\t\t\t\"acordelo \", \n\t\t\t\t\"albarelo \", \n\t\t\t\t\"alegraba \", \n\t\t\t\t\"acebrado \", \n\t\t\t\t\"albacora \", \n\t\t\t\t\"ocaleara \", \n\t\t\t\t\"acallara \", \n\t\t\t\t\"abacorad \", \n\t\t\t\t\"calleaba \", \n\t\t\t\t\"laceador \", \n\t\t\t\t\"decolora \", \n\t\t\t\t\"acaballo \", \n\t\t\t\t\"coloread \", \n\t\t\t\t\"allegaba \", \n\t\t\t\t\"bolacead \", \n\t\t\t\t\"laceraba \", \n\t\t\t\t\"alabarda \", \n\t\t\t\t\"cableado \", \n\t\t\t\t\"aclarado \", \n\t\t\t\t\"aclarada \", \n\t\t\t\t\"abollare \", \n\t\t\t\t\"aclaraba \", \n\t\t\t\t\"coladero \", \n\t\t\t\t\"abollara \", \n\t\t\t\t\"bocelara \", \n\t\t\t\t\"cableada \", \n\t\t\t\t\"regalada \", \n\t\t\t\t\"acalorad \", \n\t\t\t\t\"ablegado \", \n\t\t\t\t\"galleaba \", \n\t\t\t\t\"colabora \", \n\t\t\t\t\"robledal \", \n\t\t\t\t\"abaleara \", \n\t\t\t\t\"arbolado \", \n\t\t\t\t\"acallaba \", \n\t\t\t\t\"abogadea \", \n\t\t\t\t\"cebadora \", \n\t\t\t\t\"lardaceo \", \n\t\t\t\t\"colabore \", \n\t\t\t\t\"bacallar \", \n\t\t\t\t\"colorada \", \n\t\t\t\t\"albergad \", \n\t\t\t\t\"aldabear \", \n\t\t\t\t\"abocarda \", \n\t\t\t\t\"balacear \", \n\t\t\t\t\"bolaceo \", \n\t\t\t\t\"bragado \", \n\t\t\t\t\"bacalao \", \n\t\t\t\t\"brollad \", \n\t\t\t\t\"adolora \", \n\t\t\t\t\"rollaba \", \n\t\t\t\t\"garlaba \", \n\t\t\t\t\"acaloro \", \n\t\t\t\t\"albarda \", \n\t\t\t\t\"cebrado \", \n\t\t\t\t\"acedara \", \n\t\t\t\t\"colgado \", \n\t\t\t\t\"alobada \", \n\t\t\t\t\"alegaba \", \n\t\t\t\t\"cebolla \", \n\t\t\t\t\"llagara \", \n\t\t\t\t\"adobera \", \n\t\t\t\t\"gallear \", \n\t\t\t\t\"alabado \", \n\t\t\t\t\"bragada \", \n\t\t\t\t\"acaraba \", \n\t\t\t\t\"alobado \", \n\t\t\t\t\"lobrego \", \n\t\t\t\t\"redobla \", \n\t\t\t\t\"alberca \", \n\t\t\t\t\"acabare \", \n\t\t\t\t\"llegado \", \n\t\t\t\t\"claread \", \n\t\t\t\t\"alagaba \", \n\t\t\t\t\"alardeo \", \n\t\t\t\t\"clorado \", \n\t\t\t\t\"erogaba \", \n\t\t\t\t\"recabad \", \n\t\t\t\t\"abacero \", \n\t\t\t\t\"callaba \", \n\t\t\t\t\"albarde \", \n\t\t\t\t\"abacoro \", \n\t\t\t\t\"argolla \", \n\t\t\t\t\"recalad \", \n\t\t\t\t\"baladre \", \n\t\t\t\t\"raleaba \", \n\t\t\t\t\"adoraba \", \n\t\t\t\t\"acabado \", \n\t\t\t\t\"acabada \", \n\t\t\t\t\"laceaba \", \n\t\t\t\t\"callado \", \n\t\t\t\t\"coreaba \", \n\t\t\t\t\"declaro \", \n\t\t\t\t\"ladeaba \", \n\t\t\t\t\"legrado \", \n\t\t\t\t\"alegara \", \n\t\t\t\t\"legraba \", \n\t\t\t\t\"cobarde \", \n\t\t\t\t\"cargada \", \n\t\t\t\t\"bocelar \", \n\t\t\t\t\"acodaba \", \n\t\t\t\t\"reglada \", \n\t\t\t\t\"bellaco \", \n\t\t\t\t\"acalora \", \n\t\t\t\t\"acerolo \", \n\t\t\t\t\"abollar \", \n\t\t\t\t\"abollad \", \n\t\t\t\t\"bocarda \", \n\t\t\t\t\"acodara \", \n\t\t\t\t\"abogare \", \n\t\t\t\t\"lebrada \", \n\t\t\t\t\"calador \", \n\t\t\t\t\"bolacea \", \n\t\t\t\t\"acoraba \", \n\t\t\t\t\"agaloco \", \n\t\t\t\t\"acalore \", \n\t\t\t\t\"regalad \", \n\t\t\t\t\"agalero \", \n\t\t\t\t\"begardo \", \n\t\t\t\t\"albacea \", \n\t\t\t\t\"colgada \", \n\t\t\t\t\"robleda \", \n\t\t\t\t\"bodocal \", \n\t\t\t\t\"acodala \", \n\t\t\t\t\"abocare \", \n\t\t\t\t\"redoblo \", \n\t\t\t\t\"acollad \", \n\t\t\t\t\"recabdo \", \n\t\t\t\t\"abocara \", \n\t\t\t\t\"laceara \", \n\t\t\t\t\"abocado \", \n\t\t\t\t\"abocada \", \n\t\t\t\t\"ladeara \", \n\t\t\t\t\"dallare \", \n\t\t\t\t\"acerado \", \n\t\t\t\t\"abeldar \", \n\t\t\t\t\"alocada \", \n\t\t\t\t\"gallera \", \n\t\t\t\t\"acebada \", \n\t\t\t\t\"acollar \", \n\t\t\t\t\"abogara \", \n\t\t\t\t\"lacraba \", \n\t\t\t\t\"aballad \", \n\t\t\t\t\"cerollo \", \n\t\t\t\t\"albarca \", \n\t\t\t\t\"aldabeo \", \n\t\t\t\t\"lobeara \", \n\t\t\t\t\"bocelad \", \n\t\t\t\t\"aldabea \", \n\t\t\t\t\"beldara \", \n\t\t\t\t\"ocelada \", \n\t\t\t\t\"collado \", \n\t\t\t\t\"labrada \", \n\t\t\t\t\"baldare \", \n\t\t\t\t\"aclareo \", \n\t\t\t\t\"dolobre \", \n\t\t\t\t\"alcalde \", \n\t\t\t\t\"baladro \", \n\t\t\t\t\"abacera \", \n\t\t\t\t\"callear \", \n\t\t\t\t\"cebadar \", \n\t\t\t\t\"caballo \", \n\t\t\t\t\"rallaba \", \n\t\t\t\t\"alborea \", \n\t\t\t\t\"callare \", \n\t\t\t\t\"gallero \", \n\t\t\t\t\"alagare \", \n\t\t\t\t\"alagara \", \n\t\t\t\t\"cabalgo \", \n\t\t\t\t\"cebrada \", \n\t\t\t\t\"alberga \", \n\t\t\t\t\"aballar \", \n\t\t\t\t\"cabread \", \n\t\t\t\t\"baldara \", \n\t\t\t\t\"agalera \", \n\t\t\t\t\"acedaba \", \n\t\t\t\t\"laborea \", \n\t\t\t\t\"colorea \", \n\t\t\t\t\"laboral \", \n\t\t\t\t\"laborad \", \n\t\t\t\t\"cobread \", \n\t\t\t\t\"acebado \", \n\t\t\t\t\"rebalga \", \n\t\t\t\t\"abacore \", \n\t\t\t\t\"brocado \", \n\t\t\t\t\"adolore \", \n\t\t\t\t\"coleada \", \n\t\t\t\t\"rebollo \", \n\t\t\t\t\"llagada \", \n\t\t\t\t\"cabalga \", \n\t\t\t\t\"dallaba \", \n\t\t\t\t\"boceara \", \n\t\t\t\t\"lloraba \", \n\t\t\t\t\"colgare \", \n\t\t\t\t\"colgara \", \n\t\t\t\t\"cablera \", \n\t\t\t\t\"agoraba \", \n\t\t\t\t\"acabara \", \n\t\t\t\t\"clorada \", \n\t\t\t\t\"rebalgo \", \n\t\t\t\t\"baldear \", \n\t\t\t\t\"codeara \", \n\t\t\t\t\"gradaba \", \n\t\t\t\t\"collage \", \n\t\t\t\t\"acodare \", \n\t\t\t\t\"ocelado \", \n\t\t\t\t\"grabado \", \n\t\t\t\t\"callara \", \n\t\t\t\t\"baleara \", \n\t\t\t\t\"legador \", \n\t\t\t\t\"blocara \", \n\t\t\t\t\"cerolla \", \n\t\t\t\t\"bollero \", \n\t\t\t\t\"bollera \", \n\t\t\t\t\"goleara \", \n\t\t\t\t\"bollare \", \n\t\t\t\t\"cablear \", \n\t\t\t\t\"goleada \", \n\t\t\t\t\"llagare \", \n\t\t\t\t\"goleaba \", \n\t\t\t\t\"cordelo \", \n\t\t\t\t\"careaba \", \n\t\t\t\t\"colador \", \n\t\t\t\t\"boleara \", \n\t\t\t\t\"ardaleo \", \n\t\t\t\t\"llegada \", \n\t\t\t\t\"ardalea \", \n\t\t\t\t\"cargado \", \n\t\t\t\t\"caldear \", \n\t\t\t\t\"bolardo \", \n\t\t\t\t\"dallara \", \n\t\t\t\t\"rodeaba \", \n\t\t\t\t\"aclarad \", \n\t\t\t\t\"reglado \", \n\t\t\t\t\"lloredo \", \n\t\t\t\t\"albardo \", \n\t\t\t\t\"glabela \", \n\t\t\t\t\"allegar \", \n\t\t\t\t\"arbolad \", \n\t\t\t\t\"llorada \", \n\t\t\t\t\"collera \", \n\t\t\t\t\"acallar \", \n\t\t\t\t\"lograda \", \n\t\t\t\t\"acallad \", \n\t\t\t\t\"abogada \", \n\t\t\t\t\"loadora \", \n\t\t\t\t\"llagaba \", \n\t\t\t\t\"caldera \", \n\t\t\t\t\"celador \", \n\t\t\t\t\"cebador \", \n\t\t\t\t\"carabao \", \n\t\t\t\t\"abacado \", \n\t\t\t\t\"garbead \", \n\t\t\t\t\"lacerad \", \n\t\t\t\t\"corlaba \", \n\t\t\t\t\"doblare \", \n\t\t\t\t\"alocado \", \n\t\t\t\t\"albeara \", \n\t\t\t\t\"alelada \", \n\t\t\t\t\"cabello \", \n\t\t\t\t\"albergo \", \n\t\t\t\t\"coleara \", \n\t\t\t\t\"gallead \", \n\t\t\t\t\"logrado \", \n\t\t\t\t\"cordela \", \n\t\t\t\t\"cargaba \", \n\t\t\t\t\"codeaba \", \n\t\t\t\t\"regoldo \", \n\t\t\t\t\"baldero \", \n\t\t\t\t\"declara \", \n\t\t\t\t\"ocalear \", \n\t\t\t\t\"ocalead \", \n\t\t\t\t\"acodale \", \n\t\t\t\t\"caballa \", \n\t\t\t\t\"abalead \", \n\t\t\t\t\"algebra \", \n\t\t\t\t\"colorad \", \n\t\t\t\t\"alargad \", \n\t\t\t\t\"caldero \", \n\t\t\t\t\"bellaca \", \n\t\t\t\t\"abalear \", \n\t\t\t\t\"llorado \", \n\t\t\t\t\"baladra \", \n\t\t\t\t\"allegad \", \n\t\t\t\t\"callead \", \n\t\t\t\t\"alelado \", \n\t\t\t\t\"robledo \", \n\t\t\t\t\"cloraba \", \n\t\t\t\t\"caladre \", \n\t\t\t\t\"labrado \", \n\t\t\t\t\"doblara \", \n\t\t\t\t\"begarda \", \n\t\t\t\t\"oledora \", \n\t\t\t\t\"acerada \", \n\t\t\t\t\"laboreo \", \n\t\t\t\t\"cablero \", \n\t\t\t\t\"cogedor \", \n\t\t\t\t\"reglaba \", \n\t\t\t\t\"colgaba \", \n\t\t\t\t\"bollara \", \n\t\t\t\t\"arelaba \", \n\t\t\t\t\"blocare \", \n\t\t\t\t\"cablead \", \n\t\t\t\t\"ecologa \", \n\t\t\t\t\"lobrega \", \n\t\t\t\t\"coleaba \", \n\t\t\t\t\"abacora \", \n\t\t\t\t\"alardea \", \n\t\t\t\t\"dragaba \", \n\t\t\t\t\"lacrado \", \n\t\t\t\t\"abogado \", \n\t\t\t\t\"cegador \", \n\t\t\t\t\"acodalo \", \n\t\t\t\t\"alcolla \", \n\t\t\t\t\"allegro \", \n\t\t\t\t\"acerola \", \n\t\t\t\t\"colodra \", \n\t\t\t\t\"rocalla \", \n\t\t\t\t\"cordoba \", \n\t\t\t\t\"llagado \", \n\t\t\t\t\"cebadal \", \n\t\t\t\t\"bracead \", \n\t\t\t\t\"alboreo \", \n\t\t\t\t\"aceraba \", \n\t\t\t\t\"debocar \", \n\t\t\t\t\"alegrad \", \n\t\t\t\t\"balero \", \n\t\t\t\t\"ollero \", \n\t\t\t\t\"bodega \", \n\t\t\t\t\"dolare \", \n\t\t\t\t\"barloa \", \n\t\t\t\t\"aclara \", \n\t\t\t\t\"alegad \", \n\t\t\t\t\"callar \", \n\t\t\t\t\"cebado \", \n\t\t\t\t\"alagar \", \n\t\t\t\t\"bardal \", \n\t\t\t\t\"rodaba \", \n\t\t\t\t\"ballar \", \n\t\t\t\t\"abolle \", \n\t\t\t\t\"acalla \", \n\t\t\t\t\"acabar \", \n\t\t\t\t\"barcal \", \n\t\t\t\t\"alegar \", \n\t\t\t\t\"agrace \", \n\t\t\t\t\"robalo \", \n\t\t\t\t\"calare \", \n\t\t\t\t\"brolle \", \n\t\t\t\t\"redola \", \n\t\t\t\t\"aldaba \", \n\t\t\t\t\"baldeo \", \n\t\t\t\t\"rogada \", \n\t\t\t\t\"albera \", \n\t\t\t\t\"deboco \", \n\t\t\t\t\"lobado \", \n\t\t\t\t\"aballa \", \n\t\t\t\t\"rallad \", \n\t\t\t\t\"bregad \", \n\t\t\t\t\"acorde \", \n\t\t\t\t\"adarce \", \n\t\t\t\t\"acabad \", \n\t\t\t\t\"redaba \", \n\t\t\t\t\"regaba \", \n\t\t\t\t\"lacado \", \n\t\t\t\t\"brolla \", \n\t\t\t\t\"albaca \", \n\t\t\t\t\"abolla \", \n\t\t\t\t\"ladear \", \n\t\t\t\t\"bolada \", \n\t\t\t\t\"dallar \", \n\t\t\t\t\"cebara \", \n\t\t\t\t\"bocera \", \n\t\t\t\t\"oleaba \", \n\t\t\t\t\"recado \", \n\t\t\t\t\"aleaba \", \n\t\t\t\t\"legara \", \n\t\t\t\t\"aladre \", \n\t\t\t\t\"bocela \", \n\t\t\t\t\"aladra \", \n\t\t\t\t\"galera \", \n\t\t\t\t\"bocear \", \n\t\t\t\t\"bocead \", \n\t\t\t\t\"rocada \", \n\t\t\t\t\"abogad \", \n\t\t\t\t\"rabead \", \n\t\t\t\t\"bocado \", \n\t\t\t\t\"acerad \", \n\t\t\t\t\"corola \", \n\t\t\t\t\"ladreo \", \n\t\t\t\t\"cabare \", \n\t\t\t\t\"balago \", \n\t\t\t\t\"lobear \", \n\t\t\t\t\"aborde \", \n\t\t\t\t\"abocar \", \n\t\t\t\t\"ladera \", \n\t\t\t\t\"coread \", \n\t\t\t\t\"redolo \", \n\t\t\t\t\"beldar \", \n\t\t\t\t\"abrego \", \n\t\t\t\t\"colera \", \n\t\t\t\t\"recaba \", \n\t\t\t\t\"dolera \", \n\t\t\t\t\"gallea \", \n\t\t\t\t\"golead \", \n\t\t\t\t\"cordal \", \n\t\t\t\t\"labrad \", \n\t\t\t\t\"aladar \", \n\t\t\t\t\"acordo \", \n\t\t\t\t\"abaleo \", \n\t\t\t\t\"calara \", \n\t\t\t\t\"alarga \", \n\t\t\t\t\"labore \", \n\t\t\t\t\"colage \", \n\t\t\t\t\"lobera \", \n\t\t\t\t\"lobero \", \n\t\t\t\t\"recodo \", \n\t\t\t\t\"colora \", \n\t\t\t\t\"aclaro \", \n\t\t\t\t\"recalo \", \n\t\t\t\t\"alagad \", \n\t\t\t\t\"agallo \", \n\t\t\t\t\"caldea \", \n\t\t\t\t\"recala \", \n\t\t\t\t\"acerbo \", \n\t\t\t\t\"recabo \", \n\t\t\t\t\"llorad \", \n\t\t\t\t\"gredal \", \n\t\t\t\t\"alcoba \", \n\t\t\t\t\"reglad \", \n\t\t\t\t\"grecal \", \n\t\t\t\t\"oleara \", \n\t\t\t\t\"reblad \", \n\t\t\t\t\"alabeo \", \n\t\t\t\t\"calada \", \n\t\t\t\t\"ladero \", \n\t\t\t\t\"colgad \", \n\t\t\t\t\"agorad \", \n\t\t\t\t\"colero \", \n\t\t\t\t\"balead \", \n\t\t\t\t\"albero \", \n\t\t\t\t\"colega \", \n\t\t\t\t\"balear \", \n\t\t\t\t\"colear \", \n\t\t\t\t\"aballe \", \n\t\t\t\t\"brocal \", \n\t\t\t\t\"arbolo \", \n\t\t\t\t\"cagada \", \n\t\t\t\t\"bolera \", \n\t\t\t\t\"aladro \", \n\t\t\t\t\"laboro \", \n\t\t\t\t\"callao \", \n\t\t\t\t\"colare \", \n\t\t\t\t\"colara \", \n\t\t\t\t\"alegra \", \n\t\t\t\t\"adargo \", \n\t\t\t\t\"goldre \", \n\t\t\t\t\"barceo \", \n\t\t\t\t\"colado \", \n\t\t\t\t\"gacela \", \n\t\t\t\t\"colada \", \n\t\t\t\t\"agrado \", \n\t\t\t\t\"celaba \", \n\t\t\t\t\"albala \", \n\t\t\t\t\"erogad \", \n\t\t\t\t\"colaba \", \n\t\t\t\t\"global \", \n\t\t\t\t\"grabad \", \n\t\t\t\t\"cogera \", \n\t\t\t\t\"bagara \", \n\t\t\t\t\"robada \", \n\t\t\t\t\"balare \", \n\t\t\t\t\"ocaleo \", \n\t\t\t\t\"llegar \", \n\t\t\t\t\"gallar \", \n\t\t\t\t\"codera \", \n\t\t\t\t\"bogara \", \n\t\t\t\t\"oreaba \", \n\t\t\t\t\"codear \", \n\t\t\t\t\"adarga \", \n\t\t\t\t\"abocad \", \n\t\t\t\t\"arcada \", \n\t\t\t\t\"edraba \", \n\t\t\t\t\"roblad \", \n\t\t\t\t\"cobreo \", \n\t\t\t\t\"baldea \", \n\t\t\t\t\"labora \", \n\t\t\t\t\"cobrea \", \n\t\t\t\t\"oblada \", \n\t\t\t\t\"araceo \", \n\t\t\t\t\"boreal \", \n\t\t\t\t\"arelad \", \n\t\t\t\t\"calado \", \n\t\t\t\t\"robeco \", \n\t\t\t\t\"alegro \", \n\t\t\t\t\"abordo \", \n\t\t\t\t\"abalea \", \n\t\t\t\t\"coalla \", \n\t\t\t\t\"oleado \", \n\t\t\t\t\"abollo \", \n\t\t\t\t\"loador \", \n\t\t\t\t\"decoro \", \n\t\t\t\t\"cloral \", \n\t\t\t\t\"rolaba \", \n\t\t\t\t\"agalla \", \n\t\t\t\t\"recoda \", \n\t\t\t\t\"aleara \", \n\t\t\t\t\"rogado \", \n\t\t\t\t\"regala \", \n\t\t\t\t\"obrada \", \n\t\t\t\t\"bolead \", \n\t\t\t\t\"clareo \", \n\t\t\t\t\"gordal \", \n\t\t\t\t\"alargo \", \n\t\t\t\t\"clarea \", \n\t\t\t\t\"acorad \", \n\t\t\t\t\"gabela \", \n\t\t\t\t\"callad \", \n\t\t\t\t\"colead \", \n\t\t\t\t\"glabra \", \n\t\t\t\t\"oleada \", \n\t\t\t\t\"cabrea \", \n\t\t\t\t\"alcedo \", \n\t\t\t\t\"lacead \", \n\t\t\t\t\"llagar \", \n\t\t\t\t\"arable \", \n\t\t\t\t\"groaba \", \n\t\t\t\t\"celara \", \n\t\t\t\t\"acarad \", \n\t\t\t\t\"clorad \", \n\t\t\t\t\"corlad \", \n\t\t\t\t\"celada \", \n\t\t\t\t\"alocar \", \n\t\t\t\t\"cablea \", \n\t\t\t\t\"abarca \", \n\t\t\t\t\"aballo \", \n\t\t\t\t\"cegara \", \n\t\t\t\t\"loable \", \n\t\t\t\t\"albead \", \n\t\t\t\t\"bolero \", \n\t\t\t\t\"bracea \", \n\t\t\t\t\"cegaba \", \n\t\t\t\t\"collar \", \n\t\t\t\t\"calaba \", \n\t\t\t\t\"blocar \", \n\t\t\t\t\"ollera \", \n\t\t\t\t\"bogare \", \n\t\t\t\t\"blocad \", \n\t\t\t\t\"acolle \", \n\t\t\t\t\"bogada \", \n\t\t\t\t\"arbole \", \n\t\t\t\t\"lobead \", \n\t\t\t\t\"lacrad \", \n\t\t\t\t\"golear \", \n\t\t\t\t\"acedar \", \n\t\t\t\t\"bollar \", \n\t\t\t\t\"algaba \", \n\t\t\t\t\"garbeo \", \n\t\t\t\t\"lacara \", \n\t\t\t\t\"dolara \", \n\t\t\t\t\"cebada \", \n\t\t\t\t\"lacare \", \n\t\t\t\t\"bolear \", \n\t\t\t\t\"acodar \", \n\t\t\t\t\"ralead \", \n\t\t\t\t\"albedo \", \n\t\t\t\t\"bocelo \", \n\t\t\t\t\"arcedo \", \n\t\t\t\t\"balara \", \n\t\t\t\t\"bacara \", \n\t\t\t\t\"cargad \", \n\t\t\t\t\"labelo \", \n\t\t\t\t\"legado \", \n\t\t\t\t\"allega \", \n\t\t\t\t\"legaba \", \n\t\t\t\t\"caread \", \n\t\t\t\t\"acalle \", \n\t\t\t\t\"becara \", \n\t\t\t\t\"allego \", \n\t\t\t\t\"cardal \", \n\t\t\t\t\"gradeo \", \n\t\t\t\t\"carbol \", \n\t\t\t\t\"carado \", \n\t\t\t\t\"carada \", \n\t\t\t\t\"carabo \", \n\t\t\t\t\"balaca \", \n\t\t\t\t\"carabe \", \n\t\t\t\t\"baldar \", \n\t\t\t\t\"caraba \", \n\t\t\t\t\"abrace \", \n\t\t\t\t\"acerba \", \n\t\t\t\t\"garbea \", \n\t\t\t\t\"rabada \", \n\t\t\t\t\"galleo \", \n\t\t\t\t\"aboral \", \n\t\t\t\t\"acelga \", \n\t\t\t\t\"lacear \", \n\t\t\t\t\"calleo \", \n\t\t\t\t\"labaro \", \n\t\t\t\t\"becado \", \n\t\t\t\t\"cordel \", \n\t\t\t\t\"croaba \", \n\t\t\t\t\"callea \", \n\t\t\t\t\"glabro \", \n\t\t\t\t\"oledor \", \n\t\t\t\t\"lacera \", \n\t\t\t\t\"ordago \", \n\t\t\t\t\"garlad \", \n\t\t\t\t\"arbola \", \n\t\t\t\t\"balada \", \n\t\t\t\t\"aclare \", \n\t\t\t\t\"ocalea \", \n\t\t\t\t\"calera \", \n\t\t\t\t\"legrad \", \n\t\t\t\t\"bacera \", \n\t\t\t\t\"doblar \", \n\t\t\t\t\"deboca \", \n\t\t\t\t\"caldeo \", \n\t\t\t\t\"cableo \", \n\t\t\t\t\"lacada \", \n\t\t\t\t\"acollo \", \n\t\t\t\t\"ollado \", \n\t\t\t\t\"dolora \", \n\t\t\t\t\"regalo \", \n\t\t\t\t\"lacero \", \n\t\t\t\t\"albada \", \n\t\t\t\t\"dolaba \", \n\t\t\t\t\"cobrad \", \n\t\t\t\t\"orlaba \", \n\t\t\t\t\"abogar \", \n\t\t\t\t\"bollad \", \n\t\t\t\t\"bagare \", \n\t\t\t\t\"cabala \", \n\t\t\t\t\"aborda \", \n\t\t\t\t\"oreada \", \n\t\t\t\t\"brollo \", \n\t\t\t\t\"doraba \", \n\t\t\t\t\"colgar \", \n\t\t\t\t\"acallo \", \n\t\t\t\t\"cagare \", \n\t\t\t\t\"cagara \", \n\t\t\t\t\"llagad \", \n\t\t\t\t\"cabreo \", \n\t\t\t\t\"aracea \", \n\t\t\t\t\"cagado \", \n\t\t\t\t\"ladrea \", \n\t\t\t\t\"albear \", \n\t\t\t\t\"brecol \", \n\t\t\t\t\"cagaba \", \n\t\t\t\t\"blocao \", \n\t\t\t\t\"rodela \", \n\t\t\t\t\"rollad \", \n\t\t\t\t\"areola \", \n\t\t\t\t\"algara \", \n\t\t\t\t\"cadera \", \n\t\t\t\t\"braceo \", \n\t\t\t\t\"lacaba \", \n\t\t\t\t\"alarde \", \n\t\t\t\t\"colore \", \n\t\t\t\t\"galeo \", \n\t\t\t\t\"gorda \", \n\t\t\t\t\"cabra \", \n\t\t\t\t\"credo \", \n\t\t\t\t\"alcor \", \n\t\t\t\t\"borde \", \n\t\t\t\t\"codea \", \n\t\t\t\t\"colad \", \n\t\t\t\t\"rodea \", \n\t\t\t\t\"codal \", \n\t\t\t\t\"llore \", \n\t\t\t\t\"rollo \", \n\t\t\t\t\"badea \", \n\t\t\t\t\"cable \", \n\t\t\t\t\"caber \", \n\t\t\t\t\"coleo \", \n\t\t\t\t\"acaro \", \n\t\t\t\t\"greba \", \n\t\t\t\t\"aldol \", \n\t\t\t\t\"gabro \", \n\t\t\t\t\"lacar \", \n\t\t\t\t\"erogo \", \n\t\t\t\t\"aboga \", \n\t\t\t\t\"grada \", \n\t\t\t\t\"cabro \", \n\t\t\t\t\"celar \", \n\t\t\t\t\"alega \", \n\t\t\t\t\"rolle \", \n\t\t\t\t\"alaga \", \n\t\t\t\t\"cagar \", \n\t\t\t\t\"clero \", \n\t\t\t\t\"legro \", \n\t\t\t\t\"braco \", \n\t\t\t\t\"reala \", \n\t\t\t\t\"reglo \", \n\t\t\t\t\"corea \", \n\t\t\t\t\"cabal \", \n\t\t\t\t\"calad \", \n\t\t\t\t\"gerbo \", \n\t\t\t\t\"alear \", \n\t\t\t\t\"corlo \", \n\t\t\t\t\"roela \", \n\t\t\t\t\"bagad \", \n\t\t\t\t\"raleo \", \n\t\t\t\t\"alalo \", \n\t\t\t\t\"cello \", \n\t\t\t\t\"decor \", \n\t\t\t\t\"calar \", \n\t\t\t\t\"cabre \", \n\t\t\t\t\"ralle \", \n\t\t\t\t\"carlo \", \n\t\t\t\t\"breca \", \n\t\t\t\t\"careo \", \n\t\t\t\t\"orale \", \n\t\t\t\t\"clore \", \n\t\t\t\t\"regla \", \n\t\t\t\t\"braga \", \n\t\t\t\t\"drago \", \n\t\t\t\t\"acoda \", \n\t\t\t\t\"carda \", \n\t\t\t\t\"colla \", \n\t\t\t\t\"rabea \", \n\t\t\t\t\"braca \", \n\t\t\t\t\"laceo \", \n\t\t\t\t\"racel \", \n\t\t\t\t\"cobra \", \n\t\t\t\t\"coral \", \n\t\t\t\t\"logro \", \n\t\t\t\t\"gordo \", \n\t\t\t\t\"grabo \", \n\t\t\t\t\"bollo \", \n\t\t\t\t\"caoba \", \n\t\t\t\t\"goleo \", \n\t\t\t\t\"coala \", \n\t\t\t\t\"cebar \", \n\t\t\t\t\"greco \", \n\t\t\t\t\"garla \", \n\t\t\t\t\"cobla \", \n\t\t\t\t\"bolla \", \n\t\t\t\t\"golea \", \n\t\t\t\t\"delga \", \n\t\t\t\t\"boleo \", \n\t\t\t\t\"cebad \", \n\t\t\t\t\"eroga \", \n\t\t\t\t\"llera \", \n\t\t\t\t\"claro \", \n\t\t\t\t\"ocelo \", \n\t\t\t\t\"calao \", \n\t\t\t\t\"cargo \", \n\t\t\t\t\"globo \", \n\t\t\t\t\"balad \", \n\t\t\t\t\"colar \", \n\t\t\t\t\"lobea \", \n\t\t\t\t\"legra \", \n\t\t\t\t\"cagad \", \n\t\t\t\t\"barde \", \n\t\t\t\t\"ladeo \", \n\t\t\t\t\"rabel \", \n\t\t\t\t\"aboca \", \n\t\t\t\t\"cardo \", \n\t\t\t\t\"geada \", \n\t\t\t\t\"bogar \", \n\t\t\t\t\"roblo \", \n\t\t\t\t\"bogad \", \n\t\t\t\t\"dallo \", \n\t\t\t\t\"garle \", \n\t\t\t\t\"rolde \", \n\t\t\t\t\"rolad \", \n\t\t\t\t\"bolea \", \n\t\t\t\t\"greca \", \n\t\t\t\t\"dalla \", \n\t\t\t\t\"boceo \", \n\t\t\t\t\"greda \", \n\t\t\t\t\"olead \", \n\t\t\t\t\"dable \", \n\t\t\t\t\"calor \", \n\t\t\t\t\"robla \", \n\t\t\t\t\"callo \", \n\t\t\t\t\"cegad \", \n\t\t\t\t\"larga \", \n\t\t\t\t\"croad \", \n\t\t\t\t\"bocea \", \n\t\t\t\t\"cebra \", \n\t\t\t\t\"bocal \", \n\t\t\t\t\"reoca \", \n\t\t\t\t\"goral \", \n\t\t\t\t\"corla \", \n\t\t\t\t\"bloco \", \n\t\t\t\t\"roble \", \n\t\t\t\t\"rallo \", \n\t\t\t\t\"rebol \", \n\t\t\t\t\"beldo \", \n\t\t\t\t\"eraba \", \n\t\t\t\t\"bloca \", \n\t\t\t\t\"doral \", \n\t\t\t\t\"bledo \", \n\t\t\t\t\"alead \", \n\t\t\t\t\"beodo \", \n\t\t\t\t\"beoda \", \n\t\t\t\t\"debla \", \n\t\t\t\t\"broca \", \n\t\t\t\t\"lleco \", \n\t\t\t\t\"doler \", \n\t\t\t\t\"bella \", \n\t\t\t\t\"belga \", \n\t\t\t\t\"areca \", \n\t\t\t\t\"ergol \", \n\t\t\t\t\"boldo \", \n\t\t\t\t\"oraba \", \n\t\t\t\t\"legar \", \n\t\t\t\t\"alego \", \n\t\t\t\t\"geoda \", \n\t\t\t\t\"carea \", \n\t\t\t\t\"becar \", \n\t\t\t\t\"ollao \", \n\t\t\t\t\"becad \", \n\t\t\t\t\"doble \", \n\t\t\t\t\"loaba \", \n\t\t\t\t\"locro \", \n\t\t\t\t\"lleca \", \n\t\t\t\t\"ralea \", \n\t\t\t\t\"rabeo \", \n\t\t\t\t\"barda \", \n\t\t\t\t\"barco \", \n\t\t\t\t\"olear \", \n\t\t\t\t\"droga \", \n\t\t\t\t\"cerda \", \n\t\t\t\t\"brego \", \n\t\t\t\t\"draba \", \n\t\t\t\t\"brega \", \n\t\t\t\t\"alala \", \n\t\t\t\t\"acare \", \n\t\t\t\t\"baleo \", \n\t\t\t\t\"dalle \", \n\t\t\t\t\"adobe \", \n\t\t\t\t\"albor \", \n\t\t\t\t\"oread \", \n\t\t\t\t\"bello \", \n\t\t\t\t\"balea \", \n\t\t\t\t\"gacel \", \n\t\t\t\t\"rolla \", \n\t\t\t\t\"graba \", \n\t\t\t\t\"algol \", \n\t\t\t\t\"albar \", \n\t\t\t\t\"acoro \", \n\t\t\t\t\"celda \", \n\t\t\t\t\"calla \", \n\t\t\t\t\"colea \", \n\t\t\t\t\"delco \", \n\t\t\t\t\"rodal \", \n\t\t\t\t\"balda \", \n\t\t\t\t\"llora \", \n\t\t\t\t\"acabe \", \n\t\t\t\t\"balar \", \n\t\t\t\t\"ollar \", \n\t\t\t\t\"ardea \", \n\t\t\t\t\"acara \", \n\t\t\t\t\"glera \", \n\t\t\t\t\"dobla \", \n\t\t\t\t\"llago \", \n\t\t\t\t\"larda \", \n\t\t\t\t\"orlad \", \n\t\t\t\t\"groad \", \n\t\t\t\t\"lacad \", \n\t\t\t\t\"bagre \", \n\t\t\t\t\"labro \", \n\t\t\t\t\"dolar \", \n\t\t\t\t\"coger \", \n\t\t\t\t\"bagar \", \n\t\t\t\t\"draga \", \n\t\t\t\t\"lodra \", \n\t\t\t\t\"legal \", \n\t\t\t\t\"badal \", \n\t\t\t\t\"borda \", \n\t\t\t\t\"grado \", \n\t\t\t\t\"loare \", \n\t\t\t\t\"grade \", \n\t\t\t\t\"acodo \", \n\t\t\t\t\"acode \", \n\t\t\t\t\"acebo \", \n\t\t\t\t\"grabe \", \n\t\t\t\t\"lobeo \", \n\t\t\t\t\"lacro \", \n\t\t\t\t\"lacre \", \n\t\t\t\t\"erala \", \n\t\t\t\t\"caera \", \n\t\t\t\t\"argel \", \n\t\t\t\t\"labra \", \n\t\t\t\t\"arelo \", \n\t\t\t\t\"cobol \", \n\t\t\t\t\"balde \", \n\t\t\t\t\"arela \", \n\t\t\t\t\"cerdo \", \n\t\t\t\t\"lerda \", \n\t\t\t\t\"garbo \", \n\t\t\t\t\"abada \", \n\t\t\t\t\"bolle \", \n\t\t\t\t\"bocel \", \n\t\t\t\t\"color \", \n\t\t\t\t\"calda \", \n\t\t\t\t\"godeo \", \n\t\t\t\t\"abaco \", \n\t\t\t\t\"lacea \", \n\t\t\t\t\"local \", \n\t\t\t\t\"borla \", \n\t\t\t\t\"alago \", \n\t\t\t\t\"bordo \", \n\t\t\t\t\"doblo \", \n\t\t\t\t\"gleba \", \n\t\t\t\t\"calle \", \n\t\t\t\t\"acera \", \n\t\t\t\t\"cabed \", \n\t\t\t\t\"acedo \", \n\t\t\t\t\"clara \", \n\t\t\t\t\"acaba \", \n\t\t\t\t\"arbol \", \n\t\t\t\t\"arado \", \n\t\t\t\t\"arada \", \n\t\t\t\t\"alada \", \n\t\t\t\t\"olera \", \n\t\t\t\t\"garlo \", \n\t\t\t\t\"labor \", \n\t\t\t\t\"arabo \", \n\t\t\t\t\"cella \", \n\t\t\t\t\"arabe \", \n\t\t\t\t\"araba \", \n\t\t\t\t\"redol \", \n\t\t\t\t\"oblea \", \n\t\t\t\t\"alora \", \n\t\t\t\t\"obelo \", \n\t\t\t\t\"celad \", \n\t\t\t\t\"gallo \", \n\t\t\t\t\"coreo \", \n\t\t\t\t\"agoro \", \n\t\t\t\t\"acero \", \n\t\t\t\t\"cegar \", \n\t\t\t\t\"agora \", \n\t\t\t\t\"galla \", \n\t\t\t\t\"codeo \", \n\t\t\t\t\"acora \", \n\t\t\t\t\"cedro \", \n\t\t\t\t\"radal \", \n\t\t\t\t\"legad \", \n\t\t\t\t\"abogo \", \n\t\t\t\t\"acore \", \n\t\t\t\t\"colgo \", \n\t\t\t\t\"bread \", \n\t\t\t\t\"clora \", \n\t\t\t\t\"albeo \", \n\t\t\t\t\"adoro \", \n\t\t\t\t\"galea \", \n\t\t\t\t\"barca \", \n\t\t\t\t\"alabe \", \n\t\t\t\t\"algar \", \n\t\t\t\t\"aceda \", \n\t\t\t\t\"caldo \", \n\t\t\t\t\"alero \", \n\t\t\t\t\"alera \", \n\t\t\t\t\"adobo \", \n\t\t\t\t\"alelo \", \n\t\t\t\t\"lagar \", \n\t\t\t\t\"coged \", \n\t\t\t\t\"caobo \", \n\t\t\t\t\"corle \", \n\t\t\t\t\"dogre \", \n\t\t\t\t\"regad \", \n\t\t\t\t\"agore \", \n\t\t\t\t\"roleo \", \n\t\t\t\t\"olada \", \n\t\t\t\t\"lloro \", \n\t\t\t\t\"ralla \", \n\t\t\t\t\"cloro \", \n\t\t\t\t\"ladea \", \n\t\t\t\t\"alado \", \n\t\t\t\t\"reblo \", \n\t\t\t\t\"cobre \", \n\t\t\t\t\"rebla \", \n\t\t\t\t\"baldo \", \n\t\t\t\t\"corbe \", \n\t\t\t\t\"lacra \", \n\t\t\t\t\"albea \", \n\t\t\t\t\"cobro \", \n\t\t\t\t\"rodeo \", \n\t\t\t\t\"bardo \", \n\t\t\t\t\"labre \", \n\t\t\t\t\"llaga \", \n\t\t\t\t\"grelo \", \n\t\t\t\t\"carel \", \n\t\t\t\t\"carga \", \n\t\t\t\t\"robda \", \n\t\t\t\t\"dogal \", \n\t\t\t\t\"aldea \", \n\t\t\t\t\"dolor \", \n\t\t\t\t\"ladra \", \n\t\t\t\t\"llaca \", \n\t\t\t\t\"lerdo \", \n\t\t\t\t\"loara \", \n\t\t\t\t\"largo \", \n\t\t\t\t\"acabo \", \n\t\t\t\t\"aboco \", \n\t\t\t\t\"obrad \", \n\t\t\t\t\"adore \", \n\t\t\t\t\"rabal \", \n\t\t\t\t\"adora \", \n\t\t\t\t\"lardo \", \n\t\t\t\t\"roda \", \n\t\t\t\t\"albo \", \n\t\t\t\t\"agro \", \n\t\t\t\t\"rolo \", \n\t\t\t\t\"caro \", \n\t\t\t\t\"caga \", \n\t\t\t\t\"alce \", \n\t\t\t\t\"garo \", \n\t\t\t\t\"groo \", \n\t\t\t\t\"cara \", \n\t\t\t\t\"cora \", \n\t\t\t\t\"laco \", \n\t\t\t\t\"logo \", \n\t\t\t\t\"cada \", \n\t\t\t\t\"roel \", \n\t\t\t\t\"coda \", \n\t\t\t\t\"orco \", \n\t\t\t\t\"alga \", \n\t\t\t\t\"orce \", \n\t\t\t\t\"redo \", \n\t\t\t\t\"cago \", \n\t\t\t\t\"loor \", \n\t\t\t\t\"arlo \", \n\t\t\t\t\"boro \", \n\t\t\t\t\"doga \", \n\t\t\t\t\"role \", \n\t\t\t\t\"bada \", \n\t\t\t\t\"olla \", \n\t\t\t\t\"ordo \", \n\t\t\t\t\"cala \", \n\t\t\t\t\"calo \", \n\t\t\t\t\"cero \", \n\t\t\t\t\"reda \", \n\t\t\t\t\"cela \", \n\t\t\t\t\"bale \", \n\t\t\t\t\"alar \", \n\t\t\t\t\"lace \", \n\t\t\t\t\"cole \", \n\t\t\t\t\"cabe \", \n\t\t\t\t\"dolo \", \n\t\t\t\t\"bago \", \n\t\t\t\t\"cola \", \n\t\t\t\t\"loro \", \n\t\t\t\t\"daga \", \n\t\t\t\t\"caer \", \n\t\t\t\t\"caed \", \n\t\t\t\t\"daba \", \n\t\t\t\t\"dore \", \n\t\t\t\t\"croo \", \n\t\t\t\t\"lada \", \n\t\t\t\t\"rogo \", \n\t\t\t\t\"edro \", \n\t\t\t\t\"blao \", \n\t\t\t\t\"obro \", \n\t\t\t\t\"arac \", \n\t\t\t\t\"cabo \", \n\t\t\t\t\"crea \", \n\t\t\t\t\"godo \", \n\t\t\t\t\"colo \", \n\t\t\t\t\"goda \", \n\t\t\t\t\"arda \", \n\t\t\t\t\"agre \", \n\t\t\t\t\"groa \", \n\t\t\t\t\"rego \", \n\t\t\t\t\"ador \", \n\t\t\t\t\"agra \", \n\t\t\t\t\"cego \", \n\t\t\t\t\"raba \", \n\t\t\t\t\"bode \", \n\t\t\t\t\"boda \", \n\t\t\t\t\"alla \", \n\t\t\t\t\"rala \", \n\t\t\t\t\"raed \", \n\t\t\t\t\"croe \", \n\t\t\t\t\"cedo \", \n\t\t\t\t\"rada \", \n\t\t\t\t\"croa \", \n\t\t\t\t\"creo \", \n\t\t\t\t\"doro \", \n\t\t\t\t\"aedo \", \n\t\t\t\t\"aeda \", \n\t\t\t\t\"adra \", \n\t\t\t\t\"algo \", \n\t\t\t\t\"deba \", \n\t\t\t\t\"aloa \", \n\t\t\t\t\"boca \", \n\t\t\t\t\"eral \", \n\t\t\t\t\"deca \", \n\t\t\t\t\"orlo \", \n\t\t\t\t\"orle \", \n\t\t\t\t\"groe \", \n\t\t\t\t\"aleo \", \n\t\t\t\t\"orla \", \n\t\t\t\t\"oreo \", \n\t\t\t\t\"baca \", \n\t\t\t\t\"bala \", \n\t\t\t\t\"boga \", \n\t\t\t\t\"orea \", \n\t\t\t\t\"alea \", \n\t\t\t\t\"doce \", \n\t\t\t\t\"doca \", \n\t\t\t\t\"roce \", \n\t\t\t\t\"cale \", \n\t\t\t\t\"lodo \", \n\t\t\t\t\"orbe \", \n\t\t\t\t\"brea \", \n\t\t\t\t\"oral \", \n\t\t\t\t\"orad \", \n\t\t\t\t\"lera \", \n\t\t\t\t\"gola \", \n\t\t\t\t\"olor \", \n\t\t\t\t\"beco \", \n\t\t\t\t\"breo \", \n\t\t\t\t\"geco \", \n\t\t\t\t\"ello \", \n\t\t\t\t\"balo \", \n\t\t\t\t\"llar \", \n\t\t\t\t\"roca \", \n\t\t\t\t\"oler \", \n\t\t\t\t\"oleo \", \n\t\t\t\t\"rabo \", \n\t\t\t\t\"lago \", \n\t\t\t\t\"oled \", \n\t\t\t\t\"coba \", \n\t\t\t\t\"lobo \", \n\t\t\t\t\"ardo \", \n\t\t\t\t\"grao \", \n\t\t\t\t\"gara \", \n\t\t\t\t\"galo \", \n\t\t\t\t\"olea \", \n\t\t\t\t\"bola \", \n\t\t\t\t\"alba \", \n\t\t\t\t\"bogo \", \n\t\t\t\t\"ogro \", \n\t\t\t\t\"odre \", \n\t\t\t\t\"bolo \", \n\t\t\t\t\"ceda \", \n\t\t\t\t\"lela \", \n\t\t\t\t\"goce \", \n\t\t\t\t\"arco \", \n\t\t\t\t\"real \", \n\t\t\t\t\"cebo \", \n\t\t\t\t\"coge \", \n\t\t\t\t\"codo \", \n\t\t\t\t\"arce \", \n\t\t\t\t\"laca \", \n\t\t\t\t\"ella \", \n\t\t\t\t\"ocal \", \n\t\t\t\t\"area \", \n\t\t\t\t\"debo \", \n\t\t\t\t\"abad \", \n\t\t\t\t\"obre \", \n\t\t\t\t\"edra \", \n\t\t\t\t\"roed \", \n\t\t\t\t\"obra \", \n\t\t\t\t\"oboe \", \n\t\t\t\t\"acal \", \n\t\t\t\t\"arad \", \n\t\t\t\t\"aloe \", \n\t\t\t\t\"lado \", \n\t\t\t\t\"lord \", \n\t\t\t\t\"lora \", \n\t\t\t\t\"robo \", \n\t\t\t\t\"lega \", \n\t\t\t\t\"lolo \", \n\t\t\t\t\"erad \", \n\t\t\t\t\"rola \", \n\t\t\t\t\"leal \", \n\t\t\t\t\"lead \", \n\t\t\t\t\"abre \", \n\t\t\t\t\"baga \", \n\t\t\t\t\"boer \", \n\t\t\t\t\"beca \", \n\t\t\t\t\"loco \", \n\t\t\t\t\"celo \", \n\t\t\t\t\"loca \", \n\t\t\t\t\"raca \", \n\t\t\t\t\"orca \", \n\t\t\t\t\"arel \", \n\t\t\t\t\"abra \", \n\t\t\t\t\"gala \", \n\t\t\t\t\"dare \", \n\t\t\t\t\"dara \", \n\t\t\t\t\"ledo \", \n\t\t\t\t\"leda \", \n\t\t\t\t\"daca \", \n\t\t\t\t\"bloc \", \n\t\t\t\t\"loba \", \n\t\t\t\t\"dora \", \n\t\t\t\t\"dola \", \n\t\t\t\t\"loar \", \n\t\t\t\t\"dogo \", \n\t\t\t\t\"acre \", \n\t\t\t\t\"load \", \n\t\t\t\t\"ralo \", \n\t\t\t\t\"dole \", \n\t\t\t\t\"arca \", \n\t\t\t\t\"core \", \n\t\t\t\t\"lelo \", \n\t\t\t\t\"lego \", \n\t\t\t\t\"rode \", \n\t\t\t\t\"ergo \", \n\t\t\t\t\"rodo \", \n\t\t\t\t\"cera \", \n\t\t\t\t\"ocre \", \n\t\t\t\t\"crol \", \n\t\t\t\t\"broa \", \n\t\t\t\t\"ceba \", \n\t\t\t\t\"laro \", \n\t\t\t\t\"arde \", \n\t\t\t\t\"coro \", \n\t\t\t\t\"dala \", \n\t\t\t\t\"abro \", \n\t\t\t\t\"alo \", \n\t\t\t\t\"leo \", \n\t\t\t\t\"bel \", \n\t\t\t\t\"ego \", \n\t\t\t\t\"loa \", \n\t\t\t\t\"lle \", \n\t\t\t\t\"bar \", \n\t\t\t\t\"bao \", \n\t\t\t\t\"gea \", \n\t\t\t\t\"ceo \", \n\t\t\t\t\"caa \", \n\t\t\t\t\"ore \", \n\t\t\t\t\"ada \", \n\t\t\t\t\"ara \", \n\t\t\t\t\"ora \", \n\t\t\t\t\"aca \", \n\t\t\t\t\"gel \", \n\t\t\t\t\"are \", \n\t\t\t\t\"del \", \n\t\t\t\t\"cea \", \n\t\t\t\t\"goa \", \n\t\t\t\t\"ola \", \n\t\t\t\t\"oco \", \n\t\t\t\t\"rob \", \n\t\t\t\t\"dar \", \n\t\t\t\t\"reg \", \n\t\t\t\t\"oca \", \n\t\t\t\t\"reo \", \n\t\t\t\t\"oda \", \n\t\t\t\t\"col \", \n\t\t\t\t\"gro \", \n\t\t\t\t\"loo \", \n\t\t\t\t\"roa \", \n\t\t\t\t\"aga \", \n\t\t\t\t\"cor \", \n\t\t\t\t\"era \", \n\t\t\t\t\"coa \", \n\t\t\t\t\"ero \", \n\t\t\t\t\"loe \", \n\t\t\t\t\"rea \", \n\t\t\t\t\"rae \", \n\t\t\t\t\"rol \", \n\t\t\t\t\"clo \", \n\t\t\t\t\"rad \", \n\t\t\t\t\"dea \", \n\t\t\t\t\"lar \", \n\t\t\t\t\"car \", \n\t\t\t\t\"rao \", \n\t\t\t\t\"oro \", \n\t\t\t\t\"cao \", \n\t\t\t\t\"ade \", \n\t\t\t\t\"cal \", \n\t\t\t\t\"gol \", \n\t\t\t\t\"boa \", \n\t\t\t\t\"red \", \n\t\t\t\t\"ole \", \n\t\t\t\t\"bol \", \n\t\t\t\t\"ado \", \n\t\t\t\t\"erg \", \n\t\t\t\t\"cae \", \n\t\t\t\t\"gal \", \n\t\t\t\t\"ala \", \n\t\t\t\t\"aro \", \n\t\t\t\t\"roe \", \n\t\t\t\t\"ale \", \n\t\t\t\t\"eco \", \n\t\t\t\t\"de \", \n\t\t\t\t\"lo \", \n\t\t\t\t\"da \", \n\t\t\t\t\"go \", \n\t\t\t\t\"le \", \n\t\t\t\t\"ea \", \n\t\t\t\t\"ro \", \n\t\t\t\t\"ad \", \n\t\t\t\t\"oc \", \n\t\t\t\t\"re \", \n\t\t\t\t\"ar \", \n\t\t\t\t\"be \", \n\t\t\t\t\"la \", \n\t\t\t\t\"el \", \n\t\t\t\t\"al \", \n\t\t\t\t\"do \", \n\t\t\t\t\"ce \", \n\t\t\t\t\"ge \", \n\t\t\t\t\"ab \"\t\t\n\t\t};\n\n\t\tputAnagramsTogether(sArray);\t\n\n\t}", "public LinkedList[] adyacencias() {\treturn adyacencias;\t}", "@Test\n\tpublic void testEquivalentSequences(){\n\t\tchord = new Chord(1, Tonality.maj, 4);\n\t\tChord chord2 = new Chord(1, Tonality.maj, 4);\n\t\tassertTrue(chord.equals(chord2));\n\t\tassertTrue(chord2.equals(chord));\n\n\t\tLinkedList<Chord> sequence = new LinkedList<Chord>();\n\t\tLinkedList<Chord> sequence2 = new LinkedList<Chord>();\n\n\t\tsequence.add(chord);\n\t\tsequence.add(chord2);\n\t\tsequence2.add(chord);\n\t\tsequence2.add(chord2);\n\t\tassertEquals(sequence, sequence2);\n\n\t\tsequence2.clear();\n\t\tsequence2.addAll(sequence);\n\t\tassertEquals(sequence, sequence2);\n\t}", "private static Integer[] listaCategoriasCadastradas() throws Exception {\r\n int count = 0;\r\n ArrayList<Categoria> lista = arqCategorias.toList();\r\n Integer[] idsValidos = null; //Lista retornando os ids de categorias validos para consulta\r\n if (!lista.isEmpty()) {\r\n idsValidos = new Integer[lista.size()];\r\n System.out.println(\"\\t** Lista de categorias cadastradas **\\n\");\r\n for (Categoria c : lista) {\r\n System.out.println(c);\r\n idsValidos[count] = c.getID();\r\n count++;\r\n }\r\n }\r\n return idsValidos;\r\n }", "public Sequence nextSequence(Alphabet alphabet) throws IOException{\n\t\tif (eof)\n\t\t\treturn null;\n\n\n\t\tif (alphabet == null){\n\t\t\talphabet = Alphabet.DNA16();//The most conservative\n\t\t}\n\n\t\tStringBuilder header = new StringBuilder();\n\t\tseqIndex = 0;//the number of nucletiodes read\n\n\t\tif (currentByte != 62){// 62 = '>'\n\t\t\tthrow new RuntimeException(\"> is expected at the start line \" + lineNo + \", found \" + ((char)currentByte));\n\t\t}\n\n\t\t//Read the header\n\t\twhile (!eol){\n\t\t\tnextByte();\n\t\t\theader.append((char) currentByte);\n\t\t}\n\n\t\twhile (true){\n\t\t\tif (nextByte()){\n\t\t\t\tbyte nucleotide = alphabet.byte2index(currentByte);\n\n\t\t\t\tif (nucleotide >= 0){//valid nucleotide\t\t\t\t\n\t\t\t\t\t//ensure the sequence array is big enough\n\t\t\t\t\tif (seqIndex >= seq.length) {// Full\n\t\t\t\t\t\tint newLength = seq.length * 2;\n\t\t\t\t\t\tif (newLength < 0) {\n\t\t\t\t\t\t\tnewLength = Integer.MAX_VALUE;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// if the array is extended\n\t\t\t\t\t\tif (newLength <= seqIndex) {\n\t\t\t\t\t\t\t// in.close();\n\t\t\t\t\t\t\tthrow new RuntimeException(\n\t\t\t\t\t\t\t\t\t\"Sequence is too long to handle\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// create new array of byte\n\t\t\t\t\t\tseq = Arrays.copyOf(seq, newLength);\n\t\t\t\t\t}\n\t\t\t\t\t//next symbol\n\t\t\t\t\tseq[seqIndex++] = nucleotide;\n\t\t\t\t\t//seqIndex++;\t\t\t\t\t\n\t\t\t\t}else if(currentByte == 62){\n\t\t\t\t\t//start of a new sequence\n\t\t\t\t\t//seqNo ++;\n\t\t\t\t\treturn makeSequence(alphabet, seq, seqIndex, header.toString().trim());\n\t\t\t\t}else{\n\t\t\t\t\tif (nucleotide == -1){\n\t\t\t\t\t\tthrow new RuntimeException(\"Unexecpected character '\" + (char) currentByte + \"' for dna {\" + alphabet + \"} at the line \" + lineNo);\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}//if\n\t\t\telse{\n\t\t\t\t//seqNo ++;\n\t\t\t\treturn makeSequence(alphabet, seq, seqIndex, header.toString().trim());\n\t\t\t}\t\t\t\n\n\t\t}\n\t}", "public static void main(String [] args) {\n ArrayList<String> all;\n LinkedList<String> ll;\n CircularlyLinkedList<String> sll = new CircularlyLinkedList<>();\n\n String[] alphabet = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\".split(\"\");\n\n for (String s : alphabet) {\n sll.addFirst(s);\n sll.addLast(s);\n }\n System.out.println(sll.toString());\n\n sll.rotate();\n sll.rotate();\n\n for (String s : sll) {\n System.out.print(s + \", \");\n }\n\n }", "public List<C0446fs> mo4736a(String str) {\n if (str == null) {\n throw new IllegalArgumentException(\"No name specified.\");\n }\n ArrayList arrayList = new ArrayList(this.f1125c.size());\n for (C0446fs next : this.f1125c) {\n if (str.equalsIgnoreCase(next.mo4735a())) {\n arrayList.add(next);\n }\n }\n return arrayList;\n }", "public ArrayList<ArrayList<Integer>> anagrams(final List<String> a) \n {\n //The idea here is simple we can make sure two strings are anagrams if we sort them and then check \n HashMap<String,ArrayList<Integer>> map=new HashMap<>();\n for(int i=0;i<a.size();i++)\n {\n char c[]=a.get(i).toCharArray();//pick every String\n Arrays.sort(c);//sort the string\n String s=new String(c);\n ArrayList<Integer> b;\n if(map.containsKey(s))//put its relative index in the HashMap\n {\n b=map.get(s);\n b.add(i+1);\n map.put(s,b);\n }\n else\n {\n b=new ArrayList<>();\n b.add(i+1);\n map.put(s,b);\n }\n }\n //Add the values of HashMap to ArrayList\n ArrayList<ArrayList<Integer>> ans=new ArrayList<>();\n for(Map.Entry<String,ArrayList<Integer>> it:map.entrySet())\n {\n ans.add(it.getValue());\n }\n \n return ans;\n }", "private boolean comparacionOblicuaID(String[] dna) {\n boolean repetir;\n int aux = 0;\n final int CASO = 3;\n int largo = dna.length - CASO - 1;\n int repaso = 1, fila,columna;\n do {\n do {\n repetir = true;\n if (repaso == 1) {\n fila = 0;\n columna = largo - aux;\n } else {\n fila = largo - aux;\n columna = 0;\n }\n for (int i = 0; i <= (CASO + aux); i += 2) {\n int colum = columna + i;\n int fil = fila + i;\n if ((colum) == (fil) && repaso == 1) {\n repetir = false; break;\n }\n if (((dna.length-CASO)>=colum && repaso==1) || ((dna.length-CASO)>=fil && repaso==0)) {\n if (dna[fil].charAt(colum) == dna[fil + 2].charAt(colum + 2)) {\n if (dna[fil].charAt(colum) == dna[fil + 1].charAt(colum + 1)) {\n if (((fil - 1) >= 0 && (colum - 1) >= 0) && (dna[fil].charAt(colum) == dna[fil - 1].charAt(colum - 1))) {\n cantidadSec++;\n if(cantidadSec>1)return true;\n if (colum == fil) repetir = false;\n break;\n } else {\n if (((dna.length - CASO+1) >= (colum + 3) && repaso == 1) || ((dna.length-1) >= (fil + 3) && repaso == 0)) {\n if ((dna[fil].charAt(colum) == dna[fil + 3].charAt(colum + 3))) {\n cantidadSec++;\n if(cantidadSec>1)return true;\n if (colum == fil) repetir = false;\n break;\n }\n }\n }\n }\n }\n } else {\n if (colum == fil) repetir = false;\n }\n }\n aux++;\n } while (repetir);\n repaso--;\n aux = 0;\n } while (repaso >= 0);\n return false;\n }", "public static void viewPatientsStoredInAlphabetical() {\n\r\n String[] alphabeticalOrder = new String[6]; //Creates an array called 'alphabeticalOrder'\r\n for (int y=0; y<firstName.length; y++) {\r\n alphabeticalOrder[y] = firstName[y]; //Getting values from the 'vaccinationCenter' array and passing them to the 'alphabeticalOrder' array\r\n }\r\n for(int a=0; a<(alphabeticalOrder.length-1); a++)\r\n {\r\n for(int b=a+1; b<alphabeticalOrder.length; b++)\r\n {\r\n if((alphabeticalOrder[a].toLowerCase(Locale.ROOT)).compareTo(alphabeticalOrder[b].toLowerCase(Locale.ROOT))> 0)\r\n {\r\n String temp = alphabeticalOrder[a];\r\n alphabeticalOrder[a] = alphabeticalOrder[b];\r\n alphabeticalOrder[b] = temp;\r\n //Sorted elements of the array to alphabetical order\r\n }\r\n }\r\n }\r\n System.out.println(Arrays.toString(alphabeticalOrder));\r\n }", "public static boolean testAlphabetListAdd() {\r\n AlphabetList list1 = new AlphabetList();\r\n list1.add(new Cart(\"D\"));\r\n if (list1.size() != 1)\r\n return false;\r\n list1.add(new Cart(\"A\"));\r\n if (list1.size() != 2)\r\n return false;\r\n list1.add(new Cart(\"Z\"));\r\n if (list1.size() != 3)\r\n return false;\r\n list1.add(new Cart(\"C\"));\r\n if (list1.size() != 4)\r\n return false;\r\n if (list1.get(2).getCargo().toString() != \"D\")\r\n return false;\r\n if (list1.indexOf(new Cart(\"C\")) != 1)\r\n return false;\r\n if (!list1.readForward().equals(\"ACDZ\"))\r\n return false;\r\n if (!list1.readBackward().equals(\"ZDCA\"))\r\n return false;\r\n return true;\r\n }", "public List<String> getAuids() {\n return auids;\n }", "public static void main(String[] args) {\n\t\tAnagrams q = new Anagrams();\r\n\t\tString s1 = \"abcd\";\r\n\t\tString s2 = \"acbd\";\r\n\t\tString s3 = \"bcad\";\r\n\t\tString s4 = \"acb\";\r\n\t\tString s5 = \"abc\";\r\n\t\tString s6 = \"abd\";\r\n\t\tString s7 = \"abdc\";\r\n\t\tString s8 = \"ac\";\r\n\t\t//ArrayList<String> result = new ArrayList<String>();\r\n\t\tString[] strs = {s1,s2,s3,s4,s5,s6,s7,s8};\r\n\r\n\t\tList<String> list = q.anagrams(strs);\r\n\t\t//char[] charArray = {'h','e','l','l','o'};\r\n\t\tfor(String s:list){\r\n\t\t\tSystem.out.println(s);\r\n\t\t}\r\n\t\t//System.out.println(charArray.toString());\r\n\t}", "public List<Ano> getAno() {\n\t\treturn ano;\n\t}", "private List<String> findAnts(String inputFileName) {\n\nList<String> lines = new ArrayList<>();\ntry {\nBufferedReader br = new BufferedReader(new FileReader(inputFileName));\nString line = br.readLine();\nwhile (line != null) {\nlines.add(line);\nline = br.readLine();\n}\n} catch (Exception e) {\n\n}\n\nchar[] splitLineByLetterOrDigit;\nList<String> saveAnts = new ArrayList<>();\n\nfor (int k = 0; k < lines.size(); k++) {\nString singleLine = lines.get(k);\nsplitLineByLetterOrDigit = singleLine.toCharArray();\nfor (int i = 0; i < splitLineByLetterOrDigit.length; i++) {\nif (Character.isLetter(splitLineByLetterOrDigit[i])) {\n// first is row\nsaveAnts.add(String.format(\"%d %d %s\", k, i, splitLineByLetterOrDigit[i]));\n}\n}\n}\n\nreturn saveAnts;\n}", "public void setAuids(List<String> auids) {\n this.auids = auids;\n }", "public List<BigInteger> getNonceList(AionAddress acc) {\n\n List<BigInteger> nl = Collections.synchronizedList(new ArrayList<>());\n lock.readLock().lock();\n this.getAccView(acc).getMap().entrySet().parallelStream().forEach(e -> nl.add(e.getKey()));\n lock.readLock().unlock();\n\n return nl.parallelStream().sorted().collect(Collectors.toList());\n }", "identifierList getIdentifierList();", "ArrayList<Integer>getCatalog_IDs(int acc_no);", "public static void main(String[] args) {\n String input = \"ABC\";\n List<String> result = new ArrayList <> ();\n result = permutations(input);\n System.out.println(Arrays.asList(result)); \n }", "@Override\n public char[][] buildDnaTable(String[] dna) {\n var table = new char[dna.length][dna.length];\n\n // loop of dna\n for (var row = 0; row < dna.length; row++) {\n char[] rowData = dna[row].toCharArray();\n // validate structured & content\n validateSequenceData(rowData, dna.length);\n table[row] = rowData;\n }\n\n\n return table;\n }", "public static void main(String[] args) {\n Node a = new Node(50);\n Node b = new Node(20);\n Node c = new Node(60);\n Node d = new Node(10);\n Node e = new Node(25);\n Node f = new Node(70);\n Node g = new Node(5);\n Node h = new Node(15);\n Node i = new Node(65);\n Node j = new Node(80);\n a.left = b;\n a.right = c;\n b.left = d;\n b.right = e;\n c.right = f;\n d.left = g;\n d.right = h;\n f.left = i;\n f.right = j;\n ArrayList<LinkedList<Integer>> lists = bstSequences(a);\n for (LinkedList sequence : lists)\n System.out.println(sequence);\n\n /*\n * 2 / \\ 1 3\n */\n a = new Node(2);\n b = new Node(1);\n c = new Node(3);\n a.left = b;\n a.right = c;\n lists = bstSequences(a);\n for (LinkedList sequence : lists)\n System.out.println(sequence);\n }", "@Test\n public void callGetPossibleMoves() {\n\n game.setNode(new NodeImp(\"3,3\",\"P2\"));\n\n game.setNode(new NodeImp(\"3,4\",\"P1\"));\n\n game.setNode(new NodeImp(\"4,3\",\"P1\"));\n\n game.setNode(new NodeImp(\"4,4\",\"P2\"));\n\n String[] expectedMoves = {\"2,3\",\"4,5\",\"3,2\",\"5,4\"};\n Arrays.sort(expectedMoves);\n\n List<Node> actualPossibleMoves = game.getPossibleMoves();\n List<String> stringList = new Vector<>();\n for(Node node:actualPossibleMoves) {\n\n stringList.add(node.getId());\n\n }\n\n Object[] objectList = stringList.toArray();\n String[] actualMoves = Arrays.copyOf(objectList, objectList.length, String[].class);\n Arrays.sort(actualMoves);\n assertArrayEquals(expectedMoves, actualMoves);\n }", "@Override\n\tpublic List<Arco> obtenerArcos() {\n\t\treturn arcos;\n\t}", "List<String> mo5876c();", "public String[] obtencioAssignatures(String codi) {\n\t\ttry {\n\t\t\treturn llegeixAssigs(codi).split(\"\\n\");\n\t\t} catch (Exception e) {\n\t\t\treturn null;\n\t\t}\n\t}", "public String[] createAlignmentStrings(List<CigarElement> cigar, String refSeq, String obsSeq, int totalReads) {\n\t\tStringBuilder aln1 = new StringBuilder(\"\");\n\t\tStringBuilder aln2 = new StringBuilder(\"\");\n\t\tint pos1 = 0;\n\t\tint pos2 = 0;\n\t\t\n\t\tfor (int i=0;i<cigar.size();i++) {\n\t\t//for (CigarElement ce: cigar) {\n\t\t\tCigarElement ce = cigar.get(i);\n\t\t\tint cel = ce.getLength();\n\n\t\t\tswitch(ce.getOperator()) {\n\t\t\t\tcase M:\n\t\t\t\t\taln1.append(refSeq.substring(pos1, pos1+cel));\n\t\t\t\t\taln2.append(obsSeq.substring(pos2, pos2+cel));\n\t\t\t\t\tpos1 += cel;\n\t\t\t\t\tpos2 += cel;\n\t\t\t\t\tbreak;\n\t\t\t\tcase N:\n\t\t\t\t\taln1.append(this.createString('-', cel));\n\t\t\t\t\taln2.append(this.createString('-', cel));\n\t\t\t\t\tpos1 += cel;\n\t\t\t\t\tbreak;\n\t\t\t\tcase S:\n\t\t\t\t\taln1.append(this.createString('S', cel));\n\t\t\t\t\taln2.append(this.createString('S', cel));\n\t\t\t\t\tpos2 += cel;\n\t\t\t\t\tbreak;\n\t\t\t\tcase I:\n\t\t\t\t\taln1.append(this.createString('-', cel));\n\t\t\t\t\taln2.append(obsSeq.substring(pos2, pos2+cel));\n\t\t\t\t\tpos2 += cel;\n\t\t\t\t\tbreak;\n\t\t\t\tcase D:\n\t\t\t\t\tif (i < cigar.size()-1) { \n\t\t\t\t\t\taln1.append(refSeq.substring(pos1, pos1+cel));\n\t\t\t\t\t\taln2.append(this.createString('-', cel));\n\t\t\t\t\t\tpos1 += cel;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase H:\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tSystem.out.println(String.format(\"Don't know how to handle this CIGAR tag: %s. Record %d\",ce.getOperator().toString(),totalReads));\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn new String[]{aln1.toString(),aln2.toString()};\n\t\t\n\t}", "public static List<String> sortDNA(List<String> unsortedSequences) {\n\t\tfor (int i = 0; i < unsortedSequences.size()-1; i++) {\n\t\t\tif (unsortedSequences.get(i).length()>unsortedSequences.get(i+1).length()) {\n\t\t\t\t\n\t\t\t\tString temp = unsortedSequences.get(i);\n\t\t\t\t\n\t\t\t\tunsortedSequences.set(i, unsortedSequences.get(i+1));\n\t\t\t\t\n\t\t\t\tunsortedSequences.set(i+1, temp);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\treturn unsortedSequences;\n\t\t//return 0;\n\t}", "public ArrayList<String> mostraLlistaAtribs(){\n ArrayList<String> tauleta = new ArrayList<>();\n System.out.print(\"num atribs: \"+list.getNomLlista()+\"\\n\");\n String aux = list.getAtribs().get(0).getNom();\n for (int i=1; i<list.getAtribs().size(); i++){\n aux += \"\\t\" + list.getAtribs().get(i).getNom();\n }\n tauleta.add(aux);\n for (int j=0; j<list.getNumCasos(); j++) {\n aux = list.getAtribs().get(0).getCasos().get(j);\n for (int i = 1; i < list.getAtribs().size(); i++) {\n aux += \"\\t\" + list.getAtribs().get(i).getCasos().get(j);\n }\n tauleta.add(aux);\n }\n return tauleta;\n }", "public static void main(String args[]) {\n\n // aacd(1,1,3,4) amd(1,13,4) kcd(11,3,4)\n // Note : 1,1,34 is not valid as we don't have values corresponding\n // to 34 in alphabet\n int[] arr = {1, 1, 3, 4};\n printAllInterpretations(arr);\n\n // aaa(1,1,1) ak(1,11) ka(11,1)\n int[] arr2 = {1, 1, 1};\n printAllInterpretations(arr2);\n\n // bf(2,6) z(26)\n int[] arr3 = {2, 6};\n printAllInterpretations(arr3);\n\n // ab(1,2), l(12)\n int[] arr4 = {1, 2};\n printAllInterpretations(arr4);\n\n // a(1,0} j(10)\n int[] arr5 = {1, 0};\n printAllInterpretations(arr5);\n\n // \"\" empty string output as array is empty\n int[] arr6 = {};\n printAllInterpretations(arr6);\n\n // abba abu ava lba lu\n int[] arr7 = {1, 2, 2, 1};\n printAllInterpretations(arr7);\n }", "@Test\r\n public void PermutationTest() {\r\n System.out.println(\"permutation\");\r\n String prefix = \"\";\r\n String in = \"123\";\r\n Input input = new Input(in);\r\n List<String> expResult = Arrays.asList(\"123\",\"132\",\"213\",\"231\",\"312\",\"321\");\r\n List<String> result = instance.permutation(prefix, input);\r\n instance.sort(result);\r\n assertEquals(expResult, result);\r\n }", "public Sequence nextSequence(Alphabet alphabet) throws IOException{\t\t\t \t\t\t\t\n\t\t\t//array to hold indexes of nucleotides\n\t\t\tif (alphabet == null){\n\t\t\t\talphabet = Alphabet.DNA16();//The most conservative\n\t\t\t}\n\n\t\t\tStringBuilder header = new StringBuilder();\n\n\t\t\tseqIndex = 0;//the number of nucletiodes read\t\t\n\t\t\tif (pos >= count){\n\t\t\t\tcount = in.read(buff);\n\t\t\t\tpos = 0;\n\t\t\t}\n\t\t\t//No more in the stream\n\t\t\tif (count <=0 ) return null;\n\n\t\t\tif (buff[pos++] != 62){// 62 = '>'\n\t\t\t\tpos --;\n\t\t\t\tthrow new RuntimeException(\"> is expected at the start of Fasta No \" + seqNo);\n\t\t\t}\n\n\t\t\tboolean seqMode = false; \n\n\t\t\tfor (;;){\n\t\t\t\t//make sure there is something in the buffer\n\t\t\t\t//this could be replaced with nextByte()\n\t\t\t\tif (pos >= count){\n\t\t\t\t\tcount = in.read(buff);\n\t\t\t\t\tif (count <= 0) break;//no more to read\n\t\t\t\t\tpos = 0;\n\t\t\t\t}\n\t\t\t\t//process buffer\n\t\t\t\twhile (pos < count){\n\t\t\t\t\tbyte currentByte = buff[pos++];\t\t\t\t\n\n\t\t\t\t\tif (seqMode){//reading header\n\t\t\t\t\t\t//reading sequence\t\t\t\t\t\n\t\t\t\t\t\tbyte nucleotide = alphabet.byte2index(currentByte);\n\t\t\t\t\t\t//assert nucleotide < dna.size()\n\t\t\t\t\t\tif (nucleotide >= 0){\n\t\t\t\t\t\t\tif (seqIndex >= seq.length) {// Full\n\t\t\t\t\t\t\t\tint newLength = seq.length * 2;\n\t\t\t\t\t\t\t\tif (newLength < 0) {\n\t\t\t\t\t\t\t\t\tnewLength = Integer.MAX_VALUE;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// if the array is extended\n\t\t\t\t\t\t\t\tif (newLength <= seqIndex) {\n\t\t\t\t\t\t\t\t\t// in.close();\n\t\t\t\t\t\t\t\t\tthrow new RuntimeException(\n\t\t\t\t\t\t\t\t\t\t\t\"Sequence is too long to handle\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// create new array of byte\n\t\t\t\t\t\t\t\tseq = Arrays.copyOf(seq, newLength);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tseq[seqIndex++] = nucleotide;\n\t\t\t\t\t\t\t//seqIndex++;\t\t\t\t\t\n\t\t\t\t\t\t}else if(currentByte == 62){\n\t\t\t\t\t\t\t//start of a new sequence\n\t\t\t\t\t\t\tpos --;\n\t\t\t\t\t\t\tseqNo ++;\n\t\t\t\t\t\t\treturn new Sequence(alphabet, seq, seqIndex, header.toString());\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tif (nucleotide == -1){\n\t\t\t\t\t\t\t\tthrow new RuntimeException(\"Unexecpected character '\" + (char) currentByte + \"' for dna {\" + alphabet + \"} for sequence \" + seqNo);\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}//mode == 0\n\t\t\t\t\telse{\n\t\t\t\t\t\tif (currentByte == 10 ){//CR \n\t\t\t\t\t\t\tseqMode = true;\n\t\t\t\t\t\t\t//\t\t\t\t\t\tlineNo ++;\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}else if (currentByte == 13){//LF\n\t\t\t\t\t\t\tseqMode = true;\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\theader.append((char) currentByte);\n\t\t\t\t\t}\n\t\t\t\t}//while\t\t\t\t\t\n\t\t\t}//for\n\t\t\tseqNo ++;\n\t\t\treturn new Sequence(alphabet, seq, seqIndex, header.toString());\n\t\t}", "public int[] contarCodons(String seq){\n int [] countCodons=new int[65];\n for (int i=0;i<seq.length()-2;i=i+3){\n String c=seq.substring(i, i+3);\n int j=0;\n while (j<nameCodon.length && nameCodon[j].compareTo(c)!=0) j++;\n if (j<nameCodon.length)\n countCodons[j]++;\n else\n countCodons[64]++;\n }\n return countCodons;\n\n }", "public List<String> findRepeatedDnaSequences(String s){\n HashMap<Character,Integer> map=new HashMap<>();\n Set<Integer> firstSet=new HashSet<>();\n Set<Integer> dupSet=new HashSet<>();\n List<String> res=new ArrayList<>();\n map.put('A',0);\n map.put('C',1);\n map.put('G',2);\n map.put('T',3);\n char[] chars=s.toCharArray();\n for(int i=0;i<chars.length-9;i++){\n int v=0;\n for(int j=i;j<i+10;j++){\n v<<=2;\n v|=map.get(chars[j]);\n }\n if(!firstSet.add(v)&&dupSet.add(v)){\n res.add(s.substring(i,i+10));\n }\n }\n return res;\n }", "public void addAaSequence(String sequence) {\n aminoAcidSequence += sequence;\n }", "public static List<Arena> getArenas() {\n return arenas;\n }", "public List<Interaction> getActionsOutputFromAttacs(List<AttacDecl> list) \r\n\t\t{\r\n\t\tList<Interaction> list2 = new ArrayList<Interaction>();\r\n\t\tfor (AttacDecl attacDecl : list)\r\n\t\t\t{\r\n\t\t\tString string = attacDecl.getOutputInteraction();\r\n\t\t\tString string2 = attacDecl.getOutputAei();\r\n\t\t\tInteraction interaction = new Interaction(string2,string);\r\n\t\t\tlist2.add(interaction);\r\n\t\t\t}\r\n\t\treturn list2;\r\n\t\t}", "public static NodoListaC creaInTesta() {\r\n\t\tNodoListaC a = new NodoListaC();\r\n\t\ta.info = 'A';\r\n\t\ta.next = null;\r\n\t\tNodoListaC p = a;\r\n\t\tchar c;\r\n\t\tfor (c = 'B'; c <= 'Z'; c++) {\r\n\t\t a = new NodoListaC();\r\n\t\t a.info = c;\r\n\t\t a.next = p;\r\n\t\t p = a; // p va a puntare\r\n\t\t} // all’inizio della lista\r\n\t\treturn p; // oppure return a;\r\n\t}", "public String guessSequenceType(final String seq) {\n\n\t int canonicalNucStates = 0;\n\t int undeterminedStates = 0;\n\t // true length, excluding any gaps\n\t int sequenceLength = seq.length();\n\t final int seqLen = sequenceLength;\n\n\t boolean onlyValidNucleotides = true;\n\t boolean onlyValidAminoAcids = true;\n\n\t // do not use toCharArray: it allocates an array size of sequence\n\t for(int k = 0; (k < seqLen) && (onlyValidNucleotides || onlyValidAminoAcids); ++k) {\n\t final char c = seq.charAt(k);\n\t final boolean isNucState = (\"ACGTUXNacgtuxn?_-\".indexOf(c) > -1);\n\t final boolean isAminoState = true;\n\n\t onlyValidNucleotides &= isNucState;\n\t onlyValidAminoAcids &= isAminoState;\n\n\t if (onlyValidNucleotides) {\n\t assert(isNucState);\n\t if ((\"ACGTacgt\".indexOf(c) > -1)) {\n\t ++canonicalNucStates;\n\t } else {\n\t if ((\"?_-\".indexOf(c) > -1)) {\n\t --sequenceLength;\n\t } else if( (\"UXNuxn\".indexOf(c) > -1)) {\n\t ++undeterminedStates;\n\t }\n\t }\n\t }\n\t }\n\n\t String result = \"aminoacid\";\n\t if (onlyValidNucleotides) { // only nucleotide states\n\t // All sites are nucleotides (actual or ambigoues). If longer than 100 sites, declare it a nuc\n\t if( sequenceLength >= 100 ) {\n\t result = \"nucleotide\";\n\t } else {\n\t // if short, ask for 70% of ACGT or N\n\t final double threshold = 0.7;\n\t final int nucStates = canonicalNucStates + undeterminedStates;\n\t // note: This implicitely assumes that every valid nucleotide\n\t // symbol is also a valid amino acid. This is true since we\n\t // added support for the 21st amino acid, U (Selenocysteine)\n\t // in AminoAcids.java.\n\t result = nucStates >= sequenceLength * threshold ? \"nucleotide\" : \"aminoacid\";\n\t }\n\t } else if (onlyValidAminoAcids) {\n\t result = \"aminoacid\";\n\t } else {\n\t result = null;\n\t }\n\t return result;\n\t }", "public String aminoToRandomTriplets(String ss)\n\t\t{\n\t\tStringBuilder sb=new StringBuilder();\n\t\tfor(int i=0;i<ss.length();i++)\n\t\t\t{\n\t\t\tString a=\"\"+ss.charAt(i);\n\t\t\tLinkedList<String> list=aminoToDNA.get(a);\n\t\t\tif(list==null)\n\t\t\t\tthrow new RuntimeException(\"Unknown amino acid \"+a);\n\t\t\tsb.append(list.get((int)(Math.random()*list.size())));\n\t\t\t}\n\t\treturn sb.toString();\n\t\t}", "@Test\n public void testGetListaCidadao() {\n System.out.println(\"getListaCidadao\");\n Cidadao cid = new Cidadao(\"teste\", 999999999, \"@\", \"4490-479\", 1111);\n Reparticao instance = new Reparticao(\"porto\", 1111, 4490, new ArrayList<>());\n instance.addCidadao(cid);\n\n DoublyLinkedList<Cidadao> expResult = new DoublyLinkedList<>();\n expResult.addLast(cid);\n DoublyLinkedList<Cidadao> result = instance.getListaCidadao().getListaCidadao();\n assertEquals(expResult, result);\n }", "private boolean comparacionOblicuaDI (String [] dna){\n int largo=3, repaso=1, aux=0, contador=0, fila, columna;\n boolean repetir;\n char caracter;\n do {\n do {\n repetir=true;\n if(repaso==1){\n fila=0;\n columna=largo + aux;\n }else{\n fila=dna.length-1-largo-aux;\n columna=dna.length-1;\n }\n\n caracter = dna[fila].charAt(columna);\n\n for (int i = 1; i <= (largo+aux); i++) {\n int colum=columna-i;\n int fil=fila+i;\n if((colum==dna.length-2 && fil==1) && repaso==1){\n repetir=false;\n break;\n }\n if (caracter != dna[fil].charAt(colum)) {\n contador = 0;\n\n if(((dna.length-largo)>(colum) && repaso==1) || ((dna.length-largo)<=(fil) && repaso!=1)){\n if((fil+colum)==dna.length-1){\n repetir=false;\n }\n break;\n }\n caracter = dna[fil].charAt(colum);\n\n } else {\n contador++;\n }\n if (contador == largo) {\n cantidadSec++;\n if(cantidadSec>1){\n return true;\n }\n if((fil+colum)==dna.length-1){\n repetir=false;\n }\n break;\n }\n }\n aux++;\n } while (repetir);\n repaso--;\n aux=0;\n\n }while(repaso>=0);\n return false;\n }", "public static NodoListaC creaInCoda() {\r\n\t\tNodoListaC a = new NodoListaC();\r\n\t\tNodoListaC p = a; //a rimane in testa alla lista\r\n\t\tp.info = 'A';\r\n\t\tp.next = new NodoListaC();\r\n\t\tp = p.next;\r\n\t\tchar c;\r\n\t\tfor (c = 'B'; c < 'Z'; c++) {\r\n\t\t p.info = c;\r\n\t\t p.next = new NodoListaC();\r\n\t \t p = p.next; \r\n\t\t}\r\n\t\tp.info = 'Z';\r\n\t\tp.next = null;\r\n\t\t\r\n\t\treturn a; \r\n\t}", "public static void isInAlphabeticalOrder(String...a) {\n\t\t\r\n\t\tSystem.out.println(\"In which alphabetical order?\");\r\n\t\tScanner scan = new Scanner(System.in);\r\n\t\tString order = scan.nextLine();\r\n\t\t\r\n\t\tboolean isFinished = false; //detects an early exit from inner loop\r\n\t\t\r\n\t\t// FIXME: compare characters in same position, but in subsequent strings.\r\n\t\t// may input strings with different lengths.\r\n\t\t// It will most likely throw an out of index exception, need to catch it / handle it\r\n\t\t// or make a custom exception\r\n\t\t// will probably need to check for a null value early.\r\n\t\t// might apply this fix by changing the outer loop to a regular loop, since it will only \r\n\t\t// iterate length() - 1 times.\r\n\t\t\r\n\t\tSystem.out.println(a.length);\r\n\t\t\r\n\t\t//check order\r\n\t\tswitch (order) {\r\n\t\t\tcase \"forward\":\t\t\t// the length method in the next line is for an array.\r\n\t\t\t\tfor (int i = 0; i < a.length -1; i++) { //iterates through all the string pairs provided\r\n\t\t\t\t\tfor (int j = 0; j < a[i].length(); j++) { //iterates through characters in the current string\r\n\t\t\t\t\t\t// if the 2 strings differ in length\r\n\t\t\t\t\t\t// i.e. if the next string is shorter than the current one\r\n\t\t\t\t\t\t// might throw an exception\r\n\t\t\t\t\t\t// NOTE: continue moves to the next iteration of a loop.\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// the inner loop breaks if it doesn't find anything out of order.\r\n\t\t\t\t\t\t// it should only iterate through the entire string if the \r\n\t\t\t\t\t\t// characters are identical.\r\n\r\n\t\t\t\t\t\tif (a[i].charAt(j) < a[i + 1].charAt(j)) {\r\n\t\t\t\t\t\t\tbreak; // in order; moves on to next pair of strings\r\n\t\t\t\t\t\t}\r\n\t\r\n\t\t\t\t\t\tif (a[i].charAt(j) > a[i + 1].charAt(j)) { // out of order\r\n\t\t\t\t\t\t\tisFinished = true;\r\n\t\t\t\t\t\t\tSystem.out.println(false);\r\n\t\t\t\t\t\t\tbreak; // exit the loop\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (j + 1 == a[i+1].length()) { // check for the end of next string\r\n\t\t\t\t\t\t\t// to avoid an out of bounds exception\r\n\t\t\t\t\t\t\tbreak; // move to the next iteration of the outer loop.\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (isFinished) { //checks for an early exit in the inner loop\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (!isFinished) {\r\n\t\t\t\t\tSystem.out.println(true); //will only occur if an early exit does not occur\r\n\t\t\t\t}\r\n\t\t\t\tscan.close();\r\n\t\t\t\tbreak; //close scanner and exit the loop\r\n\t\t\t\r\n\t\t\tcase \"reverse\":\r\n\t\t\t\tfor (int i = 0; i < a.length -1; i++) { //iterates through all the string pairs provided\r\n\t\t\t\t\tfor (int j = 0; j < a[i].length(); j++) { //iterates through characters in the current string\r\n\t\t\t\t\t\t// if the 2 strings differ in length\r\n\t\t\t\t\t\t// i.e. if the next string is shorter than the current one\r\n\t\t\t\t\t\t// might throw an exception\r\n\t\t\t\t\t\t// NOTE: continue moves to the next iteration of a loop.\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// the inner breaks if it doesn't find anything out of order.\r\n\t\t\t\t\t\t// it should only iterate through the entire string if the \r\n\t\t\t\t\t\t// characters are identical.\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//FIXME: hitting a[2] when it should not be happening.\r\n\t\t\t\t\t\tif (a[i].charAt(j) > a[i + 1].charAt(j)) {\r\n\t\t\t\t\t\t\tbreak; // in order; moves on to next pair of strings\r\n\t\t\t\t\t\t}\r\n\t\r\n\t\t\t\t\t\tif (a[i].charAt(j) < a[i + 1].charAt(j)) { // out of order\r\n\t\t\t\t\t\t\tisFinished = true;\r\n\t\t\t\t\t\t\tSystem.out.println(false);\r\n\t\t\t\t\t\t\tbreak; // exit the loop\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (j + 1 == a[i+1].length()) { // check for the end of next string\r\n\t\t\t\t\t\t\t// to avoid an out of bounds exception\r\n\t\t\t\t\t\t\tbreak; // move to the next iteration of the outer loop.\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (isFinished) { //checks for an early exit in the inner loop\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (!isFinished) {\r\n\t\t\t\t\tSystem.out.println(true); //will only occur if an early exit does not occur\r\n\t\t\t\t}\r\n\t\t\t\tscan.close();\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\t\tSystem.out.println(\"That's not a good input.\");\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t}", "public final List<AudioDevice> a(List<? extends AudioDevice> list) {\n AudioDevice currentAudioDevice = currentAudioDevice();\n AudioDevice.WiredHeadset wiredHeadset = AudioDevice.WiredHeadset.INSTANCE;\n if (!(Intrinsics.areEqual(currentAudioDevice, wiredHeadset) || list.contains(wiredHeadset))) {\n return list;\n }\n ArrayList arrayList = new ArrayList();\n for (Object obj : list) {\n if (!Intrinsics.areEqual((AudioDevice) obj, AudioDevice.Earpiece.INSTANCE)) {\n arrayList.add(obj);\n }\n }\n return arrayList;\n }", "public static void main(String [] args) {\n DoublyLinkedList<String> ll = new DoublyLinkedList<String>();\n\n String[] alphabet = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\".split(\"\");\n\n for (String s : alphabet) {\n ll.addFirst(s);\n ll.addLast(s);\n }\n System.out.println(ll.toString());\n\n for (String s : ll) {\n System.out.print(s + \", \");\n }\n }", "public String [ ] getNombresAlmidones() {\n int cantidad = 0;\n \n for(int i = 0; i < this.ingredientes.size(); i++) {\n \n if(this.ingredientes.get(i) instanceof Almidon) {\n cantidad++;\n }\n }\n\n String arreglo[] = new String[cantidad];\n \n for(int i = 0; i < cantidad; i ++) {\n arreglo[i] = this.ingredientes.get(i).toString();\n }\n \n return arreglo;\n }", "public List<String> GetAssegnamentiInCorso() {\n String str = \"Guillizzoni-Coca Cola Spa1-DRYSZO,Rossi-Coca Cola Spa2-DRYSZ2\";\n StringaAssegnamenti = str;\n StringaAssegnamenti = \"\";\n \n\tList<String> items = Arrays.asList(str.split(\"\\\\s*,\\\\s*\"));\n return items;\n }", "public static void main(String[] args) throws IOException {\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\r\n int n=Integer.parseInt(br.readLine());\r\n String[] strings=br.readLine().split(\",\");\r\n //System.out.println( printNoofUniqueStrings(n,strings));\r\n System.out.println(printAnswer(n,strings));\r\n \r\n /*List<String> list=new LinkedList<String>();\r\n //list.add(\"def\");\r\n //list.add(\"abc\");\r\n //list.remove(\"abc\");\r\n //list.add(0, \"abc\");\r\n \r\n list.add(\"2\");\r\n list.add(\"5\");\r\n list.add(\"9\");\r\n \r\n list.remove(\"5\");\r\n list.add(0,\"5\");\r\n \r\n for(String a:list){\r\n \tSystem.out.println(a);\r\n }*/\r\n\t}", "@Test\n public void getMatchListTest()\n {\n RiotApiHandler userTest=RiotApiHandler.getInstance();\n String[] array= {\"EUN1_2813356879\", \"EUN1_2797819662\", \"EUN1_2797712721\", \"EUN1_2797709856\", \"EUN1_2797693226\", \"EUN1_2797682448\", \"EUN1_2797526002\",\n \"EUN1_2797504038\", \"EUN1_2797540836\", \"EUN1_2794696829\", \"EUN1_2791827193\", \"EUN1_2791781454\", \"EUN1_2791655029\",\n \"EUN1_2791596648\", \"EUN1_2786187593\", \"EUN1_2785993952\", \"EUN1_2727858238\", \"EUN1_2727671015\", \"EUN1_2727312718\", \"EUN1_2727226847\"\n };\n ArrayList<String> correct = new ArrayList<>(Arrays.asList(array));\n //test fails, I play this game everyday so the matchlist changes constantly, it all works real good (source ---> trust me :ok:)\n Assert.assertEquals(correct ,userTest.getMatchlist(\"8f9zu86yj87xgh76\",\"eun1\"));\n }", "public static List<String> sortDNA(List<String> DNA) {\n\t\tfor(int i = 0; i < DNA.size(); i++) {\n\t\t\tint shortest = i;\n\t\t\tfor(int j = i + 1; j < DNA.size(); j++) {\n\t\t\t\tif(DNA.get(j).length() < DNA.get(i).length()) {\n\t\t\t\t\tshortest = j;\n\t\t\t\t}\n\t\t\t}\n\t\t\tString switching = DNA.get(shortest);\n\t\t\tDNA.set(shortest, DNA.get(i));\n\t\t\tDNA.set(i, switching);\n\t\t}\n\t\treturn DNA;\n\t}", "public String getTranslation()\n {\n StringBuilder aminoAcid = new StringBuilder();\n Map<String, String> codToAa = Map.ofEntries(\n entry(\"ATA\", \"I\"), entry(\"ATC\", \"I\"), entry(\"ATT\", \"I\"), entry(\"ATG\", \"M\"),\n entry(\"ACA\", \"T\"), entry(\"ACC\", \"T\"), entry(\"ACG\", \"T\"), entry(\"ACT\", \"T\"),\n entry(\"AAC\", \"N\"), entry(\"AAT\", \"N\"), entry(\"AAA\", \"K\"), entry(\"AAG\", \"K\"),\n entry(\"AGC\", \"S\"), entry(\"AGT\", \"S\"), entry(\"AGA\", \"R\"), entry(\"AGG\", \"R\"),\n entry(\"CTA\", \"L\"), entry(\"CTC\", \"L\"), entry(\"CTG\", \"L\"), entry(\"CTT\", \"L\"),\n entry(\"CCA\", \"P\"), entry(\"CCC\", \"P\"), entry(\"CCG\", \"P\"), entry(\"CCT\", \"P\"),\n entry(\"CAC\", \"H\"), entry(\"CAT\", \"H\"), entry(\"CAA\", \"Q\"), entry(\"CAG\", \"Q\"),\n entry(\"CGA\", \"R\"), entry(\"CGC\", \"R\"), entry(\"CGG\", \"R\"), entry(\"CGT\", \"R\"),\n entry(\"GTA\", \"V\"), entry(\"GTC\", \"V\"), entry(\"GTG\", \"V\"), entry(\"GTT\", \"V\"),\n entry(\"GCA\", \"A\"), entry(\"GCC\", \"A\"), entry(\"GCG\", \"A\"), entry(\"GCT\", \"A\"),\n entry(\"GAC\", \"D\"), entry(\"GAT\", \"D\"), entry(\"GAA\", \"E\"), entry(\"GAG\", \"E\"),\n entry(\"GGA\", \"G\"), entry(\"GGC\", \"G\"), entry(\"GGG\", \"G\"), entry(\"GGT\", \"G\"),\n entry(\"TCA\", \"S\"), entry(\"TCC\", \"S\"), entry(\"TCG\", \"S\"), entry(\"TCT\", \"S\"),\n entry(\"TTC\", \"F\"), entry(\"TTT\", \"F\"), entry(\"TTA\", \"L\"), entry(\"TTG\", \"L\"),\n entry(\"TAC\", \"Y\"), entry(\"TAT\", \"Y\"), entry(\"TAA\", \"_\"), entry(\"TAG\", \"_\"),\n entry(\"TGC\", \"C\"), entry(\"TGT\", \"C\"), entry(\"TGA\", \"_\"), entry(\"TGG\", \"W\")\n );\n try\n {\n for (int i = 0; i < this.sequence.length(); i += 3)\n {\n aminoAcid.append(codToAa.get(this.sequence.substring(i, i + 3)));\n }\n }\n catch (StringIndexOutOfBoundsException ignored)\n {\n }\n return aminoAcid.toString();\n }", "private List<String> build() {\n List<String> ags = new ArrayList<>();\n ags.add(\"European Union Chromosome 3 Arabidopsis Sequencing Consortium\");\n ags.add(\"Institute for Genomic Research\");\n ags.add(\"Kazusa DNA Research Institute\");\n return ags;\n }", "public static List<String> getAnagrams(File f) throws IOException\n {\n //FileReader constructor throws FileNotFoundException (IOException)\n BufferedReader br = new BufferedReader(new FileReader(f));\n List<String> strings = new ArrayList<String>();\n String s;\n while ((s=br.readLine())!=null)\n {\n strings.add(s);\n }\n\n br.close();\n\n return getAnagrams(strings);\n }", "public String alienOrder(String[] words) {\n int[] indegree = new int[26];\n //adj list--hashmap\n HashMap<Character, Set<Character>> adjList = new HashMap();\n // 2 major steps\n // buildGraph(words,indegree,adjList );\n \n // initialise the adj list graph with all charac ters in all words\n for(String word:words ){\n for(char c: word.toCharArray()){\n adjList.putIfAbsent(c, new HashSet());\n }\n }// once u fill with init, then u eatblish relationships\n \n // wrt and er \n for(int i=1; i<words.length;i++){\n String first = words[i-1];\n String second = words[i];\n \n // important edge case\n if(first.length()> second.length() && first.startsWith(second))\n return \"\";\n // now compare each char in thos words\n for(int j=0; j< Math.min(first.length(),second.length());j++){\n if(first.charAt(j) != second.charAt(j)){\n // a->b here out=a, in=b\n char out = first.charAt(j);\n char in = second.charAt(j);\n // a->b , so in adj list. we need to insert the valiue if not present\n // if the graph does not contains dependecny, which is in set, u add it else u dont add// since hashset, we can check usinhg contains i guess\n if(! adjList.get(out).contains(in)){\n adjList.get(out).add(in);\n //also increase the indegree if u find the dependency\n indegree[in -'a']++;\n }\n // once it is found , u can break out th e loop\n break;\n \n }// if eqaual we mmove to next char and do the process\n }\n }\n \n \n \n \n \n \n// return topologicalSortDfs(indegree,adjList );\n \n \n \n // we ll use stringbuilder to update the characters instead of string\n // we ll insert all elements into queue who has indegree==0 initially, which means they dont have any dependency so they can come at any time//\n // so insert all indgree==0 into queu and do a stanmdard queue template\n StringBuilder sb = new StringBuilder();\n Queue<Character> q = new LinkedList();\n int totalChars = adjList.size(); // to check at end if all are present\n \n \n // loop thru all keys in graph and check the indegree of that character in indegree if its has zero , if so then add to queue initially\n // initial push to queue\n for(char c: adjList.keySet()){\n if(indegree[c-'a'] == 0){\n \n sb.append(c);\n q.offer(c);// so u need to add all orphan nodes to sb , since it contains results\n }\n \n } \n // now we need to find nodes which has dependency, take it out and reduce the indegree and check if indegreeis zero then add tio queue\n \n // stand ard queue template\n while(!q.isEmpty()){\n // take the elemnt \n char curr = q.poll();\n \n if(adjList.get(curr) == null || adjList.get(curr).size()==0 ){\n // we shud not do antthing, and pick the next nodes in the queue\n continue;\n }\n // if we have some elements in the adj list which means we have a dependency\n // So what do we do here:??\n // i think we can take it and reduce the indgree ??\n // Since we are. removing this particular current element, so we need to reduce all its neighbour indegree becios we removed aos we need to update the indegree of all its neiughbours\n for(char neighbour : adjList.get(curr)){\n indegree[neighbour-'a']--;\n //also check if it becomes zero after update we need to push to queu and sb\n if(indegree[neighbour-'a'] == 0){\n //add to q and sb\n q.offer(neighbour);\n sb.append(neighbour);\n \n }\n }\n \n }\n \n // once we are out of queue, which means we processed all nodes\n // if total chars is sb length, which means we got all chars /nodes so we can return else \"\"\n return sb.length() == totalChars ? sb.toString() : \"\";\n }", "public static Object sortDNA(List<String> unsortedSequences) {\n\t\treturn null;\n\t}", "OrderedIntList ()\n\t{\tScanner scanner = new Scanner(System.in);\n\t\tarray1 = new int[10];\n count = 0;\n \n System.out.println (\"degug on? Enter y or n \");\n String result = scanner.nextLine();\n debug = result.charAt(0) == 'y';\n\t}", "Set<String> getProteinAccessions(String experimentAccession);", "public int[] hasNSequentially(int lengthOfHand) {//check for Ace case //need to NOT ALLOW DUPLICATES\n ArrayList<Card> handList = new ArrayList<Card>();\n int solution[] = {0, 0};//number in a row, lowest number of that\n boolean foundSomeNInAFow = false;\n int hasAce = 0;\n\n int usedNumbers[] = new int[13];//2,3,4,5,6,7,8,9,10,j,q,k,a --> THIS HANDLES THE ACE CASE\n for (int i = 0; i < lengthOfHand; i++) {//was\n usedNumbers[allCards[i].value - 2]++;//USED\n if (usedNumbers[allCards[i].value - 2] == 1) {//handles NOT having doubles of numbers like 2 3 4 4 5 \n handList.add(this.allCards[i]);\n if (this.allCards[i].value == 14) {\n Card c = new Card(1, this.allCards[i].suit);\n handList.add(0, c);//add to front..shifts elements to right\n }\n }\n }\n\n for (int i = 0; i < handList.size() - 4; i++) {//check for 5 in a row, //was - 4\n int val = handList.get(i).value;\n int counter = 0;\n for (int j = 0; j < 4; j++) {//was 4\n if (handList.get(j + i + 1).value == val + 1 + j) {\n counter++;\n } else {\n break;\n }\n if (counter == 4) {//was 4\n foundSomeNInAFow = true;\n solution[0] = 5;\n solution[1] = val;\n }\n }\n }\n\n if (foundSomeNInAFow == false) {\n for (int i = 0; i < handList.size() - 3; i++) {//check for 5 in a row, //was - 4\n int val = handList.get(i).value;\n int counter = 0;\n for (int j = 0; j < 3; j++) {\n if (handList.get(j + i + 1).value == val + 1 + j) {\n counter++;\n } else {\n break;\n }\n if (counter == 3) {\n // System.out.println(\"yes 4 sequentially\");\n foundSomeNInAFow = true;\n solution[0] = 4;\n solution[1] = val;\n }\n }\n }\n }\n\n if (foundSomeNInAFow == false) {\n for (int i = 0; i < handList.size() - 2; i++) {//check for 5 in a row, //was - 4\n int val = handList.get(i).value;\n int counter = 0;\n for (int j = 0; j < 2; j++) {\n if (handList.get(j + i + 1).value == val + 1 + j) {\n counter++;\n } else {\n break;\n }\n if (counter == 2) {\n // System.out.println(\"yes 3 sequentially\");\n foundSomeNInAFow = true;\n solution[0] = 3;\n solution[1] = val;\n }\n }\n }\n }\n\n if (foundSomeNInAFow == false) {\n for (int i = 0; i < handList.size() - 1; i++) {//check for 5 in a row, //was - 4\n int val = handList.get(i).value;\n int counter = 0;\n for (int j = 0; j < 1; j++) {\n if (handList.get(j + i + 1).value == val + 1 + j) {\n counter++;\n } else {\n break;\n }\n if (counter == 1) {\n //System.out.println(\"yes 2 sequentially\");\n foundSomeNInAFow = true;\n solution[0] = 2;\n solution[1] = val;\n\n }\n }\n }\n }\n\n return solution;//return at end that way if there is 2,3,5,7,8 it returns 7 8 not 2 3\n\n }", "@Test\r\n\tpublic void testToArrayType() {\r\n\t\tMunitions[] sample1 = new Munitions[5];\r\n\t\tsample1 = list.toArray(sample1);\r\n\t\tAssert.assertEquals(15, sample1.length);\r\n\t\tfor (int i = 0; i < sample1.length; i++) {\r\n\t\t\tAssert.assertNotNull(sample1[i]);\r\n\t\t}\r\n\t\tMunitions[] sample2 = new Munitions[20];\r\n\t\tsample2 = list.toArray(sample2);\r\n\t\tAssert.assertEquals(20, sample2.length);\r\n\t\tfor (int i = 0; i < sample2.length - list.size(); i++) {\r\n\t\t\tAssert.assertNotNull(sample1[i]);\r\n\t\t}\r\n\t}", "@Test\n public void subSequencesTest3() {\n String text = \"wnylazlzeqntfpwtsmabjqinaweaocfewgpsrmyluadlybfgaltgljrlzaaxvjehhygggdsrygvnjmpyklvyilykdrphepbfgdspjtaap\"\n + \"sxrpayholutqfxstptffbcrkxvvjhorawfwaejxlgafilmzrywpfxjgaltdhjvjgtyguretajegpyirpxfpagodmzrhstrxjrpirlbfgkhhce\"\n + \"wgpsrvtuvlvepmwkpaeqlstaqolmsvjwnegmzafoslaaohalvwfkttfxdrphepqobqzdqnytagtrhspnmprtfnhmsrmznplrcijrosnrlwgds\"\n + \"bylapqgemyxeaeucgulwbajrkvowsrhxvngtahmaphhcyjrmielvqbbqinawepsxrewgpsrqtfqpveltkfkqiymwtqssqxvchoilmwkpzermw\"\n + \"eokiraluaammkwkownrawpedhcklrthtftfnjmtfbftazsclmtcssrlluwhxahjeagpmgvfpceggluadlybfgaltznlgdwsglfbpqepmsvjha\"\n + \"lwsnnsajlgiafyahezkbilxfthwsflgkiwgfmtrawtfxjbbhhcfsyocirbkhjziixdlpcbcthywwnrxpgvcropzvyvapxdrogcmfebjhhsllu\"\n + \"aqrwilnjolwllzwmncxvgkhrwlwiafajvgzxwnymabjgodfsclwneltrpkecguvlvepmwkponbidnebtcqlyahtckk\";\n\n String[] expected = new String[6];\n expected[0] = \"wlfaafrdarvgypipgaputcjflmftgepfmrrhpvwllnfofdqqtmhnjlyeewvxhceqpgftysopelkrhhjtmlapcagllpasazflfthohdtrrvobliwnhazafeevpnlk\";\n expected[1] = \"nzpbwemllljggylhdaatprhwgzxdttypzxlhslksmeohkronrpmprwlmubovmylispqkmqizouwactmatlhmedagfmlafktgmfhcjlhxoagjullcrfxbslceoeyk\";\n expected[2] = \"yewjewyytzegvkyespyqtkoaarjhyaiarjbcrvptsgsatpbyhrslogaycawnajvnxspfwxlekakwkftzcujgglldbswjybhktxcizpypppchanlxwawjctgpnba\";\n expected[3] = \"lqtqaglbgahdnlkppshffxrefygjgjrghrfeveaavmllthqtstrrsdpxgjsgprqarrvktvmriaopltfsswevgytwpvslaiwirjfricwgzxmhqjzvljnglrumbth\";\n expected[4] = \"ansiopuflahsjvdbjxoxfvajiwavuepospgwtpeqjzavfezapfmcnsqeurrthmbweqeqqcwmrmwerfbcshaflbzsqjnghlswabsbibwvvdfsrowgwvyowpvwict\";\n expected[5] = \"ztmncsagjxyrmyrftrlsbvwxlpljrgxdtikgumqowaawxpdgnnzirbgalkhahibewtlishkwamndtnflrxgpufngehniexfgwbykxcncyrelwlmkigmdnklkdqc\";\n int keyLen = 6;\n String[] owns = this.ic.subSequences(text, keyLen);\n for (int i = 0; i < expected.length; i++) {\n assertEquals(expected[i], owns[i]);\n }\n }", "@Test\n public void testSpecies() throws IOException, UIMAException {\n /*String Text = \"In this text we talk about humans and mice. Because a mouse is no killifish nor a caenorhabditis elegans. Thus, c. elegans is now abbreviated as well as n. furzeri .\";\n\n JCas jCas = JCasFactory.createText(Text);\n\n //AnalysisEngineDescription engine = createEngineDescription(LinnaeusSpecies.class);\n AnalysisEngineDescription engine = createEngineDescription(LinnaeusSpecies.class);\n SimplePipeline.runPipeline(jCas, engine);\n\n String[] casSpecies = (String[]) JCasUtil.select(jCas, Organism.class).stream().map(a -> a.getCoveredText()).toArray(String[]::new);\n //String[] casID = (String[]) JCasUtil.select(jCas, Organism.class).stream().map(b -> b.getId()).toArray(String[]::new);\n\n String[] testSpecies = new String[] {\"humans\", \"mice\", \"mouse\", \"killifish\", \"caenorhabditis elegans\", \"c. elegans\", \"n. furzeri\"};\n //String[] testID = new String[] {\"9606\", \"10090\", \"10090\", \"34780\", \"6239\", \"6239\", \"105023\"};\n\n assertArrayEquals(testSpecies, casSpecies);*/\n //assertArrayEquals(testID, casID);\n }", "static /* synthetic */ List m17132a(List list) throws Exception {\n ArrayList arrayList = new ArrayList(list);\n Collections.sort(arrayList, f15631B0);\n return arrayList;\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tint a [] = {1,0,0,1,1,0,0,1,0,1,0,0,0,1};\r\n\t\t\r\n\t\tboolean start = false;\r\n\t\t//boolean end = false;\r\n\t\tString s = \"\";\r\n\t\tString k = Arrays.toString(a);\r\n\t\tString[] strings = (k.replace(\"[\", \"\").replace(\"]\", \"\").split(\", \"));\r\n\t\tString s1 = (k.replace(\"[\", \"\").replace(\"]\", \"\"));\r\n\t\tString s2 = (s1.replace(\",\", \"\"));\r\n\t\tString s3 = s2.replaceAll(\"\\\\s\", \"\");\r\n\t\t//String stringss = strings.toString();\r\n\t\t//String[] stringss = strings.replaceAll(\"\\\\s\", \"\").split(\"\");\r\n\t\t\r\n\t\tint Startindex = 0;\r\n\t\tint Endindex = 0;\r\n\t\tArrayList<String> ai = new ArrayList<String>();\r\n\t\tfor (int i =0;i<=strings.length-1;i++) {\r\n\t\t\tint result = Integer.parseInt(strings[i]);\r\n\t\t\t\r\n\t\t\tif (result==1 && !start) {\r\n\t\t\t\t\r\n\t\t\t\tstart = true;\r\n\t\t\t\tStartindex = i;\r\n\t\t\t\t\r\n\t\t\t}else if (result==1 && start) {\r\n\t\t\t\tstart = false;\r\n\t\t\t\tEndindex = i;\r\n\t\t\t\ts = s3.substring(Startindex, Endindex+1);\r\n\t\t\t\tai.add(s);\r\n\t\t\t\ti =i-1;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\nSystem.out.println(ai);\r\n\t}", "@Override\n \tpublic double[] getdata(List<Pair<String, String>> alin, MoleculeManager manager, GapManager gap) {\n \n \n \tdouble S_max;\n \tdouble[][] p;\n \tdouble[] data;\n \tint N;\n \tint Len;\n \tint n_seqs=0;\n \n \tn_seqs = alin.size();\n \t\n \tLen = alin.get(0).getSecond().length();\n \tN = manager.alphabetSize();\n \t\n \tp = new double[Len][N];\n \t\n \tS_max = Math.log(N)/Math.log(2);\n \t\n \tp = getFreq(p,alin,n_seqs, manager.alphabet()); \n \n \tdata = new double[Len];\n \t\n \tfor (int i = 0; i < data.length; i++) {\n \t\t\n \t\tdouble s_obs=0;\n \t\t\n \t\tdouble freqSum = 0; \n \n \t\tfor (int j = 0; j < N; j++) {\n \t\t\t\n \t\t\tif (p[i][j]!= 0 ) { \n \t\t\t\t\n \t\t\t\ts_obs = s_obs + p[i][j] * Math.log(p[i][j]) / Math.log(2);\n \t\t\t\t\n \t\t\t\tfreqSum = gap.attempToSumFreq(freqSum, p[i][j]) ;\n \t\t\t\t\n \t\t\t}\n \t\t}\n \t\t\n \t\tdata[i] = (S_max + s_obs) * freqSum / S_max;\n \t}\n \n \treturn data;\n }", "public int[] toArray() {\nNode current = head;\nint[] array = new int[size];\nfor(int i = 0; i < array.length; i++) {\narray[i] = current.value;\ncurrent = current.next;\n}\nreturn array;\n}", "List<C1111j> mo5868a();", "int[] getGivenByOrder();", "private int[] makeRandomList(){\n\t\t\n\t\t//Create array and variables to track the index and whether it repeats\n\t\tint[] list = new int[ 9 ];\n\t\tint x = 0;\n\t\tboolean rep = false;\n\t\t\n\t\t//Until the last element is initialized and not a repeat...\n\t\twhile( list[ 8 ] == 0 || rep)\n\t\t{\n\t\t\t//Generate a random number between 1 and 9\n\t\t\tlist[ x ]= (int)(Math.random()*9) + 1;\n\t\t\trep = false;\n\t\t\t\n\t\t\t//Check prior values to check for repetition\n\t\t\tfor(int y = 0; y < x; y++)\n\t\t\tif( list[x] == list[y] ) rep = true;\n\t\t\t\n\t\t\t//Move on to the next element if there is no repeat\n\t\t\tif( !rep ) x++;\n\t\t}\n\t\t\n\t\t//return the array\n\t\treturn list;\n\t}", "public static void main (String[] args) {\n System.out.println(\"test case 1: \" + Arrays.toString(getDistinctLCLetters(\"\")));\r\n\r\n // should return: [], i.e. an array with zero elements\r\n System.out.println(\"test case 2: \" + Arrays.toString(getDistinctLCLetters(\"BEE\")));\r\n\r\n // should return: [e]\r\n System.out.println(\"test case 3: \" + Arrays.toString(getDistinctLCLetters(\"Bee\")));\r\n\r\n // should return: [d, e, l, o, r]\r\n System.out.println(\"test case 4: \" + Arrays.toString(getDistinctLCLetters(\"Hello World!\")));\r\n }", "public abstract void mo56920a(List<C4122e> list);", "public com.walgreens.rxit.ch.cda.CS[] getRealmCodeArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n java.util.List targetList = new java.util.ArrayList();\n get_store().find_all_element_users(REALMCODE$0, targetList);\n com.walgreens.rxit.ch.cda.CS[] result = new com.walgreens.rxit.ch.cda.CS[targetList.size()];\n targetList.toArray(result);\n return result;\n }\n }", "@Test\r\n public void test() {\r\n Random random = new Random(System.currentTimeMillis());\r\n Adouble val = Adouble.valueOf(10);\r\n validate(val);\r\n validateEqual(val, Adouble.valueOf(val.toDouble()));\r\n Adouble val2 = Adouble.valueOf(random.nextDouble());\r\n validate(val2);\r\n validateEqual(val2, Adouble.valueOf(val2.toDouble()));\r\n validateUnequal(val, val2);\r\n Alist list = new Alist().add(val);\r\n byte[] bytes = Aon.aonBytes(list);\r\n list = Aon.readAon(bytes).toList();\r\n validate(list.get(0));\r\n validateEqual(list.get(0), val);\r\n validateUnequal(list.get(0), val2);\r\n }", "public List<AnagramClass> getAnagramsList(){\n List<AnagramClass> anagrams = new ArrayList<>();\n for(int i = 0; i < tree.size(); i++){\n if(tree.get(i) != null){\n anagrams.addAll(tree.get(i).getAnagrams());\n }\n }\n return anagrams;\n }", "public List<Integer> randomAD() {\n\t\tList<Integer> ads = new ArrayList<Integer>();\n\t\tads.add(getRandomInteger(0, 100));\n\t\treturn(ads);\n\t}", "private static boolean fun3(List<String> res, List<String> ac1) {\n\t\tHashSet<String> hs=new HashSet<String>();\r\n\t\tfor(int i=0;i<res.size();i++){\r\n\t\t\ths.add(res.get(i));\r\n\t\t}\r\n\t\tfor(int i=0;i<ac1.size();i++){\r\n\t\t\tif(hs.contains(ac1.get(i)))\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public Enumeration code_to_dna (String code) {\n Vector v = (Vector) code_to_dna.get(code.toUpperCase());\r\n return (v == null) ? null : v.elements();\r\n }", "public int[][] getAcidDist() throws InvalidPropertiesFormatException {\n\t\treturn (myProt.acidDist != null ? myProt.acidDist : myProt.calcAcidDist());\n\t}", "public static void main(String[] args) {\n\n String[] strings = {\"eat\", \"tea\", \"tan\", \"ate\", \"nat\", \"bat\"};\n List<List<String>> lists = new GroupAnagrams().groupAnagrams(strings);\n System.out.println(\"lists = \" + lists);\n }", "public static void main(String args[]) {\n String abc = \"40404040404040404040404061616124\";\n // System.out.print(\"\"+getAsciiFromString(abc));\n// System.out.print(\"\"+ CoderUtils.getStringFromAscii(abc));\n//\t\tint[] arrayData = {1,2,4,5,6,7,5,6,7,3,8,9,10,12,11,20,30,40};\n//\t\tArrays.sort(arrayData);\n//\t\tfor (int a : arrayData){\n//\t\t\tSystem.out.print(\"\" + a + \";\");\n//\t\t}\n\n\n }", "public ArrayList<Integer> nodosAdyacentesA(final int nodo) {\n\t\tArrayList<Integer> adyacentes = new ArrayList<Integer>();\n\t\tfor (int i = 0; i < matriz.getDimension(); i++) {\n\t\t\tif (esAdyacente(nodo, i) && nodo != i) {\n\t\t\t\tadyacentes.add(i);\n\t\t\t}\n\t\t}\n\t\treturn adyacentes;\n\t}", "public LinkedList InicioListaConstructor(){\n\t\t String sCurrentLine, AreaTrab;\n\t\t LinkedList<String> lista= new LinkedList<String>();\n\t\t boolean flag=true;\n\t\t int contador1, contador3;\n\t\t try{\n\t\t\t BufferedReader leer = new BufferedReader(new FileReader(\"Maq.txt\"));\n\t\t\t contador3=1;\n\t\t\t sCurrentLine = leer.readLine();\n\t\t\t AreaTrab= sCurrentLine;\n\t\t\t lista.add(AreaTrab);\n\t\t\t contador1=1; //Elementos que faltaron por revisar.\n\t\t\t while ((sCurrentLine = leer.readLine()) != null) {\n\t\t\t\t if(flag==true){\n\t\t\t\t\t if(contador1%3==0){\n\t\t \t\t\tif(sCurrentLine.equals(AreaTrab)==false){\n\t\t \t\t\t\tflag=false;\n\t\t \t\t\t}\n\t\t \t\t}else if(contador1%3==1 |contador1%3==2){\n\t\t \t\t\tlista.add(sCurrentLine);\n\t\t \t\t}\n\t\t\t\t\t contador1++;\n\t\t\t\t }\n\t \tcontador3++;\t\n\t \t}\n\t\t\t System.out.println(\"*****\");\n\t\t\t leer.close();\n\t\t\t for(int i=0; i<lista.size(); i++){\n\t\t\t\t System.out.println(lista.get(i));\n\t\t\t }\n\t\t\t System.out.println(\"*****\");\n\t\t\t\t //Quedan elementos:\n\t\t\t lista.add(String.valueOf(contador1));\n\t\t\t lista.add(String.valueOf(contador3));\n\t\t\t\t return lista;\n\t\t\t\n\t\t }catch (IOException e) {\n\t System.out.println(\"File not found\");\n\t return null;\n\t\t }\n\t}", "public org.hl7.fhir.Identifier[] getIdentifierArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n java.util.List targetList = new java.util.ArrayList();\n get_store().find_all_element_users(IDENTIFIER$0, targetList);\n org.hl7.fhir.Identifier[] result = new org.hl7.fhir.Identifier[targetList.size()];\n targetList.toArray(result);\n return result;\n }\n }" ]
[ "0.7947818", "0.71540666", "0.70839995", "0.6494729", "0.64518356", "0.62997764", "0.60977024", "0.5514436", "0.54919934", "0.54561514", "0.5357855", "0.53310984", "0.5327537", "0.5311601", "0.5250021", "0.5249592", "0.5131495", "0.51002765", "0.5034271", "0.49926308", "0.49582237", "0.49562427", "0.49310803", "0.4928766", "0.49262142", "0.4925353", "0.4914658", "0.4912002", "0.4904361", "0.4899995", "0.4875553", "0.48673382", "0.4851456", "0.4841681", "0.4836945", "0.48130876", "0.4808588", "0.48058978", "0.4780699", "0.47783893", "0.47775826", "0.47762892", "0.4769948", "0.47674096", "0.4763264", "0.4759503", "0.47334957", "0.47260618", "0.47199598", "0.47145334", "0.47029734", "0.47028142", "0.46945298", "0.46859396", "0.4672732", "0.46691665", "0.46610382", "0.46598756", "0.46576262", "0.46540704", "0.4645094", "0.46368", "0.46352527", "0.46339512", "0.46280038", "0.46279293", "0.4625647", "0.46252656", "0.46187356", "0.46185872", "0.4612606", "0.46083298", "0.4600098", "0.4598919", "0.45849875", "0.4582711", "0.45593822", "0.45589525", "0.45556983", "0.45508093", "0.45431468", "0.45382637", "0.45369044", "0.45345777", "0.45300376", "0.45298952", "0.4527065", "0.45253712", "0.4524012", "0.45202821", "0.45183533", "0.45169958", "0.4516445", "0.45151156", "0.45108673", "0.45072234", "0.45045495", "0.45003527", "0.45000747", "0.44986805" ]
0.7728023
1
/TEST 4 INPUT: "UGUUUUAAAAAUAACACU"; EXPECTED OUTPUT = T, S, V, F ACTUAL OUTPUT = T, S, V, F The tests creates an AminoAcidLL with a string that has a STOP codon to ensure that the stop works and only the wanted codons are converted to aminoacids and then added to the array
@Test public void aminoListTest2(){ AminoAcidLL first = AminoAcidLL.createFromRNASequence(d); char[] expected = {'C','F','K','N','T'}; assertArrayEquals(expected, first.aminoAcidList()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void aminoListTest1(){\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(a);\n char[] expected = {'P','L','A'};\n assertArrayEquals(expected, first.aminoAcidList());\n }", "@Test\n public void rnatest2(){\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(b);\n char[] firstArr = new char[4];\n char[] answer = {'T','S', 'V', 'F'};\n for(int i = 0; i < firstArr.length; i++){\n firstArr[i] = first.aminoAcid;\n System.out.println(first.aminoAcid);\n first = first.next;\n }\n assertArrayEquals(answer,firstArr);\n }", "@Test\n public void rnatest1(){\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(a);\n char[] firstArr = new char[3];\n char[] answer = {'P','L','A'};\n for(int i = 0; i < firstArr.length; i++){\n firstArr[i] = first.aminoAcid;\n System.out.println(first.aminoAcid);\n first = first.next;\n }\n assertArrayEquals(answer, firstArr);\n }", "private void createAA() {\r\n\r\n\t\tfor( int x = 0 ; x < dnasequence.size(); x++) {\r\n\t\t\tString str = dnasequence.get(x);\r\n\t\t\t//put catch for missing 3rd letter\r\n\t\t\tif(str.substring(0, 1).equals(\"G\")) {\r\n\t\t\t\taasequence.add(getG(str));\r\n\t\t\r\n\t\t\t}else if(str.substring(0, 1).equals(\"C\")) {\r\n\t\t\t\taasequence.add(getC(str));\r\n\t\t\t\t\r\n\t\t\t}else if(str.substring(0, 1).equals(\"A\")) {\r\n\t\t\t\taasequence.add(getA(str));\r\n\t\t\t\t\r\n\t\t\t}else if(str.substring(0, 1).equals(\"T\")) {\r\n\t\t\t\taasequence.add(getT(str));\r\n\t\t\t\t\r\n\t\t\t}else if(str.substring(0,1).equals(\"N\")) {\r\n\t\t\t\taasequence.add(\"ERROR\");\r\n\t\t\t}else\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tint a [] = {1,0,0,1,1,0,0,1,0,1,0,0,0,1};\r\n\t\t\r\n\t\tboolean start = false;\r\n\t\t//boolean end = false;\r\n\t\tString s = \"\";\r\n\t\tString k = Arrays.toString(a);\r\n\t\tString[] strings = (k.replace(\"[\", \"\").replace(\"]\", \"\").split(\", \"));\r\n\t\tString s1 = (k.replace(\"[\", \"\").replace(\"]\", \"\"));\r\n\t\tString s2 = (s1.replace(\",\", \"\"));\r\n\t\tString s3 = s2.replaceAll(\"\\\\s\", \"\");\r\n\t\t//String stringss = strings.toString();\r\n\t\t//String[] stringss = strings.replaceAll(\"\\\\s\", \"\").split(\"\");\r\n\t\t\r\n\t\tint Startindex = 0;\r\n\t\tint Endindex = 0;\r\n\t\tArrayList<String> ai = new ArrayList<String>();\r\n\t\tfor (int i =0;i<=strings.length-1;i++) {\r\n\t\t\tint result = Integer.parseInt(strings[i]);\r\n\t\t\t\r\n\t\t\tif (result==1 && !start) {\r\n\t\t\t\t\r\n\t\t\t\tstart = true;\r\n\t\t\t\tStartindex = i;\r\n\t\t\t\t\r\n\t\t\t}else if (result==1 && start) {\r\n\t\t\t\tstart = false;\r\n\t\t\t\tEndindex = i;\r\n\t\t\t\ts = s3.substring(Startindex, Endindex+1);\r\n\t\t\t\tai.add(s);\r\n\t\t\t\ti =i-1;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\nSystem.out.println(ai);\r\n\t}", "@Test\n public void Exercitiu14() {\n\n String[] instruments = new String[6];\n instruments[0] = \"cello\";\n instruments[1] = \"piano\";\n instruments[2] = \"clapsticks\";\n instruments[3] = \"steelpan\";\n instruments[4] = \"triangle\";\n instruments[5] = \"xylophone\";\n\n String[] instrumentsNew = new String[6];\n\n String[] vowels = new String[5];\n vowels[0] = \"a\";\n vowels[1] = \"e\";\n vowels[2] = \"i\";\n vowels[3] = \"o\";\n vowels[4] = \"u\";\n\n String temp = \"\";\n String temporary = \"\";\n boolean status = true;\n\n for (int i = 0; i <= instruments.length-1; i++) {\n temp = instruments[i];\n for (int j = 0; j <= (temp.length()-1); j++) {\n status = true;\n for (int k = 0; k <= (vowels.length-1); k++) {\n if (temp.charAt(j) == vowels[k].charAt(0)) {\n status = false;\n }\n }\n if (status) {\n temporary += temp.charAt(j);\n }\n }\n instruments[i] = temporary;\n temporary = \"\";\n }\n System.out.println(Arrays.toString(instruments));\n }", "@Test\n public void subSequencesTest2() {\n String text = \"hashco\"\n + \"llisio\"\n + \"nsarep\"\n + \"ractic\"\n + \"allyun\"\n + \"avoida\"\n + \"blewhe\"\n + \"nhashi\"\n + \"ngaran\"\n + \"domsub\"\n + \"setofa\"\n + \"larges\"\n + \"etofpo\"\n + \"ssible\"\n + \"keys\";\n\n String[] expected = new String[6];\n expected[0] = \"hlnraabnndslesk\";\n expected[1] = \"alsalvlhgoeatse\";\n expected[2] = \"siacloeaamtroiy\";\n expected[3] = \"hsrtyiwsrsogfbs\";\n expected[4] = \"cieiudhhaufepl\";\n expected[5] = \"oopcnaeinbasoe\";\n String[] owns = this.ic.subSequences(text, 6);\n for (int i = 0; i < expected.length; i++) {\n assertEquals(expected[i], owns[i]);\n }\n }", "@Test\n public void subSequencesTest1() {\n String text = \"crypt\"\n + \"ograp\"\n + \"hyand\"\n + \"crypt\"\n + \"analy\"\n + \"sis\";\n\n String[] expected = new String[5];\n expected[0] = \"cohcas\";\n expected[1] = \"rgyrni\";\n expected[2] = \"yrayas\";\n expected[3] = \"panpl\";\n expected[4] = \"tpdty\";\n String[] owns = this.ic.subSequences(text, 5);\n for (int i = 0; i < expected.length; i++) {\n assertEquals(expected[i], owns[i]);\n }\n }", "Sequence(String inString) {\r\n // Allocate bytes for the sequence\r\n seqArray = new byte[(int)Math.ceil(inString.length() / 4.0)];\r\n seqLength = inString.length();\r\n\r\n for (int i = 0; i < inString.length(); i++) {\r\n // Begin at the start of byte minus 2, then subtract\r\n // the number of bits into the byte we are\r\n int bytePos = 6 - (i % 4) * 2;\r\n // Divide by the current position in string to find current byte\r\n int currByte = i / 4;\r\n char currChar = inString.charAt(i);\r\n if (currChar == 'A') {\r\n seqArray[currByte] |= 0 << bytePos;\r\n }\r\n else if (currChar == 'C') {\r\n seqArray[currByte] |= 1 << bytePos;\r\n }\r\n else if (currChar == 'G') {\r\n seqArray[currByte] |= 2 << bytePos;\r\n }\r\n else if (currChar == 'T') {\r\n seqArray[currByte] |= 3 << bytePos;\r\n }\r\n else {\r\n System.out.print(\"Could not create sequence!\");\r\n }\r\n }\r\n }", "public static void main (String args []) {\n\r\n String str = \"\\\"क\\\", \\\"का\\\", \\\"कि\\\", \\\"की\\\", \\\"कु\\\", \\\"कू\\\", \\\"के\\\", \\\"कै\\\", \\\"को\\\", \\\"कौ\\\", \\\"कं\\\", \\\"क:\\\"\" ;\r\n String strEng = \"\\\"ka\\\", \\\"kā\\\", \\\"ki\\\", \\\"kī\\\", \\\"ku\\\", \\\"kū\\\", \\\"kē\\\", \\\"kai\\\", \\\"ko\\\", \\\"kau\\\", \\\"kṁ\\\", \\\"ka:\\\"\" ;\r\n\r\n String additionalConsonants = \"\\\"क़\\\", \\\"क़ा\\\", \\\"क़ि\\\", \\\"क़ी\\\", \\\"क़ु\\\", \\\"क़ू\\\", \\\"क़े\\\", \\\"क़ै\\\", \\\"क़ो\\\", \\\"क़ौ\\\", \\\"क़ं\\\", \\\"क़:\\\"\"; \r\n String additionalConsonantsEng = \"\\\"qa\\\", \\\"qā\\\", \\\"qi\\\", \\\"qī\\\", \\\"qu\\\", \\\"qū\\\", \\\"qē\\\", \\\"qai\\\", \\\"qo\\\", \\\"qau\\\", \\\"qṁ\\\", \\\"qa:\\\"\" ;\r\n\r\n //String str = \"क, का, कि, की, कु, कू, के, कै, को, कौ, कं, क:\" ;\r\n \r\n \r\n \r\n //generateNP(str);\r\n //generateEN(strEng);\r\n //System.out.println();\r\n generateNPAdditionalConsonants(additionalConsonants);\r\n generateENAdditionalConsonants(additionalConsonantsEng);\r\n\r\n\r\n\r\n }", "@Test\n public void subSequencesTest3() {\n String text = \"wnylazlzeqntfpwtsmabjqinaweaocfewgpsrmyluadlybfgaltgljrlzaaxvjehhygggdsrygvnjmpyklvyilykdrphepbfgdspjtaap\"\n + \"sxrpayholutqfxstptffbcrkxvvjhorawfwaejxlgafilmzrywpfxjgaltdhjvjgtyguretajegpyirpxfpagodmzrhstrxjrpirlbfgkhhce\"\n + \"wgpsrvtuvlvepmwkpaeqlstaqolmsvjwnegmzafoslaaohalvwfkttfxdrphepqobqzdqnytagtrhspnmprtfnhmsrmznplrcijrosnrlwgds\"\n + \"bylapqgemyxeaeucgulwbajrkvowsrhxvngtahmaphhcyjrmielvqbbqinawepsxrewgpsrqtfqpveltkfkqiymwtqssqxvchoilmwkpzermw\"\n + \"eokiraluaammkwkownrawpedhcklrthtftfnjmtfbftazsclmtcssrlluwhxahjeagpmgvfpceggluadlybfgaltznlgdwsglfbpqepmsvjha\"\n + \"lwsnnsajlgiafyahezkbilxfthwsflgkiwgfmtrawtfxjbbhhcfsyocirbkhjziixdlpcbcthywwnrxpgvcropzvyvapxdrogcmfebjhhsllu\"\n + \"aqrwilnjolwllzwmncxvgkhrwlwiafajvgzxwnymabjgodfsclwneltrpkecguvlvepmwkponbidnebtcqlyahtckk\";\n\n String[] expected = new String[6];\n expected[0] = \"wlfaafrdarvgypipgaputcjflmftgepfmrrhpvwllnfofdqqtmhnjlyeewvxhceqpgftysopelkrhhjtmlapcagllpasazflfthohdtrrvobliwnhazafeevpnlk\";\n expected[1] = \"nzpbwemllljggylhdaatprhwgzxdttypzxlhslksmeohkronrpmprwlmubovmylispqkmqizouwactmatlhmedagfmlafktgmfhcjlhxoagjullcrfxbslceoeyk\";\n expected[2] = \"yewjewyytzegvkyespyqtkoaarjhyaiarjbcrvptsgsatpbyhrslogaycawnajvnxspfwxlekakwkftzcujgglldbswjybhktxcizpypppchanlxwawjctgpnba\";\n expected[3] = \"lqtqaglbgahdnlkppshffxrefygjgjrghrfeveaavmllthqtstrrsdpxgjsgprqarrvktvmriaopltfsswevgytwpvslaiwirjfricwgzxmhqjzvljnglrumbth\";\n expected[4] = \"ansiopuflahsjvdbjxoxfvajiwavuepospgwtpeqjzavfezapfmcnsqeurrthmbweqeqqcwmrmwerfbcshaflbzsqjnghlswabsbibwvvdfsrowgwvyowpvwict\";\n expected[5] = \"ztmncsagjxyrmyrftrlsbvwxlpljrgxdtikgumqowaawxpdgnnzirbgalkhahibewtlishkwamndtnflrxgpufngehniexfgwbykxcncyrelwlmkigmdnklkdqc\";\n int keyLen = 6;\n String[] owns = this.ic.subSequences(text, keyLen);\n for (int i = 0; i < expected.length; i++) {\n assertEquals(expected[i], owns[i]);\n }\n }", "public boolean[] mo1603a(String str) {\n int length = str.length();\n if (length % 2 != 0) {\n throw new IllegalArgumentException(\"The length of the input should be even\");\n } else if (length <= 80) {\n boolean[] zArr = new boolean[((length * 9) + 9)];\n int a = C0809o.m2096a(zArr, 0, f1950a, true);\n for (int i = 0; i < length; i += 2) {\n int digit = Character.digit(str.charAt(i), 10);\n int digit2 = Character.digit(str.charAt(i + 1), 10);\n int[] iArr = new int[18];\n for (int i2 = 0; i2 < 5; i2++) {\n int i3 = i2 * 2;\n int[][] iArr2 = C0912l.f1949d;\n iArr[i3] = iArr2[digit][i2];\n iArr[i3 + 1] = iArr2[digit2][i2];\n }\n a += C0809o.m2096a(zArr, a, iArr, true);\n }\n C0809o.m2096a(zArr, a, f1951b, true);\n return zArr;\n } else {\n StringBuilder stringBuilder = new StringBuilder(\"Requested contents should be less than 80 digits long, but got \");\n stringBuilder.append(length);\n throw new IllegalArgumentException(stringBuilder.toString());\n }\n }", "public String[] inStringtoCheck(String[] stringArray) {\n\t\t\n\t\tstringCheck = stringArray;\n\t\toutArr = new String[stringCheck.length];\n\t\t\n\t\t//System.out.print(\"\\n\");\n\t\t\n\t\t/* Check the Local String Array */\n\t\tfor (int i = 0; i < stringCheck.length; i++) {\n\t\t\tint j = i - 1;\n\t\t\tint k = i - 2;\n\t\t\tint l = i - 3;\n\t\t\t\n\t\t\texitCheck = false; \n\t\t\tpariralaCheck = true;\n\t\t\tpackageCheck = true;\n\t\t\tkomentoCheck = true;\n\t\t\t\n\t\t\tif (searchValue(stringCheck[i])) {\n\t\t\t\t\n\t\t\t\t// String append\n\t\t\t\tif(stringCheck[i].equals(op_parirala_dagdag[0]) && !exitCheck && \n\t\t\t\t\t\t(outArr[j].equals(\"String Declarator (End)\") || outArr[k].equals(\"Append\") || outArr[l].equals(\"Keyword\")/*|| *//* outArr[j].equals(\"Identifier\")\n\t\t\t\t\t\t\t\t||*/ /*outArr[k].equals(\"Delimiter Parenthesis (Start)\")*/)) {\n\t\t\t\t\toutArr[i] = \"Append\";\n\t\t\t\t\texitCheck = true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\n\t\t\t \t\n\n\n \n\t\t\t \t\n\t\t\t\t\n\t\t\t\t// Keywords\n \t\tfor (int a = 0; a < abakada_mahalaga.length; a++) {\n \t\t\tif (stringCheck[i].equals(abakada_mahalaga[a]) && !exitCheck) {\n \t\t\t\t\n \t\t\t\tif(stringCheck[i].equals(\"isulat\")) {\n \t\t\t\t\toutArr[i] = \"Keyword (Pre-defined Function)\";\n \t\t\t\t}\n \t\t\t\telse if (stringCheck[i].equals(\"basahin\")) {\n \t\t\t\t\toutArr[i] = \"Keyword (Pre-defined Function)\";\n \t\t\t\t}\n \t\t\t\telse if (stringCheck[i].equals(\"kawalan\")) {\n \t\t\t\t\toutArr[i] = \"Keyword (Modifier)\";\n \t\t\t\t}\n \t\t\t\telse {\n \t\t\t\t\toutArr[i] = \"Keyword\";\n \t\t\t\t}\n \t\t\t\texitCheck = true;\n \tbreak;\n \t\t\t}\n \t\t}\n \t\t\n \t\t// Reserved Words\n \t\tfor (int a = 0; a < abakada_nakalaan.length; a++) {\n \t\t\tif (stringCheck[i].equals(abakada_nakalaan[a]) && !exitCheck) {\n \t\t\t\toutArr[i] = \"Reserved Word\";\n \t\t\t\texitCheck = true;\n \tbreak;\n }\n \t\t}\n \t\t\n \t\t// Noise Words\n \t\tif (stringCheck[i].equals(abakada_ingay[0]) && !exitCheck) {\n \t\t\t\toutArr[i] = \"Noise Word\";\n \t\t\t\texitCheck = true;\n \t//break;\n }\n \t\t \n \t\t// Data Type\n \t\tfor (int a = 0; a < pang_uri.length; a++) {\n \t\t\tif (stringCheck[i].equals(pang_uri[a]) && !exitCheck) {\n \t\t\t\t\n \t\t\t\tif(stringCheck[i].equals(\"pambuo\")) {\n \t\t\t\t\toutArr[i] = \"Keyword (Integer)\";\n \t\t\t\t}\n \t\t\t\telse if(stringCheck[i].equals(\"hatimbuo\")) {\n \t\t\t\t\toutArr[i] = \"Keyword (Float)\";\n \t\t\t\t}\n\t\t\t\t\t\telse if(stringCheck[i].equals(\"bulyan\")) {\n\t\t\t\t\t\t\toutArr[i] = \"Keyword (Booleanr)\";\t\t\t\t\n\t\t\t\t\t\t \t\t\t\t}\n\t\t\t\t\t\telse if(stringCheck[i].equals(\"titik\")) {\n\t\t\t\t\t\t\toutArr[i] = \"Keyword (Character)\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(stringCheck[i].equals(\"parirala\")) {\n\t\t\t\t\t\t\toutArr[i] = \"Keyword (String)\";\n\t\t\t\t\t\t\t}\n\t \t\t\t\t\n \t\t\t\t//outArr[i] = \"Keyword (Data Type)\";\n \t\t\t\texitCheck = true;\n \tbreak;\n }\n \t\t}\n \t\t \n \t\t// Boolean\n \t\tfor (int a = 0; a < bulyan.length; a++) {\n \t\t\tif (stringCheck[i].equals(bulyan[a]) && !exitCheck) {\n \t\t\t\t\n \t\t\t\tif(stringCheck[i].equals(\"tama\")) {\n \t\t\t\t\toutArr[i] = \"Boolean (True)\";\n \t\t\t\t}\n \t\t\t\telse if(stringCheck[i].equals(\"mali\")) {\n \t\t\t\t\toutArr[i] = \"Boolean (False)\";\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\toutArr[i] = \"Boolean\";\n \t\t\t\texitCheck = true;\n \tbreak;\n }\n \t\t}\n \t\t \n \t\t // Operators\n \t\t for (int a = 0; a < op_takda.length; a++) {\t\t\t// Assignment Operator\n \t\t\t if (stringCheck[i].equals(op_takda[a]) && !exitCheck) {\n \t\t\t\t outArr[i] = \"Assignment Operator\";\n \t\t\t\texitCheck = true;\n \t\t\t\t break;\n \t\t\t }\n \t\t }\n \t\t \n \t\tfor (int a = 0; a < op_palatuusan.length; a++) {\t\t// Arithmetic Operator\n \t\t\tif (stringCheck[i].equals(op_palatuusan[a]) && !exitCheck) {\n \t\t\t\tif(stringCheck[i].equals(\"+\")) {\n \t\t\t\t\toutArr[i] = \"Arithmetic Operator Plus\";\n \t\t\t\t}\n \t\t\t\telse if(stringCheck[i].equals(\"-\")) {\n \t\t\t\t\toutArr[i] = \"Arithmetic Operator Minus\";\n \t\t\t\t}\n \t\t\t\telse if(stringCheck[i].equals(\"*\")) {\n \t\t\t\t\toutArr[i] = \"Arithmetic Operator Multiplication\";\n \t\t\t\t}\n \t\t\t\telse if(stringCheck[i].equals(\"/\")) {\n \t\t\t\t\toutArr[i] = \"Arithmetic Operator Division\";\n \t\t\t\t}\n \t\t\t\telse if(stringCheck[i].equals(\"%\")) {\n \t\t\t\t\toutArr[i] = \"Arithmetic Operator Modulo\";\n \t\t\t\t}\n \t\t\t\t//outArr[i] = \"Arithmetic Operator\";\n \t\t\t\texitCheck = true;\n \tbreak;\n }\n \t\t}\n \t\t \n \t\t for (int a = 0; a < op_yunari.length; a++) {\t\t\t// Unary Operator\n \t\t\t if (stringCheck[i].equals(op_yunari[a]) && !exitCheck) {\n \t\t\t\t outArr[i] = \"Unary Operator\";\n \t\t\t\texitCheck = true;\n \t\t\t\t break;\n \t\t\t }\n \t\t }\n \t\t\n \t\t \n \t\t for (int a = 0; a < op_relasyunal.length; a++) {\t\t// Relational Operator\n \t\t\t if (stringCheck[i].equals(op_relasyunal[a]) && !exitCheck) {\n \t\t\t\t\n \t\t\t\t if(stringCheck[i].equals(\"@\")) {\n \t\t\t\t\t outArr[i] = \"Relational Operator(EQUALS)\";\n \t\t\t\t }\n \t\t\t\t else if(stringCheck[i].equals(\"$\")) {\n \t\t\t\t\t outArr[i] = \"Relational Operator(NOT EQUALS)\";\n \t\t\t\t }\n \t\t\t\t else if(stringCheck[i].equals(\">\")) {\n \t\t\t\t\t outArr[i] = \"Relational Operator(GREATER THAN)\";\n \t\t\t\t } \n \t\t\t\t else if(stringCheck[i].equals(\"<\")) {\n \t\t\t\t\t outArr[i] = \"Relational Operator(LESS THAN)\";\n \t\t\t\t }\n \t\t\t\t \n \t\t\t\t //outArr[i] = \"Relational Operator\";\n \t\t\t\texitCheck = true;\n \t break;\n }\n \t\t }\n \t\t \n \t\t for (int a = 0; a < op_lohikal.length; a++) {\t\t\t// Logical Operator\n \t\t\t if (stringCheck[i].equals(op_lohikal[a]) && !exitCheck) {\n \t\t\t\t \n \t\t\t\t if(stringCheck[i].equals(\"at\")) {\n \t\t\t\t\t outArr[i] = \"Logical Operator(AND)\";\n \t\t\t\t }\n \t\t\t\t else if(stringCheck[i].equals(\"odikaya\")){\n \t\t\t\t\t outArr[i] = \"Logical Operator(OR)\";\n \t\t\t\t }\n \t\t\t\t else if(stringCheck[i].equals(\"hindi\")) {\n \t\t\t\t\t outArr[i] = \"Logical Operator(INVERSE)\";\n \t\t\t\t }\n \t\t\t\t \n \t\t\t\t \n \t\t\t\t //outArr[i] = \"Logical Operator\";\n \t\t\t\t exitCheck = true;\n \t\t\t\t break;\n }\n \t\t }\n \t\t \n \t\t for (int a = 0; a < op_kondisyunal.length; a++) {\t\t// Conditional Operator\n \t\t\t if (stringCheck[i].equals(op_kondisyunal[a]) && !exitCheck) {\n \t\t\t\t \n \t\t\t\t if(stringCheck[i].equals(\"?\")) {\n \t\t\t\t\t outArr[i] = \"Conditional Operator(?)\";\n \t\t\t\t }\n \t\t\t\t else if(stringCheck[i].equals(\":\")) {\n \t\t\t\t\t outArr[i] = \"Conditional Operator(:)\";\n \t\t\t\t }\n \t\t\t\t// outArr[i] = \"Conditional Operator\";\n \t\t\t\t exitCheck = true;\n \t break;\n }\n \t\t }\n \t\t \n \t\t for (int a = 0; a < op_pirasong_pantas.length; a++) {\t// Bitwise Operator\n \t\t\t if (stringCheck[i].equals(op_pirasong_pantas[a]) && !exitCheck) {\n \t\t\t\t \n \t\t\t\t if(stringCheck[i].equals(\"&\")) {\n \t\t\t\t\t outArr[i] = \"Bitwise Operator(&)\";\n \t\t\t\t }\n \t\t\t\t else if(stringCheck[i].equals(\"^\")){\n \t\t\t\t\t outArr[i] = \"Bitwise Operator(^)\";\n \t\t\t\t }\n \t\t\t\t else if(stringCheck[i].equals(\"|\")) {\n \t\t\t\t\t outArr[i] = \"Bitwise Operator(|)\";\n \t\t\t\t }\n \t\t\t\t \n \t\t\t\t \n \t\t\t\t \n \t\t\t\t \n \t\t\t\t //outArr[i] = \"Bitwise Operator\";\n \t\t\t\t exitCheck = true;\n \t break;\n }\n \t\t }\n \t\t \n \t\t// Comments\n \t\tfor (int a = 0; a < kom_marami_check.length; a++) {\n \t\t\t if (stringCheck[i].equals(kom_marami_check[0]) && !exitCheck) {\n \t\t\t\t \n \t\t\t\t outArr[i] = \"Multiple-line Comment (Start)\";\n \t\t\t\t \n \t\t\t\t while(komentoCheck) {\n \t\t\t\t\t\n \t\t\t\t\t i++;\n \t\n \t\t\t\t\t if(stringCheck[i].equals(kom_marami_check[0])) {\n \t\t\t\t\t\t outArr[i] = \"Multiple-line Comment (End)\";\n \t\t\t\t\t\t komentoCheck = false;\n \t\t\t\t\t }\n \t\t\t\t\t \n \t\t\t\t\t else {\n \t\t\t\t\t\t outArr[i] = \"Comment\";\n \t\t\t\t\t }\n \t\t\t\t\t \n \t\t\t\t\t if(i >= stringCheck.length) {\n \t\t\t\t\t\t System.out.println(\"No closing\");\n \t\t\t\t\t\t break;\n \t\t\t\t\t }\n \t\t\t\t\t \n \t\t\t\t }\n \t\t\t\t \n \t\t\t\t exitCheck = true;\n \t\t\t\t break;\n }\n \t\t }\n \t\t\n \t\t\n \t//[package\n \tfor (int a = 0; a < kom_marami_check.length; a++) {\n \t\tif (stringCheck[i].equals(abakada_angkat[0]) && !exitCheck) {\n \t\t\t\t \n \t\t\t outArr[i] = \"Keyword (PACKAGE)\";\n \t\t\t\t \n \t\t\t\twhile(packageCheck) {\n \t\t\t\t\t\n \t\t\t\t\t i++;\n \t\n \t\t\t\t\t if(stringCheck[i].equals(\";\")) {\n \t\t\t\t\t\t outArr[i] = \"Delimiter Semicolon\";\n \t\t\t\t\t\t packageCheck = false;\n \t\t\t\t\t }\n \t\t\t\t\t \n \t\t\t\t\t else if(stringCheck[i].equals(\".\")) {\n \t\t\t\t\t\t outArr[i] = \"Period\";\n \t\t\t\t\t }\n \t\t\t\t\t \n \t\t\t\t\t else if(stringCheck[i-1].equals(\".\") && !stringCheck[i].equals(\".\")) {\n \t\t\t\t\t\t outArr[i] = \"Package Extension\";\n \t\t\t\t\t }\n \t\t\t\t\t else {\n \t\t\t\t\t\t outArr[i] = \"Package\";\n \t\t\t\t\t }\n \t\t\t\t\t \n \t\t\t\t\t if(i >= stringCheck.length) {\n \t\t\t\t\t\t System.out.println(\"No closing\");\n \t\t\t\t\t\t break;\n \t\t\t\t\t }\n \t\t\t\t\t \n \t\t\t\t }\n \t\t\t\t \n \t\t\t\t exitCheck = true;\n \t\t\t\t break;\n }\n \t}\n \t\t\n \t\t\n \t\t\n \t\t\n \t\t\n \t\t \n \t\t // Delimiters and Brackets\n \t\t for (int a = 0; a < tuldok_kuwit.length; a++) {\t\t// Semicolon\n \t\t\t if (stringCheck[i].equals(tuldok_kuwit[a]) && !exitCheck) {\n \t\t\t\t outArr[i] = \"Delimiter Semicolon\";\n \t\t\t\texitCheck = true;\n \t break;\n }\n \t\t }\n \t\t \n \t\t for (int a = 0; a < del_separator.length; a++) {\t\t// Separator\n \t\t\t if (stringCheck[i].equals(del_separator[a]) && !exitCheck) {\n \t\t\t\t outArr[i] = \"Separator\";\n \t\t\t\texitCheck = true;\n \t break;\n }\n \t\t }\n\n \t\t // Character Declarator\n \t\t for (int a = 0; a < del_titik.length; a++) {\t\n \t\t\t oneTitik = false;\n \t\t\t if (stringCheck[i].equals(del_titik[a]) && !exitCheck) {\n \t\t\n \t\t\t\t outArr[i] = \"Character Declarator (Start)\";\n \t\t\t\t \n \t\t\t\t while(pariralaCheck) {\n \t\t\t\t\t\n \t\t\t\t\t i++;\n \t\t\t\t\t \n \t\t\t\t\t if(stringCheck[i].equals(del_titik[a])) {\n \t\t\t\t\t\t outArr[i] = \"Character Declarator (End)\";\n \t\t\t\t\t\t pariralaCheck = false;\n \t\t\t\t\t }\n \t\t\t\t\t \n \t\t\t\t\t else if (!oneTitik ){\n \t\t\t\t\t\t if(stringCheck[i].length() == 1) {\n \t\t\t\t\t\t\t oneTitik = true;\n \t\t\t\t\t\t outArr[i] = \"titik\";\n \t\t\t\t\t\t }\n \t\t\t\t\t\t \n \t\t\t\t\t\t else {\n \t\t\t\t\t\t\toutArr[i] = \"Invalid Token\";\n \t\t\t\t\t\t }\n \t\t\t\t\t\n \t\t\t\t\t }\n \t\t\t\t\t \n \t\t\t\t\t if(i >= stringCheck.length) {\n \t\t\t\t\t\t System.out.println(\"No closing\");\n \t\t\t\t\t\t break;\n \t\t\t\t\t }\n \t\t\t\t }\n \t\t\t\t \n \t\t\t\t exitCheck = true;\n \t\t\t\t break;\n }\n \t\t }\n \t\t \n \t\t // String Declarator\n \t\t for (int a = 0; a < del_parirala.length; a++) {\n \t\t\t if (stringCheck[i].equals(del_parirala[a]) && !exitCheck) {\n \t\t\n \t\t\t\t outArr[i] = \"String Declarator (Start)\";\n \t\t\t\t \n \t\t\t\t while(pariralaCheck) {\n \t\t\t\t\t\n \t\t\t\t\t i++;\n \t\t\t\t\t System.out.println(stringCheck[i]+\" value of i: \"+i);\n \t\t\t\t\t if(stringCheck[i].equals(del_parirala[a])) {\n \t\t\t\t\t\toutArr[i] = \"String Declarator (End)\";\n \t\t\t\t\t\t pariralaCheck = false;\n \t\t\t\t\t }\n \t\t\t\t\t \n \t\t\t\t\t else {\n \t\t\t\t\t\t outArr[i] = \"String\";\n \t\t\t\t\t }\n \t\t\t\t\t \n \t\t\t\t\t if(i >= stringCheck.length) {\n \t\t\t\t\t\t System.out.println(\"No closing\");\n \t\t\t\t\t\t break;\n \t\t\t\t\t }\n \t\t\t\t }\n \t\t\t\t \n \t\t\t\t exitCheck = true;\n \t\t\t\t break;\n }\n \t\t }\n \t\t \n \t\t for (int a = 0; a < del_saklong_una.length; a++) {\t\t// Parenthesis\n \t\t\t if (stringCheck[i].equals(del_saklong_una[a]) && !exitCheck) {\n \t\t\t\t outArr[i] = \"Delimiter Parenthesis (Start)\";\n \t\t\t\texitCheck = true;\n \t break;\n }\n \t\t }\n \t\t \n \t\tfor (int a = 0; a < del_saklong_huli.length; a++) {\t\t \n \t\t\t if (stringCheck[i].equals(del_saklong_huli[a]) && !exitCheck) {\n \t\t\t\t outArr[i] = \"Delimiter Parenthesis (End)\";\n \t\t\t\texitCheck = true;\n \t break;\n }\n \t\t }\n \t\t \n \t\t for (int a = 0; a < del_kulong_una.length; a++) {\t\t// Curly Bracket\n \t\t\t if (stringCheck[i].equals(del_kulong_una[a]) && !exitCheck) {\n \t\t\t\t outArr[i] = \"Delimiter Curly Bracket (Start)\";\n \t\t\t\texitCheck = true;\n \t break;\n }\n \t\t }\n \t\t \n \t\tfor (int a = 0; a < del_kulong_huli.length; a++) {\t\t \n \t\t\t if (stringCheck[i].equals(del_kulong_huli[a]) && !exitCheck) {\n \t\t\t\t outArr[i] = \"Delimiter Curly Bracket (End)\";\n \t\t\t\texitCheck = true;\n \t\t\t\t break;\n }\n \t\t }\n \t\t \n \t\t for (int a = 0; a < del_palong_una.length; a++) {\t\t// Bracket\n \t\t\t if (stringCheck[i].equals(del_palong_una[a]) && !exitCheck) {\n \t\t\t\t outArr[i] = \"Bracket (Start)\";\n \t\t\t\texitCheck = true;\n \t break;\n }\n \t\t }\n \t\t \n \t\tfor (int a = 0; a < del_palong_huli.length; a++) {\t\t\t \n \t\t\t if (stringCheck[i].equals(del_palong_huli[a]) && !exitCheck) {\n \t\t\t\toutArr[i] = \"Bracket (End)\";\n \t\t\t\texitCheck = true;\n \t break;\n }\n \t\t }\n \t\t\n \t\t// Pre-defined Functions\n \t\tfor (int a = 0; a < abakada_pdf_basa.length; a++) {\t\t// Read Function \n \t\t\t if (stringCheck[i].equals(abakada_pdf_basa[a]) && !exitCheck) {\n \t\t\t\t outArr[i] = \"Read function\";\n \t\t\t\t exitCheck = true;\n \t break;\n \t\t\t }\n \t\t }\n \t\t\n \t\tfor (int a = 0; a < abakada_pdf_sulat.length; a++) {\t// Write Function\t \n \t\t\tif (stringCheck[i].equals(abakada_pdf_sulat[a]) && !exitCheck) {\n \t\t\t\t outArr[i] = \"Write function\";\n \t\t\t\texitCheck = true;\n \t break;\n \t\t\t}\n \t\t}\n \t\t\n \t\tif(!exitCheck) {\n \t\t\toutArr[i] = \"Constant Number\"; // next line if ever\n \t\t\t\n \t\t}\n \t\t\t\n \t \t}\n \t\n\t\t\telse if (checkConNum(stringCheck[i])) {\n outArr[i] = \"Constant Number\";\n\t\t\t}\n\t\t\t\n\t\t\telse if (checkVar(stringCheck[i])) {\n outArr[i] = \"Identifier\";\n\t\t\t}\n \n\t\t\telse {\n outArr[i] = \"Invalid Identifier\";\n\t\t\t}\n \n\t\t} // for loop\n\t\t\n\t\treturn outArr;\n\t}", "private void handleNonFrameShiftCaseStartsWithNoStopCodon() {\n\t\t\tif (aaChange.getPos() == 0) {\n\t\t\t\t// The mutation affects the start codon, is start loss (in the case of keeping the start codon\n\t\t\t\t// intact, we would have jumped into a shifted duplication case earlier.\n\t\t\t\tproteinChange = ProteinMiscChange.build(true, ProteinMiscChangeType.NO_PROTEIN);\n\t\t\t\tvarTypes.add(VariantEffect.START_LOST);\n\t\t\t\tvarTypes.add(VariantEffect.INFRAME_INSERTION);\n\t\t\t} else {\n\t\t\t\t// The start codon is not affected. Since it is a non-FS insertion, the stop codon cannot be\n\t\t\t\t// affected.\n\t\t\t\tif (varAAStopPos == varAAInsertPos) {\n\t\t\t\t\t// The insertion directly starts with a stop codon, is stop gain.\n\t\t\t\t\tproteinChange = ProteinSubstitution.build(true, toString(wtAASeq.charAt(varAAInsertPos)),\n\t\t\t\t\t\tvarAAInsertPos, \"*\");\n\t\t\t\t\tvarTypes.add(VariantEffect.STOP_GAINED);\n\n\t\t\t\t\t// Differentiate the case of disruptive and non-disruptive insertions.\n\t\t\t\t\tif (insertPos.getPos() % 3 == 0)\n\t\t\t\t\t\tvarTypes.add(VariantEffect.INFRAME_INSERTION);\n\t\t\t\t\telse\n\t\t\t\t\t\tvarTypes.add(VariantEffect.DISRUPTIVE_INFRAME_INSERTION);\n\t\t\t\t} else {\n\t\t\t\t\tif (varAAStopPos != -1 && wtAAStopPos != -1\n\t\t\t\t\t\t&& varAASeq.length() - varAAStopPos != wtAASeq.length() - wtAAStopPos) {\n\t\t\t\t\t\t// The insertion does not directly start with a stop codon but the insertion leads to a stop\n\t\t\t\t\t\t// codon in the affected amino acids. This leads to an \"delins\" protein annotation.\n\t\t\t\t\t\tproteinChange = ProteinIndel.buildWithSeqDescription(true,\n\t\t\t\t\t\t\ttoString(wtAASeq.charAt(varAAInsertPos)), varAAInsertPos,\n\t\t\t\t\t\t\ttoString(wtAASeq.charAt(varAAInsertPos + 1)), varAAInsertPos + 1,\n\t\t\t\t\t\t\tnew ProteinSeqDescription(),\n\t\t\t\t\t\t\tnew ProteinSeqDescription(varAASeq.substring(varAAInsertPos, varAAStopPos)));\n\t\t\t\t\t\tvarTypes.add(VariantEffect.STOP_GAINED);\n\n\t\t\t\t\t\taddNonFrameshiftInsertionEffect();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// The changes on the amino acid level do not lead to a new stop codon, is non-FS insertion.\n\n\t\t\t\t\t\t// Differentiate the ins and the delins case.\n\t\t\t\t\t\tif (aaChange.getRef().equals(\"\")) {\n\t\t\t\t\t\t\t// Clean insertion.\n\t\t\t\t\t\t\tif (DuplicationChecker.isDuplication(wtAASeq, aaChange.getAlt(), varAAInsertPos)) {\n\t\t\t\t\t\t\t\t// We have a duplication, can only be duplication of AAs to the left because of\n\t\t\t\t\t\t\t\t// normalization in CDSExonicAnnotationBuilder constructor.\n\t\t\t\t\t\t\t\tif (aaChange.getAlt().length() == 1) {\n\t\t\t\t\t\t\t\t\tproteinChange = ProteinDuplication.buildWithSeqDescription(true,\n\t\t\t\t\t\t\t\t\t\ttoString(wtAASeq.charAt(varAAInsertPos - 1)), varAAInsertPos - 1,\n\t\t\t\t\t\t\t\t\t\ttoString(wtAASeq.charAt(varAAInsertPos - 1)), varAAInsertPos - 1,\n\t\t\t\t\t\t\t\t\t\tnew ProteinSeqDescription());\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tproteinChange = ProteinDuplication.buildWithSeqDescription(true,\n\t\t\t\t\t\t\t\t\t\ttoString(wtAASeq.charAt(varAAInsertPos - aaChange.getAlt().length())),\n\t\t\t\t\t\t\t\t\t\tvarAAInsertPos - aaChange.getAlt().length(),\n\t\t\t\t\t\t\t\t\t\ttoString(wtAASeq.charAt(varAAInsertPos - 1)), varAAInsertPos - 1,\n\t\t\t\t\t\t\t\t\t\tnew ProteinSeqDescription());\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\taddNonFrameshiftInsertionEffect();\n\t\t\t\t\t\t\t\tvarTypes.add(VariantEffect.DIRECT_TANDEM_DUPLICATION);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// We have a simple insertion.\n\t\t\t\t\t\t\t\tproteinChange = ProteinInsertion.buildWithSequence(true,\n\t\t\t\t\t\t\t\t\ttoString(wtAASeq.charAt(varAAInsertPos - 1)), varAAInsertPos - 1,\n\t\t\t\t\t\t\t\t\ttoString(wtAASeq.charAt(varAAInsertPos)), varAAInsertPos, aaChange.getAlt());\n\n\t\t\t\t\t\t\t\taddNonFrameshiftInsertionEffect();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// The delins/substitution case.\n\t\t\t\t\t\t\tproteinChange = ProteinIndel.buildWithSeqDescription(true, aaChange.getRef(),\n\t\t\t\t\t\t\t\tvarAAInsertPos, aaChange.getRef(), varAAInsertPos, new ProteinSeqDescription(),\n\t\t\t\t\t\t\t\tnew ProteinSeqDescription(aaChange.getAlt()));\n\t\t\t\t\t\t\taddNonFrameshiftInsertionEffect();\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}", "private int findStopCodon(String sequentie,int start){\n\t for(int i = start; i+3<sequentie.length();i+=3){\n\t if(sequentie.substring(i,i+3).contains(\"TAG\")||sequentie.substring(i,i+3).contains(\"TAA\")||sequentie.substring(i,i+3).contains(\"TGA\")){\n\t return i+3;\n\t }\n\t }\n\t return -1;\n }", "public static void main(String[] args) {\r\n\t\t P187RepeatedDNASequences p = new P187RepeatedDNASequences();\r\n\t\t List<String> r = p.findRepeatedDnaSequences(\"AAAAACCCCCAAAAACCCCCCAAAAAGGGTTT\"); //\r\n\t\t for(String t : r) {\r\n\t\t\t System.out.println(t);\t\t\t \r\n\t\t }\r\n\t }", "@Test\n public void aminoCountsTest2(){\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(b);\n int[] expected = {2,1,1,1};\n assertArrayEquals(expected, first.aminoAcidCounts());\n }", "public boolean genStringAsCharArray();", "public final String A01(char[] cArr, int i, int i2, int i3) {\n int i4 = i2;\n if (i4 < 1) {\n return \"\";\n }\n int i5 = i;\n char[] cArr2 = cArr;\n if (!this.A09) {\n return new String(cArr2, i5, i4);\n }\n int i6 = (i3 + (i3 >>> 15)) & this.A00;\n String str = this.A07[i6];\n if (str != null) {\n if (str.length() == i4) {\n int i7 = 0;\n while (str.charAt(i7) == cArr[i + i7] && (i7 = i7 + 1) < i4) {\n while (str.charAt(i7) == cArr[i + i7] && (i7 = i7 + 1) < i4) {\n }\n }\n }\n C12990hi r0 = this.A06[i6 >> 1];\n if (r0 != null) {\n String str2 = r0.A01;\n C12990hi r7 = r0.A00;\n while (true) {\n if (str2.length() == i4) {\n int i8 = 0;\n while (str2.charAt(i8) == cArr[i + i8] && (i8 = i8 + 1) < i4) {\n while (str2.charAt(i8) == cArr[i + i8] && (i8 = i8 + 1) < i4) {\n }\n }\n if (i8 == i4) {\n break;\n }\n }\n if (r7 == null) {\n str2 = null;\n break;\n }\n str2 = r7.A01;\n r7 = r7.A00;\n }\n if (str2 != null) {\n return str2;\n }\n }\n }\n if (!this.A05) {\n String[] strArr = this.A07;\n int length = strArr.length;\n String[] strArr2 = new String[length];\n this.A07 = strArr2;\n System.arraycopy(strArr, 0, strArr2, 0, length);\n C12990hi[] r3 = this.A06;\n int length2 = r3.length;\n C12990hi[] r02 = new C12990hi[length2];\n this.A06 = r02;\n System.arraycopy(r3, 0, r02, 0, length2);\n this.A05 = true;\n } else if (this.A02 >= this.A03) {\n String[] strArr3 = this.A07;\n int i9 = r4 + r4;\n if (i9 > 65536) {\n this.A02 = 0;\n Arrays.fill(strArr3, (Object) null);\n Arrays.fill(this.A06, (Object) null);\n this.A05 = true;\n } else {\n C12990hi[] r13 = this.A06;\n this.A07 = new String[i9];\n this.A06 = new C12990hi[(i9 >> 1)];\n this.A00 = i9 - 1;\n this.A03 = i9 - (i9 >> 2);\n int i10 = 0;\n int i11 = 0;\n for (String str3 : strArr3) {\n if (str3 != null) {\n i10++;\n int length3 = str3.length();\n int i12 = this.A08;\n for (int i13 = 0; i13 < length3; i13++) {\n i12 = (i12 * 33) + str3.charAt(i13);\n }\n if (i12 == 0) {\n i12 = 1;\n }\n int i14 = (i12 + (i12 >>> 15)) & this.A00;\n String[] strArr4 = this.A07;\n if (strArr4[i14] == null) {\n strArr4[i14] = str3;\n } else {\n int i15 = i14 >> 1;\n C12990hi[] r1 = this.A06;\n r1[i15] = new C12990hi(str3, r1[i15]);\n i11 = Math.max(i11, 1);\n }\n }\n }\n int i16 = r4 >> 1;\n for (int i17 = 0; i17 < i16; i17++) {\n for (C12990hi r4 = r13[i17]; r4 != null; r4 = r4.A00) {\n i10++;\n String str4 = r4.A01;\n int length4 = str4.length();\n int i18 = this.A08;\n for (int i19 = 0; i19 < length4; i19++) {\n i18 = (i18 * 33) + str4.charAt(i19);\n }\n if (i18 == 0) {\n i18 = 1;\n }\n int i20 = (i18 + (i18 >>> 15)) & this.A00;\n String[] strArr5 = this.A07;\n if (strArr5[i20] == null) {\n strArr5[i20] = str4;\n } else {\n int i21 = i20 >> 1;\n C12990hi[] r12 = this.A06;\n r12[i21] = new C12990hi(str4, r12[i21]);\n i11 = Math.max(i11, 1);\n }\n }\n }\n this.A01 = i11;\n int i22 = this.A02;\n if (i10 != i22) {\n throw new Error(AnonymousClass000.A08(\"Internal error on SymbolTable.rehash(): had \", i22, \" entries; now have \", i10, \".\"));\n }\n }\n int i23 = this.A08;\n for (int i24 = 0; i24 < i4; i24++) {\n i23 = (i23 * 33) + cArr[i24];\n }\n if (i23 == 0) {\n i23 = 1;\n }\n i6 = (i23 + (i23 >>> 15)) & this.A00;\n }\n str = new String(cArr2, i5, i4);\n if (this.A0A) {\n str = C13190i2.A00.A00(str);\n }\n int i25 = this.A02 + 1;\n this.A02 = i25;\n String[] strArr6 = this.A07;\n if (strArr6[i6] == null) {\n strArr6[i6] = str;\n return str;\n }\n int i26 = i6 >> 1;\n C12990hi[] r14 = this.A06;\n r14[i26] = new C12990hi(str, r14[i26]);\n int max = Math.max(1, this.A01);\n this.A01 = max;\n if (max > 255) {\n throw new IllegalStateException(AnonymousClass000.A08(\"Longest collision chain in symbol table (of size \", i25, \") now exceeds maximum, \", 255, \" -- suspect a DoS attack based on hash collisions\"));\n }\n return str;\n }", "public String processSeq (String seq)\n {\n\n\n unknownStatus = 0; // reinitialize this to 0\n\n // take out any spaces and numbers\n StringBuffer tempSeq = new StringBuffer(\"\");;\n for (int i = 0; i < seq.length(); i++)\n {\n if (Character.isLetter(seq.charAt(i)))\n tempSeq.append(seq.charAt(i));\n else\n continue;\n }\n seq = tempSeq.toString();\n\n if (seq.length() > 0)\n {\n\n // the three 5'3' reading frame translations\n\n String fiveThreeFrame1 = match (seq);\n String fiveThreeFrame2 = match (seq.substring(1, seq.length()));\n String fiveThreeFrame3 = match (seq.substring(2, seq.length()));\n\n \n\n // reverse and complement the string seq and rename rev\n\n String rev = \"\";\n for (int i = 0; i < seq.length(); i++)\n {\n // the unambiguous nucleotides\n if (seq.charAt(i) == 'A')\n rev = \"U\" + rev;\n else if ((seq.charAt(i) == 'U') || (seq.charAt(i) == 'T'))\n rev = \"A\" + rev;\n else if (seq.charAt(i) == 'C')\n rev = \"G\" + rev;\n else if (seq.charAt(i) == 'G')\n rev = \"C\" + rev;\n else // any other non-nucleotides\n rev = String.valueOf (seq.charAt(i)) + rev;\n }\n\n\n // the three 3'5' reading frame translations\n\n String threeFiveFrame1 = match (rev); \n String threeFiveFrame2 = match (rev.substring(1, rev.length()));\n String threeFiveFrame3 = match (rev.substring(2, rev.length()));\n\n return (\"5'3' Frame1: \" + \"<BR>\" + fiveThreeFrame1 + \n \"<BR><BR>5'3' Frame2: \" + \"<BR>\" + fiveThreeFrame2 +\n \"<BR><BR>5'3' Frame3: \" + \"<BR>\" + fiveThreeFrame3 +\n \"<BR><BR>3'5' Frame1: \" + \"<BR>\" + threeFiveFrame1 +\n \"<BR><BR>3'5' Frame2: \" + \"<BR>\" + threeFiveFrame2 +\n \"<BR><BR>3'5' Frame3: \" + \"<BR>\" + threeFiveFrame3 + \"<BR>\");\n }\n\n return \"\";\n }", "@Deprecated\n@ProwideDeprecated(phase4 = TargetYear.SRU2021)\npublic interface SequenceName {\n String A = \"A\";\n String A1 = \"A1\";\n String A1a = \"A1a\";\n String A1b = \"A1b\";\n String A1c = \"A1c\";\n String A1d = \"A1d\";\n String A1e = \"A1e\";\n String A2 = \"A2\";\n String A2a = \"A2a\";\n String A2b = \"A2b\";\n String A2c = \"A2c\";\n String A2d = \"A2d\";\n String A2e = \"A2e\";\n String A3 = \"A3\";\n String A3a = \"A3a\";\n String A3b = \"A3b\";\n String A3c = \"A3c\";\n String A3d = \"A3d\";\n String A3e = \"A3e\";\n String A4 = \"A4\";\n String A4a = \"A4a\";\n String A4b = \"A4b\";\n String A4c = \"A4c\";\n String A4d = \"A4d\";\n String A4e = \"A4e\";\n String A5 = \"A5\";\n String A5a = \"A5a\";\n String A5b = \"A5b\";\n String A5c = \"A5c\";\n String A5d = \"A5d\";\n String A5e = \"A5e\";\n String B = \"B\";\n String B1 = \"B1\";\n String B1a = \"B1a\";\n String B1b = \"B1b\";\n String B1c = \"B1c\";\n String B1d = \"B1d\";\n String B1e = \"B1e\";\n String B2 = \"B2\";\n String B2a = \"B2a\";\n String B2b = \"B2b\";\n String B2c = \"B2c\";\n String B2d = \"B2d\";\n String B2e = \"B2e\";\n String B3 = \"B3\";\n String B3a = \"B3a\";\n String B3b = \"B3b\";\n String B3c = \"B3c\";\n String B3d = \"B3d\";\n String B3e = \"B3e\";\n String B4 = \"B4\";\n String B4a = \"B4a\";\n String B4b = \"B4b\";\n String B4c = \"B4c\";\n String B4d = \"B4d\";\n String B4e = \"B4e\";\n String B5 = \"B5\";\n String B5a = \"B5a\";\n String B5b = \"B5b\";\n String B5c = \"B5c\";\n String B5d = \"B5d\";\n String B5e = \"B5e\";\n String C = \"C\";\n String C1 = \"C1\";\n String C1a = \"C1a\";\n String C1b = \"C1b\";\n String C1c = \"C1c\";\n String C1d = \"C1d\";\n String C1e = \"C1e\";\n String C2 = \"C2\";\n String C2a = \"C2a\";\n String C2b = \"C2b\";\n String C2c = \"C2c\";\n String C2d = \"C2d\";\n String C2e = \"C2e\";\n String C3 = \"C3\";\n String C3a = \"C3a\";\n String C3b = \"C3b\";\n String C3c = \"C3c\";\n String C3d = \"C3d\";\n String C3e = \"C3e\";\n String C4 = \"C4\";\n String C4a = \"C4a\";\n String C4b = \"C4b\";\n String C4c = \"C4c\";\n String C4d = \"C4d\";\n String C4e = \"C4e\";\n String C5 = \"C5\";\n String C5a = \"C5a\";\n String C5b = \"C5b\";\n String C5c = \"C5c\";\n String C5d = \"C5d\";\n String C5e = \"C5e\";\n String D = \"D\";\n String D1 = \"D1\";\n String D1a = \"D1a\";\n String D1b = \"D1b\";\n String D1c = \"D1c\";\n String D1d = \"D1d\";\n String D1e = \"D1e\";\n String D2 = \"D2\";\n String D2a = \"D2a\";\n String D2b = \"D2b\";\n String D2c = \"D2c\";\n String D2d = \"D2d\";\n String D2e = \"D2e\";\n String D3 = \"D3\";\n String D3a = \"D3a\";\n String D3b = \"D3b\";\n String D3c = \"D3c\";\n String D3d = \"D3d\";\n String D3e = \"D3e\";\n String D4 = \"D4\";\n String D4a = \"D4a\";\n String D4b = \"D4b\";\n String D4c = \"D4c\";\n String D4d = \"D4d\";\n String D4e = \"D4e\";\n String D5 = \"D5\";\n String D5a = \"D5a\";\n String D5b = \"D5b\";\n String D5c = \"D5c\";\n String D5d = \"D5d\";\n String D5e = \"D5e\";\n String E = \"E\";\n String E1 = \"E1\";\n String E2 = \"E2\";\n String E2a = \"E2a\";\n String E2b = \"E2b\";\n String E2c = \"E2c\";\n String E2d = \"E2d\";\n String E2e = \"E2e\";\n String E3 = \"E3\";\n String E3a = \"E3a\";\n String E3b = \"E3b\";\n String E3c = \"E3c\";\n String E3d = \"E3d\";\n String E3e = \"E3e\";\n String E4 = \"E4\";\n String E4a = \"E4a\";\n String E4b = \"E4b\";\n String E4c = \"E4c\";\n String E4d = \"E4d\";\n String E4e = \"E4e\";\n String E5 = \"E5\";\n String E5a = \"E5a\";\n String E5b = \"E5b\";\n String E5c = \"E5c\";\n String E5d = \"E5d\";\n String E5e = \"E5e\";\n\n String F = \"F\";\n String F1 = \"F1\";\n String F2 = \"F2\";\n String F3 = \"F3\";\n String F3a = \"F3a\";\n String F3b = \"F3b\";\n String F3c = \"F3c\";\n String F3d = \"F3d\";\n String F3e = \"F3e\";\n String F4 = \"F4\";\n String F4a = \"F4a\";\n String F4b = \"F4b\";\n String F4c = \"F4c\";\n String F4d = \"F4d\";\n String F4e = \"F4e\";\n String F5 = \"F5\";\n String F5a = \"F5a\";\n String F5b = \"F5b\";\n String F5c = \"F5c\";\n String F5d = \"F5d\";\n String F5e = \"F5e\";\n String G = \"G\";\n String G1 = \"G1\";\n String G1a = \"G1a\";\n String G1b = \"G1b\";\n String G1c = \"G1c\";\n String G1d = \"G1d\";\n String G1e = \"G1e\";\n String G2 = \"G2\";\n String G3 = \"G3\";\n String G4 = \"G4\";\n String G4a = \"G4a\";\n String G4b = \"G4b\";\n String G4c = \"G4c\";\n String G4d = \"G4d\";\n String G4e = \"G4e\";\n String G5 = \"G5\";\n String G5a = \"G5a\";\n String G5b = \"G5b\";\n String G5c = \"G5c\";\n String G5d = \"G5d\";\n String G5e = \"G5e\";\n String H = \"H\";\n String H1 = \"H1\";\n String H1a = \"H1a\";\n String H1b = \"H1b\";\n String H1c = \"H1c\";\n String H1d = \"H1d\";\n String H1e = \"H1e\";\n String H2 = \"H2\";\n String H2a = \"H2a\";\n String H2b = \"H2b\";\n String H2c = \"H2c\";\n String H2d = \"H2d\";\n String H2e = \"H2e\";\n String H3 = \"H3\";\n String H4 = \"H4\";\n String H5 = \"H5\";\n String H5a = \"H5a\";\n String H5b = \"H5b\";\n String H5c = \"H5c\";\n String H5d = \"H5d\";\n String H5e = \"H5e\";\n String I = \"I\";\n String I1 = \"I1\";\n String I1a = \"I1a\";\n String I1b = \"I1b\";\n String I1c = \"I1c\";\n String I1d = \"I1d\";\n String I1e = \"I1e\";\n String I2 = \"I2\";\n String I2a = \"I2a\";\n String I2b = \"I2b\";\n String I2c = \"I2c\";\n String I2d = \"I2d\";\n String I2e = \"I2e\";\n String I3 = \"I3\";\n String I3a = \"I3a\";\n String I3b = \"I3b\";\n String I3c = \"I3c\";\n String I3d = \"I3d\";\n String I3e = \"I3e\";\n String I4 = \"I4\";\n String I5 = \"I5\";\n String J = \"J\";\n String J1 = \"J1\";\n String J1a = \"J1a\";\n String J1b = \"J1b\";\n String J1c = \"J1c\";\n String J1d = \"J1d\";\n String J1e = \"J1e\";\n String J2 = \"J2\";\n String J2a = \"J2a\";\n String J2b = \"J2b\";\n String J2c = \"J2c\";\n String J2d = \"J2d\";\n String J2e = \"J2e\";\n String J3 = \"J3\";\n String J3a = \"J3a\";\n String J3b = \"J3b\";\n String J3c = \"J3c\";\n String J3d = \"J3d\";\n String J3e = \"J3e\";\n String J4 = \"J4\";\n String J4a = \"J4a\";\n String J4b = \"J4b\";\n String J4c = \"J4c\";\n String J4d = \"J4d\";\n String J4e = \"J4e\";\n String J5 = \"J5\";\n String K = \"K\";\n String K1 = \"K1\";\n String K1a = \"K1a\";\n String K1b = \"K1b\";\n String K1c = \"K1c\";\n String K1d = \"K1d\";\n String K1e = \"K1e\";\n String K2 = \"K2\";\n String K2a = \"K2a\";\n String K2b = \"K2b\";\n String K2c = \"K2c\";\n String K2d = \"K2d\";\n String K2e = \"K2e\";\n String K3 = \"K3\";\n String K3a = \"K3a\";\n String K3b = \"K3b\";\n String K3c = \"K3c\";\n String K3d = \"K3d\";\n String K3e = \"K3e\";\n String K4 = \"K4\";\n String K4a = \"K4a\";\n String K4b = \"K4b\";\n String K4c = \"K4c\";\n String K4d = \"K4d\";\n String K4e = \"K4e\";\n String K5 = \"K5\";\n String K5a = \"K5a\";\n String K5b = \"K5b\";\n String K5c = \"K5c\";\n String K5d = \"K5d\";\n String K5e = \"K5e\";\n String L = \"L\";\n String L1 = \"L1\";\n String L2 = \"L2\";\n String L2a = \"L2a\";\n String L2b = \"L2b\";\n String L2c = \"L2c\";\n String L2d = \"L2d\";\n String L2e = \"L2e\";\n String L3 = \"L3\";\n String L3a = \"L3a\";\n String L3b = \"L3b\";\n String L3c = \"L3c\";\n String L3d = \"L3d\";\n String L3e = \"L3e\";\n String L4 = \"L4\";\n String L4a = \"L4a\";\n String L4b = \"L4b\";\n String L4c = \"L4c\";\n String L4d = \"L4d\";\n String L4e = \"L4e\";\n String L5 = \"L5\";\n String L5a = \"L5a\";\n String L5b = \"L5b\";\n String L5c = \"L5c\";\n String L5d = \"L5d\";\n String L5e = \"L5e\";\n\n String M1 = \"M1\";\n String M2 = \"M2\";\n String M3 = \"M3\";\n String M3a = \"M3a\";\n String M3b = \"M3b\";\n String M3c = \"M3c\";\n String M3d = \"M3d\";\n String M3e = \"M3e\";\n String M4 = \"M4\";\n String M4a = \"M4a\";\n String M4b = \"M4b\";\n String M4c = \"M4c\";\n String M4d = \"M4d\";\n String M4e = \"M4e\";\n String M5 = \"M5\";\n String M5a = \"M5a\";\n String M5b = \"M5b\";\n String M5c = \"M5c\";\n String M5d = \"M5d\";\n String M5e = \"M5e\";\n\n String N1 = \"N1\";\n String N1a = \"N1a\";\n String N1b = \"N1b\";\n String N1c = \"N1c\";\n String N1d = \"N1d\";\n String N1e = \"N1e\";\n String N2 = \"N2\";\n String N3 = \"N3\";\n String N4 = \"N4\";\n String N4a = \"N4a\";\n String N4b = \"N4b\";\n String N4c = \"N4c\";\n String N4d = \"N4d\";\n String N4e = \"N4e\";\n String N5 = \"N5\";\n String N5a = \"N5a\";\n String N5b = \"N5b\";\n String N5c = \"N5c\";\n String N5d = \"N5d\";\n String N5e = \"N5e\";\n String O = \"O\";\n\n String O1 = \"O1\";\n String O1a = \"O1a\";\n String O1b = \"O1b\";\n String O1c = \"O1c\";\n String O1d = \"O1d\";\n String O1e = \"O1e\";\n String O2 = \"O2\";\n String O2a = \"O2a\";\n String O2b = \"O2b\";\n String O2c = \"O2c\";\n String O2d = \"O2d\";\n String O2e = \"O2e\";\n String O3 = \"O3\";\n String O4 = \"O4\";\n String O5 = \"O5\";\n String O5a = \"O5a\";\n String O5b = \"O5b\";\n String O5c = \"O5c\";\n String O5d = \"O5d\";\n String O5e = \"O5e\";\n String P = \"P\";\n\n String P1 = \"P1\";\n String P1a = \"P1a\";\n String P1b = \"P1b\";\n String P1c = \"P1c\";\n String P1d = \"P1d\";\n String P1e = \"P1e\";\n String P2 = \"P2\";\n String P2a = \"P2a\";\n String P2b = \"P2b\";\n String P2c = \"P2c\";\n String P2d = \"P2d\";\n String P2e = \"P2e\";\n String P3 = \"P3\";\n String P3a = \"P3a\";\n String P3b = \"P3b\";\n String P3c = \"P3c\";\n String P3d = \"P3d\";\n String P3e = \"P3e\";\n String P4 = \"P4\";\n String P5 = \"P5\";\n\n String Q1 = \"Q1\";\n String Q1a = \"Q1a\";\n String Q1b = \"Q1b\";\n String Q1c = \"Q1c\";\n String Q1d = \"Q1d\";\n String Q1e = \"Q1e\";\n String Q2 = \"Q2\";\n String Q2a = \"Q2a\";\n String Q2b = \"Q2b\";\n String Q2c = \"Q2c\";\n String Q2d = \"Q2d\";\n String Q2e = \"Q2e\";\n String Q3 = \"Q3\";\n String Q3a = \"Q3a\";\n String Q3b = \"Q3b\";\n String Q3c = \"Q3c\";\n String Q3d = \"Q3d\";\n String Q3e = \"Q3e\";\n String Q4 = \"Q4\";\n String Q4a = \"Q4a\";\n String Q4b = \"Q4b\";\n String Q4c = \"Q4c\";\n String Q4d = \"Q4d\";\n String Q4e = \"Q4e\";\n String Q5 = \"Q5\";\n String R = \"R\";\n String R1 = \"R1\";\n String R1a = \"R1a\";\n String R1b = \"R1b\";\n String R1c = \"R1c\";\n String R1d = \"R1d\";\n String R1e = \"R1e\";\n String R2 = \"R2\";\n String R2a = \"R2a\";\n String R2b = \"R2b\";\n String R2c = \"R2c\";\n String R2d = \"R2d\";\n String R2e = \"R2e\";\n String R3 = \"R3\";\n String R3a = \"R3a\";\n String R3b = \"R3b\";\n String R3c = \"R3c\";\n String R3d = \"R3d\";\n String R3e = \"R3e\";\n String R4 = \"R4\";\n String R4a = \"R4a\";\n String R4b = \"R4b\";\n String R4c = \"R4c\";\n String R4d = \"R4d\";\n String R4e = \"R4e\";\n String R5 = \"R5\";\n String R5a = \"R5a\";\n String R5b = \"R5b\";\n String R5c = \"R5c\";\n String R5d = \"R5d\";\n String R5e = \"R5e\";\n String S = \"S\";\n String S1 = \"S1\";\n String S2 = \"S2\";\n String S2a = \"S2a\";\n String S2b = \"S2b\";\n String S2c = \"S2c\";\n String S2d = \"S2d\";\n String S2e = \"S2e\";\n String S3 = \"S3\";\n String S3a = \"S3a\";\n String S3b = \"S3b\";\n String S3c = \"S3c\";\n String S3d = \"S3d\";\n String S3e = \"S3e\";\n String S4 = \"S4\";\n String S4a = \"S4a\";\n String S4b = \"S4b\";\n String S4c = \"S4c\";\n String S4d = \"S4d\";\n String S4e = \"S4e\";\n String S5 = \"S5\";\n String S5a = \"S5a\";\n String S5b = \"S5b\";\n String S5c = \"S5c\";\n String S5d = \"S5d\";\n String S5e = \"S5e\";\n\n String T = \"T\";\n String T1 = \"T1\";\n String T2 = \"T2\";\n String T3 = \"T3\";\n String T3a = \"T3a\";\n String T3b = \"T3b\";\n String T3c = \"T3c\";\n String T3d = \"T3d\";\n String T3e = \"T3e\";\n String T4 = \"T4\";\n String T4a = \"T4a\";\n String T4b = \"T4b\";\n String T4c = \"T4c\";\n String T4d = \"T4d\";\n String T4e = \"T4e\";\n String T5 = \"T5\";\n String T5a = \"T5a\";\n String T5b = \"T5b\";\n String T5c = \"T5c\";\n String T5d = \"T5d\";\n String T5e = \"T5e\";\n\n String U = \"U\";\n String U1 = \"U1\";\n String U1a = \"U1a\";\n String U1b = \"U1b\";\n String U1c = \"U1c\";\n String U1d = \"U1d\";\n String U1e = \"U1e\";\n String U2 = \"U2\";\n String U3 = \"U3\";\n String U4 = \"U4\";\n String U4a = \"U4a\";\n String U4b = \"U4b\";\n String U4c = \"U4c\";\n String U4d = \"U4d\";\n String U4e = \"U4e\";\n String U5 = \"U5\";\n String U5a = \"U5a\";\n String U5b = \"U5b\";\n String U5c = \"U5c\";\n String U5d = \"U5d\";\n String U5e = \"U5e\";\n String V = \"V\";\n\n String V1 = \"V1\";\n String V1a = \"V1a\";\n String V1b = \"V1b\";\n String V1c = \"V1c\";\n String V1d = \"V1d\";\n String V1e = \"V1e\";\n String V2 = \"V2\";\n String V2a = \"V2a\";\n String V2b = \"V2b\";\n String V2c = \"V2c\";\n String V2d = \"V2d\";\n String V2e = \"V2e\";\n String V3 = \"V3\";\n String V4 = \"V4\";\n String V5 = \"V5\";\n String V5a = \"V5a\";\n String V5b = \"V5b\";\n String V5c = \"V5c\";\n String V5d = \"V5d\";\n String V5e = \"V5e\";\n String W = \"W\";\n\n String W1 = \"W1\";\n String W1a = \"W1a\";\n String W1b = \"W1b\";\n String W1c = \"W1c\";\n String W1d = \"W1d\";\n String W1e = \"W1e\";\n String W2 = \"W2\";\n String W2a = \"W2a\";\n String W2b = \"W2b\";\n String W2c = \"W2c\";\n String W2d = \"W2d\";\n String W2e = \"W2e\";\n String W3 = \"W3\";\n String W3a = \"W3a\";\n String W3b = \"W3b\";\n String W3c = \"W3c\";\n String W3d = \"W3d\";\n String W3e = \"W3e\";\n String W4 = \"W4\";\n String W5 = \"W5\";\n\n String X1 = \"X1\";\n String X1a = \"X1a\";\n String X1b = \"X1b\";\n String X1c = \"X1c\";\n String X1d = \"X1d\";\n String X1e = \"X1e\";\n String X2 = \"X2\";\n String X2a = \"X2a\";\n String X2b = \"X2b\";\n String X2c = \"X2c\";\n String X2d = \"X2d\";\n String X2e = \"X2e\";\n String X3 = \"X3\";\n String X3a = \"X3a\";\n String X3b = \"X3b\";\n String X3c = \"X3c\";\n String X3d = \"X3d\";\n String X3e = \"X3e\";\n String X4 = \"X4\";\n String X4a = \"X4a\";\n String X4b = \"X4b\";\n String X4c = \"X4c\";\n String X4d = \"X4d\";\n String X4e = \"X4e\";\n String X5 = \"X5\";\n String Y = \"Y\";\n String Y1 = \"Y1\";\n String Y1a = \"Y1a\";\n String Y1b = \"Y1b\";\n String Y1c = \"Y1c\";\n String Y1d = \"Y1d\";\n String Y1e = \"Y1e\";\n String Y2 = \"Y2\";\n String Y2a = \"Y2a\";\n String Y2b = \"Y2b\";\n String Y2c = \"Y2c\";\n String Y2d = \"Y2d\";\n String Y2e = \"Y2e\";\n String Y3 = \"Y3\";\n String Y3a = \"Y3a\";\n String Y3b = \"Y3b\";\n String Y3c = \"Y3c\";\n String Y3d = \"Y3d\";\n String Y3e = \"Y3e\";\n String Y4 = \"Y4\";\n String Y4a = \"Y4a\";\n String Y4b = \"Y4b\";\n String Y4c = \"Y4c\";\n String Y4d = \"Y4d\";\n String Y4e = \"Y4e\";\n String Y5 = \"Y5\";\n String Y5a = \"Y5a\";\n String Y5b = \"Y5b\";\n String Y5c = \"Y5c\";\n String Y5d = \"Y5d\";\n String Y5e = \"Y5e\";\n String Z = \"Z\";\n String Z1 = \"Z1\";\n String Z2 = \"Z2\";\n String Z2a = \"Z2a\";\n String Z2b = \"Z2b\";\n String Z2c = \"Z2c\";\n String Z2d = \"Z2d\";\n String Z2e = \"Z2e\";\n String Z3 = \"Z3\";\n String Z3a = \"Z3a\";\n String Z3b = \"Z3b\";\n String Z3c = \"Z3c\";\n String Z3d = \"Z3d\";\n String Z3e = \"Z3e\";\n String Z4 = \"Z4\";\n String Z4a = \"Z4a\";\n String Z4b = \"Z4b\";\n String Z4c = \"Z4c\";\n String Z4d = \"Z4d\";\n String Z4e = \"Z4e\";\n String Z5 = \"Z5\";\n String Z5a = \"Z5a\";\n String Z5b = \"Z5b\";\n String Z5c = \"Z5c\";\n String Z5d = \"Z5d\";\n String Z5e = \"Z5e\";\n}", "@Test\n public void saConstruction() {\n String text = \"BAAAAB0ABAAAAB1BABA2ABA3AAB4BBBB5BB\";\n\n SuffixArray sa1 = new SuffixArraySlow(text);\n SuffixArray sa2 = new SuffixArrayMed(text);\n SuffixArray sa3 = new SuffixArrayFast(text);\n SuffixArray[] suffixArrays = {sa1, sa2, sa3};\n\n for (int i = 0; i < suffixArrays.length; i++) {\n for (int j = i + 1; j < suffixArrays.length; j++) {\n SuffixArray s1 = suffixArrays[i];\n SuffixArray s2 = suffixArrays[j];\n for (int k = 0; k < s1.getSa().length; k++) {\n assertThat(s1.getSa()[k]).isEqualTo(s2.getSa()[k]);\n }\n }\n }\n }", "@Test\n public void aminoCountsTest1(){\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(a);\n int[] expected = {1,3,1};\n assertArrayEquals(expected, first.aminoAcidCounts());\n }", "public String getTranslation()\n {\n StringBuilder aminoAcid = new StringBuilder();\n Map<String, String> codToAa = Map.ofEntries(\n entry(\"ATA\", \"I\"), entry(\"ATC\", \"I\"), entry(\"ATT\", \"I\"), entry(\"ATG\", \"M\"),\n entry(\"ACA\", \"T\"), entry(\"ACC\", \"T\"), entry(\"ACG\", \"T\"), entry(\"ACT\", \"T\"),\n entry(\"AAC\", \"N\"), entry(\"AAT\", \"N\"), entry(\"AAA\", \"K\"), entry(\"AAG\", \"K\"),\n entry(\"AGC\", \"S\"), entry(\"AGT\", \"S\"), entry(\"AGA\", \"R\"), entry(\"AGG\", \"R\"),\n entry(\"CTA\", \"L\"), entry(\"CTC\", \"L\"), entry(\"CTG\", \"L\"), entry(\"CTT\", \"L\"),\n entry(\"CCA\", \"P\"), entry(\"CCC\", \"P\"), entry(\"CCG\", \"P\"), entry(\"CCT\", \"P\"),\n entry(\"CAC\", \"H\"), entry(\"CAT\", \"H\"), entry(\"CAA\", \"Q\"), entry(\"CAG\", \"Q\"),\n entry(\"CGA\", \"R\"), entry(\"CGC\", \"R\"), entry(\"CGG\", \"R\"), entry(\"CGT\", \"R\"),\n entry(\"GTA\", \"V\"), entry(\"GTC\", \"V\"), entry(\"GTG\", \"V\"), entry(\"GTT\", \"V\"),\n entry(\"GCA\", \"A\"), entry(\"GCC\", \"A\"), entry(\"GCG\", \"A\"), entry(\"GCT\", \"A\"),\n entry(\"GAC\", \"D\"), entry(\"GAT\", \"D\"), entry(\"GAA\", \"E\"), entry(\"GAG\", \"E\"),\n entry(\"GGA\", \"G\"), entry(\"GGC\", \"G\"), entry(\"GGG\", \"G\"), entry(\"GGT\", \"G\"),\n entry(\"TCA\", \"S\"), entry(\"TCC\", \"S\"), entry(\"TCG\", \"S\"), entry(\"TCT\", \"S\"),\n entry(\"TTC\", \"F\"), entry(\"TTT\", \"F\"), entry(\"TTA\", \"L\"), entry(\"TTG\", \"L\"),\n entry(\"TAC\", \"Y\"), entry(\"TAT\", \"Y\"), entry(\"TAA\", \"_\"), entry(\"TAG\", \"_\"),\n entry(\"TGC\", \"C\"), entry(\"TGT\", \"C\"), entry(\"TGA\", \"_\"), entry(\"TGG\", \"W\")\n );\n try\n {\n for (int i = 0; i < this.sequence.length(); i += 3)\n {\n aminoAcid.append(codToAa.get(this.sequence.substring(i, i + 3)));\n }\n }\n catch (StringIndexOutOfBoundsException ignored)\n {\n }\n return aminoAcid.toString();\n }", "private String[] fixStringArray(String[] input) {\n\n List<String> loutput = new ArrayList<String>();\n\n for (String st : input) {\n if (!\"\".equalsIgnoreCase(st)) {\n loutput.add(st);\n }\n }\n String[] output = new String[loutput.size()];\n for (int i = 0; i < loutput.size(); i++) {\n output[i] = loutput.get(i);\n }\n return output;\n }", "public static String[] AUTOtoTags(String str){\n return Configuration.auto_type.equals(AUTO_TYPE.CANDC) ? AUTOtoIndex(str, 4) : AUTOtoIndex(str, 2);\n }", "static void codonfreq(String s) {\n int[] fromNuc = new int[128];\r\n for (int i = 0; i < fromNuc.length; i++)\r\n fromNuc[i] = -1;\r\n fromNuc['a'] = fromNuc['A'] = 0;\r\n fromNuc['c'] = fromNuc['C'] = 1;\r\n fromNuc['g'] = fromNuc['G'] = 2;\r\n fromNuc['t'] = fromNuc['T'] = 3;\r\n // Count frequencies of codons (triples of nucleotides)\r\n int[][][] freq = new int[4][4][4];\r\n for (int i = 0; i + 2 < s.length(); i += 3) {\r\n int nuc1 = fromNuc[s.charAt(i)];\r\n int nuc2 = fromNuc[s.charAt(i + 1)];\r\n int nuc3 = fromNuc[s.charAt(i + 2)];\r\n freq[nuc1][nuc2][nuc3] += 1;\r\n }\r\n // The translation from index 0123 to nucleotide ACGT\r\n final char[] toNuc = {'A', 'C', 'G', 'T'};\r\n for (int i = 0; i < 4; i++)\r\n for (int j = 0; j < 4; j++) {\r\n for (int k = 0; k < 4; k++)\r\n System.out.print(\" \" + toNuc[i] + toNuc[j] + toNuc[k]\r\n + \": \" + freq[i][j][k]);\r\n System.out.println();\r\n }\r\n }", "public void generate(int SubLen){\n\t\tint carry; //Indicates\n\t\tint[] indices = new int[SubLen]; //array of matching index to available chars\n\t\tholder = new char[SubLen]; //temp char array for motif\n\t\t\n\t\tdo{\n\t\t\tint stringIndex = 0; //initialize index in holder\n\t\t\tfor(int index: indices){ //for each index in indices\n\t\t\t\tholder[stringIndex] = available[index]; //current holder index of motif equals library at index\n\t\t\t\tstringIndex++; //increment index of holder\n\t\t\t}\n\t\t\tallDna.add(new String(holder)); //add the new motif\n\t\t\t\n\t\t\tcarry = 1; //set as needs to increment\n\t\t\t\n\t\t\t//loops through each char position of motif\n\t\t\t//Increase by one each time then break\n\t\t\t//UNLESS: hit 't' then increase next significant index and reset current indexes to 'a'\n\t\t\tfor(int i = indices.length -1; i >=0;i--){ //for each index going backwards\n\t\t\t\t\n\t\t\t\t//If index -1 does not need to be incremented break out of for loop\n\t\t\t\tif(carry == 0){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//else increase Index by one\n\t\t\t\tindices[i] += carry;\n\t\t\t\tcarry = 0; //set as has been increased\n\t\t\t\t\n\t\t\t\t//If you were on 't' increment index -1 and reset current index\n\t\t\t\tif(indices[i] == available.length){\n\t\t\t\t\tcarry = 1; //set to needs increase\n\t\t\t\t\tindices[i] = 0; //set current index back to 'a'\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}\n\t\twhile(carry != 1); // continue until index 0 is 't'\n\t}", "public static void main(String[] args) {\n\t\tString str = \"Nitin\";\n\t\tSystem.out.println(str.indexOf(\"i\"));\n\t\tSystem.out.println(str.substring(0,3));\n\t\tboolean s =str.endsWith(\"i\");\n\t\tSystem.out.println(s);\n\t\t//change to char array\n\t\tchar[] arr = str.toCharArray();\n\t\t//intialize another array of same length\n\t\tchar[] arr_new = new char[str.length()];\n\t\t//now reverse the string and store into new array\n\t\tint j = 0;\n\t\tfor(int i =str.length()-1;i>=0;i--) {\n\t\t\tarr_new[j++] = arr[i];\n\t\t\t\n\t\t}\n\t\t//now convert the new array into String\n\t\tString str_new = new String(arr_new);\n\t\t\n\t\t//Logic to compare the strings\n\t\tif(str.equalsIgnoreCase(str_new)) {\n\t\t\tSystem.out.print(\"Anagram\" + str);}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"Not Anagram\" + str);\n\t\t\t\t\n\t\t\t}\n\t\t}", "private void handleNonFrameShiftCaseStartsWithStopCodon() {\n\t\t\tif (varAAStopPos == 0) {\n\t\t\t\t// varAA starts with a stop codon\n\t\t\t\tproteinChange = ProteinMiscChange.build(true, ProteinMiscChangeType.NO_CHANGE);\n\t\t\t\tvarTypes.add(VariantEffect.SYNONYMOUS_VARIANT);\n\t\t\t} else if (varAAStopPos > 0) {\n\t\t\t\t// varAA contains a stop codon\n\t\t\t\tproteinChange = ProteinExtension.build(true, \"*\", aaChange.getPos(),\n\t\t\t\t\ttoString(varAASeq.charAt(aaChange.getPos())), (varAAStopPos - aaChange.getPos()));\n\t\t\t\t// last is stop codon AA pos\n\t\t\t\tvarTypes.add(VariantEffect.STOP_LOST);\n\t\t\t} else {\n\t\t\t\t// varAA contains no stop codon\n\t\t\t\tproteinChange = ProteinExtension.buildWithoutTerminal(true, toString(wtAASeq.charAt(aaChange.getPos())),\n\t\t\t\t\taaChange.getPos(), toString(varAASeq.charAt(aaChange.getPos())));\n\t\t\t\tvarTypes.add(VariantEffect.STOP_LOST);\n\t\t\t}\n\t\t}", "public String guessSequenceType(final String seq) {\n\n\t int canonicalNucStates = 0;\n\t int undeterminedStates = 0;\n\t // true length, excluding any gaps\n\t int sequenceLength = seq.length();\n\t final int seqLen = sequenceLength;\n\n\t boolean onlyValidNucleotides = true;\n\t boolean onlyValidAminoAcids = true;\n\n\t // do not use toCharArray: it allocates an array size of sequence\n\t for(int k = 0; (k < seqLen) && (onlyValidNucleotides || onlyValidAminoAcids); ++k) {\n\t final char c = seq.charAt(k);\n\t final boolean isNucState = (\"ACGTUXNacgtuxn?_-\".indexOf(c) > -1);\n\t final boolean isAminoState = true;\n\n\t onlyValidNucleotides &= isNucState;\n\t onlyValidAminoAcids &= isAminoState;\n\n\t if (onlyValidNucleotides) {\n\t assert(isNucState);\n\t if ((\"ACGTacgt\".indexOf(c) > -1)) {\n\t ++canonicalNucStates;\n\t } else {\n\t if ((\"?_-\".indexOf(c) > -1)) {\n\t --sequenceLength;\n\t } else if( (\"UXNuxn\".indexOf(c) > -1)) {\n\t ++undeterminedStates;\n\t }\n\t }\n\t }\n\t }\n\n\t String result = \"aminoacid\";\n\t if (onlyValidNucleotides) { // only nucleotide states\n\t // All sites are nucleotides (actual or ambigoues). If longer than 100 sites, declare it a nuc\n\t if( sequenceLength >= 100 ) {\n\t result = \"nucleotide\";\n\t } else {\n\t // if short, ask for 70% of ACGT or N\n\t final double threshold = 0.7;\n\t final int nucStates = canonicalNucStates + undeterminedStates;\n\t // note: This implicitely assumes that every valid nucleotide\n\t // symbol is also a valid amino acid. This is true since we\n\t // added support for the 21st amino acid, U (Selenocysteine)\n\t // in AminoAcids.java.\n\t result = nucStates >= sequenceLength * threshold ? \"nucleotide\" : \"aminoacid\";\n\t }\n\t } else if (onlyValidAminoAcids) {\n\t result = \"aminoacid\";\n\t } else {\n\t result = null;\n\t }\n\t return result;\n\t }", "public static String[] AUTOtoCATS(String str){\n return AUTOtoIndex(str, 1);\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 }", "public static void main(String[] args) {\n \tString s = \"[94,93,95,92,94,96,94,93,93,93,95,97,97,95,95,92,94,94,94,92,94,94,96,98,98,96,98,96,94,94,96,91,91,93,95,93,95,95,95,91,93,93,95,95,93,97,97,97,97,97,99,95,97,97,99,95,97,93,95,null,95,95,95,90,92,90,92,92,94,94,96,94,null,96,94,94,94,96,null,90,92,null,null,94,null,94,96,null,null,null,null,96,null,null,null,96,98,96,96,96,96,100,100,94,94,98,96,96,96,98,100,94,96,98,98,94,94,94,96,null,null,94,96,94,94,89,91,null,93,91,91,91,91,null,91,null,null,null,null,null,null,93,95,95,95,93,95,null,null,95,93,null,null,null,null,null,93,null,95,93,95,null,97,95,97,95,95,97,99,97,97,null,97,95,null,95,97,101,101,99,99,95,null,93,null,97,99,95,97,97,97,95,95,99,97,101,99,93,93,95,97,97,99,99,null,null,null,null,95,95,95,97,95,null,null,95,null,null,95,null,null,88,88,92,null,null,94,90,92,92,92,90,90,90,92,90,92,null,null,null,94,94,96,null,null,null,94,null,null,null,null,94,null,null,null,94,null,null,null,96,null,96,96,94,94,null,null,null,96,96,94,96,96,100,100,96,98,96,96,null,96,94,null,94,96,null,null,100,102,100,null,null,100,98,98,94,96,92,94,96,98,98,98,94,94,96,98,96,98,96,98,null,96,96,94,98,98,96,98,100,102,98,null,92,94,92,94,96,null,null,null,96,98,98,100,100,100,94,96,94,null,null,96,96,98,null,null,null,null,96,94,null,null,87,89,91,null,null,null,89,89,null,91,93,93,null,93,89,91,89,91,91,89,93,null,91,null,null,null,null,93,null,null,null,null,null,null,null,null,null,null,null,null,null,95,97,null,95,null,null,95,95,97,95,97,95,null,95,95,97,97,101,101,101,101,95,95,97,99,95,null,95,97,97,null,95,null,93,95,null,null,null,null,101,103,99,null,null,101,null,null,null,null,null,93,97,97,null,91,null,95,97,97,97,null,97,null,97,99,95,95,93,null,null,97,97,null,95,null,null,99,95,97,97,99,95,97,95,97,93,95,99,97,97,99,95,97,97,99,99,99,101,101,null,99,91,null,null,null,null,null,null,93,null,97,95,95,97,null,97,97,101,99,null,99,99,null,null,null,97,97,null,null,null,null,97,97,null,null,null,95,null,null,null,null,null,null,null,null,null,null,null,null,92,null,null,null,null,null,null,94,88,null,null,null,90,90,null,null,null,null,88,88,null,null,null,90,null,null,null,null,null,null,null,null,96,96,96,96,96,96,96,94,null,null,96,96,94,null,94,96,96,null,98,96,100,102,null,null,102,102,null,100,94,96,94,null,96,98,98,null,94,96,96,null,98,null,null,null,96,94,null,null,null,94,null,null,null,104,null,100,null,102,null,null,96,96,96,96,null,92,null,96,null,96,null,null,96,null,null,null,null,null,98,null,null,null,94,94,null,null,null,98,null,96,null,null,100,null,96,96,96,98,96,98,98,100,94,null,null,null,null,null,null,98,94,92,96,96,null,100,96,null,98,null,98,100,94,94,96,98,null,96,98,100,98,98,100,100,102,100,100,null,null,null,null,92,92,null,null,null,96,94,null,96,98,98,96,98,96,null,102,null,98,null,null,null,100,100,null,null,null,null,96,98,96,98,null,94,null,null,95,null,87,null,null,91,91,91,87,null,null,89,91,null,null,null,null,null,null,null,null,null,97,95,95,97,null,null,null,null,97,95,null,null,93,null,95,93,null,null,95,null,97,99,95,95,99,null,null,103,101,null,null,103,null,99,95,95,null,95,95,93,null,97,null,null,null,null,93,95,95,97,null,null,null,null,97,null,null,null,null,null,null,null,101,null,101,103,97,97,95,null,null,null,null,97,null,null,95,null,null,null,null,97,null,null,93,93,null,null,97,null,null,null,99,null,95,95,null,null,97,95,null,null,95,null,97,null,97,99,99,null,null,null,null,99,93,95,91,93,97,97,95,95,101,99,null,null,null,null,99,null,null,null,93,null,93,95,97,95,97,99,95,95,97,99,99,101,97,null,null,99,99,99,null,null,103,103,101,101,null,101,null,93,null,91,null,95,null,95,null,97,99,99,97,99,97,97,97,null,95,95,null,null,null,97,101,99,99,101,null,null,null,null,95,null,null,null,93,null,null,null,null,88,null,null,null,null,null,null,null,null,88,null,90,92,null,null,94,96,null,null,96,96,98,null,96,96,null,null,94,96,92,null,94,null,96,98,100,100,null,96,94,null,null,null,102,null,null,null,null,102,null,null,94,94,94,96,null,96,null,null,92,94,96,null,94,null,94,94,null,96,null,98,null,null,null,100,100,102,null,null,98,null,96,98,null,null,null,null,null,null,null,null,94,94,null,94,null,null,null,null,94,96,96,96,96,96,null,96,null,null,96,96,98,98,null,100,98,100,null,null,null,94,94,96,92,92,92,94,null,98,null,98,94,96,94,96,null,null,null,100,null,null,92,null,92,94,null,96,98,96,96,null,98,98,98,null,96,null,96,96,null,null,null,100,98,null,null,100,96,98,null,null,98,98,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,96,96,98,null,null,100,100,96,98,100,98,null,null,96,98,98,98,96,null,94,null,null,null,null,100,98,null,100,null,null,102,null,null,null,null,null,null,87,null,null,null,null,null,95,95,null,97,null,null,null,97,97,null,95,97,95,97,95,null,null,null,null,null,null,null,95,null,null,null,null,null,null,101,97,null,93,null,null,null,null,103,null,null,95,null,95,93,95,95,95,null,null,93,null,93,null,null,null,null,95,95,null,null,95,97,97,99,null,null,null,null,103,null,null,null,95,95,99,null,93,null,null,null,null,null,93,95,97,95,95,97,null,97,97,null,95,null,null,null,null,null,95,97,99,97,97,99,null,null,99,97,101,null,95,null,null,93,97,97,91,93,91,93,93,91,93,93,null,null,99,97,93,93,95,97,93,null,null,95,null,null,null,93,91,93,95,95,95,97,null,null,null,null,null,null,99,null,null,null,null,null,97,null,95,null,null,null,null,null,99,null,null,null,95,95,null,97,97,null,99,99,95,null,null,null,null,null,null,101,99,null,95,95,null,null,null,null,97,99,null,95,99,null,97,null,null,null,97,null,null,null,101,null,99,null,null,null,103,null,null,null,null,null,94,94,null,null,null,null,null,98,94,94,null,null,null,null,96,null,96,null,null,96,null,102,null,98,null,null,null,null,null,null,null,null,94,94,null,94,96,94,null,null,null,null,null,null,null,94,94,null,null,null,null,null,null,null,null,100,null,null,96,94,null,96,null,null,null,null,94,null,null,null,null,96,null,null,94,null,null,96,null,null,96,null,null,null,null,null,96,null,null,null,96,96,null,98,null,null,98,null,null,null,null,102,null,null,92,94,96,null,96,96,null,90,null,null,92,92,null,92,92,null,null,92,null,92,94,92,null,100,96,null,94,null,null,94,96,null,98,null,92,94,94,96,null,null,92,90,null,null,94,null,94,96,94,96,98,96,null,null,null,null,94,96,null,null,94,null,94,94,null,null,null,98,98,null,null,100,null,null,null,102,null,null,96,null,null,96,null,null,null,null,96,null,100,null,null,null,null,null,null,102,null,null,104,104,null,null,null,null,null,97,null,95,95,null,95,97,null,null,95,null,null,103,null,97,95,95,null,null,93,93,null,null,null,95,null,null,null,93,null,null,97,null,93,null,null,null,null,null,95,null,null,null,null,null,null,null,95,97,95,null,95,null,97,99,null,null,null,null,91,93,null,95,null,null,null,97,95,null,89,null,null,91,null,null,null,null,null,null,null,null,91,null,93,95,93,91,null,null,95,null,93,null,95,null,null,null,null,null,null,93,null,null,null,95,null,null,null,null,89,null,null,95,null,null,95,null,95,93,null,null,null,97,95,null,null,null,95,null,null,null,null,95,null,95,99,null,97,null,null,null,null,103,95,null,95,null,null,97,null,null,null,null,null,null,null,null,null,null,null,96,94,null,null,null,98,null,null,null,104,null,null,null,null,null,null,null,null,null,94,94,null,null,null,94,null,98,94,null,null,96,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,94,null,null,null,null,null,null,null,null,null,92,null,null,null,null,94,null,94,null,92,null,94,92,94,94,96,94,92,null,null,null,null,94,94,null,null,96,null,92,null,96,null,null,null,null,null,null,null,94,null,null,null,96,null,null,102,null,null,null,null,null,null,null,null,null,null,null,null,null,null,93,null,93,null,null,null,99,null,null,null,null,null,null,null,null,null,null,null,null,null,null,91,null,null,null,91,null,null,null,null,null,97,null,null,null,91,null,95,null,null,null,null,null,null,null,97,null,null,null,null,101,null,94,null,null,null,null,null,null,92,null,null,null,96,null,null,94,null,null,96,null,null,93,null,null,null,null,null,null,null,97]\";\r\n\t\tTreeNode one = TreeNode.str2tree(s);\r\n \tFindDuplicateSubtrees3 findDuplicateSubtrees = new FindDuplicateSubtrees3();\r\n\t\tList<TreeNode> result = findDuplicateSubtrees.findDuplicateSubtrees(one);\r\n\t\tfor (TreeNode treeNode : result) {\r\n\t\t\tSystem.out.println(treeNode);\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\n\n String str = \"ABAB\";\n // index number:123\n\n\n String result = \"\"; // \"CD\" We store expected result\n\n for(int i=0; i <= str.length()-1 ; i++){ // 0 , 1, 2 ,3\n /*\n if( !result.contains( \"\"+str.charAt(i)) ) {\n result += str.charAt(i);\n }\n */\n\n if(result.contains( \"\"+str.charAt(i) )){// is in the index number\n continue;// if the string result does not contains str.charAt(i), then we concate it to the result,\n // if it does we will not concate it to the result\n }\n\n result += str.charAt(i);\n\n }\n\n System.out.println(result);\n\n\n\n\n\n\n\n\n }", "@Test\n public void getExtracpy() {\n String input = \"A303:C203:\";\n boolean expected = true;\n boolean output = true;\n String[] input1 = input.split(\":\");\n String[] expectedarray = {\"A303\",\"C203\"};\n\n for (int i = 0; i < input1.length; i++) {\n if(!input1[i].equals(expectedarray[i]))\n {\n output = false;\n break;\n }\n }\n assertEquals(expected,output);\n\n }", "public static void main(String[] args) {\n\r\n\t\tString str = \"ACCAATGTAGATATCATACTCTCTTGCTATGTTCGTTACATGCCCAA\";\r\n\t\t\r\n\t\tint i = 0;\r\n\t\tint AT = 0;\r\n\t\tint CG = 1;\r\n\t\t\r\n\t\twhile (i < str.length()){\r\n\t\t\tif (str.charAt(i) == 'A' && str.charAt(i) == 'T'){\r\n\t\t//\t\tstr.indexOf(A) == \"0\";\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(str);\r\n\t\t\r\n\t}", "public static int Main()\n\t{\n\t\tint len;\n\t\tint i;\n\t\tint j;\n\t\tint p;\n\t\tint l;\n\t\tMain_str = new Scanner(System.in).nextLine();\n\t\tfor (len = 0;Main_str.charAt(len) != '\\0';len++)\n\t\t{\n\t\t\t;\n\t\t}\n\t\tfor (l = 2;l <= len;l++)\n\t\t{\n\t\t\tfor (i = 0;i <= len - l;i++)\n\t\t\t{\n\t\t\t\tfor (j = 0;j < l / 2;j++)\n\t\t\t\t{\n\t\t\t\t\tif (Main_str.charAt(i + j) != Main_str.charAt(i + l - 1 - j))\n\t\t\t\t\t{\n//C++ TO JAVA CONVERTER TODO TASK: There are no gotos or labels in Java:\n\t\t\t\t\t\tgoto here;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\tfor (p = i;p < i + l;p++)\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.printf(\"%c\",Main_str.charAt(p));\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.print(\"\\n\");\n//C++ TO JAVA CONVERTER TODO TASK: There are no gotos or labels in Java:\n\t\t\t\t\there:\n\t\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\treturn 0;\n\t}", "int[] prefix_suffix_tabble(String pattern){\n\n // ABAB\n int[] table = pattern.length;\n\n int M = pattern.length();\n int i=0;\n int j=1;\n\n table[0] = 0;\n\n while(j<M){\n if(pattern.charAt(i) == pattern.charAt(j)){\n table[j] = i+1;\n i++;\n j++;\n }\n else{ // charAt(i) != charAt(j)\n\n\n if(i==0){ // cant go to previous, so just set it to 0 and move on. Almost our base case\n table[j] = 0;\n j++;\n continue;\n }\n\n // set i to the value of the previous and keep doing it\n int valueAtPrevious = table[i-1];\n i = valueAtPrevious;\n }\n }\n return table;\n // ith index indicates a prefix that is also a suffix from 0 including i. Cant be the whole String\n\n\n }", "public static void main(String[] args) throws IOException{\n BufferedReader f = new BufferedReader(new InputStreamReader(System.in));\n PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));\n int T = Integer.parseInt(f.readLine());\n for(int t = 0; t < T; t++) {\n char[] s = f.readLine().toCharArray();\n boolean[] used = new boolean[26];\n StringBuilder sb = new StringBuilder();\n boolean valid = true;\n used[s[0]-'a'] = true;\n sb.append(s[0]);\n int index = 0;\n for(int i = 1; i < s.length; i++) {\n if(used[s[i]-'a']) {\n if(index > 0 && sb.charAt(index-1) == s[i]) {\n index--;\n } else if(index+1 < sb.length() && sb.charAt(index+1) == s[i]) {\n index++;\n } else {\n valid = false;\n break;\n }\n } else {\n if(index == 0) {\n sb.insert(0, s[i]);\n } else if(index+1 == sb.length()) {\n sb.append(s[i]);\n index++;\n } else {\n valid = false;\n break;\n }\n used[s[i]-'a'] = true;\n }\n }\n for(int i = 0; i < 26; i++) {\n if(!used[i]) {\n sb.append((char) (i+'a'));\n }\n }\n out.println(valid ? \"YES\" : \"NO\");\n if(valid) {\n out.println(sb);\n }\n }\n f.close();\n out.close();\n }", "public static void main(String[] args) {\n\n\t\t\n\t\tString a = \"9B768C\";\n\t\tString c = \"\";\n\t\tint leng = a.length();\n\t\tString array[] = new String[leng];\n\t\t\n\t\tfor(int i = 0 ; i<leng; i++) {\n\t\t\tarray[i]= a.substring(i,i+1);\n\t\t\tSystem.out.println(c += array[i]);\n\t\t}\n\t\n\t\t\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 }", "public String[] createAlignmentStrings(List<CigarElement> cigar, String refSeq, String obsSeq, int totalReads) {\n\t\tStringBuilder aln1 = new StringBuilder(\"\");\n\t\tStringBuilder aln2 = new StringBuilder(\"\");\n\t\tint pos1 = 0;\n\t\tint pos2 = 0;\n\t\t\n\t\tfor (int i=0;i<cigar.size();i++) {\n\t\t//for (CigarElement ce: cigar) {\n\t\t\tCigarElement ce = cigar.get(i);\n\t\t\tint cel = ce.getLength();\n\n\t\t\tswitch(ce.getOperator()) {\n\t\t\t\tcase M:\n\t\t\t\t\taln1.append(refSeq.substring(pos1, pos1+cel));\n\t\t\t\t\taln2.append(obsSeq.substring(pos2, pos2+cel));\n\t\t\t\t\tpos1 += cel;\n\t\t\t\t\tpos2 += cel;\n\t\t\t\t\tbreak;\n\t\t\t\tcase N:\n\t\t\t\t\taln1.append(this.createString('-', cel));\n\t\t\t\t\taln2.append(this.createString('-', cel));\n\t\t\t\t\tpos1 += cel;\n\t\t\t\t\tbreak;\n\t\t\t\tcase S:\n\t\t\t\t\taln1.append(this.createString('S', cel));\n\t\t\t\t\taln2.append(this.createString('S', cel));\n\t\t\t\t\tpos2 += cel;\n\t\t\t\t\tbreak;\n\t\t\t\tcase I:\n\t\t\t\t\taln1.append(this.createString('-', cel));\n\t\t\t\t\taln2.append(obsSeq.substring(pos2, pos2+cel));\n\t\t\t\t\tpos2 += cel;\n\t\t\t\t\tbreak;\n\t\t\t\tcase D:\n\t\t\t\t\tif (i < cigar.size()-1) { \n\t\t\t\t\t\taln1.append(refSeq.substring(pos1, pos1+cel));\n\t\t\t\t\t\taln2.append(this.createString('-', cel));\n\t\t\t\t\t\tpos1 += cel;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase H:\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tSystem.out.println(String.format(\"Don't know how to handle this CIGAR tag: %s. Record %d\",ce.getOperator().toString(),totalReads));\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn new String[]{aln1.toString(),aln2.toString()};\n\t\t\n\t}", "public String aminoToRandomTriplets(String ss)\n\t\t{\n\t\tStringBuilder sb=new StringBuilder();\n\t\tfor(int i=0;i<ss.length();i++)\n\t\t\t{\n\t\t\tString a=\"\"+ss.charAt(i);\n\t\t\tLinkedList<String> list=aminoToDNA.get(a);\n\t\t\tif(list==null)\n\t\t\t\tthrow new RuntimeException(\"Unknown amino acid \"+a);\n\t\t\tsb.append(list.get((int)(Math.random()*list.size())));\n\t\t\t}\n\t\treturn sb.toString();\n\t\t}", "public static void main(String args[]) {\n\n // aacd(1,1,3,4) amd(1,13,4) kcd(11,3,4)\n // Note : 1,1,34 is not valid as we don't have values corresponding\n // to 34 in alphabet\n int[] arr = {1, 1, 3, 4};\n printAllInterpretations(arr);\n\n // aaa(1,1,1) ak(1,11) ka(11,1)\n int[] arr2 = {1, 1, 1};\n printAllInterpretations(arr2);\n\n // bf(2,6) z(26)\n int[] arr3 = {2, 6};\n printAllInterpretations(arr3);\n\n // ab(1,2), l(12)\n int[] arr4 = {1, 2};\n printAllInterpretations(arr4);\n\n // a(1,0} j(10)\n int[] arr5 = {1, 0};\n printAllInterpretations(arr5);\n\n // \"\" empty string output as array is empty\n int[] arr6 = {};\n printAllInterpretations(arr6);\n\n // abba abu ava lba lu\n int[] arr7 = {1, 2, 2, 1};\n printAllInterpretations(arr7);\n }", "private static void incode_output(String[] input) throws IOException {\n int i = 0;\n while (i<input.length){\n //get the opcode and parameter modes\n String opcode_parameter = input[i];\n int opcode=0;\n int mode_1st_parameter = 0;\n int mode_2st_parameter = 0;\n int mode_3st_parameter = 0;\n if (opcode_parameter.length() !=1){\n opcode = Integer.parseInt(opcode_parameter.substring(opcode_parameter.length()-2));\n //have to check the length of the string before processing to avoid exceptions\n if (opcode_parameter.length() >=3){\n mode_1st_parameter = Integer.parseInt(opcode_parameter.substring(opcode_parameter.length()-3,opcode_parameter.length()-2));\n }\n if (opcode_parameter.length() >=4){\n mode_2st_parameter = Integer.parseInt(opcode_parameter.substring(opcode_parameter.length()-4,opcode_parameter.length()-3));\n }\n if (opcode_parameter.length() >=5){\n mode_3st_parameter = Integer.parseInt(opcode_parameter.substring(opcode_parameter.length()-5,opcode_parameter.length()-4));\n }\n }\n else {\n opcode = Integer.parseInt(opcode_parameter);\n\n }\n //if opcode is 99 the loop breaks and the processing is finished\n if(opcode == 99){\n break;\n }\n int value1=0;\n int value1_location =0 ;\n int value2=0;\n int value2_location =0 ;\n int return_location =0 ;\n int return_value=0;\n //getting the 1st value and the 2nd value according to the opcode and the modes\n if ((opcode >= 1 && opcode <= 2) || (opcode >= 5 && opcode <=8)){\n if (mode_1st_parameter == 0){\n value1_location = Integer.parseInt(input[i+1]);\n value1 = Integer.parseInt(input[value1_location]);\n }\n else{\n value1_location = i+1;\n value1 = Integer.parseInt(input[value1_location]);\n }\n }\n \n if ((opcode >=1 && opcode <=2)|| (opcode >= 5 && opcode <=8)){\n if (mode_2st_parameter == 0){\n value2_location = Integer.parseInt(input[i+2]);\n value2 = Integer.parseInt(input[value2_location]);\n }\n else{\n value2_location = i+2;\n value2 = Integer.parseInt(input[value2_location]);\n }\n }\n // calculating the result value according to the opcode\n if (opcode == 1){\n \n return_value = value1+value2;\n \n }\n else if (opcode == 2){\n return_value = value1*value2;\n\n }\n else if (opcode == 3){\n //opcode 3 requires the user to input a system ID according to the chcallenge\n print(\"opcode require input please enter the correct value\");\n BufferedReader reader =\n new BufferedReader(new InputStreamReader(System.in));\n String input_value = reader.readLine();\n // inserting the return value in the correct location according to the return location\n if (mode_1st_parameter == 0){\n return_location = Integer.parseInt(input[i+1]);\n input[return_location] = input_value;\n }\n else{\n return_location = i+1;\n input[return_location] = input_value;\n }\n\n }\n else if (opcode == 4){\n //mode 4 outputs the result of a certain test or the result of the full opcode\n if (mode_1st_parameter == 0){\n return_location = Integer.parseInt(input[i+1]);\n print(\"output: \"+ input[return_location]);\n }\n else{\n return_location = i+1;\n print(\"output: \"+ input[return_location]);\n }\n }\n //opcode 5 and 6 has the possibility to minpulate the loop counter \n //therefore it can skip the remaining code in the loop if the counter is minpulated\n else if (opcode == 5){\n if (value1 != 0 ){\n i = value2;\n continue;\n }\n }\n else if (opcode == 6){\n if (value1 ==0){\n i=value2;\n continue;\n }\n }\n else if (opcode == 7){\n if (value1 <value2){\n return_value=1;\n }\n else{\n return_value=0;\n }\n }\n else if (opcode == 8){\n if (value1==value2){\n return_value=1;\n }\n else{\n return_value=0;\n }\n }\n // inserting the return value according to the return location, opcode and mode of the parameter\n if ((opcode >=1 && opcode <=2)|| (opcode >=7 && opcode <=8)){\n if (mode_3st_parameter == 0){\n return_location = Integer.parseInt(input[i+3]);\n input[return_location] = String.valueOf(return_value);\n }\n else{\n return_location = i+3;\n input[return_location] = String.valueOf(return_value);\n }\n } \n //incrementing the loop counter according to the opcode\n if ((opcode >=1 && opcode <=2)|| (opcode >=7 && opcode <=8)){\n i = i+4;\n\n }\n else if (opcode == 5 || opcode == 6){\n i=i+3;\n }\n else{\n i=i+2;\n }\n }\n }", "public static void main(String[] args) {\nScanner sc=new Scanner(System.in);\r\nString input1=sc.nextLine();\r\ninput1=input1.toLowerCase();\r\nint l=input1.length();\r\nchar a[]=input1.toCharArray();\r\nint d[]=new int[1000];\r\nString str=\"\";\r\nint i=0,k1=0,k2=0,m=0,c1=0,c2=0,c3=0,l1=0,u=0,u1=0;\r\nchar b[]={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};\r\nfor(i=0;i<l;i++)\r\n{ c3=0;\r\n\tif(a[i]==' ')\r\n\t{u=i;c3=0;\r\n\t\tfor(k1=u1,k2=i-1;k1<k2 && k2>k1;k1++,k2--)\r\n\t\t{ c1=0;c2=0;\r\n\t\t\tfor(m=0;m<26;m++)\r\n\t\t\t{\r\n\t\t\t\tif(b[m]==a[k1]) {\r\n\t\t\t\tc1=m+1;}\t\r\n\t\t\t\tif(b[m]==a[k2]) {\r\n\t\t\t\t\tc2=m+1;}\t\r\n\t\t\t}\r\n\t\t\tc3=c3+Math.abs(c1-c2);\r\n\t\t}\r\n\t\tif(k1==k2) {\r\n\t\t\tfor(m=0;m<26;m++) {\r\n\t\t\t\tif(b[m]==a[k1])\r\n\t\t\t\t\tc3=c3+(m+1);\r\n\t\t\t }\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\td[l1]=c3;\r\n\t\tl1++;\r\n\t\tu1=i+1;\r\n\t\tc3=0;\r\n\t}\r\n\tif(i==l-1)\r\n\t{\r\n\t\tfor(k1=u+1,k2=i;k1<k2 && k2>k1;k1++,k2--)\r\n\t\t{ c1=0;c2=0;\r\n\t\t\tfor(m=0;m<26;m++)\r\n\t\t\t{\r\n\t\t\t\tif(b[m]==a[k1]) {\r\n\t\t\t\tc1=m+1;}\t\r\n\t\t\t\tif(b[m]==a[k2]) {\r\n\t\t\t\t\tc2=m+1;}\t\r\n\t\t\t}\r\n\t\t\tc3=c3+Math.abs(c1-c2);\r\n\t\t}\r\n\t\tif(k1==k2) {\r\n\t\t\tfor(m=0;m<26;m++) {\r\n\t\t\t\tif(b[m]==a[k1])\r\n\t\t\t\t\tc3=c3+(m+1);\r\n\t\t\t }\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\td[l1]=c3;\r\n\t\tl1++;\r\n\t\tk1=i+1;\r\n\t}\r\n}\r\n\r\n for(i=0;i<l1;i++)\r\n {\r\n\t str=str+Integer.toString(d[i]);\r\n }\r\n int ans=Integer.parseInt(str);\r\n System.out.print(ans);\r\n}", "public List<String> findRepeatedDnaSequences(String s) {\n if(s.length() < 10) return new ArrayList<String>();\n \n int[] map = new int[256];\n map['A'] = 0;\n map['T'] = 1;\n map['C'] = 2;\n map['G'] = 3;\n \n List<String> result = new ArrayList<String>();\n \n //this set contains string that occurs before\n Set<Integer> visited = new HashSet<Integer>();\n //this set contains string that we have inserted into result\n Set<Integer> inResult = new HashSet<Integer>();\n \n int key = 0;\n \n //Since we only partially modify the key, we need to firstly initialize it\n for(int i = 0; i < 9; i++){\n key <<= 2;\n key |= map[s.charAt(i)];\n }\n \n for(int i = 9; i < s.length(); i++){\n key <<= 2;\n key |= map[s.charAt(i)];\n //our valid key has 20 digits, we use 0xFFFFF to remove digits that beyong this range\n key &= 0xFFFFF;\n \n String temp = s.substring(i - 9, i+1);\n \n //if this is not the first time we visit this substring\n if(!visited.add(key)){\n //if this is the first time we add this substring into result\n if(inResult.add(key)){\n result.add(temp);\n }\n }\n }\n \n return result;\n }", "@Test\r\n public void testTokenize() {\n String code = \"METAR KTTN 051853Z 04011KT 1 1/2SM VCTS SN FZFG BKN003 OVC010 M02/M02 A3006 RMK AO2 TSB40 SLP176 P0002 T10171017=\";\r\n String[] tokens = { \"METAR\", \"KTTN\", \"051853Z\", \"04011KT\", \"1 1/2SM\", \"VCTS\", \"SN\", \"FZFG\", \"BKN003\", \"OVC010\", \"M02/M02\", \"A3006\", \"RMK\", \"AO2\", \"TSB40\", \"SLP176\", \"P0002\", \"T10171017=\" };\r\n // WHEN tokenizing the string\r\n String[] result = getSut().tokenize(code);\r\n // THEN the visibility part is 1 1/2SM\r\n assertNotNull(result);\r\n assertArrayEquals(tokens, result);\r\n\r\n }", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int t = sc.nextInt();\n for(int ii=0;ii<t;ii++){\n String str = sc.next();\n int sa[] = getSuffixArray(str);\n int lcp[] = getLCP(sa,str);\n int n = str.length();\n long range[] = new long[n];\n for(int i=0;i<n;i++){\n long len = (long)(n-sa[i]);\n range[i] = (long)(len*(len+1)/2)-(long)(lcp[i]*(lcp[i]+1)/2);\n }\n long k = sc.nextLong();\n for(int i=0;i<n;i++){\n int s = sa[i];\n int lc = lcp[i];\n if(range[i]>=k){\n int len = 1+lc;\n while(k>len){\n k -= len;\n len++;\n }\n System.out.println(str.charAt(s+(int)k-1));\n break;\n }\n else\n k -= range[i];\n }\n }\n }", "public static void main(String[] args) {\nScanner sc=new Scanner(System.in);\r\nString s=sc.nextLine();\r\nchar c[]=s.toCharArray();\r\nint flag=0;\r\nfor(int i=0;i<c.length;i++)\r\n{ for(int j=i+1;j<c.length;j++)\r\n\tif(c[i]==c[j])\r\n\t\tflag=1;\r\n\telse\r\n\tcontinue;\r\n}\r\nif(flag==1)\r\n\tSystem.out.println(\"No\");\r\nelse\r\n\tSystem.out.println(\"Yes\");\r\n\t}", "public static String translateSequence(String sequence, TranslationTable translationTable,\n\t\t\tboolean includeStop, boolean translateThroughStop) {\n//\t\tif (sequence.length() % 3 != 0) {\n//\t\t\tthrow new GBOLUtilException(\"Sequence to be translated must have length of factor of 3\");\n//\t\t}\n\t\tStringBuilder buffer = new StringBuilder();\n\t\tint stopCodonCount = 0;\n\t\tfor (int i = 0; i + 3 <= sequence.length(); i += 3) {\n\t\t\tString codon = sequence.substring(i, i + 3);\n\t\t\tString aminoAcid = translationTable.translateCodon(codon);\n\t\t\tif (aminoAcid.equals(TranslationTable.STOP)) {\n\t\t\t\tif (includeStop) {\n\t\t\t\t\tbuffer.append(aminoAcid);\n\t\t\t\t}\n\t\t\t\tif (!translateThroughStop) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (++stopCodonCount > 1) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tbuffer.append(aminoAcid);\n\t\t\t}\n\t\t}\n\t\treturn buffer.toString();\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tString a = \"KOITT\";\r\n\t\tString b = \"Apple\";\r\n\t\tString c = \"Car\";\r\n\t\t\r\n\t\tchar tmp = a.charAt(0);\r\n\t\tchar tmp2 = a.charAt(1);\r\n\t\tchar tmp3 = c.charAt(2);\r\n\t\tchar tmp4 = b.charAt(4);\r\n\t\tchar tmp5 = b.charAt(0);\r\n\r\n\t\t\r\n\t\tchar result [] = {tmp,tmp2,tmp3,tmp4,tmp5};\r\n\t\tSystem.out.print(result);\r\n\t\tSystem.out.println(tmp);\r\n\t\t//int []result = tmp[i]; \r\n\t\t\r\n\t\t\r\n\t}", "public int[] contarCodons(String seq){\n int [] countCodons=new int[65];\n for (int i=0;i<seq.length()-2;i=i+3){\n String c=seq.substring(i, i+3);\n int j=0;\n while (j<nameCodon.length && nameCodon[j].compareTo(c)!=0) j++;\n if (j<nameCodon.length)\n countCodons[j]++;\n else\n countCodons[64]++;\n }\n return countCodons;\n\n }", "public static int[] suffixArray(CharSequence S) {\n int n = S.length();\n Integer[] order = new Integer[n];\n for (int i = 0; i < n; i++)\n order[i] = n - 1 - i;\n\n // stable sort of characters\n Arrays.sort(order, (a, b) -> Character.compare(S.charAt(a), S.charAt(b)));\n\n int[] sa = new int[n];\n int[] classes = new int[n];\n for (int i = 0; i < n; i++) {\n sa[i] = order[i];\n classes[i] = S.charAt(i);\n }\n // sa[i] - suffix on i'th position after sorting by first len characters\n // classes[i] - equivalence class of the i'th suffix after sorting by\n // first len characters\n\n for (int len = 1; len < n; len *= 2) {\n int[] c = classes.clone();\n for (int i = 0; i < n; i++) {\n // condition sa[i - 1] + len < n simulates 0-symbol at the end\n // of the string\n // a separate class is created for each suffix followed by\n // simulated 0-symbol\n classes[sa[i]] = i > 0 && c[sa[i - 1]] == c[sa[i]] && sa[i - 1] + len < n\n && c[sa[i - 1] + len / 2] == c[sa[i] + len / 2] ? classes[sa[i - 1]] : i;\n }\n // Suffixes are already sorted by first len characters\n // Now sort suffixes by first len * 2 characters\n int[] cnt = new int[n];\n for (int i = 0; i < n; i++)\n cnt[i] = i;\n int[] s = sa.clone();\n for (int i = 0; i < n; i++) {\n // s[i] - order of suffixes sorted by first len characters\n // (s[i] - len) - order of suffixes sorted only by second len\n // characters\n int s1 = s[i] - len;\n // sort only suffixes of length > len, others are already sorted\n if (s1 >= 0)\n sa[cnt[classes[s1]]++] = s1;\n }\n }\n return sa;\n }", "public List<String> findRepeatedDnaSequences(String s){\n HashMap<Character,Integer> map=new HashMap<>();\n Set<Integer> firstSet=new HashSet<>();\n Set<Integer> dupSet=new HashSet<>();\n List<String> res=new ArrayList<>();\n map.put('A',0);\n map.put('C',1);\n map.put('G',2);\n map.put('T',3);\n char[] chars=s.toCharArray();\n for(int i=0;i<chars.length-9;i++){\n int v=0;\n for(int j=i;j<i+10;j++){\n v<<=2;\n v|=map.get(chars[j]);\n }\n if(!firstSet.add(v)&&dupSet.add(v)){\n res.add(s.substring(i,i+10));\n }\n }\n return res;\n }", "@Test\n public void testTokenize() {\n String code = \"METAR KTTN 051853Z 04011KT 1 1/2SM VCTS SN FZFG BKN003 OVC010 M02/M02 A3006 RMK AO2 TSB40 SLP176 P0002 T10171017=\";\n String[] tokens = { \"METAR\", \"KTTN\", \"051853Z\", \"04011KT\", \"1 1/2SM\", \"VCTS\", \"SN\", \"FZFG\", \"BKN003\", \"OVC010\", \"M02/M02\", \"A3006\", \"RMK\", \"AO2\", \"TSB40\", \"SLP176\", \"P0002\", \"T10171017\" };\n // WHEN tokenizing the string\n String[] result = getParser().tokenize(code);\n // THEN the visibility part is 1 1/2SM\n assertNotNull(result);\n assertArrayEquals(tokens, result);\n\n }", "public static void main(String[] args) {\n\t\t\n\t\tint lengthOfCurrent = 0;\n\t\tSystem.out.println(\"Enter the string.\");\n\t\tString input = IO.readString();\n\t\tSystem.out.println(input);\n\t\tchar[] cArray = input.toCharArray();\n\t\tint uniqueCharacters = getNumUniqueCharacters(cArray);\n\t\tint index = 0;\n\t\tString[] letters = new String[uniqueCharacters];\n\t\t\n\t\tif(input.length() > 1){\n\t\t\tfor(int i = 0; i < input.length(); i++){\n\t\t\t\tif(i == 0){\n\t\t\t\t\tletters[index] = Character.toString(cArray[i]);\n\t\t\t\t\tindex++;\n\t\t\t\t\t//System.out.println(letters[index]);\n\t\t\t\t}\n\t\t\t\telse if(cArray[i] != cArray[i-1]){\n\t\t\t\t\tletters[index] = Character.toString(cArray[i]);\n\t\t\t\t\tindex++;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor(int i = 0; i < letters.length; i++){\n\t\t\tSystem.out.println(letters[i]);\n\t\t}\n\t\t\n\t}", "public List<String> findRepeatedDnaSequences(String s) {\n if (s == null) return null;\n HashSet<String> result = new HashSet<String>();\n HashSet<Integer> set = new HashSet<Integer>();\n for (int i = 0; i < s.length() - 9; ++i) {\n String seq = s.substring(i, i + 10);\n int code = encode(seq);\n if (!set.contains(code)) {\n set.add(code);\n } else {\n result.add(seq);\n }\n }\n return new ArrayList<String>(result);\n }", "public static void main (String[] args) throws java.lang.Exception\n {\n \n Scanner sc = new Scanner(System.in);\n \n \n int arraySize = sc.nextInt();\n int[] numberArray = new int[arraySize];\n \n for(int i=0;i<arraySize;i++){\n numberArray[i] = sc.nextInt(); \n //System.out.println(numberArray[i]);\n }\n \n int currentStart = 0;\n int j = 0;\n int nextStart = 0;\n int maxLengthBio = 0;\n int finalStartIndex = 0;\n int finalEndIndex = 0;\n \n // Checking for the longest increasing subsequence\n while(currentStart < arraySize-1){\n\n \n while(j < arraySize-1 && numberArray[j] < numberArray[j+1]){\n j++;\n }\n \n //System.out.println(\"Current Start Index reached=\"+j);\n \n while(j < arraySize-1 && numberArray[j] >= numberArray[j+1]){\n \n if(numberArray[j] >= numberArray[j+1])\n nextStart = j+1;\n j++;\n \n }\n //System.out.println(\"Current End Index reached=\"+j);\n \n if((j - currentStart + 1) >= maxLengthBio){\n finalStartIndex = currentStart;\n finalEndIndex = j;\n }\n \n currentStart = nextStart;\n //j = nextStart;\n \n //System.out.println(\"j at end=\"+currentStart);\n \n }\n \n for(int i=finalStartIndex;i<finalEndIndex;i++){\n System.out.print(numberArray[i]+\" \");\n }\n \n }", "private void generateAutomaton() {\n /**\n * Chars in the positions:\n * 0 -> \"-\"\n * 1 -> \"+\"\n * 2 -> \"/\"\n * 3 -> \"*\"\n * 4 -> \")\"\n * 5 -> \"(\"\n * 6 -> \"=\"\n * 7 -> \";\"\n * 8 -> [0-9]\n * 9 -> [A-Za-z]\n * 10 -> skip (\"\\n\", \"\\r\", \" \", \"\\t\")\n * 11 -> other symbols\n */\n\n automaton = new State[][]{\n /* DEAD */ {State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD},\n /* START */ {State.SUB, State.PLUS, State.DIV, State.MUL, State.RPAR, State.LPAR, State.EQ, State.SMICOLON, State.INT, State.VAR, State.DEAD, State.DEAD},\n /* SUB */ {State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD},\n /* PLUS */ {State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD},\n /* DIV */ {State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD},\n /* MUL */ {State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD},\n /* RPAR */ {State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD},\n /* LPAR */ {State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD},\n /* EQ */ {State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD},\n /* SMICOLON */ {State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD},\n /* INT */ {State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.INT, State.DEAD, State.DEAD, State.DEAD},\n /* VAR */ {State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.VAR, State.VAR, State.DEAD, State.DEAD}\n };\n }", "@Test\n void labTask() {\n String s = \"abczefoh\";\n List<String> result = StringSplitter.labTask(s);\n\n String first = result.get(0);\n assertEquals(3, first.length());\n assertEquals('a', first.charAt(0));\n assertFalse(\"abc\".contains(String.valueOf(first.charAt(1))));\n assertEquals('c', first.charAt(2));\n\n String second = result.get(1);\n assertEquals(2, second.length());\n assertEquals('o', second.charAt(0));\n assertFalse(\"oh\".contains(String.valueOf(second.charAt(1))));\n\n String third = result.get(2);\n assertEquals(3, third.length());\n assertEquals('z', third.charAt(0));\n assertFalse(\"zef\".contains(String.valueOf(second.charAt(1))));\n assertEquals('f', third.charAt(2));\n }", "@Test\n\tpublic void testRealWorldCase_uc011ayb_2() throws InvalidGenomeChange {\n\t\tthis.builderForward = TranscriptModelFactory\n\t\t\t\t.parseKnownGenesLine(\n\t\t\t\t\t\trefDict,\n\t\t\t\t\t\t\"uc011ayb.2\tchr3\t+\t37034840\t37092337\t37055968\t37092144\t18\t37034840,37042445,37045891,37048481,37050304,37053310,37053501,37055922,37058996,37061800,37067127,37070274,37081676,37083758,37089009,37090007,37090394,37091976,\t37035154,37042544,37045965,37048554,37050396,37053353,37053590,37056035,37059090,37061954,37067498,37070423,37081785,37083822,37089174,37090100,37090508,37092337,\tNP_001245203\tuc011ayb.2\");\n\t\tthis.builderForward\n\t\t.setSequence(\"gaagagacccagcaacccacagagttgagaaatttgactggcattcaagctgtccaatcaatagctgccgctgaagggtggggctggatggcgtaagctacagctgaaggaagaacgtgagcacgaggcactgaggtgattggctgaaggcacttccgttgagcatctagacgtttccttggctcttctggcgccaaaatgtcgttcgtggcaggggttattcggcggctggacgagacagtggtgaaccgcatcgcggcgggggaagttatccagcggccagctaatgctatcaaagagatgattgagaactgaaagaagatctggatattgtatgtgaaaggttcactactagtaaactgcagtcctttgaggatttagccagtatttctacctatggctttcgaggtgaggctttggccagcataagccatgtggctcatgttactattacaacgaaaacagctgatggaaagtgtgcatacagagcaagttactcagatggaaaactgaaagcccctcctaaaccatgtgctggcaatcaagggacccagatcacggtggaggaccttttttacaacatagccacgaggagaaaagctttaaaaaatccaagtgaagaatatgggaaaattttggaagttgttggcaggtattcagtacacaatgcaggcattagtttctcagttaaaaaacaaggagagacagtagctgatgttaggacactacccaatgcctcaaccgtggacaatattcgctccatctttggaaatgctgttagtcgagaactgatagaaattggatgtgaggataaaaccctagccttcaaaatgaatggttacatatccaatgcaaactactcagtgaagaagtgcatcttcttactcttcatcaaccatcgtctggtagaatcaacttccttgagaaaagccatagaaacagtgtatgcagcctatttgcccaaaaacacacacccattcctgtacctcagtttagaaatcagtccccagaatgtggatgttaatgtgcaccccacaaagcatgaagttcacttcctgcacgaggagagcatcctggagcgggtgcagcagcacatcgagagcaagctcctgggctccaattcctccaggatgtacttcacccagactttgctaccaggacttgctggcccctctggggagatggttaaatccacaacaagtctgacctcgtcttctacttctggaagtagtgataaggtctatgcccaccagatggttcgtacagattcccgggaacagaagcttgatgcatttctgcagcctctgagcaaacccctgtccagtcagccccaggccattgtcacagaggataagacagatatttctagtggcagggctaggcagcaagatgaggagatgcttgaactcccagcccctgctgaagtggctgccaaaaatcagagcttggagggggatacaacaaaggggacttcagaaatgtcagagaagagaggacctacttccagcaaccccagaaagagacatcgggaagattctgatgtggaaatggtggaagatgattcccgaaaggaaatgactgcagcttgtaccccccggagaaggatcattaacctcactagtgttttgagtctccaggaagaaattaatgagcagggacatgaggttctccgggagatgttgcataaccactccttcgtgggctgtgtgaatcctcagtgggccttggcacagcatcaaaccaagttataccttctcaacaccaccaagcttagtgaagaactgttctaccagatactcatttatgattttgccaattttggtgttctcaggttatcggagccagcaccgctctttgaccttgccatgcttgccttagatagtccagagagtggctggacagaggaagatggtcccaaagaaggacttgctgaatacattgttgagtttctgaagaagaaggctgagatgcttgcagactatttctctttggaaattgatgaggaagggaacctgattggattaccccttctgattgacaactatgtgccccctttggagggactgcctatcttcattcttcgactagccactgaggtgaattgggacgaagaaaaggaatgttttgaaagcctcagtaaagaatgcgctatgttctattccatccggaagcagtacatatctgaggagtcgaccctctcaggccagcagagtgaagtgcctggctccattccaaactcctggaagtggactgtggaacacattgtctataaagccttgcgctcacacattctgcctcctaaacatttcacagaagatggaaatatcctgcagcttgctaacctgcctgatctatacaaagtctttgagaggtgttaaatatggttatttatgcactgtgggatgtgttcttctttctctgtattccgatacaaagtgttgtatcaaagtgtgatatacaaagtgtaccaacataagtgttggtagcacttaagacttatacttgccttctgatagtattcctttatacacagtggattgattataaataaatagatgtgtcttaacataaaaaaaaaaaaaaaaaa\"\n\t\t\t\t.toUpperCase());\n\t\tthis.builderForward.setGeneSymbol(\"NP_001245203\");\n\t\tthis.infoForward = builderForward.build();\n\t\t// RefSeq NM_001258273\n\n\t\tGenomeChange change1 = new GenomeChange(new GenomePosition(refDict, '+', 3, 37090097, PositionType.ONE_BASED),\n\t\t\t\t\"TGAGG\", \"C\");\n\t\tAnnotation annotation1 = new BlockSubstitutionAnnotationBuilder(infoForward, change1).build();\n\t\tAssert.assertEquals(infoForward.accession, annotation1.transcript.accession);\n\t\tAssert.assertEquals(AnnotationLocation.INVALID_RANK, annotation1.annoLoc.rank);\n\t\tAssert.assertEquals(\"c.1263_1266+1delinsC\", annotation1.ntHGVSDescription);\n\t\tAssert.assertEquals(\"p.Glu422del\", annotation1.aaHGVSDescription);\n\t\tAssert.assertEquals(ImmutableSortedSet.of(VariantType.NON_FS_SUBSTITUTION, VariantType.SPLICE_DONOR),\n\t\t\t\tannotation1.effects);\n\t}", "long part2(long[] input) {\n\t\tString[] inarr = { //\n\t\t\t\t\"A,B,A,B,C,C,B,C,B,A\", //\n\t\t\t\t\"R,12,L,8,R,12\", //\n\t\t\t\t\"R,8,R,6,R,6,R,8\", //\n\t\t\t\t\"R,8,L,8,R,8,R,4,R,4\"//\n\t\t};\n\t\tinput[0] = 2;\n\t\tIntCode ic = new IntCode();\n\t\tic.setStack(input);\n\t\tint state = ic.execIO();\n\t\tint inArrI = 0;\n\t\tint inArrJ = 0;\n\t\tboolean observing = false;\n\t\twhile (state != IntCode._STATE_HALT) {\n\t\t\tif (observing) {\n\t\t\t\tic.setInput(10);\n\t\t\t\tList<Long> out = ic.getAndResetOutput();\n\t\t\t\tprintGrid(longListToGrid(out));\n\t\t\t} else if (inArrI >= inarr.length) {\n\t\t\t\tic.setInput((int) 'n');\n\t\t\t\tstate = ic.execIO();\n\t\t\t\tic.setInput(10);\n\t\t\t\tstate = ic.execIO();\n\t\t\t\tbreak;\n//\t\t\t\tobserving = true;\n\t\t\t} else if (inArrJ >= inarr[inArrI].length()) {\n\t\t\t\tic.setInput(10);\n\t\t\t\tinArrI++;\n\t\t\t\tinArrJ = 0;\n\t\t\t} else {\n\t\t\t\tic.setInput((int) inarr[inArrI].charAt(inArrJ++));\n\t\t\t}\n\t\t\tstate = ic.execIO();\n\t\t}\n\t\tList<Long> out = ic.getOutputList();\n\t\treturn out.get(out.size() - 1);\n\t}", "private static char[] input(String string) {\n\t\tchar[] result = new char[4];\n\t\tfor (int i = 0; i < 4; i++)\n\t\t\tresult[i] = string.charAt(i);\n\t\treturn result;\n\t}", "public static void main(String[] args) {\n\n\t\t\n\t\tList<Character>st1=new ArrayList<>();\n\t\n\t\tst1.add('a');\n\t\tst1.add('b');\n\t\tst1.add('a');\n\t\tst1.add('a');\n\t\tst1.add('c');\n\t\tst1.add('t');\n\t\n\t\tSystem.out.println(st1);//[a, b, a, a, c, t]\n\t\t\n\t\tList<Character>st2=new ArrayList<>();//empty []\n\t\tfor (int i=0; i<st1.size();i++) {\n\t\t\tif(!st2.contains(st1.get(i))) {\n\t\t\t\t// created str2 [empty], we will get the element from st1 to st2 while checking if there is repetition \n\t\t\t\tst2.add(st1.get(i));\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(st2);//[a, b, c, t]\n\t\t\n\n\t}", "private void findSuits(){\r\n //index keeps track of temp index location in iteration\r\n int index = 0;\r\n\r\n //temp will hold the new array\r\n char[] temp = new char[5];\r\n\r\n //for loop checks handstr for the different suits and if they are there puts them into array\r\n for (int i = 0; i < handStr.length(); i++){\r\n\r\n if(handStr.charAt(i) == 'C' || handStr.charAt(i) == 'D'\r\n || handStr.charAt(i) == 'S' || handStr.charAt(i) == 'H'){\r\n temp[index] = handStr.charAt(i);\r\n index++;\r\n }\r\n }\r\n\r\n setSuitArr(temp);\r\n\r\n }", "static String isValid(String s){\n // Complete this function\n int[] charArray = new int[26];\n for(int i=0;i<26;i++){\n charArray[i] = 0;\n }\n for(int i=0;i<s.length();i++){\n int index = s.charAt(i) - 'a';\n charArray[index]++;\n }\n boolean oneDelete = false;\n //int prevValue = charArray[0];\n //System.out.println(\"a\" + \": \" + charArray[0]);\n /*for(int i=1;i<26;i++){\n System.out.println((char) (i+'a') + \": \" + charArray[i] + \" \" + \"prevValue\" + \": \" + prevValue);\n \n if(charArray[i] !=0 && prevValue!= 0 && charArray[i] != prevValue){\n if(oneDelete){\n return \"NO\";\n }else{\n if(Math.abs(charArray[i] - prevValue) != 1){\n return \"NO\";\n }else{\n oneDelete = true;\n }\n }\n }\n if(charArray[i] !=0){\n prevValue = charArray[i]; \n }\n }*/\n HashMap<Integer,Integer> frequencyCount = new HashMap<>();\n for(int i=0;i<26;i++){\n if(charArray[i] !=0){\n if(!frequencyCount.containsKey(charArray[i])){\n frequencyCount.put(charArray[i],1);\n }else{\n int count =frequencyCount.get(charArray[i]);\n frequencyCount.put(charArray[i],count+1);\n }\n }\n }\n \n if(frequencyCount.size() > 2){\n return \"NO\";\n }else if(frequencyCount.size() == 2){\n if(frequencyCount.containsKey(1) && frequencyCount.get(1) == 1){\n return \"YES\";\n }\n if(isConsecutiveFrequencies(frequencyCount)){\n return \"YES\";\n }else{\n return \"NO\";\n }\n }else{\n return \"YES\"; \n }\n \n \n }", "private boolean comparacionOblicuaID(String[] dna) {\n boolean repetir;\n int aux = 0;\n final int CASO = 3;\n int largo = dna.length - CASO - 1;\n int repaso = 1, fila,columna;\n do {\n do {\n repetir = true;\n if (repaso == 1) {\n fila = 0;\n columna = largo - aux;\n } else {\n fila = largo - aux;\n columna = 0;\n }\n for (int i = 0; i <= (CASO + aux); i += 2) {\n int colum = columna + i;\n int fil = fila + i;\n if ((colum) == (fil) && repaso == 1) {\n repetir = false; break;\n }\n if (((dna.length-CASO)>=colum && repaso==1) || ((dna.length-CASO)>=fil && repaso==0)) {\n if (dna[fil].charAt(colum) == dna[fil + 2].charAt(colum + 2)) {\n if (dna[fil].charAt(colum) == dna[fil + 1].charAt(colum + 1)) {\n if (((fil - 1) >= 0 && (colum - 1) >= 0) && (dna[fil].charAt(colum) == dna[fil - 1].charAt(colum - 1))) {\n cantidadSec++;\n if(cantidadSec>1)return true;\n if (colum == fil) repetir = false;\n break;\n } else {\n if (((dna.length - CASO+1) >= (colum + 3) && repaso == 1) || ((dna.length-1) >= (fil + 3) && repaso == 0)) {\n if ((dna[fil].charAt(colum) == dna[fil + 3].charAt(colum + 3))) {\n cantidadSec++;\n if(cantidadSec>1)return true;\n if (colum == fil) repetir = false;\n break;\n }\n }\n }\n }\n }\n } else {\n if (colum == fil) repetir = false;\n }\n }\n aux++;\n } while (repetir);\n repaso--;\n aux = 0;\n } while (repaso >= 0);\n return false;\n }", "private static String[] resetStringArray() {\n String[] st = new String[L_MAX];\n L = 2 << 8;\n W = 9;\n int i;\n // initialize symbol table with all 1-character strings\n for (i = 0; i < R; i++)\n st[i] = \"\" + (char) i;\n st[i++] = \"\"; // (unused) lookahead for EOF\n return st;\n }", "private boolean handleInsertionAtEndInCaseOfNoStopCodon() {\n\t\t\t// TODO(holtgrew): At some point, try to merge these corner cases that are caused by bogus transcript\n\t\t\t// entries into the main cases or decide to ignore these bad cases.\n\n\t\t\t// Return false if this is not the case this function deals with.\n\t\t\tif (varAAInsertPos != wtAASeq.length() || wtAAStopPos != -1)\n\t\t\t\treturn false;\n\n\t\t\t// TODO(holtgrew): Check for duplication? This is a very rare corner case with bogus transcript.\n\t\t\t// TODO(holtgrew): This is wrong.\n\t\t\tproteinChange = ProteinInsertion.buildWithSequence(true, toString(wtAASeq.charAt(varAAInsertPos - 1)),\n\t\t\t\tvarAAInsertPos, toString(wtAASeq.charAt(varAAInsertPos - 1)), varAAInsertPos,\n\t\t\t\tvarAASeq.substring(varAAInsertPos - 1, varAASeq.length()));\n\t\t\tif (varAAStopPos != -1)\n\t\t\t\tvarTypes.add(VariantEffect.STOP_GAINED);\n\t\t\tvarTypes.add(VariantEffect.INFRAME_INSERTION);\n\n\t\t\treturn true;\n\t\t}", "@Test\n void cleanText02() {\n String responseCasing = \"CAPS\";\n String[] responseCasingClean = {\"caps\"};\n List<String> cleaned = preprocessor.cleanText(responseCasing);\n assertArrayEquals(responseCasingClean, cleaned.toArray());\n }", "public static void main (String[] args) throws java.lang.Exception\n\t{\n\t\tScanner s = new Scanner(System.in);\n\t\tString s1=\"wipro\";\n\t\tString s2=\"technologies\";\n\t\tint i,j,temp;\n\t int a = s.nextInt();\n\t char[] c = s1.toCharArray();\n\t char[] d = s2.toCharArray();\n\t if(a==1)\n\t {\n\t \tfor(i=0;i<c.length;i++)\n\t \t{\n\t \t\tfor(j=0;j<d.length||j<c.length;j++)\n\t \t\t{\n\t \t\t\tif(c[i]==d[j])\n\t \t\t\t{\n\t \t\t\t\tSystem.out.println(c[i]);\n\t \t\t\t\tc[i]+='A'-'a';\n\t \t\t\t\td[j]+='A'-'a';\n\t \t\t\t\t\n\t \t\t\t\t\n\t \t\t\t}\n\t \t\t}\n\t \t}\n\t }\n\t \n\t else if(a==0)\n\t {\n\t \tfor(i=0;i<c.length;i++)\n\t \t{\n\t \t\tfor(j=0;j<d.length||j<c.length;j++)\n\t \t\t{\n\t \t\t\tif(c[i]!=d[j])\n\t \t\t\t{\n\t \t\t\t c[i]+='A'-'a';\n\t \t\t\t \n\t \t\t\t}\n\n\t \t\t}\n\t \t}\n\t for(i=0;i<d.length;i++)\n\t {\n\t \tfor(j=0;j<c.length;j++)\n\t \t\t{\n\t \t\t\tif(d[i]!=c[j])\n\t \t\t\t{\n\t \t\t\t d[i]+='A'-'a';\n\t \t\t\t \n\t \t\t\t}\n\n\t \t\t}\n\t \t}\n\t \t\n\t }\n\telse\n\t{\n\tSystem.out.println(\"no accepted value\");\n\t}\n\t \n\t \tSystem.out.print(c);\n\t \n\t \n\t \n\t \tSystem.out.print(d);\n\t \n\t}", "private String[] condicionGeneral(String condicion) {\n String retorno[] = new String[2];\n try {\n String[] simbolos = {\"<=\", \">=\", \"==\", \"!=\", \"<\", \">\"};\n String simbolo = \"0\";\n\n if (condicion.length() > 3) {\n condicion = condicion.substring(1, condicion.length());\n for (int i = 0; i < simbolos.length; i++) {//selecciona el simbolo de la condicion\n if (condicion.contains(simbolos[i])) {\n simbolo = simbolos[i];\n break;\n }\n }\n if (simbolo.equals(\"0\")) {\n retorno[0] = \"0\";\n retorno[1] = \"mala construcción de la sentencia.\";\n } else {\n String var[] = condicion.split(simbolo);\n if (var.length == 2) {\n if (esNumero(var[0])) {\n if (esNumero(var[1])) {\n retorno[0] = \"1\";\n retorno[1] = \"\";\n } else {\n if (var[1].matches(\"[a-zA-Z]*\")) { //comprueba que solo contenga letas \n byte aux = 0;\n\n for (int i = 0; i < codigo.size(); i++) {\n if (var[1].equals(codigo.get(i).toString())) {\n aux++;\n }\n }\n if (aux > 0) {\n retorno[0] = \"1\";\n retorno[1] = \"\";\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"no se reconoce la variable \" + var[1] + \".\";\n }\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"mala construcción de la sentencia.\";\n }\n }\n } else {\n if (var[0].matches(\"[a-zA-Z]*\")) { //comprueba que solo contenga letras \n byte aux = 0;\n for (int i = 0; i < codigo.size(); i++) {\n if (var[0].equals(codigo.get(i).toString())) {\n aux++;\n }\n }\n if (aux > 0) {\n if (esNumero(var[1])) {\n retorno[0] = \"1\";\n retorno[1] = \"\";\n } else {\n if (var[0].matches(\"[a-zA-Z]*\")) { //comprueba que solo contenga letas \n aux = 0;\n\n for (int i = 0; i < codigo.size(); i++) {\n if (var[1].equals(codigo.get(i).toString())) {\n aux++;\n }\n }\n if (aux > 0) {\n retorno[0] = \"1\";\n retorno[1] = \"\";\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"no se reconoce la variable \" + var[1] + \".\";\n }\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"mala construcción de la sentencia.\";\n }\n }\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"no se reconoce la variable \" + var[0] + \".\";\n }\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"mala construcción de la sentencia.\";\n }\n\n }\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"mala construcción de la sentencia.\";\n }\n }\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"mala construcción de la sentencia.\";\n }\n\n\n\n } catch (Exception e) {\n System.out.println(\"Error en condicion \" + e.getClass());\n } finally {\n return retorno;\n }\n }", "public static void transform() {\n String s = BinaryStdIn.readString();\n\n CircularSuffixArray csa = new CircularSuffixArray(s);\n\n for (int i = 0; i < csa.length(); i++) {\n \n if (csa.index(i) == 0) {\n BinaryStdOut.write(i);\n }\n }\n\n for (int i = 0; i < csa.length(); i++) {\n if (csa.index(i) == 0) {\n BinaryStdOut.write(s.charAt(csa.length() + csa.index(i) - 1));\n }\n else {\n BinaryStdOut.write(s.charAt(csa.index(i) - 1));\n }\n }\n BinaryStdOut.flush();\n }", "public int[] findBestPositionWithMM(String sequence,String s, int type){\n int[] pos = new int[]{-1,-1,-1,-1};\r\n\r\n String[] arr10 = new String[]{\"AA\",\"GG\",\"CC\",\"TT\"};\r\n String[] arr20 = new String[]{\"AG\",\"GA\",\"TC\",\"CT\"};\r\n\r\n List<String> arr1 = Arrays.asList(arr10);\r\n List<String> arr2 = Arrays.asList(arr20);\r\n\r\n int bestScore = Integer.MIN_VALUE;\r\n int mmcount = 0;\r\n int gc = 0;\r\n int mmcheck = 1;\r\n\r\n for(int i=0;i<sequence.length()-s.length();i++){\r\n String seq = sequence.substring(i,i+s.length());\r\n int score = 0;\r\n mmcount = 0;\r\n gc = 0;\r\n mmcheck = 1;\r\n for(int j=0;j<seq.length();j++){\r\n String x = s.substring(j,j+1);\r\n String y = seq.substring(j,j+1);\r\n\r\n int ind1 = arr1.indexOf(x+y);\r\n int ind2 = arr2.indexOf(x+y);\r\n\r\n if(ind1>-1){\r\n score += 1;\r\n }else if(ind2>-1){\r\n score += -0.5;\r\n }else{\r\n score += -1;\r\n }\r\n if(!x.equalsIgnoreCase(y)){\r\n mmcount++;\r\n if(type==0 && j>seq.length()/2){\r\n mmcheck=0;\r\n }else if((type==1 || type==2) && j<seq.length()/2){\r\n mmcheck=0;\r\n }\r\n }\r\n if(x.equalsIgnoreCase(\"G\") || x.equalsIgnoreCase(\"C\")){\r\n gc++;\r\n }\r\n }\r\n if(score>bestScore){\r\n bestScore = score;\r\n pos[0] = i;\r\n pos[1] = mmcount;\r\n pos[2] = gc;\r\n pos[3] = mmcheck;\r\n }\r\n }\r\n\r\n return(pos);\r\n }", "@Test\n\tpublic void testFetchMappedValuesForInValidDataNotConsecutive() {\n\t\tString input = \"2041\";\n\t\tList<String> expectedOutput = Arrays.asList(\"A,B,C\", \"0\", \"G,H,I\", \"1\");\n\t\tList<String> actualOutput = GeneralUtility.fetchMappedValues(input);\n\t\tAssert.assertArrayEquals(expectedOutput.toArray(), actualOutput.toArray());\n\t}", "public static void main(String[] args) {\n\t\tString s = \"caaab\";\n\t\tString[] res = getUniqueSubstring(s,2);\n\t\tfor(String a : res){\n\t\t\tSystem.out.println(a);\n\t\t}\n\t}", "public static void encode () {\n // read the input\n s = BinaryStdIn.readString();\n char[] input = s.toCharArray();\n\n int[] indices = new int[input.length];\n for (int i = 0; i < indices.length; i++) {\n indices[i] = i;\n }\n \n Quick.sort(indices, s);\n \n // create t[] and find where original ended up\n char[] t = new char[input.length]; // last column in suffix sorted list\n int inputPos = 0; // row number where original String ended up\n \n for (int i = 0; i < indices.length; i++) {\n int index = indices[i];\n \n // finds row number where original String ended up\n if (index == 0)\n inputPos = i;\n \n if (index > 0)\n t[i] = s.charAt(index-1);\n else\n t[i] = s.charAt(indices.length-1);\n }\n \n \n // write t[] preceded by the row number where orginal String ended up\n BinaryStdOut.write(inputPos);\n for (int i = 0; i < t.length; i++) {\n BinaryStdOut.write(t[i]);\n BinaryStdOut.flush();\n } \n }", "@Test\n public void testFindOrientedPairs() {\n System.out.println(\"findOrientedPairs\");\n \n CCGeneticDrift instance = new CCGeneticDrift();\n String input = \"6 3 1 6 5 -2 4\";\n List<Integer> numbers = instance.inputStringToIntegerList(input);\n String expResult = \"[1 -2, 3 -2]\";\n List result = instance.findOrientedPairs(numbers);\n assertEquals(result.toString(), expResult);\n assertEquals(result.size(), 2);\n }", "public String apavada_vriddhi(String X_anta, String X_adi)\n {\n\n Log.info(\"*******ENTERED AAPAVADA NIYAMA UNO**********\");\n Log.info(\"X_adi == \" + X_adi);\n String anta = EncodingUtil.convertSLPToUniformItrans(X_anta);\n // x.transform(X_anta); // anta is ITRANS equivalent\n String adi = EncodingUtil.convertSLPToUniformItrans(X_adi);\n // x.transform(X_adi); // adi is ITRANS equivalent\n\n Log.info(\"adi == \" + adi);\n\n String return_me = \"UNAPPLICABLE\";\n\n boolean bool1 = VowelUtil.isAkaranta(X_anta) && (adi.equals(\"eti\") || adi.equals(\"edhati\"));\n boolean bool2 = VowelUtil.isAkaranta(X_anta) && adi.equals(\"UTh\");\n\n // 203\n // **********IF****************//\n if (X_anta.endsWith(\"f\") && X_adi.startsWith(\"f\")) // watch out!!! must\n // be SLP not ITRANS\n {// checked:29-6\n String strip1 = VarnaUtil.stripAntyaVarna(X_anta);\n String strip2 = VarnaUtil.stripAdiVarna(X_adi);\n\n return_me = utsarga_sandhi(X_anta, X_adi) + \", \" + strip1 + \"f\" + strip2;\n\n comments.start_adding_notes();\n comments.setSutraNum(\"\");\n comments.setVartikaPath(\"RRiti RRi vA vacanam\");\n comments.setSutraProc(\"hrasva RRikara ekadesh\");\n comments.setSource(Comments.vartika);\n String cond1 = \"small RRi followed by small RRi merge to become small RRi.\\n\" + \"RRi + RRi = RRi\";\n comments.setConditions(cond1);\n\n } // end of main if\n // **********END OF IF****************//\n\n // 204\n // **********IF****************//\n else if (X_anta.endsWith(\"f\") && X_adi.startsWith(\"x\")) // watch out!!!\n // must be SLP\n // not ITRANS\n { // checked:29-6 // SLP x = ITRANS LLi\n String strip1 = VarnaUtil.stripAntyaVarna(X_anta);\n String strip2 = VarnaUtil.stripAdiVarna(X_adi);\n\n return_me = utsarga_sandhi(X_anta, X_adi) + \", \" + strip1 + \"x\" + strip2; // SLP\n // x =\n // ITRANS\n // LLi\n\n comments.start_adding_notes();\n comments.setSutraNum(\"\");\n comments.setVartikaPath(\"LLiti LLi vA vacanam\");\n comments.setSutraProc(\"hrasva LLikara ekadesh\");\n comments.setSource(Comments.vartika);\n String cond1 = \" RRi/RRI followed by small LLi merge to become small LLi.\\n RRi/RRI + LLi = LLi\";\n comments.setConditions(cond1);\n\n } // end of main if\n // **********END OF IF****************//\n\n // 207a-b\n // **********ELSE IF****************//\n else if (bool1 || bool2)\n {\n // checked:29-6\n return_me = vriddhi_sandhi(X_anta, X_adi);\n\n // We have to remove vriddhi_sandhi default notes\n // this is done by\n comments.decrementPointer();\n comments.start_adding_notes();\n comments.setSutraNum(\"6.1.86\");\n comments.setSutraPath(\"eti-edhati-UThsu\");\n comments.setSutraProc(\"vRRiddhi-ekadesh\");\n comments.setSource(Comments.sutra);\n\n String cond1 = \"akaara followed by declensions of 'iN', 'edha' and 'UTh\" + \"<eti/edhati/UTh> are replaced by their vRRiddhi counterpart.\\n\" + \"a/A/a3 + eti/edhati/UTha = VRRiddhi Counterpart.\\n\" + \"Pls. Note.My Program cannot handle all the declensions of given roots.\" + \"Hence will only work for one instance of Third Person Singular Form\";\n comments.setConditions(cond1);\n\n String cond2 = \"Blocks para-rupa Sandhi given by 'e~ni pararUpam' which had blocked Normal Vriddhi Sandhi\";\n\n if (bool1)\n comments.append_condition(cond2);\n else if (bool2) comments.append_condition(\"Blocks 'Ad guNaH'\");\n\n }\n\n // **********END OF ELSE IF****************//\n\n // 208\n // **********ELSE IF****************//\n else if (anta.equals(\"akSa\") && adi.equals(\"UhinI\"))\n {// checked:29-6\n return_me = \"akzOhiRI\"; // u to have give in SLP..had\n // ITRANS....fixed\n // not sending to vrridhit_sandhi becose of Na-inclusion\n // vriddhi_sandhi(X_anta,X_adi);\n // We have to remove vriddhi_sandhi default notes\n // this is done by\n // ***/vowel_notes.decrement_pointer();/***/\n\n comments.start_adding_notes();\n comments.setSutraNum(\"\");\n comments.setVartikaPath(\"akSAdUhinyAm\");\n comments.setSutraProc(\"vRRiddhi-ekadesh\");\n comments.setSource(Comments.vartika);\n String cond1 = \"akSa + UhinI = akshauhiNI.Vartika blocks guna-sandhi ato allow vRRiddhi-ekadesh\";\n comments.setConditions(cond1);\n\n }\n // **********END OF ELSE IF****************//\n\n // 209\n // **********ELSE IF****************//\n else if (anta.equals(\"pra\") && (adi.equals(\"Uha\") || adi.equals(\"UDha\") || adi.equals(\"UDhi\") || adi.equals(\"eSa\") || adi.equals(\"eSya\")))\n // checked:29-6\n {\n return_me = vriddhi_sandhi(X_anta, X_adi);\n\n // We have to remove vriddhi_sandhi default notes\n // this is done by\n /***/\n comments.decrementPointer();\n /***/\n\n comments.start_adding_notes();\n comments.setSutraNum(\"\");\n comments.setVartikaPath(\"prAd-Uha-UDha-UDhi-eSa-eSyeSu\");\n comments.setSutraProc(\"vRRiddhi-ekadesh\");\n comments.setSource(Comments.vartika);\n String cond1 = \"upasarga 'pra' + <prAd/Uha/UDha/UDhi/eSa/eSya> = vRRiddhi-ekadesha.\" + \"\\nVartika blocks para-rupa Sandhi and/or guna Sandhi to allow vRRidhi-ekadesh.\";\n\n comments.setConditions(cond1);\n\n }\n\n // **********END OF ELSE IF****************//\n\n // 210\n // **********ELSE IF****************//\n else if (anta.equals(\"sva\") && (adi.equals(\"ira\") || adi.equals(\"irin\")))\n {\n // checked:29-6\n return_me = vriddhi_sandhi(X_anta, X_adi);\n // We have to remove vriddhi_sandhi default notes\n // this is done by\n /***/\n comments.decrementPointer();\n /***/\n\n comments.start_adding_notes();\n comments.setSutraNum(\"\");\n comments.setVartikaPath(\"svaadireriNoH\");\n comments.setSutraProc(\"vRRiddhi-ekadesh\");\n comments.setSource(Comments.vartika);\n String cond1 = \"sva + <ira/irin> = vRRIddhi.\\n Blocks Guna Sandhi.\" + \"\\nPls. note. My program does not cover sandhi with declensions.\";\n comments.setConditions(cond1);\n }\n\n // **********END OF ELSE IF****************//\n\n // 211 Vik. Semantic Dependency\n // **********ELSE IF****************//\n else if (VowelUtil.isAkaranta(X_anta) && X_adi.equals(\"fta\"))// adi.equals(\"RRita\"))\n {\n // checked:29-6\n // not working for 'a' but working for 'A'. Find out why...fixed\n\n return_me = utsarga_prakruti_bhava(X_anta, X_adi) + \", \" + vriddhi_sandhi(X_anta, X_adi) + \"**\";\n\n // We have to remove vriddhi_sandhi default notes\n // this is done by\n /***/\n comments.decrementPointer();\n /***/\n\n comments.start_adding_notes();\n comments.setSutraNum(\"\");\n comments.setVartikaPath(\"RRite ca tRRitIyAsamAse\");\n comments.setSutraProc(\"Vriddhi-ekadesh\");\n comments.setSource(Comments.vartika);\n String cond1 = \"If an akaranta ('a/aa/a3'-terminating phoneme) is going to form a Tritiya Samas compound with a RRi-initial word\" + \" vRRiddhi-ekadesha takes place blocking other rules.\\n\" + \"a/A/a3 + RRi -> Tritiya Samaasa Compound -> vRRiddhi-ekadesh\" + depend;\n comments.setConditions(cond1);\n }\n // **********END OF ELSE IF****************//\n\n // 212-213\n // **********ELSE IF****************//\n else if ((anta.equals(\"pra\") || anta.equals(\"vatsatara\") || anta.equals(\"kambala\") || anta.equals(\"vasana\") || anta.equals(\"RRiNa\") || anta.equals(\"dasha\")) && adi.equals(\"RRiNa\"))\n\n // checked:29-6\n { // pra condition not working...fixed now . 5 MAR 05\n // return_me = guna_sandhi(X_anta,X_adi) + \", \" +\n // prakruti_bhava(X_anta,X_adi)\n\n return_me = vriddhi_sandhi(X_anta, X_adi);\n // We have to remove vriddhi_sandhi default notes\n // this is done by\n /***/\n comments.decrementPointer();\n /***/\n\n comments.start_adding_notes();\n // vowel_notes.set_sutra_num(\"\") ;\n comments.setVartikaPath(\"pra-vatsatara-kambala-vasanArNa dashaanAm RRiNe\");\n comments.setSutraProc(\"Vriddhi-ekadesh\");\n comments.setSource(Comments.vartika);\n String cond1 = \"If 'pra' etc are followed by the word 'RRiNa',\" + \" vRRiddhi-ekadesh takes place blocking Guna and Prakruti Bhava Sandhis.\" + \"\\n<pra/vatsatara/kambala/vasana/RRiNa/dash> + RRiNa = vRRiddhi\";\n comments.setConditions(cond1);\n }\n // ???? also implement prakruti bhava\n\n /**\n * **YEs ACCORDING TO SWAMI DS but not according to Bhaimi Bhashya else\n * if ( adi.equals(\"RRiNa\") && (anta.equals(\"RRiNa\") ||\n * anta.equals(\"dasha\")) ) { return_me = vriddhi_sandhi(X_anta,X_adi);\n * //*sandhi_notes = VE + apavada + vartika + \"'RRiNa dashAbhyAm ca'.\" +\n * \"\\nBlocks Guna and Prakruti Bhava Sandhi\";\n * \n * vowel_notes.start_adding_notes(); vowel_notes.set_sutra_num(\"\") ;\n * vowel_notes.set_vartika_path(\"RRiNa dashAbhyAm ca\") ;\n * vowel_notes.set_sutra_proc(\"Vriddhi-ekadesh\");\n * vowel_notes.set_source(tippani.vartika) ; String cond1 =depend +\n * \"Blocks Guna and Prakruti Bhava Sandhi\";\n * vowel_notes.set_conditions(cond1);\n * /* return_me = utsarga_prakruti_bhava(X_anta,X_adi) + \", \" +\n * vriddhi_sandhi(X_anta,X_adi) + \"**\"; sandhi_notes = usg1 +\n * sandhi_notes; sandhi_notes+= \"\\n\" + usg2 + VE +apavada + vartika +\n * \"'RRiNa dashAbhyAm ca'.\" + depend; // .... this was when I assumed\n * this niyama is optional with other // ???? also implement prakruti\n * bhava }\n */\n // **********END OF ELSE IF****************//\n // 214 Vik. Semantic Dependency\n // **********ELSE IF****************//\n else if (anta.equals(\"A\") && VowelUtil.isAjadi(X_adi))\n {\n // checked:29-6\n // rules is A + Vowel = VRddhi\n\n return_me = utsarga_sandhi(X_anta, X_adi) + \", \" + vriddhi_sandhi(X_anta, X_adi) + \"**\";\n /*******************************************************************\n * sandhi_notes = usg1 + sandhi_notes + \"\\n\" + usg2 ; // We have to\n * remove vriddhi_sandhi default notes // this is done by /\n ******************************************************************/\n comments.decrementPointer();\n /***/\n\n comments.start_adding_notes();\n comments.setSutraNum(\"6.1.87\");\n comments.setSutraPath(\"ATashca\");\n comments.setSutraProc(\"Vriddhi-ekadesh\");\n comments.setSource(Comments.vartika);\n String cond1 = depend + \"if String 1 equals 'aa' and implies 'AT'-Agama and \" + \"String 2 is a verbal form. E.g. A + IkSata = aikSata not ekSata.\\n\" + \" 'aa' + Verbal Form = vRRiddhi-ekadesh\";\n comments.setConditions(cond1);\n }\n // **********END OF ELSE IF****************//\n\n // **********ELSE IF****************//\n // akaranta uparga mein error....fixed 4 MAR\n // 215 Vik Semantic Dependency\n else if (is_akaranta_upsarga(X_anta) && X_adi.startsWith(\"f\")) // RRi\n // ==\n // SLP\n // 'f'USing\n // X_adi,\n // switched\n // to\n // Sharfe\n // Encoding\n { // according to Vedanga Prakash Sandhi Vishaya RRIkara is being\n // translated\n // but checked with SC Basu Trans. it is RRIta not RRikara\n // checked:29-6\n\n Log.info(\" Rules 215 applies\");\n return_me = utsarga_sandhi(X_anta, X_adi) + \", \" + vriddhi_sandhi(X_anta, X_adi) + \"**\";\n // We have to remove vriddhi_sandhi default notes\n // this is done by\n // vowel_notes.decrement_pointer();\n\n // July 14 2005.. I have removed the above line\n // vowel_notes.decrement_pointer();\n\n comments.start_adding_notes();\n comments.setSutraNum(\"6.1.88\");\n comments.setSutraPath(\"upasargAdRRiti dhAtau\");\n comments.setSutraProc(\"Vriddhi-ekadesh\");\n comments.setSource(Comments.vartika);\n String cond1 = depend + \"akaranta upsarga(preverb) followed by verbal form begining with short RRi.\\n \" + \"preverb ending in <a> + verbal form begining with RRi = vRRiddhi-ekadesha\\n\";\n\n /*\n * \"By 6.1.88 it should block all \" + \"optional forms but by 'vA\n * supyApishaleH' (6.1.89) subantas are \" + \"permitted the Guna\n * option.\";\n */\n comments.setConditions(cond1);\n }\n // **********END OF ELSE IF****************//\n\n Log.info(\"return_me == \" + return_me);\n Log.info(\"*******EXITED AAPAVADA NIYAMA UNO**********\");\n\n if (return_me.equals(\"UNAPPLICABLE\"))\n {\n return_me = apavada_para_rupa(X_anta, X_adi); // search for more\n // apavada rules\n }\n return return_me; // apavada rules formulated by Panini apply\n }", "public boolean[] mo21a(String str) {\n int length = str.length();\n if (length > 80) {\n try {\n throw new IllegalArgumentException(f337z[2] + length);\n } catch (IllegalArgumentException e) {\n throw e;\n }\n }\n int i;\n int[] iArr = new int[9];\n boolean[] zArr = new boolean[((((str.length() + 2) + 2) * 9) + 1)];\n C0105f.m616a(C0114p.f385f[47], iArr);\n int b = C0105f.m617b(zArr, 0, iArr, true);\n for (i = 0; i < length; i++) {\n C0105f.m616a(C0114p.f385f[f337z[0].indexOf(str.charAt(i))], iArr);\n b += C0105f.m617b(zArr, b, iArr, true);\n }\n i = C0105f.m615a(str, 20);\n C0105f.m616a(C0114p.f385f[i], iArr);\n b += C0105f.m617b(zArr, b, iArr, true);\n C0105f.m616a(C0114p.f385f[C0105f.m615a(str + f337z[0].charAt(i), 15)], iArr);\n i = C0105f.m617b(zArr, b, iArr, true) + b;\n C0105f.m616a(C0114p.f385f[47], iArr);\n zArr[i + C0105f.m617b(zArr, i, iArr, true)] = true;\n return zArr;\n }", "static char[] generateAZBothCasesAndNumbers(int length) {\n charArray = new char[length];\n int k;\n for (int i = 0; i < length; i++) {\n k = (int) (Math.random() * 3);\n if (k == 0) {\n charArray[i] = RandomChar.generateAZLowerRangeChar();\n } else if (k == 1) {\n charArray[i] = RandomChar.generateAZUpperRangeChar();\n } else if (k == 2) {\n charArray[i] = RandomChar.generateNumberChar();\n }\n }\n return charArray;\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(\"Enter the no of string to insert\");\n\t\t\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint no = Integer.parseInt(scanner.nextLine());\n\t\tSystem.out.println(\"No >>\"+no);\n\t\tString[] str = new String [no];\n\t\tSystem.out.println(\"Enter \"+ no + \" string \");\t\t\n\t\tfor (int i = 0; i < no; i++) {\n\n\t\t\tstr[i] = scanner.nextLine();\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Input strings are >>>>>>>\");\n\t\tfor ( int i = 0; i < no; i++) {\n\t\tSystem.out.print( str[i] + \" \" );\n\t\t}\n\t\tSystem.out.println();\n\t\tStringArray stringArray = new StringArray();\n\t\tArrayList<String> output = stringArray.validateString(str);\n\t\tSystem.out.println(\"output strings are >>>>>>>\");\n\t\t\n\t\t\n\t\tfor ( int i = 0; i < output.size(); i++) {\n\t\tSystem.out.print( output.get(i) + \" \" );\n\t}\n\t\t\n\t\t}", "@Test\n void testParseTestcaseFrom50Specification(){\n String testcase = \"\\r\\n\" +\n \"/ISk5\\\\2MT382-1000\\r\\n\" +\n \"\\r\\n\" +\n \"1-3:0.2.8(50)\\r\\n\" +\n \"0-0:1.0.0(101209113020W)\\r\\n\" +\n \"0-0:96.1.1(4B384547303034303436333935353037)\\r\\n\" +\n \"1-0:1.8.1(123456.789*kWh)\\r\\n\" +\n \"1-0:1.8.2(123456.789*kWh)\\r\\n\" +\n \"1-0:2.8.1(123456.789*kWh)\\r\\n\" +\n \"1-0:2.8.2(123456.789*kWh)\\r\\n\" +\n \"0-0:96.14.0(0002)\\r\\n\" +\n \"1-0:1.7.0(01.193*kW)\\r\\n\" +\n \"1-0:2.7.0(00.000*kW)\\r\\n\" +\n \"0-0:96.7.21(00004)\\r\\n\" +\n \"0-0:96.7.9(00002)\\r\\n\" +\n \"1-0:99.97.0(2)(0-0:96.7.19)(101208152415W)(0000000240*s)(101208151004W)(0000000301*s)\\r\\n\" +\n \"1-0:32.32.0(00002)\\r\\n\" +\n \"1-0:52.32.0(00001)\\r\\n\" +\n \"1-0:72.32.0(00000)\\r\\n\" +\n \"1-0:32.36.0(00000)\\r\\n\" +\n \"1-0:52.36.0(00003)\\r\\n\" +\n \"1-0:72.36.0(00000)\\r\\n\" +\n \"0-0:96.13.0(303132333435363738393A3B3C3D3E3F303132333435363738393A3B3C3D3E3F30313233343536373839\" +\n \"3A3B3C3D3E3F303132333435363738393A3B3C3D3E3F303132333435363738393A3B3C3D3E3F)\\r\\n\" +\n \"1-0:32.7.0(220.1*V)\\r\\n\" +\n \"1-0:52.7.0(220.2*V)\\r\\n\" +\n \"1-0:72.7.0(220.3*V)\\r\\n\" +\n \"1-0:31.7.0(001*A)\\r\\n\" +\n \"1-0:51.7.0(002*A)\\r\\n\" +\n \"1-0:71.7.0(003*A)\\r\\n\" +\n \"1-0:21.7.0(01.111*kW)\\r\\n\" +\n \"1-0:41.7.0(02.222*kW)\\r\\n\" +\n \"1-0:61.7.0(03.333*kW)\\r\\n\" +\n \"1-0:22.7.0(04.444*kW)\\r\\n\" +\n \"1-0:42.7.0(05.555*kW)\\r\\n\" +\n \"1-0:62.7.0(06.666*kW)\\r\\n\" +\n \"0-1:24.1.0(003)\\r\\n\" +\n \"0-1:96.1.0(3232323241424344313233343536373839)\\r\\n\" +\n \"0-1:24.2.1(101209112500W)(12785.123*m3)\\r\\n\" +\n \"!EF2F\\r\\n\" +\n \"\\r\\n\";\n DSMRTelegram dsmrTelegram = ParseDsmrTelegram.parse(testcase);\n\n // CHECKSTYLE.OFF: ParenPad\n assertEquals(\"/ISk5\\\\2MT382-1000\", dsmrTelegram.getRawIdent());\n assertEquals(\"ISK\", dsmrTelegram.getEquipmentBrandTag());\n assertEquals(\"MT382-1000\", dsmrTelegram.getIdent());\n\n assertEquals(\"5.0\", dsmrTelegram.getP1Version());\n assertEquals(ZonedDateTime.parse(\"2010-12-09T11:30:20+01:00\"), dsmrTelegram.getTimestamp());\n\n assertEquals(\"K8EG004046395507\", dsmrTelegram.getEquipmentId());\n assertEquals(\"0123456789:;<=>?0123456789:;<=>?0123456789:;<=>?0123456789:;<=>?0123456789:;<=>?\", dsmrTelegram.getMessage());\n\n assertEquals( 2, dsmrTelegram.getElectricityTariffIndicator());\n assertEquals( 123456.789, dsmrTelegram.getElectricityReceivedLowTariff(), 0.001);\n assertEquals( 123456.789, dsmrTelegram.getElectricityReceivedNormalTariff(), 0.001);\n assertEquals( 123456.789, dsmrTelegram.getElectricityReturnedLowTariff(), 0.001);\n assertEquals( 123456.789, dsmrTelegram.getElectricityReturnedNormalTariff(), 0.001);\n assertEquals( 1.193, dsmrTelegram.getElectricityPowerReceived(), 0.001);\n assertEquals( 0.0, dsmrTelegram.getElectricityPowerReturned(), 0.001);\n assertEquals( 4, dsmrTelegram.getPowerFailures());\n assertEquals( 2, dsmrTelegram.getLongPowerFailures());\n\n assertEquals(2, dsmrTelegram.getPowerFailureEventLogSize());\n\n List<PowerFailureEvent> powerFailureEventLog = dsmrTelegram.getPowerFailureEventLog();\n assertEquals(2, powerFailureEventLog.size());\n assertPowerFailureEvent(powerFailureEventLog.get(0), \"2010-12-08T15:20:15+01:00\", \"2010-12-08T15:24:15+01:00\", \"PT4M\");\n assertPowerFailureEvent(powerFailureEventLog.get(1), \"2010-12-08T15:05:03+01:00\", \"2010-12-08T15:10:04+01:00\", \"PT5M1S\");\n\n assertEquals( 2, dsmrTelegram.getVoltageSagsPhaseL1());\n assertEquals( 1, dsmrTelegram.getVoltageSagsPhaseL2());\n assertEquals( 0, dsmrTelegram.getVoltageSagsPhaseL3());\n assertEquals( 0, dsmrTelegram.getVoltageSwellsPhaseL1());\n assertEquals( 3, dsmrTelegram.getVoltageSwellsPhaseL2());\n assertEquals( 0, dsmrTelegram.getVoltageSwellsPhaseL3());\n assertEquals( 220.1, dsmrTelegram.getVoltageL1(), 0.001);\n assertEquals( 220.2, dsmrTelegram.getVoltageL2(), 0.001);\n assertEquals( 220.3, dsmrTelegram.getVoltageL3(), 0.001);\n assertEquals( 1, dsmrTelegram.getCurrentL1(), 0.001);\n assertEquals( 2, dsmrTelegram.getCurrentL2(), 0.001);\n assertEquals( 3, dsmrTelegram.getCurrentL3(), 0.001);\n assertEquals( 1.111, dsmrTelegram.getPowerReceivedL1(), 0.001);\n assertEquals( 2.222, dsmrTelegram.getPowerReceivedL2(), 0.001);\n assertEquals( 3.333, dsmrTelegram.getPowerReceivedL3(), 0.001);\n assertEquals( 4.444, dsmrTelegram.getPowerReturnedL1(), 0.001);\n assertEquals( 5.555, dsmrTelegram.getPowerReturnedL2(), 0.001);\n assertEquals( 6.666, dsmrTelegram.getPowerReturnedL3(), 0.001);\n assertEquals( 1, dsmrTelegram.getMBusEvents().size());\n\n assertEquals( 3, dsmrTelegram.getMBusEvents().get(1).getDeviceType());\n assertEquals(\"2222ABCD123456789\", dsmrTelegram.getMBusEvents().get(1).getEquipmentId());\n assertEquals(ZonedDateTime.parse(\"2010-12-09T11:25+01:00\"), dsmrTelegram.getMBusEvents().get(1).getTimestamp());\n assertEquals( 12785.123, dsmrTelegram.getMBusEvents().get(1).getValue(), 0.001);\n assertEquals( \"m3\", dsmrTelegram.getMBusEvents().get(1).getUnit());\n\n assertEquals(\"2222ABCD123456789\", dsmrTelegram.getGasEquipmentId());\n assertEquals(ZonedDateTime.parse(\"2010-12-09T11:25+01:00\"), dsmrTelegram.getGasTimestamp());\n assertEquals(12785.123, dsmrTelegram.getGasM3(), 0.001);\n\n assertEquals(\"EF2F\", dsmrTelegram.getCrc());\n\n // The CRC of this testcase is invalid.\n // Or better: I have not been able to copy it from the documentation and\n // recreate the \"original\" record for which the provided CRC was calculated.\n // assertTrue(dsmrTelegram.isValidCRC());\n }", "public void importFnaBitSequences(String filename, int start, int end) {\n\n int currentKID = -1;\n SuperString currentSeq = new SuperString();\n //String currentName = \"\";\n boolean ignore = true; //do not write empty sequence to database\n\n TimeTotals tt = new TimeTotals();\n tt.start();\n\n System.out.println(\"\\nFNA import begins \" + tt.toHMS() + \"\\n\");\n try (BufferedReader br = new BufferedReader(new FileReader(filename))) {\n\n for (String line; (line = br.readLine()) != null; ) {\n\n if (debug) {\n System.err.println(\"Single line:: \" + line);\n }\n\n // if blank line, it does not count as new sequence\n if (line.trim().length() == 0) {\n if (debug) System.err.println(\" :: blank line detected \");\n\n if (!ignore)\n if(currentKID >= start && currentSeq.length() > 0) {\n storeSequence(currentKID, currentSeq, tt);\n } else {\n sequenceLength.add(currentSeq.length());\n exceptionsArr.add(new HashMap<>());\n }\n\n else if (!ignore) {\n sequenceLength.add(currentSeq.length());\n exceptionsArr.add(new HashMap<>());\n }\n ignore = true;\n\n // if line starts with \">\", then it is start of a new reference sequence\n } else if (line.charAt(0) == '>') {\n if (debug) System.err.println(\" :: new entry detected \" + line);\n\n // save previous iteration to database\n if (!ignore && currentSeq.length() > 0) {\n storeSequence(currentKID, currentSeq, tt);\n } else if (!ignore) {\n sequenceLength.add(currentSeq.length());\n exceptionsArr.add(new HashMap<>());\n }\n // initialize next iteration\n if (indexOf(line.trim()) == -1) {\n //original.addAndTrim(new Kid(line.trim()));\n //addNewKidEntry(line);\n add(new Kid(line.trim()));\n if (getLast()==start || (getLast()== 1 && start == 1)){\n System.err.println(\"Found KID\\t\" + currentKID + \"\\tbit string import started\");\n }\n }\n\n currentKID = getKid(line.trim()); // original.indexOf(line.trim());\n if (currentKID == -1) {\n System.err.println(\"This sequence not found in database : \" + line);\n listEntries(0);\n exit(0);\n }\n //currentSeq = \"\";\n\n currentSeq = new SuperString();\n\n ignore = false;\n } else {\n currentSeq.addAndTrim(line.trim());\n }\n\n\n if (currentKID >= end){\n break;\n }\n } //end for\n\n //write last\n if (!ignore && currentKID >= start && currentSeq.length() > 0) {\n storeSequence(currentKID, currentSeq, tt);\n }\n// else if (!ignore) {\n// sequenceLength.add(currentSeq.length());\n// exceptionsArr.add(new HashMap<>());\n// }\n br.close();\n\n }catch (FileNotFoundException e1) {\n e1.printStackTrace();\n } catch (IOException e1) {\n e1.printStackTrace();\n }\n\n }", "public static void main(String[] args) {\n\t\tString text = \"\\\"undifferentiated's thyroid carcinomas were carried out with antisera against calcitonin, calcitonin-gene related peptide (CGRP), somatostatin, and also thyroglobulin, using the PAP method. \";\n\t\ttext = text.replace('\\\"', ' ');\n\t\t\n\t\tStringUtil su = new StringUtil();\n\t\t\n\t\t// Extracting...\n\t\tString text2 = new String(text);\n\t\tEnvironmentVariable.setMoaraHome(\"./\");\n\t\tGeneRecognition gr = new GeneRecognition();\n\t\tArrayList<GeneMention> gms = gr.extract(MentionConstant.MODEL_BC2,text);\n\t\t// Listing mentions...\n\t\tSystem.out.println(\"Start\\tEnd\\tMention\");\n\t\tfor (int i=0; i<gms.size(); i++) {\n\t\t\tGeneMention gm = gms.get(i);\n\t\t\tSystem.out.println(gm.Start() + \"\\t\" + gm.End() + \"\\t\" + gm.Text());\n\t\t\t//System.out.println(text2.substring(gm.Start(), gm.End()));\n\t\t\tSystem.out.println(su.getTokenByPosition(text,gm.Start(),gm.End()).trim());\n\t\t}\n\t\tif (true){\n\t\t\treturn;\n\t\t}\n\t\t// Normalizing mentions...\n\t\tOrganism yeast = new Organism(Constant.ORGANISM_YEAST);\n\t\tOrganism human = new Organism(Constant.ORGANISM_HUMAN);\n\t\tExactMatchingNormalization gn = new ExactMatchingNormalization(human);\n\t\tgms = gn.normalize(text,gms);\n\t\t// Listing normalized identifiers...\n\t\t\n\t\tSystem.out.println(\"\\nStart\\tEnd\\t#Pred\\tMention\");\n\t\tfor (int i=0; i<gms.size(); i++) {\n\t\t\tGeneMention gm = gms.get(i);\n\t\t\tif (gm.GeneIds().size()>0) {\n\t\t\t\tSystem.out.println(gm.Start() + \"\\t\" + gm.End() + \"\\t\" + gm.GeneIds().size() + \n\t\t\t\t\t\"\\t\" + su.getTokenByPosition(text,gm.Start(),gm.End()).trim());\n\t\t\t\tfor (int j=0; j<gm.GeneIds().size(); j++) {\n\t\t\t\t\tGenePrediction gp = gm.GeneIds().get(j);\n\t\t\t\t\tSystem.out.print(\"\\t\" + gp.GeneId() + \" \" + gp.OriginalSynonym() + \" \" + gp.ScoreDisambig());\n\t\t\t\t\tSystem.out.println((gm.GeneId().GeneId().equals(gp.GeneId())?\" (*)\":\"\"));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Test\n public void removeDuplicatesFromString() {\n\n assertEquals(\"IAMDREW\", Computation.removeDuplicates(\"IIIAAAAMDREEEWW\"));\n }", "public static String subsitutionActions(String[] blockArray)\n\t{\n\t\t/*char[][] alaphabetArray = \n\t\t{ // 0\t 1\t2\t 3\t 4\n\t\t\t{'t', 'r', 'o', 'u', 'b'},\n\t\t\t{'l', 'e', 'm', 'a', 'k'},\n\t\t\t{'i', 'n', 'g', 's', 'c'},\n\t\t\t{'d', 'f', 'h', 'p', 'q'}, // 0\n\t\t\t{'v', 'w', 'x', 'y', 'z'} // 4\n\t\t};*/\n\t\tchar[][] alaphabetArray = \n\t\t{ // 0\t 1\t2\t 3\t 4\n\t\t\t{'a', 'b', 'c', 'd', 'e'}, // 0\n\t\t\t{'f', 'g', 'h', 'i', 'k'}, // 1\t\t\t\t// must figure out how to handle i/j\n\t\t\t{'l', 'm', 'n', 'o', 'p'}, // 2\n\t\t\t{'q', 'r', 's', 't', 'u'}, // 3\n\t\t\t{'v', 'w', 'x', 'y', 'z'} // 4\n\t\t};\n\n\t\tint q = 0;\n\t\tchar resultCharArray[] = new char[blockArray.length*2];\n\t\tfor (int i = 0; i < blockArray.length; i++)\n\t\t{\n\t\t\tchar letter1 = blockArray[i].charAt(0);\n\t\t\tchar letter2 = blockArray[i].charAt(1);\n\n\t\t\tchar newLetter1 = ' ';\n\t\t\tchar newLetter2 = ' ';\t\n\n\t\t\tint l1j = 0;\n\t\t\tint l1k = 0;\n\t\t\tint l2j = 0;\n\t\t\tint l2k = 0;\n\t\t\t\n\t\t\tfor (int j = 0; j < 5; j++)\n\t\t\t{\n\t\t\t\tfor (int k = 0; k < 5; k++)\n\t\t\t\t{\n\t\t\t\t\tif (alaphabetArray[j][k] == letter1)\n\t\t\t\t\t{\n\t\t\t\t\t\tl1j = j;\n\t\t\t\t\t\tl1k = k;\n\t\t\t\t\t}\n\t\t\t\t\telse if (alaphabetArray[j][k] == letter2)\n\t\t\t\t\t{\n\t\t\t\t\t\tl2j = j;\n\t\t\t\t\t\tl2k = k;\n\t\t\t\t\t}\n\t\t\t\t} // end of k loop\n\t\t\t} // end of j loop\n\t\t\tif (l1j != l2j && l1k != l2k) // rectangle relation\n\t\t\t{\n\t\t\t\tnewLetter1 = alaphabetArray[l1j][l2k];\n\t\t\t\tnewLetter2 = alaphabetArray[l2j][l1k];\n\t\t\t}\n\t\t\telse if (l1k == l2k) // vertical relation\n\t\t\t{\n\t\t\t\tnewLetter1 = alaphabetArray[((l1j + 1) % 5 )][l1k];\n\t\t\t\tnewLetter2 = alaphabetArray[((l2j + 1) % 5 )][l2k];\n\t\t\t}\n\t\t\telse if (l1j == l2j) // horizontal relation\n\t\t\t{\n\t\t\t\tnewLetter1 = alaphabetArray[l1j][((l1k + 1) % 5 )];\n\t\t\t\tnewLetter2 = alaphabetArray[l2j][((l2k + 1) % 5 )];\n\t\t\t}\n\t\t\tresultCharArray[q] = newLetter1;\n\t\t\tq++;\n\t\t\tresultCharArray[q] = newLetter2;\n\t\t\tq++;\n\t\t} // end of blockArray cycle for loop\n\t\tString resultString = new String(resultCharArray);\n\t\treturn resultString;\n\t}", "public static String findRepeatingSequence(String input){\n\t char [] inputArray = input.toCharArray();\n\t StringBuffer sequence = new StringBuffer();\n\t\tfor (int i = 0; i < inputArray.length - 1; i++) {\n\t\t\tif (Character.toString(inputArray[i]).equals(Character.toString(inputArray[i + 1]))) {\n\t\t\t\t\n\t\t\t\tsequence.append(Character.toString(inputArray[i]));\n\t\t\t\t\n\t\t\t\t\twhile (Character.toString(inputArray[i]).equals(Character.toString(inputArray[i + 1]))) {\n\t\t\t\t\t\tsequence.append(Character.toString(inputArray[i]));\n\t\t\t\t\t\tif (i + 1 < inputArray.length - 1) {\n\t\t\t\t\t\t\ti++;\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t \n\n\t\t\t}else{\n\t\t\t\tif (sequence.length()>0){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\n\t }\n\t\n\treturn sequence.toString();\t\n\t}", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n DefaultNucleotideCodec defaultNucleotideCodec0 = DefaultNucleotideCodec.INSTANCE;\n DefaultNucleotideCodec defaultNucleotideCodec1 = DefaultNucleotideCodec.INSTANCE;\n DefaultNucleotideCodec defaultNucleotideCodec2 = DefaultNucleotideCodec.INSTANCE;\n Nucleotide nucleotide0 = Nucleotide.Pyrimidine;\n Set<Nucleotide> set0 = nucleotide0.getBasesFor();\n byte[] byteArray0 = defaultNucleotideCodec1.encode((Collection<Nucleotide>) set0);\n Nucleotide nucleotide1 = defaultNucleotideCodec0.decode(byteArray0, 0L);\n assertEquals(Nucleotide.Cytosine, nucleotide1);\n \n defaultNucleotideCodec1.getNumberOfGapsUntil(byteArray0, 1717986918);\n DefaultNucleotideCodec defaultNucleotideCodec3 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec3.getUngappedLength(byteArray0);\n DefaultNucleotideCodec defaultNucleotideCodec4 = DefaultNucleotideCodec.INSTANCE;\n int int0 = defaultNucleotideCodec4.getUngappedOffsetFor(byteArray0, (-1209));\n assertEquals((-1209), int0);\n \n int int1 = defaultNucleotideCodec2.getGappedOffsetFor(byteArray0, (-1209));\n assertEquals(2, int1);\n \n defaultNucleotideCodec2.getGappedOffsetFor(byteArray0, 1717986918);\n DefaultNucleotideCodec defaultNucleotideCodec5 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec5.decodedLengthOf(byteArray0);\n defaultNucleotideCodec0.decodedLengthOf(byteArray0);\n DefaultNucleotideCodec defaultNucleotideCodec6 = DefaultNucleotideCodec.INSTANCE;\n DefaultNucleotideCodec defaultNucleotideCodec7 = DefaultNucleotideCodec.INSTANCE;\n int int2 = defaultNucleotideCodec7.getGappedOffsetFor(byteArray0, 0);\n int int3 = defaultNucleotideCodec6.getNumberOfGapsUntil(byteArray0, 5);\n assertTrue(int3 == int2);\n assertArrayEquals(new byte[] {(byte)0, (byte)0, (byte)0, (byte)2, (byte) (-34)}, byteArray0);\n assertEquals(0, int3);\n }", "public static String[] AUTOtoWords(String str) {\n return Configuration.auto_type.equals(AUTO_TYPE.CANDC) ? AUTOtoIndex(str, 2) : AUTOtoIndex(str, 4);\n }", "@BeforeEach\n\tvoid setUpValidRE(){\n\t\tvalidRE= new String[lengthValid];\n\t\t// ab\n\t\tvalidRE[0] = \"ab\";\n\t\t// (ab)\n\t\tvalidRE[1] = \"(ab)\";\n\t\t//(ab)*\n\t\tvalidRE[2] = \"(ab)*\";\n\t\t// a???\n\t\tvalidRE[3] = \"a???\";\n\t\t// a***\n\t\tvalidRE[4] = \"a***\";\n\t\t// a+++\n\t\tvalidRE[5] = \"a+++\";\n\t\t// (((a)))\n\t\tvalidRE[6] = \"(((a)))\";\n\t\t// (a | ab | c*)*\n\t\tvalidRE[7] = \"(a | ab | c*)*\";\n\t\t// (a | ab | c*)**??\n\t\tvalidRE[8] = \"(a | ab | c*)*??\";\n\t\t// ( a | (ab | cd)+ )+\n\t\tvalidRE[9] = \"(a | (ab | cd)+)+\";\n\t\t// 0 (01 | (02) * | (03)++) | (1?01?)\n\t\tvalidRE[10] = \"0 (01 | (02) * | (03)++) | (a?01?)\";\n\t\t// a | &\n\t\tvalidRE[11] = \"a | &\";\n\t\t// &*\n\t\tvalidRE[12] = \"&*\";\n\t\t// (())* (empty language)\n\t\tvalidRE[13] = \"(())*\";\n\t\t// (a*b)*\n\t\tvalidRE[14] = \"(a*b)*\";\n\t\t// (a | & | a*b?c+)*\n\t\tvalidRE[15] = \"(a | & | a*b?c+)*\";\n\t}", "public static void main(String[] args) {\n\t\tString s = \"AAAAAAAAAAA\";\n\t\tSystem.out.println(s.substring(0, 10));\n\t\tRepeatedDNAsequences hp = new RepeatedDNAsequences();\n\t\tSystem.out.println(hp.findRepeatedDnaSequences(s));\n\t}", "private void SolveTranslation(){\n\n int Cursor=0;\n Pattern pt = Pattern.compile(\"\\\"(.*?)\\\"\");\n Matcher matcher = pt.matcher(Input);\n while(matcher.find()){\n this.Undone[Cursor++] = matcher.group();\n //System.out.println(Undone[Cursor-1]);\n }\n Input = matcher.replaceAll(\"CCC\");\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tString str = \"I am very ouch happy about you\";\r\n\t\t//str.\r\n\t\t\r\n\t\tString x = str.replace(\"ou\", \"XY\");\r\n\t\tSystem.out.println(\"x::\"+x);\r\n\t\t\r\n\t\t//Without using replace method -- in progress\r\n\t\tString[] arr = str.split(\"ou\");\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(\"size of array::\"+arr.length);\r\n\t\tStringBuffer sb = new StringBuffer();\r\n\t\t\r\n\t\t\r\n\t\tfor(int i = 0; i<arr.length; i++) {\r\n\t\t\tSystem.out.println(arr[i]);\r\n\t\t\tsb.append(arr[i]).append(\"XY\");\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(\"Final:::\"+sb.toString());\r\n\t\t/*StringBuffer sb = new StringBuffer();\r\n\t\tfor(int i = 0; i<str.length(); i++) {\r\n\t\t\tif(\"ABC\".equals(str.substring(i, i+3))) {\r\n\t\t\t\tsb.append(\"XY\");\r\n\t\t\t\ti = i+3;\r\n\t\t\t}\r\n\t\t}*/\r\n\t}", "static char[] generateAZBothCasesAndSpecial(int length) {\n charArray = new char[length];\n int k;\n for (int i = 0; i < length; i++) {\n k = (int) (Math.random() * 3);\n if (k == 0) {\n charArray[i] = RandomChar.generateAZLowerRangeChar();\n } else if (k == 1) {\n charArray[i] = RandomChar.generateAZUpperRangeChar();\n } else if (k == 2) {\n charArray[i] = RandomChar.generateSpecChar();\n }\n }\n return charArray;\n }", "public static void main(String[] args) {\n\t\tStringBuilder sb=new StringBuilder();\n\t\tString str=\"xheixhixhi\";\n\t\tint x=0;\n\t\tfor(int i=0;i<str.length();i++)\n\t\t{\n\t\t\tif(str.charAt(i)=='x')\n\t\t\t\tx++;\n\t\t\n\t\t\telse\n\t\t\t\tsb.append(str.charAt(i));\n\t\t}\n\t\tfor(int i=0;i<x;i++)\n\t\t\tsb.append('x');\n\t\tSystem.out.println(sb);\n\t\t\n\t\tString str1=\"xxxyyy\";\n\t\tStringBuffer sb1=new StringBuffer(str1);\n\t\tSystem.out.println(sb1.toString());\n\t\tfor(int i=0;i<(str1.length());i++)\n\t\t{\n\t\t\tif(sb1.charAt(i)==sb1.charAt(i+1))\n\t\t\t{\n\t\t\t\tSystem.out.println(i);\n\t\t\t\tsb1.insert(++i,'*');\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\tSystem.out.println(sb1.toString());\n\t\t\n\t\t//anagram\n\t\tString s1=\"niveda\";\n\t\tString s2=\"Nivedas\";\n\t\tString s4=s2.toLowerCase();\n\t\tchar[] s3=s1.toCharArray();\n\t\tchar[] s5=s4.toCharArray();\n\t\tArrays.sort(s3);\n\t\tArrays.sort(s5);\n\t\tboolean result=Arrays.equals(s3, s5);\n\t\tSystem.out.println(\"result is \"+result);\n\t\t\n\t\t//check all digits\n\t\tString s=\"09779\";\n\t\tif (s.isEmpty())\n\t\t\tSystem.out.println(\"empty\");;\n\n\t\tfor (int i = 0; i < s.length(); i++) {\n\t\tint temp = s.charAt(i) - (int)'0';\n\t\tSystem.out.println(temp);\n\t\tif (temp < 0 || temp > 9)\n\t\t\tSystem.out.println(\"false\");\n\t\t\n\t\t}\n\n\t\tSystem.out.println(\"true\");\n\n\t\t//reverse a string\n\t\tString s6=\"niveda is\";\n\t\tString sb4=new StringBuffer(s6).reverse().toString();\n\t\tSystem.out.println(sb4);\n\t\t\n\t\tStringBuilder s7=new StringBuilder();\n\t\tchar[] c1=s6.toCharArray();\n\t\tfor(int i=c1.length-1;i>=0;i--)\n\t\t{\n\t\t\ts7.append(c1[i]);\n\t\t}\n\t\tSystem.out.println(s7);\n\t\t\n\t\t//replace with space\n\t\tString str5=\"xxx yyy\";\n\t\tStringBuilder sb6=new StringBuilder(str5);\n\t\tSystem.out.println(sb6.toString());\n\t\tfor(int i=0;i<(str5.length());i++)\n\t\t{\n\t\t\tif(sb6.charAt(i)==32)\n\t\t\t{\n\t\t\t\tSystem.out.println(i);\n\t\t\t\tsb6.replace(i,i+1,\"%20\");\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\tSystem.out.println(sb6.toString());\n\t\t\n\t\tString sentence=\"my name is niveda\";\n\t\tList< String> words = Arrays.asList(sentence.split(\"\\\\s\")); \n\t\tCollections.reverse(words); \n\t\t\n\t\tSystem.out.println(words);\n\t\tStringBuilder sb8 = new StringBuilder(sentence.length()); \n\t\t\n\t\tfor (int i = 0; i <=words.size() - 1; i++)\n\t\t{ \n\t\t\tsb8.append(words.get(i)); \n\t\t\t\n\t\tsb8.append(' ');\n\t\t}\n\t\tSystem.out.println(sb8.toString().trim());\n\t\t\n\t\tStringBuffer sb9=new StringBuffer(sentence);\n\t\tString sb10=sb9.reverse().toString();\n\t\tSystem.out.println(\"old \"+sb10.toString().trim());\n\t\t\n\t\tStringBuilder reverse = new StringBuilder(); \n\t\tString[] sa = sentence.trim().split(\"\\\\s\"); \n\t\tString newest=\"\";\n\t\tfor (int i = sa.length - 1; i >= 0; i--) \n\t\t{ \n\t\t\tString newword=sa[i]; \n\t\t\t//reverse.append(' '); \n\t\t\tString newstring=\"\";\n\t\t\tfor(int n=newword.length()-1;n>=0;n--)\n\t\t\t{\n\t\t\t\tnewstring=newstring+newword.charAt(n);\n\t\t\n\t\t\t}\n\t\t\tnewest=newest+newstring+\" \";\n\t\t} \n\t\tSystem.out.println( reverse.toString().trim());\n\t\tSystem.out.println(\"newest \"+newest);\n\t\tSystem.out.println(\"number of words in the string \"+sa.length);\n\n\t\t\n\t\t//reverse chars in the word in place\n\t\tString s11=\"my name is niveda\";\n\t\tString reversestring=\"\";\n\t\tString[] c11=s11.trim().split(\"\\\\s\");\n\t\tfor(int k=0;k<c11.length;k++)\n\t\t{\n\t\t\tString word=c11[k];\n\t\t\tString reverseword=\"\";\n\t\t\tfor(int m=word.length()-1;m>=0;m--)\n\t\t\t{\n\t\t\t\t\n\t\t\treverseword=reverseword+word.charAt(m);\n\t\t\t}\n\t\t\treversestring=reversestring+reverseword+\" \";\n\t\t}\n\t\t\n\t\tSystem.out.println( reversestring);\n\t}", "private boolean verifySequence(String seq) {\n for (int i = 0; i < seq.length(); i++) {\n if (seq.charAt(i) != 'A' && seq.charAt(i) != 'T'\n && seq.charAt(i) != 'C' && seq.charAt(i) != 'G') {\n return false;\n }\n }\n return true;\n }", "@Test(timeout = 4000)\n public void test00() throws Throwable {\n DefaultNucleotideCodec defaultNucleotideCodec0 = DefaultNucleotideCodec.INSTANCE;\n byte[] byteArray0 = new byte[8];\n byteArray0[0] = (byte) (-19);\n Nucleotide nucleotide0 = Nucleotide.NotGuanine;\n Set<Nucleotide> set0 = nucleotide0.getAllPossibleAmbiguities();\n byte[] byteArray1 = defaultNucleotideCodec0.encode((Collection<Nucleotide>) set0);\n byteArray0[1] = (byte)0;\n byteArray0[2] = (byte) (-54);\n defaultNucleotideCodec0.isGap(byteArray0, (byte) (-54));\n byteArray0[3] = (byte) (-55);\n byteArray0[4] = (byte) (-88);\n defaultNucleotideCodec0.toString(byteArray1);\n byteArray0[5] = (byte)63;\n byteArray0[6] = (byte) (-23);\n byte[] byteArray2 = new byte[6];\n byteArray2[0] = (byte)1;\n byteArray2[1] = (byte) (-23);\n byteArray2[2] = (byte) (-55);\n byteArray2[3] = (byte) (-23);\n byteArray2[4] = (byte) (-54);\n byteArray2[5] = (byte)0;\n // Undeclared exception!\n try { \n defaultNucleotideCodec0.isGap(byteArray2, (-1962));\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }" ]
[ "0.6283604", "0.61179453", "0.5980319", "0.5850225", "0.5830683", "0.57799447", "0.5625223", "0.55858064", "0.5490835", "0.5434673", "0.5409878", "0.5326079", "0.5313844", "0.5213123", "0.5202516", "0.5200701", "0.51947474", "0.5193706", "0.5145225", "0.5135736", "0.5093737", "0.50615126", "0.50566584", "0.502963", "0.49760178", "0.49709997", "0.49643186", "0.49620765", "0.49522835", "0.49412584", "0.4930326", "0.49302143", "0.49268743", "0.49260408", "0.49165872", "0.49143025", "0.49007592", "0.48727056", "0.48619238", "0.4860364", "0.48450983", "0.48447704", "0.48357219", "0.48259598", "0.48227093", "0.48206443", "0.4803977", "0.4792507", "0.47916785", "0.47832492", "0.47693813", "0.4768203", "0.47670543", "0.47646803", "0.476148", "0.47590747", "0.47577456", "0.4733723", "0.47280017", "0.4724399", "0.47224098", "0.4721665", "0.47204053", "0.47193137", "0.4698287", "0.4697209", "0.4694267", "0.46914664", "0.4689437", "0.4674778", "0.46732768", "0.46725932", "0.46691158", "0.466588", "0.46602362", "0.46601534", "0.4657886", "0.46502954", "0.46464834", "0.46449545", "0.4628326", "0.46194464", "0.46194085", "0.46104166", "0.4607303", "0.4606326", "0.4604642", "0.45990598", "0.4597912", "0.45941424", "0.45890015", "0.4588027", "0.45865604", "0.45818233", "0.45817706", "0.4580217", "0.45789275", "0.45784134", "0.45742983", "0.45687193" ]
0.6344871
0
///aminoAcidCounts test cases///// /TEST 5 INPUT: "CCGUUGGCACUGUUG" EXPECTED OUTPUT = 1,3,1 ACTUAL OUTPUT = 1,3,1 This test uses the aminoAcidCounts method on every node of the list and then, adds its result to an array.
@Test public void aminoCountsTest1(){ AminoAcidLL first = AminoAcidLL.createFromRNASequence(a); int[] expected = {1,3,1}; assertArrayEquals(expected, first.aminoAcidCounts()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void aminoCountsTest2(){\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(b);\n int[] expected = {2,1,1,1};\n assertArrayEquals(expected, first.aminoAcidCounts());\n }", "@Test\n public void aminoListTest2(){\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(d);\n char[] expected = {'C','F','K','N','T'};\n assertArrayEquals(expected, first.aminoAcidList());\n }", "@Test\n public void aminoListTest1(){\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(a);\n char[] expected = {'P','L','A'};\n assertArrayEquals(expected, first.aminoAcidList());\n }", "@Test\n public void rnatest1(){\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(a);\n char[] firstArr = new char[3];\n char[] answer = {'P','L','A'};\n for(int i = 0; i < firstArr.length; i++){\n firstArr[i] = first.aminoAcid;\n System.out.println(first.aminoAcid);\n first = first.next;\n }\n assertArrayEquals(answer, firstArr);\n }", "@Test\n public void rnatest2(){\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(b);\n char[] firstArr = new char[4];\n char[] answer = {'T','S', 'V', 'F'};\n for(int i = 0; i < firstArr.length; i++){\n firstArr[i] = first.aminoAcid;\n System.out.println(first.aminoAcid);\n first = first.next;\n }\n assertArrayEquals(answer,firstArr);\n }", "public int[] contarCodons(String seq){\n int [] countCodons=new int[65];\n for (int i=0;i<seq.length()-2;i=i+3){\n String c=seq.substring(i, i+3);\n int j=0;\n while (j<nameCodon.length && nameCodon[j].compareTo(c)!=0) j++;\n if (j<nameCodon.length)\n countCodons[j]++;\n else\n countCodons[64]++;\n }\n return countCodons;\n\n }", "public static int countAnagram(ArrayList<String> arr) {\n int count = 0;\n for (HashMap.Entry<String, Integer> item : countOccurences(arr).entrySet()) {\n if (item.getValue()!=1) {\n count = count + item.getValue();\n }\n }\n return count;\n }", "public static void main(String[] args) {\r\n\t\t P187RepeatedDNASequences p = new P187RepeatedDNASequences();\r\n\t\t List<String> r = p.findRepeatedDnaSequences(\"AAAAACCCCCAAAAACCCCCCAAAAAGGGTTT\"); //\r\n\t\t for(String t : r) {\r\n\t\t\t System.out.println(t);\t\t\t \r\n\t\t }\r\n\t }", "@Test\n public void aminoCompareTest2() {\n //these list are already sorted\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(c);\n AminoAcidLL second = AminoAcidLL.createFromRNASequence(c);\n int expected = 0;\n assertEquals(expected, first.aminoAcidCompare(second));\n }", "@Test\n public void aminoCompareTest1(){\n //these list are already sorted\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(c);\n AminoAcidLL second = AminoAcidLL.createFromRNASequence(d);\n int expected = 1;\n assertEquals(expected, first.aminoAcidCompare(second));\n }", "int count() {\n\t\tArrayList<Integer> checked = new ArrayList<Integer>();\r\n\t\tint count = 0;\r\n\t\tfor (int x = 0; x < idNode.length; x++) {// Order of N2\r\n\t\t\tint rootX = getRoot(x);\r\n\t\t\tif (!checked.contains(rootX)) {// Order of N Access of Array\r\n\r\n\t\t\t\tSystem.out.println(\"root x is \" + rootX);\r\n\t\t\t\tcount++;\r\n\t\t\t\tchecked.add(rootX);// N Access of Array\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn count;\r\n\t}", "public int[] countInsigniaInHand(int inputPlayerID){\n\t\tint[] count = {0,0,0,0} ;\n\t\t// Counts how many of each insignia the player has\n\t\tfor(int i=0;i<playerArray[inputPlayerID].getCardsOwned().size();i++) {\n\t\t\tswitch (playerArray[inputPlayerID].getCardsOwned().get(i).getInsignia()) {\n\t\t\t case 'i': count[0]++; break;\n\t\t\t case 'c': count[1]++; break;\n\t\t\t case 'a': count[2]++; break;\n\t\t\t case 'w': count[3]++; break;\n\t\t\t}\n\t\t}\n\t\treturn count ;\n\t}", "public void getCounts() {\t\r\n\t\t\r\n\t\tfor(int i = 0; i < 4; i++)\r\n\t\t\tfor(int j = 0; j < 3; j++)\r\n\t\t\t\tthecounts[i][j] = 0;\r\n\t\t\r\n\t\tfor(int i=0;i<maps.length-1;i++) {\r\n\t\t\tif(maps.Array1.charAt(i) == 'H' && maps.Array1.charAt(i+1) == 'E')\r\n\t\t\t\tthecounts[0][0]++;\r\n\t\t\telse if(maps.Array1.charAt(i) == 'E' && maps.Array1.charAt(i+1) =='-') \r\n\t\t\t\tthecounts[0][1]++;\r\n\t\t\telse if(maps.Array1.charAt(i) == '-' && maps.Array1.charAt(i+1) == 'H')\r\n\t\t\t\tthecounts[0][2]++;\r\n\t\t\tif(maps.Array2.charAt(i) == 'H' && maps.Array2.charAt(i+1) == 'E')\r\n\t\t\t\tthecounts[1][0]++;\r\n\t\t\telse if(maps.Array2.charAt(i) == 'E' && maps.Array2.charAt(i+1) == '-') \r\n\t\t\t\tthecounts[1][1]++;\r\n\t\t\telse if(maps.Array2.charAt(i) == '-' && maps.Array2.charAt(i+1) == 'H')\r\n\t\t\t\tthecounts[1][2]++;\r\n\t\t\tif(maps.Array3.charAt(i) == 'H' && maps.Array3.charAt(i+1) == 'E')\r\n\t\t\t\tthecounts[2][0]++;\r\n\t\t\telse if(maps.Array3.charAt(i) == 'E' && maps.Array3.charAt(i+1) == '-') \r\n\t\t\t\tthecounts[2][1]++;\r\n\t\t\telse if(maps.Array3.charAt(i) == '-' && maps.Array3.charAt(i+1) == 'H')\r\n\t\t\t\tthecounts[2][2]++;\r\n\t\t\tif(maps.Array4.charAt(i) == 'H' && maps.Array4.charAt(i+1) == 'E')\r\n\t\t\t\tthecounts[3][0]++;\r\n\t\t\telse if(maps.Array4.charAt(i) == 'E'&&maps.Array4.charAt(i+1) == '-') \r\n\t\t\t\tthecounts[3][1]++;\r\n\t\t\telse if(maps.Array4.charAt(i) == '-' && maps.Array1.charAt(i+1) == 'H')\r\n\t\t\t\tthecounts[3][2]++;\r\n\t\t}\r\n\t\t\r\n\t\t//Getting transition value between 1 and 0\r\n\t\tfor(int i=0;i<4;i++) {\r\n\t\t\tfor(int j=0;j<3;j++) {\r\n\t\t\t\tthecounts[i][j]/=maps.length;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Displaying the obtained values\r\n\t\tSystem.out.println(\"\\nTRANSITION\");\r\n\t\tSystem.out.println(\"HYDROPHOBICITY: 1->2: \" + thecounts[0][0] + \" 2->3: \" + thecounts[0][1] + \" 3->1: \" + thecounts[0][2]);\r\n\t\tSystem.out.println(\"POLARIZABILITY: 1->2: \" + thecounts[1][0] + \" 2->3: \" + thecounts[1][1] + \" 3-1: \" + thecounts[1][2]);\r\n\t\tSystem.out.println(\"POLARITY: 1->2: \" + thecounts[2][0] + \" 2->3: \" + thecounts[2][1] + \" 3->1: \" + thecounts[2][2]);\r\n\t\tSystem.out.println(\"VAN DER WALLS VOLUME: 1->2: \" + thecounts[3][0] + \" 2->3: \" + thecounts[3][1] + \" 3->1: \" + thecounts[3][2]);\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\r\n\t\t//System.out.println(Integer.toBinaryString(31));\r\n\t\tint n = in.nextInt();\r\n\t\tint[] arr = new int[n];\r\n\t\tfor(int i = 0 ;i < n; i++) {\r\n\t\t\tarr[i] = in.nextInt();\r\n\t\t}\r\n\t\tArrays.sort(arr);\r\n\t\tint[] arr1 = new int[n];\r\n\t\tint co = 0;\r\n\t\tfor(int i = n- 1; i >= 0; i--) {\r\n\t\t\tarr1[co++] = arr[i];\r\n\t\t}\r\n\t\tString[] str = new String[n];\r\n\t\tfor(int i = 0; i < n; i++) {\r\n\t\t\tstr[i] = Integer.toBinaryString(arr1[i]);\r\n\t\t}\r\n\t\tint[] countArr = new int[n];\r\n\t\tint[] countArr1 = new int[n];\r\n\t\tTreeSet<Integer> set = new TreeSet<Integer>(); \r\n\t\tfor(int i = 0; i < n; i++) {\r\n\t\t\tcountArr[i] = 0;\r\n\t\t\tfor(int j = 0; j < str[i].length(); j++) {\r\n\t\t\t\tif(String.valueOf(str[i].charAt(j)).equals(\"1\")) {\r\n\t\t\t\t\tcountArr[i]++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tset.add(countArr[i]);\r\n\t\t}\r\n\t\tint[] arrCpy = new int[set.size()];\r\n\t\tint ct = set.size() - 1;\r\n\t\tIterator<Integer> it = set.iterator();\r\n\t\twhile(it.hasNext()) {\r\n\t\t\tarrCpy[ct--] = it.next();\r\n\t\t}\r\n\t\tfor(int i = 0; i < arrCpy.length; i++) {\r\n\t\t\tfor(int j = 0; j < n; j++) {\r\n\t\t\t\tif(arrCpy[i] == countArr[j]) {\r\n\t\t\t\t\tSystem.out.println(arr1[j]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\t\tList<String> list = new ArrayList<String>();\n\t\tlist.add(\"A201550B\");\n\t\tlist.add(\"ABB19991000Z\");\n\t\tlist.add(\"XYZ200019Z\");\n\t\tlist.add(\"ERF200220\");\n\t\tlist.add(\"SCD203010T\");\n\t\t//list.add(\"abC200010E\");\n\t\t//countFakes(list);\n\t\tSystem.out.println(countFakes(list));\n\n\t}", "public static void main(String[] args) {\r\n\r\n\t\tint n=439;\r\n\r\n\t\tint count = 1;\r\n\t\tint binary[] = new int[32];\r\n\t\tint i = 0;\r\n\t\twhile (n > 0) {\r\n\t\t\tbinary[i] = n % 2;\r\n\t\t\tn = n / 2;\r\n\t\t\ti++;\r\n\t\t}\r\n\r\n\t\tfor (int j = i - 1; j >= 0; j--) {\r\n\r\n\t\t\tString str = String.valueOf(i);\r\n\t\t\t\r\n\t\tString ar[]=str.split(\"0\");\r\n\t\t\t\r\n\t\tif(ar.length>1)\r\n\t\t{\r\n\t\t\tcount++;\r\n\t\t}\r\n\t\t/*\t\r\n\t\t\tif (binary[j] == 1 && binary[j + 1] == 1) {\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\r\n\t\t\tSystem.out.print(binary[j]);\r\n*/\r\n\t\t}\r\n\t\tSystem.out.print(count);\r\n\t\t/*scanner.close();*/\r\n\t}", "static void codonfreq(String s) {\n int[] fromNuc = new int[128];\r\n for (int i = 0; i < fromNuc.length; i++)\r\n fromNuc[i] = -1;\r\n fromNuc['a'] = fromNuc['A'] = 0;\r\n fromNuc['c'] = fromNuc['C'] = 1;\r\n fromNuc['g'] = fromNuc['G'] = 2;\r\n fromNuc['t'] = fromNuc['T'] = 3;\r\n // Count frequencies of codons (triples of nucleotides)\r\n int[][][] freq = new int[4][4][4];\r\n for (int i = 0; i + 2 < s.length(); i += 3) {\r\n int nuc1 = fromNuc[s.charAt(i)];\r\n int nuc2 = fromNuc[s.charAt(i + 1)];\r\n int nuc3 = fromNuc[s.charAt(i + 2)];\r\n freq[nuc1][nuc2][nuc3] += 1;\r\n }\r\n // The translation from index 0123 to nucleotide ACGT\r\n final char[] toNuc = {'A', 'C', 'G', 'T'};\r\n for (int i = 0; i < 4; i++)\r\n for (int j = 0; j < 4; j++) {\r\n for (int k = 0; k < 4; k++)\r\n System.out.print(\" \" + toNuc[i] + toNuc[j] + toNuc[k]\r\n + \": \" + freq[i][j][k]);\r\n System.out.println();\r\n }\r\n }", "public int getNumAyuAtracc();", "private int numberOfComponents(ArrayList<Integer>[] adj) {\n\t\t\t\t\n\t\tint n = adj.length;\n\t\tvisited = new boolean[n]; //default is false\n\t\tCCnum = new int[n];\n\t\tDFS(adj);\n\t\t\n\t\treturn cc;\n }", "private void computeParentCount() {\n parentCountArray = new int[numNodes+1];\n for(int i = 0; i < parentCountArray.length;i++){\n parentCountArray[i] = 0;\n }\n for(int i = 0; i < adjMatrix.length; i++){\n int hasParentCounter = 0;\n for(int j = 0; j < adjMatrix[i].length; j++){\n if(allNodes[i].orphan){\n hasParentCounter = -1;\n break;\n }\n if(adjMatrix[j][i] == 1) {\n hasParentCounter++;\n }\n }\n parentCountArray[i] = hasParentCounter;\n }\n\n\n for(int i = 0; i < adjMatrix.length;i++){\n for(int j =0; j < adjMatrix[i].length;j++){\n if(adjMatrix[j][i] == 1){\n if(allNodes[j].orphan && allNodes[i].orphan == false){\n parentCountArray[i]--;\n }\n }\n }\n }\n\n\n\n\n for(int i = 0; i < parentCountArray.length; i++){\n // System.out.println(i + \" has parent \" +parentCountArray[i]);\n }\n\n\n\n\n\n }", "private int[][] setAccuArray(ArrayList<String> alCalcAttr,\r\n\t\t\tArrayList<String> alClasAttr, ArrayList<String> alLeftChild,\r\n\t\t\tArrayList<String> alRightChild) {\r\n\t\tint[][] array = new int[2][2];\r\n\t\tint nLength = alCalcAttr.size();\r\n\r\n\t\tString strClas0 = alClasAttr.get(0);\r\n\t\tfor (int i = 0; i < nLength; ++i) {\r\n\r\n\t\t\tString strCalci = alCalcAttr.get(i);\r\n\t\t\tString strClasi = alClasAttr.get(i);\r\n\r\n\t\t\tif (alLeftChild.contains(strCalci)) {\r\n\t\t\t\tif (strClasi.equals(strClas0)) {\r\n\t\t\t\t\t++array[0][0];\r\n\t\t\t\t} else {\r\n\t\t\t\t\t++array[1][0];\r\n\t\t\t\t}\r\n\t\t\t} else if (alRightChild.contains(strCalci)) {\r\n\t\t\t\tif (strClasi.equals(strClas0)) {\r\n\t\t\t\t\t++array[0][1];\r\n\t\t\t\t} else {\r\n\t\t\t\t\t++array[1][1];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn array;\r\n\t}", "public static void abCount(String scoreLine, PrintStream output) {\n // initialize arrays for a count and b count\n int[] a = new int[NUM_OF_DIMENSIONS]; \n int[] b = new int[NUM_OF_DIMENSIONS]; \n\n // 2 for loop because there's 10 groups of 7 \n for(int i=0; i<10; i++){\n for(int j=0; j<7; j++){\n int aOrB = 0; // variable to keep track of if user put A or B where A equals 0 and B equals 1\n char currChar = scoreLine.charAt(i*7+j); // gets each character's position in a line\n \n // outer if statement for when user does not enter a dash \n if(currChar != '-'){\n // if user enters B, assign 1 to the aOrB variable\n if(currChar == 'B' || currChar == 'b'){\n aOrB = 1;\n }\n\n if(j==0){ // if statement to keep track of first dimesion (E vs I)\n // check aOrB's value to determine which array to add 1 to\n if(aOrB==0){\n a[0] += 1;\n } else {\n b[0] += 1;\n }\n } else if(j== 1 || j==2){ // else if statement to keep track of second dimension (S vs N)\n // check aOrB's value to determine which array to add 1 to\n if(aOrB==0){\n a[1] += 1;\n } else {\n b[1] += 1;\n }\n } else if(j== 3 || j==4){ // else if statement to keep track of third dimension (T vs F)\n // check aOrB's value to determine which array to add 1 to\n if(aOrB==0){\n a[2] += 1;\n } else {\n b[2] += 1;\n }\n } else { // else statement to keep track of fourth dimension (J vs P)\n // check aOrB's value to determine which array to add 1 to\n if(aOrB==0){\n a[3] += 1;\n } else {\n b[3] += 1;\n }\n }\n }\n }\n }\n displayScores(a,b,output); //call displayScores method to output A & B counts to output file\n bPercent(a,b,output); // call bPercent method to output percentage of b answers to output file\n type(a,b,output); // call type method to output personality type to output file\n }", "int getAoisCount();", "public static void main(String[] args) throws NumberFormatException, IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint t = Integer.parseInt(br.readLine());\n\t\tchar[] input = br.readLine().toCharArray();\n\t\tint[] arr = new int[26];\n\t\tfor (int i = 0; i < input.length; i++) {\n\t\t\tarr[input[i] - 'A']++;\n\t\t}\n\t\t\n\t\tint count = 0;\n\t\tfor (int i = 1; i < t; i++) {\n\t\t\tchar[] candidates = br.readLine().toCharArray();\n\t\t\tint[] scores = new int[26];\n\t\t\tfor (int j = 0; j < candidates.length; j++) {\n\t\t\t\tscores[candidates[j] - 'A']++;\n\t\t\t}\n\t\t\t\n\t\t\tif (similar(arr, scores)) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(count);\n\t}", "public static void main(String[] args) {\n \n Scanner input = new Scanner(System.in);\n int n = input.nextInt();\n String[] p = new String[n];\n int[] counter = new int[n];\n for(int i = 0; i<n;i++ ){\n \tp[i] = input.next();\n \t\n \tint j = 0;\n \twhile(j<p[i].length()){\n \t\tint t =1;\n \t\tif(j + t < p[i].length()){\n \t\twhile(p[i].charAt(j) == p[i].charAt(j+t) ){\n \t\t\tt++;\n \t\t\tcounter[i]++;\n \t\t\tif(j+t >= p[i].length())\n \t\t\t\tbreak;\n \t\t\t\n \t\t}\n \t\t}\n \t\tj = j+t;\n \t\t\n \t\t\n \t\t\n \t}\n }\n \n for(int i= 0; i<n;i++){\n\t System.out.println(counter[i]);\n }\n \n \n \n input.close();\n }", "public void testCount()\n\t{\n\t\tinfo.append(a1);\n\t\tinfo.append(a2);\n\t\tinfo.append(a3);\n\t\tassertEquals(3,info.getSynonymsCount());\n\t}", "@Test\n\tpublic void testGetCounts() {\n\t\tString cellBC = \"ATCAGGGACAGA\";\n\n\t\tint snpPos = 76227022;\n\t\tInterval snpInterval = new Interval(\"HUMAN_1\", snpPos, snpPos, true, \"test\");\n\t\tSampleGenotypeProbabilities result = new SampleGenotypeProbabilities(snpInterval, cellBC);\n\t\tSNPUMIBasePileup p = getPileUpFromFile(cellBC, \"CGGGGCTC\");\n\t\tp.addLocusFunction(LocusFunction.CODING);\n\t\tresult.add(p);\n\t\tresult.add(getPileUpFromFile(cellBC, \"CGCGGGAC\")); // this read doesn't overlap the SNP so it isn't added!\n\t\tresult.add(getPileUpFromFile(cellBC, \"CTGGGCTC\"));\n\t\tresult.add(getPileUpFromFile(cellBC, \"GGAATGTG\"));\n\t\tresult.add(getPileUpFromFile(cellBC, \"GTGCCGTG\"));\n\t\tresult.add(getPileUpFromFile(cellBC, \"TCGCAGAC\"));\n\n\t\t// the code coverage gods are pleased.\n\t\tAssert.assertEquals(result.getCell(), cellBC);\n\t\tAssert.assertEquals(result.getSNPInterval(), snpInterval);\n\n\t\tAssert.assertNotNull(result.toString());\n\n\t\t// get the unfiltered results.\n\t\tObjectCounter<Character> umiCounts = result.getUMIBaseCounts();\n\t\tObjectCounter<Character> umiCountsExpected = new ObjectCounter<>();\n\t\tumiCountsExpected.incrementByCount('A', 2);\n\t\tumiCountsExpected.incrementByCount('G', 3);\n\t\tAssert.assertEquals(umiCounts, umiCountsExpected);\n\n\t\tObjectCounter<Character> readCounts = result.getReadBaseCounts();\n\t\tObjectCounter<Character> readCountsExpected = new ObjectCounter<>();\n\t\treadCountsExpected.incrementByCount('A', 2);\n\t\treadCountsExpected.incrementByCount('G', 5);\n\t\tAssert.assertEquals(readCounts, readCountsExpected);\n\n\t\tSet<LocusFunction> expected = new HashSet<>(Arrays.asList(LocusFunction.CODING));\n\t\tAssert.assertEquals(result.getLocusFunctions(), expected);\n\n\t}", "private static int[] letterHist(String acharArray) {\n int[] alphabet = new int[26];\n\n for (int i = 0; i < acharArray.length(); i++) {\n char singleChar = acharArray.toLowerCase().charAt(i);\n\n if ('a' <= singleChar && 'z' >= singleChar) {\n alphabet[singleChar - 'a']++;\n }\n }\n return alphabet;\n }", "public int[] getNumAnchors() {\n if (numAnchors == null) {\n if (rule.isAnchored()) {\n numAnchors = new int[end];\n for (int i = start; i < end; i++) numAnchors[i] = 1;\n } else {\n numAnchors = new int[0];\n for (Derivation child : children) {\n int[] childNumAnchors = child.getNumAnchors();\n if (numAnchors.length < childNumAnchors.length) {\n int[] newNumAnchors = new int[childNumAnchors.length];\n for (int i = 0; i < numAnchors.length; i++)\n newNumAnchors[i] = numAnchors[i];\n numAnchors = newNumAnchors;\n }\n for (int i = 0; i < childNumAnchors.length; i++)\n numAnchors[i] += childNumAnchors[i];\n }\n }\n }\n return numAnchors;\n }", "public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n while (scanner.hasNext()) {\n int n = scanner.nextInt();\n int[] A = new int[n];\n for (int i = 0; i < n; i++) {\n A[i] = scanner.nextInt();\n }\n System.out.println(count(A, n));\n }\n }", "public static int[] count(int[] array){\n //Initialize variables for each digit.\n int count1 = 0;\n int count2 = 0;\n int count3 = 0;\n int count4 = 0;\n int count5 = 0;\n int count6 = 0;\n int count7 = 0;\n int count8 = 0;\n int count9 = 0;\n //For each item in the array, check which number it is.(1-9)\n //Increase that number count by 1.\n for(int i = 0; i < (array.length); i++){\n if(array[i] == 1){\n count1 ++;\n }\n else if(array[i] == 2){\n count2 ++;\n }\n else if(array[i] == 3){\n count3 ++;\n }\n else if(array[i] == 4){\n count4 ++;\n }\n else if(array[i] == 5){\n count5 ++;\n }\n else if(array[i] == 6){\n count6 ++;\n }\n else if(array[i] == 7){\n count7 ++;\n }\n else if(array[i] == 8){\n count8 ++;\n }\n else if(array[i] == 9){\n count9 ++;\n }\n }\n\n //Assign the counter amount into the array\n int[] amounts = {count1, count2, count3, count4, count5, count6, count7, count8, count9};\n\n //return the array\n return(amounts);\n }", "public int f1(List<Book> a) {\r\n int count = 0;\r\n for (Book o : a) {\r\n int demchu = 0;\r\n int demso = 0;\r\n for (int i = 0; i < o.getCode().length(); i++) {\r\n char c = o.getCode().charAt(i);\r\n if (Character.isDigit(c)) {\r\n demso++;\r\n }\r\n if (Character.isLetter(c)) {\r\n demchu++;\r\n }\r\n }\r\n if (demchu != 0 && demso != 0) {\r\n count++;\r\n }\r\n }\r\n return count;\r\n\r\n }", "public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in); //assign size of input\n System.out.println(\"enter the number of elements\");\n String str = sc.nextLine();\n int N = Integer.parseInt(str);\n\n int[] arr = new int[N];\n\n for (int i = 0; i < N; i++) { //assign values of input\n System.out.println(\"enter element \" + (i + 1));\n String str2 = sc.nextLine();\n int number = Integer.parseInt(str2);\n\n arr[i] = number;\n }\n\n //find cluster count\n int clusterCount = 0;\n\n for (int h = 0; h < N - 1; h++) {\n if (arr[h] == arr[h + 1]) {\n int count = h + 1;\n while (arr[h] == arr[count]) {\n count++;\n }\n h = count;\n clusterCount++;\n }\n } //output \n System.out.println(clusterCount);\n\n }", "public static void main(String[] args) {\n\n\t\tint arr[] = { 2, 3, 3, 2, 5 };\n\t\tfindCounts(arr, arr.length);\n\n\t\tint arr1[] = { 1 };\n\t\tfindCounts(arr1, arr1.length);\n\n\t\tint arr3[] = { 4, 4, 4, 4 };\n\t\tfindCounts(arr3, arr3.length);\n\n\t\tint arr2[] = { 1, 3, 5, 7, 9, 1, 3, 5, 7, 9, 1 };\n\t\tfindCounts(arr2, arr2.length);\n\n\t\tint arr4[] = { 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 };\n\t\tfindCounts(arr4, arr4.length);\n\n\t\tint arr5[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 };\n\t\tfindCounts(arr5, arr5.length);\n\n\t\tint arr6[] = { 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 };\n\t\tfindCounts(arr6, arr6.length);\n\t}", "public static int[] mucScore(LeanDocument key, LeanDocument response)\n{\n // System.out.println(\"==========================================================\");\n // System.out.println(\"Key:\\n\"+key.toStringNoSing()+\"\\n*************************\\nResponse:\\n\"+response.toStringNoSing());\n\n Iterator<TreeMap<Integer, Integer>> goldChains = key.chainIterator();\n // double mucRecall = 0.0;\n int mucRecallNom = 0;\n int mucRecallDenom = 0;\n while (goldChains.hasNext()) {\n TreeMap<Integer, Integer> keyChain = goldChains.next();\n if (keyChain.size() > 1) {\n int numInt = numIntersect(key, keyChain, response);\n\n // int numMatched = getNumMatched(key, keyChain);\n // if(numMatched>0){\n // mucRecallNom += numMatched-numInt;\n mucRecallNom += (keyChain.size() - numInt);\n // mucRecallDenom += numMatched-1;\n mucRecallDenom += keyChain.size() - 1;\n\n // System.out.println(keyChain+\"\\n\"+(keyChain.size() - numInt)+\"/\"+(keyChain.size()-1));\n // }\n }\n }\n int[] result = { mucRecallNom, mucRecallDenom };\n\n return result;\n}", "@Override\n public long[ ][ ] count() {\n // precompute common nodes\n for (int x = 0; x < n; x++) {\n for (int n1 = 0; n1 < deg[x]; n1++) {\n int a = adj[x][n1];\n for (int n2 = n1 + 1; n2 < deg[x]; n2++) {\n int b = adj[x][n2];\n Tuple ab = createTuple(a, b);\n common2.put(ab, common2.getOrDefault(ab, 0) + 1);\n for (int n3 = n2 + 1; n3 < deg[x]; n3++) {\n int c = adj[x][n3];\n boolean st = adjacent(adj[a], b) ? (adjacent(adj[a], c) || adjacent(adj[b], c)) :\n (adjacent(adj[a], c) && adjacent(adj[b], c));\n if (!st) continue;\n Tuple abc = createTuple(a, b, c);\n common3.put(abc, common3.getOrDefault(abc, 0) + 1);\n }\n }\n }\n }\n\n // precompute triangles that span over edges\n int[ ] tri = countTriangles();\n\n // count full graphlets\n long[ ] C5 = new long[n];\n int[ ] neigh = new int[n];\n int[ ] neigh2 = new int[n];\n int nn, nn2;\n for (int x = 0; x < n; x++) {\n for (int nx = 0; nx < deg[x]; nx++) {\n int y = adj[x][nx];\n if (y >= x) break;\n nn = 0;\n for (int ny = 0; ny < deg[y]; ny++) {\n int z = adj[y][ny];\n if (z >= y) break;\n if (adjacent(adj[x], z)) {\n neigh[nn++] = z;\n }\n }\n for (int i = 0; i < nn; i++) {\n int z = neigh[i];\n nn2 = 0;\n for (int j = i + 1; j < nn; j++) {\n int zz = neigh[j];\n if (adjacent(adj[z], zz)) {\n neigh2[nn2++] = zz;\n }\n }\n for (int i2 = 0; i2 < nn2; i2++) {\n int zz = neigh2[i2];\n for (int j2 = i2 + 1; j2 < nn2; j2++) {\n int zzz = neigh2[j2];\n if (adjacent(adj[zz], zzz)) {\n C5[x]++;\n C5[y]++;\n C5[z]++;\n C5[zz]++;\n C5[zzz]++;\n }\n }\n }\n }\n }\n }\n\n int[ ] common_x = new int[n];\n int[ ] common_x_list = new int[n];\n int ncx = 0;\n int[ ] common_a = new int[n];\n int[ ] common_a_list = new int[n];\n int nca = 0;\n\n // set up a system of equations relating orbit counts\n for (int x = 0; x < n; x++) {\n for (int i = 0; i < ncx; i++) common_x[common_x_list[i]] = 0;\n ncx = 0;\n\n // smaller graphlets\n orbit[x][0] = deg[x];\n for (int nx1 = 0; nx1 < deg[x]; nx1++) {\n int a = adj[x][nx1];\n for (int nx2 = nx1 + 1; nx2 < deg[x]; nx2++) {\n int b = adj[x][nx2];\n if (adjacent(adj[a], b)) orbit[x][3]++;\n else orbit[x][2]++;\n }\n for (int na = 0; na < deg[a]; na++) {\n int b = adj[a][na];\n if (b != x && !adjacent(adj[x], b)) {\n orbit[x][1]++;\n if (common_x[b] == 0) common_x_list[ncx++] = b;\n common_x[b]++;\n }\n }\n }\n\n long f_71 = 0, f_70 = 0, f_67 = 0, f_66 = 0, f_58 = 0, f_57 = 0; // 14\n long f_69 = 0, f_68 = 0, f_64 = 0, f_61 = 0, f_60 = 0, f_55 = 0, f_48 = 0, f_42 = 0, f_41 = 0; // 13\n long f_65 = 0, f_63 = 0, f_59 = 0, f_54 = 0, f_47 = 0, f_46 = 0, f_40 = 0; // 12\n long f_62 = 0, f_53 = 0, f_51 = 0, f_50 = 0, f_49 = 0, f_38 = 0, f_37 = 0, f_36 = 0; // 8\n long f_44 = 0, f_33 = 0, f_30 = 0, f_26 = 0; // 11\n long f_52 = 0, f_43 = 0, f_32 = 0, f_29 = 0, f_25 = 0; // 10\n long f_56 = 0, f_45 = 0, f_39 = 0, f_31 = 0, f_28 = 0, f_24 = 0; // 9\n long f_35 = 0, f_34 = 0, f_27 = 0, f_18 = 0, f_16 = 0, f_15 = 0; // 4\n long f_17 = 0; // 5\n long f_22 = 0, f_20 = 0, f_19 = 0; // 6\n long f_23 = 0, f_21 = 0; // 7\n\n for (int nx1 = 0; nx1 < deg[x]; nx1++) {\n int a = inc[x][nx1]._1, xa = inc[x][nx1]._2;\n\n for (int i = 0; i < nca; i++) common_a[common_a_list[i]] = 0;\n nca = 0;\n for (int na = 0; na < deg[a]; na++) {\n int b = adj[a][na];\n for (int nb = 0; nb < deg[b]; nb++) {\n int c = adj[b][nb];\n if (c == a || adjacent(adj[a], c)) continue;\n if (common_a[c] == 0) common_a_list[nca++] = c;\n common_a[c]++;\n }\n }\n\n // x = orbit-14 (tetrahedron)\n for (int nx2 = nx1 + 1; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (!adjacent(adj[a], b)) continue;\n for (int nx3 = nx2 + 1; nx3 < deg[x]; nx3++) {\n int c = inc[x][nx3]._1, xc = inc[x][nx3]._2;\n if (!adjacent(adj[a], c) || !adjacent(adj[b], c)) continue;\n orbit[x][14]++;\n f_70 += common3.getOrDefault(createTuple(a, b, c), 0) - 1;\n f_71 += (tri[xa] > 2 && tri[xb] > 2) ? (common3.getOrDefault(createTuple(x, a, b), 0) - 1) : 0;\n f_71 += (tri[xa] > 2 && tri[xc] > 2) ? (common3.getOrDefault(createTuple(x, a, c), 0) - 1) : 0;\n f_71 += (tri[xb] > 2 && tri[xc] > 2) ? (common3.getOrDefault(createTuple(x, b, c), 0) - 1) : 0;\n f_67 += tri[xa] - 2 + tri[xb] - 2 + tri[xc] - 2;\n f_66 += common2.getOrDefault(createTuple(a, b), 0) - 2;\n f_66 += common2.getOrDefault(createTuple(a, c), 0) - 2;\n f_66 += common2.getOrDefault(createTuple(b, c), 0) - 2;\n f_58 += deg[x] - 3;\n f_57 += deg[a] - 3 + deg[b] - 3 + deg[c] - 3;\n }\n }\n\n // x = orbit-13 (diamond)\n for (int nx2 = 0; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (!adjacent(adj[a], b)) continue;\n for (int nx3 = nx2 + 1; nx3 < deg[x]; nx3++) {\n int c = inc[x][nx3]._1, xc = inc[x][nx3]._2;\n if (!adjacent(adj[a], c) || adjacent(adj[b], c)) continue;\n orbit[x][13]++;\n f_69 += (tri[xb] > 1 && tri[xc] > 1) ? (common3.getOrDefault(createTuple(x, b, c), 0) - 1) : 0;\n f_68 += common3.getOrDefault(createTuple(a, b, c), 0) - 1;\n f_64 += common2.getOrDefault(createTuple(b, c), 0) - 2;\n f_61 += tri[xb] - 1 + tri[xc] - 1;\n f_60 += common2.getOrDefault(createTuple(a, b), 0) - 1;\n f_60 += common2.getOrDefault(createTuple(a, c), 0) - 1;\n f_55 += tri[xa] - 2;\n f_48 += deg[b] - 2 + deg[c] - 2;\n f_42 += deg[x] - 3;\n f_41 += deg[a] - 3;\n }\n }\n\n // x = orbit-12 (diamond)\n for (int nx2 = nx1 + 1; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (!adjacent(adj[a], b)) continue;\n for (int na = 0; na < deg[a]; na++) {\n int c = inc[a][na]._1, ac = inc[a][na]._2;\n if (c == x || adjacent(adj[x], c) || !adjacent(adj[b], c)) continue;\n orbit[x][12]++;\n f_65 += (tri[ac] > 1) ? common3.getOrDefault(createTuple(a, b, c), 0) : 0;\n f_63 += common_x[c] - 2;\n f_59 += tri[ac] - 1 + common2.getOrDefault(createTuple(b, c), 0) - 1;\n f_54 += common2.getOrDefault(createTuple(a, b), 0) - 2;\n f_47 += deg[x] - 2;\n f_46 += deg[c] - 2;\n f_40 += deg[a] - 3 + deg[b] - 3;\n }\n }\n\n // x = orbit-8 (cycle)\n for (int nx2 = nx1 + 1; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (adjacent(adj[a], b)) continue;\n for (int na = 0; na < deg[a]; na++) {\n int c = inc[a][na]._1, ac = inc[a][na]._2;\n if (c == x || adjacent(adj[x], c) || !adjacent(adj[b], c)) continue;\n orbit[x][8]++;\n f_62 += (tri[ac] > 0) ? common3.getOrDefault(createTuple(a, b, c), 0) : 0;\n f_53 += tri[xa] + tri[xb];\n f_51 += tri[ac] + common2.getOrDefault(createTuple(c, b), 0);\n f_50 += common_x[c] - 2;\n f_49 += common_a[b] - 2;\n f_38 += deg[x] - 2;\n f_37 += deg[a] - 2 + deg[b] - 2;\n f_36 += deg[c] - 2;\n }\n }\n\n // x = orbit-11 (paw)\n for (int nx2 = nx1 + 1; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (!adjacent(adj[a], b)) continue;\n for (int nx3 = 0; nx3 < deg[x]; nx3++) {\n int c = inc[x][nx3]._1, xc = inc[x][nx3]._2;\n if (c == a || c == b || adjacent(adj[a], c) || adjacent(adj[b], c)) continue;\n orbit[x][11]++;\n f_44 += tri[xc];\n f_33 += deg[x] - 3;\n f_30 += deg[c] - 1;\n f_26 += deg[a] - 2 + deg[b] - 2;\n }\n }\n\n // x = orbit-10 (paw)\n for (int nx2 = 0; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (!adjacent(adj[a], b)) continue;\n for (int nb = 0; nb < deg[b]; nb++) {\n int c = inc[b][nb]._1, bc = inc[b][nb]._2;\n if (c == x || c == a || adjacent(adj[a], c) || adjacent(adj[x], c)) continue;\n orbit[x][10]++;\n f_52 += common_a[c] - 1;\n f_43 += tri[bc];\n f_32 += deg[b] - 3;\n f_29 += deg[c] - 1;\n f_25 += deg[a] - 2;\n }\n }\n\n // x = orbit-9 (paw)\n for (int na1 = 0; na1 < deg[a]; na1++) {\n int b = inc[a][na1]._1, ab = inc[a][na1]._2;\n if (b == x || adjacent(adj[x], b)) continue;\n for (int na2 = na1 + 1; na2 < deg[a]; na2++) {\n int c = inc[a][na2]._1, ac = inc[a][na2]._2;\n if (c == x || !adjacent(adj[b], c) || adjacent(adj[x], c)) continue;\n orbit[x][9]++;\n f_56 += (tri[ab] > 1 && tri[ac] > 1) ? common3.getOrDefault(createTuple(a, b, c), 0) : 0;\n f_45 += common2.getOrDefault(createTuple(b, c), 0) - 1;\n f_39 += tri[ab] - 1 + tri[ac] - 1;\n f_31 += deg[a] - 3;\n f_28 += deg[x] - 1;\n f_24 += deg[b] - 2 + deg[c] - 2;\n }\n }\n\n // x = orbit-4 (path)\n for (int na = 0; na < deg[a]; na++) {\n int b = inc[a][na]._1, ab = inc[a][na]._2;\n if (b == x || adjacent(adj[x], b)) continue;\n for (int nb = 0; nb < deg[b]; nb++) {\n int c = inc[b][nb]._1, bc = inc[b][nb]._2;\n if (c == a || adjacent(adj[a], c) || adjacent(adj[x], c)) continue;\n orbit[x][4]++;\n f_35 += common_a[c] - 1;\n f_34 += common_x[c];\n f_27 += tri[bc];\n f_18 += deg[b] - 2;\n f_16 += deg[x] - 1;\n f_15 += deg[c] - 1;\n }\n }\n\n // x = orbit-5 (path)\n for (int nx2 = 0; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (b == a || adjacent(adj[a], b)) continue;\n for (int nb = 0; nb < deg[b]; nb++) {\n int c = inc[b][nb]._1, bc = inc[b][nb]._2;\n if (c == x || adjacent(adj[a], c) || adjacent(adj[x], c)) continue;\n orbit[x][5]++;\n f_17 += deg[a] - 1;\n }\n }\n\n // x = orbit-6 (claw)\n for (int na1 = 0; na1 < deg[a]; na1++) {\n int b = inc[a][na1]._1, ab = inc[a][na1]._2;\n if (b == x || adjacent(adj[x], b)) continue;\n for (int na2 = na1 + 1; na2 < deg[a]; na2++) {\n int c = inc[a][na2]._1, ac = inc[a][na2]._2;\n if (c == x || adjacent(adj[x], c) || adjacent(adj[b], c)) continue;\n orbit[x][6]++;\n f_22 += deg[a] - 3;\n f_20 += deg[x] - 1;\n f_19 += deg[b] - 1 + deg[c] - 1;\n }\n }\n\n // x = orbit-7 (claw)\n for (int nx2 = nx1 + 1; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (adjacent(adj[a], b)) continue;\n for (int nx3 = nx2 + 1; nx3 < deg[x]; nx3++) {\n int c = inc[x][nx3]._1, xc = inc[x][nx3]._2;\n if (adjacent(adj[a], c) || adjacent(adj[b], c)) continue;\n orbit[x][7]++;\n f_23 += deg[x] - 3;\n f_21 += deg[a] - 1 + deg[b] - 1 + deg[c] - 1;\n }\n }\n }\n\n // solve equations\n orbit[x][72] = C5[x];\n orbit[x][71] = (f_71 - 12 * orbit[x][72]) / 2;\n orbit[x][70] = (f_70 - 4 * orbit[x][72]);\n orbit[x][69] = (f_69 - 2 * orbit[x][71]) / 4;\n orbit[x][68] = (f_68 - 2 * orbit[x][71]);\n orbit[x][67] = (f_67 - 12 * orbit[x][72] - 4 * orbit[x][71]);\n orbit[x][66] = (f_66 - 12 * orbit[x][72] - 2 * orbit[x][71] - 3 * orbit[x][70]);\n orbit[x][65] = (f_65 - 3 * orbit[x][70]) / 2;\n orbit[x][64] = (f_64 - 2 * orbit[x][71] - 4 * orbit[x][69] - 1 * orbit[x][68]);\n orbit[x][63] = (f_63 - 3 * orbit[x][70] - 2 * orbit[x][68]);\n orbit[x][62] = (f_62 - 1 * orbit[x][68]) / 2;\n orbit[x][61] = (f_61 - 4 * orbit[x][71] - 8 * orbit[x][69] - 2 * orbit[x][67]) / 2;\n orbit[x][60] = (f_60 - 4 * orbit[x][71] - 2 * orbit[x][68] - 2 * orbit[x][67]);\n orbit[x][59] = (f_59 - 6 * orbit[x][70] - 2 * orbit[x][68] - 4 * orbit[x][65]);\n orbit[x][58] = (f_58 - 4 * orbit[x][72] - 2 * orbit[x][71] - 1 * orbit[x][67]);\n orbit[x][57] = (f_57 - 12 * orbit[x][72] - 4 * orbit[x][71] - 3 * orbit[x][70] - 1 * orbit[x][67] - 2 * orbit[x][66]);\n orbit[x][56] = (f_56 - 2 * orbit[x][65]) / 3;\n orbit[x][55] = (f_55 - 2 * orbit[x][71] - 2 * orbit[x][67]) / 3;\n orbit[x][54] = (f_54 - 3 * orbit[x][70] - 1 * orbit[x][66] - 2 * orbit[x][65]) / 2;\n orbit[x][53] = (f_53 - 2 * orbit[x][68] - 2 * orbit[x][64] - 2 * orbit[x][63]);\n orbit[x][52] = (f_52 - 2 * orbit[x][66] - 2 * orbit[x][64] - 1 * orbit[x][59]) / 2;\n orbit[x][51] = (f_51 - 2 * orbit[x][68] - 2 * orbit[x][63] - 4 * orbit[x][62]);\n orbit[x][50] = (f_50 - 1 * orbit[x][68] - 2 * orbit[x][63]) / 3;\n orbit[x][49] = (f_49 - 1 * orbit[x][68] - 1 * orbit[x][64] - 2 * orbit[x][62]) / 2;\n orbit[x][48] = (f_48 - 4 * orbit[x][71] - 8 * orbit[x][69] - 2 * orbit[x][68] - 2 * orbit[x][67] - 2 * orbit[x][64] - 2 * orbit[x][61] - 1 * orbit[x][60]);\n orbit[x][47] = (f_47 - 3 * orbit[x][70] - 2 * orbit[x][68] - 1 * orbit[x][66] - 1 * orbit[x][63] - 1 * orbit[x][60]);\n orbit[x][46] = (f_46 - 3 * orbit[x][70] - 2 * orbit[x][68] - 2 * orbit[x][65] - 1 * orbit[x][63] - 1 * orbit[x][59]);\n orbit[x][45] = (f_45 - 2 * orbit[x][65] - 2 * orbit[x][62] - 3 * orbit[x][56]);\n orbit[x][44] = (f_44 - 1 * orbit[x][67] - 2 * orbit[x][61]) / 4;\n orbit[x][43] = (f_43 - 2 * orbit[x][66] - 1 * orbit[x][60] - 1 * orbit[x][59]) / 2;\n orbit[x][42] = (f_42 - 2 * orbit[x][71] - 4 * orbit[x][69] - 2 * orbit[x][67] - 2 * orbit[x][61] - 3 * orbit[x][55]);\n orbit[x][41] = (f_41 - 2 * orbit[x][71] - 1 * orbit[x][68] - 2 * orbit[x][67] - 1 * orbit[x][60] - 3 * orbit[x][55]);\n orbit[x][40] = (f_40 - 6 * orbit[x][70] - 2 * orbit[x][68] - 2 * orbit[x][66] - 4 * orbit[x][65] - 1 * orbit[x][60] - 1 * orbit[x][59] - 4 * orbit[x][54]);\n orbit[x][39] = (f_39 - 4 * orbit[x][65] - 1 * orbit[x][59] - 6 * orbit[x][56]) / 2;\n orbit[x][38] = (f_38 - 1 * orbit[x][68] - 1 * orbit[x][64] - 2 * orbit[x][63] - 1 * orbit[x][53] - 3 * orbit[x][50]);\n orbit[x][37] = (f_37 - 2 * orbit[x][68] - 2 * orbit[x][64] - 2 * orbit[x][63] - 4 * orbit[x][62] - 1 * orbit[x][53] - 1 * orbit[x][51] - 4 * orbit[x][49]);\n orbit[x][36] = (f_36 - 1 * orbit[x][68] - 2 * orbit[x][63] - 2 * orbit[x][62] - 1 * orbit[x][51] - 3 * orbit[x][50]);\n orbit[x][35] = (f_35 - 1 * orbit[x][59] - 2 * orbit[x][52] - 2 * orbit[x][45]) / 2;\n orbit[x][34] = (f_34 - 1 * orbit[x][59] - 2 * orbit[x][52] - 1 * orbit[x][51]) / 2;\n orbit[x][33] = (f_33 - 1 * orbit[x][67] - 2 * orbit[x][61] - 3 * orbit[x][58] - 4 * orbit[x][44] - 2 * orbit[x][42]) / 2;\n orbit[x][32] = (f_32 - 2 * orbit[x][66] - 1 * orbit[x][60] - 1 * orbit[x][59] - 2 * orbit[x][57] - 2 * orbit[x][43] - 2 * orbit[x][41] - 1 * orbit[x][40]) / 2;\n orbit[x][31] = (f_31 - 2 * orbit[x][65] - 1 * orbit[x][59] - 3 * orbit[x][56] - 1 * orbit[x][43] - 2 * orbit[x][39]);\n orbit[x][30] = (f_30 - 1 * orbit[x][67] - 1 * orbit[x][63] - 2 * orbit[x][61] - 1 * orbit[x][53] - 4 * orbit[x][44]);\n orbit[x][29] = (f_29 - 2 * orbit[x][66] - 2 * orbit[x][64] - 1 * orbit[x][60] - 1 * orbit[x][59] - 1 * orbit[x][53] - 2 * orbit[x][52] - 2 * orbit[x][43]);\n orbit[x][28] = (f_28 - 2 * orbit[x][65] - 2 * orbit[x][62] - 1 * orbit[x][59] - 1 * orbit[x][51] - 1 * orbit[x][43]);\n orbit[x][27] = (f_27 - 1 * orbit[x][59] - 1 * orbit[x][51] - 2 * orbit[x][45]) / 2;\n orbit[x][26] = (f_26 - 2 * orbit[x][67] - 2 * orbit[x][63] - 2 * orbit[x][61] - 6 * orbit[x][58] - 1 * orbit[x][53] - 2 * orbit[x][47] - 2 * orbit[x][42]);\n orbit[x][25] = (f_25 - 2 * orbit[x][66] - 2 * orbit[x][64] - 1 * orbit[x][59] - 2 * orbit[x][57] - 2 * orbit[x][52] - 1 * orbit[x][48] - 1 * orbit[x][40]) / 2;\n orbit[x][24] = (f_24 - 4 * orbit[x][65] - 4 * orbit[x][62] - 1 * orbit[x][59] - 6 * orbit[x][56] - 1 * orbit[x][51] - 2 * orbit[x][45] - 2 * orbit[x][39]);\n orbit[x][23] = (f_23 - 1 * orbit[x][55] - 1 * orbit[x][42] - 2 * orbit[x][33]) / 4;\n orbit[x][22] = (f_22 - 2 * orbit[x][54] - 1 * orbit[x][40] - 1 * orbit[x][39] - 1 * orbit[x][32] - 2 * orbit[x][31]) / 3;\n orbit[x][21] = (f_21 - 3 * orbit[x][55] - 3 * orbit[x][50] - 2 * orbit[x][42] - 2 * orbit[x][38] - 2 * orbit[x][33]);\n orbit[x][20] = (f_20 - 2 * orbit[x][54] - 2 * orbit[x][49] - 1 * orbit[x][40] - 1 * orbit[x][37] - 1 * orbit[x][32]);\n orbit[x][19] = (f_19 - 4 * orbit[x][54] - 4 * orbit[x][49] - 1 * orbit[x][40] - 2 * orbit[x][39] - 1 * orbit[x][37] - 2 * orbit[x][35] - 2 * orbit[x][31]);\n orbit[x][18] = (f_18 - 1 * orbit[x][59] - 1 * orbit[x][51] - 2 * orbit[x][46] - 2 * orbit[x][45] - 2 * orbit[x][36] - 2 * orbit[x][27] - 1 * orbit[x][24]) / 2;\n orbit[x][17] = (f_17 - 1 * orbit[x][60] - 1 * orbit[x][53] - 1 * orbit[x][51] - 1 * orbit[x][48] - 1 * orbit[x][37] - 2 * orbit[x][34] - 2 * orbit[x][30]) / 2;\n orbit[x][16] = (f_16 - 1 * orbit[x][59] - 2 * orbit[x][52] - 1 * orbit[x][51] - 2 * orbit[x][46] - 2 * orbit[x][36] - 2 * orbit[x][34] - 1 * orbit[x][29]);\n orbit[x][15] = (f_15 - 1 * orbit[x][59] - 2 * orbit[x][52] - 1 * orbit[x][51] - 2 * orbit[x][45] - 2 * orbit[x][35] - 2 * orbit[x][34] - 2 * orbit[x][27]);\n }\n\n return orbit;\n }", "public static void main(String[] args) {\n List<Integer> nums = new ArrayList<>(Arrays.asList(5, 7, 3, 7, 2, 8, 3, 7, 2));\n //Map<Integer, Integer> numCount = countOccurance(nums);\n Map<Integer, Long> numCount = nums.stream().collect(Collectors.groupingBy(num -> num, Collectors.counting()));\n Set<Integer> numSet = new LinkedHashSet<>(nums);\n numSet.forEach(num -> System.out.println(num + \" \" + numCount.get(num)));\n }", "private static void countAB(String line, int[] A, int[] B) {\n\t for ( int i = 0; i < line.length(); i++ ) {\n\t \tchar c = line.charAt(i);\n\t \tint k = (i%7 + 1)/2;\n\t\t if ( c == 'a' || c == 'A' )\n\t\t A[k]++;\n\t\t if ( c == 'b' || c == 'B' )\n\t\t B[k]++;\n\t }\n\t}", "public static void main(String[] args) {\n\n int n = 20;\n int[] input = {0, 6, 0, 6, 4, 0, 6, 0, 6, 0, 4, 3, 0, 1, 5, 1, 2, 4, 2, 4};\n String[] inStr = {\"ab\", \"cd\", \"ef\", \"gh\", \"ij\", \"ab\", \"cd\", \"ef\", \"gh\", \"ij\", \"that\", \"be\", \"to\", \"be\", \"question\", \"or\", \"not\", \"is\", \"to\", \"the\"};\n int[] count = new int[100];\n for (int i = 0; i < n; i++) {\n// String line = in.nextLine();\n// String[] elem = line.split(\"\\\\s\");\n// System.out.println(elem[0]+\" - \"+elem[1]);\n// input[i] = Integer.parseInt(elem[0]);\n// inStr[i] = elem[1];\n// count[input[i]] ++;\n }\n\n for (int i = n / 2; i < input.length; i++)\n count[input[i]]++;\n\n// for (int i = 0; i < count.length; i++)\n// System.out.print(count[i]);\n// System.out.println();\n\n int printed = 0;\n int i = 0;\n StringBuffer buffer = new StringBuffer();\n while (count[i] > 0){\n// for (int i = 0; i < count.length; i++) {\n// for (Integer st : findIndex(input, i,count[i])) {\n// System.out.print(findStr(inStr, st) + \" \");\n for (String st : findIndex(input,inStr, i,count[i])) {\n // System.out.print( st + \" \");\n buffer.append(st+\" \");\n printed++;\n }\n i++;\n }\n for (int idx = printed; idx<n;idx++)\n buffer.append(\"- \");\n // System.out.print(\"- \");\n System.out.println(buffer);\n\n\n }", "public static void main(String[] args) throws IOException {\n\t\tint n = readInt(), m = readInt();\n\t\tint[] freq = new int[m+1];\n\t\tint total = 0;\n\t\tint count = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint x = readInt();\n\t\t\tfreq[x]++;\n\t\t\tif (freq[x] == 1) {\n\t\t\t\ttotal++;\n\t\t\t}\n\t\t\tif (total == m) {\n\t\t\t\tcount++;\n\t\t\t\ttotal = 0;\n\t\t\t\tArrays.fill(freq, 0);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count+1);\n\t}", "public static void main(String[] args) {\n System.out.println(countPairs(\"aba\"));\n }", "private void createAA() {\r\n\r\n\t\tfor( int x = 0 ; x < dnasequence.size(); x++) {\r\n\t\t\tString str = dnasequence.get(x);\r\n\t\t\t//put catch for missing 3rd letter\r\n\t\t\tif(str.substring(0, 1).equals(\"G\")) {\r\n\t\t\t\taasequence.add(getG(str));\r\n\t\t\r\n\t\t\t}else if(str.substring(0, 1).equals(\"C\")) {\r\n\t\t\t\taasequence.add(getC(str));\r\n\t\t\t\t\r\n\t\t\t}else if(str.substring(0, 1).equals(\"A\")) {\r\n\t\t\t\taasequence.add(getA(str));\r\n\t\t\t\t\r\n\t\t\t}else if(str.substring(0, 1).equals(\"T\")) {\r\n\t\t\t\taasequence.add(getT(str));\r\n\t\t\t\t\r\n\t\t\t}else if(str.substring(0,1).equals(\"N\")) {\r\n\t\t\t\taasequence.add(\"ERROR\");\r\n\t\t\t}else\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t}\r\n\t}", "static double numberCount(List<String> Arr){\n \n double sum = 0.0;\n \n for(int i = 0; i < Arr.size(); i++ ){\n \n sum += Double.parseDouble(Arr.get(i));\n \n }\n \n return sum;\n \n }", "public void getProfileCounts(char[][] c, int j, int[] counts) {\n for (int i = 0; i < c.length; i++) {\n switch (c[i][j]) {\n case 'A':\n counts[0]++;\n break;\n case 'C':\n counts[1]++;\n break;\n case 'G':\n counts[2]++;\n break;\n case 'T':\n counts[3]++;\n break;\n }\n }\n }", "public static void main(String[] args) {\n\t\tint a[] = {4,4,4,5,5,5,6,6,6,9};\n\t\t\n\t\tArrayList<Integer> ab = new ArrayList<Integer>();\n\t\t\n\t\tfor(int i=0; i<a.length; i++)\n\t\t{\n\t\t\tint k =0;\n\t\t\tif(!ab.contains(a[i]))\n\t\t\t{\n\t\t\t\tab.add(a[i]);\n\t\t\t\tk++;\n\t\t\t\tfor(int j=i+1; j<a.length; j++)\n\t\t\t\t{\n\t\t\t\t\tif(a[i]==a[j])\n\t\t\t\t\t{\n\t\t\t\t\t\tk++;\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//System.out.println(a[i]);\n\t\t\t//System.out.println(k);\n\t\t\tif(k==1)\n\t\t\t\tSystem.out.println(a[i] +\" is unique number \");\n\t\t}\n\t\t\n\t}", "@Override\n \tpublic double[] getdata(List<Pair<String, String>> alin, MoleculeManager manager, GapManager gap) {\n \n \n \tdouble S_max;\n \tdouble[][] p;\n \tdouble[] data;\n \tint N;\n \tint Len;\n \tint n_seqs=0;\n \n \tn_seqs = alin.size();\n \t\n \tLen = alin.get(0).getSecond().length();\n \tN = manager.alphabetSize();\n \t\n \tp = new double[Len][N];\n \t\n \tS_max = Math.log(N)/Math.log(2);\n \t\n \tp = getFreq(p,alin,n_seqs, manager.alphabet()); \n \n \tdata = new double[Len];\n \t\n \tfor (int i = 0; i < data.length; i++) {\n \t\t\n \t\tdouble s_obs=0;\n \t\t\n \t\tdouble freqSum = 0; \n \n \t\tfor (int j = 0; j < N; j++) {\n \t\t\t\n \t\t\tif (p[i][j]!= 0 ) { \n \t\t\t\t\n \t\t\t\ts_obs = s_obs + p[i][j] * Math.log(p[i][j]) / Math.log(2);\n \t\t\t\t\n \t\t\t\tfreqSum = gap.attempToSumFreq(freqSum, p[i][j]) ;\n \t\t\t\t\n \t\t\t}\n \t\t}\n \t\t\n \t\tdata[i] = (S_max + s_obs) * freqSum / S_max;\n \t}\n \n \treturn data;\n }", "public static void main(String[] args) {\nsub_seq(\"abc\", \"\");\nSystem.out.println();\nSystem.out.println(sub_seq_count(\"ab\", \"\"));\n\t}", "int countByExample(AccuseInfoExample example);", "int[] buildFrequencyTable(String s)\n{\n int[] table = new int [Character.getNumericValue('z') - Character.getNumericValue('a') + 1];\n for (char c : s.toCharArray())\n {\n int x = getCharNumber(c);\n if (x != -1) table[x]++;\n }\n return table;\n}", "public static void main(String[] args) {\n String res= freqAlphabets( \"10#11#12\");\n System.out.println(res);\n }", "public StringCount[] GetCounts() \n\t{\n\t\tStringCount[] counts = new StringCount[numEntries];\n int entries = 0;\n \n for(int i = 0; i < tableSize; i++)\n {\n if(table[i] != null)\n {\n insertionSort(new StringCount(table[i].key, table[i].value), counts, entries);\n entries++;\n }\n }\n\t\treturn counts;\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tString rnos[] = {\"1235\",\"5655\",\"1244\",\"1299\",\"5677\",\"3477\",\"3498\",\"3425\",\"7814\",\"7811\"};\n\t\tint csno=0,itno=0,mechno=0,civilno=0;\n\t\tfor(String rno:rnos)\n\t\t{\n\t\t\tif(rno.charAt(0)=='1')\n\t\t\t{\n\t\t\t\tcsno++;\n\t\t\t}\n\t\t\tif(rno.charAt(0)=='3')\n\t\t\t{\n\t\t\t\titno++;\n\t\t\t}\n\t\t\tif(rno.charAt(0)=='5')\n\t\t\t{\n\t\t\t\tmechno++;\n\t\t\t}\n\t\t\tif(rno.charAt(0)=='7')\n\t\t\t{\n\t\t\t\tcivilno++;\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\tSystem.out.println(\"CS counts :\"+csno+\" IT counts :\"+itno+\" Mech counts :\"+mechno+\" Civil counts :\"+civilno);\n\t\n\t\t\n\t\t\n\t\t\n\t}", "static List<Integer> lengthEachScene(List<Character> inputList) {\n\t\tList<Integer> lengths = new ArrayList<>();\n\t\tint[] lastIndexMap = new int[26];\n\t\tfor (int index = 0; index < inputList.size(); index++) {\n\t\t\tlastIndexMap[inputList.get(index) - 'a'] = index;\n\t\t}\n\t\tint start = 0, end = 0;\n\t\tfor (int index = 0; index < inputList.size(); index++) {\n\t\t\tend = Math.max(end, lastIndexMap[inputList.get(index) - 'a']);\n\t\t\tif (end == index) {\n\t\t\t\tlengths.add(end - start + 1);\n\t\t\t\tstart = end + 1;\n\t\t\t}\n\t\t}\n\t\treturn lengths;\n\t}", "public static void main(String[] args) {\n\t\t String S = \"aacaacca\";\n\t\t String T = \"ca\";\n\t\tSystem.out.println(numDistinct(S, T));\n\t}", "public static ArrayList<TestInstanceCount> countDataFromInstances(List<TestDataInstance> inputData) {\n \n long count_A0B0 = 0;\n long count_A0B1 = 0;\n long count_A1B0 = 0;\n long count_A1B1 = 0;\n \n for(TestDataInstance data : inputData) {\n if(data.getValueA() == 0 && data.getValueB() == 0) {\n count_A0B0++;\n } else if(data.getValueA() == 0 && data.getValueB() == 1) {\n count_A0B1++;\n } else if(data.getValueA() == 1 && data.getValueB() == 0) {\n count_A1B0++;\n } else if(data.getValueA() == 1 && data.getValueB() == 1) {\n count_A1B1++;\n }\n }\n // results list\n ArrayList<TestInstanceCount> countData = new ArrayList<TestInstanceCount>();\n \n // create count objects\n TestInstanceCount c1 = new TestInstanceCount();\n c1.setAssignmentVarA(0);\n c1.setAssignmentVarB(0);\n c1.setAssignmentCount(count_A0B0);\n countData.add(c1);\n c1 = null;\n \n TestInstanceCount c2 = new TestInstanceCount();\n c2.setAssignmentVarA(0);\n c2.setAssignmentVarB(1);\n c2.setAssignmentCount(count_A0B1);\n countData.add(c2);\n c2 = null;\n \n TestInstanceCount c3 = new TestInstanceCount();\n c3.setAssignmentVarA(1);\n c3.setAssignmentVarB(0);\n c3.setAssignmentCount(count_A1B0);\n countData.add(c3);\n c3 = null;\n \n TestInstanceCount c4 = new TestInstanceCount();\n c4.setAssignmentVarA(1);\n c4.setAssignmentVarB(1);\n c4.setAssignmentCount(count_A1B1);\n countData.add(c4);\n c4 = null;\n \n return countData;\n }", "public static void main(String[] args) throws IOException {\n FileWriter fw = new FileWriter(new File(\"src/output_files/threesumA.txt\"));\n StringBuilder sb = new StringBuilder();\n // the rest input files\n String[] inputFiles = {\"src/input_files/8ints.txt\", \"src/input_files/1Kints.txt\", \"src/input_files/2Kints.txt\",\n \"src/input_files/2Kints.txt\", \"src/input_files/4Kints.txt\", \"src/input_files/8Kints.txt\",\n \"src/input_files/16Kints.txt\", \"src/input_files/32Kints.txt\"};\n int i = 8;\n for (String file : inputFiles) {\n In in = new In(file);\n int[] a = in.readAllInts();\n long startTime = System.nanoTime();\n int result = count(a);\n long elapsedTime = System.nanoTime() - startTime;\n sb.append(String.format(\"%d %d\\n\", i, elapsedTime));\n System.out.println(result);\n if (i == 8) {\n i = 1000;\n } else {\n i *= 2;\n }\n }\n fw.write(sb.toString());\n fw.close();\n }", "public static void main(String[] args) {\n\t\tint a[] = {3,4,4,6,1,4,4};\n\t\tint counter[] = new int[5];\n\t\tint max_counter = 0;\n\t\tint start_line = 0;\n\t\tfor(int i=0;i<a.length;i++) {\n\t\t\n\t\t\tint x = a[i] - 1;\n\t\t\t\n\t\t\tif(a[i] > counter.length) {\n\t\t\t\t//max counter\n\t\t\t\tstart_line = max_counter;\n\t\t\t}else {\n\t\t\t\tif(counter[x] < start_line) {\n\t\t\t\t\tcounter[x] = counter[x] + start_line;\n\t\t\t\t}\n\t\t\t\t\tcounter[x]++;\n\t\t\t\t\t\n\t\t\t\t\tif(counter[x] > max_counter) {\n\t\t\t\t\t\tmax_counter = counter[x];\n\t\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t\t\n\t\tfor(int i=0;i<counter.length;i++) {\n\t\t\tif(counter[i] < start_line) {\n\t\t\t\tcounter[i] = start_line;\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(Arrays.toString(counter));\n\t\t\n\t\t\n\t}", "ArrayList<Integer>getCatalog_IDs(int acc_no);", "public static void main(String[] args){\n List<String> list = Arrays.asList(\"a\",\"2\",\"3\",\"4\",\"5\");\n //List l1 = Lists.newArrayList();\n //list.stream().map(a->\"map\"+a).forEach(System.out::println);\n Stream lines = list.stream();\n lines.flatMap(line->Arrays.stream(line.toString().split(\"\"))).distinct().count();\n\n\n }", "public static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tint n = in.nextInt();\n\t\tin.nextLine();\n\t\tString[] input = new String[100];\n\t\tfor(int j = 0; j < n ; j++){\n\t\t\tString line = in.nextLine();\n\t\t\tint count = 0;\n\t\t\tfor(int i = 0; i < line.length()-1;i++){\n\t\t\t\tif(line.charAt(i) == line.charAt(i+1)){\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t} \n\t}", "public int f2(List<Book> a) {\r\n int count = 0;\r\n for (Book o : a) {\r\n if (o.getCode().startsWith(\"a\") || o.getCode().startsWith(\"A\")) {\r\n count++;\r\n }\r\n }\r\n return count;\r\n }", "public static void main(String[] args) {\n\n int counter = 0;\n\n for (int num = 1; num <= 100; num++) {\n\n if (num % 15 == 0) {\n System.out.println(num);\n //counter = counter + 1 ; counter +=1;\n ++counter;\n }\n }\n\n System.out.println(\"counter = \" + counter);\n\n /// given a string with value\n // find out how many \"a\" showed in this String\n\n String name = \"Esra Fidan\";\n\n //System.out.println( name.charAt(0) =='a');\n\n int countOfA = 0;\n for (int x = 0; x < name.length(); x++) {\n\n //System.out.println(name.charAt(x));\n if (name.charAt(x) == 'a') {\n System.out.println(\"BINGO FOUND IT !!\");\n ++countOfA;\n\n }\n\n\n }\n\n System.out.println(\"countOfA = \" + countOfA);\n\n\n\n }", "public static void main(String[] args)throws IOException {\n int n = 5; //Integer.parseInt(rd.readLine());\n// String str[] = rd.readLine().split(\" \");\n// int arr[] = new int[n];\n// for(int i=0; i<n; i++){\n// arr[i] = Integer.parseInt(str[i]);\n// }\n int arr[] = {1, 3, 2, 1, 2};\n int freq = 0;\n Arrays.sort(arr);\n for(int i=0; i<n-1; i++){\n if(arr[i] != arr[i+1]){\n freq++;\n break;\n }\n i++;\n }\n if(freq==0) {\n System.out.println(arr[n-1]); //the unique no is tha last no\n }\n else{\n System.out.println(freq); //unique no is somewhere in between\n }\n }", "private static Integer[] listaCategoriasCadastradas() throws Exception {\r\n int count = 0;\r\n ArrayList<Categoria> lista = arqCategorias.toList();\r\n Integer[] idsValidos = null; //Lista retornando os ids de categorias validos para consulta\r\n if (!lista.isEmpty()) {\r\n idsValidos = new Integer[lista.size()];\r\n System.out.println(\"\\t** Lista de categorias cadastradas **\\n\");\r\n for (Categoria c : lista) {\r\n System.out.println(c);\r\n idsValidos[count] = c.getID();\r\n count++;\r\n }\r\n }\r\n return idsValidos;\r\n }", "static void getCharCountArray(String str) {\n for (int i = 0; i < str.length(); i++)\n count[str.charAt(i)]++;\n }", "private int[] buscarMenores(ArrayList<ArbolCod> lista){\n int temp;\n int m1=1;\n int m2=0;\n float vm1,vm2,aux;\n \n vm1=lista.get(m1).getProbabilidad();\n vm2=lista.get(m2).getProbabilidad();\n if (vm1<=vm2){\n temp=m1;\n m1=m2;\n m2=temp;\n } \n for (int i=2;i<lista.size();i++){\n vm1=lista.get(m1).getProbabilidad();\n vm2=lista.get(m2).getProbabilidad();\n aux=lista.get(i).getProbabilidad();\n if (aux<=vm2){\n m1=m2;\n m2=i;\n } \n else if (aux<=vm1){\n m1=i;\n }\n }\n int[] res=new int[2];\n res[0]=m1;\n res[1]=m2;\n return res;\n }", "public static void main(String[] args) \n {\n Scanner input=new Scanner(System.in);\n int N=input.nextInt();\n int M=input.nextInt();\n int tree[]=new int[N];\n int count[]=new int[N];\n Arrays.fill(count,1);\n for(int i=0;i<M;i++)\n {\n int u1=input.nextInt();\n int v1=input.nextInt();\n tree[u1-1]=v1;\n count[v1-1]+=count[u1-1];\n int root=tree[v1-1];\n while(root!=0)\n {\n count[root-1]+=count[u1-1];\n root=tree[root-1];\n }\n }\n int counter=-1;\n for(int i=0;i<count.length;i++)\n {\n if(count[i]%2==0)\n counter++;\n }\n System.out.println(counter);\n }", "ArrayList<Character> nextCountAndSay(ArrayList<Character> sequence) {\n \tArrayList<Character> next = new ArrayList<Character>();\n \tint count = 0;\n \tCharacter c = sequence.get(0);\n \tfor(int i = 0; i < sequence.size(); i++) \n \t//@loop_invariant count represents the length of the longest \n \t// consecutive sequence s in sequence[0, i), all Characters in s\n \t// equal to c and s contains the last element of sequence[0, i) if \n \t// exists\n \t{\n \t\tif(count == 0) {\n \t\t\tcount = 1;\n \t\t\tc = sequence.get(i);\n \t\t}\n \t\telse {\n \t\t\tif(c == sequence.get(i)) {\n \t\t\t\tcount++;\n \t\t\t}\n \t\t\telse {\n \t\t\t\tthis.addCount(next, count);\n \t\t\t\tthis.addSay(next, c);\n \t\t\t\tcount = 1;\n \t\t\t\tc = sequence.get(i);\n \t\t\t}\n \t\t} \t\t\n \t}\n \tthis.addCount(next, count);\n \tthis.addSay(next, c);\n \treturn next;\n }", "public interface CardCounts {\n\n int[] FULL_SETS_CARD_COUNTS = {324, 162, 162, 180, 180, 180, 324, 180, 182, 54, 99, 189, 100, 129};\n\n int[] PREMIUM_SETS_CARD_COUNTS = {6, 11, 2, 7, 6, 18, 6, 6, 12, 12, 6, 20};\n\n int[] VIRTUAL_SETS_CARD_COUNTS = {146, 42, 15, 36, 58, 23, 14, 30, 59, 56, 47, 61, 6, 59, 22, 27, 49, 52, 32, 48, 10, 75};\n\n int[] VIRTUAL_PREMIUM_SETS_CARD_COUNTS = {8};\n\n int[] DREAM_CARD_SETS_CARD_COUNTS = {0};\n\n int[] PLAYTESTING_SETS_CARD_COUNTS = {200};\n\n int[] LEGACY_SETS_CARD_COUNTS = {999};\n}", "public Integer getAupcounts() {\n return aupcounts;\n }", "public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n int T = scan.nextInt();\n scan.nextLine();\n for(int i = 0 ; i < T ; i++){\n int count = 0;\n String text = scan.nextLine();\n char[] letters = text.toCharArray();\n\n if(letters.length > 0){\n char character = letters[0];\n\n for(int j = 1 ; j < letters.length ; j++){\n\n if(character == letters[j]){\n count++;\n }else{\n character = letters[j];\n }\n }\n }\n System.out.println(count);\n }\n scan.close();\n }", "public List<String> getAEIsOutputFromAttacDecls(List<AttacDecl> list) \r\n\t\t{\r\n\t\tList<String> list2 = new ArrayList<String>();\r\n\t\tfor (AttacDecl attacDecl : list)\r\n\t\t\t{\r\n\t\t\tlist2.add(attacDecl.getOutputAei());\r\n\t\t\t}\r\n\t\treturn list2;\r\n\t\t}", "int getTotalCaseNumbers();", "public int getCount(){\n int c = 0;\n for(String s : this.counts){\n c += Integer.parseInt(s);\n }\n return c;\n }", "public static void cntArray(int A[], int N) \n { \n // initialize result with 0 \n int result = 0; \n \n for (int i = 0; i < N; i++) { \n \n // all size 1 sub-array \n // is part of our result \n result++; \n \n // element at current index \n int current_value = A[i]; \n \n for (int j = i + 1; j < N; j++) { \n \n // Check if A[j] = A[i] \n // increase result by 1 \n if (A[j] == current_value) { \n result++; \n } \n } \n } \n \n // print the result \n System.out.println(result); \n }", "private List<Float> nucleotideFrequencies() {\n\t\tList<Float> freqs = new ArrayList<Float>();\n\t\tfreqs.add((float) 0.3);\n\t\tfreqs.add((float) 0.5);\n\t\tfreqs.add((float) 0.8);\n\t\tfreqs.add((float) 1.0);\n\t\treturn freqs;\n\t}", "public static void main(String[] args) {\n\r\n\t\tString str = \"learning automation is fun\";\r\n\t\tstr = str.replace(\" \", \"\");\r\n\t\tchar letters[] = str.toCharArray();\r\n\t\t\r\n\t\tfor(int i = 0;i<letters.length;i++) {\r\n\t\t\tint count = 0;\r\n\t\t\tfor(int j=0;j<letters.length;j++) {\r\n\t\t\t\t\r\n\t\t\t\tif (j<i&&(letters[j]==letters[i])) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tif(letters[i]==letters[j]) {\r\n\t\t\t\t\tcount++;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tif (count>0)\r\n\t\t\tSystem.out.println(\"Occurrence of \"+letters[i]+\" is \"+count);\r\n\t\t}\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\t\t\n\t\t\tString input=\"ABCGRETCABCG\";\n\t\t\tint n = 3;\n\t\t\t\n\t\t\tMap<String,Integer> substrMap=new HashMap<String,Integer>();\n\t\t\t\n\t\t\tfor(int i=0;i+n<=input.length();i++){\n\t\t\t\t\n\t\t\t\tString substr=input.substring(i, i+n);\n\t\t\t\t\n\t\t\t\tint frequency=1;\n\t\t\t\t\n\t\t\t\tif(substrMap.containsKey(substr)){\n\t\t\t\t\t\n\t\t\t\t\tfrequency=substrMap.get(substr);\n\t\t\t\t\tfrequency++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tsubstrMap.put(substr, frequency);\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\tSystem.out.println(substrMap.toString());\n\t\t}", "public static void main(String[] args) {\n\t\tArrayList ar=new ArrayList();\n\t\tar.add(10);\n\t\tar.add(17);\n\t\tar.add(3);\n\t\tar.add(16);\n\t\tar.add(13);\n\t\tar.add(13);\n\t\t//ar.stream().sorted(Comparator.reverseOrder()).forEach(System.out::println);\n\t\tlong cnt=ar.stream().distinct().count();\n\t\tSystem.out.println(cnt);\n\t}", "private static Map countStringOccurences(String[] strArray, AdminJdbcService adminJdbcService) {\n logger.debug(\"Count String Occurences method found\");\n\n Map<String, Integer> countMap = new TreeMap<String, Integer>();\n Map<String, Integer> controlIdsMap = new TreeMap<String, Integer>();\n Set<String> controlIdsSet = new TreeSet<String>();\n Set<String> keySet = countMap.keySet();\n List list = new ArrayList();\n\n for (String string : strArray) {\n String control[] = string.split(\":\");\n if ( !Utils.isNullOrEmpty(control[1]) && Integer.parseInt(control[1].trim()) == 2 ) {\n if (!countMap.containsKey(control[0])) {\n countMap.put(control[0], 1);\n } else {\n Integer count = countMap.get(control[0]);\n count = count + 1;\n countMap.put(control[0], count);\n }\n }\n }\n\n\n return countMap;\n }", "public static void main(String[] args) {\n\t\tString s = \"AAAAAAAAAAA\";\n\t\tSystem.out.println(s.substring(0, 10));\n\t\tRepeatedDNAsequences hp = new RepeatedDNAsequences();\n\t\tSystem.out.println(hp.findRepeatedDnaSequences(s));\n\t}", "public static void main(String[] args) {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\ttry {\n\t\t\tint N = Integer.parseInt(br.readLine());\n\t\t\tint[][] A = new int[N + 1][N + 1];\n\t\t\tfor (int i = 0; i < N; i++) {\n\t\t\t\tString str = br.readLine();\n\t\t\t\tfor (int j = 0; j < N; j++) {\n\t\t\t\t\tA[i][j] = str.charAt(j) - 48;\n\t\t\t\t}\n\t\t\t}\n\t\t\tint connectedCompo = 0;\n\t\t\tArrayList<Integer> list = new ArrayList<Integer>();\n\t\t\tfor (int i = 0; i < N; i++) {\n\t\t\t\tfor (int j = 0; j < N; j++) {\n\t\t\t\t\tif (A[i][j] == 1 && c[i][j] == 0) {\n\t\t\t\t\t\tdfs(i, j, A);\n\t\t\t\t\t\tlist.add(numOfHome);\n\t\t\t\t\t\tnumOfHome = 0;\n\t\t\t\t\t\tconnectedCompo++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(connectedCompo);\n\t\t\tCollections.sort(list); // 정렬을 빼먹어서 틀렸었음!!\n\t\t\tfor (int i = 0; i < list.size(); i++)\n\t\t\t\tSystem.out.println(list.get(i));\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void getNCount(Configuration conf, Path input) throws Exception {\n Job job = Job.getInstance(conf, \"N Counter job\");\n job.setJarByClass(PageRank.class);\n job.setMapperClass(NCountMapper.class);\n job.setReducerClass(NCountReducer.class);\n job.setMapOutputKeyClass(Text.class);\n job.setMapOutputValueClass(Text.class);\n job.setOutputKeyClass(Text.class);\n job.setOutputValueClass(LinkedEdges.class);\n FileInputFormat.addInputPath(job, input);\n FileOutputFormat.setOutputPath(job, new Path(\"adjtemp\"));\n job.setNumReduceTasks(1);\n\n boolean ok = job.waitForCompletion(true);\n if (!ok) {\n throw new Exception(\"Job failed\");\n }\n\n long NCount = job.getCounters().findCounter(NCountReducer.ReduceCounters.N).getValue();\n System.out.println(NCount);\n conf.setLong(\"N\", NCount);\n }", "protected static double[] getFrequencies(List<Sequence> sequences) {\n return getFrequenciesMaybeSafe(sequences, false);\n }", "public static void main(String[] args) {\n\n\t\tInteger [] t = new Integer [ 6 ];\n\n\t\tTestAnagrams ta = new TestAnagrams ();\n\t\tTestAnagrams [] taA = new TestAnagrams [4];\n\n\n\n\n\n\t\tArrayList<Integer> foo = new ArrayList<Integer>();\n\t\tfoo.add(1);\n\t\tfoo.add(1);\n\t\tfoo.add(2);\n\t\tfoo.add(3);\n\t\tfoo.add(5);\n\t\tjava.lang.Integer[] bar = foo.toArray(new Integer[0]);\n\t\tSystem.out.println(\"bar.length = \" + bar.length);\n\n\t\t//\n\t\t//\n\t\t//String [] sA = { \"tt\", \"hh\" };\n\t\t//\n\t\t//java.util.ArrayList < String > sAl = new java.util.ArrayList < String > ( java.util.Arrays.asList ( sA ) ) ; \n\t\t//\n\t\t//sAl.add ( \"qq\");\n\t\t//\n\t\t//Collections.sort(sAl);\n\t\t//\n\t\t//String [] sA2 = sAl.toArray ( new String [ 0 ] );\n\t\t//\n\t\t//System.out.println ( sA2 [ 0 ] );\n\t\t//\n\t\t//long [] a = { 5,7,6,3,4,9,8,1,0,2};\n\t\t//\n\t\t//java.util.Arrays.sort (a);\n\t\t//\n\t\t//for ( int i = 0; i < a.length; i++ ){\n\t\t//\tSystem.out.print( a [ i ] + \" \");\n\t\t//}\n\n\n\t\tString [] sArray = { \n\t\t\t\t\"acaballadero \", \n\t\t\t\t\"acaballerado \", \n\t\t\t\t\"gallardeaba \", \n\t\t\t\t\"acaballerad \", \n\t\t\t\t\"abogadeara \", \n\t\t\t\t\"acebollado \", \n\t\t\t\t\"acebollada \", \n\t\t\t\t\"acaballero \", \n\t\t\t\t\"acogollara \", \n\t\t\t\t\"acollarado \", \n\t\t\t\t\"decoloraba \", \n\t\t\t\t\"acogollaba \", \n\t\t\t\t\"cagalaolla \", \n\t\t\t\t\"acordelaba \", \n\t\t\t\t\"bacaladero \", \n\t\t\t\t\"acabellado \", \n\t\t\t\t\"acaballara \", \n\t\t\t\t\"cabalgador \", \n\t\t\t\t\"alcaldable \", \n\t\t\t\t\"acollarada \", \n\t\t\t\t\"acaballare \", \n\t\t\t\t\"acollaraba \", \n\t\t\t\t\"acogollare \", \n\t\t\t\t\"bacaladera \", \n\t\t\t\t\"acaballera \", \n\t\t\t\t\"elaborado \", \n\t\t\t\t\"cabellado \", \n\t\t\t\t\"colgadera \", \n\t\t\t\t\"acaballar \", \n\t\t\t\t\"cabalgare \", \n\t\t\t\t\"acaballad \", \n\t\t\t\t\"albardela \", \n\t\t\t\t\"agradable \", \n\t\t\t\t\"cabalgada \", \n\t\t\t\t\"acodalare \", \n\t\t\t\t\"alegadora \", \n\t\t\t\t\"acogollar \", \n\t\t\t\t\"alboreado \", \n\t\t\t\t\"caballada \", \n\t\t\t\t\"caballera \", \n\t\t\t\t\"acogedora \", \n\t\t\t\t\"regoldaba \", \n\t\t\t\t\"gallardea \", \n\t\t\t\t\"abocelada \", \n\t\t\t\t\"acaloraba \", \n\t\t\t\t\"acebadara \", \n\t\t\t\t\"caballear \", \n\t\t\t\t\"coleadora \", \n\t\t\t\t\"alboreada \", \n\t\t\t\t\"colgadero \", \n\t\t\t\t\"gallardeo \", \n\t\t\t\t\"acollador \", \n\t\t\t\t\"alabadora \", \n\t\t\t\t\"cebollada \", \n\t\t\t\t\"coloreaba \", \n\t\t\t\t\"bolaceara \", \n\t\t\t\t\"acallador \", \n\t\t\t\t\"cabalgara \", \n\t\t\t\t\"agaleraba \", \n\t\t\t\t\"acabadora \", \n\t\t\t\t\"ardaleaba \", \n\t\t\t\t\"rodaballo \", \n\t\t\t\t\"baleadora \", \n\t\t\t\t\"abogadear \", \n\t\t\t\t\"colaborad \", \n\t\t\t\t\"cordelaba \", \n\t\t\t\t\"acollarad \", \n\t\t\t\t\"acogollad \", \n\t\t\t\t\"bellacada \", \n\t\t\t\t\"abocelado \", \n\t\t\t\t\"alardeaba \", \n\t\t\t\t\"adoloraba \", \n\t\t\t\t\"laceadora \", \n\t\t\t\t\"acodalaba \", \n\t\t\t\t\"declaraba \", \n\t\t\t\t\"caballero \", \n\t\t\t\t\"aldabeara \", \n\t\t\t\t\"abaleador \", \n\t\t\t\t\"acodalara \", \n\t\t\t\t\"lacerado \", \n\t\t\t\t\"cagalera \", \n\t\t\t\t\"cogedora \", \n\t\t\t\t\"recolado \", \n\t\t\t\t\"coladora \", \n\t\t\t\t\"alcaller \", \n\t\t\t\t\"recalaba \", \n\t\t\t\t\"collalba \", \n\t\t\t\t\"bacalada \", \n\t\t\t\t\"acebadar \", \n\t\t\t\t\"acollaro \", \n\t\t\t\t\"cabalgar \", \n\t\t\t\t\"recodaba \", \n\t\t\t\t\"carabela \", \n\t\t\t\t\"lacerada \", \n\t\t\t\t\"coloraba \", \n\t\t\t\t\"coleador \", \n\t\t\t\t\"gallardo \", \n\t\t\t\t\"aballara \", \n\t\t\t\t\"rebalgad \", \n\t\t\t\t\"ladreaba \", \n\t\t\t\t\"bolacero \", \n\t\t\t\t\"galleara \", \n\t\t\t\t\"lardacea \", \n\t\t\t\t\"legadora \", \n\t\t\t\t\"celadora \", \n\t\t\t\t\"calleara \", \n\t\t\t\t\"cebadara \", \n\t\t\t\t\"cobardea \", \n\t\t\t\t\"acobrada \", \n\t\t\t\t\"albacara \", \n\t\t\t\t\"bolacear \", \n\t\t\t\t\"ocaleaba \", \n\t\t\t\t\"laboread \", \n\t\t\t\t\"galerada \", \n\t\t\t\t\"colargol \", \n\t\t\t\t\"abogadeo \", \n\t\t\t\t\"acobrado \", \n\t\t\t\t\"debocara \", \n\t\t\t\t\"aladraba \", \n\t\t\t\t\"agalerad \", \n\t\t\t\t\"alargaba \", \n\t\t\t\t\"cabalgad \", \n\t\t\t\t\"algarada \", \n\t\t\t\t\"regalado \", \n\t\t\t\t\"allegara \", \n\t\t\t\t\"caldeara \", \n\t\t\t\t\"regalaba \", \n\t\t\t\t\"caldeaba \", \n\t\t\t\t\"adorable \", \n\t\t\t\t\"acabador \", \n\t\t\t\t\"abocarde \", \n\t\t\t\t\"arboleda \", \n\t\t\t\t\"balacera \", \n\t\t\t\t\"alargado \", \n\t\t\t\t\"arbolada \", \n\t\t\t\t\"caladora \", \n\t\t\t\t\"acodalar \", \n\t\t\t\t\"alegador \", \n\t\t\t\t\"cobardeo \", \n\t\t\t\t\"baleador \", \n\t\t\t\t\"aballare \", \n\t\t\t\t\"adargaba \", \n\t\t\t\t\"albeldar \", \n\t\t\t\t\"decalogo \", \n\t\t\t\t\"acallare \", \n\t\t\t\t\"gallarda \", \n\t\t\t\t\"baldeara \", \n\t\t\t\t\"braceada \", \n\t\t\t\t\"cobreado \", \n\t\t\t\t\"cebollar \", \n\t\t\t\t\"allegada \", \n\t\t\t\t\"boleador \", \n\t\t\t\t\"acordela \", \n\t\t\t\t\"goleador \", \n\t\t\t\t\"acordaba \", \n\t\t\t\t\"cagadero \", \n\t\t\t\t\"caladero \", \n\t\t\t\t\"recalada \", \n\t\t\t\t\"clareaba \", \n\t\t\t\t\"acaballa \", \n\t\t\t\t\"alobroge \", \n\t\t\t\t\"acollare \", \n\t\t\t\t\"alabador \", \n\t\t\t\t\"acaballe \", \n\t\t\t\t\"abocardo \", \n\t\t\t\t\"abogador \", \n\t\t\t\t\"acollara \", \n\t\t\t\t\"caladera \", \n\t\t\t\t\"allegado \", \n\t\t\t\t\"cableara \", \n\t\t\t\t\"acollaba \", \n\t\t\t\t\"acogolle \", \n\t\t\t\t\"alcabala \", \n\t\t\t\t\"alboroce \", \n\t\t\t\t\"caballar \", \n\t\t\t\t\"colgador \", \n\t\t\t\t\"cegadora \", \n\t\t\t\t\"acogolla \", \n\t\t\t\t\"alborada \", \n\t\t\t\t\"acogedor \", \n\t\t\t\t\"bacallao \", \n\t\t\t\t\"acordelo \", \n\t\t\t\t\"albarelo \", \n\t\t\t\t\"alegraba \", \n\t\t\t\t\"acebrado \", \n\t\t\t\t\"albacora \", \n\t\t\t\t\"ocaleara \", \n\t\t\t\t\"acallara \", \n\t\t\t\t\"abacorad \", \n\t\t\t\t\"calleaba \", \n\t\t\t\t\"laceador \", \n\t\t\t\t\"decolora \", \n\t\t\t\t\"acaballo \", \n\t\t\t\t\"coloread \", \n\t\t\t\t\"allegaba \", \n\t\t\t\t\"bolacead \", \n\t\t\t\t\"laceraba \", \n\t\t\t\t\"alabarda \", \n\t\t\t\t\"cableado \", \n\t\t\t\t\"aclarado \", \n\t\t\t\t\"aclarada \", \n\t\t\t\t\"abollare \", \n\t\t\t\t\"aclaraba \", \n\t\t\t\t\"coladero \", \n\t\t\t\t\"abollara \", \n\t\t\t\t\"bocelara \", \n\t\t\t\t\"cableada \", \n\t\t\t\t\"regalada \", \n\t\t\t\t\"acalorad \", \n\t\t\t\t\"ablegado \", \n\t\t\t\t\"galleaba \", \n\t\t\t\t\"colabora \", \n\t\t\t\t\"robledal \", \n\t\t\t\t\"abaleara \", \n\t\t\t\t\"arbolado \", \n\t\t\t\t\"acallaba \", \n\t\t\t\t\"abogadea \", \n\t\t\t\t\"cebadora \", \n\t\t\t\t\"lardaceo \", \n\t\t\t\t\"colabore \", \n\t\t\t\t\"bacallar \", \n\t\t\t\t\"colorada \", \n\t\t\t\t\"albergad \", \n\t\t\t\t\"aldabear \", \n\t\t\t\t\"abocarda \", \n\t\t\t\t\"balacear \", \n\t\t\t\t\"bolaceo \", \n\t\t\t\t\"bragado \", \n\t\t\t\t\"bacalao \", \n\t\t\t\t\"brollad \", \n\t\t\t\t\"adolora \", \n\t\t\t\t\"rollaba \", \n\t\t\t\t\"garlaba \", \n\t\t\t\t\"acaloro \", \n\t\t\t\t\"albarda \", \n\t\t\t\t\"cebrado \", \n\t\t\t\t\"acedara \", \n\t\t\t\t\"colgado \", \n\t\t\t\t\"alobada \", \n\t\t\t\t\"alegaba \", \n\t\t\t\t\"cebolla \", \n\t\t\t\t\"llagara \", \n\t\t\t\t\"adobera \", \n\t\t\t\t\"gallear \", \n\t\t\t\t\"alabado \", \n\t\t\t\t\"bragada \", \n\t\t\t\t\"acaraba \", \n\t\t\t\t\"alobado \", \n\t\t\t\t\"lobrego \", \n\t\t\t\t\"redobla \", \n\t\t\t\t\"alberca \", \n\t\t\t\t\"acabare \", \n\t\t\t\t\"llegado \", \n\t\t\t\t\"claread \", \n\t\t\t\t\"alagaba \", \n\t\t\t\t\"alardeo \", \n\t\t\t\t\"clorado \", \n\t\t\t\t\"erogaba \", \n\t\t\t\t\"recabad \", \n\t\t\t\t\"abacero \", \n\t\t\t\t\"callaba \", \n\t\t\t\t\"albarde \", \n\t\t\t\t\"abacoro \", \n\t\t\t\t\"argolla \", \n\t\t\t\t\"recalad \", \n\t\t\t\t\"baladre \", \n\t\t\t\t\"raleaba \", \n\t\t\t\t\"adoraba \", \n\t\t\t\t\"acabado \", \n\t\t\t\t\"acabada \", \n\t\t\t\t\"laceaba \", \n\t\t\t\t\"callado \", \n\t\t\t\t\"coreaba \", \n\t\t\t\t\"declaro \", \n\t\t\t\t\"ladeaba \", \n\t\t\t\t\"legrado \", \n\t\t\t\t\"alegara \", \n\t\t\t\t\"legraba \", \n\t\t\t\t\"cobarde \", \n\t\t\t\t\"cargada \", \n\t\t\t\t\"bocelar \", \n\t\t\t\t\"acodaba \", \n\t\t\t\t\"reglada \", \n\t\t\t\t\"bellaco \", \n\t\t\t\t\"acalora \", \n\t\t\t\t\"acerolo \", \n\t\t\t\t\"abollar \", \n\t\t\t\t\"abollad \", \n\t\t\t\t\"bocarda \", \n\t\t\t\t\"acodara \", \n\t\t\t\t\"abogare \", \n\t\t\t\t\"lebrada \", \n\t\t\t\t\"calador \", \n\t\t\t\t\"bolacea \", \n\t\t\t\t\"acoraba \", \n\t\t\t\t\"agaloco \", \n\t\t\t\t\"acalore \", \n\t\t\t\t\"regalad \", \n\t\t\t\t\"agalero \", \n\t\t\t\t\"begardo \", \n\t\t\t\t\"albacea \", \n\t\t\t\t\"colgada \", \n\t\t\t\t\"robleda \", \n\t\t\t\t\"bodocal \", \n\t\t\t\t\"acodala \", \n\t\t\t\t\"abocare \", \n\t\t\t\t\"redoblo \", \n\t\t\t\t\"acollad \", \n\t\t\t\t\"recabdo \", \n\t\t\t\t\"abocara \", \n\t\t\t\t\"laceara \", \n\t\t\t\t\"abocado \", \n\t\t\t\t\"abocada \", \n\t\t\t\t\"ladeara \", \n\t\t\t\t\"dallare \", \n\t\t\t\t\"acerado \", \n\t\t\t\t\"abeldar \", \n\t\t\t\t\"alocada \", \n\t\t\t\t\"gallera \", \n\t\t\t\t\"acebada \", \n\t\t\t\t\"acollar \", \n\t\t\t\t\"abogara \", \n\t\t\t\t\"lacraba \", \n\t\t\t\t\"aballad \", \n\t\t\t\t\"cerollo \", \n\t\t\t\t\"albarca \", \n\t\t\t\t\"aldabeo \", \n\t\t\t\t\"lobeara \", \n\t\t\t\t\"bocelad \", \n\t\t\t\t\"aldabea \", \n\t\t\t\t\"beldara \", \n\t\t\t\t\"ocelada \", \n\t\t\t\t\"collado \", \n\t\t\t\t\"labrada \", \n\t\t\t\t\"baldare \", \n\t\t\t\t\"aclareo \", \n\t\t\t\t\"dolobre \", \n\t\t\t\t\"alcalde \", \n\t\t\t\t\"baladro \", \n\t\t\t\t\"abacera \", \n\t\t\t\t\"callear \", \n\t\t\t\t\"cebadar \", \n\t\t\t\t\"caballo \", \n\t\t\t\t\"rallaba \", \n\t\t\t\t\"alborea \", \n\t\t\t\t\"callare \", \n\t\t\t\t\"gallero \", \n\t\t\t\t\"alagare \", \n\t\t\t\t\"alagara \", \n\t\t\t\t\"cabalgo \", \n\t\t\t\t\"cebrada \", \n\t\t\t\t\"alberga \", \n\t\t\t\t\"aballar \", \n\t\t\t\t\"cabread \", \n\t\t\t\t\"baldara \", \n\t\t\t\t\"agalera \", \n\t\t\t\t\"acedaba \", \n\t\t\t\t\"laborea \", \n\t\t\t\t\"colorea \", \n\t\t\t\t\"laboral \", \n\t\t\t\t\"laborad \", \n\t\t\t\t\"cobread \", \n\t\t\t\t\"acebado \", \n\t\t\t\t\"rebalga \", \n\t\t\t\t\"abacore \", \n\t\t\t\t\"brocado \", \n\t\t\t\t\"adolore \", \n\t\t\t\t\"coleada \", \n\t\t\t\t\"rebollo \", \n\t\t\t\t\"llagada \", \n\t\t\t\t\"cabalga \", \n\t\t\t\t\"dallaba \", \n\t\t\t\t\"boceara \", \n\t\t\t\t\"lloraba \", \n\t\t\t\t\"colgare \", \n\t\t\t\t\"colgara \", \n\t\t\t\t\"cablera \", \n\t\t\t\t\"agoraba \", \n\t\t\t\t\"acabara \", \n\t\t\t\t\"clorada \", \n\t\t\t\t\"rebalgo \", \n\t\t\t\t\"baldear \", \n\t\t\t\t\"codeara \", \n\t\t\t\t\"gradaba \", \n\t\t\t\t\"collage \", \n\t\t\t\t\"acodare \", \n\t\t\t\t\"ocelado \", \n\t\t\t\t\"grabado \", \n\t\t\t\t\"callara \", \n\t\t\t\t\"baleara \", \n\t\t\t\t\"legador \", \n\t\t\t\t\"blocara \", \n\t\t\t\t\"cerolla \", \n\t\t\t\t\"bollero \", \n\t\t\t\t\"bollera \", \n\t\t\t\t\"goleara \", \n\t\t\t\t\"bollare \", \n\t\t\t\t\"cablear \", \n\t\t\t\t\"goleada \", \n\t\t\t\t\"llagare \", \n\t\t\t\t\"goleaba \", \n\t\t\t\t\"cordelo \", \n\t\t\t\t\"careaba \", \n\t\t\t\t\"colador \", \n\t\t\t\t\"boleara \", \n\t\t\t\t\"ardaleo \", \n\t\t\t\t\"llegada \", \n\t\t\t\t\"ardalea \", \n\t\t\t\t\"cargado \", \n\t\t\t\t\"caldear \", \n\t\t\t\t\"bolardo \", \n\t\t\t\t\"dallara \", \n\t\t\t\t\"rodeaba \", \n\t\t\t\t\"aclarad \", \n\t\t\t\t\"reglado \", \n\t\t\t\t\"lloredo \", \n\t\t\t\t\"albardo \", \n\t\t\t\t\"glabela \", \n\t\t\t\t\"allegar \", \n\t\t\t\t\"arbolad \", \n\t\t\t\t\"llorada \", \n\t\t\t\t\"collera \", \n\t\t\t\t\"acallar \", \n\t\t\t\t\"lograda \", \n\t\t\t\t\"acallad \", \n\t\t\t\t\"abogada \", \n\t\t\t\t\"loadora \", \n\t\t\t\t\"llagaba \", \n\t\t\t\t\"caldera \", \n\t\t\t\t\"celador \", \n\t\t\t\t\"cebador \", \n\t\t\t\t\"carabao \", \n\t\t\t\t\"abacado \", \n\t\t\t\t\"garbead \", \n\t\t\t\t\"lacerad \", \n\t\t\t\t\"corlaba \", \n\t\t\t\t\"doblare \", \n\t\t\t\t\"alocado \", \n\t\t\t\t\"albeara \", \n\t\t\t\t\"alelada \", \n\t\t\t\t\"cabello \", \n\t\t\t\t\"albergo \", \n\t\t\t\t\"coleara \", \n\t\t\t\t\"gallead \", \n\t\t\t\t\"logrado \", \n\t\t\t\t\"cordela \", \n\t\t\t\t\"cargaba \", \n\t\t\t\t\"codeaba \", \n\t\t\t\t\"regoldo \", \n\t\t\t\t\"baldero \", \n\t\t\t\t\"declara \", \n\t\t\t\t\"ocalear \", \n\t\t\t\t\"ocalead \", \n\t\t\t\t\"acodale \", \n\t\t\t\t\"caballa \", \n\t\t\t\t\"abalead \", \n\t\t\t\t\"algebra \", \n\t\t\t\t\"colorad \", \n\t\t\t\t\"alargad \", \n\t\t\t\t\"caldero \", \n\t\t\t\t\"bellaca \", \n\t\t\t\t\"abalear \", \n\t\t\t\t\"llorado \", \n\t\t\t\t\"baladra \", \n\t\t\t\t\"allegad \", \n\t\t\t\t\"callead \", \n\t\t\t\t\"alelado \", \n\t\t\t\t\"robledo \", \n\t\t\t\t\"cloraba \", \n\t\t\t\t\"caladre \", \n\t\t\t\t\"labrado \", \n\t\t\t\t\"doblara \", \n\t\t\t\t\"begarda \", \n\t\t\t\t\"oledora \", \n\t\t\t\t\"acerada \", \n\t\t\t\t\"laboreo \", \n\t\t\t\t\"cablero \", \n\t\t\t\t\"cogedor \", \n\t\t\t\t\"reglaba \", \n\t\t\t\t\"colgaba \", \n\t\t\t\t\"bollara \", \n\t\t\t\t\"arelaba \", \n\t\t\t\t\"blocare \", \n\t\t\t\t\"cablead \", \n\t\t\t\t\"ecologa \", \n\t\t\t\t\"lobrega \", \n\t\t\t\t\"coleaba \", \n\t\t\t\t\"abacora \", \n\t\t\t\t\"alardea \", \n\t\t\t\t\"dragaba \", \n\t\t\t\t\"lacrado \", \n\t\t\t\t\"abogado \", \n\t\t\t\t\"cegador \", \n\t\t\t\t\"acodalo \", \n\t\t\t\t\"alcolla \", \n\t\t\t\t\"allegro \", \n\t\t\t\t\"acerola \", \n\t\t\t\t\"colodra \", \n\t\t\t\t\"rocalla \", \n\t\t\t\t\"cordoba \", \n\t\t\t\t\"llagado \", \n\t\t\t\t\"cebadal \", \n\t\t\t\t\"bracead \", \n\t\t\t\t\"alboreo \", \n\t\t\t\t\"aceraba \", \n\t\t\t\t\"debocar \", \n\t\t\t\t\"alegrad \", \n\t\t\t\t\"balero \", \n\t\t\t\t\"ollero \", \n\t\t\t\t\"bodega \", \n\t\t\t\t\"dolare \", \n\t\t\t\t\"barloa \", \n\t\t\t\t\"aclara \", \n\t\t\t\t\"alegad \", \n\t\t\t\t\"callar \", \n\t\t\t\t\"cebado \", \n\t\t\t\t\"alagar \", \n\t\t\t\t\"bardal \", \n\t\t\t\t\"rodaba \", \n\t\t\t\t\"ballar \", \n\t\t\t\t\"abolle \", \n\t\t\t\t\"acalla \", \n\t\t\t\t\"acabar \", \n\t\t\t\t\"barcal \", \n\t\t\t\t\"alegar \", \n\t\t\t\t\"agrace \", \n\t\t\t\t\"robalo \", \n\t\t\t\t\"calare \", \n\t\t\t\t\"brolle \", \n\t\t\t\t\"redola \", \n\t\t\t\t\"aldaba \", \n\t\t\t\t\"baldeo \", \n\t\t\t\t\"rogada \", \n\t\t\t\t\"albera \", \n\t\t\t\t\"deboco \", \n\t\t\t\t\"lobado \", \n\t\t\t\t\"aballa \", \n\t\t\t\t\"rallad \", \n\t\t\t\t\"bregad \", \n\t\t\t\t\"acorde \", \n\t\t\t\t\"adarce \", \n\t\t\t\t\"acabad \", \n\t\t\t\t\"redaba \", \n\t\t\t\t\"regaba \", \n\t\t\t\t\"lacado \", \n\t\t\t\t\"brolla \", \n\t\t\t\t\"albaca \", \n\t\t\t\t\"abolla \", \n\t\t\t\t\"ladear \", \n\t\t\t\t\"bolada \", \n\t\t\t\t\"dallar \", \n\t\t\t\t\"cebara \", \n\t\t\t\t\"bocera \", \n\t\t\t\t\"oleaba \", \n\t\t\t\t\"recado \", \n\t\t\t\t\"aleaba \", \n\t\t\t\t\"legara \", \n\t\t\t\t\"aladre \", \n\t\t\t\t\"bocela \", \n\t\t\t\t\"aladra \", \n\t\t\t\t\"galera \", \n\t\t\t\t\"bocear \", \n\t\t\t\t\"bocead \", \n\t\t\t\t\"rocada \", \n\t\t\t\t\"abogad \", \n\t\t\t\t\"rabead \", \n\t\t\t\t\"bocado \", \n\t\t\t\t\"acerad \", \n\t\t\t\t\"corola \", \n\t\t\t\t\"ladreo \", \n\t\t\t\t\"cabare \", \n\t\t\t\t\"balago \", \n\t\t\t\t\"lobear \", \n\t\t\t\t\"aborde \", \n\t\t\t\t\"abocar \", \n\t\t\t\t\"ladera \", \n\t\t\t\t\"coread \", \n\t\t\t\t\"redolo \", \n\t\t\t\t\"beldar \", \n\t\t\t\t\"abrego \", \n\t\t\t\t\"colera \", \n\t\t\t\t\"recaba \", \n\t\t\t\t\"dolera \", \n\t\t\t\t\"gallea \", \n\t\t\t\t\"golead \", \n\t\t\t\t\"cordal \", \n\t\t\t\t\"labrad \", \n\t\t\t\t\"aladar \", \n\t\t\t\t\"acordo \", \n\t\t\t\t\"abaleo \", \n\t\t\t\t\"calara \", \n\t\t\t\t\"alarga \", \n\t\t\t\t\"labore \", \n\t\t\t\t\"colage \", \n\t\t\t\t\"lobera \", \n\t\t\t\t\"lobero \", \n\t\t\t\t\"recodo \", \n\t\t\t\t\"colora \", \n\t\t\t\t\"aclaro \", \n\t\t\t\t\"recalo \", \n\t\t\t\t\"alagad \", \n\t\t\t\t\"agallo \", \n\t\t\t\t\"caldea \", \n\t\t\t\t\"recala \", \n\t\t\t\t\"acerbo \", \n\t\t\t\t\"recabo \", \n\t\t\t\t\"llorad \", \n\t\t\t\t\"gredal \", \n\t\t\t\t\"alcoba \", \n\t\t\t\t\"reglad \", \n\t\t\t\t\"grecal \", \n\t\t\t\t\"oleara \", \n\t\t\t\t\"reblad \", \n\t\t\t\t\"alabeo \", \n\t\t\t\t\"calada \", \n\t\t\t\t\"ladero \", \n\t\t\t\t\"colgad \", \n\t\t\t\t\"agorad \", \n\t\t\t\t\"colero \", \n\t\t\t\t\"balead \", \n\t\t\t\t\"albero \", \n\t\t\t\t\"colega \", \n\t\t\t\t\"balear \", \n\t\t\t\t\"colear \", \n\t\t\t\t\"aballe \", \n\t\t\t\t\"brocal \", \n\t\t\t\t\"arbolo \", \n\t\t\t\t\"cagada \", \n\t\t\t\t\"bolera \", \n\t\t\t\t\"aladro \", \n\t\t\t\t\"laboro \", \n\t\t\t\t\"callao \", \n\t\t\t\t\"colare \", \n\t\t\t\t\"colara \", \n\t\t\t\t\"alegra \", \n\t\t\t\t\"adargo \", \n\t\t\t\t\"goldre \", \n\t\t\t\t\"barceo \", \n\t\t\t\t\"colado \", \n\t\t\t\t\"gacela \", \n\t\t\t\t\"colada \", \n\t\t\t\t\"agrado \", \n\t\t\t\t\"celaba \", \n\t\t\t\t\"albala \", \n\t\t\t\t\"erogad \", \n\t\t\t\t\"colaba \", \n\t\t\t\t\"global \", \n\t\t\t\t\"grabad \", \n\t\t\t\t\"cogera \", \n\t\t\t\t\"bagara \", \n\t\t\t\t\"robada \", \n\t\t\t\t\"balare \", \n\t\t\t\t\"ocaleo \", \n\t\t\t\t\"llegar \", \n\t\t\t\t\"gallar \", \n\t\t\t\t\"codera \", \n\t\t\t\t\"bogara \", \n\t\t\t\t\"oreaba \", \n\t\t\t\t\"codear \", \n\t\t\t\t\"adarga \", \n\t\t\t\t\"abocad \", \n\t\t\t\t\"arcada \", \n\t\t\t\t\"edraba \", \n\t\t\t\t\"roblad \", \n\t\t\t\t\"cobreo \", \n\t\t\t\t\"baldea \", \n\t\t\t\t\"labora \", \n\t\t\t\t\"cobrea \", \n\t\t\t\t\"oblada \", \n\t\t\t\t\"araceo \", \n\t\t\t\t\"boreal \", \n\t\t\t\t\"arelad \", \n\t\t\t\t\"calado \", \n\t\t\t\t\"robeco \", \n\t\t\t\t\"alegro \", \n\t\t\t\t\"abordo \", \n\t\t\t\t\"abalea \", \n\t\t\t\t\"coalla \", \n\t\t\t\t\"oleado \", \n\t\t\t\t\"abollo \", \n\t\t\t\t\"loador \", \n\t\t\t\t\"decoro \", \n\t\t\t\t\"cloral \", \n\t\t\t\t\"rolaba \", \n\t\t\t\t\"agalla \", \n\t\t\t\t\"recoda \", \n\t\t\t\t\"aleara \", \n\t\t\t\t\"rogado \", \n\t\t\t\t\"regala \", \n\t\t\t\t\"obrada \", \n\t\t\t\t\"bolead \", \n\t\t\t\t\"clareo \", \n\t\t\t\t\"gordal \", \n\t\t\t\t\"alargo \", \n\t\t\t\t\"clarea \", \n\t\t\t\t\"acorad \", \n\t\t\t\t\"gabela \", \n\t\t\t\t\"callad \", \n\t\t\t\t\"colead \", \n\t\t\t\t\"glabra \", \n\t\t\t\t\"oleada \", \n\t\t\t\t\"cabrea \", \n\t\t\t\t\"alcedo \", \n\t\t\t\t\"lacead \", \n\t\t\t\t\"llagar \", \n\t\t\t\t\"arable \", \n\t\t\t\t\"groaba \", \n\t\t\t\t\"celara \", \n\t\t\t\t\"acarad \", \n\t\t\t\t\"clorad \", \n\t\t\t\t\"corlad \", \n\t\t\t\t\"celada \", \n\t\t\t\t\"alocar \", \n\t\t\t\t\"cablea \", \n\t\t\t\t\"abarca \", \n\t\t\t\t\"aballo \", \n\t\t\t\t\"cegara \", \n\t\t\t\t\"loable \", \n\t\t\t\t\"albead \", \n\t\t\t\t\"bolero \", \n\t\t\t\t\"bracea \", \n\t\t\t\t\"cegaba \", \n\t\t\t\t\"collar \", \n\t\t\t\t\"calaba \", \n\t\t\t\t\"blocar \", \n\t\t\t\t\"ollera \", \n\t\t\t\t\"bogare \", \n\t\t\t\t\"blocad \", \n\t\t\t\t\"acolle \", \n\t\t\t\t\"bogada \", \n\t\t\t\t\"arbole \", \n\t\t\t\t\"lobead \", \n\t\t\t\t\"lacrad \", \n\t\t\t\t\"golear \", \n\t\t\t\t\"acedar \", \n\t\t\t\t\"bollar \", \n\t\t\t\t\"algaba \", \n\t\t\t\t\"garbeo \", \n\t\t\t\t\"lacara \", \n\t\t\t\t\"dolara \", \n\t\t\t\t\"cebada \", \n\t\t\t\t\"lacare \", \n\t\t\t\t\"bolear \", \n\t\t\t\t\"acodar \", \n\t\t\t\t\"ralead \", \n\t\t\t\t\"albedo \", \n\t\t\t\t\"bocelo \", \n\t\t\t\t\"arcedo \", \n\t\t\t\t\"balara \", \n\t\t\t\t\"bacara \", \n\t\t\t\t\"cargad \", \n\t\t\t\t\"labelo \", \n\t\t\t\t\"legado \", \n\t\t\t\t\"allega \", \n\t\t\t\t\"legaba \", \n\t\t\t\t\"caread \", \n\t\t\t\t\"acalle \", \n\t\t\t\t\"becara \", \n\t\t\t\t\"allego \", \n\t\t\t\t\"cardal \", \n\t\t\t\t\"gradeo \", \n\t\t\t\t\"carbol \", \n\t\t\t\t\"carado \", \n\t\t\t\t\"carada \", \n\t\t\t\t\"carabo \", \n\t\t\t\t\"balaca \", \n\t\t\t\t\"carabe \", \n\t\t\t\t\"baldar \", \n\t\t\t\t\"caraba \", \n\t\t\t\t\"abrace \", \n\t\t\t\t\"acerba \", \n\t\t\t\t\"garbea \", \n\t\t\t\t\"rabada \", \n\t\t\t\t\"galleo \", \n\t\t\t\t\"aboral \", \n\t\t\t\t\"acelga \", \n\t\t\t\t\"lacear \", \n\t\t\t\t\"calleo \", \n\t\t\t\t\"labaro \", \n\t\t\t\t\"becado \", \n\t\t\t\t\"cordel \", \n\t\t\t\t\"croaba \", \n\t\t\t\t\"callea \", \n\t\t\t\t\"glabro \", \n\t\t\t\t\"oledor \", \n\t\t\t\t\"lacera \", \n\t\t\t\t\"ordago \", \n\t\t\t\t\"garlad \", \n\t\t\t\t\"arbola \", \n\t\t\t\t\"balada \", \n\t\t\t\t\"aclare \", \n\t\t\t\t\"ocalea \", \n\t\t\t\t\"calera \", \n\t\t\t\t\"legrad \", \n\t\t\t\t\"bacera \", \n\t\t\t\t\"doblar \", \n\t\t\t\t\"deboca \", \n\t\t\t\t\"caldeo \", \n\t\t\t\t\"cableo \", \n\t\t\t\t\"lacada \", \n\t\t\t\t\"acollo \", \n\t\t\t\t\"ollado \", \n\t\t\t\t\"dolora \", \n\t\t\t\t\"regalo \", \n\t\t\t\t\"lacero \", \n\t\t\t\t\"albada \", \n\t\t\t\t\"dolaba \", \n\t\t\t\t\"cobrad \", \n\t\t\t\t\"orlaba \", \n\t\t\t\t\"abogar \", \n\t\t\t\t\"bollad \", \n\t\t\t\t\"bagare \", \n\t\t\t\t\"cabala \", \n\t\t\t\t\"aborda \", \n\t\t\t\t\"oreada \", \n\t\t\t\t\"brollo \", \n\t\t\t\t\"doraba \", \n\t\t\t\t\"colgar \", \n\t\t\t\t\"acallo \", \n\t\t\t\t\"cagare \", \n\t\t\t\t\"cagara \", \n\t\t\t\t\"llagad \", \n\t\t\t\t\"cabreo \", \n\t\t\t\t\"aracea \", \n\t\t\t\t\"cagado \", \n\t\t\t\t\"ladrea \", \n\t\t\t\t\"albear \", \n\t\t\t\t\"brecol \", \n\t\t\t\t\"cagaba \", \n\t\t\t\t\"blocao \", \n\t\t\t\t\"rodela \", \n\t\t\t\t\"rollad \", \n\t\t\t\t\"areola \", \n\t\t\t\t\"algara \", \n\t\t\t\t\"cadera \", \n\t\t\t\t\"braceo \", \n\t\t\t\t\"lacaba \", \n\t\t\t\t\"alarde \", \n\t\t\t\t\"colore \", \n\t\t\t\t\"galeo \", \n\t\t\t\t\"gorda \", \n\t\t\t\t\"cabra \", \n\t\t\t\t\"credo \", \n\t\t\t\t\"alcor \", \n\t\t\t\t\"borde \", \n\t\t\t\t\"codea \", \n\t\t\t\t\"colad \", \n\t\t\t\t\"rodea \", \n\t\t\t\t\"codal \", \n\t\t\t\t\"llore \", \n\t\t\t\t\"rollo \", \n\t\t\t\t\"badea \", \n\t\t\t\t\"cable \", \n\t\t\t\t\"caber \", \n\t\t\t\t\"coleo \", \n\t\t\t\t\"acaro \", \n\t\t\t\t\"greba \", \n\t\t\t\t\"aldol \", \n\t\t\t\t\"gabro \", \n\t\t\t\t\"lacar \", \n\t\t\t\t\"erogo \", \n\t\t\t\t\"aboga \", \n\t\t\t\t\"grada \", \n\t\t\t\t\"cabro \", \n\t\t\t\t\"celar \", \n\t\t\t\t\"alega \", \n\t\t\t\t\"rolle \", \n\t\t\t\t\"alaga \", \n\t\t\t\t\"cagar \", \n\t\t\t\t\"clero \", \n\t\t\t\t\"legro \", \n\t\t\t\t\"braco \", \n\t\t\t\t\"reala \", \n\t\t\t\t\"reglo \", \n\t\t\t\t\"corea \", \n\t\t\t\t\"cabal \", \n\t\t\t\t\"calad \", \n\t\t\t\t\"gerbo \", \n\t\t\t\t\"alear \", \n\t\t\t\t\"corlo \", \n\t\t\t\t\"roela \", \n\t\t\t\t\"bagad \", \n\t\t\t\t\"raleo \", \n\t\t\t\t\"alalo \", \n\t\t\t\t\"cello \", \n\t\t\t\t\"decor \", \n\t\t\t\t\"calar \", \n\t\t\t\t\"cabre \", \n\t\t\t\t\"ralle \", \n\t\t\t\t\"carlo \", \n\t\t\t\t\"breca \", \n\t\t\t\t\"careo \", \n\t\t\t\t\"orale \", \n\t\t\t\t\"clore \", \n\t\t\t\t\"regla \", \n\t\t\t\t\"braga \", \n\t\t\t\t\"drago \", \n\t\t\t\t\"acoda \", \n\t\t\t\t\"carda \", \n\t\t\t\t\"colla \", \n\t\t\t\t\"rabea \", \n\t\t\t\t\"braca \", \n\t\t\t\t\"laceo \", \n\t\t\t\t\"racel \", \n\t\t\t\t\"cobra \", \n\t\t\t\t\"coral \", \n\t\t\t\t\"logro \", \n\t\t\t\t\"gordo \", \n\t\t\t\t\"grabo \", \n\t\t\t\t\"bollo \", \n\t\t\t\t\"caoba \", \n\t\t\t\t\"goleo \", \n\t\t\t\t\"coala \", \n\t\t\t\t\"cebar \", \n\t\t\t\t\"greco \", \n\t\t\t\t\"garla \", \n\t\t\t\t\"cobla \", \n\t\t\t\t\"bolla \", \n\t\t\t\t\"golea \", \n\t\t\t\t\"delga \", \n\t\t\t\t\"boleo \", \n\t\t\t\t\"cebad \", \n\t\t\t\t\"eroga \", \n\t\t\t\t\"llera \", \n\t\t\t\t\"claro \", \n\t\t\t\t\"ocelo \", \n\t\t\t\t\"calao \", \n\t\t\t\t\"cargo \", \n\t\t\t\t\"globo \", \n\t\t\t\t\"balad \", \n\t\t\t\t\"colar \", \n\t\t\t\t\"lobea \", \n\t\t\t\t\"legra \", \n\t\t\t\t\"cagad \", \n\t\t\t\t\"barde \", \n\t\t\t\t\"ladeo \", \n\t\t\t\t\"rabel \", \n\t\t\t\t\"aboca \", \n\t\t\t\t\"cardo \", \n\t\t\t\t\"geada \", \n\t\t\t\t\"bogar \", \n\t\t\t\t\"roblo \", \n\t\t\t\t\"bogad \", \n\t\t\t\t\"dallo \", \n\t\t\t\t\"garle \", \n\t\t\t\t\"rolde \", \n\t\t\t\t\"rolad \", \n\t\t\t\t\"bolea \", \n\t\t\t\t\"greca \", \n\t\t\t\t\"dalla \", \n\t\t\t\t\"boceo \", \n\t\t\t\t\"greda \", \n\t\t\t\t\"olead \", \n\t\t\t\t\"dable \", \n\t\t\t\t\"calor \", \n\t\t\t\t\"robla \", \n\t\t\t\t\"callo \", \n\t\t\t\t\"cegad \", \n\t\t\t\t\"larga \", \n\t\t\t\t\"croad \", \n\t\t\t\t\"bocea \", \n\t\t\t\t\"cebra \", \n\t\t\t\t\"bocal \", \n\t\t\t\t\"reoca \", \n\t\t\t\t\"goral \", \n\t\t\t\t\"corla \", \n\t\t\t\t\"bloco \", \n\t\t\t\t\"roble \", \n\t\t\t\t\"rallo \", \n\t\t\t\t\"rebol \", \n\t\t\t\t\"beldo \", \n\t\t\t\t\"eraba \", \n\t\t\t\t\"bloca \", \n\t\t\t\t\"doral \", \n\t\t\t\t\"bledo \", \n\t\t\t\t\"alead \", \n\t\t\t\t\"beodo \", \n\t\t\t\t\"beoda \", \n\t\t\t\t\"debla \", \n\t\t\t\t\"broca \", \n\t\t\t\t\"lleco \", \n\t\t\t\t\"doler \", \n\t\t\t\t\"bella \", \n\t\t\t\t\"belga \", \n\t\t\t\t\"areca \", \n\t\t\t\t\"ergol \", \n\t\t\t\t\"boldo \", \n\t\t\t\t\"oraba \", \n\t\t\t\t\"legar \", \n\t\t\t\t\"alego \", \n\t\t\t\t\"geoda \", \n\t\t\t\t\"carea \", \n\t\t\t\t\"becar \", \n\t\t\t\t\"ollao \", \n\t\t\t\t\"becad \", \n\t\t\t\t\"doble \", \n\t\t\t\t\"loaba \", \n\t\t\t\t\"locro \", \n\t\t\t\t\"lleca \", \n\t\t\t\t\"ralea \", \n\t\t\t\t\"rabeo \", \n\t\t\t\t\"barda \", \n\t\t\t\t\"barco \", \n\t\t\t\t\"olear \", \n\t\t\t\t\"droga \", \n\t\t\t\t\"cerda \", \n\t\t\t\t\"brego \", \n\t\t\t\t\"draba \", \n\t\t\t\t\"brega \", \n\t\t\t\t\"alala \", \n\t\t\t\t\"acare \", \n\t\t\t\t\"baleo \", \n\t\t\t\t\"dalle \", \n\t\t\t\t\"adobe \", \n\t\t\t\t\"albor \", \n\t\t\t\t\"oread \", \n\t\t\t\t\"bello \", \n\t\t\t\t\"balea \", \n\t\t\t\t\"gacel \", \n\t\t\t\t\"rolla \", \n\t\t\t\t\"graba \", \n\t\t\t\t\"algol \", \n\t\t\t\t\"albar \", \n\t\t\t\t\"acoro \", \n\t\t\t\t\"celda \", \n\t\t\t\t\"calla \", \n\t\t\t\t\"colea \", \n\t\t\t\t\"delco \", \n\t\t\t\t\"rodal \", \n\t\t\t\t\"balda \", \n\t\t\t\t\"llora \", \n\t\t\t\t\"acabe \", \n\t\t\t\t\"balar \", \n\t\t\t\t\"ollar \", \n\t\t\t\t\"ardea \", \n\t\t\t\t\"acara \", \n\t\t\t\t\"glera \", \n\t\t\t\t\"dobla \", \n\t\t\t\t\"llago \", \n\t\t\t\t\"larda \", \n\t\t\t\t\"orlad \", \n\t\t\t\t\"groad \", \n\t\t\t\t\"lacad \", \n\t\t\t\t\"bagre \", \n\t\t\t\t\"labro \", \n\t\t\t\t\"dolar \", \n\t\t\t\t\"coger \", \n\t\t\t\t\"bagar \", \n\t\t\t\t\"draga \", \n\t\t\t\t\"lodra \", \n\t\t\t\t\"legal \", \n\t\t\t\t\"badal \", \n\t\t\t\t\"borda \", \n\t\t\t\t\"grado \", \n\t\t\t\t\"loare \", \n\t\t\t\t\"grade \", \n\t\t\t\t\"acodo \", \n\t\t\t\t\"acode \", \n\t\t\t\t\"acebo \", \n\t\t\t\t\"grabe \", \n\t\t\t\t\"lobeo \", \n\t\t\t\t\"lacro \", \n\t\t\t\t\"lacre \", \n\t\t\t\t\"erala \", \n\t\t\t\t\"caera \", \n\t\t\t\t\"argel \", \n\t\t\t\t\"labra \", \n\t\t\t\t\"arelo \", \n\t\t\t\t\"cobol \", \n\t\t\t\t\"balde \", \n\t\t\t\t\"arela \", \n\t\t\t\t\"cerdo \", \n\t\t\t\t\"lerda \", \n\t\t\t\t\"garbo \", \n\t\t\t\t\"abada \", \n\t\t\t\t\"bolle \", \n\t\t\t\t\"bocel \", \n\t\t\t\t\"color \", \n\t\t\t\t\"calda \", \n\t\t\t\t\"godeo \", \n\t\t\t\t\"abaco \", \n\t\t\t\t\"lacea \", \n\t\t\t\t\"local \", \n\t\t\t\t\"borla \", \n\t\t\t\t\"alago \", \n\t\t\t\t\"bordo \", \n\t\t\t\t\"doblo \", \n\t\t\t\t\"gleba \", \n\t\t\t\t\"calle \", \n\t\t\t\t\"acera \", \n\t\t\t\t\"cabed \", \n\t\t\t\t\"acedo \", \n\t\t\t\t\"clara \", \n\t\t\t\t\"acaba \", \n\t\t\t\t\"arbol \", \n\t\t\t\t\"arado \", \n\t\t\t\t\"arada \", \n\t\t\t\t\"alada \", \n\t\t\t\t\"olera \", \n\t\t\t\t\"garlo \", \n\t\t\t\t\"labor \", \n\t\t\t\t\"arabo \", \n\t\t\t\t\"cella \", \n\t\t\t\t\"arabe \", \n\t\t\t\t\"araba \", \n\t\t\t\t\"redol \", \n\t\t\t\t\"oblea \", \n\t\t\t\t\"alora \", \n\t\t\t\t\"obelo \", \n\t\t\t\t\"celad \", \n\t\t\t\t\"gallo \", \n\t\t\t\t\"coreo \", \n\t\t\t\t\"agoro \", \n\t\t\t\t\"acero \", \n\t\t\t\t\"cegar \", \n\t\t\t\t\"agora \", \n\t\t\t\t\"galla \", \n\t\t\t\t\"codeo \", \n\t\t\t\t\"acora \", \n\t\t\t\t\"cedro \", \n\t\t\t\t\"radal \", \n\t\t\t\t\"legad \", \n\t\t\t\t\"abogo \", \n\t\t\t\t\"acore \", \n\t\t\t\t\"colgo \", \n\t\t\t\t\"bread \", \n\t\t\t\t\"clora \", \n\t\t\t\t\"albeo \", \n\t\t\t\t\"adoro \", \n\t\t\t\t\"galea \", \n\t\t\t\t\"barca \", \n\t\t\t\t\"alabe \", \n\t\t\t\t\"algar \", \n\t\t\t\t\"aceda \", \n\t\t\t\t\"caldo \", \n\t\t\t\t\"alero \", \n\t\t\t\t\"alera \", \n\t\t\t\t\"adobo \", \n\t\t\t\t\"alelo \", \n\t\t\t\t\"lagar \", \n\t\t\t\t\"coged \", \n\t\t\t\t\"caobo \", \n\t\t\t\t\"corle \", \n\t\t\t\t\"dogre \", \n\t\t\t\t\"regad \", \n\t\t\t\t\"agore \", \n\t\t\t\t\"roleo \", \n\t\t\t\t\"olada \", \n\t\t\t\t\"lloro \", \n\t\t\t\t\"ralla \", \n\t\t\t\t\"cloro \", \n\t\t\t\t\"ladea \", \n\t\t\t\t\"alado \", \n\t\t\t\t\"reblo \", \n\t\t\t\t\"cobre \", \n\t\t\t\t\"rebla \", \n\t\t\t\t\"baldo \", \n\t\t\t\t\"corbe \", \n\t\t\t\t\"lacra \", \n\t\t\t\t\"albea \", \n\t\t\t\t\"cobro \", \n\t\t\t\t\"rodeo \", \n\t\t\t\t\"bardo \", \n\t\t\t\t\"labre \", \n\t\t\t\t\"llaga \", \n\t\t\t\t\"grelo \", \n\t\t\t\t\"carel \", \n\t\t\t\t\"carga \", \n\t\t\t\t\"robda \", \n\t\t\t\t\"dogal \", \n\t\t\t\t\"aldea \", \n\t\t\t\t\"dolor \", \n\t\t\t\t\"ladra \", \n\t\t\t\t\"llaca \", \n\t\t\t\t\"lerdo \", \n\t\t\t\t\"loara \", \n\t\t\t\t\"largo \", \n\t\t\t\t\"acabo \", \n\t\t\t\t\"aboco \", \n\t\t\t\t\"obrad \", \n\t\t\t\t\"adore \", \n\t\t\t\t\"rabal \", \n\t\t\t\t\"adora \", \n\t\t\t\t\"lardo \", \n\t\t\t\t\"roda \", \n\t\t\t\t\"albo \", \n\t\t\t\t\"agro \", \n\t\t\t\t\"rolo \", \n\t\t\t\t\"caro \", \n\t\t\t\t\"caga \", \n\t\t\t\t\"alce \", \n\t\t\t\t\"garo \", \n\t\t\t\t\"groo \", \n\t\t\t\t\"cara \", \n\t\t\t\t\"cora \", \n\t\t\t\t\"laco \", \n\t\t\t\t\"logo \", \n\t\t\t\t\"cada \", \n\t\t\t\t\"roel \", \n\t\t\t\t\"coda \", \n\t\t\t\t\"orco \", \n\t\t\t\t\"alga \", \n\t\t\t\t\"orce \", \n\t\t\t\t\"redo \", \n\t\t\t\t\"cago \", \n\t\t\t\t\"loor \", \n\t\t\t\t\"arlo \", \n\t\t\t\t\"boro \", \n\t\t\t\t\"doga \", \n\t\t\t\t\"role \", \n\t\t\t\t\"bada \", \n\t\t\t\t\"olla \", \n\t\t\t\t\"ordo \", \n\t\t\t\t\"cala \", \n\t\t\t\t\"calo \", \n\t\t\t\t\"cero \", \n\t\t\t\t\"reda \", \n\t\t\t\t\"cela \", \n\t\t\t\t\"bale \", \n\t\t\t\t\"alar \", \n\t\t\t\t\"lace \", \n\t\t\t\t\"cole \", \n\t\t\t\t\"cabe \", \n\t\t\t\t\"dolo \", \n\t\t\t\t\"bago \", \n\t\t\t\t\"cola \", \n\t\t\t\t\"loro \", \n\t\t\t\t\"daga \", \n\t\t\t\t\"caer \", \n\t\t\t\t\"caed \", \n\t\t\t\t\"daba \", \n\t\t\t\t\"dore \", \n\t\t\t\t\"croo \", \n\t\t\t\t\"lada \", \n\t\t\t\t\"rogo \", \n\t\t\t\t\"edro \", \n\t\t\t\t\"blao \", \n\t\t\t\t\"obro \", \n\t\t\t\t\"arac \", \n\t\t\t\t\"cabo \", \n\t\t\t\t\"crea \", \n\t\t\t\t\"godo \", \n\t\t\t\t\"colo \", \n\t\t\t\t\"goda \", \n\t\t\t\t\"arda \", \n\t\t\t\t\"agre \", \n\t\t\t\t\"groa \", \n\t\t\t\t\"rego \", \n\t\t\t\t\"ador \", \n\t\t\t\t\"agra \", \n\t\t\t\t\"cego \", \n\t\t\t\t\"raba \", \n\t\t\t\t\"bode \", \n\t\t\t\t\"boda \", \n\t\t\t\t\"alla \", \n\t\t\t\t\"rala \", \n\t\t\t\t\"raed \", \n\t\t\t\t\"croe \", \n\t\t\t\t\"cedo \", \n\t\t\t\t\"rada \", \n\t\t\t\t\"croa \", \n\t\t\t\t\"creo \", \n\t\t\t\t\"doro \", \n\t\t\t\t\"aedo \", \n\t\t\t\t\"aeda \", \n\t\t\t\t\"adra \", \n\t\t\t\t\"algo \", \n\t\t\t\t\"deba \", \n\t\t\t\t\"aloa \", \n\t\t\t\t\"boca \", \n\t\t\t\t\"eral \", \n\t\t\t\t\"deca \", \n\t\t\t\t\"orlo \", \n\t\t\t\t\"orle \", \n\t\t\t\t\"groe \", \n\t\t\t\t\"aleo \", \n\t\t\t\t\"orla \", \n\t\t\t\t\"oreo \", \n\t\t\t\t\"baca \", \n\t\t\t\t\"bala \", \n\t\t\t\t\"boga \", \n\t\t\t\t\"orea \", \n\t\t\t\t\"alea \", \n\t\t\t\t\"doce \", \n\t\t\t\t\"doca \", \n\t\t\t\t\"roce \", \n\t\t\t\t\"cale \", \n\t\t\t\t\"lodo \", \n\t\t\t\t\"orbe \", \n\t\t\t\t\"brea \", \n\t\t\t\t\"oral \", \n\t\t\t\t\"orad \", \n\t\t\t\t\"lera \", \n\t\t\t\t\"gola \", \n\t\t\t\t\"olor \", \n\t\t\t\t\"beco \", \n\t\t\t\t\"breo \", \n\t\t\t\t\"geco \", \n\t\t\t\t\"ello \", \n\t\t\t\t\"balo \", \n\t\t\t\t\"llar \", \n\t\t\t\t\"roca \", \n\t\t\t\t\"oler \", \n\t\t\t\t\"oleo \", \n\t\t\t\t\"rabo \", \n\t\t\t\t\"lago \", \n\t\t\t\t\"oled \", \n\t\t\t\t\"coba \", \n\t\t\t\t\"lobo \", \n\t\t\t\t\"ardo \", \n\t\t\t\t\"grao \", \n\t\t\t\t\"gara \", \n\t\t\t\t\"galo \", \n\t\t\t\t\"olea \", \n\t\t\t\t\"bola \", \n\t\t\t\t\"alba \", \n\t\t\t\t\"bogo \", \n\t\t\t\t\"ogro \", \n\t\t\t\t\"odre \", \n\t\t\t\t\"bolo \", \n\t\t\t\t\"ceda \", \n\t\t\t\t\"lela \", \n\t\t\t\t\"goce \", \n\t\t\t\t\"arco \", \n\t\t\t\t\"real \", \n\t\t\t\t\"cebo \", \n\t\t\t\t\"coge \", \n\t\t\t\t\"codo \", \n\t\t\t\t\"arce \", \n\t\t\t\t\"laca \", \n\t\t\t\t\"ella \", \n\t\t\t\t\"ocal \", \n\t\t\t\t\"area \", \n\t\t\t\t\"debo \", \n\t\t\t\t\"abad \", \n\t\t\t\t\"obre \", \n\t\t\t\t\"edra \", \n\t\t\t\t\"roed \", \n\t\t\t\t\"obra \", \n\t\t\t\t\"oboe \", \n\t\t\t\t\"acal \", \n\t\t\t\t\"arad \", \n\t\t\t\t\"aloe \", \n\t\t\t\t\"lado \", \n\t\t\t\t\"lord \", \n\t\t\t\t\"lora \", \n\t\t\t\t\"robo \", \n\t\t\t\t\"lega \", \n\t\t\t\t\"lolo \", \n\t\t\t\t\"erad \", \n\t\t\t\t\"rola \", \n\t\t\t\t\"leal \", \n\t\t\t\t\"lead \", \n\t\t\t\t\"abre \", \n\t\t\t\t\"baga \", \n\t\t\t\t\"boer \", \n\t\t\t\t\"beca \", \n\t\t\t\t\"loco \", \n\t\t\t\t\"celo \", \n\t\t\t\t\"loca \", \n\t\t\t\t\"raca \", \n\t\t\t\t\"orca \", \n\t\t\t\t\"arel \", \n\t\t\t\t\"abra \", \n\t\t\t\t\"gala \", \n\t\t\t\t\"dare \", \n\t\t\t\t\"dara \", \n\t\t\t\t\"ledo \", \n\t\t\t\t\"leda \", \n\t\t\t\t\"daca \", \n\t\t\t\t\"bloc \", \n\t\t\t\t\"loba \", \n\t\t\t\t\"dora \", \n\t\t\t\t\"dola \", \n\t\t\t\t\"loar \", \n\t\t\t\t\"dogo \", \n\t\t\t\t\"acre \", \n\t\t\t\t\"load \", \n\t\t\t\t\"ralo \", \n\t\t\t\t\"dole \", \n\t\t\t\t\"arca \", \n\t\t\t\t\"core \", \n\t\t\t\t\"lelo \", \n\t\t\t\t\"lego \", \n\t\t\t\t\"rode \", \n\t\t\t\t\"ergo \", \n\t\t\t\t\"rodo \", \n\t\t\t\t\"cera \", \n\t\t\t\t\"ocre \", \n\t\t\t\t\"crol \", \n\t\t\t\t\"broa \", \n\t\t\t\t\"ceba \", \n\t\t\t\t\"laro \", \n\t\t\t\t\"arde \", \n\t\t\t\t\"coro \", \n\t\t\t\t\"dala \", \n\t\t\t\t\"abro \", \n\t\t\t\t\"alo \", \n\t\t\t\t\"leo \", \n\t\t\t\t\"bel \", \n\t\t\t\t\"ego \", \n\t\t\t\t\"loa \", \n\t\t\t\t\"lle \", \n\t\t\t\t\"bar \", \n\t\t\t\t\"bao \", \n\t\t\t\t\"gea \", \n\t\t\t\t\"ceo \", \n\t\t\t\t\"caa \", \n\t\t\t\t\"ore \", \n\t\t\t\t\"ada \", \n\t\t\t\t\"ara \", \n\t\t\t\t\"ora \", \n\t\t\t\t\"aca \", \n\t\t\t\t\"gel \", \n\t\t\t\t\"are \", \n\t\t\t\t\"del \", \n\t\t\t\t\"cea \", \n\t\t\t\t\"goa \", \n\t\t\t\t\"ola \", \n\t\t\t\t\"oco \", \n\t\t\t\t\"rob \", \n\t\t\t\t\"dar \", \n\t\t\t\t\"reg \", \n\t\t\t\t\"oca \", \n\t\t\t\t\"reo \", \n\t\t\t\t\"oda \", \n\t\t\t\t\"col \", \n\t\t\t\t\"gro \", \n\t\t\t\t\"loo \", \n\t\t\t\t\"roa \", \n\t\t\t\t\"aga \", \n\t\t\t\t\"cor \", \n\t\t\t\t\"era \", \n\t\t\t\t\"coa \", \n\t\t\t\t\"ero \", \n\t\t\t\t\"loe \", \n\t\t\t\t\"rea \", \n\t\t\t\t\"rae \", \n\t\t\t\t\"rol \", \n\t\t\t\t\"clo \", \n\t\t\t\t\"rad \", \n\t\t\t\t\"dea \", \n\t\t\t\t\"lar \", \n\t\t\t\t\"car \", \n\t\t\t\t\"rao \", \n\t\t\t\t\"oro \", \n\t\t\t\t\"cao \", \n\t\t\t\t\"ade \", \n\t\t\t\t\"cal \", \n\t\t\t\t\"gol \", \n\t\t\t\t\"boa \", \n\t\t\t\t\"red \", \n\t\t\t\t\"ole \", \n\t\t\t\t\"bol \", \n\t\t\t\t\"ado \", \n\t\t\t\t\"erg \", \n\t\t\t\t\"cae \", \n\t\t\t\t\"gal \", \n\t\t\t\t\"ala \", \n\t\t\t\t\"aro \", \n\t\t\t\t\"roe \", \n\t\t\t\t\"ale \", \n\t\t\t\t\"eco \", \n\t\t\t\t\"de \", \n\t\t\t\t\"lo \", \n\t\t\t\t\"da \", \n\t\t\t\t\"go \", \n\t\t\t\t\"le \", \n\t\t\t\t\"ea \", \n\t\t\t\t\"ro \", \n\t\t\t\t\"ad \", \n\t\t\t\t\"oc \", \n\t\t\t\t\"re \", \n\t\t\t\t\"ar \", \n\t\t\t\t\"be \", \n\t\t\t\t\"la \", \n\t\t\t\t\"el \", \n\t\t\t\t\"al \", \n\t\t\t\t\"do \", \n\t\t\t\t\"ce \", \n\t\t\t\t\"ge \", \n\t\t\t\t\"ab \"\t\t\n\t\t};\n\n\t\tputAnagramsTogether(sArray);\t\n\n\t}", "public static void main(String[] args) throws ParseException, CloneNotSupportedException, IOException\n\t{\n\t\t\n\t\tint N = 5;\n\t\tint k = 3;\n\t\tint [] numbers = {6,1,2,3,7};\n\t\tList<Integer> oneCounts = new ArrayList<Integer>(N);\n\t\tfor(int i =0 ; i<N ;i++){\n\t\t\t\n\t\t\toneCounts.add(i, countOne(numbers[i])); \n\t\t}\n\t\tCollections.sort(oneCounts,new Comparator<Integer>(){\n\n\t\t\t@Override\n\t\t\tpublic int compare(Integer o1, Integer o2)\n\t\t\t{\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\treturn (o2-o1);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t} );\n\t\tint result =0;\n\t\tfor(int j =0 ;j < k ;j++){\n\t\t\t\n\t\t\tresult = result + oneCounts.get(j);\n\t\t}\n\t\t\n \n\t\tSystem.out.println(result);\n\t\tSystem.out.println(1^9);\n\t}", "public void countOfLetters()\n {\n Scanner sc = new Scanner(System.in);\n //Ask an user to enter a string\n System.out.print(\"Enter a string: \");\n //Read next line as string and assign it value to String str\n String str = sc.nextLine();\n\n //Create a new int array with 26 elements\n int []Letters = new int[26];\n\n //For each index in str\n for(int i = 0; i < str.length(); i++)\n {\n //Get current character\n char c = str.toLowerCase().charAt(i);\n //Get char as int\n int val = (int)c;\n //If char is letter\n if(val >= 97 && val <= 122)\n {\n //Increment a value at position of this letter\n Letters[c-'a']++;\n }\n }\n //Get sum of the array\n int Sum = Arrays.stream(Letters).sum();\n //For each index in Letters\n for(int i = 0; i<Letters.length; i++)\n {\n //If value of current position > 0 then print count of this letter at given string and its percentage\n if(Letters[i] > 0)\n {\n System.out.printf(\"The count of `%c` is %x, the percentage is %f \\n\", (char)97+i, Letters[i], (double)Letters[i]/Sum);\n }\n }\n\n }", "public static void main(String[] args) {\n\t\tString s=\"Prasad\";\r\n\t\tchar c[]=s.toCharArray();\r\n\t\tchar d[]=new char[s.length()];\r\n\t\tint x[]=new int[20];\r\n\t\tfor(int i=0;i<c.length;i++)\r\n\t\t{\r\n\t\t\tint count=0;\r\n\t\t\tfor(int j=i+1;j<c.length;j++)\r\n\t\t\t{\r\n\t\t\t\tif(c[i]==c[j]&&c[i]!='@')\r\n\t\t\t\t{\r\n\t\t\t\t\tcount++;\r\n\t\t\t\t\ts.replace(c[j], '@');\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tx[i]=count;\r\n\r\n\t\t\t\tSystem.out.println(c[i]+\" \"+x[i]);\r\n\t\t}\r\n\t\t\r\n\r\n\t}", "@Test\n public void codonCompare2(){\n //these list are already sorted\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(c);\n AminoAcidLL second = AminoAcidLL.createFromRNASequence(d);\n int expected = 1;\n assertEquals(expected, first.codonCompare(second));\n\n }", "public void tacoArray() {\n\n\n ArrayList<String> tacos = new ArrayList<>();\n tacos.add(\"blah\");\n tacos.add(\"blah2\");\n tacos.add(\"blah3\");\n tacos.add(\"blah4\");\n tacos.add(\"blah5\");\n }", "@Test\n public void subSequencesTest1() {\n String text = \"crypt\"\n + \"ograp\"\n + \"hyand\"\n + \"crypt\"\n + \"analy\"\n + \"sis\";\n\n String[] expected = new String[5];\n expected[0] = \"cohcas\";\n expected[1] = \"rgyrni\";\n expected[2] = \"yrayas\";\n expected[3] = \"panpl\";\n expected[4] = \"tpdty\";\n String[] owns = this.ic.subSequences(text, 5);\n for (int i = 0; i < expected.length; i++) {\n assertEquals(expected[i], owns[i]);\n }\n }", "public static long journeyToMoon(int n, List<List<Integer>> astronaut) {\n // Write your code here\n Map<Integer, Node<Integer>> countryMap = new HashMap<>();\n for(List<Integer> pairs: astronaut) {\n Node<Integer> node1 = countryMap.computeIfAbsent(pairs.get(0), Node::new);\n Node<Integer> node2 = countryMap.computeIfAbsent(pairs.get(1), Node::new);\n node1.connected.add(node2);\n node2.connected.add(node1);\n }\n\n List<Integer> countryCluster = new ArrayList<>();\n for(Node<Integer> node: countryMap.values()) {\n if(node.connected.size() == 0) {\n countryCluster.add(1);\n } else if(!node.visited){\n countryCluster.add(getNodeCount3(node));\n }\n }\n List<Integer> countryNodes = countryMap.values().stream().map(nn -> nn.value).collect(Collectors.toList());\n List<Integer> missingNodes = new ArrayList<>();\n for(int i=0; i < n; i++) {\n if(!countryNodes.contains(i))\n missingNodes.add(i);\n }\n\n for(int i=0; i < missingNodes.size(); i++) {\n countryCluster.add(1);\n }\n\n long ans = 0;\n //For one country we cannot pair with any other astronauts\n if(countryCluster.size() >= 2) {\n ans = (long) countryCluster.get(0) * countryCluster.get(1);\n if(countryCluster.size() > 2) {\n int sum = countryCluster.get(0) + countryCluster.get(1);\n for(int i=2; i < countryCluster.size(); i++) {\n ans += (long) sum * countryCluster.get(i);\n sum += countryCluster.get(i);\n }\n }\n }\n\n /*\n permutation of two set with size A and B = AxB\n permutation of three set with size A,B,C = AxB + AxC + BxC = AxB + (A+B)xC\n permutation of four set with size A,B,C,D = AxB + AxC + AxD + BxC + BxD + CxD = AxB + (A+B)xC + (A+B+C)xD\n */\n /*\n if(keys.length == 1) {\n ans = keys[0].size();\n } else {\n ans = keys[0].size() * keys[1].size();\n if(keys.length > 2) {\n int sum = keys[0].size() + keys[1].size();\n for (int i = 2; i < keys.length; i++) {\n ans += sum * keys[i].size();\n sum += keys[i].size();\n }\n }\n }\n */\n return ans;\n }", "private static int countCommon(String[] a1, String[] a2) {\n\t\tHashSet<String> hs = new HashSet<String>();\r\n\t\tfor(int i=0 ; i < a1.length ; i++) {\r\n\t\t\ths.add(a1[i]);\r\n\t\t}\r\n\t\tString s1[] = new String[hs.size()];\r\n\t\ths.toArray(s1);\r\n\t\tHashSet<String> hs2 = new HashSet<String>();\r\n\t\tfor( int j=0 ;j < a2.length ;j++) {\r\n\t\t\ths2.add(a2[j]);\r\n\t\t}\r\n\t\tString s2[] = new String[hs2.size()];\r\n\t\ths2.toArray(s2);\r\n\t\tint count=0;\r\n\t\tfor(int i=0;i<s1.length;i++)\r\n\t\t{\t\r\n\t\t\tfor(int j=0;j<s2.length;j++)\r\n\t\t\t{\r\n\t\t\t\tif(s1[i].equals(s2[j]))\r\n\t\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn count;\t\t\r\n\t}", "@Test\n public void codonCompare1(){\n //these list are already sorted\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(a);\n AminoAcidLL second = AminoAcidLL.createFromRNASequence(b);\n int expected = 0;\n assertEquals(expected, first.codonCompare(second));\n }", "int sizeOfScansArray();", "public ExactACcounts(final int[] counts) {\n if (counts == null || counts.length == 0){\n throw new IllegalArgumentException(\"counts should not be null or empty\");\n }\n this.counts = counts;\n }", "public List<String> findRepeatedDnaSequences(String s){\n HashMap<Character,Integer> map=new HashMap<>();\n Set<Integer> firstSet=new HashSet<>();\n Set<Integer> dupSet=new HashSet<>();\n List<String> res=new ArrayList<>();\n map.put('A',0);\n map.put('C',1);\n map.put('G',2);\n map.put('T',3);\n char[] chars=s.toCharArray();\n for(int i=0;i<chars.length-9;i++){\n int v=0;\n for(int j=i;j<i+10;j++){\n v<<=2;\n v|=map.get(chars[j]);\n }\n if(!firstSet.add(v)&&dupSet.add(v)){\n res.add(s.substring(i,i+10));\n }\n }\n return res;\n }", "private Map<Character, Integer> getFreqs(String input) {\n\t\tMap<Character, Integer> freqMap = new HashMap<>();\n\t\tfor (char c : input.toCharArray()) {\n\t\t\tif (freqMap.containsKey(c)) {\n\t\t\t\tfreqMap.put(c, freqMap.get(c) + 1);\n\t\t\t} else {\n\t\t\t\tfreqMap.put(c, 1);\n\t\t\t}\n\t\t}\n\t\treturn freqMap;\n\t}", "@Test\n public void subSequencesTest2() {\n String text = \"hashco\"\n + \"llisio\"\n + \"nsarep\"\n + \"ractic\"\n + \"allyun\"\n + \"avoida\"\n + \"blewhe\"\n + \"nhashi\"\n + \"ngaran\"\n + \"domsub\"\n + \"setofa\"\n + \"larges\"\n + \"etofpo\"\n + \"ssible\"\n + \"keys\";\n\n String[] expected = new String[6];\n expected[0] = \"hlnraabnndslesk\";\n expected[1] = \"alsalvlhgoeatse\";\n expected[2] = \"siacloeaamtroiy\";\n expected[3] = \"hsrtyiwsrsogfbs\";\n expected[4] = \"cieiudhhaufepl\";\n expected[5] = \"oopcnaeinbasoe\";\n String[] owns = this.ic.subSequences(text, 6);\n for (int i = 0; i < expected.length; i++) {\n assertEquals(expected[i], owns[i]);\n }\n }", "int countByExample(AbumExample example);" ]
[ "0.7451165", "0.64455473", "0.6272217", "0.5929978", "0.5873829", "0.57270384", "0.559852", "0.559329", "0.5586074", "0.54737246", "0.54198563", "0.5387386", "0.5382878", "0.53749776", "0.53549623", "0.53255856", "0.528432", "0.52719235", "0.5258622", "0.5242458", "0.523482", "0.52323294", "0.52316076", "0.5216305", "0.51904243", "0.51887417", "0.51884806", "0.5185552", "0.5166715", "0.51423395", "0.51268715", "0.51200056", "0.510703", "0.50685555", "0.5068009", "0.50651467", "0.5061214", "0.5060523", "0.5052028", "0.5049826", "0.5045591", "0.50325257", "0.50314873", "0.50197744", "0.5012793", "0.50100625", "0.5001329", "0.49627423", "0.4946662", "0.49463725", "0.4933714", "0.49009088", "0.48932084", "0.48901877", "0.4888877", "0.48835024", "0.48817918", "0.4878378", "0.4869223", "0.48681155", "0.48649064", "0.4863042", "0.4846382", "0.4834901", "0.48283434", "0.48182243", "0.4811437", "0.48103797", "0.4808521", "0.48012772", "0.47982436", "0.47923085", "0.47862214", "0.4784949", "0.47845542", "0.47827327", "0.47799218", "0.47770193", "0.4776428", "0.477434", "0.47728294", "0.47726333", "0.47657132", "0.4761341", "0.4760827", "0.47556922", "0.4747486", "0.47406036", "0.4732116", "0.4728771", "0.47283602", "0.47177485", "0.4716497", "0.47164667", "0.471511", "0.47144684", "0.47114536", "0.4708096", "0.47036576", "0.46943125" ]
0.76682246
0
/TEST 6 INPUT: "UAUAGCGUGUUUUAUUGAUCUUGC" EXPECTED OUTPUT = 2,1,1,1 ACTUAL OUTPUT = 2,1,1,1 This test uses the aminoAcidCounts method on every node of the list and then, adds its result to an array
@Test public void aminoCountsTest2(){ AminoAcidLL first = AminoAcidLL.createFromRNASequence(b); int[] expected = {2,1,1,1}; assertArrayEquals(expected, first.aminoAcidCounts()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void aminoCountsTest1(){\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(a);\n int[] expected = {1,3,1};\n assertArrayEquals(expected, first.aminoAcidCounts());\n }", "public int[] contarCodons(String seq){\n int [] countCodons=new int[65];\n for (int i=0;i<seq.length()-2;i=i+3){\n String c=seq.substring(i, i+3);\n int j=0;\n while (j<nameCodon.length && nameCodon[j].compareTo(c)!=0) j++;\n if (j<nameCodon.length)\n countCodons[j]++;\n else\n countCodons[64]++;\n }\n return countCodons;\n\n }", "@Test\n public void aminoListTest2(){\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(d);\n char[] expected = {'C','F','K','N','T'};\n assertArrayEquals(expected, first.aminoAcidList());\n }", "public static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\r\n\t\t//System.out.println(Integer.toBinaryString(31));\r\n\t\tint n = in.nextInt();\r\n\t\tint[] arr = new int[n];\r\n\t\tfor(int i = 0 ;i < n; i++) {\r\n\t\t\tarr[i] = in.nextInt();\r\n\t\t}\r\n\t\tArrays.sort(arr);\r\n\t\tint[] arr1 = new int[n];\r\n\t\tint co = 0;\r\n\t\tfor(int i = n- 1; i >= 0; i--) {\r\n\t\t\tarr1[co++] = arr[i];\r\n\t\t}\r\n\t\tString[] str = new String[n];\r\n\t\tfor(int i = 0; i < n; i++) {\r\n\t\t\tstr[i] = Integer.toBinaryString(arr1[i]);\r\n\t\t}\r\n\t\tint[] countArr = new int[n];\r\n\t\tint[] countArr1 = new int[n];\r\n\t\tTreeSet<Integer> set = new TreeSet<Integer>(); \r\n\t\tfor(int i = 0; i < n; i++) {\r\n\t\t\tcountArr[i] = 0;\r\n\t\t\tfor(int j = 0; j < str[i].length(); j++) {\r\n\t\t\t\tif(String.valueOf(str[i].charAt(j)).equals(\"1\")) {\r\n\t\t\t\t\tcountArr[i]++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tset.add(countArr[i]);\r\n\t\t}\r\n\t\tint[] arrCpy = new int[set.size()];\r\n\t\tint ct = set.size() - 1;\r\n\t\tIterator<Integer> it = set.iterator();\r\n\t\twhile(it.hasNext()) {\r\n\t\t\tarrCpy[ct--] = it.next();\r\n\t\t}\r\n\t\tfor(int i = 0; i < arrCpy.length; i++) {\r\n\t\t\tfor(int j = 0; j < n; j++) {\r\n\t\t\t\tif(arrCpy[i] == countArr[j]) {\r\n\t\t\t\t\tSystem.out.println(arr1[j]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static int countAnagram(ArrayList<String> arr) {\n int count = 0;\n for (HashMap.Entry<String, Integer> item : countOccurences(arr).entrySet()) {\n if (item.getValue()!=1) {\n count = count + item.getValue();\n }\n }\n return count;\n }", "@Test\n public void aminoListTest1(){\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(a);\n char[] expected = {'P','L','A'};\n assertArrayEquals(expected, first.aminoAcidList());\n }", "public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in); //assign size of input\n System.out.println(\"enter the number of elements\");\n String str = sc.nextLine();\n int N = Integer.parseInt(str);\n\n int[] arr = new int[N];\n\n for (int i = 0; i < N; i++) { //assign values of input\n System.out.println(\"enter element \" + (i + 1));\n String str2 = sc.nextLine();\n int number = Integer.parseInt(str2);\n\n arr[i] = number;\n }\n\n //find cluster count\n int clusterCount = 0;\n\n for (int h = 0; h < N - 1; h++) {\n if (arr[h] == arr[h + 1]) {\n int count = h + 1;\n while (arr[h] == arr[count]) {\n count++;\n }\n h = count;\n clusterCount++;\n }\n } //output \n System.out.println(clusterCount);\n\n }", "int count() {\n\t\tArrayList<Integer> checked = new ArrayList<Integer>();\r\n\t\tint count = 0;\r\n\t\tfor (int x = 0; x < idNode.length; x++) {// Order of N2\r\n\t\t\tint rootX = getRoot(x);\r\n\t\t\tif (!checked.contains(rootX)) {// Order of N Access of Array\r\n\r\n\t\t\t\tSystem.out.println(\"root x is \" + rootX);\r\n\t\t\t\tcount++;\r\n\t\t\t\tchecked.add(rootX);// N Access of Array\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn count;\r\n\t}", "public static void main(String[] args) {\n \n Scanner input = new Scanner(System.in);\n int n = input.nextInt();\n String[] p = new String[n];\n int[] counter = new int[n];\n for(int i = 0; i<n;i++ ){\n \tp[i] = input.next();\n \t\n \tint j = 0;\n \twhile(j<p[i].length()){\n \t\tint t =1;\n \t\tif(j + t < p[i].length()){\n \t\twhile(p[i].charAt(j) == p[i].charAt(j+t) ){\n \t\t\tt++;\n \t\t\tcounter[i]++;\n \t\t\tif(j+t >= p[i].length())\n \t\t\t\tbreak;\n \t\t\t\n \t\t}\n \t\t}\n \t\tj = j+t;\n \t\t\n \t\t\n \t\t\n \t}\n }\n \n for(int i= 0; i<n;i++){\n\t System.out.println(counter[i]);\n }\n \n \n \n input.close();\n }", "public static void main(String[] args) {\r\n\t\t P187RepeatedDNASequences p = new P187RepeatedDNASequences();\r\n\t\t List<String> r = p.findRepeatedDnaSequences(\"AAAAACCCCCAAAAACCCCCCAAAAAGGGTTT\"); //\r\n\t\t for(String t : r) {\r\n\t\t\t System.out.println(t);\t\t\t \r\n\t\t }\r\n\t }", "public static void main(String[] args) {\n\n int n = 20;\n int[] input = {0, 6, 0, 6, 4, 0, 6, 0, 6, 0, 4, 3, 0, 1, 5, 1, 2, 4, 2, 4};\n String[] inStr = {\"ab\", \"cd\", \"ef\", \"gh\", \"ij\", \"ab\", \"cd\", \"ef\", \"gh\", \"ij\", \"that\", \"be\", \"to\", \"be\", \"question\", \"or\", \"not\", \"is\", \"to\", \"the\"};\n int[] count = new int[100];\n for (int i = 0; i < n; i++) {\n// String line = in.nextLine();\n// String[] elem = line.split(\"\\\\s\");\n// System.out.println(elem[0]+\" - \"+elem[1]);\n// input[i] = Integer.parseInt(elem[0]);\n// inStr[i] = elem[1];\n// count[input[i]] ++;\n }\n\n for (int i = n / 2; i < input.length; i++)\n count[input[i]]++;\n\n// for (int i = 0; i < count.length; i++)\n// System.out.print(count[i]);\n// System.out.println();\n\n int printed = 0;\n int i = 0;\n StringBuffer buffer = new StringBuffer();\n while (count[i] > 0){\n// for (int i = 0; i < count.length; i++) {\n// for (Integer st : findIndex(input, i,count[i])) {\n// System.out.print(findStr(inStr, st) + \" \");\n for (String st : findIndex(input,inStr, i,count[i])) {\n // System.out.print( st + \" \");\n buffer.append(st+\" \");\n printed++;\n }\n i++;\n }\n for (int idx = printed; idx<n;idx++)\n buffer.append(\"- \");\n // System.out.print(\"- \");\n System.out.println(buffer);\n\n\n }", "private int numberOfComponents(ArrayList<Integer>[] adj) {\n\t\t\t\t\n\t\tint n = adj.length;\n\t\tvisited = new boolean[n]; //default is false\n\t\tCCnum = new int[n];\n\t\tDFS(adj);\n\t\t\n\t\treturn cc;\n }", "public static void main(String[] args) {\r\n\r\n\t\tint n=439;\r\n\r\n\t\tint count = 1;\r\n\t\tint binary[] = new int[32];\r\n\t\tint i = 0;\r\n\t\twhile (n > 0) {\r\n\t\t\tbinary[i] = n % 2;\r\n\t\t\tn = n / 2;\r\n\t\t\ti++;\r\n\t\t}\r\n\r\n\t\tfor (int j = i - 1; j >= 0; j--) {\r\n\r\n\t\t\tString str = String.valueOf(i);\r\n\t\t\t\r\n\t\tString ar[]=str.split(\"0\");\r\n\t\t\t\r\n\t\tif(ar.length>1)\r\n\t\t{\r\n\t\t\tcount++;\r\n\t\t}\r\n\t\t/*\t\r\n\t\t\tif (binary[j] == 1 && binary[j + 1] == 1) {\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\r\n\t\t\tSystem.out.print(binary[j]);\r\n*/\r\n\t\t}\r\n\t\tSystem.out.print(count);\r\n\t\t/*scanner.close();*/\r\n\t}", "private void computeParentCount() {\n parentCountArray = new int[numNodes+1];\n for(int i = 0; i < parentCountArray.length;i++){\n parentCountArray[i] = 0;\n }\n for(int i = 0; i < adjMatrix.length; i++){\n int hasParentCounter = 0;\n for(int j = 0; j < adjMatrix[i].length; j++){\n if(allNodes[i].orphan){\n hasParentCounter = -1;\n break;\n }\n if(adjMatrix[j][i] == 1) {\n hasParentCounter++;\n }\n }\n parentCountArray[i] = hasParentCounter;\n }\n\n\n for(int i = 0; i < adjMatrix.length;i++){\n for(int j =0; j < adjMatrix[i].length;j++){\n if(adjMatrix[j][i] == 1){\n if(allNodes[j].orphan && allNodes[i].orphan == false){\n parentCountArray[i]--;\n }\n }\n }\n }\n\n\n\n\n for(int i = 0; i < parentCountArray.length; i++){\n // System.out.println(i + \" has parent \" +parentCountArray[i]);\n }\n\n\n\n\n\n }", "@Test\n public void rnatest1(){\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(a);\n char[] firstArr = new char[3];\n char[] answer = {'P','L','A'};\n for(int i = 0; i < firstArr.length; i++){\n firstArr[i] = first.aminoAcid;\n System.out.println(first.aminoAcid);\n first = first.next;\n }\n assertArrayEquals(answer, firstArr);\n }", "public void getCounts() {\t\r\n\t\t\r\n\t\tfor(int i = 0; i < 4; i++)\r\n\t\t\tfor(int j = 0; j < 3; j++)\r\n\t\t\t\tthecounts[i][j] = 0;\r\n\t\t\r\n\t\tfor(int i=0;i<maps.length-1;i++) {\r\n\t\t\tif(maps.Array1.charAt(i) == 'H' && maps.Array1.charAt(i+1) == 'E')\r\n\t\t\t\tthecounts[0][0]++;\r\n\t\t\telse if(maps.Array1.charAt(i) == 'E' && maps.Array1.charAt(i+1) =='-') \r\n\t\t\t\tthecounts[0][1]++;\r\n\t\t\telse if(maps.Array1.charAt(i) == '-' && maps.Array1.charAt(i+1) == 'H')\r\n\t\t\t\tthecounts[0][2]++;\r\n\t\t\tif(maps.Array2.charAt(i) == 'H' && maps.Array2.charAt(i+1) == 'E')\r\n\t\t\t\tthecounts[1][0]++;\r\n\t\t\telse if(maps.Array2.charAt(i) == 'E' && maps.Array2.charAt(i+1) == '-') \r\n\t\t\t\tthecounts[1][1]++;\r\n\t\t\telse if(maps.Array2.charAt(i) == '-' && maps.Array2.charAt(i+1) == 'H')\r\n\t\t\t\tthecounts[1][2]++;\r\n\t\t\tif(maps.Array3.charAt(i) == 'H' && maps.Array3.charAt(i+1) == 'E')\r\n\t\t\t\tthecounts[2][0]++;\r\n\t\t\telse if(maps.Array3.charAt(i) == 'E' && maps.Array3.charAt(i+1) == '-') \r\n\t\t\t\tthecounts[2][1]++;\r\n\t\t\telse if(maps.Array3.charAt(i) == '-' && maps.Array3.charAt(i+1) == 'H')\r\n\t\t\t\tthecounts[2][2]++;\r\n\t\t\tif(maps.Array4.charAt(i) == 'H' && maps.Array4.charAt(i+1) == 'E')\r\n\t\t\t\tthecounts[3][0]++;\r\n\t\t\telse if(maps.Array4.charAt(i) == 'E'&&maps.Array4.charAt(i+1) == '-') \r\n\t\t\t\tthecounts[3][1]++;\r\n\t\t\telse if(maps.Array4.charAt(i) == '-' && maps.Array1.charAt(i+1) == 'H')\r\n\t\t\t\tthecounts[3][2]++;\r\n\t\t}\r\n\t\t\r\n\t\t//Getting transition value between 1 and 0\r\n\t\tfor(int i=0;i<4;i++) {\r\n\t\t\tfor(int j=0;j<3;j++) {\r\n\t\t\t\tthecounts[i][j]/=maps.length;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Displaying the obtained values\r\n\t\tSystem.out.println(\"\\nTRANSITION\");\r\n\t\tSystem.out.println(\"HYDROPHOBICITY: 1->2: \" + thecounts[0][0] + \" 2->3: \" + thecounts[0][1] + \" 3->1: \" + thecounts[0][2]);\r\n\t\tSystem.out.println(\"POLARIZABILITY: 1->2: \" + thecounts[1][0] + \" 2->3: \" + thecounts[1][1] + \" 3-1: \" + thecounts[1][2]);\r\n\t\tSystem.out.println(\"POLARITY: 1->2: \" + thecounts[2][0] + \" 2->3: \" + thecounts[2][1] + \" 3->1: \" + thecounts[2][2]);\r\n\t\tSystem.out.println(\"VAN DER WALLS VOLUME: 1->2: \" + thecounts[3][0] + \" 2->3: \" + thecounts[3][1] + \" 3->1: \" + thecounts[3][2]);\r\n\t\t\r\n\t}", "@Test\n public void rnatest2(){\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(b);\n char[] firstArr = new char[4];\n char[] answer = {'T','S', 'V', 'F'};\n for(int i = 0; i < firstArr.length; i++){\n firstArr[i] = first.aminoAcid;\n System.out.println(first.aminoAcid);\n first = first.next;\n }\n assertArrayEquals(answer,firstArr);\n }", "@Override\n public long[ ][ ] count() {\n // precompute common nodes\n for (int x = 0; x < n; x++) {\n for (int n1 = 0; n1 < deg[x]; n1++) {\n int a = adj[x][n1];\n for (int n2 = n1 + 1; n2 < deg[x]; n2++) {\n int b = adj[x][n2];\n Tuple ab = createTuple(a, b);\n common2.put(ab, common2.getOrDefault(ab, 0) + 1);\n for (int n3 = n2 + 1; n3 < deg[x]; n3++) {\n int c = adj[x][n3];\n boolean st = adjacent(adj[a], b) ? (adjacent(adj[a], c) || adjacent(adj[b], c)) :\n (adjacent(adj[a], c) && adjacent(adj[b], c));\n if (!st) continue;\n Tuple abc = createTuple(a, b, c);\n common3.put(abc, common3.getOrDefault(abc, 0) + 1);\n }\n }\n }\n }\n\n // precompute triangles that span over edges\n int[ ] tri = countTriangles();\n\n // count full graphlets\n long[ ] C5 = new long[n];\n int[ ] neigh = new int[n];\n int[ ] neigh2 = new int[n];\n int nn, nn2;\n for (int x = 0; x < n; x++) {\n for (int nx = 0; nx < deg[x]; nx++) {\n int y = adj[x][nx];\n if (y >= x) break;\n nn = 0;\n for (int ny = 0; ny < deg[y]; ny++) {\n int z = adj[y][ny];\n if (z >= y) break;\n if (adjacent(adj[x], z)) {\n neigh[nn++] = z;\n }\n }\n for (int i = 0; i < nn; i++) {\n int z = neigh[i];\n nn2 = 0;\n for (int j = i + 1; j < nn; j++) {\n int zz = neigh[j];\n if (adjacent(adj[z], zz)) {\n neigh2[nn2++] = zz;\n }\n }\n for (int i2 = 0; i2 < nn2; i2++) {\n int zz = neigh2[i2];\n for (int j2 = i2 + 1; j2 < nn2; j2++) {\n int zzz = neigh2[j2];\n if (adjacent(adj[zz], zzz)) {\n C5[x]++;\n C5[y]++;\n C5[z]++;\n C5[zz]++;\n C5[zzz]++;\n }\n }\n }\n }\n }\n }\n\n int[ ] common_x = new int[n];\n int[ ] common_x_list = new int[n];\n int ncx = 0;\n int[ ] common_a = new int[n];\n int[ ] common_a_list = new int[n];\n int nca = 0;\n\n // set up a system of equations relating orbit counts\n for (int x = 0; x < n; x++) {\n for (int i = 0; i < ncx; i++) common_x[common_x_list[i]] = 0;\n ncx = 0;\n\n // smaller graphlets\n orbit[x][0] = deg[x];\n for (int nx1 = 0; nx1 < deg[x]; nx1++) {\n int a = adj[x][nx1];\n for (int nx2 = nx1 + 1; nx2 < deg[x]; nx2++) {\n int b = adj[x][nx2];\n if (adjacent(adj[a], b)) orbit[x][3]++;\n else orbit[x][2]++;\n }\n for (int na = 0; na < deg[a]; na++) {\n int b = adj[a][na];\n if (b != x && !adjacent(adj[x], b)) {\n orbit[x][1]++;\n if (common_x[b] == 0) common_x_list[ncx++] = b;\n common_x[b]++;\n }\n }\n }\n\n long f_71 = 0, f_70 = 0, f_67 = 0, f_66 = 0, f_58 = 0, f_57 = 0; // 14\n long f_69 = 0, f_68 = 0, f_64 = 0, f_61 = 0, f_60 = 0, f_55 = 0, f_48 = 0, f_42 = 0, f_41 = 0; // 13\n long f_65 = 0, f_63 = 0, f_59 = 0, f_54 = 0, f_47 = 0, f_46 = 0, f_40 = 0; // 12\n long f_62 = 0, f_53 = 0, f_51 = 0, f_50 = 0, f_49 = 0, f_38 = 0, f_37 = 0, f_36 = 0; // 8\n long f_44 = 0, f_33 = 0, f_30 = 0, f_26 = 0; // 11\n long f_52 = 0, f_43 = 0, f_32 = 0, f_29 = 0, f_25 = 0; // 10\n long f_56 = 0, f_45 = 0, f_39 = 0, f_31 = 0, f_28 = 0, f_24 = 0; // 9\n long f_35 = 0, f_34 = 0, f_27 = 0, f_18 = 0, f_16 = 0, f_15 = 0; // 4\n long f_17 = 0; // 5\n long f_22 = 0, f_20 = 0, f_19 = 0; // 6\n long f_23 = 0, f_21 = 0; // 7\n\n for (int nx1 = 0; nx1 < deg[x]; nx1++) {\n int a = inc[x][nx1]._1, xa = inc[x][nx1]._2;\n\n for (int i = 0; i < nca; i++) common_a[common_a_list[i]] = 0;\n nca = 0;\n for (int na = 0; na < deg[a]; na++) {\n int b = adj[a][na];\n for (int nb = 0; nb < deg[b]; nb++) {\n int c = adj[b][nb];\n if (c == a || adjacent(adj[a], c)) continue;\n if (common_a[c] == 0) common_a_list[nca++] = c;\n common_a[c]++;\n }\n }\n\n // x = orbit-14 (tetrahedron)\n for (int nx2 = nx1 + 1; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (!adjacent(adj[a], b)) continue;\n for (int nx3 = nx2 + 1; nx3 < deg[x]; nx3++) {\n int c = inc[x][nx3]._1, xc = inc[x][nx3]._2;\n if (!adjacent(adj[a], c) || !adjacent(adj[b], c)) continue;\n orbit[x][14]++;\n f_70 += common3.getOrDefault(createTuple(a, b, c), 0) - 1;\n f_71 += (tri[xa] > 2 && tri[xb] > 2) ? (common3.getOrDefault(createTuple(x, a, b), 0) - 1) : 0;\n f_71 += (tri[xa] > 2 && tri[xc] > 2) ? (common3.getOrDefault(createTuple(x, a, c), 0) - 1) : 0;\n f_71 += (tri[xb] > 2 && tri[xc] > 2) ? (common3.getOrDefault(createTuple(x, b, c), 0) - 1) : 0;\n f_67 += tri[xa] - 2 + tri[xb] - 2 + tri[xc] - 2;\n f_66 += common2.getOrDefault(createTuple(a, b), 0) - 2;\n f_66 += common2.getOrDefault(createTuple(a, c), 0) - 2;\n f_66 += common2.getOrDefault(createTuple(b, c), 0) - 2;\n f_58 += deg[x] - 3;\n f_57 += deg[a] - 3 + deg[b] - 3 + deg[c] - 3;\n }\n }\n\n // x = orbit-13 (diamond)\n for (int nx2 = 0; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (!adjacent(adj[a], b)) continue;\n for (int nx3 = nx2 + 1; nx3 < deg[x]; nx3++) {\n int c = inc[x][nx3]._1, xc = inc[x][nx3]._2;\n if (!adjacent(adj[a], c) || adjacent(adj[b], c)) continue;\n orbit[x][13]++;\n f_69 += (tri[xb] > 1 && tri[xc] > 1) ? (common3.getOrDefault(createTuple(x, b, c), 0) - 1) : 0;\n f_68 += common3.getOrDefault(createTuple(a, b, c), 0) - 1;\n f_64 += common2.getOrDefault(createTuple(b, c), 0) - 2;\n f_61 += tri[xb] - 1 + tri[xc] - 1;\n f_60 += common2.getOrDefault(createTuple(a, b), 0) - 1;\n f_60 += common2.getOrDefault(createTuple(a, c), 0) - 1;\n f_55 += tri[xa] - 2;\n f_48 += deg[b] - 2 + deg[c] - 2;\n f_42 += deg[x] - 3;\n f_41 += deg[a] - 3;\n }\n }\n\n // x = orbit-12 (diamond)\n for (int nx2 = nx1 + 1; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (!adjacent(adj[a], b)) continue;\n for (int na = 0; na < deg[a]; na++) {\n int c = inc[a][na]._1, ac = inc[a][na]._2;\n if (c == x || adjacent(adj[x], c) || !adjacent(adj[b], c)) continue;\n orbit[x][12]++;\n f_65 += (tri[ac] > 1) ? common3.getOrDefault(createTuple(a, b, c), 0) : 0;\n f_63 += common_x[c] - 2;\n f_59 += tri[ac] - 1 + common2.getOrDefault(createTuple(b, c), 0) - 1;\n f_54 += common2.getOrDefault(createTuple(a, b), 0) - 2;\n f_47 += deg[x] - 2;\n f_46 += deg[c] - 2;\n f_40 += deg[a] - 3 + deg[b] - 3;\n }\n }\n\n // x = orbit-8 (cycle)\n for (int nx2 = nx1 + 1; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (adjacent(adj[a], b)) continue;\n for (int na = 0; na < deg[a]; na++) {\n int c = inc[a][na]._1, ac = inc[a][na]._2;\n if (c == x || adjacent(adj[x], c) || !adjacent(adj[b], c)) continue;\n orbit[x][8]++;\n f_62 += (tri[ac] > 0) ? common3.getOrDefault(createTuple(a, b, c), 0) : 0;\n f_53 += tri[xa] + tri[xb];\n f_51 += tri[ac] + common2.getOrDefault(createTuple(c, b), 0);\n f_50 += common_x[c] - 2;\n f_49 += common_a[b] - 2;\n f_38 += deg[x] - 2;\n f_37 += deg[a] - 2 + deg[b] - 2;\n f_36 += deg[c] - 2;\n }\n }\n\n // x = orbit-11 (paw)\n for (int nx2 = nx1 + 1; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (!adjacent(adj[a], b)) continue;\n for (int nx3 = 0; nx3 < deg[x]; nx3++) {\n int c = inc[x][nx3]._1, xc = inc[x][nx3]._2;\n if (c == a || c == b || adjacent(adj[a], c) || adjacent(adj[b], c)) continue;\n orbit[x][11]++;\n f_44 += tri[xc];\n f_33 += deg[x] - 3;\n f_30 += deg[c] - 1;\n f_26 += deg[a] - 2 + deg[b] - 2;\n }\n }\n\n // x = orbit-10 (paw)\n for (int nx2 = 0; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (!adjacent(adj[a], b)) continue;\n for (int nb = 0; nb < deg[b]; nb++) {\n int c = inc[b][nb]._1, bc = inc[b][nb]._2;\n if (c == x || c == a || adjacent(adj[a], c) || adjacent(adj[x], c)) continue;\n orbit[x][10]++;\n f_52 += common_a[c] - 1;\n f_43 += tri[bc];\n f_32 += deg[b] - 3;\n f_29 += deg[c] - 1;\n f_25 += deg[a] - 2;\n }\n }\n\n // x = orbit-9 (paw)\n for (int na1 = 0; na1 < deg[a]; na1++) {\n int b = inc[a][na1]._1, ab = inc[a][na1]._2;\n if (b == x || adjacent(adj[x], b)) continue;\n for (int na2 = na1 + 1; na2 < deg[a]; na2++) {\n int c = inc[a][na2]._1, ac = inc[a][na2]._2;\n if (c == x || !adjacent(adj[b], c) || adjacent(adj[x], c)) continue;\n orbit[x][9]++;\n f_56 += (tri[ab] > 1 && tri[ac] > 1) ? common3.getOrDefault(createTuple(a, b, c), 0) : 0;\n f_45 += common2.getOrDefault(createTuple(b, c), 0) - 1;\n f_39 += tri[ab] - 1 + tri[ac] - 1;\n f_31 += deg[a] - 3;\n f_28 += deg[x] - 1;\n f_24 += deg[b] - 2 + deg[c] - 2;\n }\n }\n\n // x = orbit-4 (path)\n for (int na = 0; na < deg[a]; na++) {\n int b = inc[a][na]._1, ab = inc[a][na]._2;\n if (b == x || adjacent(adj[x], b)) continue;\n for (int nb = 0; nb < deg[b]; nb++) {\n int c = inc[b][nb]._1, bc = inc[b][nb]._2;\n if (c == a || adjacent(adj[a], c) || adjacent(adj[x], c)) continue;\n orbit[x][4]++;\n f_35 += common_a[c] - 1;\n f_34 += common_x[c];\n f_27 += tri[bc];\n f_18 += deg[b] - 2;\n f_16 += deg[x] - 1;\n f_15 += deg[c] - 1;\n }\n }\n\n // x = orbit-5 (path)\n for (int nx2 = 0; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (b == a || adjacent(adj[a], b)) continue;\n for (int nb = 0; nb < deg[b]; nb++) {\n int c = inc[b][nb]._1, bc = inc[b][nb]._2;\n if (c == x || adjacent(adj[a], c) || adjacent(adj[x], c)) continue;\n orbit[x][5]++;\n f_17 += deg[a] - 1;\n }\n }\n\n // x = orbit-6 (claw)\n for (int na1 = 0; na1 < deg[a]; na1++) {\n int b = inc[a][na1]._1, ab = inc[a][na1]._2;\n if (b == x || adjacent(adj[x], b)) continue;\n for (int na2 = na1 + 1; na2 < deg[a]; na2++) {\n int c = inc[a][na2]._1, ac = inc[a][na2]._2;\n if (c == x || adjacent(adj[x], c) || adjacent(adj[b], c)) continue;\n orbit[x][6]++;\n f_22 += deg[a] - 3;\n f_20 += deg[x] - 1;\n f_19 += deg[b] - 1 + deg[c] - 1;\n }\n }\n\n // x = orbit-7 (claw)\n for (int nx2 = nx1 + 1; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (adjacent(adj[a], b)) continue;\n for (int nx3 = nx2 + 1; nx3 < deg[x]; nx3++) {\n int c = inc[x][nx3]._1, xc = inc[x][nx3]._2;\n if (adjacent(adj[a], c) || adjacent(adj[b], c)) continue;\n orbit[x][7]++;\n f_23 += deg[x] - 3;\n f_21 += deg[a] - 1 + deg[b] - 1 + deg[c] - 1;\n }\n }\n }\n\n // solve equations\n orbit[x][72] = C5[x];\n orbit[x][71] = (f_71 - 12 * orbit[x][72]) / 2;\n orbit[x][70] = (f_70 - 4 * orbit[x][72]);\n orbit[x][69] = (f_69 - 2 * orbit[x][71]) / 4;\n orbit[x][68] = (f_68 - 2 * orbit[x][71]);\n orbit[x][67] = (f_67 - 12 * orbit[x][72] - 4 * orbit[x][71]);\n orbit[x][66] = (f_66 - 12 * orbit[x][72] - 2 * orbit[x][71] - 3 * orbit[x][70]);\n orbit[x][65] = (f_65 - 3 * orbit[x][70]) / 2;\n orbit[x][64] = (f_64 - 2 * orbit[x][71] - 4 * orbit[x][69] - 1 * orbit[x][68]);\n orbit[x][63] = (f_63 - 3 * orbit[x][70] - 2 * orbit[x][68]);\n orbit[x][62] = (f_62 - 1 * orbit[x][68]) / 2;\n orbit[x][61] = (f_61 - 4 * orbit[x][71] - 8 * orbit[x][69] - 2 * orbit[x][67]) / 2;\n orbit[x][60] = (f_60 - 4 * orbit[x][71] - 2 * orbit[x][68] - 2 * orbit[x][67]);\n orbit[x][59] = (f_59 - 6 * orbit[x][70] - 2 * orbit[x][68] - 4 * orbit[x][65]);\n orbit[x][58] = (f_58 - 4 * orbit[x][72] - 2 * orbit[x][71] - 1 * orbit[x][67]);\n orbit[x][57] = (f_57 - 12 * orbit[x][72] - 4 * orbit[x][71] - 3 * orbit[x][70] - 1 * orbit[x][67] - 2 * orbit[x][66]);\n orbit[x][56] = (f_56 - 2 * orbit[x][65]) / 3;\n orbit[x][55] = (f_55 - 2 * orbit[x][71] - 2 * orbit[x][67]) / 3;\n orbit[x][54] = (f_54 - 3 * orbit[x][70] - 1 * orbit[x][66] - 2 * orbit[x][65]) / 2;\n orbit[x][53] = (f_53 - 2 * orbit[x][68] - 2 * orbit[x][64] - 2 * orbit[x][63]);\n orbit[x][52] = (f_52 - 2 * orbit[x][66] - 2 * orbit[x][64] - 1 * orbit[x][59]) / 2;\n orbit[x][51] = (f_51 - 2 * orbit[x][68] - 2 * orbit[x][63] - 4 * orbit[x][62]);\n orbit[x][50] = (f_50 - 1 * orbit[x][68] - 2 * orbit[x][63]) / 3;\n orbit[x][49] = (f_49 - 1 * orbit[x][68] - 1 * orbit[x][64] - 2 * orbit[x][62]) / 2;\n orbit[x][48] = (f_48 - 4 * orbit[x][71] - 8 * orbit[x][69] - 2 * orbit[x][68] - 2 * orbit[x][67] - 2 * orbit[x][64] - 2 * orbit[x][61] - 1 * orbit[x][60]);\n orbit[x][47] = (f_47 - 3 * orbit[x][70] - 2 * orbit[x][68] - 1 * orbit[x][66] - 1 * orbit[x][63] - 1 * orbit[x][60]);\n orbit[x][46] = (f_46 - 3 * orbit[x][70] - 2 * orbit[x][68] - 2 * orbit[x][65] - 1 * orbit[x][63] - 1 * orbit[x][59]);\n orbit[x][45] = (f_45 - 2 * orbit[x][65] - 2 * orbit[x][62] - 3 * orbit[x][56]);\n orbit[x][44] = (f_44 - 1 * orbit[x][67] - 2 * orbit[x][61]) / 4;\n orbit[x][43] = (f_43 - 2 * orbit[x][66] - 1 * orbit[x][60] - 1 * orbit[x][59]) / 2;\n orbit[x][42] = (f_42 - 2 * orbit[x][71] - 4 * orbit[x][69] - 2 * orbit[x][67] - 2 * orbit[x][61] - 3 * orbit[x][55]);\n orbit[x][41] = (f_41 - 2 * orbit[x][71] - 1 * orbit[x][68] - 2 * orbit[x][67] - 1 * orbit[x][60] - 3 * orbit[x][55]);\n orbit[x][40] = (f_40 - 6 * orbit[x][70] - 2 * orbit[x][68] - 2 * orbit[x][66] - 4 * orbit[x][65] - 1 * orbit[x][60] - 1 * orbit[x][59] - 4 * orbit[x][54]);\n orbit[x][39] = (f_39 - 4 * orbit[x][65] - 1 * orbit[x][59] - 6 * orbit[x][56]) / 2;\n orbit[x][38] = (f_38 - 1 * orbit[x][68] - 1 * orbit[x][64] - 2 * orbit[x][63] - 1 * orbit[x][53] - 3 * orbit[x][50]);\n orbit[x][37] = (f_37 - 2 * orbit[x][68] - 2 * orbit[x][64] - 2 * orbit[x][63] - 4 * orbit[x][62] - 1 * orbit[x][53] - 1 * orbit[x][51] - 4 * orbit[x][49]);\n orbit[x][36] = (f_36 - 1 * orbit[x][68] - 2 * orbit[x][63] - 2 * orbit[x][62] - 1 * orbit[x][51] - 3 * orbit[x][50]);\n orbit[x][35] = (f_35 - 1 * orbit[x][59] - 2 * orbit[x][52] - 2 * orbit[x][45]) / 2;\n orbit[x][34] = (f_34 - 1 * orbit[x][59] - 2 * orbit[x][52] - 1 * orbit[x][51]) / 2;\n orbit[x][33] = (f_33 - 1 * orbit[x][67] - 2 * orbit[x][61] - 3 * orbit[x][58] - 4 * orbit[x][44] - 2 * orbit[x][42]) / 2;\n orbit[x][32] = (f_32 - 2 * orbit[x][66] - 1 * orbit[x][60] - 1 * orbit[x][59] - 2 * orbit[x][57] - 2 * orbit[x][43] - 2 * orbit[x][41] - 1 * orbit[x][40]) / 2;\n orbit[x][31] = (f_31 - 2 * orbit[x][65] - 1 * orbit[x][59] - 3 * orbit[x][56] - 1 * orbit[x][43] - 2 * orbit[x][39]);\n orbit[x][30] = (f_30 - 1 * orbit[x][67] - 1 * orbit[x][63] - 2 * orbit[x][61] - 1 * orbit[x][53] - 4 * orbit[x][44]);\n orbit[x][29] = (f_29 - 2 * orbit[x][66] - 2 * orbit[x][64] - 1 * orbit[x][60] - 1 * orbit[x][59] - 1 * orbit[x][53] - 2 * orbit[x][52] - 2 * orbit[x][43]);\n orbit[x][28] = (f_28 - 2 * orbit[x][65] - 2 * orbit[x][62] - 1 * orbit[x][59] - 1 * orbit[x][51] - 1 * orbit[x][43]);\n orbit[x][27] = (f_27 - 1 * orbit[x][59] - 1 * orbit[x][51] - 2 * orbit[x][45]) / 2;\n orbit[x][26] = (f_26 - 2 * orbit[x][67] - 2 * orbit[x][63] - 2 * orbit[x][61] - 6 * orbit[x][58] - 1 * orbit[x][53] - 2 * orbit[x][47] - 2 * orbit[x][42]);\n orbit[x][25] = (f_25 - 2 * orbit[x][66] - 2 * orbit[x][64] - 1 * orbit[x][59] - 2 * orbit[x][57] - 2 * orbit[x][52] - 1 * orbit[x][48] - 1 * orbit[x][40]) / 2;\n orbit[x][24] = (f_24 - 4 * orbit[x][65] - 4 * orbit[x][62] - 1 * orbit[x][59] - 6 * orbit[x][56] - 1 * orbit[x][51] - 2 * orbit[x][45] - 2 * orbit[x][39]);\n orbit[x][23] = (f_23 - 1 * orbit[x][55] - 1 * orbit[x][42] - 2 * orbit[x][33]) / 4;\n orbit[x][22] = (f_22 - 2 * orbit[x][54] - 1 * orbit[x][40] - 1 * orbit[x][39] - 1 * orbit[x][32] - 2 * orbit[x][31]) / 3;\n orbit[x][21] = (f_21 - 3 * orbit[x][55] - 3 * orbit[x][50] - 2 * orbit[x][42] - 2 * orbit[x][38] - 2 * orbit[x][33]);\n orbit[x][20] = (f_20 - 2 * orbit[x][54] - 2 * orbit[x][49] - 1 * orbit[x][40] - 1 * orbit[x][37] - 1 * orbit[x][32]);\n orbit[x][19] = (f_19 - 4 * orbit[x][54] - 4 * orbit[x][49] - 1 * orbit[x][40] - 2 * orbit[x][39] - 1 * orbit[x][37] - 2 * orbit[x][35] - 2 * orbit[x][31]);\n orbit[x][18] = (f_18 - 1 * orbit[x][59] - 1 * orbit[x][51] - 2 * orbit[x][46] - 2 * orbit[x][45] - 2 * orbit[x][36] - 2 * orbit[x][27] - 1 * orbit[x][24]) / 2;\n orbit[x][17] = (f_17 - 1 * orbit[x][60] - 1 * orbit[x][53] - 1 * orbit[x][51] - 1 * orbit[x][48] - 1 * orbit[x][37] - 2 * orbit[x][34] - 2 * orbit[x][30]) / 2;\n orbit[x][16] = (f_16 - 1 * orbit[x][59] - 2 * orbit[x][52] - 1 * orbit[x][51] - 2 * orbit[x][46] - 2 * orbit[x][36] - 2 * orbit[x][34] - 1 * orbit[x][29]);\n orbit[x][15] = (f_15 - 1 * orbit[x][59] - 2 * orbit[x][52] - 1 * orbit[x][51] - 2 * orbit[x][45] - 2 * orbit[x][35] - 2 * orbit[x][34] - 2 * orbit[x][27]);\n }\n\n return orbit;\n }", "public static void main(String[] args) throws NumberFormatException, IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint t = Integer.parseInt(br.readLine());\n\t\tchar[] input = br.readLine().toCharArray();\n\t\tint[] arr = new int[26];\n\t\tfor (int i = 0; i < input.length; i++) {\n\t\t\tarr[input[i] - 'A']++;\n\t\t}\n\t\t\n\t\tint count = 0;\n\t\tfor (int i = 1; i < t; i++) {\n\t\t\tchar[] candidates = br.readLine().toCharArray();\n\t\t\tint[] scores = new int[26];\n\t\t\tfor (int j = 0; j < candidates.length; j++) {\n\t\t\t\tscores[candidates[j] - 'A']++;\n\t\t\t}\n\t\t\t\n\t\t\tif (similar(arr, scores)) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(count);\n\t}", "public static void main(String[] args) {\n List<Integer> nums = new ArrayList<>(Arrays.asList(5, 7, 3, 7, 2, 8, 3, 7, 2));\n //Map<Integer, Integer> numCount = countOccurance(nums);\n Map<Integer, Long> numCount = nums.stream().collect(Collectors.groupingBy(num -> num, Collectors.counting()));\n Set<Integer> numSet = new LinkedHashSet<>(nums);\n numSet.forEach(num -> System.out.println(num + \" \" + numCount.get(num)));\n }", "public static void main(String[] args) {\n\t\tint a[] = {4,4,4,5,5,5,6,6,6,9};\n\t\t\n\t\tArrayList<Integer> ab = new ArrayList<Integer>();\n\t\t\n\t\tfor(int i=0; i<a.length; i++)\n\t\t{\n\t\t\tint k =0;\n\t\t\tif(!ab.contains(a[i]))\n\t\t\t{\n\t\t\t\tab.add(a[i]);\n\t\t\t\tk++;\n\t\t\t\tfor(int j=i+1; j<a.length; j++)\n\t\t\t\t{\n\t\t\t\t\tif(a[i]==a[j])\n\t\t\t\t\t{\n\t\t\t\t\t\tk++;\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//System.out.println(a[i]);\n\t\t\t//System.out.println(k);\n\t\t\tif(k==1)\n\t\t\t\tSystem.out.println(a[i] +\" is unique number \");\n\t\t}\n\t\t\n\t}", "public static void main(String[] args) {\nsub_seq(\"abc\", \"\");\nSystem.out.println();\nSystem.out.println(sub_seq_count(\"ab\", \"\"));\n\t}", "int getUniqueNumbersCount();", "private List<Tuple> charCountMap(Tuple input) {\n \n String[] words = input.snd().replaceAll(\"[^a-zA-Z ]\", \"\").toLowerCase().split(\"\\\\s+\");\n \n List<Tuple> output = new ArrayList<Tuple>();\n \n for(String word : words) {\n Integer chars = word.length();\n output.add(new Tuple(chars.toString(),\"1\"));\n }\n \n lolligag();\n \n //<charCount, 1>, <charCount, 1> ...\n return output;\n }", "@Test\n\tpublic void testGetCounts() {\n\t\tString cellBC = \"ATCAGGGACAGA\";\n\n\t\tint snpPos = 76227022;\n\t\tInterval snpInterval = new Interval(\"HUMAN_1\", snpPos, snpPos, true, \"test\");\n\t\tSampleGenotypeProbabilities result = new SampleGenotypeProbabilities(snpInterval, cellBC);\n\t\tSNPUMIBasePileup p = getPileUpFromFile(cellBC, \"CGGGGCTC\");\n\t\tp.addLocusFunction(LocusFunction.CODING);\n\t\tresult.add(p);\n\t\tresult.add(getPileUpFromFile(cellBC, \"CGCGGGAC\")); // this read doesn't overlap the SNP so it isn't added!\n\t\tresult.add(getPileUpFromFile(cellBC, \"CTGGGCTC\"));\n\t\tresult.add(getPileUpFromFile(cellBC, \"GGAATGTG\"));\n\t\tresult.add(getPileUpFromFile(cellBC, \"GTGCCGTG\"));\n\t\tresult.add(getPileUpFromFile(cellBC, \"TCGCAGAC\"));\n\n\t\t// the code coverage gods are pleased.\n\t\tAssert.assertEquals(result.getCell(), cellBC);\n\t\tAssert.assertEquals(result.getSNPInterval(), snpInterval);\n\n\t\tAssert.assertNotNull(result.toString());\n\n\t\t// get the unfiltered results.\n\t\tObjectCounter<Character> umiCounts = result.getUMIBaseCounts();\n\t\tObjectCounter<Character> umiCountsExpected = new ObjectCounter<>();\n\t\tumiCountsExpected.incrementByCount('A', 2);\n\t\tumiCountsExpected.incrementByCount('G', 3);\n\t\tAssert.assertEquals(umiCounts, umiCountsExpected);\n\n\t\tObjectCounter<Character> readCounts = result.getReadBaseCounts();\n\t\tObjectCounter<Character> readCountsExpected = new ObjectCounter<>();\n\t\treadCountsExpected.incrementByCount('A', 2);\n\t\treadCountsExpected.incrementByCount('G', 5);\n\t\tAssert.assertEquals(readCounts, readCountsExpected);\n\n\t\tSet<LocusFunction> expected = new HashSet<>(Arrays.asList(LocusFunction.CODING));\n\t\tAssert.assertEquals(result.getLocusFunctions(), expected);\n\n\t}", "public static void abCount(String scoreLine, PrintStream output) {\n // initialize arrays for a count and b count\n int[] a = new int[NUM_OF_DIMENSIONS]; \n int[] b = new int[NUM_OF_DIMENSIONS]; \n\n // 2 for loop because there's 10 groups of 7 \n for(int i=0; i<10; i++){\n for(int j=0; j<7; j++){\n int aOrB = 0; // variable to keep track of if user put A or B where A equals 0 and B equals 1\n char currChar = scoreLine.charAt(i*7+j); // gets each character's position in a line\n \n // outer if statement for when user does not enter a dash \n if(currChar != '-'){\n // if user enters B, assign 1 to the aOrB variable\n if(currChar == 'B' || currChar == 'b'){\n aOrB = 1;\n }\n\n if(j==0){ // if statement to keep track of first dimesion (E vs I)\n // check aOrB's value to determine which array to add 1 to\n if(aOrB==0){\n a[0] += 1;\n } else {\n b[0] += 1;\n }\n } else if(j== 1 || j==2){ // else if statement to keep track of second dimension (S vs N)\n // check aOrB's value to determine which array to add 1 to\n if(aOrB==0){\n a[1] += 1;\n } else {\n b[1] += 1;\n }\n } else if(j== 3 || j==4){ // else if statement to keep track of third dimension (T vs F)\n // check aOrB's value to determine which array to add 1 to\n if(aOrB==0){\n a[2] += 1;\n } else {\n b[2] += 1;\n }\n } else { // else statement to keep track of fourth dimension (J vs P)\n // check aOrB's value to determine which array to add 1 to\n if(aOrB==0){\n a[3] += 1;\n } else {\n b[3] += 1;\n }\n }\n }\n }\n }\n displayScores(a,b,output); //call displayScores method to output A & B counts to output file\n bPercent(a,b,output); // call bPercent method to output percentage of b answers to output file\n type(a,b,output); // call type method to output personality type to output file\n }", "static void getCharCountArray(String str) {\n for (int i = 0; i < str.length(); i++)\n count[str.charAt(i)]++;\n }", "static List<Integer> lengthEachScene(List<Character> inputList) {\n\t\tList<Integer> lengths = new ArrayList<>();\n\t\tint[] lastIndexMap = new int[26];\n\t\tfor (int index = 0; index < inputList.size(); index++) {\n\t\t\tlastIndexMap[inputList.get(index) - 'a'] = index;\n\t\t}\n\t\tint start = 0, end = 0;\n\t\tfor (int index = 0; index < inputList.size(); index++) {\n\t\t\tend = Math.max(end, lastIndexMap[inputList.get(index) - 'a']);\n\t\t\tif (end == index) {\n\t\t\t\tlengths.add(end - start + 1);\n\t\t\t\tstart = end + 1;\n\t\t\t}\n\t\t}\n\t\treturn lengths;\n\t}", "static void codonfreq(String s) {\n int[] fromNuc = new int[128];\r\n for (int i = 0; i < fromNuc.length; i++)\r\n fromNuc[i] = -1;\r\n fromNuc['a'] = fromNuc['A'] = 0;\r\n fromNuc['c'] = fromNuc['C'] = 1;\r\n fromNuc['g'] = fromNuc['G'] = 2;\r\n fromNuc['t'] = fromNuc['T'] = 3;\r\n // Count frequencies of codons (triples of nucleotides)\r\n int[][][] freq = new int[4][4][4];\r\n for (int i = 0; i + 2 < s.length(); i += 3) {\r\n int nuc1 = fromNuc[s.charAt(i)];\r\n int nuc2 = fromNuc[s.charAt(i + 1)];\r\n int nuc3 = fromNuc[s.charAt(i + 2)];\r\n freq[nuc1][nuc2][nuc3] += 1;\r\n }\r\n // The translation from index 0123 to nucleotide ACGT\r\n final char[] toNuc = {'A', 'C', 'G', 'T'};\r\n for (int i = 0; i < 4; i++)\r\n for (int j = 0; j < 4; j++) {\r\n for (int k = 0; k < 4; k++)\r\n System.out.print(\" \" + toNuc[i] + toNuc[j] + toNuc[k]\r\n + \": \" + freq[i][j][k]);\r\n System.out.println();\r\n }\r\n }", "public static void main(String[] args) {\n System.out.println(countPairs(\"aba\"));\n }", "ArrayList<Character> nextCountAndSay(ArrayList<Character> sequence) {\n \tArrayList<Character> next = new ArrayList<Character>();\n \tint count = 0;\n \tCharacter c = sequence.get(0);\n \tfor(int i = 0; i < sequence.size(); i++) \n \t//@loop_invariant count represents the length of the longest \n \t// consecutive sequence s in sequence[0, i), all Characters in s\n \t// equal to c and s contains the last element of sequence[0, i) if \n \t// exists\n \t{\n \t\tif(count == 0) {\n \t\t\tcount = 1;\n \t\t\tc = sequence.get(i);\n \t\t}\n \t\telse {\n \t\t\tif(c == sequence.get(i)) {\n \t\t\t\tcount++;\n \t\t\t}\n \t\t\telse {\n \t\t\t\tthis.addCount(next, count);\n \t\t\t\tthis.addSay(next, c);\n \t\t\t\tcount = 1;\n \t\t\t\tc = sequence.get(i);\n \t\t\t}\n \t\t} \t\t\n \t}\n \tthis.addCount(next, count);\n \tthis.addSay(next, c);\n \treturn next;\n }", "public int f1(List<Book> a) {\r\n int count = 0;\r\n for (Book o : a) {\r\n int demchu = 0;\r\n int demso = 0;\r\n for (int i = 0; i < o.getCode().length(); i++) {\r\n char c = o.getCode().charAt(i);\r\n if (Character.isDigit(c)) {\r\n demso++;\r\n }\r\n if (Character.isLetter(c)) {\r\n demchu++;\r\n }\r\n }\r\n if (demchu != 0 && demso != 0) {\r\n count++;\r\n }\r\n }\r\n return count;\r\n\r\n }", "public static void main(String[] args) {\n\t\t\n\t\tString str = \"aaabbbbbbddcmmm\";\n\t\tString[] arr1 = str.split(\"\");\n\t\t\n\t\tString last=\"\";\n\t\tint count = 1;\n\t\tfor (int i = 0; i < arr1.length; i++) {\n\t\t\tcount = 1;\n\t\t\t\n\t\t\tfor (int j = i+1; j < arr1.length; j++) {\n\t\t\t\tif(arr1[i].equals(arr1[j])) {\n\t\t\t\t\tcount++;\n\t\t\t\t\ti=j;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tlast += count + arr1[i];\n\t\t}\n\t\t\n\t\n\t\t//return last;\n\t\t\n\t\tSystem.out.println(last);\n\t}", "public static void main(String[] args) {\n\t\tList<String> list = new ArrayList<String>();\n\t\tlist.add(\"A201550B\");\n\t\tlist.add(\"ABB19991000Z\");\n\t\tlist.add(\"XYZ200019Z\");\n\t\tlist.add(\"ERF200220\");\n\t\tlist.add(\"SCD203010T\");\n\t\t//list.add(\"abC200010E\");\n\t\t//countFakes(list);\n\t\tSystem.out.println(countFakes(list));\n\n\t}", "public static void main(String[] args) {\n\t\t\t\n\t\t\tString input=\"ABCGRETCABCG\";\n\t\t\tint n = 3;\n\t\t\t\n\t\t\tMap<String,Integer> substrMap=new HashMap<String,Integer>();\n\t\t\t\n\t\t\tfor(int i=0;i+n<=input.length();i++){\n\t\t\t\t\n\t\t\t\tString substr=input.substring(i, i+n);\n\t\t\t\t\n\t\t\t\tint frequency=1;\n\t\t\t\t\n\t\t\t\tif(substrMap.containsKey(substr)){\n\t\t\t\t\t\n\t\t\t\t\tfrequency=substrMap.get(substr);\n\t\t\t\t\tfrequency++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tsubstrMap.put(substr, frequency);\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\tSystem.out.println(substrMap.toString());\n\t\t}", "public static int[] count(int[] array){\n //Initialize variables for each digit.\n int count1 = 0;\n int count2 = 0;\n int count3 = 0;\n int count4 = 0;\n int count5 = 0;\n int count6 = 0;\n int count7 = 0;\n int count8 = 0;\n int count9 = 0;\n //For each item in the array, check which number it is.(1-9)\n //Increase that number count by 1.\n for(int i = 0; i < (array.length); i++){\n if(array[i] == 1){\n count1 ++;\n }\n else if(array[i] == 2){\n count2 ++;\n }\n else if(array[i] == 3){\n count3 ++;\n }\n else if(array[i] == 4){\n count4 ++;\n }\n else if(array[i] == 5){\n count5 ++;\n }\n else if(array[i] == 6){\n count6 ++;\n }\n else if(array[i] == 7){\n count7 ++;\n }\n else if(array[i] == 8){\n count8 ++;\n }\n else if(array[i] == 9){\n count9 ++;\n }\n }\n\n //Assign the counter amount into the array\n int[] amounts = {count1, count2, count3, count4, count5, count6, count7, count8, count9};\n\n //return the array\n return(amounts);\n }", "public static void cntArray(int A[], int N) \n { \n // initialize result with 0 \n int result = 0; \n \n for (int i = 0; i < N; i++) { \n \n // all size 1 sub-array \n // is part of our result \n result++; \n \n // element at current index \n int current_value = A[i]; \n \n for (int j = i + 1; j < N; j++) { \n \n // Check if A[j] = A[i] \n // increase result by 1 \n if (A[j] == current_value) { \n result++; \n } \n } \n } \n \n // print the result \n System.out.println(result); \n }", "public int getCount(){\n int c = 0;\n for(String s : this.counts){\n c += Integer.parseInt(s);\n }\n return c;\n }", "public List<String> findRepeatedDnaSequences(String s){\n HashMap<Character,Integer> map=new HashMap<>();\n Set<Integer> firstSet=new HashSet<>();\n Set<Integer> dupSet=new HashSet<>();\n List<String> res=new ArrayList<>();\n map.put('A',0);\n map.put('C',1);\n map.put('G',2);\n map.put('T',3);\n char[] chars=s.toCharArray();\n for(int i=0;i<chars.length-9;i++){\n int v=0;\n for(int j=i;j<i+10;j++){\n v<<=2;\n v|=map.get(chars[j]);\n }\n if(!firstSet.add(v)&&dupSet.add(v)){\n res.add(s.substring(i,i+10));\n }\n }\n return res;\n }", "private static Map countStringOccurences(String[] strArray, AdminJdbcService adminJdbcService) {\n logger.debug(\"Count String Occurences method found\");\n\n Map<String, Integer> countMap = new TreeMap<String, Integer>();\n Map<String, Integer> controlIdsMap = new TreeMap<String, Integer>();\n Set<String> controlIdsSet = new TreeSet<String>();\n Set<String> keySet = countMap.keySet();\n List list = new ArrayList();\n\n for (String string : strArray) {\n String control[] = string.split(\":\");\n if ( !Utils.isNullOrEmpty(control[1]) && Integer.parseInt(control[1].trim()) == 2 ) {\n if (!countMap.containsKey(control[0])) {\n countMap.put(control[0], 1);\n } else {\n Integer count = countMap.get(control[0]);\n count = count + 1;\n countMap.put(control[0], count);\n }\n }\n }\n\n\n return countMap;\n }", "public void getOccuringChar() \n\t\t {\n\t\t \tint count[] = new int[MAX_CHAR]; \n\t\t \t \n\t\t int len = str.length(); \n\t\t \n\t\t // Initialize count array index \n\t\t for (int i = 0; i < len; i++) \n\t\t count[str.charAt(i)]++; \n\t\t \n\t\t // Create an array of given String size \n\t\t char ch[] = new char[str.length()]; \n\t\t for (int i = 0; i < len; i++) { \n\t\t ch[i] = str.charAt(i); \n\t\t int find = 0; \n\t\t for (int j = 0; j <= i; j++) { \n\t\t \n\t\t // If any matches found \n\t\t if (str.charAt(i) == ch[j]) \n\t\t find++; \n\t\t } \n\t\t \n\t\t if (find == 1) \n\t\t System.out.println(\"Number of Occurrence of \" + \n\t\t str.charAt(i) + \" is:\" + count[str.charAt(i)]); \n\t\t } \n\t\t }", "public static void main(String[] args) \n {\n Scanner input=new Scanner(System.in);\n int N=input.nextInt();\n int M=input.nextInt();\n int tree[]=new int[N];\n int count[]=new int[N];\n Arrays.fill(count,1);\n for(int i=0;i<M;i++)\n {\n int u1=input.nextInt();\n int v1=input.nextInt();\n tree[u1-1]=v1;\n count[v1-1]+=count[u1-1];\n int root=tree[v1-1];\n while(root!=0)\n {\n count[root-1]+=count[u1-1];\n root=tree[root-1];\n }\n }\n int counter=-1;\n for(int i=0;i<count.length;i++)\n {\n if(count[i]%2==0)\n counter++;\n }\n System.out.println(counter);\n }", "public static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tint n = in.nextInt();\n\t\tin.nextLine();\n\t\tString[] input = new String[100];\n\t\tfor(int j = 0; j < n ; j++){\n\t\t\tString line = in.nextLine();\n\t\t\tint count = 0;\n\t\t\tfor(int i = 0; i < line.length()-1;i++){\n\t\t\t\tif(line.charAt(i) == line.charAt(i+1)){\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t} \n\t}", "@Test\n public void aminoCompareTest2() {\n //these list are already sorted\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(c);\n AminoAcidLL second = AminoAcidLL.createFromRNASequence(c);\n int expected = 0;\n assertEquals(expected, first.aminoAcidCompare(second));\n }", "int[] buildFrequencyTable(String s)\n{\n int[] table = new int [Character.getNumericValue('z') - Character.getNumericValue('a') + 1];\n for (char c : s.toCharArray())\n {\n int x = getCharNumber(c);\n if (x != -1) table[x]++;\n }\n return table;\n}", "private Map<Character, Integer> getFreqs(String input) {\n\t\tMap<Character, Integer> freqMap = new HashMap<>();\n\t\tfor (char c : input.toCharArray()) {\n\t\t\tif (freqMap.containsKey(c)) {\n\t\t\t\tfreqMap.put(c, freqMap.get(c) + 1);\n\t\t\t} else {\n\t\t\t\tfreqMap.put(c, 1);\n\t\t\t}\n\t\t}\n\t\treturn freqMap;\n\t}", "public StringCount[] GetCounts() \n\t{\n\t\tStringCount[] counts = new StringCount[numEntries];\n int entries = 0;\n \n for(int i = 0; i < tableSize; i++)\n {\n if(table[i] != null)\n {\n insertionSort(new StringCount(table[i].key, table[i].value), counts, entries);\n entries++;\n }\n }\n\t\treturn counts;\n\t}", "public static ArrayList<Integer> findAnagrams(String s, String p) {\r\n\t \t \r\n\t \t //write your code here\r\n\t\t if(s.length()<p.length()) {\r\n\t\t\t ArrayList<Integer> arr = new ArrayList<>();\r\n\t\t\t return arr;\r\n\t\t }\r\n\t\t ArrayList<Integer> result = new ArrayList<>();\r\n\t\t HashMap<Character,Integer> P = new HashMap<>();\r\n\t\t HashMap<Character,Integer> H = new HashMap<>();\r\n\t\t \r\n\t\t for(int i=0;i<p.length();i++) {\r\n\t\t\t char ch = p.charAt(i);\r\n\t\t\t if(!P.containsKey(ch)) {\r\n\t\t\t\t P.put(ch,1);\r\n\t\t\t }\r\n\t\t\t else {\r\n\t\t\t\t P.put(ch,P.get(ch)+1);\r\n\t\t\t }\r\n\t\t }\r\n\t\t int start =0;\r\n\t\t int end=0;\r\n\t\t int mcount=0;\r\n\t\t for(int i=0;i<p.length();i++) {\r\n\t\t\t char ch = s.charAt(i);\r\n\t\t\t if(!H.containsKey(ch)) {\r\n\t\t\t\t H.put(ch,1);\r\n\t\t\t }\r\n\t\t\t else {\r\n\t\t\t\t H.put(ch,H.get(ch)+1);\r\n\t\t\t }\r\n\t\t\t if(P.containsKey(ch)) {\r\n\t\t\t\t if(P.get(ch)>=H.get(ch)) {\r\n\t\t\t\t\t mcount++;\r\n\t\t\t\t }\r\n\t\t\t }\r\n\t\t\t end=i;\r\n\t\t }\r\n\t\t if(mcount==p.length()) {\r\n\t\t\t result.add(start);\r\n\t\t }\r\n\t\t while(end<s.length()-1) {\r\n\t\t\t char ch=s.charAt(start);\r\n\t\t\t int hfreq = H.get(ch)-1;\r\n\t\t\t H.put(ch,hfreq);\r\n\t\t\t if(H.get(ch)==0) {\r\n\t\t\t\t H.remove(ch);\r\n\t\t\t }\r\n\t\t\t int pfreq=0;\r\n\t\t\t if(P.containsKey(ch)) {\r\n\t\t\t\t pfreq=P.get(ch);\r\n\t\t\t }\r\n\t\t\t if(hfreq<pfreq) {\r\n\t\t\t\t mcount--;\r\n\t\t\t }\r\n\t\t\t ch=s.charAt(end+1);\r\n\t\t\t int hfreqend=0;\r\n\t\t\t if(H.containsKey(ch)) {\r\n\t\t\t\t hfreqend = H.get(ch);\r\n\t\t\t }\r\n\t\t\t hfreqend++;\r\n\t\t\t H.put(ch, hfreqend);\r\n\t\t\t int pfreqend=0;\r\n\t\t\t if(P.containsKey(ch)) {\r\n\t\t\t\t pfreqend = P.get(ch);\r\n\t\t\t }\r\n\t\t\t if(hfreqend<=pfreqend) {\r\n\t\t\t\t mcount++;\r\n\t\t\t }\r\n\t\t\t start++;\r\n\t\t\t end++;\r\n\t\t\t if(mcount==p.length()) {\r\n\t\t\t\t result.add(start);\r\n\t\t\t }\r\n\t\t\t \r\n\t\t }\r\n\t\t return result;\r\n\t\t \r\n\t \t \r\n\t }", "static double numberCount(List<String> Arr){\n \n double sum = 0.0;\n \n for(int i = 0; i < Arr.size(); i++ ){\n \n sum += Double.parseDouble(Arr.get(i));\n \n }\n \n return sum;\n \n }", "public static void main(String[] args)throws IOException {\n int n = 5; //Integer.parseInt(rd.readLine());\n// String str[] = rd.readLine().split(\" \");\n// int arr[] = new int[n];\n// for(int i=0; i<n; i++){\n// arr[i] = Integer.parseInt(str[i]);\n// }\n int arr[] = {1, 3, 2, 1, 2};\n int freq = 0;\n Arrays.sort(arr);\n for(int i=0; i<n-1; i++){\n if(arr[i] != arr[i+1]){\n freq++;\n break;\n }\n i++;\n }\n if(freq==0) {\n System.out.println(arr[n-1]); //the unique no is tha last no\n }\n else{\n System.out.println(freq); //unique no is somewhere in between\n }\n }", "public static void main(String[] args) {\n\r\n\t\tString str = \"learning automation is fun\";\r\n\t\tstr = str.replace(\" \", \"\");\r\n\t\tchar letters[] = str.toCharArray();\r\n\t\t\r\n\t\tfor(int i = 0;i<letters.length;i++) {\r\n\t\t\tint count = 0;\r\n\t\t\tfor(int j=0;j<letters.length;j++) {\r\n\t\t\t\t\r\n\t\t\t\tif (j<i&&(letters[j]==letters[i])) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tif(letters[i]==letters[j]) {\r\n\t\t\t\t\tcount++;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tif (count>0)\r\n\t\t\tSystem.out.println(\"Occurrence of \"+letters[i]+\" is \"+count);\r\n\t\t}\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n\n\t\tint arr[] = { 2, 3, 3, 2, 5 };\n\t\tfindCounts(arr, arr.length);\n\n\t\tint arr1[] = { 1 };\n\t\tfindCounts(arr1, arr1.length);\n\n\t\tint arr3[] = { 4, 4, 4, 4 };\n\t\tfindCounts(arr3, arr3.length);\n\n\t\tint arr2[] = { 1, 3, 5, 7, 9, 1, 3, 5, 7, 9, 1 };\n\t\tfindCounts(arr2, arr2.length);\n\n\t\tint arr4[] = { 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 };\n\t\tfindCounts(arr4, arr4.length);\n\n\t\tint arr5[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 };\n\t\tfindCounts(arr5, arr5.length);\n\n\t\tint arr6[] = { 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 };\n\t\tfindCounts(arr6, arr6.length);\n\t}", "static long substrCount(int n, String s) {\nchar arr[]=s.toCharArray();\nint round=0;\nlong count=0;\nwhile(round<=arr.length/2)\n{\nfor(int i=0;i<arr.length;i++)\n{\n\t\n\t\tif(round==0)\n\t\t{\n\t\t//System.out.println(arr[round+i]);\n\t\tcount++;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(i-round>=0&&i+round<arr.length)\n\t\t\t{\n\t\t\t\tboolean flag=true;\n\t\t\t\tchar prev1=arr[i-round];\n\t\t\t\tchar prev2=arr[i+round];\n\t\t\t\t\n\t\t\t\tfor(int j=1;j<=round;j++)\n\t\t\t\t{\n\t\t\t\t\tif(prev1!=arr[i+j]||prev1!=arr[i-j])\n\t\t\t\t\t{\n\t\t\t\t\t\tflag=false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\tif(arr[i+j]!=arr[i-j])\n\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\tflag=false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif(flag)\n\t\t\t\t{\n\t\t\t\t\t//System.out.print(arr[i-round]);\n\t\t\t\t\t//System.out.print(arr[round+i]);\n\t\t\t\t\t//System.out.println(round);\n\t\t\t\t\t//System.out.println();\n\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n}\nround++;\n}\nreturn count;\n }", "public int count () throws IOException {\n\t\tList<Integer> list = new ArrayList<Integer>();\n\t\tinit();\n\t\twhile(hasNext()) {\n\t\t\tElement el = nextElement();\n\t\t\tint hash = el.GetHash();\n\t\t\tint pos = locate (list, hash);\n\t\t\tif ((pos == list.size()) || (list.get(pos) != hash)) {\n\t\t\t\tlist.add(pos, hash);\n\t\t\t}\n\t\t\t/*for (i=0; i<list.size() && list.get(i)<hash; i++) {}\n\t\t\t\tif ((i==list.size()) || (list.get(i) != el.GetHash())) {\n\t\t\t\t\tlist.add(i, hash);\n\t\t\t\t}*/\n\t\t}\n\t\treturn list.size();\n\t}", "private static void countAB(String line, int[] A, int[] B) {\n\t for ( int i = 0; i < line.length(); i++ ) {\n\t \tchar c = line.charAt(i);\n\t \tint k = (i%7 + 1)/2;\n\t\t if ( c == 'a' || c == 'A' )\n\t\t A[k]++;\n\t\t if ( c == 'b' || c == 'B' )\n\t\t B[k]++;\n\t }\n\t}", "private int[][] setAccuArray(ArrayList<String> alCalcAttr,\r\n\t\t\tArrayList<String> alClasAttr, ArrayList<String> alLeftChild,\r\n\t\t\tArrayList<String> alRightChild) {\r\n\t\tint[][] array = new int[2][2];\r\n\t\tint nLength = alCalcAttr.size();\r\n\r\n\t\tString strClas0 = alClasAttr.get(0);\r\n\t\tfor (int i = 0; i < nLength; ++i) {\r\n\r\n\t\t\tString strCalci = alCalcAttr.get(i);\r\n\t\t\tString strClasi = alClasAttr.get(i);\r\n\r\n\t\t\tif (alLeftChild.contains(strCalci)) {\r\n\t\t\t\tif (strClasi.equals(strClas0)) {\r\n\t\t\t\t\t++array[0][0];\r\n\t\t\t\t} else {\r\n\t\t\t\t\t++array[1][0];\r\n\t\t\t\t}\r\n\t\t\t} else if (alRightChild.contains(strCalci)) {\r\n\t\t\t\tif (strClasi.equals(strClas0)) {\r\n\t\t\t\t\t++array[0][1];\r\n\t\t\t\t} else {\r\n\t\t\t\t\t++array[1][1];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn array;\r\n\t}", "@Test\n public void aminoCompareTest1(){\n //these list are already sorted\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(c);\n AminoAcidLL second = AminoAcidLL.createFromRNASequence(d);\n int expected = 1;\n assertEquals(expected, first.aminoAcidCompare(second));\n }", "public int countDistinct(String s) {\n\t\tTrie root = new Trie();\n\t\tint result = 0;\n for (int i = 0; i < s.length(); i++) {\n \tTrie cur = root;\n \tfor (int j = i; j < s.length(); j++) {\n \t\tint idx = s.charAt(j) - 'a';\n \t\tif (cur.arr[idx] == null) {\n \t\t\tresult++;\n \t\t\tcur.arr[idx] = new Trie();\n \t\t}\n \t\tcur = cur.arr[idx];\n \t}\n }\n return result;\n }", "public static void main(String[] args) {\n\t\tint[] arr = { 4, 1, 1, 4, 2, 3, 4, 4, 1, 2, 4, 9, 3 };\n\t\tint number;\n\t\tint count = 1;\n\t\tint maxCount = 1;\n\t\tint index=0;\n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\tnumber = arr[i];\n\t\t\tfor (int j = i + 1; j < arr.length; j++) {\n\t\t\t\tif (number == arr[j]) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (maxCount < count) {\n\t\t\t\tmaxCount = count;\n\t\t\t\tindex = i;\n\t\t\t}\n\t\t\tcount=1;\n\t\t}\n\t\tSystem.out.println(arr[index]+\"->\"+maxCount+\" times\");\n\t}", "public static void main(String[] args) {\n\t\tString str=\"aabcccccaaaa\";\n\t\tString str2=\"\";\n\t\tint freq=1;\n\t\tfor(int i=0;i<str.length()-1;i++){\n\t\t\tif(str.charAt(i)==str.charAt(i+1)){\n\t\t\t\tfreq++;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tstr2=str2+str.charAt(i)+freq;\n\t\t\t\tfreq=1;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(str2+str.charAt(str.length()-1)+freq);\n\t}", "private static int[] letterHist(String acharArray) {\n int[] alphabet = new int[26];\n\n for (int i = 0; i < acharArray.length(); i++) {\n char singleChar = acharArray.toLowerCase().charAt(i);\n\n if ('a' <= singleChar && 'z' >= singleChar) {\n alphabet[singleChar - 'a']++;\n }\n }\n return alphabet;\n }", "public void doCount(ArrayList<String> liste){\n\t\tint j;\n\t\t\n\t\tfor (int i = 0; i < liste.size(); i++) {\n\t\t\t// check if string already exists\n\t\t\tif(!map.containsKey(liste.get(i))){\n\t\t\t\t// check frequency of the given string\n\t\t\t\tj = Collections.frequency(liste, liste.get(i));\t\n\t\t\t\t\n\t\t\t\t// underscore instead of blank space\n\t\t\t\tif(liste.get(i).equals(\" \"))\n\t\t\t\t\tmap.put(\"_\", j);\t\n\t\t\t\telse\n\t\t\t\t\tmap.put(liste.get(i), j);\t// (char, frequency)\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\t\n\t\t//return map;\n\t}", "public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n int T = scan.nextInt();\n scan.nextLine();\n for(int i = 0 ; i < T ; i++){\n int count = 0;\n String text = scan.nextLine();\n char[] letters = text.toCharArray();\n\n if(letters.length > 0){\n char character = letters[0];\n\n for(int j = 1 ; j < letters.length ; j++){\n\n if(character == letters[j]){\n count++;\n }else{\n character = letters[j];\n }\n }\n }\n System.out.println(count);\n }\n scan.close();\n }", "public void getProfileCounts(char[][] c, int j, int[] counts) {\n for (int i = 0; i < c.length; i++) {\n switch (c[i][j]) {\n case 'A':\n counts[0]++;\n break;\n case 'C':\n counts[1]++;\n break;\n case 'G':\n counts[2]++;\n break;\n case 'T':\n counts[3]++;\n break;\n }\n }\n }", "public static void main(String[] args) {\n\t\tint a[] = {3,4,4,6,1,4,4};\n\t\tint counter[] = new int[5];\n\t\tint max_counter = 0;\n\t\tint start_line = 0;\n\t\tfor(int i=0;i<a.length;i++) {\n\t\t\n\t\t\tint x = a[i] - 1;\n\t\t\t\n\t\t\tif(a[i] > counter.length) {\n\t\t\t\t//max counter\n\t\t\t\tstart_line = max_counter;\n\t\t\t}else {\n\t\t\t\tif(counter[x] < start_line) {\n\t\t\t\t\tcounter[x] = counter[x] + start_line;\n\t\t\t\t}\n\t\t\t\t\tcounter[x]++;\n\t\t\t\t\t\n\t\t\t\t\tif(counter[x] > max_counter) {\n\t\t\t\t\t\tmax_counter = counter[x];\n\t\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t\t\n\t\tfor(int i=0;i<counter.length;i++) {\n\t\t\tif(counter[i] < start_line) {\n\t\t\t\tcounter[i] = start_line;\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(Arrays.toString(counter));\n\t\t\n\t\t\n\t}", "public static HashMap<String, Integer> countOccurences(ArrayList<String> arr) {\n arr = toSortedString(arr);\n HashMap<String, Integer> hash = new HashMap();\n for(String str :arr){\n if(hash.containsKey(str)){\n hash.replace(str, hash.get(str)+1);\n }\n else{\n hash.put(str,1);\n }\n }\n return hash;\n }", "public void testCount()\n\t{\n\t\tinfo.append(a1);\n\t\tinfo.append(a2);\n\t\tinfo.append(a3);\n\t\tassertEquals(3,info.getSynonymsCount());\n\t}", "int getAoisCount();", "public static int[] mucScore(LeanDocument key, LeanDocument response)\n{\n // System.out.println(\"==========================================================\");\n // System.out.println(\"Key:\\n\"+key.toStringNoSing()+\"\\n*************************\\nResponse:\\n\"+response.toStringNoSing());\n\n Iterator<TreeMap<Integer, Integer>> goldChains = key.chainIterator();\n // double mucRecall = 0.0;\n int mucRecallNom = 0;\n int mucRecallDenom = 0;\n while (goldChains.hasNext()) {\n TreeMap<Integer, Integer> keyChain = goldChains.next();\n if (keyChain.size() > 1) {\n int numInt = numIntersect(key, keyChain, response);\n\n // int numMatched = getNumMatched(key, keyChain);\n // if(numMatched>0){\n // mucRecallNom += numMatched-numInt;\n mucRecallNom += (keyChain.size() - numInt);\n // mucRecallDenom += numMatched-1;\n mucRecallDenom += keyChain.size() - 1;\n\n // System.out.println(keyChain+\"\\n\"+(keyChain.size() - numInt)+\"/\"+(keyChain.size()-1));\n // }\n }\n }\n int[] result = { mucRecallNom, mucRecallDenom };\n\n return result;\n}", "public int f2(List<Book> a) {\r\n int count = 0;\r\n for (Book o : a) {\r\n if (o.getCode().startsWith(\"a\") || o.getCode().startsWith(\"A\")) {\r\n count++;\r\n }\r\n }\r\n return count;\r\n }", "public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n while (scanner.hasNext()) {\n int n = scanner.nextInt();\n int[] A = new int[n];\n for (int i = 0; i < n; i++) {\n A[i] = scanner.nextInt();\n }\n System.out.println(count(A, n));\n }\n }", "public static HashMap<String,Integer> counter(ArrayList<String> arr){\n\t\tHashMap<String,Integer> map = new HashMap<String,Integer>();\n\t\t\tfor(String s : arr){\n\t\t\t\tif (map.keySet().contains(s)){\n\t\t\t\t\tmap.put(s, map.get(s)+1);\n\t\t\t\t}else{\n\t\t\t\t\tmap.put(s, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn map;\t\n\t}", "public static List<String> findRepeatedDnaSequences(String s) {\n \tList<String> re=new ArrayList<String>();\n \tif(s.length()<=10){\n \t\treturn re;\n \t}\n \tMap<String, Integer> map=new HashMap<String, Integer>(); \t\n \tfor(int i=10; i<=s.length(); i++){\n \t\tString k=s.substring(i-10, i);\n \t\tif(map.containsKey(k)){\n \t\t\tint val=map.get(k);\n \t\t\tif(val==1){\n \t\t\t\tre.add(k);\n \t\t\t}\n \t\t\tmap.put(k, val+1);\n \t\t}else{\n \t\t\tmap.put(k, 1);\n \t\t}\n \t}\n \treturn re;\n }", "public static int[] getNumberArray(String inputString, String alphabets){\n\n int inputSize = inputString.length();\n int alphabetsSize = alphabets.length();\n int[] outputArray = new int[inputSize];\n\n for(int i = 0; i < inputSize; i++){\n\n for(int j = 0; j < alphabetsSize; j++){\n\n if(inputString.charAt(i) == alphabets.charAt(j)){\n\n outputArray[i] = j;\n break;\n\n }\n\n }\n\n }\n\n return outputArray;\n\n }", "public int[] countInsigniaInHand(int inputPlayerID){\n\t\tint[] count = {0,0,0,0} ;\n\t\t// Counts how many of each insignia the player has\n\t\tfor(int i=0;i<playerArray[inputPlayerID].getCardsOwned().size();i++) {\n\t\t\tswitch (playerArray[inputPlayerID].getCardsOwned().get(i).getInsignia()) {\n\t\t\t case 'i': count[0]++; break;\n\t\t\t case 'c': count[1]++; break;\n\t\t\t case 'a': count[2]++; break;\n\t\t\t case 'w': count[3]++; break;\n\t\t\t}\n\t\t}\n\t\treturn count ;\n\t}", "public static void main(String[] args) {\n int a[]={1,2,3,4,4,3,2,6,6,9,9,6,7,4,7};\n\n ArrayList<Integer> al= new ArrayList<Integer>();\n\n for (int i =0;i<a.length;i++){\n int k=0;\n if (!al.contains(a[i])){\n al.add(a[i]);\n k++;\n\n for (int j=0;j<a.length;j++){\n if(a[i]==a[j]){\n k++;\n }\n }\n System.out.println(\"The number \"+ a[i] +\"repeats \"+ k+\" number of times.\");\n if (1==k)\n System.out.println(a[i]+ \" is the unique number.\");\n }\n\n\n }\n\n\n\n }", "public static void main(String[] args) {\n\t\tString s=\"Prasad\";\r\n\t\tchar c[]=s.toCharArray();\r\n\t\tchar d[]=new char[s.length()];\r\n\t\tint x[]=new int[20];\r\n\t\tfor(int i=0;i<c.length;i++)\r\n\t\t{\r\n\t\t\tint count=0;\r\n\t\t\tfor(int j=i+1;j<c.length;j++)\r\n\t\t\t{\r\n\t\t\t\tif(c[i]==c[j]&&c[i]!='@')\r\n\t\t\t\t{\r\n\t\t\t\t\tcount++;\r\n\t\t\t\t\ts.replace(c[j], '@');\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tx[i]=count;\r\n\r\n\t\t\t\tSystem.out.println(c[i]+\" \"+x[i]);\r\n\t\t}\r\n\t\t\r\n\r\n\t}", "public static void main(String[] args) {\n String res= freqAlphabets( \"10#11#12\");\n System.out.println(res);\n }", "@Override\r\n public Integer countingDuplicates(String match) {\r\n if(duplicates == null) { // if it's not already located\r\n duplicates = new HashMap<>();\r\n for (Core str : pondred) {\r\n for (String term:str.abstractTerm){\r\n if (duplicates.containsKey(term) )\r\n duplicates.put(term, duplicates.get(term) + 1);\r\n else {\r\n duplicates.put(term, 1);\r\n }\r\n }\r\n }\r\n }\r\n return duplicates.get(match);\r\n }", "public int count_decoding_improved(char[] digits, int n){\n// if(n==0 || n==1)\n// return 1;\n\n int[] count = new int[n+1];\n\n count[0] = 1;\n count[1] = 1;\n //int count = 0;\n\n for(int i = 2; i <= n; i++){\n if(digits[i-1] > '0')\n count[i] = count[i-1];\n\n if(digits[i-2]=='1' || digits[i-2] == '2' && digits[i-1] < '7')\n count[i] += count[i-2];\n }\n\n\n\n return count[n];\n }", "public static void getNCount(Configuration conf, Path input) throws Exception {\n Job job = Job.getInstance(conf, \"N Counter job\");\n job.setJarByClass(PageRank.class);\n job.setMapperClass(NCountMapper.class);\n job.setReducerClass(NCountReducer.class);\n job.setMapOutputKeyClass(Text.class);\n job.setMapOutputValueClass(Text.class);\n job.setOutputKeyClass(Text.class);\n job.setOutputValueClass(LinkedEdges.class);\n FileInputFormat.addInputPath(job, input);\n FileOutputFormat.setOutputPath(job, new Path(\"adjtemp\"));\n job.setNumReduceTasks(1);\n\n boolean ok = job.waitForCompletion(true);\n if (!ok) {\n throw new Exception(\"Job failed\");\n }\n\n long NCount = job.getCounters().findCounter(NCountReducer.ReduceCounters.N).getValue();\n System.out.println(NCount);\n conf.setLong(\"N\", NCount);\n }", "static HashMap runLengthEncoding(List<Character> list){\r\n\t\t\r\n\t\tHashMap<Character,Integer> map=new HashMap<>();\r\n\t\t\r\n\t\tfor(char a:list)\r\n\t\t{\r\n\t\tif(map.get(a)==null)\r\n\t\t{\r\n\t\t\tmap.put(a, 1);\r\n\t\t}\r\n\t\telse{\r\n\t\t\tmap.put(a, map.get(a)+1);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}\r\n\t\treturn map;\r\n\t\r\n\t}", "public int[] getNumAnchors() {\n if (numAnchors == null) {\n if (rule.isAnchored()) {\n numAnchors = new int[end];\n for (int i = start; i < end; i++) numAnchors[i] = 1;\n } else {\n numAnchors = new int[0];\n for (Derivation child : children) {\n int[] childNumAnchors = child.getNumAnchors();\n if (numAnchors.length < childNumAnchors.length) {\n int[] newNumAnchors = new int[childNumAnchors.length];\n for (int i = 0; i < numAnchors.length; i++)\n newNumAnchors[i] = numAnchors[i];\n numAnchors = newNumAnchors;\n }\n for (int i = 0; i < childNumAnchors.length; i++)\n numAnchors[i] += childNumAnchors[i];\n }\n }\n }\n return numAnchors;\n }", "public static void main(String[] args)\n\t{\n\t\tString test = \"ABCDEFGHIJ\";\n\t\tPermutationGeneratorCoveyouSullivan p = new PermutationGeneratorCoveyouSullivan(test);\n\t\t\n\t\tint[] counters = new int[test.length()+1]; //array used to add to counters\n\t\t\n\t\t//using the h function to display how many permutations there are with test.length() elements and ZERO fixed - comparing to this.\n\t\tlong testH = h(test.length());\n\t\tSystem.out.println(\"Using the h function:\\nThe number of permutations with \" + test.length() + \" elements and ZERO fixed elements is: [\" + testH +\"]\\n\");\n\t\t\n\t\t//using the g function to display how many permutations there are with test.length() elements and \"i\" fixed elements - comparing to this\n\t\tSystem.out.println(\"Using the g function:\");\n\t\tfor (int i = 0; i < test.length()+1; i++)\n\t\t{\n\t\t\tlong gTest = g(test.length(), i);\n\t\t\tSystem.out.println(\"The number of permutations with \" + test.length() + \" elements and \" + i + \" fixed elements is: [\" + gTest + \"]\");\n\t\t}\n\t\t\n\t\t//now we are going to be using the brute force way of how to do counting - manually and then compare\n\t\tSystem.out.println(\"\\nUsing my brute force technique to figure out the number of permutations:\");\n\t\tfor (String s : p)\n\t\t{\n\t\t\tint controller = 0; //controller variable that will reset for every loop - for each seperate index\n\t\t\t\n\t\t\tfor (int i = 0; i < test.length(); i++) //this is the tester to compare the characters at each index\n\t\t\t{\n\t\t\t\tif (s.charAt(i) == test.charAt(i))\n\t\t\t\t\tcontroller++;\n\t\t\t}\n\t\t\t\n\t\t\tcounters[controller]++; //I'm still not understanding how these counters are working: I know it works, but how does it know what index to be in?\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < counters.length; i++)\n\t\t\tSystem.out.println(\"With \" + i + \" fixed elements, there are: [\" + counters[i] + \"] permutations\");\n\t\t\n\t\t/**********************************\n\t\t * Finally, my methods and brute force technique are correct do to the equality of the different functions/parameters as well as my brute force technique!\n\t\t * I also checked different test strings including my name, etc and they are also equal.\n\t\t * \n\t\t * Questions: One thing I noticed in the sequence is that g(test.length(), 0) and g(test.length(), 1) are somehow related b/c there is a difference of ONE?? \n\t\t * Is this true for all strings?\n\t\t *********************************/\n\t}", "public static void main(String [] args) {\n\t\tString str = \"ccacacabccacabaaaabbcbccbabcbbcaccabaababcbcacabcabacbbbccccabcbcabbaaaaabacbcbbbcababaabcbbaa\"\n\t\t\t\t+ \"ababababbabcaabcaacacbbaccbbabbcbbcbacbacabaaaaccacbaabccabbacabaabaaaabbccbaaaab\"\n\t\t\t\t+ \"acabcacbbabbacbcbccbbbaaabaaacaabacccaacbcccaacbbcaabcbbccbccacbbcbcaaabbaababacccbaca\"\n\t\t\t\t+ \"cbcbcbbccaacbbacbcbaaaacaccbcaaacbbcbbabaaacbaccaccbbabbcccbcbcbcbcabbccbacccbacabcaacbcac\"\n\t\t\t\t+ \"cabbacbbccccaabbacccaacbbbacbccbcaaaaaabaacaaabccbbcccaacbacbccaaacaacaaaacbbaaccacbcbaaaccaab\"\n\t\t\t\t+ \"cbccacaaccccacaacbcacccbcababcabacaabbcacccbacbbaaaccabbabaaccabbcbbcaabbcabaacabacbcabbaaabccab\"\n\t\t\t\t+ \"cacbcbabcbccbabcabbbcbacaaacaabb\"\n\t\t\t\t+ \"babbaacbbacaccccabbabcbcabababbcbaaacbaacbacacbabbcacccbccbbbcbcabcabbbcaabbaccccabaa\"\n\t\t\t\t+ \"bbcbcccabaacccccaaacbbbcbcacacbabaccccbcbabacaaaabcccaaccacbcbbcccaacccbbcaaaccccaabacabc\"\n\t\t\t\t+ \"abbccaababbcabccbcaccccbaaabbbcbabaccacaabcabcbacaccbaccbbaabccbbbccaccabccbabbbccbaabcaab\"\n\t\t\t\t+ \"cabcbbabccbaaccabaacbbaaaabcbcabaacacbcaabbaaabaaccacbaacababcbacbaacacccacaacbacbbaacbcbbbabc\"\n\t\t\t\t+ \"cbababcbcccbccbcacccbababbcacaaaaacbabcabcacaccabaabcaaaacacbccccaaccbcbccaccacbcaaaba\";\n\t\tSystem.out.println(substrCount2(1017, str));\n\t}", "public static void main(String[] args) {\nScanner sc=new Scanner(System.in);\r\nString input1=sc.nextLine();\r\ninput1=input1.toLowerCase();\r\nint l=input1.length();\r\nchar a[]=input1.toCharArray();\r\nint d[]=new int[1000];\r\nString str=\"\";\r\nint i=0,k1=0,k2=0,m=0,c1=0,c2=0,c3=0,l1=0,u=0,u1=0;\r\nchar b[]={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};\r\nfor(i=0;i<l;i++)\r\n{ c3=0;\r\n\tif(a[i]==' ')\r\n\t{u=i;c3=0;\r\n\t\tfor(k1=u1,k2=i-1;k1<k2 && k2>k1;k1++,k2--)\r\n\t\t{ c1=0;c2=0;\r\n\t\t\tfor(m=0;m<26;m++)\r\n\t\t\t{\r\n\t\t\t\tif(b[m]==a[k1]) {\r\n\t\t\t\tc1=m+1;}\t\r\n\t\t\t\tif(b[m]==a[k2]) {\r\n\t\t\t\t\tc2=m+1;}\t\r\n\t\t\t}\r\n\t\t\tc3=c3+Math.abs(c1-c2);\r\n\t\t}\r\n\t\tif(k1==k2) {\r\n\t\t\tfor(m=0;m<26;m++) {\r\n\t\t\t\tif(b[m]==a[k1])\r\n\t\t\t\t\tc3=c3+(m+1);\r\n\t\t\t }\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\td[l1]=c3;\r\n\t\tl1++;\r\n\t\tu1=i+1;\r\n\t\tc3=0;\r\n\t}\r\n\tif(i==l-1)\r\n\t{\r\n\t\tfor(k1=u+1,k2=i;k1<k2 && k2>k1;k1++,k2--)\r\n\t\t{ c1=0;c2=0;\r\n\t\t\tfor(m=0;m<26;m++)\r\n\t\t\t{\r\n\t\t\t\tif(b[m]==a[k1]) {\r\n\t\t\t\tc1=m+1;}\t\r\n\t\t\t\tif(b[m]==a[k2]) {\r\n\t\t\t\t\tc2=m+1;}\t\r\n\t\t\t}\r\n\t\t\tc3=c3+Math.abs(c1-c2);\r\n\t\t}\r\n\t\tif(k1==k2) {\r\n\t\t\tfor(m=0;m<26;m++) {\r\n\t\t\t\tif(b[m]==a[k1])\r\n\t\t\t\t\tc3=c3+(m+1);\r\n\t\t\t }\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\td[l1]=c3;\r\n\t\tl1++;\r\n\t\tk1=i+1;\r\n\t}\r\n}\r\n\r\n for(i=0;i<l1;i++)\r\n {\r\n\t str=str+Integer.toString(d[i]);\r\n }\r\n int ans=Integer.parseInt(str);\r\n System.out.print(ans);\r\n}", "public static void main(String[] args) {\n\n int counter = 0;\n\n for (int num = 1; num <= 100; num++) {\n\n if (num % 15 == 0) {\n System.out.println(num);\n //counter = counter + 1 ; counter +=1;\n ++counter;\n }\n }\n\n System.out.println(\"counter = \" + counter);\n\n /// given a string with value\n // find out how many \"a\" showed in this String\n\n String name = \"Esra Fidan\";\n\n //System.out.println( name.charAt(0) =='a');\n\n int countOfA = 0;\n for (int x = 0; x < name.length(); x++) {\n\n //System.out.println(name.charAt(x));\n if (name.charAt(x) == 'a') {\n System.out.println(\"BINGO FOUND IT !!\");\n ++countOfA;\n\n }\n\n\n }\n\n System.out.println(\"countOfA = \" + countOfA);\n\n\n\n }", "int sizeOf(int node){\n\t\tint counter =1;\r\n\t\tfor (int i=0;i<idNode.length;i++){ //Count all node with the same parent\r\n\t\t\tif (idNode[i]==node){\r\n\t\t\t\tcounter++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn counter;\r\n\t}", "int sizeOfScansArray();", "private int countOccurrence(Integer valueToCount) {\n int count = 0;\n\n for(Integer currentValue : list) {\n if (currentValue == valueToCount) {\n count++;\n }\n }\n\n return count;\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tint a [] = {1,0,0,1,1,0,0,1,0,1,0,0,0,1};\r\n\t\t\r\n\t\tboolean start = false;\r\n\t\t//boolean end = false;\r\n\t\tString s = \"\";\r\n\t\tString k = Arrays.toString(a);\r\n\t\tString[] strings = (k.replace(\"[\", \"\").replace(\"]\", \"\").split(\", \"));\r\n\t\tString s1 = (k.replace(\"[\", \"\").replace(\"]\", \"\"));\r\n\t\tString s2 = (s1.replace(\",\", \"\"));\r\n\t\tString s3 = s2.replaceAll(\"\\\\s\", \"\");\r\n\t\t//String stringss = strings.toString();\r\n\t\t//String[] stringss = strings.replaceAll(\"\\\\s\", \"\").split(\"\");\r\n\t\t\r\n\t\tint Startindex = 0;\r\n\t\tint Endindex = 0;\r\n\t\tArrayList<String> ai = new ArrayList<String>();\r\n\t\tfor (int i =0;i<=strings.length-1;i++) {\r\n\t\t\tint result = Integer.parseInt(strings[i]);\r\n\t\t\t\r\n\t\t\tif (result==1 && !start) {\r\n\t\t\t\t\r\n\t\t\t\tstart = true;\r\n\t\t\t\tStartindex = i;\r\n\t\t\t\t\r\n\t\t\t}else if (result==1 && start) {\r\n\t\t\t\tstart = false;\r\n\t\t\t\tEndindex = i;\r\n\t\t\t\ts = s3.substring(Startindex, Endindex+1);\r\n\t\t\t\tai.add(s);\r\n\t\t\t\ti =i-1;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\nSystem.out.println(ai);\r\n\t}", "public static void main(String[] args) {\n\t\tint[] i = new int[100];\n\t\tint unique = 0;\n\t\tfloat ratio = 0;\n\t\tList<String> inputWords = new ArrayList<String>();\n\t\tMap<String,List<String>> wordcount = new HashMap<String,List<String>>();\n\t\ttry{\n\t\t\tBufferedReader in = new BufferedReader(new FileReader(\"/Users/huziyi/Documents/NLP file/Assignment1/Twitter messages.txt\"));\n\t\t\tString str;\n\t\t\twhile((str = in.readLine())!=null){\n\t\t\t\tstr = str.toLowerCase();\n\t\t\t\t\n\t\t\t\tString[] words = str.split(\"\\\\s+\");\n\t\t\t\t\n\t\t\t//\tSystem.out.println(words);\n\t\t\t//\tSystem.out.println(\"1\");\n\t\t\t\tfor(String word:words){\n\t\t\t\t\t\n\t\t\t//\t\tString word = new String();\n\t\t\t\t\t\n\t\t\t\t\tword = word.replaceAll(\"[^a-zA-Z]\", \"\");\n\t\t\t\t\tinputWords.add(word);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\tfor(int k=0;k<inputWords.size()-1;k++){\n\t\t\tString thisWord = inputWords.get(k);\n\t\t\tString nextWord = inputWords.get(k+1);\n\t\t\tif(!wordcount.containsKey(thisWord)){\n\t\t\t\twordcount.put(thisWord, new ArrayList<String>());\n\t\t\t}\n\t\t\twordcount.get(thisWord).add(nextWord);\n\t\t}\n\t\t for(Entry e : wordcount.entrySet()){\n\t// System.out.println(e.getKey());\n\t\tMap<String, Integer>count = new HashMap<String, Integer>();\n List<String>words = (List)e.getValue();\n for(String s : words){\n if(!count.containsKey(s)){\n count.put(s, 1);\n }\n else{\n count.put(s, count.get(s) + 1);\n }\n }\n \t\n // for(Entry e1 : wordcount.entrySet()){\n for(Entry f : count.entrySet()){\n \n // \tint m = 0;\n //\tint[] i = new int[100];\n //\ti[m] = (Integer) f.getValue();\n \tint n = (Integer) f.getValue();\n \tn = (Integer) f.getValue();\n // \tList<String> values = new ArrayList<String>();\n \t\t// values.addAll(count.g());\n \tif(n>=120){\n \tif(!(e.getKey().equals(\"\"))&&!(f.getKey().equals(\"\"))){\n //\t\t int a = (Integer) f.getValue();\n //\t\t Arrays.sort(a);\n System.out.println(e.getKey()+\" \"+f.getKey() + \" : \" + f.getValue());\n \n \t}\n \t}\n //\tm++;\n \t }\n\t\t }\n\t\t \n\t\n\t\t \n\t\t// Arrays.sort(i);\n\t\t //System.out.println(i[0]+i[1]);\n/*\n\t\t ArrayList<String> values = new ArrayList<String>();\n\t\t values.addAll(count.values());\n\n\t\t Collections.sort(values, Collections.reverseOrder());\n\n\t\t int last_i = -1;\n\n\t\t for (Integer i : values.subList(0, 99)) { \n\t\t if (last_i == i) \n\t\t continue;\n\t\t last_i = i;\n\n\n\n\n\t\t for (String s : wordcount.keySet()) { \n\n\t\t if (wordcount.get(s) == i)\n\t\t \n\t\t \tSystem.out.println(s+ \" \" + i);\n\n\t\t }\n\t\t \n\t\t\t}*/\n\t}", "private static List<Integer> findAnagrams(String s, String p) {\n int ns = s.length(), np = p.length();\n if (ns < np) return new ArrayList<>();\n\n int [] pCount = new int[26];\n int [] sCount = new int[26];\n // build reference array using string p\n for (char ch : p.toCharArray()) {\n pCount[ch - 'a']++;\n }\n\n List<Integer> output = new ArrayList<>();\n // sliding window on the string s\n for (int i = 0; i < ns; ++i) {\n // add one more letter\n // on the right side of the window\n sCount[s.charAt(i) - 'a']++;\n // remove one letter\n // from the left side of the window\n if (i >= np) {\n sCount[s.charAt(i - np) - 'a']--;\n }\n // compare array in the sliding window\n // with the reference array\n if (Arrays.equals(pCount, sCount)) {\n output.add(i - np + 1);\n }\n }\n return output;\n }", "public static void main(String[] args) {\n\t\t String S = \"aacaacca\";\n\t\t String T = \"ca\";\n\t\tSystem.out.println(numDistinct(S, T));\n\t}", "public static void main(String[] args) throws IOException {\n\n String file = \"C:/Java Projects/java-web-dev-exercises/src/exercises/CountingCharsSentence.txt\";\n Path path = Paths.get(file);\n List<String> lines = Files.readAllLines(path);\n Object[] string = lines.toArray();\n String string2 = Arrays.toString(string);\n\n String[] wordsInString = string2.toLowerCase().split(\"\\\\W+\");\n String rejoinedString = String.join(\"\", wordsInString);\n char[] charactersInString = rejoinedString.toCharArray();\n\n HashMap<Character, Integer> letterMap = new HashMap<>();\n\n\n for (char letter : charactersInString) {\n if (!letterMap.containsKey(letter)) {\n int letterCount = 1;\n letterMap.put(letter, letterCount);\n } else if (letterMap.containsKey(letter)) {\n letterMap.put(letter, letterMap.get(letter) + 1);\n }\n }\n\n\n System.out.println(letterMap);\n }", "@Override //old methd for letter count\n public Integer letterCount(String inputString) {\n char[] characterArray = inputString.toCharArray();\n Map<Character, Integer> wordFrequencyMap = new HashMap<Character, Integer>();\n\n for (char character : characterArray) {\n if (wordFrequencyMap.containsKey(character)) {\n\n Integer wordCount = (Integer) wordFrequencyMap.get(character);\n wordFrequencyMap.put(character, wordCount + 1);\n\n } else {\n wordFrequencyMap.put(character, 1);\n\n }\n }\n return null; //iterateWordCount(wordFrequencyMap);\n }", "int getAndSequenceGroupsCount();", "public static ArrayList<TestInstanceCount> countDataFromInstances(List<TestDataInstance> inputData) {\n \n long count_A0B0 = 0;\n long count_A0B1 = 0;\n long count_A1B0 = 0;\n long count_A1B1 = 0;\n \n for(TestDataInstance data : inputData) {\n if(data.getValueA() == 0 && data.getValueB() == 0) {\n count_A0B0++;\n } else if(data.getValueA() == 0 && data.getValueB() == 1) {\n count_A0B1++;\n } else if(data.getValueA() == 1 && data.getValueB() == 0) {\n count_A1B0++;\n } else if(data.getValueA() == 1 && data.getValueB() == 1) {\n count_A1B1++;\n }\n }\n // results list\n ArrayList<TestInstanceCount> countData = new ArrayList<TestInstanceCount>();\n \n // create count objects\n TestInstanceCount c1 = new TestInstanceCount();\n c1.setAssignmentVarA(0);\n c1.setAssignmentVarB(0);\n c1.setAssignmentCount(count_A0B0);\n countData.add(c1);\n c1 = null;\n \n TestInstanceCount c2 = new TestInstanceCount();\n c2.setAssignmentVarA(0);\n c2.setAssignmentVarB(1);\n c2.setAssignmentCount(count_A0B1);\n countData.add(c2);\n c2 = null;\n \n TestInstanceCount c3 = new TestInstanceCount();\n c3.setAssignmentVarA(1);\n c3.setAssignmentVarB(0);\n c3.setAssignmentCount(count_A1B0);\n countData.add(c3);\n c3 = null;\n \n TestInstanceCount c4 = new TestInstanceCount();\n c4.setAssignmentVarA(1);\n c4.setAssignmentVarB(1);\n c4.setAssignmentCount(count_A1B1);\n countData.add(c4);\n c4 = null;\n \n return countData;\n }", "public static void main(String[] args) {\n\n\t\tint[] a = {1,2,3,8,8,9,6,4};\n\t String s = \"hello2java\"; \n\t\tHashMap<Integer,Integer> countMap1 = new HashMap<Integer,Integer>();\n\t\tHashMap<Character,Integer> countMap2 = new HashMap<Character,Integer>();\n \n\t\tchar[] ch = s.toCharArray();\n\t\t\n\t\t\tfor(int i=0;i<a.length;i++){\n\t\t\t\tif(countMap1.containsKey(a[i])){\n\t\t\t\t\tcountMap1.put(a[i], countMap1.get(a[i])+1);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tcountMap1.put(a[i],1);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t//}\n\t\tSystem.out.println(countMap1);\n\t\t\n\t\tfor(int i=0;i<ch.length;i++){\n\t\t\tif(countMap2.containsKey(ch[i])){\n\t\t\t\tcountMap2.put(ch[i], countMap2.get(ch[i])+1);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tcountMap2.put(ch[i],1);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tSystem.out.println(countMap2);\n\t\t\n\t\tSet<Character> ket = countMap2.keySet();\n for(Character c:ket){\n \tif(countMap2.get(c)>1){\n \t\tSystem.out.println(c+\"-->\"+countMap2.get(c));\n \t}\n }\n\t}", "public int getNumChromosomes();" ]
[ "0.71021396", "0.584594", "0.5838221", "0.57940745", "0.57648265", "0.5719923", "0.56811833", "0.5654703", "0.5654535", "0.56239194", "0.5600866", "0.5591426", "0.5584711", "0.55815476", "0.5537751", "0.5522771", "0.54953647", "0.5478879", "0.53917915", "0.5386155", "0.5309575", "0.5299081", "0.52812845", "0.52733636", "0.52596885", "0.52594274", "0.5256373", "0.5249413", "0.5242744", "0.52405846", "0.5238316", "0.52370566", "0.52176934", "0.5216192", "0.5212671", "0.5209492", "0.5207625", "0.5204584", "0.5202471", "0.51995873", "0.51968867", "0.5182768", "0.5176748", "0.5176411", "0.5175638", "0.51714617", "0.5167865", "0.5167863", "0.5157608", "0.5152605", "0.5143083", "0.51364416", "0.5124599", "0.51240814", "0.5120197", "0.5114867", "0.5110951", "0.51056254", "0.51016253", "0.50982696", "0.50945854", "0.5089136", "0.50874585", "0.5082381", "0.5079536", "0.5073249", "0.50686747", "0.50580806", "0.50563955", "0.50513726", "0.50463086", "0.5041949", "0.5040797", "0.50360674", "0.5033112", "0.5029687", "0.50258315", "0.50191253", "0.5016306", "0.5014288", "0.50084746", "0.5007278", "0.5006666", "0.5000031", "0.49986604", "0.49917173", "0.49905235", "0.49861696", "0.4975846", "0.4974965", "0.49679273", "0.49614507", "0.4961436", "0.49613395", "0.49533755", "0.49527243", "0.49456593", "0.49451238", "0.49440902", "0.49438924" ]
0.7005942
1
///aminoAcidCompare test cases///// /TEST 7 INPUT: c = "GCUGAGGAUAUGUCA", d = "UGUUUUAAAAAUAACACU" EXPECTED OUTPUT = 1 ACTUAL OUTPUT = 1 Using two lists of different "size", the number of nodes it's compared to check that their difference is 1.
@Test public void aminoCompareTest1(){ //these list are already sorted AminoAcidLL first = AminoAcidLL.createFromRNASequence(c); AminoAcidLL second = AminoAcidLL.createFromRNASequence(d); int expected = 1; assertEquals(expected, first.aminoAcidCompare(second)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void codonCompare2(){\n //these list are already sorted\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(c);\n AminoAcidLL second = AminoAcidLL.createFromRNASequence(d);\n int expected = 1;\n assertEquals(expected, first.codonCompare(second));\n\n }", "@Test\n public void aminoCompareTest2() {\n //these list are already sorted\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(c);\n AminoAcidLL second = AminoAcidLL.createFromRNASequence(c);\n int expected = 0;\n assertEquals(expected, first.aminoAcidCompare(second));\n }", "@Test\n public void codonCompare1(){\n //these list are already sorted\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(a);\n AminoAcidLL second = AminoAcidLL.createFromRNASequence(b);\n int expected = 0;\n assertEquals(expected, first.codonCompare(second));\n }", "@Test\n public void aminoListTest2(){\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(d);\n char[] expected = {'C','F','K','N','T'};\n assertArrayEquals(expected, first.aminoAcidList());\n }", "public static void main(String[] args) {\n\n\t\tString a = \"aabbbc\", b =\"cbad\";\n\t\t// a=abc\t\t\t\tb=cab\n\t\t\n\t\t\n\t\tString a1 =\"\" , b1 = \"\"; // to store all the non duplicated values from a\n\t\t\n\t\tfor(int i=0; i<a.length();i++) {\n\t\t\tif(!a1.contains(a.substring(i,i+1)))\n\t\t\t\ta1 += a.substring(i,i+1);\n\t\t}\n\t\t\n\t\tfor(int i=0; i<b.length();i++) {\n\t\t\tif(!b1.contains(b.substring(i,i+1)))\n\t\t\t\tb1 += b.substring(i,i+1);\n\t\t}\n\t\t\t\t\n\t\tchar[] ch1 = a1.toCharArray();\n\t\tSystem.out.println(Arrays.toString(ch1));\n\t\t\n\t\tchar[] ch2 = b1.toCharArray();\n\t\tSystem.out.println(Arrays.toString(ch2));\n\t\t\n\t\tArrays.sort(ch1);\n\t\tArrays.sort(ch2);\n\t\t\n\t\tSystem.out.println(\"=====================================================\");\n\t\t\n\t\tSystem.out.println(Arrays.toString(ch1));\n\t\tSystem.out.println(Arrays.toString(ch2));\n\t\t\n\t\tString str1 = Arrays.toString(ch1);\n\t\tString str2 = Arrays.toString(ch2);\n\t\t\n\t\tif(str1.contentEquals(str2)) {\n\t\t\tSystem.out.println(\"true, they build out of same letters\");\n\t\t}else { \n\t\t\tSystem.out.println(\"fasle, there is something different\");\n\t\t}\n\t\t\n\n\t\t\n\t\t// SHORTER SOLUTION !!!!!!!!!!!!!!!!!!!!\n\t\t\n//\t\tString Str1 = \"aaaabbbcc\", Str2 = \"cccaabbb\";\n//\t\t\n//\t\tStr1 = new TreeSet<String>( Arrays.asList(Str1.split(\"\"))).toString();\n//\t\tStr2 = new TreeSet<String>( Arrays.asList(Str2.split(\"\"))).toString();\n//\t\tSystem.out.println(Str1.equals(Str2));\n//\t\t\n//\t\t\n\t\t\n}", "@Test\n public void aminoCountsTest2(){\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(b);\n int[] expected = {2,1,1,1};\n assertArrayEquals(expected, first.aminoAcidCounts());\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n DefaultNucleotideCodec defaultNucleotideCodec0 = DefaultNucleotideCodec.INSTANCE;\n DefaultNucleotideCodec defaultNucleotideCodec1 = DefaultNucleotideCodec.INSTANCE;\n DefaultNucleotideCodec defaultNucleotideCodec2 = DefaultNucleotideCodec.INSTANCE;\n Nucleotide nucleotide0 = Nucleotide.Pyrimidine;\n Set<Nucleotide> set0 = nucleotide0.getBasesFor();\n byte[] byteArray0 = defaultNucleotideCodec1.encode((Collection<Nucleotide>) set0);\n Nucleotide nucleotide1 = defaultNucleotideCodec0.decode(byteArray0, 0L);\n assertEquals(Nucleotide.Cytosine, nucleotide1);\n \n defaultNucleotideCodec1.getNumberOfGapsUntil(byteArray0, 1717986918);\n DefaultNucleotideCodec defaultNucleotideCodec3 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec3.getUngappedLength(byteArray0);\n DefaultNucleotideCodec defaultNucleotideCodec4 = DefaultNucleotideCodec.INSTANCE;\n int int0 = defaultNucleotideCodec4.getUngappedOffsetFor(byteArray0, (-1209));\n assertEquals((-1209), int0);\n \n int int1 = defaultNucleotideCodec2.getGappedOffsetFor(byteArray0, (-1209));\n assertEquals(2, int1);\n \n defaultNucleotideCodec2.getGappedOffsetFor(byteArray0, 1717986918);\n DefaultNucleotideCodec defaultNucleotideCodec5 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec5.decodedLengthOf(byteArray0);\n defaultNucleotideCodec0.decodedLengthOf(byteArray0);\n DefaultNucleotideCodec defaultNucleotideCodec6 = DefaultNucleotideCodec.INSTANCE;\n DefaultNucleotideCodec defaultNucleotideCodec7 = DefaultNucleotideCodec.INSTANCE;\n int int2 = defaultNucleotideCodec7.getGappedOffsetFor(byteArray0, 0);\n int int3 = defaultNucleotideCodec6.getNumberOfGapsUntil(byteArray0, 5);\n assertTrue(int3 == int2);\n assertArrayEquals(new byte[] {(byte)0, (byte)0, (byte)0, (byte)2, (byte) (-34)}, byteArray0);\n assertEquals(0, int3);\n }", "@Test\n public void aminoCountsTest1(){\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(a);\n int[] expected = {1,3,1};\n assertArrayEquals(expected, first.aminoAcidCounts());\n }", "@Test\n public void testDiffConstraint () throws IOException\n {\n CacheList clist = new CacheList(new Scanner(\n \"GCABCD\\tAs The World Turns\\tbunny\\t1\\t1\\tN40 45.875\\tW111 48.986\\nGCRQWK\\tOld Three Tooth\\tgeocadet\\t3.5\\t3\\tN40 45.850\\tW111 48.045\\n\"));\n clist.setDifficultyConstraints(2, 4);\n ArrayList<Cache> selected = clist.select();\n assertEquals(\"GCRQWK\", selected.get(0).getGcCode());\n }", "public static void main(String[] args) {\n\t\tString vertex=\"abcdefghij\";\n\t\tString edge=\"bdegachiabefbc\";\n\t\tchar[] vc=vertex.toCharArray();\n\t\tchar[] ec=edge.toCharArray();\n\t\tint[] v=new int[vc.length];\n\t\tfor (int i = 0; i < v.length; i++) {\n\t\t\tv[i]=vc[i]-'a'+1;\n\t\t}\n\t\tint[] e=new int[ec.length];\n\t\tfor (int i = 0; i < e.length; i++) {\n\t\t\te[i]=ec[i]-'a'+1;\n\t\t}\t\t\n\t\t\n\t\tDS_List ds_List=new DS_List(v.length);\n//\t\tfor (int i = 0; i < v.length; i++) {\n//\t\t\tds_List.make_set(v[i]);\n//\t\t}\n//\t\tfor (int i = 0; i < e.length; i=i+2) {\n//\t\t\tif (ds_List.find_set(e[i])!=ds_List.find_set(e[i+1])) {\n//\t\t\t\tds_List.union(e[i], e[i+1]);\n//\t\t\t}\n//\t\t}\n\t\tds_List.connect_components(v, e);\n\t\tfor (int i = 0; i < v.length; i++) {\n\t\t\tSystem.out.print(ds_List.find_set(v[i])+\" \");\n\t\t}\n\t\tSystem.out.println();\n\t\tSystem.out.println(ds_List.same_component(v[1], v[2]));\n\t}", "public double jaccardDistance(TreeSet<String> other) {\n\t\tif(other.isEmpty()||this.isEmpty()||this.first().length()!=other.first().length()){\n\t\t\treturn 0;\n\t\t}\n\t\tShingleSet intersection = new ShingleSet(other.first().length());\n\t\tShingleSet union = new ShingleSet(other.first().length());\n\t\tintersection.addAll(other);\n\t\tunion.addAll(other);\n//\t\tSystem.out.println(this.toString()+other.toString());\n\t\tintersection.retainAll(this);\n\t\tunion.addAll(this);\n//\t\tSystem.out.println(intersection.toString()+union.toString());\n//\t\tSystem.out.println(intersection.size()+\" \"+union.size());\t\t\n\t\treturn 1 - (double) intersection.size()/ (double) union.size(); \n\t}", "private static int countCommon(String[] a1, String[] a2) {\n\t\tHashSet<String> hs = new HashSet<String>();\r\n\t\tfor(int i=0 ; i < a1.length ; i++) {\r\n\t\t\ths.add(a1[i]);\r\n\t\t}\r\n\t\tString s1[] = new String[hs.size()];\r\n\t\ths.toArray(s1);\r\n\t\tHashSet<String> hs2 = new HashSet<String>();\r\n\t\tfor( int j=0 ;j < a2.length ;j++) {\r\n\t\t\ths2.add(a2[j]);\r\n\t\t}\r\n\t\tString s2[] = new String[hs2.size()];\r\n\t\ths2.toArray(s2);\r\n\t\tint count=0;\r\n\t\tfor(int i=0;i<s1.length;i++)\r\n\t\t{\t\r\n\t\t\tfor(int j=0;j<s2.length;j++)\r\n\t\t\t{\r\n\t\t\t\tif(s1[i].equals(s2[j]))\r\n\t\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn count;\t\t\r\n\t}", "@Test\n public void aminoListTest1(){\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(a);\n char[] expected = {'P','L','A'};\n assertArrayEquals(expected, first.aminoAcidList());\n }", "public static int distanceBetweenNodes(Node node, int d1, int d2){\r\n ArrayList<Integer> path1 = nodeToRootPath(node, d1);\r\n ArrayList<Integer> path2 = nodeToRootPath(node, d2);\r\n \r\n //Traverse from behind to avoid time complexity\r\n int i = path1.size() - 1;\r\n int j = path2.size() - 1;\r\n \r\n //Check for valid iterations and till the time data is common, first occurence of diff data in arraulist is the time to stop\r\n while(i>=0 && j>=0 && path1.get(i) == path2.get(j)){\r\n i--; j--;\r\n }\r\n \r\n //Here returning i+1 and j+1 means there are i+1 elements left and j+1 elements left which are not common in \r\n //both ArrayList so answer will be addition of these, it will give us the distance between two nodes\r\n //+1 is two times for two edges between i to LCA and j to LCA\r\n return (i+1) + (j+1);\r\n }", "@Test(timeout = 4000)\n public void test11() throws Throwable {\n DefaultNucleotideCodec defaultNucleotideCodec0 = DefaultNucleotideCodec.valueOf(\"INSTANCE\");\n byte[] byteArray0 = new byte[7];\n byteArray0[0] = (byte) (-50);\n byteArray0[1] = (byte) (-38);\n DefaultNucleotideCodec defaultNucleotideCodec1 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec1.decodedLengthOf(byteArray0);\n defaultNucleotideCodec0.decodedLengthOf(byteArray0);\n DefaultNucleotideCodec defaultNucleotideCodec2 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec2.getUngappedLength(byteArray0);\n Nucleotide nucleotide0 = Nucleotide.NotGuanine;\n Set<Nucleotide> set0 = nucleotide0.getBasesFor();\n byte[] byteArray1 = defaultNucleotideCodec0.encode((Collection<Nucleotide>) set0);\n Nucleotide nucleotide1 = defaultNucleotideCodec0.decode(byteArray0, 0L);\n assertEquals(Nucleotide.Gap, nucleotide1);\n \n defaultNucleotideCodec0.getNumberOfGapsUntil(byteArray0, 1717986918);\n long long0 = defaultNucleotideCodec1.getUngappedLength(byteArray0);\n assertEquals((-824573952L), long0);\n \n defaultNucleotideCodec1.getUngappedOffsetFor(byteArray1, (-651));\n defaultNucleotideCodec2.getGappedOffsetFor(byteArray0, (byte) (-38));\n defaultNucleotideCodec0.getGappedOffsetFor(byteArray0, (byte) (-50));\n DefaultNucleotideCodec defaultNucleotideCodec3 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec3.decodedLengthOf(byteArray1);\n defaultNucleotideCodec3.decodedLengthOf(byteArray1);\n DefaultNucleotideCodec defaultNucleotideCodec4 = DefaultNucleotideCodec.INSTANCE;\n int int0 = defaultNucleotideCodec4.getGappedOffsetFor(byteArray1, (byte) (-38));\n assertEquals(3, int0);\n \n DefaultNucleotideCodec defaultNucleotideCodec5 = DefaultNucleotideCodec.INSTANCE;\n int int1 = defaultNucleotideCodec5.getNumberOfGapsUntil(byteArray1, (byte) (-38));\n assertArrayEquals(new byte[] {(byte)0, (byte)0, (byte)0, (byte)3, (byte)29, (byte) (-32)}, byteArray1);\n assertEquals(0, int1);\n }", "public static void main(String[] args) {\nScanner sc=new Scanner(System.in);\r\nString a=sc.nextLine();\r\nString b=sc.nextLine();\r\nchar ch1[]=a.toCharArray();\r\nchar ch2[]=b.toCharArray();\r\nint l1=ch1.length;\r\nint l2=ch2.length;\r\nint n=0;\r\nif(l1==l2)\r\n{\r\n\tfor(int i=0;i<l1;i++)\r\n\t{\r\n\t\tif(ch1[i]!=ch2[i])\r\n\t\t{\r\n\t\t\tn=n+1;\r\n\t\t}\r\n\t}\r\n\tif(n==1)\r\n\t\tSystem.out.println(\"yes\");\r\n\telse\r\n\t\tSystem.out.println(\"no\");\r\n}\r\nelse\r\n\tSystem.out.println(\"no\");\r\n\t}", "public static void main(String[] args) {\nScanner sc=new Scanner(System.in);\r\nString input1=sc.nextLine();\r\ninput1=input1.toLowerCase();\r\nint l=input1.length();\r\nchar a[]=input1.toCharArray();\r\nint d[]=new int[1000];\r\nString str=\"\";\r\nint i=0,k1=0,k2=0,m=0,c1=0,c2=0,c3=0,l1=0,u=0,u1=0;\r\nchar b[]={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};\r\nfor(i=0;i<l;i++)\r\n{ c3=0;\r\n\tif(a[i]==' ')\r\n\t{u=i;c3=0;\r\n\t\tfor(k1=u1,k2=i-1;k1<k2 && k2>k1;k1++,k2--)\r\n\t\t{ c1=0;c2=0;\r\n\t\t\tfor(m=0;m<26;m++)\r\n\t\t\t{\r\n\t\t\t\tif(b[m]==a[k1]) {\r\n\t\t\t\tc1=m+1;}\t\r\n\t\t\t\tif(b[m]==a[k2]) {\r\n\t\t\t\t\tc2=m+1;}\t\r\n\t\t\t}\r\n\t\t\tc3=c3+Math.abs(c1-c2);\r\n\t\t}\r\n\t\tif(k1==k2) {\r\n\t\t\tfor(m=0;m<26;m++) {\r\n\t\t\t\tif(b[m]==a[k1])\r\n\t\t\t\t\tc3=c3+(m+1);\r\n\t\t\t }\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\td[l1]=c3;\r\n\t\tl1++;\r\n\t\tu1=i+1;\r\n\t\tc3=0;\r\n\t}\r\n\tif(i==l-1)\r\n\t{\r\n\t\tfor(k1=u+1,k2=i;k1<k2 && k2>k1;k1++,k2--)\r\n\t\t{ c1=0;c2=0;\r\n\t\t\tfor(m=0;m<26;m++)\r\n\t\t\t{\r\n\t\t\t\tif(b[m]==a[k1]) {\r\n\t\t\t\tc1=m+1;}\t\r\n\t\t\t\tif(b[m]==a[k2]) {\r\n\t\t\t\t\tc2=m+1;}\t\r\n\t\t\t}\r\n\t\t\tc3=c3+Math.abs(c1-c2);\r\n\t\t}\r\n\t\tif(k1==k2) {\r\n\t\t\tfor(m=0;m<26;m++) {\r\n\t\t\t\tif(b[m]==a[k1])\r\n\t\t\t\t\tc3=c3+(m+1);\r\n\t\t\t }\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\td[l1]=c3;\r\n\t\tl1++;\r\n\t\tk1=i+1;\r\n\t}\r\n}\r\n\r\n for(i=0;i<l1;i++)\r\n {\r\n\t str=str+Integer.toString(d[i]);\r\n }\r\n int ans=Integer.parseInt(str);\r\n System.out.print(ans);\r\n}", "private static int commonChild(String s1, String s2) {\n //reduce of iterations\n //make strings shorter\n //TreeMap to keep order\n Map<Integer, Character> map1 = new TreeMap<>();\n Map<Integer, Character> map2 = new TreeMap<>();\n StringBuilder stringBuilder = new StringBuilder();\n for (int i = 0; i < s1.length(); i++) {\n for (int j = 0; j < s2.length(); j++) {\n char charOfS1 = s1.charAt(i);\n char charOfS2 = s2.charAt(j);\n if (charOfS1 == charOfS2) {\n map1.put(i, charOfS1);\n map2.put(j, charOfS2);\n }\n }\n }\n for (Map.Entry<Integer, Character> entry : map1.entrySet()) {\n stringBuilder.append(entry.getValue());\n }\n s1 = stringBuilder.toString();\n stringBuilder = new StringBuilder();\n for (Map.Entry<Integer, Character> entry : map2.entrySet()) {\n stringBuilder.append(entry.getValue());\n }\n s2 = stringBuilder.toString();\n /*\n ------------------------------------------------\n */\n int lengthS1 = s1.length();\n int lengthS2 = s2.length();\n int[][] arr = new int[lengthS1+1][lengthS2+1];\n for (int i = 1; i <= lengthS1; i++) {\n for (int j = 1; j <= lengthS2; j++) {\n char charI = s1.charAt(i - 1); //from 0\n char charJ = s2.charAt(j - 1); //from 0\n arr[i][j] = (charI==charJ) ?\n arr[i-1][j-1] + 1 :\n Math.max(arr[i-1][j],arr[i][j-1]);\n }\n }\n\n return arr[lengthS1][lengthS2];\n }", "public static void main(String[] args) throws IOException {\n\n String[] aItems = {\"17\", \"18\", \"30\"};\n\n List<Integer> a = new ArrayList<Integer>();\n\n for (int i = 0; i < 3; i++) {\n int aItem = Integer.parseInt(aItems[i]);\n a.add(aItem);\n }\n\n String[] bItems = {\"99\", \"16\", \"8\"} ;\n\n List<Integer> b = new ArrayList<Integer>();\n\n for (int i = 0; i < 3; i++) {\n int bItem = Integer.parseInt(bItems[i]);\n b.add(bItem);\n }\n\n List<Integer> result = compareTriplets(a, b);\n\n for (int i : result) {\n System.out.print(i);\n }\n }", "public static void main (String[] args) throws java.lang.Exception\n\t{\n\t\tScanner s = new Scanner(System.in);\n\t\tString s1=\"wipro\";\n\t\tString s2=\"technologies\";\n\t\tint i,j,temp;\n\t int a = s.nextInt();\n\t char[] c = s1.toCharArray();\n\t char[] d = s2.toCharArray();\n\t if(a==1)\n\t {\n\t \tfor(i=0;i<c.length;i++)\n\t \t{\n\t \t\tfor(j=0;j<d.length||j<c.length;j++)\n\t \t\t{\n\t \t\t\tif(c[i]==d[j])\n\t \t\t\t{\n\t \t\t\t\tSystem.out.println(c[i]);\n\t \t\t\t\tc[i]+='A'-'a';\n\t \t\t\t\td[j]+='A'-'a';\n\t \t\t\t\t\n\t \t\t\t\t\n\t \t\t\t}\n\t \t\t}\n\t \t}\n\t }\n\t \n\t else if(a==0)\n\t {\n\t \tfor(i=0;i<c.length;i++)\n\t \t{\n\t \t\tfor(j=0;j<d.length||j<c.length;j++)\n\t \t\t{\n\t \t\t\tif(c[i]!=d[j])\n\t \t\t\t{\n\t \t\t\t c[i]+='A'-'a';\n\t \t\t\t \n\t \t\t\t}\n\n\t \t\t}\n\t \t}\n\t for(i=0;i<d.length;i++)\n\t {\n\t \tfor(j=0;j<c.length;j++)\n\t \t\t{\n\t \t\t\tif(d[i]!=c[j])\n\t \t\t\t{\n\t \t\t\t d[i]+='A'-'a';\n\t \t\t\t \n\t \t\t\t}\n\n\t \t\t}\n\t \t}\n\t \t\n\t }\n\telse\n\t{\n\tSystem.out.println(\"no accepted value\");\n\t}\n\t \n\t \tSystem.out.print(c);\n\t \n\t \n\t \n\t \tSystem.out.print(d);\n\t \n\t}", "public static String findDupes(String[] a, String[] b, String[] c){\n int aa = 0, bb = 0, cc = 0;\n\n while((aa < a.length) && (bb < b.length) && (cc < c.length)){\n if (a[aa].compareTo(b[bb]) < 0){\n //b > a\n if (a[aa].compareTo(c[cc]) < 0) aa++;\n else if (a[aa].compareTo(c[cc]) > 0) cc++;\n else return a[aa];\n }\n\n else if (a[aa].compareTo(b[bb]) > 0){\n //b < a\n if (b[bb].compareTo(c[cc]) < 0) bb++;\n else if (b[bb].compareTo(c[cc]) > 0) cc++;\n else return b[bb];\n }\n\n else return a[aa];\n }\n\n while ((aa < a.length) && (bb < b.length)){\n if (a[aa].compareTo(b[bb]) > 0) bb++;\n else if (a[aa].compareTo(b[bb]) < 0) aa++;\n else return a[aa];\n }\n\n while ((aa < a.length) && (cc < c.length)){\n if (a[aa].compareTo(c[cc]) > 0) cc++;\n else if (a[aa].compareTo(c[cc]) < 0) aa++;\n else return a[aa];\n }\n\n while ((bb < b.length) && (cc < c.length)){\n if (b[bb].compareTo(c[cc]) > 0) cc++;\n else if (b[bb].compareTo(c[cc]) < 0) bb++;\n else return b[bb];\n }\n\n return \"\";\n }", "@Test(timeout = 4000)\n public void test17() throws Throwable {\n DefaultNucleotideCodec defaultNucleotideCodec0 = DefaultNucleotideCodec.INSTANCE;\n byte[] byteArray0 = new byte[9];\n defaultNucleotideCodec0.toString(byteArray0);\n defaultNucleotideCodec0.decodedLengthOf(byteArray0);\n defaultNucleotideCodec0.decodedLengthOf(byteArray0);\n defaultNucleotideCodec0.getUngappedLength(byteArray0);\n Nucleotide nucleotide0 = Nucleotide.Gap;\n Set<Nucleotide> set0 = nucleotide0.getBasesFor();\n byte[] byteArray1 = defaultNucleotideCodec0.encode((Collection<Nucleotide>) set0);\n DefaultNucleotideCodec defaultNucleotideCodec1 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec1.decode(byteArray0, 0);\n DefaultNucleotideCodec defaultNucleotideCodec2 = DefaultNucleotideCodec.INSTANCE;\n byte[] byteArray2 = defaultNucleotideCodec2.encode((Collection<Nucleotide>) set0);\n DefaultNucleotideCodec defaultNucleotideCodec3 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec3.toString(byteArray1);\n DefaultNucleotideCodec defaultNucleotideCodec4 = DefaultNucleotideCodec.INSTANCE;\n DefaultNucleotideCodec defaultNucleotideCodec5 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec5.toString(byteArray0);\n DefaultNucleotideCodec defaultNucleotideCodec6 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec6.getNumberOfGapsUntil(byteArray1, 4);\n DefaultNucleotideCodec.values();\n defaultNucleotideCodec1.isGap(byteArray2, 0);\n defaultNucleotideCodec4.getGappedOffsetFor(byteArray1, (-16908803));\n defaultNucleotideCodec0.getNumberOfGapsUntil(byteArray0, 1497825280);\n // Undeclared exception!\n try { \n DefaultNucleotideCodec.valueOf(\"\");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // No enum constant org.jcvi.jillion.core.residue.nt.DefaultNucleotideCodec.\n //\n verifyException(\"java.lang.Enum\", e);\n }\n }", "public static void main(String[] args) {\n\t\tString s=\"geeks\";\r\n\t\tString s1=\"egeks\";\r\n\t\tint m=s.length();\r\n\t\tint n=s1.length();\r\n\t\tfor(int i=0;i<m;i++)\r\n\t\t{\r\n\t\t\tfor(int j=0;j<n;j++)\r\n\t\t\t{\r\n\t\t\t\tif(s.charAt(i)!=s1.charAt(j))\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"no of index\"+i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "public static void main(String[] args){\n System.out.println(linuxRules(\"/c/d/////././../e/\"));\n// System.out.println(linuxRules(\"/c/d/////././../e/..\"));\n// System.out.println(linuxRules(\"/c/d/////././../ed/..\"));\n// System.out.println(linuxRules(\"/c/d/////././../ed/.\"));\n /* String[] strs = new String[]{\"flower\",\"ooow\",\"flight\",\"flosh\"};\n System.out.println(longestCommonPrefix(strs));*/\n /* System.out.println( findRealParentheses(\"()[]{}\"));\n System.out.println( findRealParentheses(\"))[]{}\"));\n System.out.println( findRealParentheses(\"()[]{(}\"));\n System.out.println( findRealParentheses(\"[()[]]{}\"));*/\n /*Integer[] firstList = new Integer[]{1, 5, 6};\n Integer[] secondList = new Integer[]{1, 3, 4, 6};\n int i = 0;\n Integer[] combileList = combine(firstList, secondList);\n while (i < combileList.length) {\n System.out.println(combileList[i]);\n i++;\n }*/\n /* Integer[] original = new Integer[]{0,0,1,1,1,2,2,3,3,4};\n System.out.println(deleteCommonItem(original));*/\n /* Integer[] original = new Integer[]{3,2,3,1,4,5,3,2,1};\n System.out.println(deleteAssignItem(original, 3));*/\n// System.out.println(indexOf(\"hello\", \"ll\"));\n// System.out.println(indexOf(\"aaaaa\", \"aab\"));\n\n /* System.out.println(longest(\"abcabcbb\"));\n System.out.println(longest(\"bbbbb\"));\n System.out.println(longest(\"pwwkew\"));*/\n\n /*System.out.println(longestPalindromeStr(\"babad\"));\n System.out.println(longestPalindromeStr(\"cyyoacmjwjubfkzrrbvquqkwhsxvmytmjvbborrtoiyotobzjmohpadfrvmxuagbdczsjuekjrmcwyaovpiogspbslcppxojgbfxhtsxmecgqjfuvahzpgprscjwwutwoiksegfreortttdotgxbfkisyakejihfjnrdngkwjxeituomuhmeiesctywhryqtjimwjadhhymydlsmcpycfdzrjhstxddvoqprrjufvihjcsoseltpyuaywgiocfodtylluuikkqkbrdxgjhrqiselmwnpdzdmpsvbfimnoulayqgdiavdgeiilayrafxlgxxtoqskmtixhbyjikfmsmxwribfzeffccczwdwukubopsoxliagenzwkbiveiajfirzvngverrbcwqmryvckvhpiioccmaqoxgmbwenyeyhzhliusupmrgmrcvwmdnniipvztmtklihobbekkgeopgwipihadswbqhzyxqsdgekazdtnamwzbitwfwezhhqznipalmomanbyezapgpxtjhudlcsfqondoiojkqadacnhcgwkhaxmttfebqelkjfigglxjfqegxpcawhpihrxydprdgavxjygfhgpcylpvsfcizkfbqzdnmxdgsjcekvrhesykldgptbeasktkasyuevtxrcrxmiylrlclocldmiwhuizhuaiophykxskufgjbmcmzpogpmyerzovzhqusxzrjcwgsdpcienkizutedcwrmowwolekockvyukyvmeidhjvbkoortjbemevrsquwnjoaikhbkycvvcscyamffbjyvkqkyeavtlkxyrrnsmqohyyqxzgtjdavgwpsgpjhqzttukynonbnnkuqfxgaatpilrrxhcqhfyyextrvqzktcrtrsbimuokxqtsbfkrgoiznhiysfhzspkpvrhtewthpbafmzgchqpgfsuiddjkhnwchpleibavgmuivfiorpteflholmnxdwewj\"));*/\n\n /* int[] rec1 = {7,8,13,15};\n int[] rec2 = {10,8,12,20};\n System.out.println(isRectangleOverlap(rec1, rec2));*/\n /* 输入: A = [1,2,3,0,0,0], m = 3; B = [2,5,6], n = 3\n 输出: [1,2,2,3,5,6]*/\n\n// System.out.println(validPalindrome(\"lcuppucul\") );\n// System.out.println(maxPower(\"t\") );\n// System.out.println(CheckPermutation(\"abc\", \"bca\") );\n// System.out.println(reverseOnlyLetters(\"Test1ng-Leet=code-Q!\") );\n// System.out.println(countSegments(\", , , , a, eaefa\") );\n\n// System.out.println(reverseWords(\"the sky is blue\") );\n }", "int stringsConstruction(String a, String b){\n a=\" \"+a+\" \";\n b=\" \"+b+\" \";\n int output = b.split(\"\"+a.charAt(1)).length - 1;\n for(char i = 'a'; i <= 'z'; i++) {\n if (a.split(\"\"+i).length > 1) {\n int tempOut = (b.split(\"\"+i).length - 1) / (a.split(\"\"+i).length - 1);\n if (output > tempOut) {\n output = tempOut;\n }//if (output > tempOut) {\n }//if (a.split(\"\"+i).length > 1) {\n }//for(char i = 'a'; i <= 'z'; i++) {\n return output;\n }", "public static List<Integer> lcs(List<Integer> arr1, List<Integer> arr2) {\r\n ArrayList empty = new ArrayList();\r\n /* BEFORE WE ALLOCATE ANY DATA STORAGE, VALIDATE ARGS */\r\n if (null == arr1 || 0 == arr1.size())\r\n return empty;\r\n if (null == arr2 || 0 == arr2.size())\r\n return empty;\r\n\r\n if (equalLists(arr1, arr2)) {\r\n return arr1;\r\n }\r\n\r\n /* ALLOCATE VARIABLES WE'LL NEED FOR THE ROUTINE */\r\n ArrayList<Integer> bestMatch = new ArrayList<Integer>();\r\n ArrayList<Integer> currentMatch = new ArrayList<Integer>();\r\n ArrayList<List<Integer>> dataSuffixList = new ArrayList<List<Integer>>();\r\n ArrayList<List<Integer>> lineSuffixList = new ArrayList<List<Integer>>();\r\n\r\n /* FIRST, COMPUTE SUFFIX ARRAYS */\r\n for (int i = 0; i < arr1.size(); i++) {\r\n dataSuffixList.add(arr1.subList(i, arr1.size()));\r\n }\r\n for (int i = 0; i < arr2.size(); i++) {\r\n lineSuffixList.add(arr2.subList(i, arr2.size()));\r\n }\r\n\r\n /* STANDARD SORT SUFFIX ARRAYS */\r\n IntegerListComparator comp = new IntegerListComparator();\r\n Collections.sort(dataSuffixList, comp);\r\n Collections.sort(lineSuffixList, comp);\r\n\r\n /* NOW COMPARE ARRAYS MEMBER BY MEMBER */\r\n List<?> d = null;\r\n List<?> l = null;\r\n List<?> shorterTemp = null;\r\n int stopLength = 0;\r\n int k = 0;\r\n boolean match = false;\r\n\r\n bestMatch.retainAll(empty);\r\n bestMatch.addAll(currentMatch);\r\n for (int i = 0; i < dataSuffixList.size(); i++) {\r\n d = (List) dataSuffixList.get(i);\r\n for (int j = 0; j < lineSuffixList.size(); j++) {\r\n l = (List) lineSuffixList.get(j);\r\n if (d.size() < l.size()) {\r\n shorterTemp = d;\r\n } else {\r\n shorterTemp = l;\r\n }\r\n\r\n currentMatch.retainAll(empty);\r\n k = 0;\r\n stopLength = shorterTemp.size();\r\n match = (l.get(k).equals(d.get(k)));\r\n while (k < stopLength && match) {\r\n if (l.get(k).equals(d.get(k))) {\r\n currentMatch.add((Integer) shorterTemp.get(k));\r\n k++;\r\n } else {\r\n match = false;\r\n }\r\n }\r\n if (currentMatch.size() > bestMatch.size()) {\r\n bestMatch.retainAll(empty);\r\n bestMatch.addAll(currentMatch);\r\n }\r\n }\r\n }\r\n return bestMatch;\r\n }", "static int makeAnagram(String a, String b) {\n \n \tchar arr[] = a.toCharArray();\n char brr[] = b.toCharArray();\n Arrays.sort(arr);\n Arrays.sort(brr);\n Map<Character, Integer> aMap = new HashMap<>();\n Map<Character, Integer> bMap = new HashMap<>();\n for(int i =0 ;i <arr.length;i++){\n \tif(!aMap.containsKey(arr[i])){\n \t\taMap.put(arr[i], 1);\n \t}else{\n \t\taMap.put(arr[i], aMap.get(arr[i])+1);\n \t}\n }\n for(int i =0 ;i <brr.length;i++){\n \tif(!bMap.containsKey(brr[i])){\n \t\tbMap.put(brr[i], 1);\n \t}else{\n \t\tbMap.put(brr[i], bMap.get(brr[i])+1);\n \t}\n }\n int removeCharCount = 0;\n \n for(char ch = 'a'; ch<='z';ch++){\n \tif(aMap.containsKey(ch) && bMap.containsKey(ch)){\n \t\tif(aMap.get(ch) > bMap.get(ch)){\n \t\t\tint count = aMap.get(ch) - bMap.get(ch);\n \t\t\tremoveCharCount+=count;\n \t\t\taMap.put(ch, aMap.get(ch) - count);\n \t\t}else if(aMap.get(ch) < bMap.get(ch)){\n \t\t\tint count = bMap.get(ch) - aMap.get(ch);\n \t\t\tremoveCharCount+=count;\n \t\t\taMap.put(ch, bMap.get(ch) - count);\n \t\t}\n \t}else if(aMap.containsKey(ch) && !bMap.containsKey(ch)){\n \t\tint count = aMap.get(ch);\n \t\tremoveCharCount+=count;\n \t\taMap.remove(ch);\n \t}else if(!aMap.containsKey(ch) && bMap.containsKey(ch)){\n \t\tint count = bMap.get(ch);\n \t\tremoveCharCount+=count;\n \t\tbMap.remove(ch);\n \t}\n }\n /* if(removeCharCount == Math.min(arr.length, brr.length)){\n \treturn 0;\n }*/\n return removeCharCount;\n }", "@Test\n public void testComputeJaccardSimilarity() {\n // Test case 1\n String text = \"abcdef\";\n Set<String> actualKShingles = KShingling.getKShingles(3, text);\n Set<String> expectedKShingles = new HashSet<String>();\n expectedKShingles.add(\"abc\");\n expectedKShingles.add(\"bcd\");\n expectedKShingles.add(\"cde\");\n expectedKShingles.add(\"def\");\n\n // Asserts that both sets have the same size.\n Assert.assertEquals(expectedKShingles.size(), actualKShingles.size());\n\n // Asserts that all elements of the expected set of shingles is included\n // in the actual sets of shingles.\n for (String kShingle : expectedKShingles) {\n Assert.assertTrue(actualKShingles.contains(kShingle));\n }\n\n // Test case 2\n text = \"ab\";\n actualKShingles = KShingling.getKShingles(3, text);\n expectedKShingles = new HashSet<String>(); // No shingles is fine\n\n // Asserts that both sets have the same size.\n Assert.assertEquals(expectedKShingles.size(), actualKShingles.size());\n\n // Asserts that all elements of the expected set of shingles is included\n // in the actual sets of shingles.\n for (String kShingle : expectedKShingles) {\n Assert.assertTrue(actualKShingles.contains(kShingle));\n }\n\n // Test case 3\n text = \"abc def ghi\";\n actualKShingles = KShingling.getKShingles(4, text);\n expectedKShingles = new HashSet<String>();\n expectedKShingles.add(\"abc \");\n expectedKShingles.add(\"bc d\");\n expectedKShingles.add(\"c de\");\n expectedKShingles.add(\" def\");\n expectedKShingles.add(\"def \");\n expectedKShingles.add(\"ef g\");\n expectedKShingles.add(\"f gh\");\n expectedKShingles.add(\" ghi\");\n\n // Asserts that both sets have the same size.\n Assert.assertEquals(expectedKShingles.size(), actualKShingles.size());\n\n // Asserts that all elements of the expected set of shingles is included\n // in the actual sets of shingles.\n for (String kShingle : expectedKShingles) {\n Assert.assertTrue(actualKShingles.contains(kShingle));\n }\n }", "@Test(timeout = 4000)\n public void test18() throws Throwable {\n DefaultNucleotideCodec defaultNucleotideCodec0 = DefaultNucleotideCodec.INSTANCE;\n byte[] byteArray0 = new byte[9];\n defaultNucleotideCodec0.toString(byteArray0);\n defaultNucleotideCodec0.decodedLengthOf(byteArray0);\n defaultNucleotideCodec0.decodedLengthOf(byteArray0);\n defaultNucleotideCodec0.getUngappedLength(byteArray0);\n Nucleotide nucleotide0 = Nucleotide.Gap;\n Set<Nucleotide> set0 = nucleotide0.getBasesFor();\n byte[] byteArray1 = defaultNucleotideCodec0.encode((Collection<Nucleotide>) set0);\n DefaultNucleotideCodec defaultNucleotideCodec1 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec1.decode(byteArray0, 0);\n DefaultNucleotideCodec defaultNucleotideCodec2 = DefaultNucleotideCodec.INSTANCE;\n byte[] byteArray2 = defaultNucleotideCodec2.encode((Collection<Nucleotide>) set0);\n DefaultNucleotideCodec defaultNucleotideCodec3 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec3.toString(byteArray1);\n DefaultNucleotideCodec defaultNucleotideCodec4 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec4.isGap(byteArray0, 1553);\n defaultNucleotideCodec0.getNumberOfGapsUntil(byteArray2, (-3166));\n DefaultNucleotideCodec defaultNucleotideCodec5 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec5.isGap(byteArray0, 75);\n DefaultNucleotideCodec defaultNucleotideCodec6 = DefaultNucleotideCodec.INSTANCE;\n byte[] byteArray3 = new byte[0];\n // Undeclared exception!\n try { \n defaultNucleotideCodec6.isGap(byteArray3, (-1));\n fail(\"Expecting exception: BufferUnderflowException\");\n \n } catch(BufferUnderflowException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"java.nio.Buffer\", e);\n }\n }", "static int makeAnagram(String a, String b) {\r\n int[] charCount = new int[26];\r\n int deletions = 0;\r\n\r\n for(char c : a.toCharArray()) {\r\n charCount[c-'a'] += 1;\r\n }\r\n for(char c : b.toCharArray()) {\r\n charCount[c-'a'] -= 1;\r\n }\r\n for(int count : charCount) {\r\n deletions += Math.abs(count);\r\n }\r\n return deletions;\r\n }", "@Test\n public void testEditDistEqualStrings() throws Exception{\n assertEquals(0,Esercizio2.edit_distance_dyn(s1,s4));\n }", "private boolean comparacionOblicuaDI (String [] dna){\n int largo=3, repaso=1, aux=0, contador=0, fila, columna;\n boolean repetir;\n char caracter;\n do {\n do {\n repetir=true;\n if(repaso==1){\n fila=0;\n columna=largo + aux;\n }else{\n fila=dna.length-1-largo-aux;\n columna=dna.length-1;\n }\n\n caracter = dna[fila].charAt(columna);\n\n for (int i = 1; i <= (largo+aux); i++) {\n int colum=columna-i;\n int fil=fila+i;\n if((colum==dna.length-2 && fil==1) && repaso==1){\n repetir=false;\n break;\n }\n if (caracter != dna[fil].charAt(colum)) {\n contador = 0;\n\n if(((dna.length-largo)>(colum) && repaso==1) || ((dna.length-largo)<=(fil) && repaso!=1)){\n if((fil+colum)==dna.length-1){\n repetir=false;\n }\n break;\n }\n caracter = dna[fil].charAt(colum);\n\n } else {\n contador++;\n }\n if (contador == largo) {\n cantidadSec++;\n if(cantidadSec>1){\n return true;\n }\n if((fil+colum)==dna.length-1){\n repetir=false;\n }\n break;\n }\n }\n aux++;\n } while (repetir);\n repaso--;\n aux=0;\n\n }while(repaso>=0);\n return false;\n }", "@Test\n\tpublic void testEquivalentSequences(){\n\t\tchord = new Chord(1, Tonality.maj, 4);\n\t\tChord chord2 = new Chord(1, Tonality.maj, 4);\n\t\tassertTrue(chord.equals(chord2));\n\t\tassertTrue(chord2.equals(chord));\n\n\t\tLinkedList<Chord> sequence = new LinkedList<Chord>();\n\t\tLinkedList<Chord> sequence2 = new LinkedList<Chord>();\n\n\t\tsequence.add(chord);\n\t\tsequence.add(chord2);\n\t\tsequence2.add(chord);\n\t\tsequence2.add(chord2);\n\t\tassertEquals(sequence, sequence2);\n\n\t\tsequence2.clear();\n\t\tsequence2.addAll(sequence);\n\t\tassertEquals(sequence, sequence2);\n\t}", "public static void main(String[] args) {\n\t\tString string1 = \"acbdfbdfacb\";\n\t\tint length = string1.length();\n\t\tString[] sub = new String[length*(length+1)/2];\n\t\tint temp = 0;\n\t\tfor(int i =0;i<length;i++) {\n\t\t\tfor(int j = i;j<length;j++) {\n\t\t\t\tString parts = string1.substring(i,j+1);\n\t\t\t\tsub[temp] = parts;\n\t\t\t\ttemp++;\n\t\t\t}\n\t\t}\n\t\tfor(int j =0;j<sub.length;j++) {\n\t\t\tSystem.out.println(sub[j]);\n\t\t}\n\t\tArrayList<String> rep = new ArrayList<String>();\n\t\tfor(int i=0;i<sub.length;i++) {\n\t\t\tfor(int j =i+1;j<sub.length;j++) {\n\t\t\t\tif(sub[i].equals(sub[j])) {\n\t\t\t\t\trep.add(sub[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tint largestString = 0;\n\t\tSystem.out.println(rep);\n\t\tfor(int k =0;k<rep.size();k++) {\n\t\t\tif(rep.get(k).length()>largestString) {\n\t\t\t\tlargestString = rep.get(k).length();\n\t\t\t}\t\t\n\t\t}\n\t\tfor(int k =0;k<rep.size();k++) {\n\t\tif(rep.get(k).length()==largestString) {\n\t\t\tSystem.out.println(\"the longest repeating sequence in a string : \"+rep.get(k));\n\t\t}\n\t\t}\n\t}", "public void test1() {\n SAP sap = getSapFromFile(\".\\\\W6.WordNet\\\\WordNetTests\\\\TestData\\\\digraph1.txt\");\n assertEquals(\"\", 0, sap.length(3, 3));\n assertEquals(\"\", 3, sap.ancestor(3, 3));\n assertEquals(\"\", 1, sap.ancestor(11, 7));\n assertEquals(\"\", 5, sap.length(11, 7));\n \n Iterable<Integer> a1 = Arrays.asList(new Integer[]{2, 5});\n Iterable<Integer> a2 = Arrays.asList(new Integer[]{7, 7});\n assertEquals(\"\", 1, sap.ancestor(a1,a2));\n assertEquals(\"\", 3, sap.length(a1,a2));\n }", "public boolean isIsomorphic(String str1, String str2) {\r\n if(str1.length() != str2.length()) return false;\r\n \r\n int[] arr1 = new int[256];\r\n int[] arr2 = new int[256];\r\n \r\n Arrays.fill(arr1, -1);\r\n Arrays.fill(arr2, -1);\r\n \r\n for(int i=0;i<str1.length();i++){\r\n int value1 = str1.charAt(i);\r\n int value2 = str2.charAt(i);\r\n if(arr1[value1]== -1){\r\n arr1[value1] = value2;\r\n } else {\r\n if(arr1[value1] != value2) return false;\r\n }\r\n \r\n if(arr2[value2]== -1){\r\n arr2[value2] = value1;\r\n } else {\r\n if(arr2[value2] != value1) return false;\r\n }\r\n \r\n }\r\n return true;\r\n \r\n}", "@Test\n public void rnatest2(){\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(b);\n char[] firstArr = new char[4];\n char[] answer = {'T','S', 'V', 'F'};\n for(int i = 0; i < firstArr.length; i++){\n firstArr[i] = first.aminoAcid;\n System.out.println(first.aminoAcid);\n first = first.next;\n }\n assertArrayEquals(answer,firstArr);\n }", "@Test\r\n public void test5() {\r\n String[] words = new String[] {\r\n \"A\", \"B\", \"C\", \"D\", \"E\", \"F\", \"F\", \"B\", \"H\", \"I\", \"J\", \"K\"\r\n };\r\n \r\n Assert.assertEquals(shortestDistanceBetween(words, \"B\", \"F\"), 1);\r\n Assert.assertEquals(shortestDistanceBetween(words, \"A\", \"E\"), 4);\r\n Assert.assertEquals(shortestDistanceBetween(words, \"I\", \"A\"), 9);\r\n }", "static int countCommon(Node a, Node b) {\n\t\tint count = 0;\n\n\t\t// loop to count coomon in the list starting\n\t\t// from node a and b\n\t\tfor (; a != null && b != null; a = a.next, b = b.next)\n\n\t\t\t// increment the count for same values\n\t\t\tif (a.data == b.data)\n\t\t\t\t++count;\n\t\t\telse\n\t\t\t\tbreak;\n\n\t\treturn count;\n\t}", "public double exactJaccard(String file1, String file2) \r\n\t{\r\n\t\tHashSet<Integer> termsInFile1 = new HashSet<Integer>();\r\n\t\tHashSet<Integer> termsInFile2 = new HashSet<Integer>();\r\n\t\tfor (int term : fileTermsIntegerMapping.get(file1))\r\n\t\t{\r\n\t\t\ttermsInFile1.add((Integer) term);\r\n\t\t}\r\n\t\tfor (int term : fileTermsIntegerMapping.get(file2)) \r\n\t\t{\r\n\t\t\ttermsInFile2.add((Integer) term);\r\n\t\t}\r\n\t\tdouble unionSize = termsInFile1.size() + termsInFile2.size();\r\n\t\ttermsInFile1.retainAll(termsInFile2);\r\n\t\treturn termsInFile1.size() / (unionSize - termsInFile1.size());\r\n\t}", "private boolean comparacionOblicuaID(String[] dna) {\n boolean repetir;\n int aux = 0;\n final int CASO = 3;\n int largo = dna.length - CASO - 1;\n int repaso = 1, fila,columna;\n do {\n do {\n repetir = true;\n if (repaso == 1) {\n fila = 0;\n columna = largo - aux;\n } else {\n fila = largo - aux;\n columna = 0;\n }\n for (int i = 0; i <= (CASO + aux); i += 2) {\n int colum = columna + i;\n int fil = fila + i;\n if ((colum) == (fil) && repaso == 1) {\n repetir = false; break;\n }\n if (((dna.length-CASO)>=colum && repaso==1) || ((dna.length-CASO)>=fil && repaso==0)) {\n if (dna[fil].charAt(colum) == dna[fil + 2].charAt(colum + 2)) {\n if (dna[fil].charAt(colum) == dna[fil + 1].charAt(colum + 1)) {\n if (((fil - 1) >= 0 && (colum - 1) >= 0) && (dna[fil].charAt(colum) == dna[fil - 1].charAt(colum - 1))) {\n cantidadSec++;\n if(cantidadSec>1)return true;\n if (colum == fil) repetir = false;\n break;\n } else {\n if (((dna.length - CASO+1) >= (colum + 3) && repaso == 1) || ((dna.length-1) >= (fil + 3) && repaso == 0)) {\n if ((dna[fil].charAt(colum) == dna[fil + 3].charAt(colum + 3))) {\n cantidadSec++;\n if(cantidadSec>1)return true;\n if (colum == fil) repetir = false;\n break;\n }\n }\n }\n }\n }\n } else {\n if (colum == fil) repetir = false;\n }\n }\n aux++;\n } while (repetir);\n repaso--;\n aux = 0;\n } while (repaso >= 0);\n return false;\n }", "public static void main(String args[]) {\n IsIdenticalLists llist1 = new IsIdenticalLists();\n IsIdenticalLists llist2 = new IsIdenticalLists();\n\n /* The constructed linked lists are :\n llist1: 3->2->1\n llist2: 3->2->1 */\n\n llist1.push(1);\n llist1.push(2);\n llist1.push(3);\n\n llist2.push(1);\n llist2.push(2);\n llist2.push(3);\n\n if (llist1.areIdentical(llist2) == true)\n System.out.println(\"Identical \");\n else\n System.out.println(\"Not identical \");\n\n }", "public static void compare () {\r\n for (int i = 0; i < dim; i++) {\r\n for (int j = 0; j < dim; j++) {\r\n if (d[i][j] != adjacencyMatrix[i][j])// here \r\n {\r\n System.out.println(\"Comparison failed\");\r\n \r\n return;\r\n }\r\n }\r\n }\r\n System.out.println(\"Comparison succeeded\");\r\n }", "public static void main(String[] args) {\n\r\n\t\tString s1=\"abcd\";\r\n\t\tString s2=\"vbvabcdqwe\";\r\n\t\tchar arr1[]=s1.toCharArray();\r\n\t\tchar arr2[]=s2.toCharArray();\r\n\r\n\t\tint flag=0;\r\n\t\tfor(int i=0;i<arr1.length;i++)\r\n\t\t{\r\n\t\t\tfor(int j=i;j<arr2.length;j++)\r\n\t\t\t{\r\n\t\t\t\tif(arr1[i]==arr2[j])\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t}\t\r\n\t\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\n\tString a = \"aabbbc\", b= \"cabbbac\";\n\t// a = abc, b=cab\n\t//we will remove all dublicated values from \"a\"\n\tString a1 = \"\"; //store all the non duplicated values from \"a\"\n\t\n\tfor (int j=0; j<a.length();j++) //this method is with nested loop\n\tfor (int i=0; i<a.length();i++) {\n\t\tif (!a1.contains(a.substring(j, j+1))) {\n\t\t\ta1 += a.substring(j, j+1);\n\t\t}\n\t\t\t\n\t}\n\tSystem.out.println(a1);\n\t//we will remove all duplicated values from \"b\"\n\tString b1 = \"\"; //store all the non duplicated values from \"b\"\n\tfor(int i=0; i<b.length();i++) { //this is with simple loop\n\t\tif(!b1.contains(b.substring(i, i+1))) {\n\t\t\t // \"\"+b.charAt(i)\n\t\t\tb1 += b.substring(i, i+1);\n\t\t\t// \"\"+b.charAt(i);\n\t\t}\n\t}\n\tSystem.out.println(b1);\n\t\n\t\n\t//a1 = \"acb\", b1 = \"cab\"\n\tchar[] ch1 = a1.toCharArray();\n\tSystem.out.println(Arrays.toString(ch1));\n\t\n\tchar[] ch2 = b1.toCharArray();\n\tSystem.out.println(Arrays.toString(ch2));\n\t\n\tArrays.sort(ch1);\n\tArrays.sort(ch2);\n\t\n\tSystem.out.println(\"========================\");\n\tSystem.out.println(Arrays.toString(ch1));\n\tSystem.out.println(Arrays.toString(ch2));\n\t\n\t\n\tString str1 = Arrays.toString(ch1);\n\tString str2 = Arrays.toString(ch2);\n\t\n\tif(str1.equals(str2)) {\n\t\tSystem.out.println(\"true, they are same letters\");\n\t}else {\n\t\tSystem.out.println(\"false, they are contain different letters\");\n\t}\n\t\n\t\n\t// solution 2:\n\t\t\t String Str1 = \"cccccaaaabbbbccc\" , Str2 = \"cccaaabbb\";\n\t\t\t \n\t\t\t Str1 = new TreeSet<String>( Arrays.asList( Str1.split(\"\"))).toString();\n\t\t\t Str2 = new TreeSet<String>( Arrays.asList( Str2.split(\"\"))).toString();\n\t\t\t \n\t\t\t System.out.println(Str1.equals(Str2));\n\t\t\t\t \n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n}", "public static void main(String[] args){\n System.out.println(\"Test 1: Lengths of numbers are equal\");\n int[] number1 = new int[]{2, 4, 3};\n int[] number2 = new int[]{5, 6, 4};\n // Create lists from digit arrays\n ListNode listNumber1 = createListFromDigitArray(number1);\n ListNode listNumber2 = createListFromDigitArray(number2);\n // Print contents of both lists\n printDigitListContents(listNumber1);\n printDigitListContents(listNumber2);\n // Add the lists\n ListNode listSum = addTwoNumbers(listNumber1, listNumber2);\n printDigitListContents(listSum);\n\n // Test 2: Lengths of numbers are unequal\n // (1->2->4->3) + (5->6->4) = (6->8->8->3) ... => 3421 + 465 = 3886\n System.out.println(\"Test 2: Lengths of numbers are unequal\");\n int[] number3 = new int[]{1, 2, 4, 3};\n int[] number4 = new int[]{5, 6, 4};\n // Create lists from digit arrays\n ListNode listNumber3 = createListFromDigitArray(number3);\n ListNode listNumber4 = createListFromDigitArray(number4);\n // Print contents of both lists\n printDigitListContents(listNumber3);\n printDigitListContents(listNumber4);\n // Add the lists\n ListNode listSum2 = addTwoNumbers(listNumber3, listNumber4);\n printDigitListContents(listSum2);\n }", "@Test\n public void testWithGraph() throws Exception {\n FlinkAsciiGraphLoader loader = getLoaderFromString(\"input[\" +\n \"(va1:a {key: 1L})-[:e {att: 1L}]->(vb1:a {key: 1.0d})-[:e {att: 2L}]->(va2:a {key: 1L})\" +\n \"(vc1:a {key: 1L, key2: \\\"a\\\"})-[:e {att: 3L}]->(va1)-[:e {att: 4L}]->(b1:b {key: 1L})\" +\n \"(vc2:a {key: 1L, key2: \\\"a\\\"})\" +\n \"(vb2:a {key: 1.0d})-[:e {att: 5L}]->(vb3:a {key: 1.0d})(vd1:a {key: 1L, key2: \\\"b\\\"})\" +\n \"]\" +\n \"expected [\" +\n \"(da:a {key: 1L})-[:e {att: 1L}]->(db:a {key: 1.0d})-[:e {att: 2L}]->(da)\" +\n \"(dc:a {key: 1L, key2: \\\"a\\\"})-[:e {att: 3L}]->(da)-[:e {att: 4L}]->(b:b {key: 1L})\" +\n \"(db)-[:e {att: 5L}]->(db)(dd:a {key: 1L, key2: \\\"b\\\"})\" +\n \"]\");\n LogicalGraph result = loader.getLogicalGraphByVariable(\"input\")\n .callForGraph(new VertexDeduplication<>(\"a\", Arrays.asList(\"key\", \"key2\")));\n collectAndAssertTrue(result.equalsByData(loader.getLogicalGraphByVariable(\"expected\")));\n }", "static int makeAnagram1(String a, String b) {\n int count = 0;\n Map<Character, Integer> mapA = initMap(a);\n Map<Character, Integer> mapB = initMap(b);\n\n Iterator<Character> it = mapA.keySet().iterator();\n while (it.hasNext()) {\n char c = it.next();\n int frequencyA = mapA.get(c);\n if (mapB.containsKey(c)) {\n int frequencyB = mapB.get(c);\n count += Math.abs(frequencyA - frequencyB);\n int min = Math.min(frequencyA, frequencyB);\n mapA.put(c, min);\n mapB.put(c, min);\n } else {\n count += frequencyA;\n }\n }\n\n it = mapB.keySet().iterator();\n while (it.hasNext()) {\n char c = it.next();\n int frequencyB = mapB.get(c);\n if (mapA.containsKey(c)) {\n int frequencyA = mapA.get(c);\n count += Math.abs(frequencyA - frequencyB);\n int min = Math.min(frequencyA, frequencyB);\n mapA.put(c, min);\n mapB.put(c, min);\n } else {\n count += frequencyB;\n }\n }\n return count;\n }", "@Test\n\tpublic void testDifference5() {\n\n\t\t// parameters inpt here\n\n\t\tint[] arr = { 1, 2, 3, 5, 7, 8, 9 };\n\t\tint[] diff1 = { 1, 2, 3, 7, 8 }; // this list\n\n\t\t// test difference\n\t\tSLLSet listObj2 = new SLLSet(arr);\n\t\tSLLSet listObj19 = new SLLSet(diff1);\n\t\tSLLSet listObj20 = listObj2.difference(listObj19);\n\n\t\tString expected = \"5, 9\";\n\t\tint expectedSize = 2;\n\n\t\tassertEquals(expectedSize, listObj20.getSize());\n\t\tassertEquals(expected, listObj20.toString());\n\n\t}", "public static void main(String[] args) {\n\t\tint a[] = { 9, 3, 6, 4, 7, 2, 1 }; // size=7\n\t\tint b[] = { 14, 3, 2, 6, 9, 7 }; //size =6\n\t\tint c[] = {24,23,12,13,7,6,7,2}; // size=8\n\t\tint d[] = new int[a.length + b.length+c.length];\n\t\t\n\t\t\n\t\t\n\t//merging\n\t\t\n\t\t\n\t\t\n\t\tfor (int i = 0; i < a.length; i++) \n\t{ \n\t\t\td[i] = a[i];\n\n\t}\n\t\tint k = 0;\n\t\tfor (int j = a.length; j < a.length+b.length; j++) \n\t{\n\t\t\td[j] = b[k];\n\t\t\tk = k + 1;\n\n\t}\n int m=0;\n\t\tfor (int l = a.length+b.length; l < d.length; l++)\n\t{\n\t\t d[l]=c[m];\t\n\t\t m=m+1;\n\n\t}\n\t\t//merging print statement\n\t\tfor (int i =0;i < d.length; i++)\n\t\t{\n\t\t\t /// System.out.print(d[i]+\" \");\n\t\t}\n\t\t\n\t\t \n\t\t//duplicate checking\n\t\tfor (int i =0;i < d.length; i++)\n\t\t\t\n\t\t{\n\t\t\tfor (int j =i+1;j < d.length; j++)\t\n\t\t\t{\n\t\t\t\tif(d[i]==d[j])\n\t\t\t\t{\n\t\t\t\t\td[j]=0;\n\t\t\t\t}\n\t\t\t\tif (d[i] > d[j])\n\n\t\t\t\t{ // sorting swap logic\n\t\t\t\t\t//int temp; \n\t\t\t\t\t//temp = d[i]; \n\t\t\t\t//\td[i] = d[j]; \n\t\t\t\t//\td[j] = temp;\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\td[i] = d[i] + d[j];\n\t\t\t\t\td[j] = d[i] - d[j];\n\t\t\t\t\td[i] = d[i] - d[j];\n\n\t\t\t\t}\n\t\t\t\t\n\t\t}\n\t\t\t\n\t\t\n\t} //removing the finding duplicates\n\t\tfor (int h =0;h < d.length; h++)\n\t\t{\n\t\t\tif(d[h]!=0)\n\t\t\t{\n\t\t\t\tSystem.out.print(d[h]+\" \");\n\t\t\t}\n\t\t}\n\n}", "void compareDataStructures();", "public static double jaccard (Set<String> values1, Set<String> values2) {\t\n\t\t\n\t\tfinal int termsInString1 = values1.size();\t\t\n\t\tfinal int termsInString2 = values2.size();\n\t\t\t\t\n\t\t//now combine the sets\n\t\tvalues1.addAll(values2);\n\t\tfinal int commonTerms = (termsInString1 + termsInString2) - values1.size();\n\t\t\n\t\t//return JaccardSimilarity\n\t\treturn (double) (commonTerms) / (double) (values1.size());\n\t}", "private static boolean equalityTest4(String a, String b)\n {\n if(a.length() == 0 && b.length() == 0)\n {\n return true;\n }\n else\n {\n if(a.length() == 0 || b.length() == 0)\n {\n return false;\n }\n if(a.charAt(0) == b.charAt(0))\n {\n return equalityTest4(a.substring(1), b.substring(1));\n }\n else\n {\n return false;\n }\n }\n }", "static int makeAnagram(String a, String b) {\n int[] frequencyA = countFrequency(a);\n int[] frequencyB = countFrequency(b);\n\n int count = 0;\n\n for (int i = 0; i < frequencyA.length; i++) {\n count += Math.abs(frequencyA[i] - frequencyB[i]);\n }\n return count;\n }", "static int makingAnagrams(String s1, String s2){\n // Complete this function\n StringBuilder b = new StringBuilder(s2);\n int delCount =0;\n for(int i=0;i<s1.length();i++){\n int index = b.indexOf(String.valueOf(s1.charAt(i)));\n if(index == -1){\n delCount++;\n }else{\n b.deleteCharAt(index);\n } \n }\n return delCount + b.length();\n }", "private void assertEqual(long count, long size) {\n\t\t\n\t}", "public int commonPrefixLength(String s1, String s2)\r\n {\r\n\r\n int length = 0;\r\n if (s1.isEmpty() || s2.isEmpty())\r\n {\r\n return 0;\r\n }\r\n while (s1.charAt(length) == s2.charAt(length))\r\n {\r\n length++;\r\n //if (k >= s1.length() || k >= s2.length() || k >= system.getLookupTableSize() - 1)\r\n if (length >= s1.length() || length >= s2.length())\r\n {\r\n break;\r\n }\r\n }\r\n\r\n return length;\r\n\r\n }", "@Test \r\n void add_mutiple_edges_check_size(){\r\n for(int i = 0; i < 20; i++) {\r\n graph.addEdge(\"\" + i, \"\" + (i + 1));\r\n } \r\n List<String> adjacent;\r\n for(int i = 0; i < 20; i++) {\r\n adjacent = graph.getAdjacentVerticesOf(\"\"+i);\r\n if(!adjacent.contains(\"\" + (i+1))) {\r\n fail();\r\n }\r\n }\r\n if(graph.size() != 20 | graph.order() != 21) {\r\n fail();\r\n }\r\n \r\n }", "@Test\n public void testFindLargestCommonTermID() {\n Vector v1 = new Vector();\n v1.set(1, new VectorComponentArrayWritable(new VectorComponent[] { new VectorComponent(3, 0),\n new VectorComponent(1, 0) }));\n Vector v2 = new Vector();\n v2.set(2, new VectorComponentArrayWritable(new VectorComponent[] { new VectorComponent(4, 0),\n new VectorComponent(2, 0) }));\n assertEquals(-1, Vector.findSmallestCommonTermID(v1, v2));\n v2.set(2, new VectorComponentArrayWritable(new VectorComponent[] { new VectorComponent(3, 0),\n new VectorComponent(2, 0) }));\n assertEquals(3, Vector.findSmallestCommonTermID(v1, v2));\n v2.set(2, new VectorComponentArrayWritable(new VectorComponent[] { new VectorComponent(5, 0),\n new VectorComponent(1, 0) }));\n assertEquals(1, Vector.findSmallestCommonTermID(v1, v2));\n v2.set(2, new VectorComponentArrayWritable(new VectorComponent[] { new VectorComponent(5, 0),\n new VectorComponent(4, 0), new VectorComponent(1, 0) }));\n assertEquals(1, Vector.findSmallestCommonTermID(v1, v2));\n\n v1.set(1, new VectorComponentArrayWritable(new VectorComponent[] { new VectorComponent(5, 0),\n new VectorComponent(3, 0), new VectorComponent(2, 0), new VectorComponent(1, 0) }));\n v2.set(2, new VectorComponentArrayWritable(new VectorComponent[] { new VectorComponent(6, 0),\n new VectorComponent(4, 0), new VectorComponent(3, 0), new VectorComponent(1, 0) }));\n assertEquals(1, Vector.findSmallestCommonTermID(v1, v2));\n v2.set(2, new VectorComponentArrayWritable(new VectorComponent[] { new VectorComponent(6, 0),\n new VectorComponent(4, 0), new VectorComponent(2, 0)}));\n assertEquals(2, Vector.findSmallestCommonTermID(v1, v2));\n }", "@Test\n public void testEditDistDifferentStrings() throws Exception{\n assertEquals(1,Esercizio2.edit_distance_dyn(s1, s2));\n }", "private static void assertEqual(List<byte[]> actual, List<byte[]> expected) {\n if (actual.size() != expected.size()) {\n throw new AssertionError(String.format(\"Different amount of chunks, expected %d actual %d\", expected.size(), actual.size()));\n }\n for (int i = 0; i < actual.size(); i++) {\n byte[] act = actual.get(i);\n byte[] exp = expected.get(i);\n if (act.length != exp.length) {\n throw new AssertionError(String.format(\"Chunks #%d differed in length, expected %d actual %d\", i, exp.length, act.length));\n }\n for (int j = 0; j < act.length; j++) {\n if (act[j] != exp[j]) {\n throw new AssertionError(String.format(\"Chunks #%d differed at index %d, expected %d actual %d\", i, j, exp[j], act[j]));\n }\n }\n }\n }", "private void longestCommonSubsequence(String str1, String str2) {\n\tdp\t= new int[str1.length()+1][str2.length()+1];\t\r\n\tString lcs = \"\";\r\n\tint i=0,j=0;\r\n\tfor(i=0;i<str1.length();i++){\r\n\t\tfor(j=0;j<str2.length();j++){\r\n\t\t\r\n\t\t\tif(str1.charAt(i)==str2.charAt(j)){\r\n\t\t\t\tdp[i+1][j+1] = dp[i][j] + 1; \r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tdp[i+1][j+1] =\r\n Math.max(dp[i+1][j], dp[i][j+1]);\r\n\t\t\t}\r\n\t\t}\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}\r\n\t\tSystem.out.println(dp[dp.length-1][dp[0].length-1]);\r\n\t\t\r\n\t}", "private int compareInternal(String shorter, String longer) {\n int lengthDiff = longer.length() - shorter.length();\n\n for (int compareStartIndexInsideLonger = 0; compareStartIndexInsideLonger <= lengthDiff; compareStartIndexInsideLonger++) {\n String compariosonPartFromLonger = longer.substring(compareStartIndexInsideLonger, compareStartIndexInsideLonger + shorter.length());\n //we have found an answer if they are not equal\n int result = shorter.compareTo(compariosonPartFromLonger);\n if (result != 0) {\n return result;\n }\n }\n\n //the are equal\n return 0;\n }", "static int size_of_adc(String passed){\n\t\treturn 1;\n\t}", "static int makeAnagram(String a, String b) {\n List<String> arr = new ArrayList<>(Arrays.asList(a.split(\"(?<!^)\")));\n List<String> arr2 = new ArrayList<>(Arrays.asList(b.split(\"(?<!^)\")));\n Iterator<String> iter = arr.iterator();\n \n while (iter.hasNext()) {\n String s = iter.next();\n\n if (arr2.contains(s)) {\n arr2.remove(arr2.indexOf(s));\n iter.remove();\n }\n }\n\n return (arr.size()) + (arr2.size());\n }", "void calculateDistance()\t{\n\t\t\t\t\t\t\t\t\t\n\t\tfor (String substringOne : setOne)\t{\n\t\t\t\tif (setTwo.contains(substringOne))\n\t\t\t\t\toverlapSubstringCount++;\n\t\t}\t\t\t\t\t\t\t\n\n\t\tsubstringCount = (length1 - q) + (length2 - q) + 2 - overlapSubstringCount; \n\t\tdistance = (double)overlapSubstringCount/(substringCount - overlapSubstringCount);\t\n\t}", "public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n int N = Integer.parseInt(in.nextLine());\n HashSet<Character> first = new HashSet<Character>();\n HashSet<Character> second = new HashSet<Character>();\n int i=0;\n char temp = 'a';\n for(temp='a';temp<='z';temp++){\n \t first.add(temp);\n }\n int j;\n while(i<N){\n \t second.clear();\n \t char[] stringArray = in.nextLine().toCharArray();\n \t for(j=0;j<stringArray.length;j++){\n \t\t second.add(stringArray[j]); \n \t }\n \t first.retainAll(second);\n \t i++;\n }\n System.out.println(first.size());\n }", "@Test\n public void subSequencesTest1() {\n String text = \"crypt\"\n + \"ograp\"\n + \"hyand\"\n + \"crypt\"\n + \"analy\"\n + \"sis\";\n\n String[] expected = new String[5];\n expected[0] = \"cohcas\";\n expected[1] = \"rgyrni\";\n expected[2] = \"yrayas\";\n expected[3] = \"panpl\";\n expected[4] = \"tpdty\";\n String[] owns = this.ic.subSequences(text, 5);\n for (int i = 0; i < expected.length; i++) {\n assertEquals(expected[i], owns[i]);\n }\n }", "public static void main(String[] args) {\n\n\t\t\n\t\tList<Character>st1=new ArrayList<>();\n\t\n\t\tst1.add('a');\n\t\tst1.add('b');\n\t\tst1.add('a');\n\t\tst1.add('a');\n\t\tst1.add('c');\n\t\tst1.add('t');\n\t\n\t\tSystem.out.println(st1);//[a, b, a, a, c, t]\n\t\t\n\t\tList<Character>st2=new ArrayList<>();//empty []\n\t\tfor (int i=0; i<st1.size();i++) {\n\t\t\tif(!st2.contains(st1.get(i))) {\n\t\t\t\t// created str2 [empty], we will get the element from st1 to st2 while checking if there is repetition \n\t\t\t\tst2.add(st1.get(i));\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(st2);//[a, b, c, t]\n\t\t\n\n\t}", "private static boolean checkPermutationCountingArray(String s1, String s2) {\n // Strings are of unequal length. Cannot be permutations.\n if (s1.length() != s2.length()) {\n return false;\n }\n\n int[] characterCount = new int[128];\n for (int i = 0; i < s1.length(); i++) {\n characterCount[s1.charAt(i)]++;\n characterCount[s2.charAt(i)]--;\n }\n for (int i = 0; i < characterCount.length; i++) {\n if (characterCount[i] != 0) return false;\n }\n return true;\n }", "public static int matchingPairs(String s, String t) {\n if(s.length() != t.length()) return 0;\r\n StringBuilder sb1 = new StringBuilder();\r\n StringBuilder sb2 = new StringBuilder();\r\n int res = 0;\r\n boolean hasDuplicates = false; //Edge Case where if it has Dups then you can just to inner swap and you will get same result\r\n Set<Character> dupsCheckSet = new HashSet<>();\r\n\r\n for(int idx = 0; idx < s.length(); idx++){\r\n if(s.charAt(idx) != t.charAt(idx)){\r\n sb1.append(s.charAt(idx));\r\n sb2.append(t.charAt(idx));\r\n }else {\r\n if(!dupsCheckSet.add(s.charAt(idx))){\r\n hasDuplicates = true;\r\n }\r\n res++;\r\n }\r\n }\r\n\r\n //if both string are same then you don't have to calculate\r\n if(sb1.length() == 0){\r\n if(hasDuplicates){\r\n return res;\r\n }\r\n return res - 2;\r\n }\r\n\r\n Map<Character, Integer> mapS = new HashMap<>(), mapT = new HashMap<>();\r\n for (int idx = 0; idx < sb1.length(); idx++){ //\"bd\",\"db\";\r\n //if mapS contains chars from sb2 then if we swap them with each other it will be a matching pair\r\n if(mapS.containsKey(sb2.charAt(idx))){\r\n res++;\r\n }\r\n //if both Chars are reverse of each other then we can switch and add 1 to it\r\n if(mapS.getOrDefault(sb2.charAt(idx), -1) == mapT.getOrDefault(sb1.charAt(idx), -2)){\r\n return res + 1;\r\n }\r\n mapS.put(sb1.charAt(idx), idx);\r\n mapT.put(sb2.charAt(idx), idx);\r\n }\r\n\r\n\r\n return res + ((sb1.length() == 1) ? -1 : 0);\r\n }", "@Test\n public void identicalLinearGraphsTest() throws Exception {\n // Create two a->b->c->d graphs\n String events[] = new String[] { \"a\", \"b\", \"c\", \"d\" };\n EventNode[] g1Nodes = getChainTraceGraphNodesInOrder(events);\n EventNode[] g2Nodes = getChainTraceGraphNodesInOrder(events);\n\n // Check that g1 and g2 are equivalent for all k at every corresponding\n // node, regardless of subsumption.\n\n // NOTE: both graphs have an additional INITIAL and TERMINAL nodes, thus\n // the +2 in the loop condition.\n EventNode e1, e2;\n for (int i = 0; i < (events.length + 2); i++) {\n e1 = g1Nodes[i];\n e2 = g2Nodes[i];\n for (int k = 1; k < 6; k++) {\n testKEqual(e1, e2, k);\n testKEqual(e1, e1, k);\n }\n }\n }", "private List<SimilarNode> astCCImplmentation(HashMap<ASTNode, NodeInfo> fileNodeMap1, HashMap<ASTNode, NodeInfo> fileNodeMap2) {\n TreeMap<Integer, List<NodeInfo>> treeMap1 = convertToTreeMap(fileNodeMap1);\n TreeMap<Integer, List<NodeInfo>> treeMap2 = convertToTreeMap(fileNodeMap2);\n List<SimilarNode> result = new ArrayList<>();\n int[] array1 = getArray(treeMap1.keySet());\n int[] array2 = getArray(treeMap2.keySet());\n int i = 0;\n int j = 0;\n int sum = 0;\n while (i < array1.length && j < array2.length) {\n if (array1[i] == array2[j]) {\n // obtain list of nodeInfos for both and compare them if match found then add it to report\n List<NodeInfo> list1 = treeMap1.get(array1[i]);\n List<NodeInfo> list2 = treeMap2.get(array2[j]);\n for (NodeInfo nodeInfo1 : list1) {\n for (NodeInfo nodeInfo2 : list2) {\n if ((nodeInfo1.hashValue == nodeInfo2.hashValue) && (nodeInfo1.nodeType == nodeInfo2.nodeType)) {\n result.add(new SimilarNode(nodeInfo1, nodeInfo2));\n\n }\n }\n }\n i++;\n j++;\n\n } else if (array1[i] > array2[j]) {\n j++;\n } else if (array1[i] < array2[j]) {\n i++;\n }\n }\n return result;\n }", "public boolean DEBUG_compare(Alphabet other) {\n System.out.println(\"now comparing the alphabets this with other:\\n\"+this+\"\\n\"+other);\n boolean sameSlexic = true;\n for (String s : other.slexic.keySet()) {\n if (!slexic.containsKey(s)) {\n sameSlexic = false;\n break;\n }\n if (!slexic.get(s).equals(other.slexic.get(s))) {\n sameSlexic = false;\n break;\n }\n slexic.remove(s);\n }\n System.out.println(\"the slexic attributes are the same : \" + sameSlexic);\n boolean sameSlexicinv = true;\n for (int i = 0, limit = other.slexicinv.size(); i < limit; i++) {\n boolean temp = false;\n for (int j = i, limit2 = slexicinv.size() + i; j < limit2; j++) {\n int k = j % slexicinv.size();\n if (other.slexicinv.get(i).equals(slexicinv.get(k))) {\n temp = true;\n break;\n }\n }\n if (!temp) {\n sameSlexicinv = false;\n break;\n }\n\n }\n boolean sameSpair = true;\n System.out.println(\"the slexicinv attributes are the same : \" + sameSlexicinv);\n for (IntegerPair p : other.spair.keySet()) {\n if(!spair.containsKey(p)) {\n //if (!containsKey(spair, p)) {\n sameSpair = false;\n break;\n }\n //if (!(get(spair, p).equals(get(a.spair, p)))) {\n if (!spair.get(p).equals(other.spair.get(p))) {\n sameSpair = false;\n break;\n }\n }\n System.out.println(\"the spair attributes are the same : \" + sameSpair);\n boolean sameSpairinv = true;\n for (int i = 0, limit = other.spairinv.size(); i < limit; i++) {\n boolean temp = false;\n for (int j = i, limit2 = spairinv.size() + i; j < limit2; j++) {\n int k = j % spairinv.size();\n if (other.spairinv.get(i).equals(spairinv.get(k))) {\n temp = true;\n break;\n }\n }\n if (!temp) {\n sameSpairinv = false;\n break;\n }\n }\n System.out.println(\"the spairinv attributes are the same : \" + sameSpairinv);\n return (sameSpairinv && sameSpair && sameSlexic && sameSlexicinv);\n }", "public static void main(String[] args) {\n String firstString = \"abcd\";\n String secondString = \"dcba\";\n\n // two string may be anagram of they are same in length, character wise.\n if (firstString.length() != secondString.length()) {\n System.out.println(\"Both string are not anagram\");\n }else {\n char[] firstArray = firstString.toCharArray();\n char[] secondArray = secondString.toCharArray();\n\n anagramDetection(firstArray, secondArray);\n }\n }", "static int size_of_cmp(String passed){\n\t\treturn 1;\n\t}", "static String morganAndString(String a, String b) {\n\n\t\tString result = \"\";\n\n\t\tint pointerA = 0, pointerB = 0;\n\n\t\touter:\n\t\t\twhile ( pointerA < a.length() || pointerB < b.length()){\n\t\t\t\tif ( pointerA == a.length()) {\n\t\t\t\t\tresult = result + b.charAt(pointerB++);\n\t\t\t\t}\n\t\t\t\telse if ( pointerB == b.length()) {\n\t\t\t\t\tresult = result + a.charAt(pointerA++);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tchar ca = a.charAt ( pointerA );\n\t\t\t\t\tchar cb = b.charAt ( pointerB );\n\n\t\t\t\t\tif ( ca < cb ) {\n\t\t\t\t\t\tresult = result + ca;\n\t\t\t\t\t\tpointerA++;\n\t\t\t\t\t}\n\t\t\t\t\telse if ( cb < ca ){\n\t\t\t\t\t\tresult = result + cb;\n\t\t\t\t\t\tpointerB++;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t// Find the smallest successor.\n\t\t\t\t\t\tint extraPointer = 1;\n\t\t\t\t\t\twhile ( pointerA + extraPointer < a.length() && pointerB + extraPointer < b.length()){\n\t\t\t\t\t\t\tchar cEa = a.charAt ( pointerA + extraPointer);\n\t\t\t\t\t\t\tchar cEb = b.charAt ( pointerB + extraPointer);\n\n\t\t\t\t\t\t\tif ( cEa < cEb ){\n\t\t\t\t\t\t\t\tresult = result + cEa;\n\t\t\t\t\t\t\t\tpointerA++;\n\t\t\t\t\t\t\t\tcontinue outer;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if ( cEb < cEa ){\n\t\t\t\t\t\t\t\tresult = result + cEb;\n\n\n\t\t\t\t\t\t\t\tpointerB++;\n\t\t\t\t\t\t\t\tcontinue outer;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\textraPointer++;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// We got to the point in which both are the same.\n\t\t\t\t\t\tif ( pointerA + extraPointer == a.length() && pointerB + extraPointer == b.length()){\n\t\t\t\t\t\t\t// Both are equal. It doesn't matter which one I take it from.\n\t\t\t\t\t\t\tresult = result + ca;\n\t\t\t\t\t\t\tpointerA++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tif ( pointerA + extraPointer == a.length() ){\n\t\t\t\t\t\t\t\t// Compare the current one of B with the next letter.\n\t\t\t\t\t\t\t\t// If next letter is smaller than current one, cut from here.\n\t\t\t\t\t\t\t\t// else, cut from A.\n\t\t\t\t\t\t\t\tif ( b.charAt ( pointerB + extraPointer ) > b.charAt ( pointerB + extraPointer + 1)){\n\t\t\t\t\t\t\t\t\tresult = result + cb;\n\t\t\t\t\t\t\t\t\tpointerB++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tresult = result + ca;\n\t\t\t\t\t\t\t\t\tpointerA++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t// The opposite.\n\t\t\t\t\t\t\t\t// Compare the current one of B with the next letter.\n\t\t\t\t\t\t\t\t// If next letter is smaller than current one, cut from here.\n\t\t\t\t\t\t\t\t// else, cut from A.\n\t\t\t\t\t\t\t\tif ( a.charAt ( pointerA + extraPointer ) > a.charAt ( pointerA + extraPointer + 1)){\n\t\t\t\t\t\t\t\t\tresult = result + ca;\n\t\t\t\t\t\t\t\t\tpointerA++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tresult = result + cb;\n\t\t\t\t\t\t\t\t\tpointerB++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\treturn result;\n\n\n\t}", "public static void main(String[] args) {\n\t\tString S = \"deccdbebedabedecedebeccdebbaddddecacdbdeaabebcbaaccaaeabcccccadbeaaecaecacdbebeeedbeeecedebcbeaaaaaecbbcdebeacabccabddadeecbacbcebbbceacddbbaccebabbadebebcaaececbccac\";\n\t\tString T = \"bbbdedc\";\n\t\tSolution s = new Solution();\n\t\tSystem.out.println(S.length());\n\t\tSystem.out.print(s.numDistinct(S, T));\n\n\t}", "public static int longestCommonSubsequence(String text1, String text2) {\n Map<Character, List<Integer>> characterListMap = new HashMap<>();\n char[] cA = text1.toCharArray();\n for (int i = 0; i < cA.length; i++) {\n if (characterListMap.get(cA[i]) == null) {\n List<Integer> list = new ArrayList<>();\n list.add(i);\n characterListMap.put(cA[i], list);\n } else {\n characterListMap.get(cA[i]).add(i);\n }\n }\n char[] cA2 = text2.toCharArray();\n int i = 0;\n int prevBiggest = 0;\n int previndex = 0;\n int currBiggest = 0;\n while (i < cA2.length && characterListMap.get(cA2[i]) == null) {\n i++;\n }\n if (i < cA2.length && characterListMap.get(cA2[i]) != null) {\n previndex = characterListMap.get(cA2[i]).get(characterListMap.get(cA2[i]).size() - 1);\n i++;\n currBiggest++;\n }\n\n\n for (; i < cA2.length; i++) {\n if (characterListMap.containsKey(cA2[i])) {\n if (characterListMap.get(cA2[i]).get(characterListMap.get(cA2[i]).size() - 1) > previndex) {\n previndex = characterListMap.get(cA2[i]).get(characterListMap.get(cA2[i]).size() - 1);\n currBiggest++;\n } else {\n previndex = characterListMap.get(cA2[i]).get(characterListMap.get(cA2[i]).size() - 1);\n if (currBiggest > prevBiggest) {\n prevBiggest = currBiggest;\n }\n currBiggest = 1;\n }\n }\n }\n\n return prevBiggest > currBiggest ? prevBiggest : currBiggest;\n }", "static long triplets(int[] a, int[] b, int[] c) {\n SortedSet<Integer> setA = getSet(a);\n SortedSet<Integer> setB = getSet(b);\n SortedSet<Integer> setC = getSet(c);\n\n NavigableMap<Integer, Integer> aMap = cumulated(setA);\n NavigableMap<Integer, Integer> cMap = cumulated(setC);\n\n long counter = 0;\n\n for(Integer bElement : setB){\n Map.Entry<Integer, Integer> entryA = aMap.floorEntry(bElement);\n int itemsA = entryA == null ? 0 : entryA.getValue();\n\n Map.Entry<Integer, Integer> entryC = cMap.floorEntry(bElement);\n int itemsC = entryC == null ? 0 : entryC.getValue();\n\n counter += (long)itemsA*itemsC;\n }\n return counter;\n }", "public static int commonCharacterCount(String s1, String s2) {\n\t int count = 0;\n\t int auxArray[] = new int[s2.length()];\n\t for (int i = 0; i < auxArray.length; i++){\n\t\tauxArray[i] = 0;\n\t }\n\t \n\t for(int i = 0; i < s1.length(); i++){\n\t\tfor(int j = 0; j < s2.length(); j++){\n\t\t if( auxArray[j] == 1){\n\t\t continue;\n\t\t }\n\t\t else{\n\t\t if(s1.charAt(i) == s2.charAt(j)){\n\t\t auxArray[j] = 1;\n\t\t count += 1;\n\t\t break;\n\t\t }\n\t\t }\n\t\t}\n\t }\n\t return count;\n\t}", "private boolean matchSequences ( String sequence1, String sequence2 )\n{\n int matches = 0;\n\n // Check for sequences with less than 20 characters.\n if ( ( sequence1.length () <= 20 ) ||\n ( sequence2.length () <= 20 ) )\n {\n return sequence1.equalsIgnoreCase ( sequence2 );\n } // if\n\n // Count the matching bases in the first 20 characters.\n for ( int i = 0; i < 20; i++ )\n\n // Count the matching characters (but not N bases).\n if ( ( sequence1.charAt ( i ) == sequence2.charAt ( i ) ) &&\n ( sequence1.charAt ( i ) != 'x' ) &&\n ( sequence1.charAt ( i ) != 'n' ) )\n\n matches++;\n\n // Check for 90% identity (18/20) for a valid match\n if ( matches >= 18 ) return true;\n return false;\n}", "private static boolean equalityTest5(String a, String b)\n {\n return a.hashCode() == b.hashCode();\n }", "@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 }", "private int commonLength( int i0, int i1 )\n {\n \tint n = 0;\n \twhile( (text[i0] == text[i1]) && (text[i0] != STOP) ){\n \t i0++;\n \t i1++;\n \t n++;\n \t}\n \treturn n;\n }", "public static String[] common(String[] a, String[] b){\n int r = a.length;\n int c = b.length;\n int[][] dp = new int[r][c];\n int time = 0;\n for(int i = r-1;i>=0;i--){\n for(int j = c-1; j>=0;j--){\n if (a[i]==b[j]){\n time++;\n dp[i][j]=time;\n }else {\n time = 0;\n dp[i][j]=time;\n }\n }\n }\n return new String[]{\"\"};\n }", "public double JaccardSimilarity (String stringOne, String stringTwo) {\n\t\treturn (double) intersect(stringOne, stringTwo).size() /\n\t\t\t (double) union(stringOne, stringTwo).size();\n\t}", "@Test\n public void equalDagGraphsTest() throws Exception {\n // Generate two identical DAGs\n String traceStr = \"1,0 a\\n\" + \"2,1 b\\n\" + \"1,2 c\\n\" + \"2,3 d\\n\"\n + \"--\\n\" + \"1,0 a\\n\" + \"2,1 b\\n\" + \"1,2 c\\n\" + \"2,3 d\\n\";\n\n TraceParser parser = genParser();\n ArrayList<EventNode> parsedEvents = parser.parseTraceString(traceStr,\n testName.getMethodName(), -1);\n DAGsTraceGraph g1 = parser.generateDirectPORelation(parsedEvents);\n exportTestGraph(g1, 0);\n\n List<Transition<EventNode>> initNodeTransitions = g1\n .getDummyInitialNode().getAllTransitions();\n EventNode firstA = initNodeTransitions.get(0).getTarget();\n EventNode secondA = initNodeTransitions.get(1).getTarget();\n for (int k = 1; k < 4; k++) {\n testKEqual(firstA, secondA, k);\n }\n }", "@Test\n public void rnatest1(){\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(a);\n char[] firstArr = new char[3];\n char[] answer = {'P','L','A'};\n for(int i = 0; i < firstArr.length; i++){\n firstArr[i] = first.aminoAcid;\n System.out.println(first.aminoAcid);\n first = first.next;\n }\n assertArrayEquals(answer, firstArr);\n }", "@Test\n public void subSequencesTest2() {\n String text = \"hashco\"\n + \"llisio\"\n + \"nsarep\"\n + \"ractic\"\n + \"allyun\"\n + \"avoida\"\n + \"blewhe\"\n + \"nhashi\"\n + \"ngaran\"\n + \"domsub\"\n + \"setofa\"\n + \"larges\"\n + \"etofpo\"\n + \"ssible\"\n + \"keys\";\n\n String[] expected = new String[6];\n expected[0] = \"hlnraabnndslesk\";\n expected[1] = \"alsalvlhgoeatse\";\n expected[2] = \"siacloeaamtroiy\";\n expected[3] = \"hsrtyiwsrsogfbs\";\n expected[4] = \"cieiudhhaufepl\";\n expected[5] = \"oopcnaeinbasoe\";\n String[] owns = this.ic.subSequences(text, 6);\n for (int i = 0; i < expected.length; i++) {\n assertEquals(expected[i], owns[i]);\n }\n }", "public static void main(String[] args) {\n// String before1 = \"27e80000\";\n// String before1 = \"715b00000\";\n String before1 = \"715b00000\";\n\n long after1 = Long.parseLong(before1, 16);\n System.out.println(after1);\n\n// String before2 = \"28d80000\";\n// String before2 = \"7c0000000\";\n// String before2 = \"71db80000\";\n String before2 = \"720580000\";\n long after2 = Long.parseLong(before2, 16);\n System.out.println(after2);\n\n long size = (after2 - after1) / 1024 / 1024;\n System.out.println(\"Size: \" + size + \"M\");\n }", "public static void main(String[] args) {\n\t\tint[] arr1 = { 10, 12, 55, 32, 17 };\n\t\tint[] arr2 = { 10, 12, 55, 32, 17 };\n\t\t/*//Second set\n\t\tint[] arr1 = {10,12,55,32,17,99};\n\t\tint[] arr2 = {10,12,55,32,17}};*/\n\t\t/* //Third set\n\t\tint[] arr1 = {10,12,55,32,17};\n\t\tint[] arr2 = {10,12,99,32,17}};*/\n\n\t\tArraysIdentical arrayidentical = new ArraysIdentical();\n\t\tarrayidentical.identicalCheck(arr1, arr2);\n\n\t}", "public static void main(String args[]) {\n Scanner in=new Scanner(System.in);\n String str1=in.nextLine();\n String str2=in.nextLine();\n int slen1=str1.length();\n \n int slen2=str2.length();\n int count=0;\n for(int i=0;i<(slen1-slen2+1);i++)\n {\n int num=1;\n for(int j=0;j<slen2;j++)\n {\n if(str1.charAt(i+j)!=(str2.charAt(j)))\n {\n num=0;\n }\n \n } \n if(num==1)\n {\n count++;\n }\n \n }\n System.out.println(count); \n }", "public boolean compareTo(\n String tokens_[],\n String labels_[],\n String types_[],\n String constrType_[],\n String dependId_[],\n int connectQty_[],\n int componentId_[]) throws Exception {\n int N = tokens_.length;\n \n ArrayList<String> tokens = new ArrayList<String>();\n ArrayList<String> labels = new ArrayList<String>(); \n ArrayList<FieldType> types = new ArrayList<FieldType>();\n ArrayList<ArrayList<ConstraintType>> constrType \n = new ArrayList<ArrayList<ConstraintType>>();\n ArrayList<ArrayList<Integer>> dependId\n = new ArrayList<ArrayList<Integer>>();\n ArrayList<Integer> connectQty = new ArrayList<Integer>();\n ArrayList<Integer> componentId = new ArrayList<Integer>();\n \n if (labels_.length != N) throw new Exception(\n String.format(\"labels len (%d) != tokens len (%d), args))\", \n N, labels_.length));\n if (types_.length != N) throw new Exception(\n String.format(\"labels len (%d) != types len (%d), args))\", \n N, types_.length));\n if (constrType_.length != N) throw new Exception(\n String.format(\"labels len (%d) != constrType len (%d), args))\", \n N, constrType_.length));\n if (dependId_.length != N) throw new Exception(\n String.format(\"dependId len (%d) != dependId len (%d), args))\", \n N, dependId_.length));\n if (connectQty_.length != N) throw new Exception(\n String.format(\"labels len (%d) != connectQty len (%d), args))\", \n N, connectQty_.length));\n if (componentId_.length != N) throw new Exception(\n String.format(\"labels len (%d) != componentId len (%d), args))\", \n N, componentId_.length)); \n \n for (int i = 0; i < N; ++i) {\n tokens.add(tokens_[i]);\n labels.add(labels_[i]);\n types.add(FieldType.valueOf(types_[i]));\n ArrayList<ConstraintType> ct = new ArrayList<ConstraintType>();\n for (String t:constrType_[i].split(\"[,]\")) \n if (!t.isEmpty()) { \n // \"\".split(\",\") returns [\"\"] \n try {\n ct.add(ConstraintType.valueOf(t));\n } catch (java.lang.IllegalArgumentException e) {\n throw new Exception(\"Failed to parse the constraint value: '\" + t + \"'\");\n }\n }\n constrType.add(ct);\n ArrayList<Integer> it = new ArrayList<Integer>();\n for (String t:dependId_[i].split(\"[,]\")) \n if (!t.isEmpty()) { \n // \"\".split(\",\") returns [\"\"] \n try {\n it.add(Integer.valueOf(t));\n } catch (java.lang.IllegalArgumentException e) {\n throw new Exception(\"Failed to parse the dependent id value: '\" + t + \"'\");\n }\n }\n dependId.add(it);\n connectQty.add(connectQty_[i]);\n }\n \n boolean bTokens = DeepEquals.deepEquals(mTokens, tokens);\n boolean bLabels = DeepEquals.deepEquals(mLabels, labels);\n boolean bTypes = DeepEquals.deepEquals(mTypes, types);\n boolean bConstrType = DeepEquals.deepEquals(mConstrType, constrType);\n boolean bDependId = DeepEquals.deepEquals(mDependId, dependId);\n boolean bConnectQty = DeepEquals.deepEquals(mConnectQty, connectQty);\n boolean bComponentId= DeepEquals.deepEquals(mComponentId, componentId);\n boolean bFinal = bTokens && bLabels && bTypes && \n bConstrType && bDependId && bConnectQty;\n if (!bFinal) {\n System.out.println(String.format(\"Comparison failed: \\n\" +\n \" Tokens : %b \\n\" +\n \" Labels : %b \\n\" + \n \" Types : %b \\n\" + \n \" ConstrType : %b \\n\" + \n \" DependId : %b \\n\" + \n \" ConnectQty : %b \\n\" +\n \" ComponentId : %b \\n\",\n bTokens, bLabels, bTypes, bConstrType, bDependId, \n bConnectQty, bComponentId\n ));\n }\n \n return bFinal;\n }", "public static void main(String[] args) {\r\n\t\tString s1 = \"ababab\";\r\n\t\tString s2 = \"bababa\";\r\n\t\tif(s1.length()!= s2.length()){\r\n\t\t\tSystem.out.println(\"not a anagram\");\r\n\t\t}else{\r\n\t\t\tchar[] c1 = s1.toCharArray();\r\n\t\t\tchar[] c2 = s2.toCharArray();\r\n\t\t//\tusingHashMap(c1, c2);\r\n\t\t\tusingArrays(c1,c2);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "@SuppressWarnings(\"serial\")\r\n\t@Test\r\n\tpublic void permutationsTestSize3NotAllEquals() throws BoundedQueueException {\r\n\t\tbq.enqueue(1);\r\n\t\tbq.enqueue(2);\r\n\t\tbq.enqueue(3);\r\n\t\tBoundedQueueCorrected<BoundedQueueCorrected<Integer>> output= bq.permutations();\r\n\t\t\r\n\t\t//size of the perm's output\r\n\t\tint expectedPermSize = 6; //fact\r\n\t\tint actualPermSize = output.size();\t\t\r\n\t\tassertEquals(\"Tamanho do resultado final\",expectedPermSize, actualPermSize);\r\n\t\t\r\n\t\t\r\n\t\t//number of elems for each elem of perms\r\n\t\tint expectedPermNumElems = 3; \r\n\t\tint actualPermNumElems = bq.size();\r\n\t\tassertEquals(\"Numero de elementos no elems\",expectedPermNumElems, actualPermNumElems);\r\n\t\t\r\n\t\t//check if there are any duplicated\r\n\t\tArrayList<BoundedQueueCorrected<Integer>> permOutput = output.elems;\r\n\t\tList<Integer> countEquals = new ArrayList<Integer>(6){{\r\n\t\t\tadd(0);\r\n\t\t\tadd(0);\r\n\t\t\tadd(0);\r\n\t\t\tadd(0);\r\n\t\t\tadd(0);\r\n\t\t\tadd(0);\r\n\t\t}};\r\n\t\t\r\n\t\t\r\n\t\tfor(int i = 0; i < actualPermSize; i++ ){ \r\n\t\t\tfor(int j = 0; j < actualPermSize; j++ ){\r\n\t\t\t\tif(i != j){\r\n\t\t\t\t\tif(permOutput.get(i).toString().equals(permOutput.get(j).toString())){\t\t\r\n\t\t\t\t\t\tcountEquals.set(i, countEquals.get(i)+1); // counts the number of occurrences of an elem from output\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tint expectedEqualPerms = 0;\r\n\t\tint actualEqualPerms = 0;\r\n\t\t\r\n\t\tfor(Integer i : countEquals){\r\n\t\t\tif(i > 0)\r\n\t\t\t\tactualEqualPerms++;\r\n\t\t\t//if(i == expectedPermSize -1)\r\n\t\t\t\t\r\n\t\t}\r\n\t\t\t\r\n\t\tassertEquals(\"Numero de permutacoes iguais\",expectedEqualPerms, actualEqualPerms);\r\n\t}", "public static void main(String[] args) {\n String s1 = \"tweety\";\n String s2 = \"weetty\";\n System.out.println(checkPermutationCountingHashMap(s1, s2));\n System.out.println(checkPermutationSorting(s1, s2));\n System.out.println(checkPermutationCountingArray(s1, s2));\n }", "@Test\n public void subSequencesTest3() {\n String text = \"wnylazlzeqntfpwtsmabjqinaweaocfewgpsrmyluadlybfgaltgljrlzaaxvjehhygggdsrygvnjmpyklvyilykdrphepbfgdspjtaap\"\n + \"sxrpayholutqfxstptffbcrkxvvjhorawfwaejxlgafilmzrywpfxjgaltdhjvjgtyguretajegpyirpxfpagodmzrhstrxjrpirlbfgkhhce\"\n + \"wgpsrvtuvlvepmwkpaeqlstaqolmsvjwnegmzafoslaaohalvwfkttfxdrphepqobqzdqnytagtrhspnmprtfnhmsrmznplrcijrosnrlwgds\"\n + \"bylapqgemyxeaeucgulwbajrkvowsrhxvngtahmaphhcyjrmielvqbbqinawepsxrewgpsrqtfqpveltkfkqiymwtqssqxvchoilmwkpzermw\"\n + \"eokiraluaammkwkownrawpedhcklrthtftfnjmtfbftazsclmtcssrlluwhxahjeagpmgvfpceggluadlybfgaltznlgdwsglfbpqepmsvjha\"\n + \"lwsnnsajlgiafyahezkbilxfthwsflgkiwgfmtrawtfxjbbhhcfsyocirbkhjziixdlpcbcthywwnrxpgvcropzvyvapxdrogcmfebjhhsllu\"\n + \"aqrwilnjolwllzwmncxvgkhrwlwiafajvgzxwnymabjgodfsclwneltrpkecguvlvepmwkponbidnebtcqlyahtckk\";\n\n String[] expected = new String[6];\n expected[0] = \"wlfaafrdarvgypipgaputcjflmftgepfmrrhpvwllnfofdqqtmhnjlyeewvxhceqpgftysopelkrhhjtmlapcagllpasazflfthohdtrrvobliwnhazafeevpnlk\";\n expected[1] = \"nzpbwemllljggylhdaatprhwgzxdttypzxlhslksmeohkronrpmprwlmubovmylispqkmqizouwactmatlhmedagfmlafktgmfhcjlhxoagjullcrfxbslceoeyk\";\n expected[2] = \"yewjewyytzegvkyespyqtkoaarjhyaiarjbcrvptsgsatpbyhrslogaycawnajvnxspfwxlekakwkftzcujgglldbswjybhktxcizpypppchanlxwawjctgpnba\";\n expected[3] = \"lqtqaglbgahdnlkppshffxrefygjgjrghrfeveaavmllthqtstrrsdpxgjsgprqarrvktvmriaopltfsswevgytwpvslaiwirjfricwgzxmhqjzvljnglrumbth\";\n expected[4] = \"ansiopuflahsjvdbjxoxfvajiwavuepospgwtpeqjzavfezapfmcnsqeurrthmbweqeqqcwmrmwerfbcshaflbzsqjnghlswabsbibwvvdfsrowgwvyowpvwict\";\n expected[5] = \"ztmncsagjxyrmyrftrlsbvwxlpljrgxdtikgumqowaawxpdgnnzirbgalkhahibewtlishkwamndtnflrxgpufngehniexfgwbykxcncyrelwlmkigmdnklkdqc\";\n int keyLen = 6;\n String[] owns = this.ic.subSequences(text, keyLen);\n for (int i = 0; i < expected.length; i++) {\n assertEquals(expected[i], owns[i]);\n }\n }", "@SuppressWarnings(\"serial\")\r\n\t@Test\r\n\tpublic void permutationsTestSize3AllEquals() throws BoundedQueueException {\r\n\t\tbq.enqueue(3);\r\n\t\tbq.enqueue(3);\r\n\t\tbq.enqueue(3);\r\n\t\tBoundedQueueCorrected<BoundedQueueCorrected<Integer>> output= bq.permutations();\r\n\t\t\r\n\t\t//size of the perm's output\r\n\t\tint expectedPermSize = 6; //fact\r\n\t\tint actualPermSize = output.size();\t\t\r\n\t\tassertEquals(\"Tamanho do resultado final\",expectedPermSize, actualPermSize);\r\n\t\t\r\n\t\t\r\n\t\t//number of elems for each elem of perms\r\n\t\tint expectedPermNumElems = 3; \r\n\t\tint actualPermNumElems = bq.size();\r\n\t\tassertEquals(\"Numero de elementos no elems\",expectedPermNumElems, actualPermNumElems);\r\n\t\t\r\n\t\t//check if there are any duplicated\r\n\t\tArrayList<BoundedQueueCorrected<Integer>> permOutput = output.elems;\r\n\t\tList<Integer> countEquals = new ArrayList<Integer>(6){{\r\n\t\t\tadd(0);\r\n\t\t\tadd(0);\r\n\t\t\tadd(0);\r\n\t\t\tadd(0);\r\n\t\t\tadd(0);\r\n\t\t\tadd(0);\r\n\t\t}};\r\n\t\t\r\n\t\t\r\n\t\tfor(int i = 0; i < actualPermSize; i++ ){ \r\n\t\t\tfor(int j = 0; j < actualPermSize; j++ ){\r\n\t\t\t\tif(i != j){\r\n\t\t\t\t\tif(permOutput.get(i).toString().equals(permOutput.get(j).toString())){\t\t\r\n\t\t\t\t\t\tcountEquals.set(i, countEquals.get(i)+1); // counts the number of occurrences of an elem from output\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tint expectedEqualPerms = 0;\r\n\t\tint actualEqualPerms = 0;\r\n\t\t\r\n\t\tfor(Integer i : countEquals){\r\n\t\t\tif(i > 0)\r\n\t\t\t\tactualEqualPerms++;\r\n\t\t\t//if(i == expectedPermSize -1)\r\n\t\t\t\t\r\n\t\t}\r\n\t\t\t\r\n\t\tassertEquals(\"Numero de permutacoes iguais\",expectedEqualPerms, actualEqualPerms);\r\n\t}", "int main() \n{\n string s1,s2;\n cin>>s1>>s2;\n int freq[128]={0},i;\n for(i=0;i<s1.length();i++)\n freq[s1[i]]++;\n for(i=0;i<s2.length();i++)\n freq[s2[i]]--;\n for(i=0;i<128;i++)\n {\n if(freq[i]!=0)\n {\n cout<<\"Not anagrams\";\n return 0;\n }\n }\n cout<<\"Anagram\";\n}" ]
[ "0.6912721", "0.69059646", "0.67789763", "0.63020575", "0.61177087", "0.61165255", "0.5932029", "0.58990496", "0.5843262", "0.5828416", "0.5761651", "0.5732703", "0.5725121", "0.5715867", "0.5714766", "0.56744176", "0.56693566", "0.5645776", "0.5635859", "0.56353045", "0.56321603", "0.560911", "0.5545773", "0.5534966", "0.55290455", "0.5522368", "0.5510087", "0.550013", "0.5491175", "0.547689", "0.5462106", "0.5438324", "0.5422398", "0.5421684", "0.5408995", "0.5400064", "0.5387794", "0.5381267", "0.53807056", "0.53716093", "0.53662026", "0.5345853", "0.5340179", "0.53373975", "0.5334542", "0.53317624", "0.5317378", "0.531032", "0.53077626", "0.53064513", "0.5291324", "0.528977", "0.5288577", "0.5251337", "0.5250999", "0.5244937", "0.52409554", "0.52393585", "0.523653", "0.52340096", "0.5232036", "0.52200544", "0.52197486", "0.5215248", "0.52148604", "0.52125096", "0.5208043", "0.51983625", "0.5195775", "0.5191373", "0.518365", "0.51815516", "0.5181252", "0.5176155", "0.5175708", "0.51743466", "0.5174277", "0.51735896", "0.5169921", "0.51628274", "0.5162401", "0.51608837", "0.5160468", "0.51528484", "0.5152445", "0.51467335", "0.5145014", "0.5138217", "0.51368004", "0.5135975", "0.51252246", "0.5118459", "0.5110554", "0.51073766", "0.51020634", "0.50995904", "0.50993586", "0.5094648", "0.50908065", "0.5088969" ]
0.7193039
0
/TEST 8 INPUT: c = "GCUGAGGAUAUGUCA" EXPECTED OUTPUT = 0 ACTUAL OUTPUT = 0 Using two lists of the same "size", the number of nodes it's compared to check that they are the same.
@Test public void aminoCompareTest2() { //these list are already sorted AminoAcidLL first = AminoAcidLL.createFromRNASequence(c); AminoAcidLL second = AminoAcidLL.createFromRNASequence(c); int expected = 0; assertEquals(expected, first.aminoAcidCompare(second)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void codonCompare1(){\n //these list are already sorted\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(a);\n AminoAcidLL second = AminoAcidLL.createFromRNASequence(b);\n int expected = 0;\n assertEquals(expected, first.codonCompare(second));\n }", "@Test\n public void codonCompare2(){\n //these list are already sorted\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(c);\n AminoAcidLL second = AminoAcidLL.createFromRNASequence(d);\n int expected = 1;\n assertEquals(expected, first.codonCompare(second));\n\n }", "static int size_of_cmp(String passed){\n\t\treturn 1;\n\t}", "@Test\r\n\tvoid testSize2() {\r\n\t\tSimpleList test = new SimpleList();\r\n\t\ttest.append(1);\r\n\t\ttest.append(2);\r\n\t\ttest.append(3);\r\n\t\ttest.append(4);\r\n\t\ttest.append(5);\r\n\t\ttest.append(6);\r\n\t\ttest.append(7);\r\n\t\ttest.append(8);\r\n\t\ttest.append(9);\r\n\t\ttest.append(10);\r\n\t\ttest.append(11);\r\n\t\tint output = test.size();\r\n\t\tassertEquals(15, output);\r\n\t}", "@Test\n public void aminoCompareTest1(){\n //these list are already sorted\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(c);\n AminoAcidLL second = AminoAcidLL.createFromRNASequence(d);\n int expected = 1;\n assertEquals(expected, first.aminoAcidCompare(second));\n }", "private void assertEqual(long count, long size) {\n\t\t\n\t}", "protected void testSizeByIterator(PrefixTree tree) {\n int count = 0;\n for (@SuppressWarnings(\"unused\") String s : tree) {\n count++;\n }\n\n assertTrue(\"Iteration count \" + count + \" did not match size \"\n + tree.size(), count == tree.size());\n }", "private static int commonChild(String s1, String s2) {\n //reduce of iterations\n //make strings shorter\n //TreeMap to keep order\n Map<Integer, Character> map1 = new TreeMap<>();\n Map<Integer, Character> map2 = new TreeMap<>();\n StringBuilder stringBuilder = new StringBuilder();\n for (int i = 0; i < s1.length(); i++) {\n for (int j = 0; j < s2.length(); j++) {\n char charOfS1 = s1.charAt(i);\n char charOfS2 = s2.charAt(j);\n if (charOfS1 == charOfS2) {\n map1.put(i, charOfS1);\n map2.put(j, charOfS2);\n }\n }\n }\n for (Map.Entry<Integer, Character> entry : map1.entrySet()) {\n stringBuilder.append(entry.getValue());\n }\n s1 = stringBuilder.toString();\n stringBuilder = new StringBuilder();\n for (Map.Entry<Integer, Character> entry : map2.entrySet()) {\n stringBuilder.append(entry.getValue());\n }\n s2 = stringBuilder.toString();\n /*\n ------------------------------------------------\n */\n int lengthS1 = s1.length();\n int lengthS2 = s2.length();\n int[][] arr = new int[lengthS1+1][lengthS2+1];\n for (int i = 1; i <= lengthS1; i++) {\n for (int j = 1; j <= lengthS2; j++) {\n char charI = s1.charAt(i - 1); //from 0\n char charJ = s2.charAt(j - 1); //from 0\n arr[i][j] = (charI==charJ) ?\n arr[i-1][j-1] + 1 :\n Math.max(arr[i-1][j],arr[i][j-1]);\n }\n }\n\n return arr[lengthS1][lengthS2];\n }", "void size() {\n assertEquals(words.size(), trie.size());\n }", "int size(ANode<T> s) {\n if (this.next.equals(s)) {\n return 1;\n }\n else {\n return 1 + this.next.size(s);\n }\n }", "@Test\n public void testSize() {\n testAdd();\n assertEquals(9, list1.size());\n }", "@Test\n\tpublic void whenListHaveTwoEmptyStringThenReturnTwo(){\n\t\tassertEquals(s1.getEmptyElementCount(data), 2);\n\t}", "@Test\r\n public void sizeSets() throws Exception {\r\n assertEquals(5, sInt.size());\r\n assertEquals(3, sStr.size());\r\n }", "@Test\n public void testComputeJaccardSimilarity() {\n // Test case 1\n String text = \"abcdef\";\n Set<String> actualKShingles = KShingling.getKShingles(3, text);\n Set<String> expectedKShingles = new HashSet<String>();\n expectedKShingles.add(\"abc\");\n expectedKShingles.add(\"bcd\");\n expectedKShingles.add(\"cde\");\n expectedKShingles.add(\"def\");\n\n // Asserts that both sets have the same size.\n Assert.assertEquals(expectedKShingles.size(), actualKShingles.size());\n\n // Asserts that all elements of the expected set of shingles is included\n // in the actual sets of shingles.\n for (String kShingle : expectedKShingles) {\n Assert.assertTrue(actualKShingles.contains(kShingle));\n }\n\n // Test case 2\n text = \"ab\";\n actualKShingles = KShingling.getKShingles(3, text);\n expectedKShingles = new HashSet<String>(); // No shingles is fine\n\n // Asserts that both sets have the same size.\n Assert.assertEquals(expectedKShingles.size(), actualKShingles.size());\n\n // Asserts that all elements of the expected set of shingles is included\n // in the actual sets of shingles.\n for (String kShingle : expectedKShingles) {\n Assert.assertTrue(actualKShingles.contains(kShingle));\n }\n\n // Test case 3\n text = \"abc def ghi\";\n actualKShingles = KShingling.getKShingles(4, text);\n expectedKShingles = new HashSet<String>();\n expectedKShingles.add(\"abc \");\n expectedKShingles.add(\"bc d\");\n expectedKShingles.add(\"c de\");\n expectedKShingles.add(\" def\");\n expectedKShingles.add(\"def \");\n expectedKShingles.add(\"ef g\");\n expectedKShingles.add(\"f gh\");\n expectedKShingles.add(\" ghi\");\n\n // Asserts that both sets have the same size.\n Assert.assertEquals(expectedKShingles.size(), actualKShingles.size());\n\n // Asserts that all elements of the expected set of shingles is included\n // in the actual sets of shingles.\n for (String kShingle : expectedKShingles) {\n Assert.assertTrue(actualKShingles.contains(kShingle));\n }\n }", "LengthEquals createLengthEquals();", "private static boolean checkPermutationCountingArray(String s1, String s2) {\n // Strings are of unequal length. Cannot be permutations.\n if (s1.length() != s2.length()) {\n return false;\n }\n\n int[] characterCount = new int[128];\n for (int i = 0; i < s1.length(); i++) {\n characterCount[s1.charAt(i)]++;\n characterCount[s2.charAt(i)]--;\n }\n for (int i = 0; i < characterCount.length; i++) {\n if (characterCount[i] != 0) return false;\n }\n return true;\n }", "static int size_of_cnz(String passed){\n\t\treturn 3;\n\t}", "public int commonPrefixLength(String s1, String s2)\r\n {\r\n\r\n int length = 0;\r\n if (s1.isEmpty() || s2.isEmpty())\r\n {\r\n return 0;\r\n }\r\n while (s1.charAt(length) == s2.charAt(length))\r\n {\r\n length++;\r\n //if (k >= s1.length() || k >= s2.length() || k >= system.getLookupTableSize() - 1)\r\n if (length >= s1.length() || length >= s2.length())\r\n {\r\n break;\r\n }\r\n }\r\n\r\n return length;\r\n\r\n }", "public static void main(String[] args){\n System.out.println(\"Test 1: Lengths of numbers are equal\");\n int[] number1 = new int[]{2, 4, 3};\n int[] number2 = new int[]{5, 6, 4};\n // Create lists from digit arrays\n ListNode listNumber1 = createListFromDigitArray(number1);\n ListNode listNumber2 = createListFromDigitArray(number2);\n // Print contents of both lists\n printDigitListContents(listNumber1);\n printDigitListContents(listNumber2);\n // Add the lists\n ListNode listSum = addTwoNumbers(listNumber1, listNumber2);\n printDigitListContents(listSum);\n\n // Test 2: Lengths of numbers are unequal\n // (1->2->4->3) + (5->6->4) = (6->8->8->3) ... => 3421 + 465 = 3886\n System.out.println(\"Test 2: Lengths of numbers are unequal\");\n int[] number3 = new int[]{1, 2, 4, 3};\n int[] number4 = new int[]{5, 6, 4};\n // Create lists from digit arrays\n ListNode listNumber3 = createListFromDigitArray(number3);\n ListNode listNumber4 = createListFromDigitArray(number4);\n // Print contents of both lists\n printDigitListContents(listNumber3);\n printDigitListContents(listNumber4);\n // Add the lists\n ListNode listSum2 = addTwoNumbers(listNumber3, listNumber4);\n printDigitListContents(listSum2);\n }", "void assertSizeEquals(int expected);", "public static void main(String[] args) {\n\t\tString s=\"geeks\";\r\n\t\tString s1=\"egeks\";\r\n\t\tint m=s.length();\r\n\t\tint n=s1.length();\r\n\t\tfor(int i=0;i<m;i++)\r\n\t\t{\r\n\t\t\tfor(int j=0;j<n;j++)\r\n\t\t\t{\r\n\t\t\t\tif(s.charAt(i)!=s1.charAt(j))\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"no of index\"+i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "static int countCommon(Node a, Node b) {\n\t\tint count = 0;\n\n\t\t// loop to count coomon in the list starting\n\t\t// from node a and b\n\t\tfor (; a != null && b != null; a = a.next, b = b.next)\n\n\t\t\t// increment the count for same values\n\t\t\tif (a.data == b.data)\n\t\t\t\t++count;\n\t\t\telse\n\t\t\t\tbreak;\n\n\t\treturn count;\n\t}", "public double jaccardDistance(TreeSet<String> other) {\n\t\tif(other.isEmpty()||this.isEmpty()||this.first().length()!=other.first().length()){\n\t\t\treturn 0;\n\t\t}\n\t\tShingleSet intersection = new ShingleSet(other.first().length());\n\t\tShingleSet union = new ShingleSet(other.first().length());\n\t\tintersection.addAll(other);\n\t\tunion.addAll(other);\n//\t\tSystem.out.println(this.toString()+other.toString());\n\t\tintersection.retainAll(this);\n\t\tunion.addAll(this);\n//\t\tSystem.out.println(intersection.toString()+union.toString());\n//\t\tSystem.out.println(intersection.size()+\" \"+union.size());\t\t\n\t\treturn 1 - (double) intersection.size()/ (double) union.size(); \n\t}", "@Test\n public void testSize() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n int expResult = 4;\n\n instance.add(1);\n instance.add(2);\n instance.add(3);\n instance.add(4);\n\n long result = instance.size();\n assertEquals(expResult, result);\n }", "public void testNodesWithNames() {\n\t\tString[] grp1 = new String[] {\"Paucituberculata\", \"Microbiotheria\", \"Dasyuromorphia\", \"Peramelemorphia\", \"Didelphimorphia\"};\n\t\tString[] grp2 = new String[] {\"Omma jurassicum\", \"Omma sagitta\", \"Omma rutherfordi\"};\n\t\tString[] grp3 = new String[] {\"Meru phyllisae\", \"Haliplidae\", \"Gyrinidae\"};\n\t\t\n\t\tcompareNodesWithNames(new ArrayList(Arrays.asList(grp1)), new Long(15994));\n\t\t//Paucituberculata Microbiotheria Dasyuromorphia Peramelemorphia Didelphimorphia 15994\n\t\t\n\t\tcompareNodesWithNames(new ArrayList(Arrays.asList(grp2)), new Long(9042));\n\t\t//Omma jurassicum Omma sagitta Omma rutherfordi 9042\n\t\t\n\t\tcompareNodesWithNames(new ArrayList(Arrays.asList(grp3)), new Long(8875));\n\t\t//Meru phyllisae Haliplidae Gyrinidae 8875\n\t}", "public static List<Integer> lcs(List<Integer> arr1, List<Integer> arr2) {\r\n ArrayList empty = new ArrayList();\r\n /* BEFORE WE ALLOCATE ANY DATA STORAGE, VALIDATE ARGS */\r\n if (null == arr1 || 0 == arr1.size())\r\n return empty;\r\n if (null == arr2 || 0 == arr2.size())\r\n return empty;\r\n\r\n if (equalLists(arr1, arr2)) {\r\n return arr1;\r\n }\r\n\r\n /* ALLOCATE VARIABLES WE'LL NEED FOR THE ROUTINE */\r\n ArrayList<Integer> bestMatch = new ArrayList<Integer>();\r\n ArrayList<Integer> currentMatch = new ArrayList<Integer>();\r\n ArrayList<List<Integer>> dataSuffixList = new ArrayList<List<Integer>>();\r\n ArrayList<List<Integer>> lineSuffixList = new ArrayList<List<Integer>>();\r\n\r\n /* FIRST, COMPUTE SUFFIX ARRAYS */\r\n for (int i = 0; i < arr1.size(); i++) {\r\n dataSuffixList.add(arr1.subList(i, arr1.size()));\r\n }\r\n for (int i = 0; i < arr2.size(); i++) {\r\n lineSuffixList.add(arr2.subList(i, arr2.size()));\r\n }\r\n\r\n /* STANDARD SORT SUFFIX ARRAYS */\r\n IntegerListComparator comp = new IntegerListComparator();\r\n Collections.sort(dataSuffixList, comp);\r\n Collections.sort(lineSuffixList, comp);\r\n\r\n /* NOW COMPARE ARRAYS MEMBER BY MEMBER */\r\n List<?> d = null;\r\n List<?> l = null;\r\n List<?> shorterTemp = null;\r\n int stopLength = 0;\r\n int k = 0;\r\n boolean match = false;\r\n\r\n bestMatch.retainAll(empty);\r\n bestMatch.addAll(currentMatch);\r\n for (int i = 0; i < dataSuffixList.size(); i++) {\r\n d = (List) dataSuffixList.get(i);\r\n for (int j = 0; j < lineSuffixList.size(); j++) {\r\n l = (List) lineSuffixList.get(j);\r\n if (d.size() < l.size()) {\r\n shorterTemp = d;\r\n } else {\r\n shorterTemp = l;\r\n }\r\n\r\n currentMatch.retainAll(empty);\r\n k = 0;\r\n stopLength = shorterTemp.size();\r\n match = (l.get(k).equals(d.get(k)));\r\n while (k < stopLength && match) {\r\n if (l.get(k).equals(d.get(k))) {\r\n currentMatch.add((Integer) shorterTemp.get(k));\r\n k++;\r\n } else {\r\n match = false;\r\n }\r\n }\r\n if (currentMatch.size() > bestMatch.size()) {\r\n bestMatch.retainAll(empty);\r\n bestMatch.addAll(currentMatch);\r\n }\r\n }\r\n }\r\n return bestMatch;\r\n }", "public static void main(String[] args) {\n\n\t\tString a = \"aabbbc\", b =\"cbad\";\n\t\t// a=abc\t\t\t\tb=cab\n\t\t\n\t\t\n\t\tString a1 =\"\" , b1 = \"\"; // to store all the non duplicated values from a\n\t\t\n\t\tfor(int i=0; i<a.length();i++) {\n\t\t\tif(!a1.contains(a.substring(i,i+1)))\n\t\t\t\ta1 += a.substring(i,i+1);\n\t\t}\n\t\t\n\t\tfor(int i=0; i<b.length();i++) {\n\t\t\tif(!b1.contains(b.substring(i,i+1)))\n\t\t\t\tb1 += b.substring(i,i+1);\n\t\t}\n\t\t\t\t\n\t\tchar[] ch1 = a1.toCharArray();\n\t\tSystem.out.println(Arrays.toString(ch1));\n\t\t\n\t\tchar[] ch2 = b1.toCharArray();\n\t\tSystem.out.println(Arrays.toString(ch2));\n\t\t\n\t\tArrays.sort(ch1);\n\t\tArrays.sort(ch2);\n\t\t\n\t\tSystem.out.println(\"=====================================================\");\n\t\t\n\t\tSystem.out.println(Arrays.toString(ch1));\n\t\tSystem.out.println(Arrays.toString(ch2));\n\t\t\n\t\tString str1 = Arrays.toString(ch1);\n\t\tString str2 = Arrays.toString(ch2);\n\t\t\n\t\tif(str1.contentEquals(str2)) {\n\t\t\tSystem.out.println(\"true, they build out of same letters\");\n\t\t}else { \n\t\t\tSystem.out.println(\"fasle, there is something different\");\n\t\t}\n\t\t\n\n\t\t\n\t\t// SHORTER SOLUTION !!!!!!!!!!!!!!!!!!!!\n\t\t\n//\t\tString Str1 = \"aaaabbbcc\", Str2 = \"cccaabbb\";\n//\t\t\n//\t\tStr1 = new TreeSet<String>( Arrays.asList(Str1.split(\"\"))).toString();\n//\t\tStr2 = new TreeSet<String>( Arrays.asList(Str2.split(\"\"))).toString();\n//\t\tSystem.out.println(Str1.equals(Str2));\n//\t\t\n//\t\t\n\t\t\n}", "static int size_of_cmc(String passed){\n\t\treturn 1;\n\t}", "private static void testConsistentHashing() {\n Map<String, AtomicInteger> CHNodesMap = Maps.newHashMap();\r\n List<String> CHNodes = Lists.newArrayList();\r\n for(int i = 0 ; i < nodesCount; i ++) {\r\n CHNodes.add(\"CHNode\"+i);\r\n CHNodesMap.put(\"CHNode\"+i, new AtomicInteger());\r\n }\r\n ConsistentHashing<String, String> ch = new ConsistentHashing(charsFunnel, charsFunnel, CHNodes);\r\n \r\n // insert keys\r\n long startTime = System.currentTimeMillis();\r\n for(int i = 0 ; i < keyCount; i++) {\r\n CHNodesMap.get(ch.getHash(\"\"+i)).incrementAndGet();\r\n }\r\n long endTime = System.currentTimeMillis();\r\n long timeElapsed = endTime - startTime;\r\n // System.out.println(\"Execution Time in milliseconds : \" + timeElapsed);\r\n\r\n // print out distriubution + clear\r\n for(Entry<String, AtomicInteger> entry : CHNodesMap.entrySet()) {\r\n System.out.println(entry.getKey() + \": \" + entry.getValue().get());\r\n entry.getValue().set(0);\r\n }\r\n \r\n // remove node 3\r\n System.out.println(\"\\n=== After Removing Node 3 ===\");\r\n ch.removeNode(\"CHNode3\");\r\n CHNodesMap.remove(\"CHNode3\");\r\n \r\n // re-add\r\n for(int i = 0 ; i < keyCount; i++) {\r\n CHNodesMap.get(ch.getHash(\"\"+i)).incrementAndGet();\r\n }\r\n \r\n // print out distriubution again\r\n for(Entry<String, AtomicInteger> entry : CHNodesMap.entrySet()) {\r\n System.out.println(entry.getKey() + \": \" + entry.getValue().get());\r\n }\r\n }", "static int size_of_cpe(String passed){\n\t\treturn 3;\n\t}", "@SuppressWarnings(\"serial\")\r\n\t@Test\r\n\tpublic void permutationsTestSize3AllEquals() throws BoundedQueueException {\r\n\t\tbq.enqueue(3);\r\n\t\tbq.enqueue(3);\r\n\t\tbq.enqueue(3);\r\n\t\tBoundedQueueCorrected<BoundedQueueCorrected<Integer>> output= bq.permutations();\r\n\t\t\r\n\t\t//size of the perm's output\r\n\t\tint expectedPermSize = 6; //fact\r\n\t\tint actualPermSize = output.size();\t\t\r\n\t\tassertEquals(\"Tamanho do resultado final\",expectedPermSize, actualPermSize);\r\n\t\t\r\n\t\t\r\n\t\t//number of elems for each elem of perms\r\n\t\tint expectedPermNumElems = 3; \r\n\t\tint actualPermNumElems = bq.size();\r\n\t\tassertEquals(\"Numero de elementos no elems\",expectedPermNumElems, actualPermNumElems);\r\n\t\t\r\n\t\t//check if there are any duplicated\r\n\t\tArrayList<BoundedQueueCorrected<Integer>> permOutput = output.elems;\r\n\t\tList<Integer> countEquals = new ArrayList<Integer>(6){{\r\n\t\t\tadd(0);\r\n\t\t\tadd(0);\r\n\t\t\tadd(0);\r\n\t\t\tadd(0);\r\n\t\t\tadd(0);\r\n\t\t\tadd(0);\r\n\t\t}};\r\n\t\t\r\n\t\t\r\n\t\tfor(int i = 0; i < actualPermSize; i++ ){ \r\n\t\t\tfor(int j = 0; j < actualPermSize; j++ ){\r\n\t\t\t\tif(i != j){\r\n\t\t\t\t\tif(permOutput.get(i).toString().equals(permOutput.get(j).toString())){\t\t\r\n\t\t\t\t\t\tcountEquals.set(i, countEquals.get(i)+1); // counts the number of occurrences of an elem from output\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tint expectedEqualPerms = 0;\r\n\t\tint actualEqualPerms = 0;\r\n\t\t\r\n\t\tfor(Integer i : countEquals){\r\n\t\t\tif(i > 0)\r\n\t\t\t\tactualEqualPerms++;\r\n\t\t\t//if(i == expectedPermSize -1)\r\n\t\t\t\t\r\n\t\t}\r\n\t\t\t\r\n\t\tassertEquals(\"Numero de permutacoes iguais\",expectedEqualPerms, actualEqualPerms);\r\n\t}", "static int size_of_cnc(String passed){\n\t\treturn 3;\n\t}", "private void testSize() {\n init();\n assertTrue(\"FListInteger.size(l0)\", FListInteger.size(l0) == 0);\n assertTrue(\"FListInteger.size(l1)\", FListInteger.size(l1) == 1);\n assertTrue(\"FListInteger.size(l2)\", FListInteger.size(l2) == 2);\n assertTrue(\"FListInteger.size(l3)\", FListInteger.size(l3) == 3);\n }", "static int size_of_jc(String passed){\n\t\treturn 3;\n\t}", "@SuppressWarnings(\"serial\")\r\n\t@Test\r\n\tpublic void permutationsTestSize3NotAllEquals() throws BoundedQueueException {\r\n\t\tbq.enqueue(1);\r\n\t\tbq.enqueue(2);\r\n\t\tbq.enqueue(3);\r\n\t\tBoundedQueueCorrected<BoundedQueueCorrected<Integer>> output= bq.permutations();\r\n\t\t\r\n\t\t//size of the perm's output\r\n\t\tint expectedPermSize = 6; //fact\r\n\t\tint actualPermSize = output.size();\t\t\r\n\t\tassertEquals(\"Tamanho do resultado final\",expectedPermSize, actualPermSize);\r\n\t\t\r\n\t\t\r\n\t\t//number of elems for each elem of perms\r\n\t\tint expectedPermNumElems = 3; \r\n\t\tint actualPermNumElems = bq.size();\r\n\t\tassertEquals(\"Numero de elementos no elems\",expectedPermNumElems, actualPermNumElems);\r\n\t\t\r\n\t\t//check if there are any duplicated\r\n\t\tArrayList<BoundedQueueCorrected<Integer>> permOutput = output.elems;\r\n\t\tList<Integer> countEquals = new ArrayList<Integer>(6){{\r\n\t\t\tadd(0);\r\n\t\t\tadd(0);\r\n\t\t\tadd(0);\r\n\t\t\tadd(0);\r\n\t\t\tadd(0);\r\n\t\t\tadd(0);\r\n\t\t}};\r\n\t\t\r\n\t\t\r\n\t\tfor(int i = 0; i < actualPermSize; i++ ){ \r\n\t\t\tfor(int j = 0; j < actualPermSize; j++ ){\r\n\t\t\t\tif(i != j){\r\n\t\t\t\t\tif(permOutput.get(i).toString().equals(permOutput.get(j).toString())){\t\t\r\n\t\t\t\t\t\tcountEquals.set(i, countEquals.get(i)+1); // counts the number of occurrences of an elem from output\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tint expectedEqualPerms = 0;\r\n\t\tint actualEqualPerms = 0;\r\n\t\t\r\n\t\tfor(Integer i : countEquals){\r\n\t\t\tif(i > 0)\r\n\t\t\t\tactualEqualPerms++;\r\n\t\t\t//if(i == expectedPermSize -1)\r\n\t\t\t\t\r\n\t\t}\r\n\t\t\t\r\n\t\tassertEquals(\"Numero de permutacoes iguais\",expectedEqualPerms, actualEqualPerms);\r\n\t}", "static int size_of_cc(String passed){\n\t\treturn 3;\n\t}", "static int size_of_cma(String passed){\n\t\treturn 1;\n\t}", "public void testLength() {\n test1.insert(new Buffer(3, rec));\n test1.insert(new Buffer(3, rec));\n test1.insert(new Buffer(3, rec));\n test1.insert(new Buffer(3, rec));\n test1.insert(new Buffer(3, rec));\n test1.insert(new Buffer(3, rec));\n assertEquals(6, test1.length());\n }", "public static int commonCharacterCount(String s1, String s2) {\n\t int count = 0;\n\t int auxArray[] = new int[s2.length()];\n\t for (int i = 0; i < auxArray.length; i++){\n\t\tauxArray[i] = 0;\n\t }\n\t \n\t for(int i = 0; i < s1.length(); i++){\n\t\tfor(int j = 0; j < s2.length(); j++){\n\t\t if( auxArray[j] == 1){\n\t\t continue;\n\t\t }\n\t\t else{\n\t\t if(s1.charAt(i) == s2.charAt(j)){\n\t\t auxArray[j] = 1;\n\t\t count += 1;\n\t\t break;\n\t\t }\n\t\t }\n\t\t}\n\t }\n\t return count;\n\t}", "@Test \r\n void add_mutiple_edges_check_size(){\r\n for(int i = 0; i < 20; i++) {\r\n graph.addEdge(\"\" + i, \"\" + (i + 1));\r\n } \r\n List<String> adjacent;\r\n for(int i = 0; i < 20; i++) {\r\n adjacent = graph.getAdjacentVerticesOf(\"\"+i);\r\n if(!adjacent.contains(\"\" + (i+1))) {\r\n fail();\r\n }\r\n }\r\n if(graph.size() != 20 | graph.order() != 21) {\r\n fail();\r\n }\r\n \r\n }", "public void testSize() {\n assertEquals(10, maze1.size());\n }", "@Test\r\n\tvoid testSize() {\r\n\t\tSimpleList test = new SimpleList();\r\n\t\tint output = test.size();\r\n\t\tassertEquals(10, output);\r\n\t}", "@Test\n void test05_checkSize() {\n graph.addVertex(\"a\");\n graph.addVertex(\"b\");\n graph.addVertex(\"c\"); // adds three vertices\n graph.addEdge(\"a\", \"b\");\n graph.addEdge(\"b\", \"c\");\n graph.addEdge(\"c\", \"b\"); // add three edges\n if (graph.size() != 3) {\n fail(\"graph has counted incorrect number of edges\");\n }\n }", "private void verifyNodeList(CyNetwork cyNetwork) {\n\t\tint nodeCount = cyNetwork.getNodeCount();\n\t\tassertEquals(12, nodeCount);\n\n\t\t// This HashMap contains all expected nodes.\n\t\t// But node identifier is now a auto-generated md5hex digest; \n\t\t// so it's easier to test here by using biopax.rdfid values instead)\n\t\tMap<String, String> nodeMap = new HashMap<String, String>();\n\t\tnodeMap.put(\"physicalEntityParticipant44\", \"\");\n\t\tnodeMap.put(\"physicalEntityParticipant31\", \"\");\n\t\tnodeMap.put(\"physicalEntityParticipant9\", \"\");\n\t\tnodeMap.put(\"physicalEntityParticipant17\", \"\");\n\t\tnodeMap.put(\"physicalEntityParticipant22\", \"\");\n\t\tnodeMap.put(\"physicalEntityParticipant26\", \"\");\n\t\tnodeMap.put(\"physicalEntityParticipant38\", \"\");\n\t\tnodeMap.put(\"physicalEntityParticipant99\", \"\");\n\t\t\n\t\t// These represent interaction nodes\n\t\tnodeMap.put(\"catalysis43\", \"\");\n\t\tnodeMap.put(\"biochemicalReaction6\", \"\");\n\t\tnodeMap.put(\"biochemicalReaction37\", \"\");\n\t\tnodeMap.put(\"catalysis5\", \"\");\n\n\t\t// We don't know the order of nodes; so use nodeMap for look up.\n\t\tIterator nodeIterator = cyNetwork.nodesIterator();\n\n\t\twhile (nodeIterator.hasNext()) {\n\t\t\tCyNode node = (CyNode) nodeIterator.next();\n\t\t\tString id = node.getIdentifier();\n\t\t\tString uri = Cytoscape.getNodeAttributes()\n\t .getStringAttribute(id, MapBioPaxToCytoscape.BIOPAX_RDF_ID);\n\t\t\t// Test a specific node label\n\t\t\tif (uri.endsWith(\"physicalEntityParticipant99\")) {\n\t\t\t\tString label = Cytoscape.getNodeAttributes()\n\t\t\t\t .getStringAttribute(id, BioPaxVisualStyleUtil.BIOPAX_NODE_LABEL);\n\t\t\t\tassertEquals(\"Mg2+\", label);\n\t\t\t}\n\n\t\t\tfor(String key : new HashSet<String>(nodeMap.keySet())) {\n\t\t\t\tif(uri.contains(key)) {\n\t\t\t\t\tnodeMap.put(key, \"found!\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Verify that we found all expected node identifiers.\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor (String key : nodeMap.keySet()) {\n\t\t\tif (nodeMap.get(key).isEmpty())\n\t\t\t\tsb.append(key).append(\",\");\n\t\t}\n\t\tif(sb.length() > 0)\n\t\t\tfail(\"Network does not contain: \" + sb.toString());\n\t}", "@Test\n public void identicalLinearGraphsTest() throws Exception {\n // Create two a->b->c->d graphs\n String events[] = new String[] { \"a\", \"b\", \"c\", \"d\" };\n EventNode[] g1Nodes = getChainTraceGraphNodesInOrder(events);\n EventNode[] g2Nodes = getChainTraceGraphNodesInOrder(events);\n\n // Check that g1 and g2 are equivalent for all k at every corresponding\n // node, regardless of subsumption.\n\n // NOTE: both graphs have an additional INITIAL and TERMINAL nodes, thus\n // the +2 in the loop condition.\n EventNode e1, e2;\n for (int i = 0; i < (events.length + 2); i++) {\n e1 = g1Nodes[i];\n e2 = g2Nodes[i];\n for (int k = 1; k < 6; k++) {\n testKEqual(e1, e2, k);\n testKEqual(e1, e1, k);\n }\n }\n }", "private static int countCommon(String[] a1, String[] a2) {\n\t\tHashSet<String> hs = new HashSet<String>();\r\n\t\tfor(int i=0 ; i < a1.length ; i++) {\r\n\t\t\ths.add(a1[i]);\r\n\t\t}\r\n\t\tString s1[] = new String[hs.size()];\r\n\t\ths.toArray(s1);\r\n\t\tHashSet<String> hs2 = new HashSet<String>();\r\n\t\tfor( int j=0 ;j < a2.length ;j++) {\r\n\t\t\ths2.add(a2[j]);\r\n\t\t}\r\n\t\tString s2[] = new String[hs2.size()];\r\n\t\ths2.toArray(s2);\r\n\t\tint count=0;\r\n\t\tfor(int i=0;i<s1.length;i++)\r\n\t\t{\t\r\n\t\t\tfor(int j=0;j<s2.length;j++)\r\n\t\t\t{\r\n\t\t\t\tif(s1[i].equals(s2[j]))\r\n\t\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn count;\t\t\r\n\t}", "static int size_of_stax(String passed){\n\t\treturn 1;\n\t}", "@Test\r\n public void testSize1() {\r\n Assert.assertEquals(5, set1.size());\r\n }", "@Test\r\n public void test5() {\r\n String[] words = new String[] {\r\n \"A\", \"B\", \"C\", \"D\", \"E\", \"F\", \"F\", \"B\", \"H\", \"I\", \"J\", \"K\"\r\n };\r\n \r\n Assert.assertEquals(shortestDistanceBetween(words, \"B\", \"F\"), 1);\r\n Assert.assertEquals(shortestDistanceBetween(words, \"A\", \"E\"), 4);\r\n Assert.assertEquals(shortestDistanceBetween(words, \"I\", \"A\"), 9);\r\n }", "@Test\n public void aminoCountsTest2(){\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(b);\n int[] expected = {2,1,1,1};\n assertArrayEquals(expected, first.aminoAcidCounts());\n }", "@Test\n public void testEditDistEqualStrings() throws Exception{\n assertEquals(0,Esercizio2.edit_distance_dyn(s1,s4));\n }", "static int size_of_rnz(String passed){\n\t\treturn 1;\n\t}", "@Test\n public void testRetainAll_Size() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(3);\n instance.add(2);\n instance.add(1);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n\n Collection c = Arrays.asList(2, 3);\n instance.retainAll(c);\n\n int expectedResult = 5;\n assertEquals(expectedResult, instance.size());\n\n }", "public static void main(String args[]) {\n IsIdenticalLists llist1 = new IsIdenticalLists();\n IsIdenticalLists llist2 = new IsIdenticalLists();\n\n /* The constructed linked lists are :\n llist1: 3->2->1\n llist2: 3->2->1 */\n\n llist1.push(1);\n llist1.push(2);\n llist1.push(3);\n\n llist2.push(1);\n llist2.push(2);\n llist2.push(3);\n\n if (llist1.areIdentical(llist2) == true)\n System.out.println(\"Identical \");\n else\n System.out.println(\"Not identical \");\n\n }", "public static void main(String[] args) {\n\t\tString vertex=\"abcdefghij\";\n\t\tString edge=\"bdegachiabefbc\";\n\t\tchar[] vc=vertex.toCharArray();\n\t\tchar[] ec=edge.toCharArray();\n\t\tint[] v=new int[vc.length];\n\t\tfor (int i = 0; i < v.length; i++) {\n\t\t\tv[i]=vc[i]-'a'+1;\n\t\t}\n\t\tint[] e=new int[ec.length];\n\t\tfor (int i = 0; i < e.length; i++) {\n\t\t\te[i]=ec[i]-'a'+1;\n\t\t}\t\t\n\t\t\n\t\tDS_List ds_List=new DS_List(v.length);\n//\t\tfor (int i = 0; i < v.length; i++) {\n//\t\t\tds_List.make_set(v[i]);\n//\t\t}\n//\t\tfor (int i = 0; i < e.length; i=i+2) {\n//\t\t\tif (ds_List.find_set(e[i])!=ds_List.find_set(e[i+1])) {\n//\t\t\t\tds_List.union(e[i], e[i+1]);\n//\t\t\t}\n//\t\t}\n\t\tds_List.connect_components(v, e);\n\t\tfor (int i = 0; i < v.length; i++) {\n\t\t\tSystem.out.print(ds_List.find_set(v[i])+\" \");\n\t\t}\n\t\tSystem.out.println();\n\t\tSystem.out.println(ds_List.same_component(v[1], v[2]));\n\t}", "private void testSize() {\n System.out.println(\"------ TESTING: size() ----- \");\n System.out.println(\"Expected: \" +iSize);\n System.out.print(\"Returned: \");\n try{\n if(iTestList.size() != iSize)\n throw new RuntimeException(\"FAILED -> test size not matching\");\n else\n System.out.print(iTestList.size());\n }catch(RuntimeException e){\n System.out.print(e.getMessage());\n }\n System.out.print(\"\\n\");\n }", "@Test\n public void testSize_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n int expResult = 6;\n\n instance.add(1);\n instance.add(2);\n instance.add(3);\n instance.add(4);\n instance.add(5);\n instance.add(6);\n\n long result = instance.size();\n assertEquals(expResult, result);\n\n }", "int stringsConstruction(String a, String b){\n a=\" \"+a+\" \";\n b=\" \"+b+\" \";\n int output = b.split(\"\"+a.charAt(1)).length - 1;\n for(char i = 'a'; i <= 'z'; i++) {\n if (a.split(\"\"+i).length > 1) {\n int tempOut = (b.split(\"\"+i).length - 1) / (a.split(\"\"+i).length - 1);\n if (output > tempOut) {\n output = tempOut;\n }//if (output > tempOut) {\n }//if (a.split(\"\"+i).length > 1) {\n }//for(char i = 'a'; i <= 'z'; i++) {\n return output;\n }", "static int size_of_aci(String passed){\n\t\treturn 2;\n\t}", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n DefaultNucleotideCodec defaultNucleotideCodec0 = DefaultNucleotideCodec.INSTANCE;\n DefaultNucleotideCodec defaultNucleotideCodec1 = DefaultNucleotideCodec.INSTANCE;\n DefaultNucleotideCodec defaultNucleotideCodec2 = DefaultNucleotideCodec.INSTANCE;\n Nucleotide nucleotide0 = Nucleotide.Pyrimidine;\n Set<Nucleotide> set0 = nucleotide0.getBasesFor();\n byte[] byteArray0 = defaultNucleotideCodec1.encode((Collection<Nucleotide>) set0);\n Nucleotide nucleotide1 = defaultNucleotideCodec0.decode(byteArray0, 0L);\n assertEquals(Nucleotide.Cytosine, nucleotide1);\n \n defaultNucleotideCodec1.getNumberOfGapsUntil(byteArray0, 1717986918);\n DefaultNucleotideCodec defaultNucleotideCodec3 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec3.getUngappedLength(byteArray0);\n DefaultNucleotideCodec defaultNucleotideCodec4 = DefaultNucleotideCodec.INSTANCE;\n int int0 = defaultNucleotideCodec4.getUngappedOffsetFor(byteArray0, (-1209));\n assertEquals((-1209), int0);\n \n int int1 = defaultNucleotideCodec2.getGappedOffsetFor(byteArray0, (-1209));\n assertEquals(2, int1);\n \n defaultNucleotideCodec2.getGappedOffsetFor(byteArray0, 1717986918);\n DefaultNucleotideCodec defaultNucleotideCodec5 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec5.decodedLengthOf(byteArray0);\n defaultNucleotideCodec0.decodedLengthOf(byteArray0);\n DefaultNucleotideCodec defaultNucleotideCodec6 = DefaultNucleotideCodec.INSTANCE;\n DefaultNucleotideCodec defaultNucleotideCodec7 = DefaultNucleotideCodec.INSTANCE;\n int int2 = defaultNucleotideCodec7.getGappedOffsetFor(byteArray0, 0);\n int int3 = defaultNucleotideCodec6.getNumberOfGapsUntil(byteArray0, 5);\n assertTrue(int3 == int2);\n assertArrayEquals(new byte[] {(byte)0, (byte)0, (byte)0, (byte)2, (byte) (-34)}, byteArray0);\n assertEquals(0, int3);\n }", "@Test\n\tpublic void testDifference5() {\n\n\t\t// parameters inpt here\n\n\t\tint[] arr = { 1, 2, 3, 5, 7, 8, 9 };\n\t\tint[] diff1 = { 1, 2, 3, 7, 8 }; // this list\n\n\t\t// test difference\n\t\tSLLSet listObj2 = new SLLSet(arr);\n\t\tSLLSet listObj19 = new SLLSet(diff1);\n\t\tSLLSet listObj20 = listObj2.difference(listObj19);\n\n\t\tString expected = \"5, 9\";\n\t\tint expectedSize = 2;\n\n\t\tassertEquals(expectedSize, listObj20.getSize());\n\t\tassertEquals(expected, listObj20.toString());\n\n\t}", "public static void main(String[] args){\n System.out.println(linuxRules(\"/c/d/////././../e/\"));\n// System.out.println(linuxRules(\"/c/d/////././../e/..\"));\n// System.out.println(linuxRules(\"/c/d/////././../ed/..\"));\n// System.out.println(linuxRules(\"/c/d/////././../ed/.\"));\n /* String[] strs = new String[]{\"flower\",\"ooow\",\"flight\",\"flosh\"};\n System.out.println(longestCommonPrefix(strs));*/\n /* System.out.println( findRealParentheses(\"()[]{}\"));\n System.out.println( findRealParentheses(\"))[]{}\"));\n System.out.println( findRealParentheses(\"()[]{(}\"));\n System.out.println( findRealParentheses(\"[()[]]{}\"));*/\n /*Integer[] firstList = new Integer[]{1, 5, 6};\n Integer[] secondList = new Integer[]{1, 3, 4, 6};\n int i = 0;\n Integer[] combileList = combine(firstList, secondList);\n while (i < combileList.length) {\n System.out.println(combileList[i]);\n i++;\n }*/\n /* Integer[] original = new Integer[]{0,0,1,1,1,2,2,3,3,4};\n System.out.println(deleteCommonItem(original));*/\n /* Integer[] original = new Integer[]{3,2,3,1,4,5,3,2,1};\n System.out.println(deleteAssignItem(original, 3));*/\n// System.out.println(indexOf(\"hello\", \"ll\"));\n// System.out.println(indexOf(\"aaaaa\", \"aab\"));\n\n /* System.out.println(longest(\"abcabcbb\"));\n System.out.println(longest(\"bbbbb\"));\n System.out.println(longest(\"pwwkew\"));*/\n\n /*System.out.println(longestPalindromeStr(\"babad\"));\n System.out.println(longestPalindromeStr(\"cyyoacmjwjubfkzrrbvquqkwhsxvmytmjvbborrtoiyotobzjmohpadfrvmxuagbdczsjuekjrmcwyaovpiogspbslcppxojgbfxhtsxmecgqjfuvahzpgprscjwwutwoiksegfreortttdotgxbfkisyakejihfjnrdngkwjxeituomuhmeiesctywhryqtjimwjadhhymydlsmcpycfdzrjhstxddvoqprrjufvihjcsoseltpyuaywgiocfodtylluuikkqkbrdxgjhrqiselmwnpdzdmpsvbfimnoulayqgdiavdgeiilayrafxlgxxtoqskmtixhbyjikfmsmxwribfzeffccczwdwukubopsoxliagenzwkbiveiajfirzvngverrbcwqmryvckvhpiioccmaqoxgmbwenyeyhzhliusupmrgmrcvwmdnniipvztmtklihobbekkgeopgwipihadswbqhzyxqsdgekazdtnamwzbitwfwezhhqznipalmomanbyezapgpxtjhudlcsfqondoiojkqadacnhcgwkhaxmttfebqelkjfigglxjfqegxpcawhpihrxydprdgavxjygfhgpcylpvsfcizkfbqzdnmxdgsjcekvrhesykldgptbeasktkasyuevtxrcrxmiylrlclocldmiwhuizhuaiophykxskufgjbmcmzpogpmyerzovzhqusxzrjcwgsdpcienkizutedcwrmowwolekockvyukyvmeidhjvbkoortjbemevrsquwnjoaikhbkycvvcscyamffbjyvkqkyeavtlkxyrrnsmqohyyqxzgtjdavgwpsgpjhqzttukynonbnnkuqfxgaatpilrrxhcqhfyyextrvqzktcrtrsbimuokxqtsbfkrgoiznhiysfhzspkpvrhtewthpbafmzgchqpgfsuiddjkhnwchpleibavgmuivfiorpteflholmnxdwewj\"));*/\n\n /* int[] rec1 = {7,8,13,15};\n int[] rec2 = {10,8,12,20};\n System.out.println(isRectangleOverlap(rec1, rec2));*/\n /* 输入: A = [1,2,3,0,0,0], m = 3; B = [2,5,6], n = 3\n 输出: [1,2,2,3,5,6]*/\n\n// System.out.println(validPalindrome(\"lcuppucul\") );\n// System.out.println(maxPower(\"t\") );\n// System.out.println(CheckPermutation(\"abc\", \"bca\") );\n// System.out.println(reverseOnlyLetters(\"Test1ng-Leet=code-Q!\") );\n// System.out.println(countSegments(\", , , , a, eaefa\") );\n\n// System.out.println(reverseWords(\"the sky is blue\") );\n }", "static int size_of_sbb(String passed){\n\t\treturn 1;\n\t}", "static int size_of_cz(String passed){\n\t\treturn 3;\n\t}", "@Test\n public void testDiffConstraint () throws IOException\n {\n CacheList clist = new CacheList(new Scanner(\n \"GCABCD\\tAs The World Turns\\tbunny\\t1\\t1\\tN40 45.875\\tW111 48.986\\nGCRQWK\\tOld Three Tooth\\tgeocadet\\t3.5\\t3\\tN40 45.850\\tW111 48.045\\n\"));\n clist.setDifficultyConstraints(2, 4);\n ArrayList<Cache> selected = clist.select();\n assertEquals(\"GCRQWK\", selected.get(0).getGcCode());\n }", "@Test\r\n\tvoid testSize3() {\r\n\t\tSimpleList test = new SimpleList();\r\n\t\ttest.add(1);\r\n\t\ttest.remove(1);\r\n\t\tint output = test.size();\r\n\t\tassertEquals(8, output);\r\n\t}", "@Test\n\tvoid testFindAllAnagramsInAString() {\n\t\tList<Integer> actual = new FindAllAnagramsInAString().findAnagrams(\"cbaebabacd\", \"abc\");\n\t\tList<Integer> expected = Arrays.asList(0, 6);\n\t\tassertEquals(expected.size(), actual.size());\n\t\tassertEquals(new HashSet<Integer>(expected), new HashSet<Integer>(actual));\n\n\t\tactual = new FindAllAnagramsInAString().findAnagrams(\"abab\", \"ab\");\n\t\texpected = Arrays.asList(0, 1, 2);\n\t\tassertEquals(expected.size(), actual.size());\n\t\tassertEquals(new HashSet<Integer>(expected), new HashSet<Integer>(actual));\n\n\t\tactual = new FindAllAnagramsInAString().findAnagrams(\"\", \"abc\");\n\t\texpected = Arrays.asList();\n\t\tassertEquals(expected.size(), actual.size());\n\t\tassertEquals(new HashSet<Integer>(expected), new HashSet<Integer>(actual));\n\n\t\tactual = new FindAllAnagramsInAString().findAnagrams(\"baa\", \"aa\");\n\t\texpected = Arrays.asList(1);\n\t\tassertEquals(expected.size(), actual.size());\n\t\tassertEquals(new HashSet<Integer>(expected), new HashSet<Integer>(actual));\n\n\t\tactual = new FindAllAnagramsInAString().findAnagrams(\"baa\", \"aa\");\n\t\texpected = Arrays.asList(1);\n\t\tassertEquals(expected.size(), actual.size());\n\t\tassertEquals(new HashSet<Integer>(expected), new HashSet<Integer>(actual));\n\n\t\tactual = new FindAllAnagramsInAString().findAnagrams(\"bpaa\", \"aa\");\n\t\texpected = Arrays.asList(2);\n\t\tassertEquals(expected.size(), actual.size());\n\t\tassertEquals(new HashSet<Integer>(expected), new HashSet<Integer>(actual));\n\t}", "static int size_of_rnc(String passed){\n\t\treturn 1;\n\t}", "public static void main(String[] args) {\n\n String s = \"aaa\";\n int output = 6;\n\n Solution solution = new Solution();\n int result = solution.countSubstrings(s);\n System.out.println(\"output: \" + output);\n System.out.println(\"result: \" + result);\n System.out.println(output == result);\n }", "private static int howManyDigitsMatch(UNumber newGuess, UNumber oldGuess) {\r\n\t\t\t// If the characteristics is not the same, the digits in the mantissa do not matter\r\n\t\t\tif (newGuess.getCharacteristic() != oldGuess.getCharacteristic()) return 0;\r\n\t\t\t\r\n\t\t\t// The characteristic is the same, so fetch the mantissas so we can compare them\r\n\t\t\tbyte[] newG = newGuess.getMantissa();\r\n\t\t\tbyte[] oldG = oldGuess.getMantissa();\r\n\t\t\t\r\n\t\t\t// Computer the shorter of the two\r\n\t\t\tint size = newGuess.length();\r\n\t\t\t//System.out.println(size);\r\n\t\t\tint otherOne = oldGuess.length();\r\n\t\t\tif (otherOne < size) \r\n\t\t\t\tsize = otherOne;\r\n\t\t\t\r\n\t\t\t// Loop through the digits as long as they match\r\n\t\t\tfor (int ndx = 0; ndx < size; ndx++)\r\n\t\t\t\tif (newG[ndx] != oldG[ndx]) return ndx;\t// If the don't match, ndx is the result\r\n\t\t\t\r\n\t\t\t// If the loop completes, then the size of the shorter is the length of the match\r\n\t\t\treturn size;\r\n\t\t}", "private static void assertEqual(List<byte[]> actual, List<byte[]> expected) {\n if (actual.size() != expected.size()) {\n throw new AssertionError(String.format(\"Different amount of chunks, expected %d actual %d\", expected.size(), actual.size()));\n }\n for (int i = 0; i < actual.size(); i++) {\n byte[] act = actual.get(i);\n byte[] exp = expected.get(i);\n if (act.length != exp.length) {\n throw new AssertionError(String.format(\"Chunks #%d differed in length, expected %d actual %d\", i, exp.length, act.length));\n }\n for (int j = 0; j < act.length; j++) {\n if (act[j] != exp[j]) {\n throw new AssertionError(String.format(\"Chunks #%d differed at index %d, expected %d actual %d\", i, j, exp[j], act[j]));\n }\n }\n }\n }", "static int makeAnagram(String a, String b) {\n \n \tchar arr[] = a.toCharArray();\n char brr[] = b.toCharArray();\n Arrays.sort(arr);\n Arrays.sort(brr);\n Map<Character, Integer> aMap = new HashMap<>();\n Map<Character, Integer> bMap = new HashMap<>();\n for(int i =0 ;i <arr.length;i++){\n \tif(!aMap.containsKey(arr[i])){\n \t\taMap.put(arr[i], 1);\n \t}else{\n \t\taMap.put(arr[i], aMap.get(arr[i])+1);\n \t}\n }\n for(int i =0 ;i <brr.length;i++){\n \tif(!bMap.containsKey(brr[i])){\n \t\tbMap.put(brr[i], 1);\n \t}else{\n \t\tbMap.put(brr[i], bMap.get(brr[i])+1);\n \t}\n }\n int removeCharCount = 0;\n \n for(char ch = 'a'; ch<='z';ch++){\n \tif(aMap.containsKey(ch) && bMap.containsKey(ch)){\n \t\tif(aMap.get(ch) > bMap.get(ch)){\n \t\t\tint count = aMap.get(ch) - bMap.get(ch);\n \t\t\tremoveCharCount+=count;\n \t\t\taMap.put(ch, aMap.get(ch) - count);\n \t\t}else if(aMap.get(ch) < bMap.get(ch)){\n \t\t\tint count = bMap.get(ch) - aMap.get(ch);\n \t\t\tremoveCharCount+=count;\n \t\t\taMap.put(ch, bMap.get(ch) - count);\n \t\t}\n \t}else if(aMap.containsKey(ch) && !bMap.containsKey(ch)){\n \t\tint count = aMap.get(ch);\n \t\tremoveCharCount+=count;\n \t\taMap.remove(ch);\n \t}else if(!aMap.containsKey(ch) && bMap.containsKey(ch)){\n \t\tint count = bMap.get(ch);\n \t\tremoveCharCount+=count;\n \t\tbMap.remove(ch);\n \t}\n }\n /* if(removeCharCount == Math.min(arr.length, brr.length)){\n \treturn 0;\n }*/\n return removeCharCount;\n }", "static int size_of_sta(String passed){\n\t\treturn 3;\n\t}", "static int size_of_cm(String passed){\n\t\treturn 3;\n\t}", "@Test\n\tpublic void testSLLSet() {\n\n\t\t// test constructor 1\n\t\tSLLSet listObj1 = new SLLSet();\n\t\tString expectedSet = \"\";\n\t\tint expectedSize = 0;\n\t\tassertEquals(expectedSize, listObj1.getSize());\n\t\tassertEquals(expectedSet, listObj1.toString());\n\t}", "static int size_of_dcr(String passed){\n\t\treturn 1;\n\t}", "public int getSize()\n\t{\n\t\t// returns n, the number of strings in the list: O(n).\n\t\tint count = 0;\n \t\tnode p = head; \n\t\twhile (p != null)\n \t\t{\n \t\tcount ++;\n \t\tp = p.next;\n \t\t}\n \t\treturn count;\n\t}", "static int alternate(String s) {\n HashMap<Character,Integer>mapCharacter = new HashMap<>();\n LinkedList<String>twoChar=new LinkedList<>();\n LinkedList<Character>arr=new LinkedList<>();\n Stack<String>stack=new Stack<>();\n int largest=0;\n int counter=0;\n if (s.length()==1){\n return 0;\n }\n\n for (int i =0; i<s.length();i++){\n if (mapCharacter.get(s.charAt(i))==null)\n {\n mapCharacter.put(s.charAt(i),1);\n }\n }\n\n Iterator iterator=mapCharacter.entrySet().iterator();\n while (iterator.hasNext()){\n counter++;\n Map.Entry entry=(Map.Entry)iterator.next();\n arr.addFirst((Character) entry.getKey());\n }\n\n for (int i=0;i<arr.size();i++){\n for (int j=i;j<arr.size();j++){\n StringBuilder sb =new StringBuilder();\n for (int k=0;k<s.length();k++){\n if (s.charAt(k)==arr.get(i)||s.charAt(k)==arr.get(j)){\n sb.append(s.charAt(k));\n }\n }\n twoChar.addFirst(sb.toString());\n }\n }\n\n\n for (int b=0;b<twoChar.size();b++){\n String elementIn=twoChar.get(b);\n stack.push(elementIn);\n\n for (int i=0;i<elementIn.length()-1;i++){\n\n if (elementIn.charAt(i)==elementIn.charAt(i+1)){\n stack.pop();\n break;\n }\n }\n }\n\n int stackSize=stack.size();\n\n for (int j=0;j<stackSize;j++){\n String s1=stack.pop();\n int length=s1.length();\n if (length>largest){\n largest=length;\n\n }\n }\n return largest;\n\n\n\n\n }", "static int size_of_jm(String passed){\n\t\treturn 3;\n\t}", "@Test\n public void testContinguosStorageReSize() {\n for (int i = 9; i >= 0; i--) {\n String input = String.format(\"b0%d\", i);\n list.addToFront(input);\n }\n\n list.addToFront(\"Filler1\");\n list.addToBack(\"Filler2\");\n list.addToBack(\"Filler3\");\n list.addToFront(\"Filler0\");\n list.addAtIndex(0, \"Filler#\");\n list.addAtIndex(2, \"Filler!\");\n list.addAtIndex(6, \"Filler$\");\n list.removeFromFront();\n list.removeFromBack();\n list.removeAtIndex(4);\n list.removeAtIndex(0);\n list.removeAtIndex(2);\n\n int actualCapacity = ((Object[]) (list.getBackingArray())).length;\n for (int i = 0; i < list.size(); i++) {\n Assert.assertNotNull(((Object[]) (list.getBackingArray()))[i]);\n }\n for (int i = list.size(); i < actualCapacity; i++) {\n Assert.assertNull(((Object[]) (list.getBackingArray()))[i]);\n }\n }", "@Test\n public void testKMP() {\n\n int[] next = getNextArr(modeStr);\n ////int[] next = getNext2(modeStr);\n ////int[] next = getNext(modeStr);\n log.info(JSON.toJSONString(next));\n\n final char[] charArr = mainStr.toCharArray();\n final char[] modeCharArr = modeStr.toCharArray();\n final int charLen = charArr.length;\n final int modeCharLen = modeCharArr.length;\n int match = 0;\n int compareCount = 0;\n for (int i = 0; i < charLen - modeCharLen +1; ) {\n int offset = 1;\n for (int j = 0, startIndex = i; j < modeCharLen; j++) {\n int indexToBeMoved = next[j];\n compareCount++;\n log.info(\"{}与{}比较\", modeCharArr[j], charArr[startIndex]);\n if (charArr[startIndex] == modeCharArr[j]) {\n match++;\n startIndex++;\n if (match == modeCharLen) {\n //计算最终串的初始下标\n int initIndex = (--startIndex) - (modeCharLen - 1);\n log.info(\"找到下标【\" + initIndex + \"】,值为【\" + charArr[initIndex] + \"】\");\n log.info(\"比较次数:{}\", compareCount);\n return;\n }\n } else if (indexToBeMoved == -1) {\n startIndex++;\n match = 0;\n break;\n } else if (indexToBeMoved >= 0) {\n //log.error(\"记录下标{}\",i+match);\n offset = (modeCharLen - indexToBeMoved - 1);\n offset = offset > (charLen - modeCharLen) ? 1 : offset;\n match = 0;\n break;\n }\n }\n i += offset;\n }\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tString s =\"hhpddlnnsjfoyxpciioigvjqzfbpllssuj\";\r\n\t\tint noOfChange=0;\r\n\t\r\n\t\t\r\n\t\tif(s.length()%2!=0){\r\n\t\t\t\r\n\t\t\tnoOfChange=-1;\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\t\r\n\t\t\tString sub1=s.substring(0, (s.length()/2));\r\n\t\t\tString sub2=s.substring((s.length()/2), (s.length()));\r\n\t\t\tHashMap<Character, Integer>map = new HashMap<Character,Integer>();\r\n\t\t\t\r\n\t\t\tfor(int i=0;i<sub1.length();i++){\r\n\t\t\t\tif(map.containsKey(sub1.charAt(i))){\r\n\t\t\t\t\t\r\n\t\t\t\t\tint count =map.get(sub1.charAt(i));\r\n\t\t\t\t\tcount++;\r\n\t\t\t\t\tmap.put(sub1.charAt(i), count);\r\n\t\t\t\t\t\r\n\t\t\t\t}else{\t\t\t\t\t\r\n\t\t\t\t\tmap.put(sub1.charAt(i), 1);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tSystem.out.println(sub1);\r\n\t\t\tSystem.out.println(sub2);\r\n\t\t\tfor(int i=0;i<map.size();i++){\r\n\t\t\t\r\n\t\t\t\tif(map.containsKey(sub2.charAt(i))){\r\n\t\t\t\t\tint count =map.get(sub2.charAt(i));\r\n\t\t\t\t\tcount--;\r\n\t\t\t\t\tif(count<0){\r\n\t\t\t\t\t\tnoOfChange++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tmap.put(sub2.charAt(i), count);\r\n\t\t\t\t\t\r\n\t\t\t\t}else{\r\n\t\t\t\t\tnoOfChange++;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(noOfChange);\r\n\t\t\r\n\r\n\t}", "private int commonLength( int i0, int i1 )\n {\n \tint n = 0;\n \twhile( (text[i0] == text[i1]) && (text[i0] != STOP) ){\n \t i0++;\n \t i1++;\n \t n++;\n \t}\n \treturn n;\n }", "@Test\n public void testRetainAll_Size_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n\n Collection c = Arrays.asList(3, 2, 3, 2, 3, 1, 2);\n instance.addAll(c);\n\n c = Arrays.asList(2, 3);\n instance.retainAll(c);\n\n int expectedResult = 6;\n assertEquals(expectedResult, instance.size());\n\n }", "public static void main(String[] args) {\n\n\t\t\n\t\tList<Character>st1=new ArrayList<>();\n\t\n\t\tst1.add('a');\n\t\tst1.add('b');\n\t\tst1.add('a');\n\t\tst1.add('a');\n\t\tst1.add('c');\n\t\tst1.add('t');\n\t\n\t\tSystem.out.println(st1);//[a, b, a, a, c, t]\n\t\t\n\t\tList<Character>st2=new ArrayList<>();//empty []\n\t\tfor (int i=0; i<st1.size();i++) {\n\t\t\tif(!st2.contains(st1.get(i))) {\n\t\t\t\t// created str2 [empty], we will get the element from st1 to st2 while checking if there is repetition \n\t\t\t\tst2.add(st1.get(i));\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(st2);//[a, b, c, t]\n\t\t\n\n\t}", "@Test\r\n\tpublic void testSize() {\r\n\t\tAssert.assertEquals(15, list.size());\r\n\t}", "private static boolean checkPermutationCountingHashMap(String s1, String s2) {\n // Strings are of unequal length. Cannot be permutations.\n if (s1.length() != s2.length()) return false;\n\n // Keep a track of the characters using a HashMap.\n Map<Character, Integer> map = new HashMap<Character, Integer>();\n for (int i = 0; i < s1.length(); i++) {\n // Increment count for characters in s1\n if (map.containsKey(s1.charAt(i))) {\n map.put(s1.charAt(i), map.get(s1.charAt(i)) + 1);\n } else {\n map.put(s1.charAt(i), 1);\n }\n\n // Decrement count for characters in s2\n if (map.containsKey(s2.charAt(i))) {\n map.put(s2.charAt(i), map.get(s2.charAt(i)) - 1);\n } else {\n map.put(s2.charAt(i), -1);\n }\n }\n\n // If there are any characters not present in both, some value would be -1 or 1.\n // This case would imply that the strings are not permutations.\n for (char c : map.keySet()) {\n if (map.get(c) != 0) return false;\n }\n return true;\n }", "@Test\r\n public void testGroupSimilarity() throws Exception {\r\n final List<ICluster> originalCLuster = ClusteringTestUtilities.readSpectraClustersFromResource();\r\n Collections.sort(originalCLuster);\r\n List<ICluster> l1 = new ArrayList<ICluster>(originalCLuster);\r\n\r\n final List<ICluster> originalCLuster2 = ClusteringTestUtilities.readSpectraClustersFromResource();\r\n Collections.sort(originalCLuster2);\r\n List<ICluster> l2 = new ArrayList<ICluster>(originalCLuster2);\r\n\r\n ClusterListSimilarity cd = new ClusterListSimilarity(distanceMeasure);\r\n final List<ICluster> identical = cd.identicalClusters(l1, l2);\r\n\r\n Assert.assertEquals(originalCLuster.size(), identical.size());\r\n Assert.assertTrue(l1.isEmpty());\r\n Assert.assertTrue(l2.isEmpty());\r\n }", "public int countDistinct(String s) {\n\t\tTrie root = new Trie();\n\t\tint result = 0;\n for (int i = 0; i < s.length(); i++) {\n \tTrie cur = root;\n \tfor (int j = i; j < s.length(); j++) {\n \t\tint idx = s.charAt(j) - 'a';\n \t\tif (cur.arr[idx] == null) {\n \t\t\tresult++;\n \t\t\tcur.arr[idx] = new Trie();\n \t\t}\n \t\tcur = cur.arr[idx];\n \t}\n }\n return result;\n }", "public abstract int numOfSameTypeNeighbourToReproduce();", "@Test\n public void testContinguosStorageOriginalSize() {\n list.addToFront(\"Filler1\");\n list.addToBack(\"Filler2\");\n list.addToBack(\"Filler3\");\n list.addToFront(\"Filler0\");\n list.addAtIndex(0, \"Filler#\");\n list.addAtIndex(2, \"Filler!\");\n list.addAtIndex(6, \"Filler$\");\n list.removeFromFront();\n list.removeFromBack();\n list.removeAtIndex(4);\n list.removeAtIndex(0);\n list.removeAtIndex(2);\n\n int actualCapacity = ((Object[]) (list.getBackingArray())).length;\n for (int i = 0; i < list.size(); i++) {\n Assert.assertNotNull(((Object[]) (list.getBackingArray()))[i]);\n }\n for (int i = list.size(); i < actualCapacity; i++) {\n Assert.assertNull(((Object[]) (list.getBackingArray()))[i]);\n }\n }", "static int rawNumElementsInCommon(Set s1, Set s2) {\n int result = 0;\n for (Object o1 : s1)\n if (s2.contains(o1))\n result++;\n return result;\n }", "public static void main(String[] args) {\nScanner sc=new Scanner(System.in);\r\nString input1=sc.nextLine();\r\ninput1=input1.toLowerCase();\r\nint l=input1.length();\r\nchar a[]=input1.toCharArray();\r\nint d[]=new int[1000];\r\nString str=\"\";\r\nint i=0,k1=0,k2=0,m=0,c1=0,c2=0,c3=0,l1=0,u=0,u1=0;\r\nchar b[]={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};\r\nfor(i=0;i<l;i++)\r\n{ c3=0;\r\n\tif(a[i]==' ')\r\n\t{u=i;c3=0;\r\n\t\tfor(k1=u1,k2=i-1;k1<k2 && k2>k1;k1++,k2--)\r\n\t\t{ c1=0;c2=0;\r\n\t\t\tfor(m=0;m<26;m++)\r\n\t\t\t{\r\n\t\t\t\tif(b[m]==a[k1]) {\r\n\t\t\t\tc1=m+1;}\t\r\n\t\t\t\tif(b[m]==a[k2]) {\r\n\t\t\t\t\tc2=m+1;}\t\r\n\t\t\t}\r\n\t\t\tc3=c3+Math.abs(c1-c2);\r\n\t\t}\r\n\t\tif(k1==k2) {\r\n\t\t\tfor(m=0;m<26;m++) {\r\n\t\t\t\tif(b[m]==a[k1])\r\n\t\t\t\t\tc3=c3+(m+1);\r\n\t\t\t }\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\td[l1]=c3;\r\n\t\tl1++;\r\n\t\tu1=i+1;\r\n\t\tc3=0;\r\n\t}\r\n\tif(i==l-1)\r\n\t{\r\n\t\tfor(k1=u+1,k2=i;k1<k2 && k2>k1;k1++,k2--)\r\n\t\t{ c1=0;c2=0;\r\n\t\t\tfor(m=0;m<26;m++)\r\n\t\t\t{\r\n\t\t\t\tif(b[m]==a[k1]) {\r\n\t\t\t\tc1=m+1;}\t\r\n\t\t\t\tif(b[m]==a[k2]) {\r\n\t\t\t\t\tc2=m+1;}\t\r\n\t\t\t}\r\n\t\t\tc3=c3+Math.abs(c1-c2);\r\n\t\t}\r\n\t\tif(k1==k2) {\r\n\t\t\tfor(m=0;m<26;m++) {\r\n\t\t\t\tif(b[m]==a[k1])\r\n\t\t\t\t\tc3=c3+(m+1);\r\n\t\t\t }\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\td[l1]=c3;\r\n\t\tl1++;\r\n\t\tk1=i+1;\r\n\t}\r\n}\r\n\r\n for(i=0;i<l1;i++)\r\n {\r\n\t str=str+Integer.toString(d[i]);\r\n }\r\n int ans=Integer.parseInt(str);\r\n System.out.print(ans);\r\n}", "@Test\n public void testConnectedComponents()\n {\n Collection<IIntArray> cc1 = MarkovModel.util.connectedComponents(P1);\n assertTrue(cc1.containsAll(C1));\n assertEquals(cc1.size(), C1.size());\n\n Collection<IIntArray> cc2 = MarkovModel.util.connectedComponents(P2);\n assertTrue(cc2.containsAll(C2));\n assertEquals(cc2.size(), C2.size());\n\n Collection<IIntArray> cc3 = MarkovModel.util.connectedComponents(P3);\n assertTrue(cc3.containsAll(C3));\n assertEquals(cc3.size(), C3.size()); \n }", "@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 }", "@Test\n public void aminoListTest2(){\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(d);\n char[] expected = {'C','F','K','N','T'};\n assertArrayEquals(expected, first.aminoAcidList());\n }", "static int size_of_in(String passed){\n\t\treturn 2;\n\t}", "private static int scs(String a, String b){\n int la=a.length();\n int lb=b.length();\n int [][]matrix=new int[la+1][lb+1];\n \n for(int i=1;i<=la;i++)\n matrix[i][0]=i;\n for(int i=1;i<=lb;i++)\n matrix[0][i]=i;\n \n for(int i=1;i<=la;i++){\n for(int j=1;j<=lb;j++){\n if(a.charAt(i-1)==b.charAt(j-1))\n matrix[i][j]=matrix[i-1][j-1]+1;\n else\n matrix[i][j]=Math.min(matrix[i-1][j], matrix[i][j-1])+1;\n }\n }\n\n //Printing the SCS matrix\n for(int i=0;i<=la;i++){\n for(int j=0;j<=lb;j++){\n System.out.print(matrix[i][j]+\" \");\n }\n System.out.println(\" \");\n }\n \n return matrix[la][lb];\n }", "public static void main(String[] args) {\nScanner sc=new Scanner(System.in);\r\nString a=sc.nextLine();\r\nString b=sc.nextLine();\r\nchar ch1[]=a.toCharArray();\r\nchar ch2[]=b.toCharArray();\r\nint l1=ch1.length;\r\nint l2=ch2.length;\r\nint n=0;\r\nif(l1==l2)\r\n{\r\n\tfor(int i=0;i<l1;i++)\r\n\t{\r\n\t\tif(ch1[i]!=ch2[i])\r\n\t\t{\r\n\t\t\tn=n+1;\r\n\t\t}\r\n\t}\r\n\tif(n==1)\r\n\t\tSystem.out.println(\"yes\");\r\n\telse\r\n\t\tSystem.out.println(\"no\");\r\n}\r\nelse\r\n\tSystem.out.println(\"no\");\r\n\t}", "@Test\n\tpublic void checkNumberOfDifferentRoutes() {\n\t\tassertEquals(Trains.numberDifferentRoutes(\"C\",\"C\",30), 7);\n\t}" ]
[ "0.59854275", "0.59502614", "0.5916621", "0.58778816", "0.58054", "0.57652926", "0.57104194", "0.5703489", "0.5673752", "0.5663008", "0.5661911", "0.5661232", "0.560841", "0.5565171", "0.5525813", "0.5524935", "0.55227876", "0.5515673", "0.5511595", "0.55087745", "0.5500281", "0.5498575", "0.54898274", "0.54878205", "0.5471221", "0.54671735", "0.54619575", "0.54541963", "0.5449442", "0.54354477", "0.54252297", "0.5417059", "0.54158306", "0.5396215", "0.5384983", "0.5377713", "0.5375897", "0.5373862", "0.5372217", "0.5364496", "0.5359976", "0.5359009", "0.5352638", "0.53524595", "0.53464717", "0.53448504", "0.5312978", "0.530973", "0.5306493", "0.52978444", "0.5297057", "0.5295028", "0.52948064", "0.5292923", "0.5287998", "0.52650857", "0.52624965", "0.5259833", "0.52477705", "0.5244836", "0.5244526", "0.5231851", "0.5228479", "0.5227652", "0.5221904", "0.5218231", "0.52089226", "0.52087086", "0.5206639", "0.520607", "0.5200262", "0.51969236", "0.51955265", "0.51919043", "0.5184983", "0.5184044", "0.518394", "0.5182107", "0.5181358", "0.51793313", "0.5171635", "0.5169886", "0.516407", "0.51618886", "0.51594526", "0.51567304", "0.5155181", "0.51528114", "0.5147446", "0.5144448", "0.5143468", "0.5143308", "0.5143272", "0.5141355", "0.51399726", "0.51384336", "0.51319534", "0.5130111", "0.5128089", "0.5123999" ]
0.58023256
5
///codonCompare test cases///// /TEST 9 failed INPUT: a = "CCGUUGGCACUGUUG", b = "UAUAGCGUGUUUUAUUGAUCUUGC" EXPECTED OUTPUT = 0 ACTUAL OUTPUT = 2 This test checks the difference between the count of codons of two lists. This test failed, the expected output is 0 but the method returned 2.
@Test public void codonCompare1(){ //these list are already sorted AminoAcidLL first = AminoAcidLL.createFromRNASequence(a); AminoAcidLL second = AminoAcidLL.createFromRNASequence(b); int expected = 0; assertEquals(expected, first.codonCompare(second)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void codonCompare2(){\n //these list are already sorted\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(c);\n AminoAcidLL second = AminoAcidLL.createFromRNASequence(d);\n int expected = 1;\n assertEquals(expected, first.codonCompare(second));\n\n }", "@Test\n public void aminoCompareTest1(){\n //these list are already sorted\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(c);\n AminoAcidLL second = AminoAcidLL.createFromRNASequence(d);\n int expected = 1;\n assertEquals(expected, first.aminoAcidCompare(second));\n }", "@Test\n public void aminoCompareTest2() {\n //these list are already sorted\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(c);\n AminoAcidLL second = AminoAcidLL.createFromRNASequence(c);\n int expected = 0;\n assertEquals(expected, first.aminoAcidCompare(second));\n }", "private static int countCommon(String[] a1, String[] a2) {\n\t\tHashSet<String> hs = new HashSet<String>();\r\n\t\tfor(int i=0 ; i < a1.length ; i++) {\r\n\t\t\ths.add(a1[i]);\r\n\t\t}\r\n\t\tString s1[] = new String[hs.size()];\r\n\t\ths.toArray(s1);\r\n\t\tHashSet<String> hs2 = new HashSet<String>();\r\n\t\tfor( int j=0 ;j < a2.length ;j++) {\r\n\t\t\ths2.add(a2[j]);\r\n\t\t}\r\n\t\tString s2[] = new String[hs2.size()];\r\n\t\ths2.toArray(s2);\r\n\t\tint count=0;\r\n\t\tfor(int i=0;i<s1.length;i++)\r\n\t\t{\t\r\n\t\t\tfor(int j=0;j<s2.length;j++)\r\n\t\t\t{\r\n\t\t\t\tif(s1[i].equals(s2[j]))\r\n\t\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn count;\t\t\r\n\t}", "public static void main(String[] args) {\nScanner sc=new Scanner(System.in);\r\nString a=sc.nextLine();\r\nString b=sc.nextLine();\r\nchar ch1[]=a.toCharArray();\r\nchar ch2[]=b.toCharArray();\r\nint l1=ch1.length;\r\nint l2=ch2.length;\r\nint n=0;\r\nif(l1==l2)\r\n{\r\n\tfor(int i=0;i<l1;i++)\r\n\t{\r\n\t\tif(ch1[i]!=ch2[i])\r\n\t\t{\r\n\t\t\tn=n+1;\r\n\t\t}\r\n\t}\r\n\tif(n==1)\r\n\t\tSystem.out.println(\"yes\");\r\n\telse\r\n\t\tSystem.out.println(\"no\");\r\n}\r\nelse\r\n\tSystem.out.println(\"no\");\r\n\t}", "@Test\n public void aminoCountsTest2(){\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(b);\n int[] expected = {2,1,1,1};\n assertArrayEquals(expected, first.aminoAcidCounts());\n }", "public static void main(String args[]) {\n Scanner in=new Scanner(System.in);\n String str1=in.nextLine();\n String str2=in.nextLine();\n int slen1=str1.length();\n \n int slen2=str2.length();\n int count=0;\n for(int i=0;i<(slen1-slen2+1);i++)\n {\n int num=1;\n for(int j=0;j<slen2;j++)\n {\n if(str1.charAt(i+j)!=(str2.charAt(j)))\n {\n num=0;\n }\n \n } \n if(num==1)\n {\n count++;\n }\n \n }\n System.out.println(count); \n }", "public static int commonCharacterCount(String s1, String s2) {\n\t int count = 0;\n\t int auxArray[] = new int[s2.length()];\n\t for (int i = 0; i < auxArray.length; i++){\n\t\tauxArray[i] = 0;\n\t }\n\t \n\t for(int i = 0; i < s1.length(); i++){\n\t\tfor(int j = 0; j < s2.length(); j++){\n\t\t if( auxArray[j] == 1){\n\t\t continue;\n\t\t }\n\t\t else{\n\t\t if(s1.charAt(i) == s2.charAt(j)){\n\t\t auxArray[j] = 1;\n\t\t count += 1;\n\t\t break;\n\t\t }\n\t\t }\n\t\t}\n\t }\n\t return count;\n\t}", "public static void main(String[] args) {\n\r\n\t\tString s1=\"abcd\";\r\n\t\tString s2=\"vbvabcdqwe\";\r\n\t\tchar arr1[]=s1.toCharArray();\r\n\t\tchar arr2[]=s2.toCharArray();\r\n\r\n\t\tint flag=0;\r\n\t\tfor(int i=0;i<arr1.length;i++)\r\n\t\t{\r\n\t\t\tfor(int j=i;j<arr2.length;j++)\r\n\t\t\t{\r\n\t\t\t\tif(arr1[i]==arr2[j])\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t}\t\r\n\t\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}", "public static List<Integer> lcs(List<Integer> arr1, List<Integer> arr2) {\r\n ArrayList empty = new ArrayList();\r\n /* BEFORE WE ALLOCATE ANY DATA STORAGE, VALIDATE ARGS */\r\n if (null == arr1 || 0 == arr1.size())\r\n return empty;\r\n if (null == arr2 || 0 == arr2.size())\r\n return empty;\r\n\r\n if (equalLists(arr1, arr2)) {\r\n return arr1;\r\n }\r\n\r\n /* ALLOCATE VARIABLES WE'LL NEED FOR THE ROUTINE */\r\n ArrayList<Integer> bestMatch = new ArrayList<Integer>();\r\n ArrayList<Integer> currentMatch = new ArrayList<Integer>();\r\n ArrayList<List<Integer>> dataSuffixList = new ArrayList<List<Integer>>();\r\n ArrayList<List<Integer>> lineSuffixList = new ArrayList<List<Integer>>();\r\n\r\n /* FIRST, COMPUTE SUFFIX ARRAYS */\r\n for (int i = 0; i < arr1.size(); i++) {\r\n dataSuffixList.add(arr1.subList(i, arr1.size()));\r\n }\r\n for (int i = 0; i < arr2.size(); i++) {\r\n lineSuffixList.add(arr2.subList(i, arr2.size()));\r\n }\r\n\r\n /* STANDARD SORT SUFFIX ARRAYS */\r\n IntegerListComparator comp = new IntegerListComparator();\r\n Collections.sort(dataSuffixList, comp);\r\n Collections.sort(lineSuffixList, comp);\r\n\r\n /* NOW COMPARE ARRAYS MEMBER BY MEMBER */\r\n List<?> d = null;\r\n List<?> l = null;\r\n List<?> shorterTemp = null;\r\n int stopLength = 0;\r\n int k = 0;\r\n boolean match = false;\r\n\r\n bestMatch.retainAll(empty);\r\n bestMatch.addAll(currentMatch);\r\n for (int i = 0; i < dataSuffixList.size(); i++) {\r\n d = (List) dataSuffixList.get(i);\r\n for (int j = 0; j < lineSuffixList.size(); j++) {\r\n l = (List) lineSuffixList.get(j);\r\n if (d.size() < l.size()) {\r\n shorterTemp = d;\r\n } else {\r\n shorterTemp = l;\r\n }\r\n\r\n currentMatch.retainAll(empty);\r\n k = 0;\r\n stopLength = shorterTemp.size();\r\n match = (l.get(k).equals(d.get(k)));\r\n while (k < stopLength && match) {\r\n if (l.get(k).equals(d.get(k))) {\r\n currentMatch.add((Integer) shorterTemp.get(k));\r\n k++;\r\n } else {\r\n match = false;\r\n }\r\n }\r\n if (currentMatch.size() > bestMatch.size()) {\r\n bestMatch.retainAll(empty);\r\n bestMatch.addAll(currentMatch);\r\n }\r\n }\r\n }\r\n return bestMatch;\r\n }", "@Test\n public void testComp1()\n {\n System.out.println(\"comp\");\n String compString = \"A+1\";\n assertEquals(\"0110111\", N2TCode.comp(compString));\n }", "public static void main(String[] args) {\n\n\t\tString a = \"aabbbc\", b =\"cbad\";\n\t\t// a=abc\t\t\t\tb=cab\n\t\t\n\t\t\n\t\tString a1 =\"\" , b1 = \"\"; // to store all the non duplicated values from a\n\t\t\n\t\tfor(int i=0; i<a.length();i++) {\n\t\t\tif(!a1.contains(a.substring(i,i+1)))\n\t\t\t\ta1 += a.substring(i,i+1);\n\t\t}\n\t\t\n\t\tfor(int i=0; i<b.length();i++) {\n\t\t\tif(!b1.contains(b.substring(i,i+1)))\n\t\t\t\tb1 += b.substring(i,i+1);\n\t\t}\n\t\t\t\t\n\t\tchar[] ch1 = a1.toCharArray();\n\t\tSystem.out.println(Arrays.toString(ch1));\n\t\t\n\t\tchar[] ch2 = b1.toCharArray();\n\t\tSystem.out.println(Arrays.toString(ch2));\n\t\t\n\t\tArrays.sort(ch1);\n\t\tArrays.sort(ch2);\n\t\t\n\t\tSystem.out.println(\"=====================================================\");\n\t\t\n\t\tSystem.out.println(Arrays.toString(ch1));\n\t\tSystem.out.println(Arrays.toString(ch2));\n\t\t\n\t\tString str1 = Arrays.toString(ch1);\n\t\tString str2 = Arrays.toString(ch2);\n\t\t\n\t\tif(str1.contentEquals(str2)) {\n\t\t\tSystem.out.println(\"true, they build out of same letters\");\n\t\t}else { \n\t\t\tSystem.out.println(\"fasle, there is something different\");\n\t\t}\n\t\t\n\n\t\t\n\t\t// SHORTER SOLUTION !!!!!!!!!!!!!!!!!!!!\n\t\t\n//\t\tString Str1 = \"aaaabbbcc\", Str2 = \"cccaabbb\";\n//\t\t\n//\t\tStr1 = new TreeSet<String>( Arrays.asList(Str1.split(\"\"))).toString();\n//\t\tStr2 = new TreeSet<String>( Arrays.asList(Str2.split(\"\"))).toString();\n//\t\tSystem.out.println(Str1.equals(Str2));\n//\t\t\n//\t\t\n\t\t\n}", "static int countCommon(Node a, Node b) {\n\t\tint count = 0;\n\n\t\t// loop to count coomon in the list starting\n\t\t// from node a and b\n\t\tfor (; a != null && b != null; a = a.next, b = b.next)\n\n\t\t\t// increment the count for same values\n\t\t\tif (a.data == b.data)\n\t\t\t\t++count;\n\t\t\telse\n\t\t\t\tbreak;\n\n\t\treturn count;\n\t}", "public static void main(String[] args) {\n\t\tString s=\"geeks\";\r\n\t\tString s1=\"egeks\";\r\n\t\tint m=s.length();\r\n\t\tint n=s1.length();\r\n\t\tfor(int i=0;i<m;i++)\r\n\t\t{\r\n\t\t\tfor(int j=0;j<n;j++)\r\n\t\t\t{\r\n\t\t\t\tif(s.charAt(i)!=s1.charAt(j))\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"no of index\"+i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "@Test\n public void testComp2()\n {\n System.out.println(\"comp\");\n String compString = \"D+M\";\n assertEquals(\"1000010\", N2TCode.comp(compString));\n }", "public static void main(String[] args) {\n String[] data ={\"cars\",\"clothes\",\"jewelry\",\"women\"};\r\n List<String> list1 = Arrays.asList(data);\r\n \r\n ArrayList<String> list2 = new ArrayList<String>();\r\n list2.add(\"youtube\");\r\n list2.add(\"snapchat\");\r\n list2.add(\"instagram\");\r\n \r\n for(String x : list2)\r\n System.out.printf(\"%s \", x);\r\n \r\n Collections.addAll(list2, data);\r\n \r\n System.out.println();\r\n for(String x : list2)\r\n System.out.printf(\"%s \", x);\r\n System.out.println();\r\n \r\n System.out.println(Collections.frequency(list2, \"cars\"));\r\n \r\n boolean tof = Collections.disjoint(list1, list2);\r\n System.out.println(tof);\r\n \r\n if(tof)\r\n System.out.println(\"these list do not have anything in common\");\r\n else \r\n System.out.println(\"these list do have something in common!\");\r\n \r\n }", "@Test\n public void test1() {\n final List<String> listA = Arrays.asList(\"Fremont\", \"Dublin\", \"anamole\", \"San Jose\" , \"SFO\", \"Dublin\", \"San Jose\", \"paramount\", \"y\");\n final List<String> listB = Arrays.asList(\"Dublin\", \"san mateo\", \"los angeles\", \"san mateo\", \"fremont\", \"anamole\", \"x\", \"x\", \"Y\");\n final List<String> common = FindIntersection.findCommonLists(listA, listB);\n System.out.println(Arrays.toString(FindIntersection.findCommonLists(listA, listB).toArray()));\n\n }", "public void testCompareStrings() {\n\t\tString one = \"Hello\";\n\t\tString two = \"in the house\";\n\t\t//Gro▀schreibung vor Kleinschreibung\n\t\tassertTrue(comp.compareStrings(one, two) < 0);\n\t\tassertEquals(0, comp.compareStrings(one, one));\n\t\tassertTrue(comp.compareStrings(two, one) > 0);\n\t}", "@Test\n public void clueFromCodenameShouldReturnSaidCodename()\n {\n String codename = DatabaseHelper.getRandomCodename();\n String[] clues = DatabaseHelper.getCluesForCodename(codename);\n int errors = 0;\n\n for (int i = 0; i < clues.length; i++)\n {\n int index = Arrays.binarySearch(DatabaseHelper.getCodenamesForClue(clues[i]), codename);\n if (!(index >= 0))\n {\n errors++;\n }\n\n }\n\n assertEquals(0, errors);\n }", "@Test\n public void aminoCountsTest1(){\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(a);\n int[] expected = {1,3,1};\n assertArrayEquals(expected, first.aminoAcidCounts());\n }", "@Test\n void adjectivesCommonList() {\n //boolean flag = false;\n NLPAnalyser np = new NLPAnalyser();\n List<CoreMap> sentences = np.nlpPipeline(\"RT This made my day good; glad @JeremyKappell is standing up against bad #ROC’s disgusting mayor. \"\n + \"Former TV meteorologist Jeremy Kappell suing real Mayor Lovely Warren\"\n + \"https://t.co/rJIV5SN9vB worst(Via NEWS 8 WROC)\");\n ArrayList<String> adj = np.adjectives(sentences);\n for (String common : np.getCommonWords()) {\n assertFalse(adj.contains(common));\n }\n }", "private int compareInternal(String shorter, String longer) {\n int lengthDiff = longer.length() - shorter.length();\n\n for (int compareStartIndexInsideLonger = 0; compareStartIndexInsideLonger <= lengthDiff; compareStartIndexInsideLonger++) {\n String compariosonPartFromLonger = longer.substring(compareStartIndexInsideLonger, compareStartIndexInsideLonger + shorter.length());\n //we have found an answer if they are not equal\n int result = shorter.compareTo(compariosonPartFromLonger);\n if (result != 0) {\n return result;\n }\n }\n\n //the are equal\n return 0;\n }", "private int commonLength( int i0, int i1 )\n {\n \tint n = 0;\n \twhile( (text[i0] == text[i1]) && (text[i0] != STOP) ){\n \t i0++;\n \t i1++;\n \t n++;\n \t}\n \treturn n;\n }", "@Test\r\n public void testEqualscoupon() {\r\n log.info(\"starting testEqualscoupon()\");\r\n\tassertFalse (\"coupon1 NOT equal coupon2\", coupon1.equals(coupon2));\r\n\tlog.info (\"testNOTEqualscoupon PASSED\");\t\t\r\n }", "@Test\n public void shouldReturnUniqueCodenames()\n {\n String[] codenames = DatabaseHelper.getRandomCodenames(25);\n boolean noMatches = true;\n\n\n for (int i = 0; i < codenames.length-1; i++)\n {\n for (int j = i+1; j < codenames.length; j++)\n {\n if (codenames[i] == codenames[j])\n {\n noMatches = false;\n // Here to give more detailed feedback in case the test fails.\n System.out.println(\"Match found: \" + codenames[i] + \" \" + codenames[j]);\n }\n }\n }\n\n assert(noMatches);\n }", "public static void main(String[] args) {\nString a = \"aab\";\nString b = \"baa\";\nSystem.out.println(compare(a,b));\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tString str1 = \"snow\";\n\t\tString str2 = \"wons\";\n\t\tint count = 0;\t\t\n\t\tfor(int i=0; i<str1.length() && i<str2.length(); i++){\n\t\t\tif(str1.toLowerCase().charAt(i) != str2.toLowerCase().charAt(i)){\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tif(count >1) System.out.println(\"fasle==>>\"+count);\n\t\telse System.out.println(\"true\");\n\t}", "public static void main(String[] args) throws IOException {\n char A[] = br.readLine().toCharArray();\n char B[] = br.readLine().toCharArray();\n char ans[] = new char[A.length];\n int p = 0;\n\n out: for (int i = 0; i < A.length; i++) {\n ans[p++] = A[i];\n if (p >= B.length) {\n int j = p - B.length;\n for (int k = 0; j < p; j++, k++)\n if (ans[j] != B[k])\n continue out;\n p -= B.length;\n }\n }\n\n StringBuilder sb = new StringBuilder();\n sb.append(ans, 0, p);\n\n log(sb.length() == 0 ? \"FRULA\" : sb);\n\n // log(\"\\ntime : \" + ((System.nanoTime() - start) / 1000000.) + \" ms\\n\");\n }", "public static void main(String[] args) {\n\t\tString a=\"HeyDearHowareyou\"; \n\t\tString b=\"Howareyou\";\n\t\tHashMap<Character,Integer>map1=new HashMap<Character,Integer>();\n\t\tHashMap<Character,Integer>map2=new HashMap<Character,Integer>();\n\t\t\n\t\tmap1=getCharCount(a);\n\t\tmap2=getCharCount(b);\n\t\t\n\t\t//System.out.print(map1);\n\t\t\n\t\tint result=compareMaps(map1,map2);\n\t\t\n\t\t\tSystem.out.println(result);\n\t}", "public static void main(String[] args) {\n String str1 = \"ABABAB\";\n String str2 = \"ABAB\";//\n// String str1 = \"LEFT\";\n// String str2 = \"RIG\";\n String result = gcdOfStrings(str1, str2);\n System.out.println(\"result = \" + result);\n }", "public static void main(String[] args) {\n\n\t\tString str = \"What's the difference between java, javascript and python?\";\n\t\t\n\t\tint countJava = 0;\n\t\tint countPython = 0;\n\t\t\n\t\tString str1 = \"java\";\n\t\tString str2 = \"python\";\n\t\t\n\t\tfor(int i=0; i<str.length()-3; i++) {\n\t\t\tif(str.substring(i, i+4).equals(str1)) {\n\t\t\t\tcountJava++;\n\t\t\t}\n\t\t}\n\t\tfor(int i=0; i<str.length()-5; i++) {\n\t\t\tif(str.substring(i, i+6).equals(str2)) {\n\t\t\t\tcountPython++;\n\t\t\t}\n\t\t}\n\t\tif(countJava == countPython) {\n\t\t\tSystem.out.println(true);\n\t\t}else {\n\t\t\tSystem.out.println(false);\n\t\t}\n\t\t\n\t}", "@Test\n\tpublic void whenListHaveTwoEmptyStringThenReturnTwo(){\n\t\tassertEquals(s1.getEmptyElementCount(data), 2);\n\t}", "public static void main(String[] args) {\n\t\tScanner input=new Scanner(System.in);\n\t\tSystem.out.print(\"Enter the first string:\");\n\t\tString s1=input.nextLine();\n\t\tSystem.out.print(\"Enter the second string:\");\n\t\tString s2=input.nextLine();\n\t\tfor(int i=0;i<s1.length();i++) {\n\t\t\tif(s1.charAt(i)!=s2.charAt(i)) {\n\t\t\t\tif(i==0) {\n\t\t\t\t\tSystem.out.println(s1+\" and \"+s2+\"have no common prefix\");\n\t\t\t\t\tbreak;}\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println(\"The common prefix is \"+s1.substring(0,i));\n\t\t\t\t\tbreak;}\n\t\t\t}\n\t\t}\n\n\t}", "private void longestCommonSubsequence(String str1, String str2) {\n\tdp\t= new int[str1.length()+1][str2.length()+1];\t\r\n\tString lcs = \"\";\r\n\tint i=0,j=0;\r\n\tfor(i=0;i<str1.length();i++){\r\n\t\tfor(j=0;j<str2.length();j++){\r\n\t\t\r\n\t\t\tif(str1.charAt(i)==str2.charAt(j)){\r\n\t\t\t\tdp[i+1][j+1] = dp[i][j] + 1; \r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tdp[i+1][j+1] =\r\n Math.max(dp[i+1][j], dp[i][j+1]);\r\n\t\t\t}\r\n\t\t}\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}\r\n\t\tSystem.out.println(dp[dp.length-1][dp[0].length-1]);\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\tString FirstNumber = 15 + \"\" ;\n\t\tString SecondNumber = 15 + \"\";\n\t\t\n\t\tif(FirstNumber . compareTo(SecondNumber)==0)\n\t\t\n\t\t\tSystem.out.println(\"Numbers are equal\");\n\t\t\n\t\telse\n\t\t\t\n\t\t\tSystem.out.println(\"Numbers are not equal\");\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tString str = \"aaabbbbbbddcmmm\";\n\t\tString[] arr1 = str.split(\"\");\n\t\t\n\t\tString last=\"\";\n\t\tint count = 1;\n\t\tfor (int i = 0; i < arr1.length; i++) {\n\t\t\tcount = 1;\n\t\t\t\n\t\t\tfor (int j = i+1; j < arr1.length; j++) {\n\t\t\t\tif(arr1[i].equals(arr1[j])) {\n\t\t\t\t\tcount++;\n\t\t\t\t\ti=j;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tlast += count + arr1[i];\n\t\t}\n\t\t\n\t\n\t\t//return last;\n\t\t\n\t\tSystem.out.println(last);\n\t}", "static long substrCount(int n, String s) {\nchar arr[]=s.toCharArray();\nint round=0;\nlong count=0;\nwhile(round<=arr.length/2)\n{\nfor(int i=0;i<arr.length;i++)\n{\n\t\n\t\tif(round==0)\n\t\t{\n\t\t//System.out.println(arr[round+i]);\n\t\tcount++;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(i-round>=0&&i+round<arr.length)\n\t\t\t{\n\t\t\t\tboolean flag=true;\n\t\t\t\tchar prev1=arr[i-round];\n\t\t\t\tchar prev2=arr[i+round];\n\t\t\t\t\n\t\t\t\tfor(int j=1;j<=round;j++)\n\t\t\t\t{\n\t\t\t\t\tif(prev1!=arr[i+j]||prev1!=arr[i-j])\n\t\t\t\t\t{\n\t\t\t\t\t\tflag=false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\tif(arr[i+j]!=arr[i-j])\n\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\tflag=false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif(flag)\n\t\t\t\t{\n\t\t\t\t\t//System.out.print(arr[i-round]);\n\t\t\t\t\t//System.out.print(arr[round+i]);\n\t\t\t\t\t//System.out.println(round);\n\t\t\t\t\t//System.out.println();\n\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n}\nround++;\n}\nreturn count;\n }", "public static String findDupes(String[] a, String[] b, String[] c){\n int aa = 0, bb = 0, cc = 0;\n\n while((aa < a.length) && (bb < b.length) && (cc < c.length)){\n if (a[aa].compareTo(b[bb]) < 0){\n //b > a\n if (a[aa].compareTo(c[cc]) < 0) aa++;\n else if (a[aa].compareTo(c[cc]) > 0) cc++;\n else return a[aa];\n }\n\n else if (a[aa].compareTo(b[bb]) > 0){\n //b < a\n if (b[bb].compareTo(c[cc]) < 0) bb++;\n else if (b[bb].compareTo(c[cc]) > 0) cc++;\n else return b[bb];\n }\n\n else return a[aa];\n }\n\n while ((aa < a.length) && (bb < b.length)){\n if (a[aa].compareTo(b[bb]) > 0) bb++;\n else if (a[aa].compareTo(b[bb]) < 0) aa++;\n else return a[aa];\n }\n\n while ((aa < a.length) && (cc < c.length)){\n if (a[aa].compareTo(c[cc]) > 0) cc++;\n else if (a[aa].compareTo(c[cc]) < 0) aa++;\n else return a[aa];\n }\n\n while ((bb < b.length) && (cc < c.length)){\n if (b[bb].compareTo(c[cc]) > 0) cc++;\n else if (b[bb].compareTo(c[cc]) < 0) bb++;\n else return b[bb];\n }\n\n return \"\";\n }", "public static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\r\n\t\tint n = Integer.parseInt(in.nextLine());\r\n\t\tString[] a1 = new String[n];\r\n\t\tfor (int i = 0; i < n; i++)\r\n\t\t\ta1[i] = in.nextLine();\r\n\t\tn = Integer.parseInt(in.nextLine());\r\n\t\tString[] a2 = new String[n];\r\n\t\tfor (int i = 0; i < n; i++)\r\n\t\t\ta2[i] = in.nextLine();\r\n\t\tSystem.out.println(countCommon(a1, a2));\r\n\t}", "@Test\n public void testEditDistDifferentStrings() throws Exception{\n assertEquals(1,Esercizio2.edit_distance_dyn(s1, s2));\n }", "public double JaccardSimilarity (String stringOne, String stringTwo) {\n\t\treturn (double) intersect(stringOne, stringTwo).size() /\n\t\t\t (double) union(stringOne, stringTwo).size();\n\t}", "public double exactJaccard(String file1, String file2) \r\n\t{\r\n\t\tHashSet<Integer> termsInFile1 = new HashSet<Integer>();\r\n\t\tHashSet<Integer> termsInFile2 = new HashSet<Integer>();\r\n\t\tfor (int term : fileTermsIntegerMapping.get(file1))\r\n\t\t{\r\n\t\t\ttermsInFile1.add((Integer) term);\r\n\t\t}\r\n\t\tfor (int term : fileTermsIntegerMapping.get(file2)) \r\n\t\t{\r\n\t\t\ttermsInFile2.add((Integer) term);\r\n\t\t}\r\n\t\tdouble unionSize = termsInFile1.size() + termsInFile2.size();\r\n\t\ttermsInFile1.retainAll(termsInFile2);\r\n\t\treturn termsInFile1.size() / (unionSize - termsInFile1.size());\r\n\t}", "public static void main(String[] args) {\n\n\t\tCompareNumberTest cn = new CompareNumberTest();\n\t\t\n\t\t\n\t\t\n\t\t\n//\t\tint x = 4;\n//\t\tint y = 2;\n//\t\t\n//\t\tint result = cn.compareNumDiff(x, y);\n//\t\t\n//\t\tSystem.out.println(result);\n//\t\t\n\t\t\n\t}", "public void testCompare6() throws Exception {\r\n ComponentCompetitionSituation situation1 = new ComponentCompetitionSituation();\r\n situation1.setPostingDate(new Date());\r\n situation1.setEndDate(new Date(situation1.getPostingDate().getTime() + 100000));\r\n situation1.setPrize(200D);\r\n\r\n ComponentCompetitionSituation situation2 = new ComponentCompetitionSituation();\r\n situation2.setPostingDate(new Date());\r\n situation2.setEndDate(new Date(situation2.getPostingDate().getTime() + 100000));\r\n situation2.setPrize(200D);\r\n\r\n ComponentCompetitionPredictor predictor = new ComponentCompetitionPredictor();\r\n ComponentCompetitionFulfillmentPrediction prediction1 = new ComponentCompetitionFulfillmentPrediction(1.0D,\r\n situation1, predictor);\r\n ComponentCompetitionFulfillmentPrediction prediction2 = new ComponentCompetitionFulfillmentPrediction(1.0D,\r\n situation2, predictor);\r\n\r\n begin();\r\n\r\n for (int i = 0; i < TIMES; i++) {\r\n int result = comparator.compare(prediction1, prediction2);\r\n // result should be == 0\r\n assertTrue(\"result of compare\", result == 0);\r\n }\r\n\r\n print(\"ComponentCompetitionFulfillmentPredictionPrizeComparator#compare\");\r\n }", "@Test\n public void aminoListTest2(){\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(d);\n char[] expected = {'C','F','K','N','T'};\n assertArrayEquals(expected, first.aminoAcidList());\n }", "@Test\n public void testDiffConstraint () throws IOException\n {\n CacheList clist = new CacheList(new Scanner(\n \"GCABCD\\tAs The World Turns\\tbunny\\t1\\t1\\tN40 45.875\\tW111 48.986\\nGCRQWK\\tOld Three Tooth\\tgeocadet\\t3.5\\t3\\tN40 45.850\\tW111 48.045\\n\"));\n clist.setDifficultyConstraints(2, 4);\n ArrayList<Cache> selected = clist.select();\n assertEquals(\"GCRQWK\", selected.get(0).getGcCode());\n }", "int stringsConstruction(String a, String b){\n a=\" \"+a+\" \";\n b=\" \"+b+\" \";\n int output = b.split(\"\"+a.charAt(1)).length - 1;\n for(char i = 'a'; i <= 'z'; i++) {\n if (a.split(\"\"+i).length > 1) {\n int tempOut = (b.split(\"\"+i).length - 1) / (a.split(\"\"+i).length - 1);\n if (output > tempOut) {\n output = tempOut;\n }//if (output > tempOut) {\n }//if (a.split(\"\"+i).length > 1) {\n }//for(char i = 'a'; i <= 'z'; i++) {\n return output;\n }", "public int longestCommonSubstring(String A, String B) {\n int max = 0;\n for (int i = 0; i < A.length(); i++) {\n for (int j = 0; j < B.length(); j++) {\n int count = 0;\n while (i + count < A.length() && j + count < B.length() && A.charAt(i + count) == B.charAt(j + count)){\n count ++;\n }\n max = Math.max(max, count);\n }\n\n }\n return max;\n }", "public static String[] common(String[] a, String[] b){\n int r = a.length;\n int c = b.length;\n int[][] dp = new int[r][c];\n int time = 0;\n for(int i = r-1;i>=0;i--){\n for(int j = c-1; j>=0;j--){\n if (a[i]==b[j]){\n time++;\n dp[i][j]=time;\n }else {\n time = 0;\n dp[i][j]=time;\n }\n }\n }\n return new String[]{\"\"};\n }", "public void testCount()\n\t{\n\t\tinfo.append(a1);\n\t\tinfo.append(a2);\n\t\tinfo.append(a3);\n\t\tassertEquals(3,info.getSynonymsCount());\n\t}", "public static void main(String[] args){\n System.out.println(linuxRules(\"/c/d/////././../e/\"));\n// System.out.println(linuxRules(\"/c/d/////././../e/..\"));\n// System.out.println(linuxRules(\"/c/d/////././../ed/..\"));\n// System.out.println(linuxRules(\"/c/d/////././../ed/.\"));\n /* String[] strs = new String[]{\"flower\",\"ooow\",\"flight\",\"flosh\"};\n System.out.println(longestCommonPrefix(strs));*/\n /* System.out.println( findRealParentheses(\"()[]{}\"));\n System.out.println( findRealParentheses(\"))[]{}\"));\n System.out.println( findRealParentheses(\"()[]{(}\"));\n System.out.println( findRealParentheses(\"[()[]]{}\"));*/\n /*Integer[] firstList = new Integer[]{1, 5, 6};\n Integer[] secondList = new Integer[]{1, 3, 4, 6};\n int i = 0;\n Integer[] combileList = combine(firstList, secondList);\n while (i < combileList.length) {\n System.out.println(combileList[i]);\n i++;\n }*/\n /* Integer[] original = new Integer[]{0,0,1,1,1,2,2,3,3,4};\n System.out.println(deleteCommonItem(original));*/\n /* Integer[] original = new Integer[]{3,2,3,1,4,5,3,2,1};\n System.out.println(deleteAssignItem(original, 3));*/\n// System.out.println(indexOf(\"hello\", \"ll\"));\n// System.out.println(indexOf(\"aaaaa\", \"aab\"));\n\n /* System.out.println(longest(\"abcabcbb\"));\n System.out.println(longest(\"bbbbb\"));\n System.out.println(longest(\"pwwkew\"));*/\n\n /*System.out.println(longestPalindromeStr(\"babad\"));\n System.out.println(longestPalindromeStr(\"cyyoacmjwjubfkzrrbvquqkwhsxvmytmjvbborrtoiyotobzjmohpadfrvmxuagbdczsjuekjrmcwyaovpiogspbslcppxojgbfxhtsxmecgqjfuvahzpgprscjwwutwoiksegfreortttdotgxbfkisyakejihfjnrdngkwjxeituomuhmeiesctywhryqtjimwjadhhymydlsmcpycfdzrjhstxddvoqprrjufvihjcsoseltpyuaywgiocfodtylluuikkqkbrdxgjhrqiselmwnpdzdmpsvbfimnoulayqgdiavdgeiilayrafxlgxxtoqskmtixhbyjikfmsmxwribfzeffccczwdwukubopsoxliagenzwkbiveiajfirzvngverrbcwqmryvckvhpiioccmaqoxgmbwenyeyhzhliusupmrgmrcvwmdnniipvztmtklihobbekkgeopgwipihadswbqhzyxqsdgekazdtnamwzbitwfwezhhqznipalmomanbyezapgpxtjhudlcsfqondoiojkqadacnhcgwkhaxmttfebqelkjfigglxjfqegxpcawhpihrxydprdgavxjygfhgpcylpvsfcizkfbqzdnmxdgsjcekvrhesykldgptbeasktkasyuevtxrcrxmiylrlclocldmiwhuizhuaiophykxskufgjbmcmzpogpmyerzovzhqusxzrjcwgsdpcienkizutedcwrmowwolekockvyukyvmeidhjvbkoortjbemevrsquwnjoaikhbkycvvcscyamffbjyvkqkyeavtlkxyrrnsmqohyyqxzgtjdavgwpsgpjhqzttukynonbnnkuqfxgaatpilrrxhcqhfyyextrvqzktcrtrsbimuokxqtsbfkrgoiznhiysfhzspkpvrhtewthpbafmzgchqpgfsuiddjkhnwchpleibavgmuivfiorpteflholmnxdwewj\"));*/\n\n /* int[] rec1 = {7,8,13,15};\n int[] rec2 = {10,8,12,20};\n System.out.println(isRectangleOverlap(rec1, rec2));*/\n /* 输入: A = [1,2,3,0,0,0], m = 3; B = [2,5,6], n = 3\n 输出: [1,2,2,3,5,6]*/\n\n// System.out.println(validPalindrome(\"lcuppucul\") );\n// System.out.println(maxPower(\"t\") );\n// System.out.println(CheckPermutation(\"abc\", \"bca\") );\n// System.out.println(reverseOnlyLetters(\"Test1ng-Leet=code-Q!\") );\n// System.out.println(countSegments(\", , , , a, eaefa\") );\n\n// System.out.println(reverseWords(\"the sky is blue\") );\n }", "static int size_of_cnc(String passed){\n\t\treturn 3;\n\t}", "@Test\n public void testEqualChars2() {\n char a = 'a';\n char b = 'b';\n char c = '1';\n char d = '2';\n\n boolean result1 = offByOne.equalChars(a, b);\n boolean result2 = offByOne.equalChars(c, d);\n\n assertTrue(result1);\n assertTrue(result2);\n }", "private static boolean checkPermutationCountingArray(String s1, String s2) {\n // Strings are of unequal length. Cannot be permutations.\n if (s1.length() != s2.length()) {\n return false;\n }\n\n int[] characterCount = new int[128];\n for (int i = 0; i < s1.length(); i++) {\n characterCount[s1.charAt(i)]++;\n characterCount[s2.charAt(i)]--;\n }\n for (int i = 0; i < characterCount.length; i++) {\n if (characterCount[i] != 0) return false;\n }\n return true;\n }", "public static void main(String[] args) throws IOException {\n\n String[] aItems = {\"17\", \"18\", \"30\"};\n\n List<Integer> a = new ArrayList<Integer>();\n\n for (int i = 0; i < 3; i++) {\n int aItem = Integer.parseInt(aItems[i]);\n a.add(aItem);\n }\n\n String[] bItems = {\"99\", \"16\", \"8\"} ;\n\n List<Integer> b = new ArrayList<Integer>();\n\n for (int i = 0; i < 3; i++) {\n int bItem = Integer.parseInt(bItems[i]);\n b.add(bItem);\n }\n\n List<Integer> result = compareTriplets(a, b);\n\n for (int i : result) {\n System.out.print(i);\n }\n }", "@Test\n public void testComputeJaccardSimilarity() {\n // Test case 1\n String text = \"abcdef\";\n Set<String> actualKShingles = KShingling.getKShingles(3, text);\n Set<String> expectedKShingles = new HashSet<String>();\n expectedKShingles.add(\"abc\");\n expectedKShingles.add(\"bcd\");\n expectedKShingles.add(\"cde\");\n expectedKShingles.add(\"def\");\n\n // Asserts that both sets have the same size.\n Assert.assertEquals(expectedKShingles.size(), actualKShingles.size());\n\n // Asserts that all elements of the expected set of shingles is included\n // in the actual sets of shingles.\n for (String kShingle : expectedKShingles) {\n Assert.assertTrue(actualKShingles.contains(kShingle));\n }\n\n // Test case 2\n text = \"ab\";\n actualKShingles = KShingling.getKShingles(3, text);\n expectedKShingles = new HashSet<String>(); // No shingles is fine\n\n // Asserts that both sets have the same size.\n Assert.assertEquals(expectedKShingles.size(), actualKShingles.size());\n\n // Asserts that all elements of the expected set of shingles is included\n // in the actual sets of shingles.\n for (String kShingle : expectedKShingles) {\n Assert.assertTrue(actualKShingles.contains(kShingle));\n }\n\n // Test case 3\n text = \"abc def ghi\";\n actualKShingles = KShingling.getKShingles(4, text);\n expectedKShingles = new HashSet<String>();\n expectedKShingles.add(\"abc \");\n expectedKShingles.add(\"bc d\");\n expectedKShingles.add(\"c de\");\n expectedKShingles.add(\" def\");\n expectedKShingles.add(\"def \");\n expectedKShingles.add(\"ef g\");\n expectedKShingles.add(\"f gh\");\n expectedKShingles.add(\" ghi\");\n\n // Asserts that both sets have the same size.\n Assert.assertEquals(expectedKShingles.size(), actualKShingles.size());\n\n // Asserts that all elements of the expected set of shingles is included\n // in the actual sets of shingles.\n for (String kShingle : expectedKShingles) {\n Assert.assertTrue(actualKShingles.contains(kShingle));\n }\n }", "public void testCompare2() throws Exception {\r\n ComponentCompetitionSituation situation = new ComponentCompetitionSituation();\r\n ComponentCompetitionPredictor predictor = new ComponentCompetitionPredictor();\r\n ComponentCompetitionFulfillmentPrediction prediction1 = new ComponentCompetitionFulfillmentPrediction(1.0D,\r\n situation, predictor);\r\n ComponentCompetitionFulfillmentPrediction prediction2 = new ComponentCompetitionFulfillmentPrediction(0.6D,\r\n situation, predictor);\r\n\r\n begin();\r\n\r\n for (int i = 0; i < TIMES; i++) {\r\n // predictions in range < predictions below the range\r\n int result = comparator.compare(prediction1, prediction2);\r\n // result should be < 0\r\n assertTrue(\"result of compare\", result < 0);\r\n }\r\n\r\n print(\"ComponentCompetitionFulfillmentPredictionPrizeComparator#compare\");\r\n }", "public static void main(String[] args)\r\n\t{\n\t\tSystem.out.println(\"Welcome to Longest Commmon Subsequence Problem\");\r\n\t\tString s1=\"shahid\";\r\n\t\tString s2=\"sidhahid\";\r\n\t\tSystem.out.printf(\"Longest Common Susbequnce between\\n'%s' and '%s' is of %d letters\",s1,s2,getLCS(s1,s2,0,0));\r\n\t}", "public void testCompare4() throws Exception {\r\n // timelines shorter than or equal to the target\r\n ComponentCompetitionSituation situation1 = new ComponentCompetitionSituation();\r\n situation1.setPostingDate(new Date());\r\n situation1.setEndDate(new Date(situation1.getPostingDate().getTime() + 1000));\r\n\r\n // timelines longer than the target\r\n ComponentCompetitionSituation situation2 = new ComponentCompetitionSituation();\r\n situation2.setPostingDate(new Date());\r\n situation2.setEndDate(new Date(situation2.getPostingDate().getTime() + 100000));\r\n\r\n ComponentCompetitionPredictor predictor = new ComponentCompetitionPredictor();\r\n ComponentCompetitionFulfillmentPrediction prediction1 = new ComponentCompetitionFulfillmentPrediction(1.0D,\r\n situation1, predictor);\r\n ComponentCompetitionFulfillmentPrediction prediction2 = new ComponentCompetitionFulfillmentPrediction(1.0D,\r\n situation2, predictor);\r\n\r\n begin();\r\n\r\n for (int i = 0; i < TIMES; i++) {\r\n // timelines shorter than or equal to the target < timelines longer than the target\r\n int result = comparator.compare(prediction1, prediction2);\r\n // result should be < 0\r\n assertTrue(\"result of compare\", result < 0);\r\n }\r\n\r\n print(\"ComponentCompetitionFulfillmentPredictionPrizeComparator#compare\");\r\n }", "public static double jaccard (Set<String> values1, Set<String> values2) {\t\n\t\t\n\t\tfinal int termsInString1 = values1.size();\t\t\n\t\tfinal int termsInString2 = values2.size();\n\t\t\t\t\n\t\t//now combine the sets\n\t\tvalues1.addAll(values2);\n\t\tfinal int commonTerms = (termsInString1 + termsInString2) - values1.size();\n\t\t\n\t\t//return JaccardSimilarity\n\t\treturn (double) (commonTerms) / (double) (values1.size());\n\t}", "public static void main(String[] args) {\n\t\t String S = \"aacaacca\";\n\t\t String T = \"ca\";\n\t\tSystem.out.println(numDistinct(S, T));\n\t}", "public static int getCommonStrLength(String str1, String str2) {\n\t\t\n\t\tint len1 = str1.length();\n\t\tint len2 = str2.length();\n\t\t\n\t\tif (len1<=0 || len2<=0) {\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\tchar[] s1 = str1.toLowerCase().toCharArray();\n\t\tchar[] s2 = str2.toLowerCase().toCharArray();\n\t\tint[][] dp = new int[len1][len2];\n\t\tint result = 0;\n\t\t\n\t\tfor (int i=0; i<len1; i++) {\n\t\t\tfor (int j=0; j<len2; j++) {\n\t\t\t\tif (s1[i] == s2[j]) {\n\t\t\t\t\tif (i==0 || j==0) {\n\t\t\t\t\t\tdp[i][j] = 1;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdp[i][j] = dp[i-1][j-1] + 1;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tdp[i][j] = 0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (dp[i][j] > result) {\n\t\t\t\t\tresult = dp[i][j];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn result;\n\t\t\t\n\t}", "@Test\n public void testAreCoupsValid() {\n Joueur NORD = new Joueur(\"NORD\");\n Joueur SUD = new Joueur(\"SUD\");\n\n NORD.setAscendant(30); // les bases sont mis à 30 pour une meilleur manipulation\n NORD.setDescendant(30); //\n SUD.setAscendant(30); //\n SUD.setDescendant(30); //\n\n SUD.jeu.set(0, 12);\n SUD.jeu.set(1, 39);\n SUD.jeu.set(2, 46);\n SUD.jeu.set(3, 59);\n SUD.jeu.set(4, 22);\n SUD.jeu.set(5, 14);\n\n assertTrue(Regles.areCoupsValid(Input.decomposer(\"12v 39^ 46^\"), SUD.clone(), NORD.clone()));\n assertTrue(Regles.areCoupsValid(Input.decomposer(\"14v 12v\"), SUD.clone(), NORD.clone()));\n assertTrue(Regles.areCoupsValid(Input.decomposer(\"12^' 39^ 46^\"), SUD.clone(), NORD.clone()));\n assertTrue(Regles.areCoupsValid(Input.decomposer(\"12v 39v' 46^\"), SUD.clone(), NORD.clone()));\n\n assertFalse(Regles.areCoupsValid(Input.decomposer(\"12^ 39v 46^'\"), SUD.clone(), NORD.clone()));\n assertFalse(Regles.areCoupsValid(Input.decomposer(\"14^ 22v'\"), SUD.clone(), NORD.clone()));\n assertFalse(Regles.areCoupsValid(Input.decomposer(\"19^ 39v' 46^\"), SUD.clone(), NORD.clone()));\n assertFalse(Regles.areCoupsValid(Input.decomposer(\"14v' 39v 46^\"), SUD.clone(), NORD.clone()));\n\n }", "public static int numberOfOccurences(String str1,String str2) {\n\tint count=0;\n\tfor (int i=0; i<=str1.length()-str2.length(); i++) {//(int i=0; i<str1.length()-str2.length()+1; i++)\n\t\tString currentString=str1.substring(i,i+str2.length());\n\t //char charChar=str1.charAt(i);//2.solution\n\tif (currentString.equals(str2)) {\n\t\tcount++;\n\t }\n }\n\t\t\n\treturn count;\n}", "public static void solveLCSBU(char[] first, char[] second){\n int[][] table = new int[first.length+1][second.length+1];\n int[][] direction = new int[first.length+1][second.length+1];\n\n //fill up table\n for(int i = 0; i <= first.length; i++) {\n for (int j = 0; j <= second.length; j++){\n if(i == 0 || j == 0){\n //base case for empty string comparison\n table[i][j] = 0;\n\n }else if(first[i-1] == second[j-1]){\n //case where characters are equal so take previous equal\n table[i][j] = table[i-1][j-1] + 1;\n direction[i][j] = 1;\n\n }else if(table[i-1][j] > table[i][j-1]){\n //take the winner sub problem\n table[i][j] = table[i-1][j];\n direction[i][j] = 2;\n\n } else{\n table[i][j] = table[i][j-1];\n direction[i][j] = 3;\n }\n }\n }\n\n System.out.println(\"Botoom up -> LCS is \" + getLCSString(direction,first,first.length,second.length) + \" of length \"+table[first.length][second.length]);\n }", "public static void main(String[] args) {\r\n\r\n\t\t String str1 = \"University\";\r\n\t\t String str2 = \"Unvesty\";\r\n\t\t int out = Similarity.CalcuED(str1, str2);\r\n\t\t System.out.println(\"Edit Distance = \" + out);\r\n//\t double out2 = Similarity.CalcuJaccard(str1, str2, 2);\r\n//\t \tSystem.out.println(\"Jaccard Coefficient = \"+ out2);\r\n//\t \t}\r\n\r\n\t }", "public static void main(String[] args) {\n\n String s = \"aaa\";\n int output = 6;\n\n Solution solution = new Solution();\n int result = solution.countSubstrings(s);\n System.out.println(\"output: \" + output);\n System.out.println(\"result: \" + result);\n System.out.println(output == result);\n }", "@Test\n\tpublic void mailCase2b() throws CDKException {\n\t\tIAtomContainer mol = sp.parseSmiles(\"c1ccc2ccccc12\");\n\t\tatasc.decideBondOrder(mol, true);\n\n \tint doubleBondCount = 0;\n \tfor (IBond bond : mol.bonds()) {\n \t\tif (bond.getOrder() == IBond.Order.DOUBLE) doubleBondCount++;\n \t}\n \tAssert.assertEquals(4, doubleBondCount);\n\t}", "private static int commonChild(String s1, String s2) {\n //reduce of iterations\n //make strings shorter\n //TreeMap to keep order\n Map<Integer, Character> map1 = new TreeMap<>();\n Map<Integer, Character> map2 = new TreeMap<>();\n StringBuilder stringBuilder = new StringBuilder();\n for (int i = 0; i < s1.length(); i++) {\n for (int j = 0; j < s2.length(); j++) {\n char charOfS1 = s1.charAt(i);\n char charOfS2 = s2.charAt(j);\n if (charOfS1 == charOfS2) {\n map1.put(i, charOfS1);\n map2.put(j, charOfS2);\n }\n }\n }\n for (Map.Entry<Integer, Character> entry : map1.entrySet()) {\n stringBuilder.append(entry.getValue());\n }\n s1 = stringBuilder.toString();\n stringBuilder = new StringBuilder();\n for (Map.Entry<Integer, Character> entry : map2.entrySet()) {\n stringBuilder.append(entry.getValue());\n }\n s2 = stringBuilder.toString();\n /*\n ------------------------------------------------\n */\n int lengthS1 = s1.length();\n int lengthS2 = s2.length();\n int[][] arr = new int[lengthS1+1][lengthS2+1];\n for (int i = 1; i <= lengthS1; i++) {\n for (int j = 1; j <= lengthS2; j++) {\n char charI = s1.charAt(i - 1); //from 0\n char charJ = s2.charAt(j - 1); //from 0\n arr[i][j] = (charI==charJ) ?\n arr[i-1][j-1] + 1 :\n Math.max(arr[i-1][j],arr[i][j-1]);\n }\n }\n\n return arr[lengthS1][lengthS2];\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n DefaultNucleotideCodec defaultNucleotideCodec0 = DefaultNucleotideCodec.INSTANCE;\n DefaultNucleotideCodec defaultNucleotideCodec1 = DefaultNucleotideCodec.INSTANCE;\n DefaultNucleotideCodec defaultNucleotideCodec2 = DefaultNucleotideCodec.INSTANCE;\n Nucleotide nucleotide0 = Nucleotide.Pyrimidine;\n Set<Nucleotide> set0 = nucleotide0.getBasesFor();\n byte[] byteArray0 = defaultNucleotideCodec1.encode((Collection<Nucleotide>) set0);\n Nucleotide nucleotide1 = defaultNucleotideCodec0.decode(byteArray0, 0L);\n assertEquals(Nucleotide.Cytosine, nucleotide1);\n \n defaultNucleotideCodec1.getNumberOfGapsUntil(byteArray0, 1717986918);\n DefaultNucleotideCodec defaultNucleotideCodec3 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec3.getUngappedLength(byteArray0);\n DefaultNucleotideCodec defaultNucleotideCodec4 = DefaultNucleotideCodec.INSTANCE;\n int int0 = defaultNucleotideCodec4.getUngappedOffsetFor(byteArray0, (-1209));\n assertEquals((-1209), int0);\n \n int int1 = defaultNucleotideCodec2.getGappedOffsetFor(byteArray0, (-1209));\n assertEquals(2, int1);\n \n defaultNucleotideCodec2.getGappedOffsetFor(byteArray0, 1717986918);\n DefaultNucleotideCodec defaultNucleotideCodec5 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec5.decodedLengthOf(byteArray0);\n defaultNucleotideCodec0.decodedLengthOf(byteArray0);\n DefaultNucleotideCodec defaultNucleotideCodec6 = DefaultNucleotideCodec.INSTANCE;\n DefaultNucleotideCodec defaultNucleotideCodec7 = DefaultNucleotideCodec.INSTANCE;\n int int2 = defaultNucleotideCodec7.getGappedOffsetFor(byteArray0, 0);\n int int3 = defaultNucleotideCodec6.getNumberOfGapsUntil(byteArray0, 5);\n assertTrue(int3 == int2);\n assertArrayEquals(new byte[] {(byte)0, (byte)0, (byte)0, (byte)2, (byte) (-34)}, byteArray0);\n assertEquals(0, int3);\n }", "public static int findCommon4(int[] in1, int[] in2) {\r\n\t\tint common = 0;\r\n\t\t//mlogn\r\n\t\tArrays.sort(in1);\r\n\t\t//nlogn\r\n\t\tArrays.sort(in2);\r\n\t\t//m+n-1 (as one element will remain uncompared in the end)\r\n\t\tint i=0,j=0;\r\n\t\twhile (i < in1.length && j < in2.length) {\r\n\t\t\tif (in1[i] == in2[j]) {\r\n\t\t\t\t++common;\r\n\t\t\t\t++i;\r\n\t\t\t\t++j;\r\n\t\t\t} else if (in1[i] < in2[j]) {\r\n\t\t\t\t++i;\r\n\t\t\t} else {\r\n\t\t\t\t++j;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn common;\r\n\t}", "static int rawNumElementsInCommon(Set s1, Set s2) {\n int result = 0;\n for (Object o1 : s1)\n if (s2.contains(o1))\n result++;\n return result;\n }", "public static void main(String[] args) {\n String s1 = \"tweety\";\n String s2 = \"weetty\";\n System.out.println(checkPermutationCountingHashMap(s1, s2));\n System.out.println(checkPermutationSorting(s1, s2));\n System.out.println(checkPermutationCountingArray(s1, s2));\n }", "@Test\n\tpublic static void main() {\n\t\tSystem.out.println(Stringcount2(\"reddygaru\"));\n\t}", "@Test\n\tpublic void mailCase2a() throws CDKException {\n\t\tIAtomContainer mol = sp.parseSmiles(\"c1cc2ccccc2c1\");\n\t\tatasc.decideBondOrder(mol, true);\n\n\t\tint doubleBondCount = 0;\n\t\tfor (IBond bond : mol.bonds()) {\n\t\t\tif (bond.getOrder() == IBond.Order.DOUBLE) doubleBondCount++;\n\t\t}\n\n\t\tAssert.assertEquals(4, doubleBondCount);\n\t}", "public static int checkWinner(List<List<String>> codeList,\n List<String> shoppingCart)\n {\n Queue<String> secretCodeQueue = new LinkedList<>();\n Queue<String> matchedCodeQueue = new LinkedList<>();\n boolean comparisonLoop = false;\n for(List<String> codes: codeList){\n for(String code: codes){\n secretCodeQueue.add(code);\n }\n secretCodeQueue.add(\"@\");\n }\n\n while(!secretCodeQueue.isEmpty()) {\n for(String s: shoppingCart) {\n String code = secretCodeQueue.peek();\n if(\"@\".equalsIgnoreCase(code)){\n secretCodeQueue.remove();\n while(!matchedCodeQueue.isEmpty()) {\n matchedCodeQueue.remove();\n\n }\n\n }\n code = secretCodeQueue.peek();\n if(!code.equalsIgnoreCase(s) && !\"anything\".equalsIgnoreCase(code)){\n if(comparisonLoop) {\n while(!secretCodeQueue.isEmpty()) {\n matchedCodeQueue.add(secretCodeQueue.remove());\n }\n Queue temp = secretCodeQueue;\n secretCodeQueue = matchedCodeQueue;\n matchedCodeQueue = temp;\n }\n comparisonLoop = false;\n continue;\n }\n comparisonLoop = true;\n matchedCodeQueue.add(secretCodeQueue.remove());\n\n }\n secretCodeQueue.remove();\n if(!secretCodeQueue.isEmpty())\n return 0;\n\n }\n return secretCodeQueue.isEmpty()? 1: 0;\n\n\n\n }", "private boolean comparacionOblicuaDI (String [] dna){\n int largo=3, repaso=1, aux=0, contador=0, fila, columna;\n boolean repetir;\n char caracter;\n do {\n do {\n repetir=true;\n if(repaso==1){\n fila=0;\n columna=largo + aux;\n }else{\n fila=dna.length-1-largo-aux;\n columna=dna.length-1;\n }\n\n caracter = dna[fila].charAt(columna);\n\n for (int i = 1; i <= (largo+aux); i++) {\n int colum=columna-i;\n int fil=fila+i;\n if((colum==dna.length-2 && fil==1) && repaso==1){\n repetir=false;\n break;\n }\n if (caracter != dna[fil].charAt(colum)) {\n contador = 0;\n\n if(((dna.length-largo)>(colum) && repaso==1) || ((dna.length-largo)<=(fil) && repaso!=1)){\n if((fil+colum)==dna.length-1){\n repetir=false;\n }\n break;\n }\n caracter = dna[fil].charAt(colum);\n\n } else {\n contador++;\n }\n if (contador == largo) {\n cantidadSec++;\n if(cantidadSec>1){\n return true;\n }\n if((fil+colum)==dna.length-1){\n repetir=false;\n }\n break;\n }\n }\n aux++;\n } while (repetir);\n repaso--;\n aux=0;\n\n }while(repaso>=0);\n return false;\n }", "@Test\n public void testEditDistEqualStrings() throws Exception{\n assertEquals(0,Esercizio2.edit_distance_dyn(s1,s4));\n }", "public static void main(String args[]) {\n String str = \"Are the two arrays equal? = \";\n System.out.println(str + areTheyEqual(new int[]{1,2,3,4}, new int[]{2,1,3,4}));\n System.out.println(str + areTheyEqual2(new int[]{1,2,3,4}, new int[]{2,1,3,4}));\n }", "static boolean isPermutation_2(String a, String b){\n boolean isPermutation = true;\n //lets store every char in an array of boolean\n int[] charCount = new int[256];\n for(char c:a.toCharArray()){\n charCount[c]++;\n }\n //now verify the count in another string and subtract the count\n for(char c:b.toCharArray()){\n charCount[c]--;\n }\n //now check if any count is non-zero then the two string have unequal count of that char\n for(int i=0;i<charCount.length;i++)\n if(charCount[i]!=0)\n return false;\n \n return isPermutation;\n }", "public static int longestCommonSubsequence(String text1, String text2) {\n Map<Character, List<Integer>> characterListMap = new HashMap<>();\n char[] cA = text1.toCharArray();\n for (int i = 0; i < cA.length; i++) {\n if (characterListMap.get(cA[i]) == null) {\n List<Integer> list = new ArrayList<>();\n list.add(i);\n characterListMap.put(cA[i], list);\n } else {\n characterListMap.get(cA[i]).add(i);\n }\n }\n char[] cA2 = text2.toCharArray();\n int i = 0;\n int prevBiggest = 0;\n int previndex = 0;\n int currBiggest = 0;\n while (i < cA2.length && characterListMap.get(cA2[i]) == null) {\n i++;\n }\n if (i < cA2.length && characterListMap.get(cA2[i]) != null) {\n previndex = characterListMap.get(cA2[i]).get(characterListMap.get(cA2[i]).size() - 1);\n i++;\n currBiggest++;\n }\n\n\n for (; i < cA2.length; i++) {\n if (characterListMap.containsKey(cA2[i])) {\n if (characterListMap.get(cA2[i]).get(characterListMap.get(cA2[i]).size() - 1) > previndex) {\n previndex = characterListMap.get(cA2[i]).get(characterListMap.get(cA2[i]).size() - 1);\n currBiggest++;\n } else {\n previndex = characterListMap.get(cA2[i]).get(characterListMap.get(cA2[i]).size() - 1);\n if (currBiggest > prevBiggest) {\n prevBiggest = currBiggest;\n }\n currBiggest = 1;\n }\n }\n }\n\n return prevBiggest > currBiggest ? prevBiggest : currBiggest;\n }", "public static void main(String[] args) {\n String[] strs = new String[3];\n strs[0]=\"abv\";\n strs[1]=\"abcd\";\n strs[2]=\"ab\";\n String ans = longestCommonPrefix(strs);\n System.out.println(ans);\n }", "public static void main(String[] args) {\n String firstString = \"abcd\";\n String secondString = \"dcba\";\n\n // two string may be anagram of they are same in length, character wise.\n if (firstString.length() != secondString.length()) {\n System.out.println(\"Both string are not anagram\");\n }else {\n char[] firstArray = firstString.toCharArray();\n char[] secondArray = secondString.toCharArray();\n\n anagramDetection(firstArray, secondArray);\n }\n }", "int lcs(int x, int y, string s1, string s2,int[][] str){\n \n if(text1.length()==0||text2.length()==0) {\n return 0;\n }\n \n if(str[x][y]!=0) {\n return str[x][y];\n }\n \n int ans =0;\n \n if(text1.charAt(0)== text2.charAt(0)) {\n \n \n \n ans = 1 + longestCommonSubsequence(x+1,y+1,ros1, ros2,str);\n \n \n }\n else {\n \n int first = longestCommonSubsequence(x,y+1,ros1, text2,str);\n int second = longestCommonSubsequence(x+1,y,text1, ros2,str);\n \n ans = Math.max(first,second);\n \n \n \n }\n \n str[x][y] = ans;\n return ans;\n \n \n \n \n \n}", "public static void main(String[] args) {\n\t\tString s = \"ababacbaccc\";//{abcbbbbcccbdddadacb,bcbbbbcccb,10}\n\t\tSystem.out.println(lengthOfLongestSubstringTwoDistinct(s));\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tString s1=\"Hi Hello\";\n\t\tfrequent(s1);\n//\t\tchar ch[] = s1.toCharArray();\n//\t\tchar ch1;\n//\t\tchar ch2[]=new char[10];\n//\t\t\n//\t\tfor(int i=0;i<ch.length;i++) {\n//\t\t\tSystem.out.println(ch[i]);\n//\t\t}\n//\t\t\n//\t\tfor(int i=0;i<ch.length;i++) {\n//\t\t\t\n//\t\t\tint count=1;\n//\t\t\tfor(int j=i+1;j<ch.length;j++) {\n//\t\t\t\t\n//\t\t\t\tif(ch[i]==ch[j]) {\n//\t\t\t\t\t\n//\t\t\t\t\tcount++;\n//\t\t\t\t}\n//\t\t\t\t\n//\t\t\t}System.out.println(\"Count of \"+ch[i]+\"=\"+count);\n//\t\t}\n\t\t\n\t\t\n\t\n\n\t}", "public static void main(String[] args) {\n\t\n\tString a = \"aabbbc\", b= \"cabbbac\";\n\t// a = abc, b=cab\n\t//we will remove all dublicated values from \"a\"\n\tString a1 = \"\"; //store all the non duplicated values from \"a\"\n\t\n\tfor (int j=0; j<a.length();j++) //this method is with nested loop\n\tfor (int i=0; i<a.length();i++) {\n\t\tif (!a1.contains(a.substring(j, j+1))) {\n\t\t\ta1 += a.substring(j, j+1);\n\t\t}\n\t\t\t\n\t}\n\tSystem.out.println(a1);\n\t//we will remove all duplicated values from \"b\"\n\tString b1 = \"\"; //store all the non duplicated values from \"b\"\n\tfor(int i=0; i<b.length();i++) { //this is with simple loop\n\t\tif(!b1.contains(b.substring(i, i+1))) {\n\t\t\t // \"\"+b.charAt(i)\n\t\t\tb1 += b.substring(i, i+1);\n\t\t\t// \"\"+b.charAt(i);\n\t\t}\n\t}\n\tSystem.out.println(b1);\n\t\n\t\n\t//a1 = \"acb\", b1 = \"cab\"\n\tchar[] ch1 = a1.toCharArray();\n\tSystem.out.println(Arrays.toString(ch1));\n\t\n\tchar[] ch2 = b1.toCharArray();\n\tSystem.out.println(Arrays.toString(ch2));\n\t\n\tArrays.sort(ch1);\n\tArrays.sort(ch2);\n\t\n\tSystem.out.println(\"========================\");\n\tSystem.out.println(Arrays.toString(ch1));\n\tSystem.out.println(Arrays.toString(ch2));\n\t\n\t\n\tString str1 = Arrays.toString(ch1);\n\tString str2 = Arrays.toString(ch2);\n\t\n\tif(str1.equals(str2)) {\n\t\tSystem.out.println(\"true, they are same letters\");\n\t}else {\n\t\tSystem.out.println(\"false, they are contain different letters\");\n\t}\n\t\n\t\n\t// solution 2:\n\t\t\t String Str1 = \"cccccaaaabbbbccc\" , Str2 = \"cccaaabbb\";\n\t\t\t \n\t\t\t Str1 = new TreeSet<String>( Arrays.asList( Str1.split(\"\"))).toString();\n\t\t\t Str2 = new TreeSet<String>( Arrays.asList( Str2.split(\"\"))).toString();\n\t\t\t \n\t\t\t System.out.println(Str1.equals(Str2));\n\t\t\t\t \n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n}", "static int compare(String a, String b) {\n if (a == null) a = \"\";\n if (b == null) b = \"\";\n\n int i = 0;\n while (i < a.length() && i < b.length()) {\n char x = a.charAt(i), y = b.charAt(i);\n if (x != y) return x - y;\n i++;\n }\n return a.length() - b.length();\n }", "public static void main(String[] args) {\n\n\t\tdouble [] num1 = {1.1, 3.9, 2.2};\n\t\tdouble [] num2 = {2.4, 2.88};\n\t\tdouble []target = combineArray(num1, num2);\n\t\tSystem.out.println(Arrays.toString(target));\n\t\tSystem.out.println(Arrays.toString(combineArray(num1, num2)));\n\t\t\n\t\tdouble [] expected = {1.1, 3.9, 2.2, 2.4, 2.88};\n\t\t\n\t\tif(Arrays.equals(expected, target)) {\n\t\t\tSystem.out.println(\"PASSED\");\n\t\t}else {\n\t\t\tSystem.out.println(\"FAILED\");\n\t\t}\n\t\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tint a1[] = new int[] {4,9,5};\n\t\tint a2[] = new int[] {9,4,9,8,4 }; \n//\t\tArrays.sort(a1);\n//\t\tArrays.sort(a2);\n\t\tList<Integer> list = new ArrayList<Integer>();\n\t\tfor(int i=0;i<a1.length;i++){\n\t\t\tfor(int j=i;j<a2.length;j++){\n\t\t\t\tif(a1[i]!=a2[j]){\n\t\t\t\t\tcontinue;\n\t\t\t\t}else{\n\t\t\t\t\tlist.add(a1[i]);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tfor(Integer l:list){\n\t\t\tSystem.out.print(l+\" \");\n\t\t}\n\n\t}", "static int size_of_cc(String passed){\n\t\treturn 3;\n\t}", "@Test(timeout=2000)\n public void countTest()\n {\n int[] mixed = {1,5,3,8,10,34,62,31,45,20};\n int mixedOdds = 5;\n int mixedEvens = 5;\n int[] even = {2,4,6,8,10,20,30,58};\n int[] odd = {1,3,5,7,9,11,13,15,19};\n int[] singleEven = {2};\n int[] singleOdd = {1};\n \n assertEquals( \"Counting odds in array of mixed odds and evens failed.\", mixedOdds, OddsEvens.count( mixed, true ) );\n assertEquals( \"Counting evens in array of mixed odds and evens failed.\", mixedEvens, OddsEvens.count( mixed, false ) );\n assertEquals( \"Counting odds in an array of all evens failed.\", 0, OddsEvens.count( even, true ) );\n assertEquals( \"Counting evens in an array of all evens failed.\", even.length, OddsEvens.count( even, false ) );\n assertEquals( \"Counting odds in an array of all odds failed.\", odd.length, OddsEvens.count( odd, true ) );\n assertEquals( \"Counting evens in an array of all odds failed.\", 0, OddsEvens.count( odd, false ) );\n assertEquals( \"Counting odds in an array of a single even failed.\", 0, OddsEvens.count( singleEven, true ) );\n assertEquals( \"Counting evens in an array of a single even failed.\", 1, OddsEvens.count( singleEven, false ) );\n assertEquals( \"Counting odds in an array of a single odd failed.\", 1, OddsEvens.count( singleOdd, true ) );\n assertEquals( \"Counting evens in an array of a single odd failed.\", 0, OddsEvens.count( singleOdd, false ) );\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(findTheDifference(\"abdcde\", \"abdcdde\"));\r\n\t}", "@Test\n public void testEqualChars1() {\n char a = 'a';\n char b = 'a';\n char c = 'z';\n char d = 'B';\n\n boolean result1 = offByOne.equalChars(a, b);\n boolean result2 = offByOne.equalChars(a, c);\n boolean result3 = offByOne.equalChars(a, d);\n\n assertFalse(result1);\n assertFalse(result2);\n assertFalse(result3);\n }", "static int size_of_cmp(String passed){\n\t\treturn 1;\n\t}", "public static void main(String[] args) {\n int[] a = {4, 6, 3};\n int[] b = {6, 4, 3};\n System.out.println(areSimilar(a, b));\n\n }", "public static void main(String[] args) {\n\t\tint count=0;\n String[] ab= {\"A\", \"B\", \"B\", \"F\", \"A\"};\n \n for(int i=0; i<ab.length;i++){\n\t for(int j=0;j<ab.length;j++){\n\t\t if(ab[i]==ab[j]){\n\t\t\t count++;\n\t\t\t \n\t\t\t if(count==2){\n\t\t\t\t System.out.println(ab[i]);\n\t\t\t\t count= --count-1;\n\t\t\t\t \n\t\t\t }\n\t\t\t \n\t\t }\n\t }\n }\n\t}", "static int size_of_cnz(String passed){\n\t\treturn 3;\n\t}", "public static void main(String[] args) {\n\t\tint[] arr1 = {4,7,3,9,2};\r\n\t int[] arr2 = {3,2,12,9,40,32,4};\r\n\t \r\n\t for(int i = 0;i < arr1.length; i++) {\r\n\t for(int j = 0; j < arr2.length; j++) {\r\n\t if(arr1[i] == arr2[j]) { \r\n\t System.out.print(\"common values are:\"+arr1[i]);\r\n\t \r\n\t } \r\n\t } \r\n\t}\r\n\r\n\t}", "public static void main(String[] args) throws IOException {\n char A[] = br.readLine().toCharArray();\n String B = br.readLine();\n\n StringBuilder sb = new StringBuilder();\n Stack<Integer> S = new Stack<>();\n S.push(-1);\n for (int i = 0; i < A.length; i++) {\n sb.append(A[i]);\n if (B.charAt(S.peek() + 1) == A[i])\n S.push(S.peek() + 1);\n else\n S.push(A[i] == B.charAt(0) ? 0 : -1);\n if (S.peek() == B.length() - 1)\n for (int j = 0; j < B.length(); j++) {\n S.pop();\n sb.deleteCharAt(sb.length() - 1);\n }\n }\n\n log(sb.length() == 0 ? \"FRULA\" : sb);\n\n // log(\"\\ntime : \" + ((System.nanoTime() - start) / 1000000.) + \" ms\\n\");\n }" ]
[ "0.78404963", "0.6639819", "0.6585275", "0.6386523", "0.62974375", "0.6056575", "0.5997496", "0.5900761", "0.58482563", "0.5815162", "0.58055186", "0.579705", "0.5774617", "0.57616574", "0.57518166", "0.57027054", "0.56953466", "0.56824744", "0.567909", "0.5652402", "0.5600291", "0.5586457", "0.55837977", "0.55829424", "0.5577604", "0.55644506", "0.5557856", "0.55241966", "0.55234027", "0.5520255", "0.550715", "0.55065036", "0.54936576", "0.54935104", "0.5484651", "0.5467326", "0.5465612", "0.5460645", "0.5454428", "0.54524714", "0.5429352", "0.5427154", "0.5425046", "0.5423794", "0.54208577", "0.54207355", "0.54091626", "0.53938365", "0.5391008", "0.5389142", "0.5387213", "0.5378984", "0.5372568", "0.5369168", "0.5364757", "0.5363875", "0.5360344", "0.5357575", "0.5354326", "0.5353029", "0.53506243", "0.53444815", "0.53417826", "0.5337327", "0.5336404", "0.53354275", "0.5325067", "0.5314349", "0.53076816", "0.53055084", "0.530319", "0.52933514", "0.52886564", "0.5280572", "0.5279274", "0.5279249", "0.52783114", "0.52746487", "0.527012", "0.52667296", "0.52665836", "0.5262609", "0.5257236", "0.5255358", "0.5255026", "0.5249954", "0.52434653", "0.5222446", "0.521611", "0.5213385", "0.5211456", "0.5211005", "0.5210987", "0.52109504", "0.52103114", "0.52099955", "0.52096874", "0.52081", "0.5207353", "0.5202784" ]
0.8030712
0
/TEST 10 INPUT: c = "GCUGAGGAUAUGUCA", d = "UGUUUUAAAAAUAACACU"; EXPECTED OUTPUT = 1 ACTUAL OUTPUT = 1 This test checks the difference between the count of codons of two lists.
@Test public void codonCompare2(){ //these list are already sorted AminoAcidLL first = AminoAcidLL.createFromRNASequence(c); AminoAcidLL second = AminoAcidLL.createFromRNASequence(d); int expected = 1; assertEquals(expected, first.codonCompare(second)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void codonCompare1(){\n //these list are already sorted\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(a);\n AminoAcidLL second = AminoAcidLL.createFromRNASequence(b);\n int expected = 0;\n assertEquals(expected, first.codonCompare(second));\n }", "public static void main(String args[]) {\n Scanner in=new Scanner(System.in);\n String str1=in.nextLine();\n String str2=in.nextLine();\n int slen1=str1.length();\n \n int slen2=str2.length();\n int count=0;\n for(int i=0;i<(slen1-slen2+1);i++)\n {\n int num=1;\n for(int j=0;j<slen2;j++)\n {\n if(str1.charAt(i+j)!=(str2.charAt(j)))\n {\n num=0;\n }\n \n } \n if(num==1)\n {\n count++;\n }\n \n }\n System.out.println(count); \n }", "private static int countCommon(String[] a1, String[] a2) {\n\t\tHashSet<String> hs = new HashSet<String>();\r\n\t\tfor(int i=0 ; i < a1.length ; i++) {\r\n\t\t\ths.add(a1[i]);\r\n\t\t}\r\n\t\tString s1[] = new String[hs.size()];\r\n\t\ths.toArray(s1);\r\n\t\tHashSet<String> hs2 = new HashSet<String>();\r\n\t\tfor( int j=0 ;j < a2.length ;j++) {\r\n\t\t\ths2.add(a2[j]);\r\n\t\t}\r\n\t\tString s2[] = new String[hs2.size()];\r\n\t\ths2.toArray(s2);\r\n\t\tint count=0;\r\n\t\tfor(int i=0;i<s1.length;i++)\r\n\t\t{\t\r\n\t\t\tfor(int j=0;j<s2.length;j++)\r\n\t\t\t{\r\n\t\t\t\tif(s1[i].equals(s2[j]))\r\n\t\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn count;\t\t\r\n\t}", "public static int commonCharacterCount(String s1, String s2) {\n\t int count = 0;\n\t int auxArray[] = new int[s2.length()];\n\t for (int i = 0; i < auxArray.length; i++){\n\t\tauxArray[i] = 0;\n\t }\n\t \n\t for(int i = 0; i < s1.length(); i++){\n\t\tfor(int j = 0; j < s2.length(); j++){\n\t\t if( auxArray[j] == 1){\n\t\t continue;\n\t\t }\n\t\t else{\n\t\t if(s1.charAt(i) == s2.charAt(j)){\n\t\t auxArray[j] = 1;\n\t\t count += 1;\n\t\t break;\n\t\t }\n\t\t }\n\t\t}\n\t }\n\t return count;\n\t}", "public static void main(String[] args) {\nScanner sc=new Scanner(System.in);\r\nString a=sc.nextLine();\r\nString b=sc.nextLine();\r\nchar ch1[]=a.toCharArray();\r\nchar ch2[]=b.toCharArray();\r\nint l1=ch1.length;\r\nint l2=ch2.length;\r\nint n=0;\r\nif(l1==l2)\r\n{\r\n\tfor(int i=0;i<l1;i++)\r\n\t{\r\n\t\tif(ch1[i]!=ch2[i])\r\n\t\t{\r\n\t\t\tn=n+1;\r\n\t\t}\r\n\t}\r\n\tif(n==1)\r\n\t\tSystem.out.println(\"yes\");\r\n\telse\r\n\t\tSystem.out.println(\"no\");\r\n}\r\nelse\r\n\tSystem.out.println(\"no\");\r\n\t}", "int stringsConstruction(String a, String b){\n a=\" \"+a+\" \";\n b=\" \"+b+\" \";\n int output = b.split(\"\"+a.charAt(1)).length - 1;\n for(char i = 'a'; i <= 'z'; i++) {\n if (a.split(\"\"+i).length > 1) {\n int tempOut = (b.split(\"\"+i).length - 1) / (a.split(\"\"+i).length - 1);\n if (output > tempOut) {\n output = tempOut;\n }//if (output > tempOut) {\n }//if (a.split(\"\"+i).length > 1) {\n }//for(char i = 'a'; i <= 'z'; i++) {\n return output;\n }", "public static void main(String[] args) {\nScanner sc=new Scanner(System.in);\r\nString input1=sc.nextLine();\r\ninput1=input1.toLowerCase();\r\nint l=input1.length();\r\nchar a[]=input1.toCharArray();\r\nint d[]=new int[1000];\r\nString str=\"\";\r\nint i=0,k1=0,k2=0,m=0,c1=0,c2=0,c3=0,l1=0,u=0,u1=0;\r\nchar b[]={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};\r\nfor(i=0;i<l;i++)\r\n{ c3=0;\r\n\tif(a[i]==' ')\r\n\t{u=i;c3=0;\r\n\t\tfor(k1=u1,k2=i-1;k1<k2 && k2>k1;k1++,k2--)\r\n\t\t{ c1=0;c2=0;\r\n\t\t\tfor(m=0;m<26;m++)\r\n\t\t\t{\r\n\t\t\t\tif(b[m]==a[k1]) {\r\n\t\t\t\tc1=m+1;}\t\r\n\t\t\t\tif(b[m]==a[k2]) {\r\n\t\t\t\t\tc2=m+1;}\t\r\n\t\t\t}\r\n\t\t\tc3=c3+Math.abs(c1-c2);\r\n\t\t}\r\n\t\tif(k1==k2) {\r\n\t\t\tfor(m=0;m<26;m++) {\r\n\t\t\t\tif(b[m]==a[k1])\r\n\t\t\t\t\tc3=c3+(m+1);\r\n\t\t\t }\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\td[l1]=c3;\r\n\t\tl1++;\r\n\t\tu1=i+1;\r\n\t\tc3=0;\r\n\t}\r\n\tif(i==l-1)\r\n\t{\r\n\t\tfor(k1=u+1,k2=i;k1<k2 && k2>k1;k1++,k2--)\r\n\t\t{ c1=0;c2=0;\r\n\t\t\tfor(m=0;m<26;m++)\r\n\t\t\t{\r\n\t\t\t\tif(b[m]==a[k1]) {\r\n\t\t\t\tc1=m+1;}\t\r\n\t\t\t\tif(b[m]==a[k2]) {\r\n\t\t\t\t\tc2=m+1;}\t\r\n\t\t\t}\r\n\t\t\tc3=c3+Math.abs(c1-c2);\r\n\t\t}\r\n\t\tif(k1==k2) {\r\n\t\t\tfor(m=0;m<26;m++) {\r\n\t\t\t\tif(b[m]==a[k1])\r\n\t\t\t\t\tc3=c3+(m+1);\r\n\t\t\t }\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\td[l1]=c3;\r\n\t\tl1++;\r\n\t\tk1=i+1;\r\n\t}\r\n}\r\n\r\n for(i=0;i<l1;i++)\r\n {\r\n\t str=str+Integer.toString(d[i]);\r\n }\r\n int ans=Integer.parseInt(str);\r\n System.out.print(ans);\r\n}", "static int size_of_cnc(String passed){\n\t\treturn 3;\n\t}", "@Test\n public void aminoCompareTest1(){\n //these list are already sorted\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(c);\n AminoAcidLL second = AminoAcidLL.createFromRNASequence(d);\n int expected = 1;\n assertEquals(expected, first.aminoAcidCompare(second));\n }", "static long substrCount(int n, String s) {\nchar arr[]=s.toCharArray();\nint round=0;\nlong count=0;\nwhile(round<=arr.length/2)\n{\nfor(int i=0;i<arr.length;i++)\n{\n\t\n\t\tif(round==0)\n\t\t{\n\t\t//System.out.println(arr[round+i]);\n\t\tcount++;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(i-round>=0&&i+round<arr.length)\n\t\t\t{\n\t\t\t\tboolean flag=true;\n\t\t\t\tchar prev1=arr[i-round];\n\t\t\t\tchar prev2=arr[i+round];\n\t\t\t\t\n\t\t\t\tfor(int j=1;j<=round;j++)\n\t\t\t\t{\n\t\t\t\t\tif(prev1!=arr[i+j]||prev1!=arr[i-j])\n\t\t\t\t\t{\n\t\t\t\t\t\tflag=false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\tif(arr[i+j]!=arr[i-j])\n\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\tflag=false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif(flag)\n\t\t\t\t{\n\t\t\t\t\t//System.out.print(arr[i-round]);\n\t\t\t\t\t//System.out.print(arr[round+i]);\n\t\t\t\t\t//System.out.println(round);\n\t\t\t\t\t//System.out.println();\n\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n}\nround++;\n}\nreturn count;\n }", "public static int numberOfOccurences(String str1,String str2) {\n\tint count=0;\n\tfor (int i=0; i<=str1.length()-str2.length(); i++) {//(int i=0; i<str1.length()-str2.length()+1; i++)\n\t\tString currentString=str1.substring(i,i+str2.length());\n\t //char charChar=str1.charAt(i);//2.solution\n\tif (currentString.equals(str2)) {\n\t\tcount++;\n\t }\n }\n\t\t\n\treturn count;\n}", "static int chars(List<String> strings) {\n\t\tint sum=0;\n\t\t//using loop\n//\t\tfor(String str : strings) {\n//\t\t\tsum+=str.length();\n//\t\t}\n\t\t//using iterator\n\t\tfor(Iterator<String> iterator=strings.iterator();iterator.hasNext();)\n\t\t\tsum+=iterator.next().length();\n\t\treturn sum;\n\t}", "public static void main(String[] args) {\n\t\tString s=\"geeks\";\r\n\t\tString s1=\"egeks\";\r\n\t\tint m=s.length();\r\n\t\tint n=s1.length();\r\n\t\tfor(int i=0;i<m;i++)\r\n\t\t{\r\n\t\t\tfor(int j=0;j<n;j++)\r\n\t\t\t{\r\n\t\t\t\tif(s.charAt(i)!=s1.charAt(j))\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"no of index\"+i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "static int makeAnagram(String a, String b) {\n \n \tchar arr[] = a.toCharArray();\n char brr[] = b.toCharArray();\n Arrays.sort(arr);\n Arrays.sort(brr);\n Map<Character, Integer> aMap = new HashMap<>();\n Map<Character, Integer> bMap = new HashMap<>();\n for(int i =0 ;i <arr.length;i++){\n \tif(!aMap.containsKey(arr[i])){\n \t\taMap.put(arr[i], 1);\n \t}else{\n \t\taMap.put(arr[i], aMap.get(arr[i])+1);\n \t}\n }\n for(int i =0 ;i <brr.length;i++){\n \tif(!bMap.containsKey(brr[i])){\n \t\tbMap.put(brr[i], 1);\n \t}else{\n \t\tbMap.put(brr[i], bMap.get(brr[i])+1);\n \t}\n }\n int removeCharCount = 0;\n \n for(char ch = 'a'; ch<='z';ch++){\n \tif(aMap.containsKey(ch) && bMap.containsKey(ch)){\n \t\tif(aMap.get(ch) > bMap.get(ch)){\n \t\t\tint count = aMap.get(ch) - bMap.get(ch);\n \t\t\tremoveCharCount+=count;\n \t\t\taMap.put(ch, aMap.get(ch) - count);\n \t\t}else if(aMap.get(ch) < bMap.get(ch)){\n \t\t\tint count = bMap.get(ch) - aMap.get(ch);\n \t\t\tremoveCharCount+=count;\n \t\t\taMap.put(ch, bMap.get(ch) - count);\n \t\t}\n \t}else if(aMap.containsKey(ch) && !bMap.containsKey(ch)){\n \t\tint count = aMap.get(ch);\n \t\tremoveCharCount+=count;\n \t\taMap.remove(ch);\n \t}else if(!aMap.containsKey(ch) && bMap.containsKey(ch)){\n \t\tint count = bMap.get(ch);\n \t\tremoveCharCount+=count;\n \t\tbMap.remove(ch);\n \t}\n }\n /* if(removeCharCount == Math.min(arr.length, brr.length)){\n \treturn 0;\n }*/\n return removeCharCount;\n }", "@Test\n public void aminoCountsTest2(){\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(b);\n int[] expected = {2,1,1,1};\n assertArrayEquals(expected, first.aminoAcidCounts());\n }", "@Test\n\tpublic static void main() {\n\t\tSystem.out.println(Stringcount2(\"reddygaru\"));\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tString str = \"aaabbbbbbddcmmm\";\n\t\tString[] arr1 = str.split(\"\");\n\t\t\n\t\tString last=\"\";\n\t\tint count = 1;\n\t\tfor (int i = 0; i < arr1.length; i++) {\n\t\t\tcount = 1;\n\t\t\t\n\t\t\tfor (int j = i+1; j < arr1.length; j++) {\n\t\t\t\tif(arr1[i].equals(arr1[j])) {\n\t\t\t\t\tcount++;\n\t\t\t\t\ti=j;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tlast += count + arr1[i];\n\t\t}\n\t\t\n\t\n\t\t//return last;\n\t\t\n\t\tSystem.out.println(last);\n\t}", "static int size_of_cc(String passed){\n\t\treturn 3;\n\t}", "static int makeAnagram(String a, String b) {\r\n int[] charCount = new int[26];\r\n int deletions = 0;\r\n\r\n for(char c : a.toCharArray()) {\r\n charCount[c-'a'] += 1;\r\n }\r\n for(char c : b.toCharArray()) {\r\n charCount[c-'a'] -= 1;\r\n }\r\n for(int count : charCount) {\r\n deletions += Math.abs(count);\r\n }\r\n return deletions;\r\n }", "private static int countOccurrences(String input, char c) {\n int count = 0;\n for (int i = 0; i < input.length(); i++) {\n if (input.charAt(i) == c) {\n count++;\n }\n }\n return count;\n }", "public static void main(String[] args) {\n\n String s = \"aaa\";\n int output = 6;\n\n Solution solution = new Solution();\n int result = solution.countSubstrings(s);\n System.out.println(\"output: \" + output);\n System.out.println(\"result: \" + result);\n System.out.println(output == result);\n }", "public int deltaWyeCount(List<String> sequence);", "public static void main(String[] args) {\n\t\t\r\n\t\tString s =\"hhpddlnnsjfoyxpciioigvjqzfbpllssuj\";\r\n\t\tint noOfChange=0;\r\n\t\r\n\t\t\r\n\t\tif(s.length()%2!=0){\r\n\t\t\t\r\n\t\t\tnoOfChange=-1;\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\t\r\n\t\t\tString sub1=s.substring(0, (s.length()/2));\r\n\t\t\tString sub2=s.substring((s.length()/2), (s.length()));\r\n\t\t\tHashMap<Character, Integer>map = new HashMap<Character,Integer>();\r\n\t\t\t\r\n\t\t\tfor(int i=0;i<sub1.length();i++){\r\n\t\t\t\tif(map.containsKey(sub1.charAt(i))){\r\n\t\t\t\t\t\r\n\t\t\t\t\tint count =map.get(sub1.charAt(i));\r\n\t\t\t\t\tcount++;\r\n\t\t\t\t\tmap.put(sub1.charAt(i), count);\r\n\t\t\t\t\t\r\n\t\t\t\t}else{\t\t\t\t\t\r\n\t\t\t\t\tmap.put(sub1.charAt(i), 1);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tSystem.out.println(sub1);\r\n\t\t\tSystem.out.println(sub2);\r\n\t\t\tfor(int i=0;i<map.size();i++){\r\n\t\t\t\r\n\t\t\t\tif(map.containsKey(sub2.charAt(i))){\r\n\t\t\t\t\tint count =map.get(sub2.charAt(i));\r\n\t\t\t\t\tcount--;\r\n\t\t\t\t\tif(count<0){\r\n\t\t\t\t\t\tnoOfChange++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tmap.put(sub2.charAt(i), count);\r\n\t\t\t\t\t\r\n\t\t\t\t}else{\r\n\t\t\t\t\tnoOfChange++;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(noOfChange);\r\n\t\t\r\n\r\n\t}", "public static String findDupes(String[] a, String[] b, String[] c){\n int aa = 0, bb = 0, cc = 0;\n\n while((aa < a.length) && (bb < b.length) && (cc < c.length)){\n if (a[aa].compareTo(b[bb]) < 0){\n //b > a\n if (a[aa].compareTo(c[cc]) < 0) aa++;\n else if (a[aa].compareTo(c[cc]) > 0) cc++;\n else return a[aa];\n }\n\n else if (a[aa].compareTo(b[bb]) > 0){\n //b < a\n if (b[bb].compareTo(c[cc]) < 0) bb++;\n else if (b[bb].compareTo(c[cc]) > 0) cc++;\n else return b[bb];\n }\n\n else return a[aa];\n }\n\n while ((aa < a.length) && (bb < b.length)){\n if (a[aa].compareTo(b[bb]) > 0) bb++;\n else if (a[aa].compareTo(b[bb]) < 0) aa++;\n else return a[aa];\n }\n\n while ((aa < a.length) && (cc < c.length)){\n if (a[aa].compareTo(c[cc]) > 0) cc++;\n else if (a[aa].compareTo(c[cc]) < 0) aa++;\n else return a[aa];\n }\n\n while ((bb < b.length) && (cc < c.length)){\n if (b[bb].compareTo(c[cc]) > 0) cc++;\n else if (b[bb].compareTo(c[cc]) < 0) bb++;\n else return b[bb];\n }\n\n return \"\";\n }", "public static void main(String[] args) {\n \n Scanner input = new Scanner(System.in);\n int n = input.nextInt();\n String[] p = new String[n];\n int[] counter = new int[n];\n for(int i = 0; i<n;i++ ){\n \tp[i] = input.next();\n \t\n \tint j = 0;\n \twhile(j<p[i].length()){\n \t\tint t =1;\n \t\tif(j + t < p[i].length()){\n \t\twhile(p[i].charAt(j) == p[i].charAt(j+t) ){\n \t\t\tt++;\n \t\t\tcounter[i]++;\n \t\t\tif(j+t >= p[i].length())\n \t\t\t\tbreak;\n \t\t\t\n \t\t}\n \t\t}\n \t\tj = j+t;\n \t\t\n \t\t\n \t\t\n \t}\n }\n \n for(int i= 0; i<n;i++){\n\t System.out.println(counter[i]);\n }\n \n \n \n input.close();\n }", "static int ctrno(String c) {\n int i=0;\n if (constrlist==null) {System.out.println(\"constrlist null\");}\n while (i<constrlist.size() && !c.equals(constrlist.get(i))) {i++;}\n if (i==constrlist.size()) {i=-1;}\n return i;\n }", "static int size_of_cnz(String passed){\n\t\treturn 3;\n\t}", "public static void main(String[] args) {\n\n\t\tint[] a = {1,2,3,8,8,9,6,4};\n\t String s = \"hello2java\"; \n\t\tHashMap<Integer,Integer> countMap1 = new HashMap<Integer,Integer>();\n\t\tHashMap<Character,Integer> countMap2 = new HashMap<Character,Integer>();\n \n\t\tchar[] ch = s.toCharArray();\n\t\t\n\t\t\tfor(int i=0;i<a.length;i++){\n\t\t\t\tif(countMap1.containsKey(a[i])){\n\t\t\t\t\tcountMap1.put(a[i], countMap1.get(a[i])+1);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tcountMap1.put(a[i],1);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t//}\n\t\tSystem.out.println(countMap1);\n\t\t\n\t\tfor(int i=0;i<ch.length;i++){\n\t\t\tif(countMap2.containsKey(ch[i])){\n\t\t\t\tcountMap2.put(ch[i], countMap2.get(ch[i])+1);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tcountMap2.put(ch[i],1);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tSystem.out.println(countMap2);\n\t\t\n\t\tSet<Character> ket = countMap2.keySet();\n for(Character c:ket){\n \tif(countMap2.get(c)>1){\n \t\tSystem.out.println(c+\"-->\"+countMap2.get(c));\n \t}\n }\n\t}", "private static boolean checkPermutationCountingArray(String s1, String s2) {\n // Strings are of unequal length. Cannot be permutations.\n if (s1.length() != s2.length()) {\n return false;\n }\n\n int[] characterCount = new int[128];\n for (int i = 0; i < s1.length(); i++) {\n characterCount[s1.charAt(i)]++;\n characterCount[s2.charAt(i)]--;\n }\n for (int i = 0; i < characterCount.length; i++) {\n if (characterCount[i] != 0) return false;\n }\n return true;\n }", "static int size_of_cpe(String passed){\n\t\treturn 3;\n\t}", "public int commonPrefixLength(String s1, String s2)\r\n {\r\n\r\n int length = 0;\r\n if (s1.isEmpty() || s2.isEmpty())\r\n {\r\n return 0;\r\n }\r\n while (s1.charAt(length) == s2.charAt(length))\r\n {\r\n length++;\r\n //if (k >= s1.length() || k >= s2.length() || k >= system.getLookupTableSize() - 1)\r\n if (length >= s1.length() || length >= s2.length())\r\n {\r\n break;\r\n }\r\n }\r\n\r\n return length;\r\n\r\n }", "@Test\n public void charCount() {\n final int expectedEight = 8;\n final int expectedFour = 4;\n\n CharCount charCounter = new CharCount();\n assertEquals(expectedEight, charCounter.characterCounter(\"fizzbuzz FIZZBUZZ\", 'z'));\n assertEquals(expectedEight, charCounter.characterCounter(\"fizzbuzz FIZZBUZZ\", 'Z'));\n assertEquals(expectedFour, charCounter.characterCounter(\"FIZZBUZZ\", 'z'));\n assertEquals(0, charCounter.characterCounter(\"TEdff fdjfj 223\", '1'));\n assertEquals(expectedFour, charCounter.characterCounter(\"TE00df0f f0djfj 223\", '0'));\n assertEquals(0, charCounter.characterCounter(\"RRuyt 111000AAdda\", (char) 0));\n }", "static int checkdigit(String num1, String num2)\n {\n for (int i=0;i<num1.length();i++)\n {\n char c1=num1.charAt(i);\n if((num1.substring(0,i).indexOf(c1))!=-1)//To check if a digit repeats itself in the substring \n continue;\n if(num2.indexOf(c1)==-1)//To check the presence of the digit in the factors\n return 0;\n \n int f1=0;int f2 =0;\n \n for(int k=0;k<num1.length();k++)//To find how many times c1 occurs in num1\n {\n if(c1==num1.charAt(k))\n f1=f1+1;\n }\n for(int p=0;p<num2.length();p++)//To find how many times c1 occurs in num2\n {\n if(c1==num2.charAt(p))\n f2=f2+1;\n }\n if(f1!=f2)//If c1 occurs the same number of times in num1 and num2\n {\n return 0;\n }\n \n }\n return 1;\n \n }", "public static void main(String[] args) {\n\r\n\t\tString s1=\"abcd\";\r\n\t\tString s2=\"vbvabcdqwe\";\r\n\t\tchar arr1[]=s1.toCharArray();\r\n\t\tchar arr2[]=s2.toCharArray();\r\n\r\n\t\tint flag=0;\r\n\t\tfor(int i=0;i<arr1.length;i++)\r\n\t\t{\r\n\t\t\tfor(int j=i;j<arr2.length;j++)\r\n\t\t\t{\r\n\t\t\t\tif(arr1[i]==arr2[j])\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t}\t\r\n\t\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\tString a=\"HeyDearHowareyou\"; \n\t\tString b=\"Howareyou\";\n\t\tHashMap<Character,Integer>map1=new HashMap<Character,Integer>();\n\t\tHashMap<Character,Integer>map2=new HashMap<Character,Integer>();\n\t\t\n\t\tmap1=getCharCount(a);\n\t\tmap2=getCharCount(b);\n\t\t\n\t\t//System.out.print(map1);\n\t\t\n\t\tint result=compareMaps(map1,map2);\n\t\t\n\t\t\tSystem.out.println(result);\n\t}", "@Test\n public void aminoCompareTest2() {\n //these list are already sorted\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(c);\n AminoAcidLL second = AminoAcidLL.createFromRNASequence(c);\n int expected = 0;\n assertEquals(expected, first.aminoAcidCompare(second));\n }", "public int f1(List<Book> a) {\r\n int count = 0;\r\n for (Book o : a) {\r\n int demchu = 0;\r\n int demso = 0;\r\n for (int i = 0; i < o.getCode().length(); i++) {\r\n char c = o.getCode().charAt(i);\r\n if (Character.isDigit(c)) {\r\n demso++;\r\n }\r\n if (Character.isLetter(c)) {\r\n demchu++;\r\n }\r\n }\r\n if (demchu != 0 && demso != 0) {\r\n count++;\r\n }\r\n }\r\n return count;\r\n\r\n }", "static int countCharacters2(String[] words, String chars) {\n int count = 0;\n int[] seen = new int[26];\n //Count char of Chars String\n for (char c : chars.toCharArray())\n seen[c - 'a']++;\n // Comparing each word in words\n for (String word : words) {\n // simple making copy of seen arr\n int[] tSeen = Arrays.copyOf(seen, seen.length);\n int Tcount = 0;\n for (char c : word.toCharArray()) {\n if (tSeen[c - 'a'] > 0) {\n tSeen[c - 'a']--;\n Tcount++;\n }\n }\n if (Tcount == word.length())\n count += Tcount;\n }\n return count;\n }", "public int minCharacters(String a, String b) {\n int[] c1 = new int[26];\n int[] c2 = new int[26];\n for (char c: a.toCharArray()) {\n c1[c-'a']++;\n }\n for (char c: b.toCharArray()) {\n c2[c-'a']++;\n }\n\n // initialize res\n int m = a.length();\n int n = b.length();\n int res = m + n;\n\n // 1. make string a and b only consist of distinct character\n for (int i = 0; i < 26; ++i) {\n // means operations to change all characters(m+n) to character i (c1[i] and c2[i])\n res = Math.min(res, m + n - c1[i] - c2[i]);\n }\n\n // cal prefix sum\n // this prefix sum represents the frequency of all characters less than i;\n for (int i = 1; i < 26; ++i) {\n c1[i] += c1[i - 1];\n c2[i] += c2[i - 1];\n }\n\n // 2,3 a less than b or b less than a\n // why the up-limit is 25? cos, the character 'z' can not be the base character. there is no one\n for (int i = 0; i < 25; ++i) {\n // c1[i] for freq of characters less than or equal to i in a\n // c2[i] for freq of characters less than or equal to i in b\n\n // 2. make a < b\n // replace all characters less or equal to i in `b` to larger ones and all characters grater than i in `a` to less ones\n res = Math.min(res, c2[i] + m - c1[i]);\n // 3. make a > b\n // replace all characters less or equal to i in `a` to larger ones and all characters grater than i in `b` to less ones\n res = Math.min(res, c1[i] + n - c2[i]);\n }\n return res;\n }", "private int commonLength( int i0, int i1 )\n {\n \tint n = 0;\n \twhile( (text[i0] == text[i1]) && (text[i0] != STOP) ){\n \t i0++;\n \t i1++;\n \t n++;\n \t}\n \treturn n;\n }", "private void longestCommonSubsequence(String str1, String str2) {\n\tdp\t= new int[str1.length()+1][str2.length()+1];\t\r\n\tString lcs = \"\";\r\n\tint i=0,j=0;\r\n\tfor(i=0;i<str1.length();i++){\r\n\t\tfor(j=0;j<str2.length();j++){\r\n\t\t\r\n\t\t\tif(str1.charAt(i)==str2.charAt(j)){\r\n\t\t\t\tdp[i+1][j+1] = dp[i][j] + 1; \r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tdp[i+1][j+1] =\r\n Math.max(dp[i+1][j], dp[i][j+1]);\r\n\t\t\t}\r\n\t\t}\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}\r\n\t\tSystem.out.println(dp[dp.length-1][dp[0].length-1]);\r\n\t\t\r\n\t}", "static int twoCharaters(String s) {\n\t\tList<String> list = Arrays.asList(s.split(\"\"));\n\t\tHashSet<String> uniqueValues = new HashSet<>(list);\n\t\tSystem.out.println(uniqueValues);\n\t\tString result;\n\t\twhile(check(list,1,list.get(0))) {\n\t\t\tresult = replace(list,1,list.get(0));\n\t\t\tif(result != null) {\n\t\t\t\tSystem.out.println(result);\n\t\t\t\ts = s.replaceAll(result,\"\");\n\t\t\t\tlist = Arrays.asList(s.split(\"\"));\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(s);\n\t\treturn 5;\n }", "static long triplets(int[] a, int[] b, int[] c) {\n SortedSet<Integer> setA = getSet(a);\n SortedSet<Integer> setB = getSet(b);\n SortedSet<Integer> setC = getSet(c);\n\n NavigableMap<Integer, Integer> aMap = cumulated(setA);\n NavigableMap<Integer, Integer> cMap = cumulated(setC);\n\n long counter = 0;\n\n for(Integer bElement : setB){\n Map.Entry<Integer, Integer> entryA = aMap.floorEntry(bElement);\n int itemsA = entryA == null ? 0 : entryA.getValue();\n\n Map.Entry<Integer, Integer> entryC = cMap.floorEntry(bElement);\n int itemsC = entryC == null ? 0 : entryC.getValue();\n\n counter += (long)itemsA*itemsC;\n }\n return counter;\n }", "static int size_of_adc(String passed){\n\t\treturn 1;\n\t}", "static int alternate(String s) {\n\n \n char[] charArr = s.toCharArray();\n\n int[] arrCount=new int[((byte)'z')+1];\n\n for(char ch:s.toCharArray()){ \n arrCount[(byte)ch]+=1;\n }\n \n int maxLen=0;\n for(int i1=0;i1<charArr.length;++i1)\n {\n char ch1= charArr[i1];\n for(int i2=i1+1;i2<charArr.length;++i2)\n {\n char ch2 = charArr[i2];\n if(ch1 == ch2)\n break;\n\n //validate possible result\n boolean ok=true;\n {\n char prev = ' ';\n for(char x:charArr){\n if(x == ch1 || x == ch2){\n if(prev == x){\n ok=false;\n break;\n }\n prev = x;\n }\n }\n\n }\n if(ok)\n maxLen = Math.max(maxLen,arrCount[(byte)ch1]+arrCount[(byte)ch2]);\n }\n }\n\n return maxLen;\n\n }", "public static List<Integer> lcs(List<Integer> arr1, List<Integer> arr2) {\r\n ArrayList empty = new ArrayList();\r\n /* BEFORE WE ALLOCATE ANY DATA STORAGE, VALIDATE ARGS */\r\n if (null == arr1 || 0 == arr1.size())\r\n return empty;\r\n if (null == arr2 || 0 == arr2.size())\r\n return empty;\r\n\r\n if (equalLists(arr1, arr2)) {\r\n return arr1;\r\n }\r\n\r\n /* ALLOCATE VARIABLES WE'LL NEED FOR THE ROUTINE */\r\n ArrayList<Integer> bestMatch = new ArrayList<Integer>();\r\n ArrayList<Integer> currentMatch = new ArrayList<Integer>();\r\n ArrayList<List<Integer>> dataSuffixList = new ArrayList<List<Integer>>();\r\n ArrayList<List<Integer>> lineSuffixList = new ArrayList<List<Integer>>();\r\n\r\n /* FIRST, COMPUTE SUFFIX ARRAYS */\r\n for (int i = 0; i < arr1.size(); i++) {\r\n dataSuffixList.add(arr1.subList(i, arr1.size()));\r\n }\r\n for (int i = 0; i < arr2.size(); i++) {\r\n lineSuffixList.add(arr2.subList(i, arr2.size()));\r\n }\r\n\r\n /* STANDARD SORT SUFFIX ARRAYS */\r\n IntegerListComparator comp = new IntegerListComparator();\r\n Collections.sort(dataSuffixList, comp);\r\n Collections.sort(lineSuffixList, comp);\r\n\r\n /* NOW COMPARE ARRAYS MEMBER BY MEMBER */\r\n List<?> d = null;\r\n List<?> l = null;\r\n List<?> shorterTemp = null;\r\n int stopLength = 0;\r\n int k = 0;\r\n boolean match = false;\r\n\r\n bestMatch.retainAll(empty);\r\n bestMatch.addAll(currentMatch);\r\n for (int i = 0; i < dataSuffixList.size(); i++) {\r\n d = (List) dataSuffixList.get(i);\r\n for (int j = 0; j < lineSuffixList.size(); j++) {\r\n l = (List) lineSuffixList.get(j);\r\n if (d.size() < l.size()) {\r\n shorterTemp = d;\r\n } else {\r\n shorterTemp = l;\r\n }\r\n\r\n currentMatch.retainAll(empty);\r\n k = 0;\r\n stopLength = shorterTemp.size();\r\n match = (l.get(k).equals(d.get(k)));\r\n while (k < stopLength && match) {\r\n if (l.get(k).equals(d.get(k))) {\r\n currentMatch.add((Integer) shorterTemp.get(k));\r\n k++;\r\n } else {\r\n match = false;\r\n }\r\n }\r\n if (currentMatch.size() > bestMatch.size()) {\r\n bestMatch.retainAll(empty);\r\n bestMatch.addAll(currentMatch);\r\n }\r\n }\r\n }\r\n return bestMatch;\r\n }", "public static void main(String[] args) {\n\t\tString s = \"ababacbaccc\";//{abcbbbbcccbdddadacb,bcbbbbcccb,10}\n\t\tSystem.out.println(lengthOfLongestSubstringTwoDistinct(s));\n\t}", "public static int matchingPairs(String s, String t) {\n if(s.length() != t.length()) return 0;\r\n StringBuilder sb1 = new StringBuilder();\r\n StringBuilder sb2 = new StringBuilder();\r\n int res = 0;\r\n boolean hasDuplicates = false; //Edge Case where if it has Dups then you can just to inner swap and you will get same result\r\n Set<Character> dupsCheckSet = new HashSet<>();\r\n\r\n for(int idx = 0; idx < s.length(); idx++){\r\n if(s.charAt(idx) != t.charAt(idx)){\r\n sb1.append(s.charAt(idx));\r\n sb2.append(t.charAt(idx));\r\n }else {\r\n if(!dupsCheckSet.add(s.charAt(idx))){\r\n hasDuplicates = true;\r\n }\r\n res++;\r\n }\r\n }\r\n\r\n //if both string are same then you don't have to calculate\r\n if(sb1.length() == 0){\r\n if(hasDuplicates){\r\n return res;\r\n }\r\n return res - 2;\r\n }\r\n\r\n Map<Character, Integer> mapS = new HashMap<>(), mapT = new HashMap<>();\r\n for (int idx = 0; idx < sb1.length(); idx++){ //\"bd\",\"db\";\r\n //if mapS contains chars from sb2 then if we swap them with each other it will be a matching pair\r\n if(mapS.containsKey(sb2.charAt(idx))){\r\n res++;\r\n }\r\n //if both Chars are reverse of each other then we can switch and add 1 to it\r\n if(mapS.getOrDefault(sb2.charAt(idx), -1) == mapT.getOrDefault(sb1.charAt(idx), -2)){\r\n return res + 1;\r\n }\r\n mapS.put(sb1.charAt(idx), idx);\r\n mapT.put(sb2.charAt(idx), idx);\r\n }\r\n\r\n\r\n return res + ((sb1.length() == 1) ? -1 : 0);\r\n }", "public static void main(String[] args) {\n\t\t String S = \"aacaacca\";\n\t\t String T = \"ca\";\n\t\tSystem.out.println(numDistinct(S, T));\n\t}", "public static void main(String[] args) {\n\n\t\tString a = \"aabbbc\", b =\"cbad\";\n\t\t// a=abc\t\t\t\tb=cab\n\t\t\n\t\t\n\t\tString a1 =\"\" , b1 = \"\"; // to store all the non duplicated values from a\n\t\t\n\t\tfor(int i=0; i<a.length();i++) {\n\t\t\tif(!a1.contains(a.substring(i,i+1)))\n\t\t\t\ta1 += a.substring(i,i+1);\n\t\t}\n\t\t\n\t\tfor(int i=0; i<b.length();i++) {\n\t\t\tif(!b1.contains(b.substring(i,i+1)))\n\t\t\t\tb1 += b.substring(i,i+1);\n\t\t}\n\t\t\t\t\n\t\tchar[] ch1 = a1.toCharArray();\n\t\tSystem.out.println(Arrays.toString(ch1));\n\t\t\n\t\tchar[] ch2 = b1.toCharArray();\n\t\tSystem.out.println(Arrays.toString(ch2));\n\t\t\n\t\tArrays.sort(ch1);\n\t\tArrays.sort(ch2);\n\t\t\n\t\tSystem.out.println(\"=====================================================\");\n\t\t\n\t\tSystem.out.println(Arrays.toString(ch1));\n\t\tSystem.out.println(Arrays.toString(ch2));\n\t\t\n\t\tString str1 = Arrays.toString(ch1);\n\t\tString str2 = Arrays.toString(ch2);\n\t\t\n\t\tif(str1.contentEquals(str2)) {\n\t\t\tSystem.out.println(\"true, they build out of same letters\");\n\t\t}else { \n\t\t\tSystem.out.println(\"fasle, there is something different\");\n\t\t}\n\t\t\n\n\t\t\n\t\t// SHORTER SOLUTION !!!!!!!!!!!!!!!!!!!!\n\t\t\n//\t\tString Str1 = \"aaaabbbcc\", Str2 = \"cccaabbb\";\n//\t\t\n//\t\tStr1 = new TreeSet<String>( Arrays.asList(Str1.split(\"\"))).toString();\n//\t\tStr2 = new TreeSet<String>( Arrays.asList(Str2.split(\"\"))).toString();\n//\t\tSystem.out.println(Str1.equals(Str2));\n//\t\t\n//\t\t\n\t\t\n}", "public int countSubstrings(String s) {\n int cnt = 0;\n\n char[] str = s.toCharArray();\n\n\n for(int j=0; j<2; j++) {\n for(int i=0; i< str.length; i++) {\n int left = i;\n int right = i+j;\n\n while(left>=0 && right<str.length && str[left] == str[right]) {\n cnt++;\n left--;\n right++;\n }\n\n }\n }\n\n return cnt;\n }", "private static int GetNumberOfDeletion(String str) {\n\n\t\tint deleteDNumber = 0;\n\t\tString uniqueArray = str.chars().distinct().mapToObj(c -> String.valueOf((char) c))\n\t\t\t\t.collect(Collectors.joining());\n\t\tList<Integer> list = new ArrayList<>();\n\t\tHashMap<Character, Integer> hm = new HashMap<>();\n\t\tfor (int i = 0; i < str.length(); i++) {\n\t\t\tif (hm != null && hm.containsKey(str.charAt(i))) {\n\t\t\t\thm.put(str.charAt(i), hm.get(str.charAt(i)) + 1);\n\t\t\t} else {\n\t\t\t\thm.put(str.charAt(i), 1);\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < uniqueArray.length(); i++) {\n\t\t\tint count = hm.get(uniqueArray.charAt(i));\n\t\t\twhile (count != 0 && list.contains(count)) {\n\t\t\t\tcount--;\n\t\t\t\tdeleteDNumber++;\n\t\t\t}\n\t\t\tlist.add(count);\n\t\t}\n\n\t\treturn deleteDNumber;\n\n\t}", "public static void main(String[] args) {\n\t\tString str = \"Hello Dude Umd\";\n\t\tchar ch[] = {'a', 'e', 'i', 'o', 'u', 'A', 'E','I' ,'O', 'U'};\n\t\tchar ch2[] = str.toCharArray();\n\t\t\n\t\tint count = 0;\n\t\t\n\t\tint space = 0;\n\t\tfor(int i = 0; i <ch2.length; i ++){\n\t\t\tif(ch2[i]==32){\n\t\t\t\tspace++;\n\t\t\t}\n\t\t\tfor(int j = 0; j <ch.length; j++){\n\t\t\t\tif(ch[j] == ch2[i]){\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"Length of String: \" + str.length());\n\t\tSystem.out.println(\"Vowels: \" +count);\n\t\tSystem.out.println(\"Consonants: \" + (str.length()-(count+space)));\n\t\tSystem.out.println(\"Space are \" + space);\n\n\t}", "@Test\n public void aminoCountsTest1(){\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(a);\n int[] expected = {1,3,1};\n assertArrayEquals(expected, first.aminoAcidCounts());\n }", "private int lcs(String word1, String word2) {\n int m = word1.length();\n int n = word2.length();\n int[][] dp = new int[m + 1][n + 1];\n //mem[i][j] means the LCS length formed by A[:i] and B[:j]\n for (int i = 0; i < m; i++) {\n for (int j = 0; j < n; j++) {\n if (word1.charAt(i) == word2.charAt(j)) {\n dp[i + 1][j + 1] = dp[i][j] + 1;\n } else {\n dp[i + 1][j + 1] = Math.max(dp[i + 1][j], dp[i][j + 1]);\n }\n }\n }\n return dp[m][n];\n }", "static long substrCount(int n, String input) {\n List<String> result = new ArrayList<>();\n if (!isEmpty(input)) {\n for (int index = 0; index <= input.length(); index++) {\n for (int i = index; i <= input.length(); i++) {\n String temp = input.substring(index, i);\n if (valid(temp)) {\n result.add(temp);\n }\n }\n }\n }\n return result.size();\n\n }", "static int size_of_jc(String passed){\n\t\treturn 3;\n\t}", "void calculateDistance()\t{\n\t\t\t\t\t\t\t\t\t\n\t\tfor (String substringOne : setOne)\t{\n\t\t\t\tif (setTwo.contains(substringOne))\n\t\t\t\t\toverlapSubstringCount++;\n\t\t}\t\t\t\t\t\t\t\n\n\t\tsubstringCount = (length1 - q) + (length2 - q) + 2 - overlapSubstringCount; \n\t\tdistance = (double)overlapSubstringCount/(substringCount - overlapSubstringCount);\t\n\t}", "static int size_of_dcr(String passed){\n\t\treturn 1;\n\t}", "public int strCount(String str, String sub) {\n//Solution to problem coming soon\n}", "public static void main(String[] args) {\n\t\tString S = \"deccdbebedabedecedebeccdebbaddddecacdbdeaabebcbaaccaaeabcccccadbeaaecaecacdbebeeedbeeecedebcbeaaaaaecbbcdebeacabccabddadeecbacbcebbbceacddbbaccebabbadebebcaaececbccac\";\n\t\tString T = \"bbbdedc\";\n\t\tSolution s = new Solution();\n\t\tSystem.out.println(S.length());\n\t\tSystem.out.print(s.numDistinct(S, T));\n\n\t}", "public static void main(String[] args) \n{\nScanner scan=new Scanner(System.in);\n \nSystem.out.println(\"Please Enter the String here\");\n \n// It will accept String from user and will store in variable\nString str1=scan.next();\n \nSystem.out.println(\"enter the letter to count\");\n \n// It will accept char from user and will store in variable\nString str2=scan.next();\n \n// Now from Second String get the value using charAt method\nchar cha = str2.charAt(0);\n \n// take count variable\nint count=0;\n \n// Run a for loop that will run based on String length\nfor(int i=0;i<=str1.length()-1;i++)\n{\n \n// This will check if match found\nif(str1.charAt(i)==cha)\n \n{\n \n// It will increment the counter\ncount++;\n \n}\n \n}\n \n// Finally print the count\nSystem.out.println(count);\n \n}", "public static int longestCommonSubsequence(String text1, String text2) {\n Map<Character, List<Integer>> characterListMap = new HashMap<>();\n char[] cA = text1.toCharArray();\n for (int i = 0; i < cA.length; i++) {\n if (characterListMap.get(cA[i]) == null) {\n List<Integer> list = new ArrayList<>();\n list.add(i);\n characterListMap.put(cA[i], list);\n } else {\n characterListMap.get(cA[i]).add(i);\n }\n }\n char[] cA2 = text2.toCharArray();\n int i = 0;\n int prevBiggest = 0;\n int previndex = 0;\n int currBiggest = 0;\n while (i < cA2.length && characterListMap.get(cA2[i]) == null) {\n i++;\n }\n if (i < cA2.length && characterListMap.get(cA2[i]) != null) {\n previndex = characterListMap.get(cA2[i]).get(characterListMap.get(cA2[i]).size() - 1);\n i++;\n currBiggest++;\n }\n\n\n for (; i < cA2.length; i++) {\n if (characterListMap.containsKey(cA2[i])) {\n if (characterListMap.get(cA2[i]).get(characterListMap.get(cA2[i]).size() - 1) > previndex) {\n previndex = characterListMap.get(cA2[i]).get(characterListMap.get(cA2[i]).size() - 1);\n currBiggest++;\n } else {\n previndex = characterListMap.get(cA2[i]).get(characterListMap.get(cA2[i]).size() - 1);\n if (currBiggest > prevBiggest) {\n prevBiggest = currBiggest;\n }\n currBiggest = 1;\n }\n }\n }\n\n return prevBiggest > currBiggest ? prevBiggest : currBiggest;\n }", "public static int getCommonStrLength(String str1, String str2) {\n\t\t\n\t\tint len1 = str1.length();\n\t\tint len2 = str2.length();\n\t\t\n\t\tif (len1<=0 || len2<=0) {\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\tchar[] s1 = str1.toLowerCase().toCharArray();\n\t\tchar[] s2 = str2.toLowerCase().toCharArray();\n\t\tint[][] dp = new int[len1][len2];\n\t\tint result = 0;\n\t\t\n\t\tfor (int i=0; i<len1; i++) {\n\t\t\tfor (int j=0; j<len2; j++) {\n\t\t\t\tif (s1[i] == s2[j]) {\n\t\t\t\t\tif (i==0 || j==0) {\n\t\t\t\t\t\tdp[i][j] = 1;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdp[i][j] = dp[i-1][j-1] + 1;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tdp[i][j] = 0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (dp[i][j] > result) {\n\t\t\t\t\tresult = dp[i][j];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn result;\n\t\t\t\n\t}", "public int count (String a, String b) {\n return 0;\n }", "int difference(String str1,String str2){\n\t\ttry {\n\t\t\treturn mSoundex.difference(str1, str2);\n\t\t} catch (EncoderException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn 0;\n\t}", "@Test\r\n public void test5() {\r\n String[] words = new String[] {\r\n \"A\", \"B\", \"C\", \"D\", \"E\", \"F\", \"F\", \"B\", \"H\", \"I\", \"J\", \"K\"\r\n };\r\n \r\n Assert.assertEquals(shortestDistanceBetween(words, \"B\", \"F\"), 1);\r\n Assert.assertEquals(shortestDistanceBetween(words, \"A\", \"E\"), 4);\r\n Assert.assertEquals(shortestDistanceBetween(words, \"I\", \"A\"), 9);\r\n }", "static int makeAnagram1(String a, String b) {\n int count = 0;\n Map<Character, Integer> mapA = initMap(a);\n Map<Character, Integer> mapB = initMap(b);\n\n Iterator<Character> it = mapA.keySet().iterator();\n while (it.hasNext()) {\n char c = it.next();\n int frequencyA = mapA.get(c);\n if (mapB.containsKey(c)) {\n int frequencyB = mapB.get(c);\n count += Math.abs(frequencyA - frequencyB);\n int min = Math.min(frequencyA, frequencyB);\n mapA.put(c, min);\n mapB.put(c, min);\n } else {\n count += frequencyA;\n }\n }\n\n it = mapB.keySet().iterator();\n while (it.hasNext()) {\n char c = it.next();\n int frequencyB = mapB.get(c);\n if (mapA.containsKey(c)) {\n int frequencyA = mapA.get(c);\n count += Math.abs(frequencyA - frequencyB);\n int min = Math.min(frequencyA, frequencyB);\n mapA.put(c, min);\n mapB.put(c, min);\n } else {\n count += frequencyB;\n }\n }\n return count;\n }", "private static int commonChild(String s1, String s2) {\n //reduce of iterations\n //make strings shorter\n //TreeMap to keep order\n Map<Integer, Character> map1 = new TreeMap<>();\n Map<Integer, Character> map2 = new TreeMap<>();\n StringBuilder stringBuilder = new StringBuilder();\n for (int i = 0; i < s1.length(); i++) {\n for (int j = 0; j < s2.length(); j++) {\n char charOfS1 = s1.charAt(i);\n char charOfS2 = s2.charAt(j);\n if (charOfS1 == charOfS2) {\n map1.put(i, charOfS1);\n map2.put(j, charOfS2);\n }\n }\n }\n for (Map.Entry<Integer, Character> entry : map1.entrySet()) {\n stringBuilder.append(entry.getValue());\n }\n s1 = stringBuilder.toString();\n stringBuilder = new StringBuilder();\n for (Map.Entry<Integer, Character> entry : map2.entrySet()) {\n stringBuilder.append(entry.getValue());\n }\n s2 = stringBuilder.toString();\n /*\n ------------------------------------------------\n */\n int lengthS1 = s1.length();\n int lengthS2 = s2.length();\n int[][] arr = new int[lengthS1+1][lengthS2+1];\n for (int i = 1; i <= lengthS1; i++) {\n for (int j = 1; j <= lengthS2; j++) {\n char charI = s1.charAt(i - 1); //from 0\n char charJ = s2.charAt(j - 1); //from 0\n arr[i][j] = (charI==charJ) ?\n arr[i-1][j-1] + 1 :\n Math.max(arr[i-1][j],arr[i][j-1]);\n }\n }\n\n return arr[lengthS1][lengthS2];\n }", "public static int longestCommonSubsequenceLength(String s1, String s2)\n {\n return longestCommonSubsequenceLength(s1.toCharArray(), s2.toCharArray(), s1.length(), s2.length());\n }", "public int normalizedLength(List<String> sequence);", "public static void main(String[] args) {\n String str1 = \"ABABAB\";\n String str2 = \"ABAB\";//\n// String str1 = \"LEFT\";\n// String str2 = \"RIG\";\n String result = gcdOfStrings(str1, str2);\n System.out.println(\"result = \" + result);\n }", "static int size_of_cmp(String passed){\n\t\treturn 1;\n\t}", "static int compare(String a, String b) {\n if (a == null) a = \"\";\n if (b == null) b = \"\";\n\n int i = 0;\n while (i < a.length() && i < b.length()) {\n char x = a.charAt(i), y = b.charAt(i);\n if (x != y) return x - y;\n i++;\n }\n return a.length() - b.length();\n }", "static int birthday(List<Integer> s, int d, int m) {\n int matchCount = 0;\n for (int i = 0; i < s.size(); i++){\n int length = 0;\n int intSum = 0;\n while(length < m && m <= s.size()-i){\n intSum += s.get(i+length);\n length++;\n }\n if (intSum == d){\n matchCount += 1;\n }\n\n }\n\n return matchCount;\n\n }", "static int size_of_daa(String passed){\n\t\treturn 1;\n\t}", "public int countConsonants(String str){\n\t\tint count=str.replaceAll(\"[^A-Za-z0-9_]\", \"\").length()\n\t\t\t\t-str.toLowerCase().replaceAll(\"[^aeiouy]\",\"\").length();\n\t\treturn count;\n\t}", "public int stringMatch(String a, String b) {\n int result = 0;\n int end = (a.length()<=b.length()? a.length():b.length());\n for (int i = 0; i <end-1 ; i++){\n if (a.substring(i, i + 2).equals(b.substring(i, i + 2))) {\n result++;\n }\n }\n return result;\n }", "static int size_of_dcx(String passed){\n\t\treturn 1;\n\t}", "public static void main(String[] args) {\n String start = \"cat\";\n String end = \"dot\";\n// Set<String> dict = new HashSet<>();\n// dict.add(\"cot\");\n// dict.add(\"cog\");\n Set<String> dict = new HashSet<>(Arrays.asList(\"cot\", \"cog\"));\n // this is not time efficient since you are constructing an array,\n // converting to a list and using that list to create a set.\n\n System.out.println(ladderLength(start, end, dict));\n }", "private static boolean checkPermutationCountingHashMap(String s1, String s2) {\n // Strings are of unequal length. Cannot be permutations.\n if (s1.length() != s2.length()) return false;\n\n // Keep a track of the characters using a HashMap.\n Map<Character, Integer> map = new HashMap<Character, Integer>();\n for (int i = 0; i < s1.length(); i++) {\n // Increment count for characters in s1\n if (map.containsKey(s1.charAt(i))) {\n map.put(s1.charAt(i), map.get(s1.charAt(i)) + 1);\n } else {\n map.put(s1.charAt(i), 1);\n }\n\n // Decrement count for characters in s2\n if (map.containsKey(s2.charAt(i))) {\n map.put(s2.charAt(i), map.get(s2.charAt(i)) - 1);\n } else {\n map.put(s2.charAt(i), -1);\n }\n }\n\n // If there are any characters not present in both, some value would be -1 or 1.\n // This case would imply that the strings are not permutations.\n for (char c : map.keySet()) {\n if (map.get(c) != 0) return false;\n }\n return true;\n }", "static boolean isPermutation_2(String a, String b){\n boolean isPermutation = true;\n //lets store every char in an array of boolean\n int[] charCount = new int[256];\n for(char c:a.toCharArray()){\n charCount[c]++;\n }\n //now verify the count in another string and subtract the count\n for(char c:b.toCharArray()){\n charCount[c]--;\n }\n //now check if any count is non-zero then the two string have unequal count of that char\n for(int i=0;i<charCount.length;i++)\n if(charCount[i]!=0)\n return false;\n \n return isPermutation;\n }", "static int size_of_cz(String passed){\n\t\treturn 3;\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tString s1=\"Hi Hello\";\n\t\tfrequent(s1);\n//\t\tchar ch[] = s1.toCharArray();\n//\t\tchar ch1;\n//\t\tchar ch2[]=new char[10];\n//\t\t\n//\t\tfor(int i=0;i<ch.length;i++) {\n//\t\t\tSystem.out.println(ch[i]);\n//\t\t}\n//\t\t\n//\t\tfor(int i=0;i<ch.length;i++) {\n//\t\t\t\n//\t\t\tint count=1;\n//\t\t\tfor(int j=i+1;j<ch.length;j++) {\n//\t\t\t\t\n//\t\t\t\tif(ch[i]==ch[j]) {\n//\t\t\t\t\t\n//\t\t\t\t\tcount++;\n//\t\t\t\t}\n//\t\t\t\t\n//\t\t\t}System.out.println(\"Count of \"+ch[i]+\"=\"+count);\n//\t\t}\n\t\t\n\t\t\n\t\n\n\t}", "static int longestSubsequence(String x, String y) {\n char[] strX = x.toCharArray();\n char[] strY = y.toCharArray();\n\n Map<Character, Integer> xMap = new HashMap<>();\n Map<Character, Integer> yMap = new HashMap<>();\n\n for (int i = 0; i < strX.length; i++) {\n char c = strX[i];\n if (xMap.containsKey(c)) {\n xMap.put(c, xMap.get(c) + 1);\n } else {\n xMap.put(c, 1);\n }\n }\n\n for (int i = 0; i < strY.length; i++) {\n char c = strY[i];\n if (yMap.containsKey(c)) {\n yMap.put(c, yMap.get(c) + 1);\n } else {\n yMap.put(c, 1);\n }\n }\n\n System.out.println(xMap);\n System.out.println(yMap);\n\n ArrayList<Character> subsequence = new ArrayList<>();\n\n // first find match subsequence\n for (Character c : yMap.keySet()) {\n if (!xMap.containsKey(c)) {\n continue;\n }\n\n int xCount = xMap.get(c);\n int yCount = yMap.get(c);\n int charCount = xCount < yCount ? xCount : yCount;\n\n for (int i = 0; i < charCount; i++) {\n subsequence.add(c);\n }\n }\n\n System.out.println(\"may be seq\" + subsequence);\n\n int max = 0;\n for (int i = 0; i < subsequence.size(); i++) {\n char c = subsequence.get(i);\n ArrayList<Character> remains = new ArrayList<>(subsequence);\n remains.remove(i);\n StringBuilder curr = new StringBuilder();\n curr.append(c);\n// System.out.println(\"max\" + max);\n int result = findPermutation(y, curr, remains, max);\n if (result > max) {\n max = result;\n }\n }\n\n // find matching permutation\n\n System.out.println(\"result\" + max);\n // then find sub string\n return max;\n }", "private int getNumMatches(String word1, String word2) {\n int count = 0;\n for (int i = 0; i < word1.length(); i++) {\n if (word1.charAt(i) == word2.charAt(i)) {\n count++;\n }\n }\n \n return count;\n }", "public int countAbc(String str) {\n//Solution to problem coming soon\n}", "static int rawNumElementsInCommon(Set s1, Set s2) {\n int result = 0;\n for (Object o1 : s1)\n if (s2.contains(o1))\n result++;\n return result;\n }", "public static void main(String[] args){\n System.out.println(linuxRules(\"/c/d/////././../e/\"));\n// System.out.println(linuxRules(\"/c/d/////././../e/..\"));\n// System.out.println(linuxRules(\"/c/d/////././../ed/..\"));\n// System.out.println(linuxRules(\"/c/d/////././../ed/.\"));\n /* String[] strs = new String[]{\"flower\",\"ooow\",\"flight\",\"flosh\"};\n System.out.println(longestCommonPrefix(strs));*/\n /* System.out.println( findRealParentheses(\"()[]{}\"));\n System.out.println( findRealParentheses(\"))[]{}\"));\n System.out.println( findRealParentheses(\"()[]{(}\"));\n System.out.println( findRealParentheses(\"[()[]]{}\"));*/\n /*Integer[] firstList = new Integer[]{1, 5, 6};\n Integer[] secondList = new Integer[]{1, 3, 4, 6};\n int i = 0;\n Integer[] combileList = combine(firstList, secondList);\n while (i < combileList.length) {\n System.out.println(combileList[i]);\n i++;\n }*/\n /* Integer[] original = new Integer[]{0,0,1,1,1,2,2,3,3,4};\n System.out.println(deleteCommonItem(original));*/\n /* Integer[] original = new Integer[]{3,2,3,1,4,5,3,2,1};\n System.out.println(deleteAssignItem(original, 3));*/\n// System.out.println(indexOf(\"hello\", \"ll\"));\n// System.out.println(indexOf(\"aaaaa\", \"aab\"));\n\n /* System.out.println(longest(\"abcabcbb\"));\n System.out.println(longest(\"bbbbb\"));\n System.out.println(longest(\"pwwkew\"));*/\n\n /*System.out.println(longestPalindromeStr(\"babad\"));\n System.out.println(longestPalindromeStr(\"cyyoacmjwjubfkzrrbvquqkwhsxvmytmjvbborrtoiyotobzjmohpadfrvmxuagbdczsjuekjrmcwyaovpiogspbslcppxojgbfxhtsxmecgqjfuvahzpgprscjwwutwoiksegfreortttdotgxbfkisyakejihfjnrdngkwjxeituomuhmeiesctywhryqtjimwjadhhymydlsmcpycfdzrjhstxddvoqprrjufvihjcsoseltpyuaywgiocfodtylluuikkqkbrdxgjhrqiselmwnpdzdmpsvbfimnoulayqgdiavdgeiilayrafxlgxxtoqskmtixhbyjikfmsmxwribfzeffccczwdwukubopsoxliagenzwkbiveiajfirzvngverrbcwqmryvckvhpiioccmaqoxgmbwenyeyhzhliusupmrgmrcvwmdnniipvztmtklihobbekkgeopgwipihadswbqhzyxqsdgekazdtnamwzbitwfwezhhqznipalmomanbyezapgpxtjhudlcsfqondoiojkqadacnhcgwkhaxmttfebqelkjfigglxjfqegxpcawhpihrxydprdgavxjygfhgpcylpvsfcizkfbqzdnmxdgsjcekvrhesykldgptbeasktkasyuevtxrcrxmiylrlclocldmiwhuizhuaiophykxskufgjbmcmzpogpmyerzovzhqusxzrjcwgsdpcienkizutedcwrmowwolekockvyukyvmeidhjvbkoortjbemevrsquwnjoaikhbkycvvcscyamffbjyvkqkyeavtlkxyrrnsmqohyyqxzgtjdavgwpsgpjhqzttukynonbnnkuqfxgaatpilrrxhcqhfyyextrvqzktcrtrsbimuokxqtsbfkrgoiznhiysfhzspkpvrhtewthpbafmzgchqpgfsuiddjkhnwchpleibavgmuivfiorpteflholmnxdwewj\"));*/\n\n /* int[] rec1 = {7,8,13,15};\n int[] rec2 = {10,8,12,20};\n System.out.println(isRectangleOverlap(rec1, rec2));*/\n /* 输入: A = [1,2,3,0,0,0], m = 3; B = [2,5,6], n = 3\n 输出: [1,2,2,3,5,6]*/\n\n// System.out.println(validPalindrome(\"lcuppucul\") );\n// System.out.println(maxPower(\"t\") );\n// System.out.println(CheckPermutation(\"abc\", \"bca\") );\n// System.out.println(reverseOnlyLetters(\"Test1ng-Leet=code-Q!\") );\n// System.out.println(countSegments(\", , , , a, eaefa\") );\n\n// System.out.println(reverseWords(\"the sky is blue\") );\n }", "static int size_of_cpo(String passed){\n\t\treturn 3;\n\t}", "public static void main(String[] args) {\n\t\n\tString a = \"aabbbc\", b= \"cabbbac\";\n\t// a = abc, b=cab\n\t//we will remove all dublicated values from \"a\"\n\tString a1 = \"\"; //store all the non duplicated values from \"a\"\n\t\n\tfor (int j=0; j<a.length();j++) //this method is with nested loop\n\tfor (int i=0; i<a.length();i++) {\n\t\tif (!a1.contains(a.substring(j, j+1))) {\n\t\t\ta1 += a.substring(j, j+1);\n\t\t}\n\t\t\t\n\t}\n\tSystem.out.println(a1);\n\t//we will remove all duplicated values from \"b\"\n\tString b1 = \"\"; //store all the non duplicated values from \"b\"\n\tfor(int i=0; i<b.length();i++) { //this is with simple loop\n\t\tif(!b1.contains(b.substring(i, i+1))) {\n\t\t\t // \"\"+b.charAt(i)\n\t\t\tb1 += b.substring(i, i+1);\n\t\t\t// \"\"+b.charAt(i);\n\t\t}\n\t}\n\tSystem.out.println(b1);\n\t\n\t\n\t//a1 = \"acb\", b1 = \"cab\"\n\tchar[] ch1 = a1.toCharArray();\n\tSystem.out.println(Arrays.toString(ch1));\n\t\n\tchar[] ch2 = b1.toCharArray();\n\tSystem.out.println(Arrays.toString(ch2));\n\t\n\tArrays.sort(ch1);\n\tArrays.sort(ch2);\n\t\n\tSystem.out.println(\"========================\");\n\tSystem.out.println(Arrays.toString(ch1));\n\tSystem.out.println(Arrays.toString(ch2));\n\t\n\t\n\tString str1 = Arrays.toString(ch1);\n\tString str2 = Arrays.toString(ch2);\n\t\n\tif(str1.equals(str2)) {\n\t\tSystem.out.println(\"true, they are same letters\");\n\t}else {\n\t\tSystem.out.println(\"false, they are contain different letters\");\n\t}\n\t\n\t\n\t// solution 2:\n\t\t\t String Str1 = \"cccccaaaabbbbccc\" , Str2 = \"cccaaabbb\";\n\t\t\t \n\t\t\t Str1 = new TreeSet<String>( Arrays.asList( Str1.split(\"\"))).toString();\n\t\t\t Str2 = new TreeSet<String>( Arrays.asList( Str2.split(\"\"))).toString();\n\t\t\t \n\t\t\t System.out.println(Str1.equals(Str2));\n\t\t\t\t \n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n}", "public int numDistinct(String s, String t) {\n if(t.length()>s.length())return 0;\n int [][]dp = new int[t.length()+1][s.length()+1];\n for(int j=0;j<s.length();j++)dp[0][j]=1;\n for(int j=1;j<t.length();j++)dp[j][0]=0;\n for(int i=1;i<=t.length();i++){\n for(int j=1;j<=s.length();j++){\n dp[i][j] =dp[i][j-1];\n if(s.charAt(j-1)==t.charAt(i-1)){\n dp[i][j] +=dp[i-1][j-1];\n }\n }\n }\n return dp[t.length()][s.length()];\n }", "static int size_of_cmc(String passed){\n\t\treturn 1;\n\t}", "static int size_of_cma(String passed){\n\t\treturn 1;\n\t}", "public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n int N = Integer.parseInt(in.nextLine());\n HashSet<Character> first = new HashSet<Character>();\n HashSet<Character> second = new HashSet<Character>();\n int i=0;\n char temp = 'a';\n for(temp='a';temp<='z';temp++){\n \t first.add(temp);\n }\n int j;\n while(i<N){\n \t second.clear();\n \t char[] stringArray = in.nextLine().toCharArray();\n \t for(j=0;j<stringArray.length;j++){\n \t\t second.add(stringArray[j]); \n \t }\n \t first.retainAll(second);\n \t i++;\n }\n System.out.println(first.size());\n }", "public static int[] findNumsOfRepsv2(String s, char[] c) {\n int[] sums = new int[c.length];\n HashMap<Character, Integer> map = new HashMap<>();\n for (int i = 0; i < s.length(); i++){\n if (!map.containsKey(s.charAt(i))){\n map.put(s.charAt(i), 1);\n } else {\n int sum = map.get(s.charAt(i));\n map.put(s.charAt(i), sum + 1);\n }\n }\n for (int j = 0; j < c.length; j++){\n int sum;\n if (!map.containsKey(c[j])) {\n sums[j] = 0;\n } else {\n sums[j] = map.get(c[j]);\n }\n }\n return sums;\n }", "static\nint\ncountPairs(String str) \n\n{ \n\nint\nresult = \n0\n; \n\nint\nn = str.length(); \n\n\nfor\n(\nint\ni = \n0\n; i < n; i++) \n\n\n// This loop runs at most 26 times \n\nfor\n(\nint\nj = \n1\n; (i + j) < n && j <= MAX_CHAR; j++) \n\nif\n((Math.abs(str.charAt(i + j) - str.charAt(i)) == j)) \n\nresult++; \n\n\nreturn\nresult; \n\n}", "public static int[] findNumsOfRepsv1(String s, char[] c){\n int[] sums = new int[c.length]; // 1\n for (int i = 0; i < s.length(); i++){ // 1, n+1, n\n for(int j = 0; j < c.length; j++){ // n, n*m + 1, n*m\n if (s.charAt(i) == c[j]){ // n*m\n sums[j] = sums[j] + 1; // n*m\n }\n }\n }\n return sums; // 1\n }", "public static void main (String[] args) throws java.lang.Exception\n\t{\n\t\tScanner s = new Scanner(System.in);\n\t\tString s1=\"wipro\";\n\t\tString s2=\"technologies\";\n\t\tint i,j,temp;\n\t int a = s.nextInt();\n\t char[] c = s1.toCharArray();\n\t char[] d = s2.toCharArray();\n\t if(a==1)\n\t {\n\t \tfor(i=0;i<c.length;i++)\n\t \t{\n\t \t\tfor(j=0;j<d.length||j<c.length;j++)\n\t \t\t{\n\t \t\t\tif(c[i]==d[j])\n\t \t\t\t{\n\t \t\t\t\tSystem.out.println(c[i]);\n\t \t\t\t\tc[i]+='A'-'a';\n\t \t\t\t\td[j]+='A'-'a';\n\t \t\t\t\t\n\t \t\t\t\t\n\t \t\t\t}\n\t \t\t}\n\t \t}\n\t }\n\t \n\t else if(a==0)\n\t {\n\t \tfor(i=0;i<c.length;i++)\n\t \t{\n\t \t\tfor(j=0;j<d.length||j<c.length;j++)\n\t \t\t{\n\t \t\t\tif(c[i]!=d[j])\n\t \t\t\t{\n\t \t\t\t c[i]+='A'-'a';\n\t \t\t\t \n\t \t\t\t}\n\n\t \t\t}\n\t \t}\n\t for(i=0;i<d.length;i++)\n\t {\n\t \tfor(j=0;j<c.length;j++)\n\t \t\t{\n\t \t\t\tif(d[i]!=c[j])\n\t \t\t\t{\n\t \t\t\t d[i]+='A'-'a';\n\t \t\t\t \n\t \t\t\t}\n\n\t \t\t}\n\t \t}\n\t \t\n\t }\n\telse\n\t{\n\tSystem.out.println(\"no accepted value\");\n\t}\n\t \n\t \tSystem.out.print(c);\n\t \n\t \n\t \n\t \tSystem.out.print(d);\n\t \n\t}", "static int makeAnagram(String a, String b) {\n int[] frequencyA = countFrequency(a);\n int[] frequencyB = countFrequency(b);\n\n int count = 0;\n\n for (int i = 0; i < frequencyA.length; i++) {\n count += Math.abs(frequencyA[i] - frequencyB[i]);\n }\n return count;\n }" ]
[ "0.652232", "0.64420253", "0.6275387", "0.62154484", "0.6193609", "0.61149573", "0.6065952", "0.5916092", "0.59061265", "0.58879507", "0.5879223", "0.5863115", "0.5862178", "0.5848862", "0.58433634", "0.58354306", "0.5807061", "0.5775755", "0.5767679", "0.5764689", "0.5760987", "0.57493496", "0.57338446", "0.5715214", "0.57061094", "0.57025707", "0.5693695", "0.5687494", "0.5682274", "0.5672733", "0.56720656", "0.56682575", "0.56521636", "0.5638342", "0.5628982", "0.55985177", "0.5596869", "0.55867183", "0.5581564", "0.55702066", "0.55694413", "0.5565444", "0.55651385", "0.5564266", "0.5555426", "0.5553081", "0.5548854", "0.55483216", "0.5545818", "0.5543012", "0.55356586", "0.55303293", "0.5517886", "0.55062973", "0.55052495", "0.549853", "0.5494639", "0.54915154", "0.54894", "0.54889023", "0.547922", "0.54751307", "0.54663247", "0.54633594", "0.5458762", "0.5458458", "0.54562134", "0.54441714", "0.5437104", "0.54358906", "0.54321647", "0.5424018", "0.5422747", "0.54212797", "0.5420167", "0.5419079", "0.541752", "0.54168934", "0.5413468", "0.54102707", "0.54051435", "0.5404664", "0.5401787", "0.53985757", "0.5397566", "0.5392584", "0.5390898", "0.53904766", "0.5389162", "0.5386901", "0.5385617", "0.53833216", "0.5382737", "0.53795886", "0.53790057", "0.53717506", "0.5368314", "0.53669983", "0.5361558", "0.5361241" ]
0.6682634
0
/ public: Genesis interface
public void generate(GenCtx ctx) throws GenesisError { if((getEntries() == null) || (getEntries().length == 0)) return; //~: the start day (inclusive) Date curDay = findFirstGenDate(ctx); if(curDay == null) return; //~: the final day (inclusive) Date endDay = findLastGenDate(ctx); if(endDay == null) return; //c: generate till the last day while(!curDay.after(endDay)) { //~: set the day parameter of the context ctx.set(DAY, curDay); genObjectsTxDisp(ctx, curDay); curDay = DU.addDaysClean(curDay, +1); ctx.set(DAY, null); } //?: {has test} run it if(getTest() != null) getTest().testGenesis(ctx); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Genesis getGenesis()\n\t\t{\n\t\t\treturn genesis;\n\t\t}", "@Override\n public void newGame() {\n //TODO Implement this method\n }", "@Override\n public void loadGame() {\n\n }", "@Override\n\tpublic void onEnter(Game game) {\n\t\t\n\t}", "public void newGame();", "public void newGame();", "public void newGame();", "public GameWorld(){\r\n\t\t\r\n\t}", "public GameMain()\n {\n allenBad = new AllenSucks(this);\n }", "private GUIGameInfo() {\n this.board = new GUIBoard();\n this.logic = new regLogic();\n this.players = new Player[2];\n this.players[0] = new Player(Symbol.BLACK);\n this.players[1] = new Player(Symbol.WHITE);\n this.guiPlayers = new GUIPlayer[2];\n this.guiPlayers[0] = new GUIPlayer(this.players[0]);\n this.guiPlayers[1] = new GUIPlayer(this.players[1]);\n\n }", "void notifyNewGame();", "protected void loadGUIs()\n {\n guiMap.put(\"game\", new GuiGame(this));\n }", "void onNewGame();", "public interface Species {\r\n\r\n\r\n\t/**\r\n\t * Calculate the amount that a species will spawn.\r\n\t */\r\n\tvoid calculateSpawnAmount();\r\n\r\n\t/**\r\n\t * Choose a worthy parent for mating.\r\n\t * \r\n\t * @return The parent genome.\r\n\t */\r\n\tGenome chooseParent();\r\n\r\n\t/**\r\n\t * @return The age of this species.\r\n\t */\r\n\tint getAge();\r\n\r\n\t/**\r\n\t * @return The best score for this species.\r\n\t */\r\n\tdouble getBestScore();\r\n\r\n\t/**\r\n\t * @return How many generations with no improvement.\r\n\t */\r\n\tint getGensNoImprovement();\r\n\r\n\t/**\r\n\t * @return Get the leader for this species. The leader is the genome with\r\n\t * the best score.\r\n\t */\r\n\tGenome getLeader();\r\n\r\n\t/**\r\n\t * @return The numbers of this species.\r\n\t */\r\n\tList<Genome> getMembers();\r\n\r\n\t/**\r\n\t * @return The number of genomes this species will try to spawn into the\r\n\t * next generation.\r\n\t */\r\n\tdouble getNumToSpawn();\r\n\r\n\t/**\r\n\t * @return The number of spawns this species requires.\r\n\t */\r\n\tdouble getSpawnsRequired();\r\n\r\n\t/**\r\n\t * @return The species ID.\r\n\t */\r\n\tlong getSpeciesID();\r\n\r\n\t/**\r\n\t * Purge old unsuccessful genomes.\r\n\t */\r\n\tvoid purge();\r\n\r\n\t/**\r\n\t * Set the age of this species.\r\n\t * @param age The age.\r\n\t */\r\n\tvoid setAge(int age);\r\n\r\n\t/**\r\n\t * Set the best score.\r\n\t * @param bestScore The best score.\r\n\t */\r\n\tvoid setBestScore(double bestScore);\r\n\r\n\t/**\r\n\t * Set the number of generations with no improvement.\r\n\t * @param gensNoImprovement The number of generations with\r\n\t * no improvement.\r\n\t */\r\n\tvoid setGensNoImprovement(int gensNoImprovement);\r\n\r\n\t/**\r\n\t * Set the leader of this species.\r\n\t * @param leader The leader of this species.\r\n\t */\r\n\tvoid setLeader(Genome leader);\r\n\r\n\t/**\r\n\t * Set the number of spawns required.\r\n\t * @param spawnsRequired The number of spawns required.\r\n\t */\r\n\tvoid setSpawnsRequired(double spawnsRequired);\r\n}", "public void register(WorldGenKawaiiBaseWorldGen.WorldGen gen)\r\n\t{\t\r\n\t\tif (!this.Enabled) return; \r\n\t\tGameRegistry.registerBlock(this, this.getUnlocalizedName());\r\n\t\t\r\n\t\tString saplingName = name + \".sapling\";\r\n\t\tSapling = new ItemKawaiiSeed(saplingName, SaplingToolTip, this);\r\n\t\tSapling.OreDict = SaplingOreDict;\r\n\t\tSapling.MysterySeedWeight = SeedsMysterySeedWeight;\r\n\t\tSapling.register();\r\n\r\n\t\tString fruitName = name + \".fruit\";\r\n\t\tif (FruitEdible)\r\n\t\t{\r\n\t\t\tItemKawaiiFood fruit = new ItemKawaiiFood(fruitName, FruitToolTip, FruitHunger, FruitSaturation, FruitPotionEffets);\r\n\t\t\tFruit = fruit;\r\n\t\t\tfruit.OreDict = FruitOreDict;\r\n\t\t\t\r\n\t\t\tfruit.register();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tItemKawaiiIngredient fruit = new ItemKawaiiIngredient(fruitName, FruitToolTip);\r\n\t\t\tFruit = fruit;\r\n\t\t\tfruit.OreDict = FruitOreDict;\r\n\t\t\t\r\n\t\t\tfruit.register();\r\n\t\t}\r\n\t\t\r\n\t\tif (gen.weight > 0)\r\n\t\t{\r\n\t\t\tgen.generator = new WorldGenKawaiiTree(this);\r\n\t\t\tModWorldGen.WorldGen.generators.add(gen);\r\n\t\t}\r\n\r\n\t\tModBlocks.AllTrees.add(this);\t\t\r\n\t}", "@Override\npublic void populateScene() {\n\t\n}", "public Levels()\r\n { \r\n super(1070, 570, 1);\r\n \r\n //Add the bottom platform in the menu screen\r\n platforms = new Platforms[7]; \r\n for (int i = 0; i < platforms.length; i++)\r\n {\r\n platforms[i] = new Platforms();\r\n }\r\n bottomPlatform();\r\n\r\n //Add the Potato (player)\r\n player = new Player();\r\n addObject (player, 100, 512); \r\n\r\n setBackground(\"menu.png\");\r\n }", "public GameManager(){\r\n init = new Initialisation();\r\n tower=init.getTower();\r\n courtyard=init.getCourtyard();\r\n kitchen=init.getKitchen();\r\n banquetHall=init.getBanquetHall();\r\n stock=init.getStock();\r\n throneHall=init.getThroneHall();\r\n vestibule=init.getVestibule();\r\n stables=init.getStables();\r\n\r\n this.player = new Player(tower);\r\n\r\n push(new IntroductionState());\r\n\t}", "@Override\n\tpublic void onInitialize() {\n\n\t\tSystem.out.println(\"Welcome to Plastic Version 1.0\");\n\t\tRegistry.register(Registry.BLOCK, new Identifier(\"plastic\", \"plastic_ore\"), plastic_ore);\n\t\tRegistry.register(Registry.ITEM, new Identifier(\"plastic\", \"plastic_ore\"), new BlockItem(plastic_ore, new Item.Settings().group(plastic_tab)));\n\t\tRegistry.register(Registry.ITEM, new Identifier(\"plastic\", \"plastic\"), plastic);\n\t\tRegistry.register(Registry.ITEM, new Identifier(\"plastic\", \"plastic_dust\"), plastic_dust);\n\t\tRegistry.register(Registry.ITEM, new Identifier(\"plastic\", \"plastic_mix\"), plastic_mix);\n\t\tRegistry.register(Registry.ITEM, new Identifier(\"plastic\", \"apple_plastic\"), apple_plastic);\n\t\tRegistry.register(Registry.ITEM, new Identifier(\"plastic\", \"raw_plastic\"), raw_plastic);\n\t\tRegistry.register(Registry.ITEM, new Identifier(\"plastic\", \"plastic_pick\"), new PickaxeBase(new PlasticTool(), -2.2f));\n\t\tRegistry.register(Registry.ITEM, new Identifier(\"plastic\", \"duct_tape\"), duct_tape);\n\t\tRegistry.register(Registry.ITEM, new Identifier(\"plastic\", \"plastic_bowl\"), plastic_bowl);\n\t\tRegistry.register(Registry.ITEM, new Identifier(\"plastic\", \"dank\"), dank);\n\t\tRegistry.register(Registry.ITEM, new Identifier(\"plastic\", \"burnt_plastic\"), burnt_plastic);\n\t\tRegistry.register(Registry.ITEM, new Identifier(\"plastic\", \"burnt_bowl\"), burnt_bowl);\n\t\tRegistry.register(Registry.ITEM, new Identifier(\"plastic\", \"strong_plastic\"), strong_plastic);\n\t\tRegistry.register(Registry.ITEM, new Identifier(\"plastic\", \"raw_mix\"), raw_mix);\n\t\tRegistry.register(Registry.ITEM, new Identifier(\"plastic\", \"plastic_book\"), plastic_book);\n\n\t\t// shit for blocks with inventories\n\t\tRegistry.register(Registry.BLOCK, new Identifier(\"plastic\", \"plastic_box\"), plastic_box);\n\t\tRegistry.register(Registry.ITEM, new Identifier(\"plastic\", \"plastic_box\"), new BlockItem(plastic_box, new Item.Settings().group(plastic_tab)));\n\t\tplasticBox_ent = Registry.register(Registry.BLOCK_ENTITY_TYPE, \"plastic:plastic_box_ent\", BlockEntityType.Builder.create(PlasticBox::new, plastic_box).build(null));\n\t\tplasticBox_ent2 = Registry.register(Registry.BLOCK_ENTITY_TYPE, \"plastic:plastic_box_ent2\", BlockEntityType.Builder.create(PlasticBox2::new, plastic_boxtwo).build(null));\n\t\tContainerProviderRegistry.INSTANCE.registerFactory(new Identifier(\"plastic\", \"plastic_box\"), (syncId, id, player, buf) -> new GuiController(configUtil.getControllerConfig(syncId, 1), player.inventory, BlockContext.create(player.world, buf.readBlockPos()), \"block.plastic.plastic_box\"));\n\t\tRegistry.register(Registry.BLOCK, new Identifier(\"plastic\", \"plastic_boxtwo\"), plastic_boxtwo);\n\t\tContainerProviderRegistry.INSTANCE.registerFactory(new Identifier(\"plastic\", \"plastic_boxtwo\"), (syncId, id, player, buf) -> new GuiController(configUtil.getControllerConfig(syncId, 2), player.inventory, BlockContext.create(player.world, buf.readBlockPos()), \"block.plastic.plastic_boxtwo\"));\n\t\tRegistry.register(Registry.ITEM, new Identifier(\"plastic\", \"plastic_boxtwo\"), new BlockItem(plastic_boxtwo, new Item.Settings().group(plastic_tab)));\n\n\t\t// Plastic Combiner stuff starts here\n\t\tRegistry.register(Registry.BLOCK, new Identifier(\"plastic\", \"plastic_compressor\"), plastic_compressor);\n\t\tRegistry.register(Registry.ITEM, new Identifier(\"plastic\", \"plastic_compressor\"), new BlockItem(plastic_compressor, new Item.Settings().group(plastic_tab)));\n\t\tplasticCombine_ent = Registry.register(Registry.BLOCK_ENTITY_TYPE, \"plastic:plastic_combine_ent\", BlockEntityType.Builder.create(PlasticCompressor::new, plastic_compressor).build(null));\n\t\tContainerProviderRegistry.INSTANCE.registerFactory(new Identifier(\"plastic\", \"plastic_compressor\"), (syncId, id, player, buf) -> new CompressorGUI(syncId, player.inventory, BlockContext.create(player.world, buf.readBlockPos())));\n\n\t}", "@Override\n\tpublic void create () {\n\t\tgempiresAssetHandler = new GempiresAssetHandler(this);\n\t\tbatch = new SpriteBatch();\n\t\tcastle = new CastleScreen(this);\n\t\tsetScreen(new MainMenuScreen(this));\n\t}", "@Override\n public void beginGame() {\n }", "void createWorld(Scanner console){\r\n\t\tRandom r = new Random();\r\n\t // System.out.println(\"Welcome to Sushi Time!\");\r\n\t\t//System.out.println(\"Number of fish: \"); \r\n\t\tint fish = r.nextInt(40)+1;\r\n\t\t//System.out.println(\"Number of sharks: \"); \r\n\t\tint shark = r.nextInt(10)+1;\r\n\t\t//create random int for creating random number of seaweed\r\n\t\tint seaweed=r.nextInt(3)+1;\r\n\t\t//create fish, sharks, seaweed, net and sushibar, add them to GameCollection\r\n\t\tSystem.out.println(\"Creating \"+fish+\" fish\");\r\n\t\tfor(int i=0; i<fish; i++){\r\n\t\t\tSystem.out.println(\"Creating fish\");\r\n\t\t\tFish f = new Fish(this);\r\n\t\t\taddToWorldList(f);\r\n\t\t}\r\n\t\tSystem.out.println(\"Creating \"+shark+\" sharks\");\r\n\t\tfor(int i=0; i<shark; i++){\r\n\t\t\tSystem.out.println(\"Creating shark\");\r\n\t\t\tShark s = new Shark(this);\r\n\t\t\taddToWorldList(s);\r\n\t\t}\r\n\t\tSystem.out.println(\"Creating \"+seaweed+\" seaweed\");\r\n\t\tfor(int i=0; i<seaweed; i++){\r\n\t\t\tSystem.out.println(\"Creating seaweed\");\r\n\t\t\tSeaweed sw=new Seaweed(this);\r\n\t\t\taddToWorldList(sw);\r\n\t\t}\r\n\t\tSystem.out.println(\"Creating net\");\r\n\t\t\tNet n = new Net();\r\n\t\t\taddToWorldList(n);\r\n\t\tSystem.out.println(\"Creating sushibar\");\r\n\t\t Sushibar sb = new Sushibar();\r\n\t\t\taddToWorldList(sb);\r\n\t }", "public Game() {\n String configPath= String.valueOf(getClass().getResource(\"/config/conf.xml\"));\n\n listeners= new ArrayList<>();\n assembler= new Assembler(configPath);\n levelApple= (ILevel) assembler.newInstance(\"levelApple\");\n levelRarity= (ILevel) assembler.newInstance(\"levelRarity\");\n levelRainbow= (ILevel) assembler.newInstance(\"levelRainbow\");\n levelRunning= levelApple;\n levelApple.selected();\n levelFlutter= null;\n levelPinky= null;\n jukebox = (Jukebox) assembler.newInstance(\"jukebox\");\n jukebox.switchTo(\"apple\");\n event = new LevelChangeEvent();\n event.setNumberOfLevel(6);\n setEventSelected(true, false, false);\n setEventRunning(true, true, true);\n }", "private BranchGroup getScene(){\n BranchGroup scene = new BranchGroup();\r\n\r\n // transformgroup zawierający robota oraz podłoże\r\n world = new TransformGroup();\r\n world.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);\r\n world.setCapability(TransformGroup.ALLOW_CHILDREN_EXTEND);\r\n world.setCapability(TransformGroup.ALLOW_CHILDREN_READ);\r\n world.setCapability(TransformGroup.ALLOW_CHILDREN_WRITE);\r\n TransformGroup robotTg;\r\n\r\n // nasz robot pobrany z klasy Robot\r\n robotTg = robot.getGroup();\r\n robotTg.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);\r\n world.addChild(robotTg);\r\n\r\n // tworzenie scian\r\n float szerokoscScian = 10f;\r\n makeWalls(szerokoscScian);\r\n\r\n // tworzenie podłoża\r\n TransformGroup ground = new TransformGroup();\r\n Shape3D gr = new MyShapes().makeGround(new Point3f(szerokoscScian, 0f, szerokoscScian),\r\n new Point3f(szerokoscScian, 0f, -szerokoscScian), new Point3f(-szerokoscScian, 0f, -szerokoscScian),\r\n new Point3f(-szerokoscScian, 0f, szerokoscScian));\r\n gr.setUserData(new String(\"ground\"));\r\n Appearance appGround = new Appearance();\r\n appGround.setTexture(createTexture(\"grafika/floor.jpg\"));\r\n gr.setAppearance(appGround);\r\n\r\n // detekcja kolizji dla ziemi\r\n CollisionDetector collisionGround = new CollisionDetector(gr, new BoundingSphere(), this, robot);\r\n ground.addChild(gr);\r\n world.addChild(collisionGround);\r\n world.addChild(ground);\r\n\r\n // światła\r\n Color3f light1Color = new Color3f(1.0f, 1.0f, 1.0f);\r\n Vector3f light1Direction = new Vector3f(4.0f, -7.0f, -12.0f);\r\n BoundingSphere bounds = new BoundingSphere(new Point3d(0.0, 0.0, 0.0), 100.0);\r\n\r\n DirectionalLight light1 = new DirectionalLight(light1Color, light1Direction);\r\n light1.setInfluencingBounds(bounds);\r\n scene.addChild(light1);\r\n\r\n // obiekt do podnoszenia\r\n object = new Sphere(0.15f, robot.createAppearance(new Color3f(Color.ORANGE)));\r\n object.getShape().setUserData(new String(\"object\"));\r\n objectTransform = new Transform3D();\r\n objectTransform.setTranslation(objPos);\r\n objectTg = new TransformGroup(objectTransform);\r\n objectTg.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);\r\n objectTg.addChild(object);\r\n objectGroup = new BranchGroup();\r\n objectGroup.setCapability(BranchGroup.ALLOW_DETACH);\r\n objectGroup.addChild(objectTg);\r\n world.addChild(objectGroup);\r\n\r\n // klasa behavior która służy do obsługiwania klawiatury\r\n Moving moving = new Moving(robot);\r\n moving.setSchedulingBounds(bounds);\r\n world.addChild(moving);\r\n\r\n // klasa behavior która odświeża się 60 razy na sekundę i odpowiada ona np. za nagrywanie, odtworzenie nagrania\r\n // symulowanie grawitacji\r\n loop = new GameLoop(this, robot);\r\n loop.setSchedulingBounds(bounds);\r\n world.addChild(loop);\r\n\r\n // detekcja kolizji dla obiektu\r\n CollisionDetector collisionObject = new CollisionDetector(object.getShape(), new BoundingSphere(new Point3d(), 0.15), this, robot);\r\n world.addChild(collisionObject);\r\n\r\n scene.addChild(world);\r\n\r\n scene.compile();\r\n return scene;\r\n }", "public abstract void gameObjectAwakens();", "public MenuCreditos(Game world) {\n this.world=world;\n this.setVisible(true);\n teclas= new Sonido();\n onEnter();\n }", "public static void init() {\n GameRegistry.addSmelting(OinkBlocks.OINK_IRON_ORE, new ItemStack(OinkItems.OINK_IRON_INGOT), 1.0F);\n GameRegistry.addSmelting(OinkBlocks.OINK_GOLD_ORE, new ItemStack(OinkItems.OINK_GOLD_INGOT), 1.0F);\n\n //Oink Dust to Ingots\n GameRegistry.addSmelting(OinkItems.OINK_PIG_IRON_DUST, new ItemStack(OinkItems.OINK_IRON_INGOT, 2, 0), 0.7F);\n GameRegistry.addSmelting(OinkItems.OINK_PIG_GOLD_DUST, new ItemStack(OinkItems.OINK_GOLD_INGOT, 2, 0), 0.7F);\n GameRegistry.addSmelting(OinkItems.OINK_PIG_DIAMOND_DUST, new ItemStack(OinkItems.OINK_DIAMOND, 2, 0), 0.7F);\n GameRegistry.addSmelting(OinkItems.OINK_IRON_DUST, new ItemStack(Items.IRON_INGOT, 1, 0), 0.7F);\n GameRegistry.addSmelting(OinkItems.OINK_GOLD_DUST, new ItemStack(Items.GOLD_INGOT, 1, 0), 0.7F);\n GameRegistry.addSmelting(OinkItems.OINK_DIAMOND_DUST, new ItemStack(Items.DIAMOND, 1, 0), 0.7F);\n\n //Oink Ingots to Vanilla Ingots\n GameRegistry.addSmelting(OinkItems.OINK_IRON_INGOT, new ItemStack(Items.IRON_INGOT, 1, 0), 0.7F);\n GameRegistry.addSmelting(OinkItems.OINK_GOLD_INGOT, new ItemStack(Items.GOLD_INGOT, 1, 0), 0.7F);\n GameRegistry.addSmelting(OinkItems.OINK_DIAMOND, new ItemStack(Items.DIAMOND, 1, 0), 0.7F);\n\n //Food\n GameRegistry.addSmelting(OinkItems.OINK_MINCED_PORK, new ItemStack(Items.COOKED_PORKCHOP, 2, 0), 0.5F);\n GameRegistry.addSmelting(OinkItems.OINK_IRON_PORKCHOP_RAW, new ItemStack(OinkItems.OINK_IRON_PORKCHOP, 1, 0), 0.5F);\n GameRegistry.addSmelting(OinkItems.OINK_GOLD_PORKCHOP_RAW, new ItemStack(OinkItems.OINK_GOLD_PORKCHOP, 1, 0), 0.5F);\n GameRegistry.addSmelting(OinkItems.OINK_DIAMOND_PORKCHOP_RAW, new ItemStack(OinkItems.OINK_DIAMOND_PORKCHOP, 1, 0), 0.5F);\n GameRegistry.addSmelting(OinkItems.OINK_ULTIMATE_PORKCHOP_RAW, new ItemStack(OinkItems.OINK_ULTIMATE_PORKCHOP, 1, 0), 3.0F);\n\n //Oink Stuff to MC Stuff\n GameRegistry.addSmelting(OinkItems.OINK_IRON_INGOT, new ItemStack(Items.IRON_INGOT, 2), 1.8F);\n }", "private void makeBoss()\r\n {\r\n maxHealth = 1000;\r\n health = maxHealth;\r\n \r\n weapon = new Equip(\"Claws of Death\", Equip.WEAPON, 550);\r\n armor = new Equip(\"Inpenetrable skin\", Equip.ARMOR, 200);\r\n }", "public modGenRoomControl() {\r\n //construct MbModule\r\n super();\r\n roomObjects = new HashMap(32);\r\n gui = new GUI();\r\n //we depend on the RemoteControl-module\r\n addDependency(\"RemoteControl\");\r\n //we depend on the ARNE-module\r\n addDependency(\"ARNE\");\r\n //register our packet data handler\r\n setPacketDataHandler(new PacketDataHandler());\r\n //we have a html-interface, so lets register it\r\n setHTMLInterface(new HTMLInterface());\r\n }", "public void createWorld(){\n\n }", "public void createGame();", "private void createMenuChildScene() {\n\t\tmenuChildScene = new MenuScene(camera);\n\t\tmenuChildScene.setPosition(0, 0);\n\n\t\tfinal IMenuItem profile02MenuItem = new ScaleMenuItemDecorator(\n\t\t\t\tnew SpriteMenuItem(MENU_PROFILE02,\n\t\t\t\t\t\tresourcesManager.btProfile02TR, vbom), 1f, .8f);\n\t\tfinal IMenuItem profile24MenuItem = new ScaleMenuItemDecorator(\n\t\t\t\tnew SpriteMenuItem(MENU_PROFILE24,\n\t\t\t\t\t\tresourcesManager.btProfile24TR, vbom), 1f, .8f);\n\t\tfinal IMenuItem profile4MenuItem = new ScaleMenuItemDecorator(\n\t\t\t\tnew SpriteMenuItem(MENU_PROFILE4,\n\t\t\t\t\t\tresourcesManager.btProfile4TR, vbom), 1f, .8f);\n\n\t\tmenuChildScene.addMenuItem(profile02MenuItem);\n\t\tmenuChildScene.addMenuItem(profile24MenuItem);\n\t\tmenuChildScene.addMenuItem(profile4MenuItem);\n\n\t\tmenuChildScene.buildAnimations();\n\t\tmenuChildScene.setBackgroundEnabled(false);\n\n\t\tprofile02MenuItem.setPosition(150, 280);\n\t\tprofile24MenuItem.setPosition(400, 280);\n\t\tprofile4MenuItem.setPosition(650, 280);\n\n\t\tmenuChildScene.setOnMenuItemClickListener(this);\n\t\t\n\t\t//-- change language button -----------------------------------------------------------------------------\n\t\t\n\t\tchangLang = new TiledSprite(400,60, resourcesManager.btLangTR, vbom){\n\t\t\t\t\n\t\t\t@Override\n\t\t\tpublic boolean onAreaTouched(final TouchEvent pSceneTouchEvent, final float pTouchAreaLocalX, final float pTouchAreaLocalY) {\n\t\t\tswitch(pSceneTouchEvent.getAction()){\n\t\t\tcase TouchEvent.ACTION_DOWN:\n\t\t\t\tbreak;\n\t\t\tcase TouchEvent.ACTION_UP:\n\t\t\t\tplaySelectSound();\n\t\t\t\tif(localLanguage==0){\n\t\t\t\t\tchangeLanguage(\"UK\");\n\t\t\t\t\tthis.setCurrentTileIndex(1);\n\t\t\t\t\tlocalLanguage=1;\n\t\t\t\t}else if (localLanguage==1) {\n\t\t\t\t\tchangeLanguage(\"FR\");\n\t\t\t\t\tthis.setCurrentTileIndex(0);\n\t\t\t\t\tlocalLanguage=0;\n\t\t\t\t}\n\t\t\t\tupdateTexts();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\treturn true;\n\t\t\t}\n\t\t};\n\t\t\n\t\tif(localLanguage==0){\t\t\t\n\t\t\tchangLang.setCurrentTileIndex(0);\n\t\t}else{\t\t\n\t\t\tchangLang.setCurrentTileIndex(1);\n\t\t}\n\t\t\n\t\tthis.attachChild(changLang);\n\t\tthis.registerTouchArea(changLang);\n\t\t//-----------------------------------------------------------------------------------------------------\n\n\n\t\tsetChildScene(menuChildScene);\n\t}", "@Override\n public void world() {\n super.world();\n }", "public static void createItems(){\n Registry.register(Registry.ITEM, new Identifier(nameSpace, \"breadly\"), BREADLY);\n Registry.register(Registry.ITEM, new Identifier(nameSpace, \"hard_boiled_egg\"), HARD_BOILED_EGG);\n\n\n Registry.register(Registry.ITEM, new Identifier(nameSpace, \"ender_dragon_spawn_egg\"), ENDER_DRAGON_SPAWN_EGG);\n Registry.register(Registry.ITEM, new Identifier(nameSpace, \"wither_spawn_egg\"), WITHER_SPAWN_EGG);\n Registry.register(Registry.ITEM, new Identifier(nameSpace, \"illusioner_spawn_egg\"), ILLUSIONER_SPAWN_EGG);\n Registry.register(Registry.ITEM, new Identifier(nameSpace, \"giant_spawn_egg\"), GIANT_SPAWN_EGG);\n Registry.register(Registry.ITEM, new Identifier(nameSpace, \"spawn_spawn_egg\"), SPAWN_SPAWN_EGG);\n }", "public void startNewGame();", "public interface GearPieceGeneration {\n\n\t// This function returns a BaseGearPiece or one of its children that's been created by a GearPieceGenerator\n\tpublic BaseGearPiece generateGearPiece();\n}", "public Level3(Game game)\n {\n super(game);\n \n // set game var\n g = game;\n \n // set world\n world = game.getWorld();\n //set player\n player = game.getPlayer();\n // set default enemy exists state\n enemyExist = true;\n // set frame\n frame = g.getFrame();\n\n }", "public interface GuiFactory {\n /**\n * Gui id\n */\n int getId();\n\n Object getClientGuiElement(EntityPlayer player, World world, BlockPos blockPos);\n\n Object getServerGuiElement(EntityPlayer player, World world, BlockPos blockPos);\n}", "@Override\n public void afterWorldInit() {\n }", "public InitializeGame() {\r\n\t //Non Player Characters\r\n\t\t\t//Hakunin, the shaman, will lead the player in his quest for freedom\r\n\t\t\tNpcDialog shaman = new NpcDialog(\"Hakunin\",\"Some kind of Shaman is standing in front of you. He appraises you with his crazy eyes from somewhere in the world only he inhabits.\", job.shaman);\r\n\t\t\t//The prisoner Npc\r\n\t\t\tNpcDialog prisoner = new NpcDialog(\"Gilgamesh\",\"A weird kind of humanoid is in front of you, wearing rags, he looks tired and is dying\",job.prisoner);\r\n\t\t\t// A bunch of generic citizen npc's\r\n\t\t\tNpcDialog citizen1 = new NpcDialog(\"Waldo\",\"a local life form\",job.citizen);\r\n\t\t\tNpcDialog citizen2 = new NpcDialog(\"Opipou\",\"Typical girl next door, except you doesn't live here,it's not a girl an it's right in front of you\",job.citizen);\r\n\t\t\tNpcDialog citizen3 = new NpcDialog(\"Fifou\",\"he seems to be crazyly normal for an alien ... wait ... you are the alien here\",job.citizen);\r\n\t\t\tNpcDialog citizen4 = new NpcDialog(\"Genericname\",\"just another citizen\",job.citizen);\r\n\t\t\t\r\n\t\t\t//Fighter Non player characters\r\n\t\t\t//the boss\r\n\t\t\tNpcFightBoss boss= new NpcFightBoss(150, 5, \"Transplantor\",\" the boss\", 30);\r\n\t\t\t//the monsters\r\n\t\t\tNpcFightMonster snake1=new NpcFightMonster(10,2,\"Snake\",\"small snake\");\r\n\t\t\tNpcFightMonster snake1bis=new NpcFightMonster(10,2,\"Snake\",\"small snake\");\r\n\t\t\tNpcFightMonster snake2=new NpcFightMonster(20,5,\"Snake\",\"big snake\");\r\n\t\t\tNpcFightMonster wolf=new NpcFightMonster(50,10,\"Wolf\",\"black wolf\");\r\n\t\t\tNpcFightMonster shark=new NpcFightMonster(25,5,\"Shark\",\"shark\");\r\n\t\t\t//the guard\r\n\t\t\tNpcFightGuard guard = new NpcFightGuard(100,1,\"Guard\",\"This is a city guard\",jail); \r\n\r\n\t\t\t\r\n\t\t //images\r\n\t\t //zone pictures\r\n\t\t crashZonePic = new ImageIcon(getClass().getResource(\"/images/crash.png\"));\r\n\t\t gladePic = new ImageIcon(getClass().getResource(\"/images/glade.jpg\"));\r\n\t\t forestWPic = new ImageIcon(getClass().getResource(\"/images/forestW.jpg\"));\r\n\t\t forestSPic = new ImageIcon(getClass().getResource(\"/images/forestS.jpg\"));\r\n\t\t forestNPic = new ImageIcon(getClass().getResource(\"/images/forestN.jpg\"));\r\n\t\t housePic = new ImageIcon(getClass().getResource(\"/images/house.jpg\"));\r\n\t\t lairofthebeastPic = new ImageIcon(getClass().getResource(\"/images/lairodthebeastPic.jpg\"));\r\n\t\t cavePic = new ImageIcon(getClass().getResource(\"/images/cave.jpg\"));\r\n\t\t frozenlakePic = new ImageIcon(getClass().getResource(\"/images/frozenlake.gif\"));\r\n\t\t pickPic = new ImageIcon(getClass().getResource(\"/images/peak.jpg\"));\r\n\t\t mountainbasePic = new ImageIcon(getClass().getResource(\"/images/mountainbase.jpg\"));\r\n\t\t bridgePic = new ImageIcon(getClass().getResource(\"/images/bridge.jpg\"));\r\n\t\t jailPic = new ImageIcon(getClass().getResource(\"/images/jail.jpg\"));\r\n\t\t jailentrancePic = new ImageIcon(getClass().getResource(\"/images/jailentrance.jpg\"));\r\n\t\t churchPic = new ImageIcon(getClass().getResource(\"/images/church.jpg\"));\r\n\t\t cityentrancePic = new ImageIcon(getClass().getResource(\"/images/cityentrance.jpg\"));\r\n\t\t marketplacePic = new ImageIcon(getClass().getResource(\"/images/marketplace.jpg\"));\r\n\t\t caveentrancePic = new ImageIcon(getClass().getResource(\"/images/caveentrance.png\"));\r\n\t\t //weapon pictures\r\n\t\t swordPic = new ImageIcon(getClass().getResource(\"/images/sword.png\"));\r\n\t\t knifePic = new ImageIcon(getClass().getResource(\"/images/knife.png\"));\r\n\t\t gunPic = new ImageIcon(getClass().getResource(\"/images/gun.png\"));\r\n\t\t key1Pic = new ImageIcon(getClass().getResource(\"/images/key.jpg\"));\r\n\t\t key2Pic = new ImageIcon(getClass().getResource(\"/images/key2.png\"));\r\n\t\t key3Pic = new ImageIcon(getClass().getResource(\"/images/key3.jpg\"));\r\n\t\t machetePic = new ImageIcon(getClass().getResource(\"/images/machete.png\"));\r\n\t\t bunchkeyPic = new ImageIcon(getClass().getResource(\"/images/bunch_key.png\"));\r\n\t\t grapplePic = new ImageIcon(getClass().getResource(\"/images/grapple.png\"));\r\n\t\t medlakePic = new ImageIcon(getClass().getResource(\"/images/magic_water.png\"));\r\n\t\t medikitPic = new ImageIcon(getClass().getResource(\"/images/Medkit_1.png\"));\r\n\t\t chestPic = new ImageIcon(getClass().getResource(\"/images/chest.jpg\"));\t\t \r\n\t\t plankPic = new ImageIcon(getClass().getResource(\"/images/plank.jpg\"));\t\t \r\n\r\n\t\t \r\n\t\t\t//creation of the items\r\n\t\t\t//creation of the weapons\r\n\t\t\tknife = new Weapon(5, 2, \"knife\", \"This knife can be useful to fight small targets.\", knifePic);\r\n\t\t\tsword = new Weapon(15, 6, \"sword\", \"This sword was found in the Market place. It is surely more powerful than your knife!\", swordPic);\r\n\t\t\tgun = new Weapon(30, 12, \"gun\", \"This gun was taken from a guard. You will need it sooner than you think.\", gunPic);\r\n\t\t\t\r\n\t\t\t//creation of the medikits\r\n\t\t\tmedChurch = new Medikit(30, 30, \"Small Medikit\", \"This is a medikit. Use it carefully!\",medikitPic);\r\n\t\t\tmedLake = new Medikit(60,40,\"Magic Lake Water\", \"This lake is refreshing. Oh, it can heal you! Come back as much as you need.\",medlakePic);\r\n\t\r\n\t\t\t// creation of the keys\r\n\t\t\t//keys to unlock the paths\r\n\t\t\tkeyForestS = new Key(\"Machete\", \" Perfect to pull some wood out of the way.\",machetePic);\r\n\t\t\tkeyForestW = new Key(\"Planks\", \" Great to build a path across gaps.\",plankPic);\r\n\t\t\tkeyHouse = new Key(\"Old Key\", \" No idea of what it can open...\",key2Pic);\r\n\t\t\tkeyJail = new Key(\"Bunch of keys\", \" Given by a helpful prisoner in jail.\",bunchkeyPic);\r\n\t\t\tkeyPick = new Key(\"Climbing kit\", \" Perfect to cross difficulties on the way.\",grapplePic);\r\n\t\t\t//keys to open the chests\r\n\t\t\tkeyChestMarketplace = new Key(\"A very old Key\", \" Found in the house.\",key1Pic);\r\n\t\t\tkeyChestHouse = new Key(\"A big old Key\", \" Wandering on the ground.\",key1Pic);\r\n\t\t\tkeyChestChurch = new Key(\"Small old Key\", \" Picked up on the Market place.\",key3Pic);\r\n\t\t\t//keys to repair the spaceship (SS)\r\n\t\t\tkeySSGenerator = new Key(\"Generator Cell\", \" Generator cell of your spaceship.\",null);\r\n\t\t\tkeySSWheel = new Key(\"Wheels\", \" Wheels of your spaceship.\",null);\r\n\t\t\tkeySSEnergyCell = new Key(\"Energy Cell\", \" Energy cell of your spaceship.\",null);\r\n\t\t\tkeySSFTL = new Key(\"FTL\", \" 'Faster Than Light' technology, necessary for your spaceship.\",null);\r\n\t\t\t\r\n\t\t\t//creation of the chests\r\n\t\t\tchestMarketplace = new Chest(sword, \"Old Chest\", \" A very old wooden chest, a bit hidden in the street.\", keyChestMarketplace,chestPic);\r\n\t\t\tchestHouse = new Chest(keySSWheel, \"A Tidying Chest\", \" A big tidying chest. Something is shining inside...\", keyChestHouse,chestPic);\r\n\t\t\tchestChurch = new Chest(medChurch, \"Chest\", \" There is a wooden chest in the church. Do you think you're allowed to open it?\", keyChestChurch,chestPic);\r\n \r\n\t\t\t//create zones\r\n\t\t crashzone = new Zone(\"crashZone\", \"the crash zone, where your spaceship is\", crashZonePic);\r\n glade = new Zone(\"glade\", \"the glade, a calm zone\", gladePic);\r\n forestS = new Zone(\"forestS\",\"the south part of the forest\", forestSPic);\r\n forestW = new Zone(\"forestW\",\"the west part of the forest\", forestWPic);\r\n forestN = new Zone(\"forestN\", \"the north part of the forest\", forestNPic);\r\n bridge = new Zone(\"bridge\", \"front of a long wooden bridge\", bridgePic);\r\n cityentrance = new Zone(\"cityentrance\",\"the entrance of a little city\", cityentrancePic);\r\n marketplace = new Zone(\"marketplace\", \"the animated market place\", marketplacePic);\r\n house= new Zone(\"house\", \"the house of someone\", housePic);\r\n church = new Zone(\"church\", \"the church, the god house\", churchPic);\r\n jailentrance = new Zone(\"jailentrance\", \"the entrance of the jail\", jailentrancePic);\r\n jail = new Zone(\"jail\", \"the jail, what are you doing here\", jailPic);\r\n caveentrance = new Zone(\"caveentrance\", \"the entrance of a dark cave\", caveentrancePic);\r\n frozenlake = new Zone(\"frozenlake\", \"front of a beautiful lake\", frozenlakePic);\r\n mountainbase= new Zone(\"mountainbase\", \"the snow of the mountain base\", mountainbasePic);\r\n pick = new Zone(\"pick\", \"the pick of the mountain\", pickPic);\r\n cave = new Zone(\"cave\", \"the dark cave\", cavePic);\r\n lairofthebeast = new Zone(\"lairofthebeast\", \"the lair of the beast, be careful !\", lairofthebeastPic);\r\n currentZone = crashzone;\r\n \r\n //list of items per zone \r\n forestS.setItems(keyForestS);\r\n forestS.setItems(keySSGenerator);\r\n \r\n forestW.setItems(keyForestW);\r\n \r\n marketplace.setItems(chestMarketplace);\r\n marketplace.setItems(keyChestChurch);\r\n marketplace.setItems(keyHouse);\r\n \r\n house.setItems(chestHouse);\r\n house.setItems(keyChestMarketplace);\r\n \r\n church.setItems(chestChurch);\r\n \r\n caveentrance.setItems(keyChestHouse);\r\n \r\n jailentrance.setItems(gun);\r\n \r\n jail.setItems(keyJail);\r\n \r\n frozenlake.setItems(medLake);\r\n \r\n pick.setItems(keySSFTL);\r\n \r\n cave.setItems(keyPick);\r\n \r\n lairofthebeast.setItems(keySSEnergyCell);\r\n \r\n //create path\r\n glade_crashzone = new Path(crashzone,false, null);\r\n crashzone_glade = new Path(glade,false, null);\r\n glade_forestS = new Path(forestS,false, null);\r\n forestS_glade = new Path(glade,false, null);\r\n glade_forestW = new Path(forestW,true, keyForestS);//path initially blocked\r\n forestW_glade = new Path(glade,false, null);\r\n glade_forestN = new Path(forestN,true, keyForestS);//path initially blocked\r\n forestN_glade = new Path(glade,false, null);\r\n bridge_forestW = new Path(forestW,false, null);\r\n forestW_bridge = new Path(bridge,false, null);\r\n bridge_forestN = new Path(forestN,false, null);\r\n forestN_bridge = new Path(bridge,false, null);\r\n bridge_cityentrance = new Path(cityentrance,true, keyForestW);//path initially blocked\r\n cityentrance_bridge = new Path(bridge,false, null);\r\n forestN_caveentrance = new Path(caveentrance,false, null);\r\n caveentrance_forestN = new Path(forestN,false, null);\r\n pick_mountainbase = new Path(mountainbase, false, null);\r\n mountainbase_pick = new Path(pick, true, keyPick);// path initially blocked\r\n mountainbase_caveentrance = new Path(caveentrance, false, null);\r\n caveentrance_mountainbase = new Path(mountainbase, false, null);\r\n caveentrance_cave = new Path(cave, false, null);\r\n cave_caveentrance = new Path(caveentrance, false, null);\r\n caveentrance_frozenlake = new Path(frozenlake, false, null);\r\n frozenlake_caveentrance = new Path(caveentrance, false, null);\r\n cave_lairofthebeast = new Path(lairofthebeast, false, null);\r\n lairofthebeast_cave = new Path(cave, false, null);\r\n jailentrance_jail = new Path(jail, true, keyJail);//path always blocked, the way can be crossed only if the guards put the player in jail\r\n jail_jailentrance = new Path(jailentrance, true, keyJail);//path initially blocked\r\n jailentrance_marketplace = new Path(marketplace, false, null);\r\n marketplace_jailentrance = new Path(jailentrance, false, null);\r\n marketplace_church = new Path(church, false, null);\r\n church_marketplace = new Path(marketplace, false, null);\r\n marketplace_cityentrance = new Path(cityentrance, false, null);\r\n cityentrance_marketplace = new Path(marketplace, false, null);\r\n marketplace_house = new Path(house, true, keyHouse);//path initially blocked\r\n house_marketplace = new Path(marketplace, false, null);\r\n \r\n //initialization of exits\r\n glade.setExits(\"north\",glade_forestN);\r\n glade.setExits(\"east\",glade_crashzone);\r\n glade.setExits(\"west\",glade_forestW);\r\n glade.setExits(\"south\",glade_forestS);\r\n \r\n crashzone.setExits(\"west\",crashzone_glade);\r\n \r\n forestS.setExits(\"north\",forestS_glade); \r\n \r\n forestW.setExits(\"east\",forestW_glade);\r\n forestW.setExits(\"north\",forestW_bridge);\r\n \r\n forestN.setExits(\"west\",forestN_bridge);\r\n forestN.setExits(\"north\",forestN_caveentrance);\r\n forestN.setExits(\"south\", forestN_glade);\r\n \r\n caveentrance.setExits(\"north\",caveentrance_cave);\r\n caveentrance.setExits(\"east\",caveentrance_frozenlake);\r\n caveentrance.setExits(\"west\",caveentrance_mountainbase);\r\n caveentrance.setExits(\"south\",caveentrance_forestN);\r\n \r\n frozenlake.setExits(\"west\",frozenlake_caveentrance);\r\n \r\n cave.setExits(\"east\",cave_lairofthebeast);\r\n cave.setExits(\"south\",cave_caveentrance);\r\n \r\n lairofthebeast.setExits(\"west\",lairofthebeast_cave);\r\n \r\n mountainbase.setExits(\"north\",mountainbase_pick);\r\n mountainbase.setExits(\"east\",mountainbase_caveentrance);\r\n \r\n bridge.setExits(\"west\",bridge_cityentrance);\r\n bridge.setExits(\"south\",bridge_forestW);\r\n bridge.setExits(\"east\",bridge_forestN);\r\n \r\n cityentrance.setExits(\"west\",cityentrance_marketplace);\r\n cityentrance.setExits(\"east\",cityentrance_bridge);\r\n \r\n marketplace.setExits(\"west\",marketplace_church);\r\n marketplace.setExits(\"north\",marketplace_jailentrance);\r\n marketplace.setExits(\"east\",marketplace_cityentrance);\r\n marketplace.setExits(\"south\",marketplace_house);\r\n \r\n house.setExits(\"north\",house_marketplace);\r\n \r\n church.setExits(\"east\",church_marketplace);\r\n \r\n jailentrance.setExits(\"north\",jailentrance_jail);\r\n jailentrance.setExits(\"south\",jailentrance_marketplace);\r\n \r\n jail.setExits(\"south\",jail_jailentrance);\r\n \r\n pick.setExits(\"south\", pick_mountainbase);\r\n \n //Placement of Npcs\r\n \t\thouse.setCurrentNpcFightGuard(guard);\n\r\n\t\t\tlairofthebeast.setCurrentNpcFightBoss(boss);\r\n\t\t\tSystem.out.println(lairofthebeast.getCurrentNpcFightBoss().getName());\r\n\t\t\t//TODO\r\n\t\t\t\r\n\t\t\tglade.setCurrentNpcDialog(shaman);\r\n\t\t\tcityentrance.setCurrentNpcDialog(citizen1);\r\n\t\t\tjail.setCurrentNpcDialog(prisoner);\r\n\t\t\tmarketplace.setCurrentNpcDialog(citizen2);\r\n\t\t\tchurch.setCurrentNpcDialog(citizen3);\r\n\t\t\thouse.setCurrentNpcDialog(citizen4);\r\n\r\n\t\t\tforestN.setCurrentNpcFightMonster(snake1);\r\n\t\t\tforestW.setCurrentNpcFightMonster(snake1bis);\r\n\t\t\tcaveentrance.setCurrentNpcFightMonster(snake2);\r\n\t\t\tcave.setCurrentNpcFightMonster(wolf);\r\n\t\t\tbridge.setCurrentNpcFightMonster(shark);\r\n\r\n\t}", "@Override\n\tpublic void registrarLlegada() {\n\t\t\n\t}", "@Override\n\tpublic void init(GameContainer gc, StateBasedGame sb) throws SlickException {\n\t\t// background\n\t\t// creating background-entity\n\t\tEntity background = new Entity(Constants.MENU_ID);\n\t\tbackground.setPosition(new Vector2f((OptionsHandler.getWindow_x() / 2), (OptionsHandler.getWindow_y() / 2)));\n\t\tif (!Breakout.getDebug()) {\n\t\t\t// only if not in debug-mode\n\t\t\tbackground.addComponent(new ImageRenderComponent(new Image(ThemeHandler.MENU_BACKGROUND)));\n\t\t}\n\t\tbackground.setScale(Variables.BACKGROUND_SCALE); // scaling\n\t\t// giving StateBasedEntityManager the background-entity\n\t\tentityManager.addEntity(stateID, background);\n\n\t\t// listener entity\n\t\tEntity listener = new Entity(\"listener\");\n\t\tentityManager.addEntity(stateID, listener);\n\t\t// Loop event for various uses (controller input)\n\t\tLoopEvent listenerLoop = new LoopEvent();\n\t\tlistener.addComponent(listenerLoop);\n\n\t\t// new_Game-entity\n\n\t\tButtonEntity newGame = new ButtonEntity(\"newGame\", stateID, Constants.ButtonType.MAINMENU, Variables.MAIN_MENU_BUTTON_1_X, Variables.MAIN_MENU_BUTTON_1_Y);\n\t\tnewGame.addAction((gc1, sb1, delta, event) -> {\n\t\t\tSoundHandler.playButtonPress();\n\t\t\tPlayerHandler.reset();\n\t\t\t// grab the mouse\n\t\t\tgc1.setMouseGrabbed(true);\n\t\t});\n\t\tnewGame.addAction(new ChangeStateInitAction(Breakout.GAMEPLAY_STATE));\n\n\t\t// controller \"listener\" (Button 4)\n\t\tlistenerLoop.addAction((gc1, sb1, delta, event) -> {\n\t\t\tif (ControllerHandler.isButtonPressed(3)) {\n\t\t\t\t// if the button 3 was not pressed before but is pressed now\n\n\t\t\t\t// resetting the players progress / stats\n\t\t\t\tPlayerHandler.reset();\n\n\t\t\t\t// grab the mouse\n\t\t\t\tgc1.setMouseGrabbed(true);\n\n\t\t\t\t// going into GameplayState (like changeStateInitAction)\n\t\t\t\tsb1.enterState(Constants.GAMEPLAY_STATE);\n\n\t\t\t\t// forcing init for all states\n\t\t\t\tBreakout.reinitStates(gc1, sb1, Constants.GAMEPLAY_STATE);\n\t\t\t}\n\t\t});\n\n\t\t// resume_Game-entity\n\t\tButtonEntity resumeGame = new ButtonEntity(\"resumeGame\", stateID, Constants.ButtonType.MAINMENU, Variables.MAIN_MENU_BUTTON_2_X, Variables.MAIN_MENU_BUTTON_1_Y);\n\t\tresumeGame.addAction((gc1, sb1, delta, event) -> {\n\t\t\tif (GameplayState.currentlyRunning) {\n\t\t\t\t// play sound for acceptable button press\n\t\t\t\tSoundHandler.playButtonPress();\n\t\t\t\t// grab the mouse\n\t\t\t\tgc1.setMouseGrabbed(true);\n\t\t\t\t// keep track of the time (pause time ended now)\n\t\t\t\tGameplayState.pauseTime += gc1.getTime() - GameplayState.startPauseTime;\n\t\t\t\tsb1.enterState(Breakout.GAMEPLAY_STATE);\n\t\t\t\tif (gc1.isPaused()) {\n\t\t\t\t\tgc1.resume();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tSoundHandler.playNotAcceptable();\n\t\t\t}\n\t\t});\n\n\t\t// controller \"listener\" (Button 3)\n\t\tlistenerLoop.addAction((gc1, sb1, delta, event) -> {\n\t\t\tif (ControllerHandler.isButtonPressed(2)) {\n\t\t\t\t// if the button 3 was not pressed before but is pressed now\n\n\t\t\t\tif (GameplayState.currentlyRunning) {\n\t\t\t\t\tGameplayState.pauseTime += gc1.getTime() - GameplayState.startPauseTime;\n\t\t\t\t\t// grab the mouse\n\t\t\t\t\tgc1.setMouseGrabbed(true);\n\t\t\t\t\tsb1.enterState(Breakout.GAMEPLAY_STATE);\n\t\t\t\t\tif (gc1.isPaused()) {\n\t\t\t\t\t\tgc1.resume();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tSoundHandler.playNotAcceptable();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t// options-entity\n\t\tButtonEntity options = new ButtonEntity(\"options\", stateID, Constants.ButtonType.MAINMENU, Variables.MAIN_MENU_BUTTON_1_X, Variables.MAIN_MENU_BUTTON_2_Y);\n\t\toptions.addAction(new ChangeStateAction(Breakout.OPTIONS_STATE));\n\t\toptions.addAction((gc1, sb1, delta, event) -> SoundHandler.playButtonPress());\n\n\t\t// highscore-entity\n\t\tButtonEntity highscore = new ButtonEntity(\"highscore\", stateID, Constants.ButtonType.MAINMENU, Variables.MAIN_MENU_BUTTON_2_X, Variables.MAIN_MENU_BUTTON_2_Y);\n\t\thighscore.addAction(new ChangeStateAction(Breakout.HIGHSCORE_STATE));\n\t\thighscore.addAction((gc1, sb1, delta, event) -> SoundHandler.playButtonPress());\n\n\n\t\t// quit-entity\n\t\tButtonEntity quit = new ButtonEntity(\"quit\", stateID, Constants.ButtonType.MAINMENU, Variables.MAIN_MENU_BUTTON_1_X, Variables.MAIN_MENU_BUTTON_3_Y);\n\t\tquit.addAction(new QuitAction());\n\n\t\t// controller \"listener\" (Button 2)\n\t\tlistenerLoop.addAction((gc1, sb1, delta, event) -> {\n\t\t\tif (ControllerHandler.isButtonPressed(1)) {\n\t\t\t\t// if the button 3 was not pressed before but is pressed now\n\t\t\t\t// exit the game\n\t\t\t\tgc1.exit();\n\t\t\t}\n\t\t});\n\n\t\t// about-entity\n\t\tButtonEntity about = new ButtonEntity(\"about\", stateID, Constants.ButtonType.MAINMENU, Variables.MAIN_MENU_BUTTON_2_X, Variables.MAIN_MENU_BUTTON_3_Y);\n\t\tabout.addAction(new ChangeStateAction(Breakout.ABOUT_STATE));\n\t\tabout.addAction((gc1, sb1, delta, event) -> SoundHandler.playButtonPress());\n\n\t}", "public GameManager( GameFrame gameFrame ){\r\n\t\tpassedLevelIds = new ArrayList<Integer>();\r\n\t\tthis.gameFrame = gameFrame;\r\n\t\tcollectionManager = new CollectionManager(this);\r\n\t\tlevelManager = new LevelManager(this);\r\n\t\tmusicOn = true;\r\n\t\tcurrentLevelId = levelManager.getCurrentLevelId();\r\n\t\tsoundManager = new SoundManager();\r\n\t\tobservers = new ArrayList<GameManagerObserver>();\r\n\t}", "private void initNavigation() {\n List<String> healthRoles = Arrays.asList(Roles.ROLE_USER.name(), Roles.ROLE_ADMIN.name());\n \n // static hack to speed up development for other places\n GNode<NavigationElement> root = \n new GNode<NavigationElement>(new NavigationElement(HomePage.class, \"Home.label\", EMPTY_LIST, ComponentPosition.LEFT))\n .addChild(new GNode<NavigationElement>(\n new NavigationElement(Lightbox2Page.class, \"WicketStuff.label\", EMPTY_LIST, ComponentPosition.LEFT), Arrays.asList(\n new GNode<NavigationElement>(new NavigationElement(Lightbox2Page.class, \"Lightbox2.label\", EMPTY_LIST, ComponentPosition.LEFT)),\n new GNode<NavigationElement>(new NavigationElement(Gmap3Page.class, \"Gmap3.label\", EMPTY_LIST, ComponentPosition.LEFT)),\n new GNode<NavigationElement>(new NavigationElement(InmethodGridPage.class, \"InmethodGrid.label\", EMPTY_LIST, ComponentPosition.LEFT)),\n new GNode<NavigationElement>(new NavigationElement(EditableGridPage.class, \"EditableGrid.label\", EMPTY_LIST, ComponentPosition.LEFT))\n )\n )\n )\n .addChild(new GNode<NavigationElement>(\n new NavigationElement(ManageMeasurementsPage.class, \"Health.label\", healthRoles, ComponentPosition.LEFT), Arrays.asList(\n new GNode<NavigationElement>(new NavigationElement(PlotWeightPage.class, \"Wheight.label\", healthRoles, ComponentPosition.LEFT)),\n new GNode<NavigationElement>(new NavigationElement(PlotFatPage.class, \"Fat.label\", healthRoles, ComponentPosition.LEFT)),\n new GNode<NavigationElement>(new NavigationElement(PlotWaterPage.class, \"Water.label\", healthRoles, ComponentPosition.LEFT)),\n new GNode<NavigationElement>(new NavigationElement(BmiWikiPage.class, \"BMI.label\", healthRoles, ComponentPosition.LEFT)),\n new GNode<NavigationElement>(new NavigationElement(BackupRestorePage.class, \"Backup/Restore.label\", healthRoles, ComponentPosition.LEFT)),\n new GNode<NavigationElement>(new NavigationElement(HealthSettingsPage.class, \"Settings.label\", Arrays.asList(Roles.ROLE_ADMIN.name()), ComponentPosition.LEFT))\n )\n )\n )\n .addChild(new GNode<NavigationElement>(\n new NavigationElement(AdminPage.class, \"Admin.label\", Arrays.asList(Roles.ROLE_ADMIN.name()), ComponentPosition.RIGHT), Arrays.asList(\n new GNode<NavigationElement>(new NavigationElement(ManageUsersPage.class, \"Users.label\", Arrays.asList(Roles.ROLE_ADMIN.name()), ComponentPosition.LEFT)),\n new GNode<NavigationElement>(new NavigationElement(ManageRolesPage.class, \"Roles.label\", Arrays.asList(Roles.ROLE_ADMIN.name()), ComponentPosition.LEFT)),\n new GNode<NavigationElement>(new NavigationElement(BackupPage.class, \"Backup.label\", Arrays.asList(Roles.ROLE_ADMIN.name()), ComponentPosition.LEFT))\n )\n )\n )\n .addChild(new GNode<NavigationElement>(new NavigationElement(UserSettingsPage.class, \"Settings.label\", Arrays.asList(Roles.ROLE_USER.name(), Roles.ROLE_ADMIN.name()), ComponentPosition.RIGHT))\n );\n tree = new GTree<NavigationElement>(root);\n }", "public interface GameAppContext extends GameAppManager\n{ \n\n /**\n * Handles a new network message.\n * \n * @param message \n */\n public void handleMessage(Message message);\n \n \n /**\n * Trigger an event in the internal aggregator.\n * \n * @param event \n */\n public void trigger(Event event);\n \n \n /**\n * Getter.\n * \n * @return The internal instance of EventAggregator.\n */\n public EventAggregator getEventAggregator();\n \n \n /**\n * Getter.\n * \n * @return The unique name of the type of this gameapp\n */\n public String getName();\n \n \n /**\n * Getter.\n * \n * @return The manager of this context. Use the manager\n * to create new contexts or to try to shutdown this one.\n */\n public GameAppManager getManager();\n \n \n /**\n * This method can be used to get a reference to the parent of this context.\n * Note that a parent context is only available if this game app was not\n * automatically created by the container at startup time.\n * \n * @return The reference to the parent context of this context\n */\n public Handle<GameAppContext> getParentContext();\n\n \n /**\n * Default implementation of a ShardletContext.\n * Build you own contexts by extending this class.\n * \n * @author _rusty\n */\n public static class Default implements GameAppContext\n {\n\n private EventAggregator aggregator;\n private String name = \"\";\n private GameAppManager manager;\n private Handle<GameAppContext> parent;\n\n \n /**\n * Constructor.\n * \n * @param name The name of the game app\n * @param manager The container-specific game app manager.\n * @param parent The parent that created this context.\n */\n public Default(String name, GameAppManager manager, Handle<GameAppContext> parent)\n {\n this.name = name;\n this.manager = manager;\n this.parent = parent;\n \n aggregator = new EventAggregator();\n }\n \n\n @Override\n public void handleMessage(Message message) \n {\n trigger(message);\n }\n\n \n @Override\n public void trigger(Event event) \n {\n aggregator.triggerEvent(event);\n }\n \n \n @Override\n public EventAggregator getEventAggregator()\n {\n return aggregator;\n }\n\n \n @Override\n public String getName() \n {\n return name;\n }\n \n \n @Override\n public GameAppManager getManager() \n {\n return manager;\n } \n \n \n @Override\n public Handle<GameAppContext> getParentContext()\n {\n return parent;\n }\n\n \n /**\n * Ask the game app manager to do this... \n */\n @Override\n public boolean canCreateGameApp(String name) \n {\n return manager.canCreateGameApp(name);\n }\n\n \n /**\n * Ask the game app manager to do this... \n */\n @Override\n public Handle<GameAppContext> createGameApp(String name, Handle<GameAppContext> parent, Map<String, String> additionalParams) \n {\n return manager.createGameApp(name, parent, additionalParams);\n }\n\n \n /**\n * Ask the game app manager to do this... \n */\n @Override\n public Handle<GameAppContext> tryGetGameApp(UUID gameAppUid) \n {\n return manager.tryGetGameApp(gameAppUid);\n }\n\n \n /**\n * Ask the game app manager to do this... \n */\n @Override\n public void removeGameApp(Handle<GameAppContext> that) \n {\n manager.removeGameApp(that);\n }\n\n \n /**\n * Ask the game app manager to do this... \n */\n @Override\n public InetSocketAddress localAddressFor(Handle<GameAppContext> that) \n {\n return manager.localAddressFor(that);\n }\n }\n}", "public abstract void RunOnGameOpen();", "@Override\n public void preInit(FMLPreInitializationEvent event)\n {\n EntityRegistry.registerModEntity(new ResourceLocation(ModInfo.MOD_ID, \"goomba\"), EntityGoomba.class, ModInfo.MOD_ID + \":goomba\", 0, MarioMod2.INSTANCE, 128, 1, false);\n EntityRegistry.registerModEntity(new ResourceLocation(ModInfo.MOD_ID, \"koopa\"), EntityKoopa.class, ModInfo.MOD_ID + \":koopa\", 1, MarioMod2.INSTANCE, 128, 1, false);\n EntityRegistry.registerModEntity(new ResourceLocation(ModInfo.MOD_ID, \"fireball\"), EntityFireball.class, ModInfo.MOD_ID + \":fireball\", 2, MarioMod2.INSTANCE, 64, 1, true);\n }", "private GameObject spawnBossBubble(LogicEngine toRunIn, int i_level, int i_maxLevel)\r\n\t{\r\n\t\tfloat f_sizeMultiplier = 1 - ((float)i_level/(float)i_maxLevel);\r\n\t\t\r\n\t\tif(i_level == i_maxLevel)\r\n\t\t\treturn null;\r\n\t\telse\r\n\t\t{\r\n\t\t\tGameObject go = new GameObject(\"data/\"+GameRenderer.dpiFolder+\"/redcube.png\",toRunIn.SCREEN_WIDTH/2,LogicEngine.rect_Screen.getHeight()+50,0);\r\n\t\t\tgo.i_animationFrameRow = 0;\r\n\t\t\tgo.i_animationFrame =1;\r\n\t\t\tgo.i_animationFrameSizeWidth =40;\r\n\t\t\tgo.i_animationFrameSizeHeight =37;\r\n\t\t\tgo.f_forceScaleX = 2f * f_sizeMultiplier;\r\n\t\t\tgo.f_forceScaleY = 2f * f_sizeMultiplier;\r\n\t\t\tgo.v.setMaxForce(1);\r\n\t\t\tgo.v.setMaxVel(5);\r\n\t\t\tgo.stepHandlers.add( new BounceOfScreenEdgesStep());\r\n\t\r\n\t\t\t\r\n\t\t\tgo.allegiance = GameObject.ALLEGIANCES.ENEMIES;\r\n\t\t\t//initial velocity of first one \r\n\t\t\tgo.v.setVel(new Vector2d(0,-5));\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tgo.allegiance = GameObject.ALLEGIANCES.ENEMIES;\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//if is last one\r\n\t\t\tif(i_level == i_maxLevel - 1)\r\n\t\t\t{\r\n\t\t\t\tHitpointShipCollision collision = new HitpointShipCollision(go,1, 40.0 * f_sizeMultiplier);\r\n\t\t\t\tgo.collisionHandler = collision;\r\n\t\t\t\tcollision.setSimpleExplosion();\r\n\t\t\t\t\r\n\r\n\t\t\t\treturn go;\r\n\t\t\t}\r\n\t\t\telse //has children\r\n\t\t\t{\r\n\t\t\t\tSplitCollision collision = new SplitCollision(go,2, 15.0 * f_sizeMultiplier);\r\n\t\t\t\tcollision.setSimpleExplosion();\r\n\t\t\t\t\r\n\t\t\t\tgo.collisionHandler = collision;\r\n\t\t\t\t\r\n\t\t\t\t//add children\t\t\t\t\r\n\t\t\t\tfor(int i=0;i<4;i++)\r\n\t\t\t\t{\r\n\t\t\t\t\tGameObject go2 = spawnBossBubble(toRunIn,i_level+1,i_maxLevel);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(i==0)\r\n\t\t\t\t\t\tgo2.v.setVel(new Vector2d(-5,-5));\r\n\t\t\t\t\tif(i==1)\r\n\t\t\t\t\t\tgo2.v.setVel(new Vector2d(5,-5));\r\n\t\t\t\t\tif(i==2)\r\n\t\t\t\t\t\tgo2.v.setVel(new Vector2d(-5,5));\r\n\t\t\t\t\tif(i==3)\r\n\t\t\t\t\t\tgo2.v.setVel(new Vector2d(5,5));\r\n\t\t\t\t\r\n\t\t\t\t\tcollision.splitObjects.add(go2);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn go;\t\t\r\n\t\t}\r\n\t}", "public UGen getGUGen() {\r\n\t\tif (isGStatic) {\r\n\t\t\treturn null;\r\n\t\t} else {\r\n\t\t\treturn gUGen;\r\n\t\t}\r\n\t}", "private static void inicializarComponentes() {\n\t\tgaraje = new Garaje();\r\n\t\tgarajeController=new GarajeController();\r\n\t\tgarajeController.iniciarPlazas();\r\n\t\t\r\n\t\tmenuInicio = new StringBuilder();\r\n\t\tmenuInicio.append(\"¡Bienvenido al garaje!\\n\");\r\n\t\tmenuInicio.append(\"****************************************\\n\");\r\n\t\tmenuInicio.append(\"9: Guardar Plazas\\n\");\r\n\t\tmenuInicio.append(\"0: Listar Plazas\\n\");\r\n\t\tmenuInicio.append(\"1: Listar Plazas Coche\\n\");\r\n\t\tmenuInicio.append(\"2: Listar Plazas Moto\\n\");\r\n\t\tmenuInicio.append(\"3: Reservar Plaza\\n\");\r\n\t\tmenuInicio.append(\"4: Listar Plazas Libres\\n\");\r\n\t\tmenuInicio.append(\"5: Listar Clientes\\n\");\r\n\t\tmenuInicio.append(\"6: Listar Vehículos\\n\");\r\n//\t\tmenuInicio.append(\"7:\\n\");\r\n//\t\tmenuInicio.append(\"8:\\n\");\r\n\t}", "BossEnemy(){\n super();\n totallyDied = true;\n }", "public Game2(Starter starter){\r\n chromaticManager = starter.chromaticManager;\r\n this.starter=starter;\r\n }", "static void groveChannels() {\n\n\t\tswitch (myParent) {\n\t\tcase 1:\n\n\t\t\tCHANNEL_GARDENER_COUNT = Channels.GARDENER1_COUNT;\n\t\t\tCHANNEL_GROVE_COUNT = Channels.GROVE1_COUNT;\n\n\t\t\tCHANNEL_GROVE_LOCATIONS = Channels.GROVE1_LOCATIONS;\n\t\t\tCHANNEL_GROVE_ASSIGNED = Channels.GROVE1_ASSIGNED;\n\t\t\tCHANNEL_GROVE_X = Channels.GROVE1_X;\n\t\t\tCHANNEL_GROVE_Y = Channels.GROVE1_Y;\n\n\t\t\tCHANNEL_GROVE_XMIN = Channels.GROVE1_XMIN;\n\t\t\tCHANNEL_GROVE_XMAX = Channels.GROVE1_XMAX;\n\t\t\tCHANNEL_GROVE_YMIN = Channels.GROVE1_YMIN;\n\t\t\tCHANNEL_GROVE_YMAX = Channels.GROVE1_YMAX;\n\n\t\t\tbreak;\n\t\tcase 2:\n\n\t\t\tCHANNEL_GARDENER_COUNT = Channels.GARDENER2_COUNT;\n\t\t\tCHANNEL_GROVE_COUNT = Channels.GROVE2_COUNT;\n\n\t\t\tCHANNEL_GROVE_LOCATIONS = Channels.GROVE2_LOCATIONS;\n\t\t\tCHANNEL_GROVE_ASSIGNED = Channels.GROVE2_ASSIGNED;\n\t\t\tCHANNEL_GROVE_X = Channels.GROVE2_X;\n\t\t\tCHANNEL_GROVE_Y = Channels.GROVE2_Y;\n\n\t\t\tCHANNEL_GROVE_XMIN = Channels.GROVE2_XMIN;\n\t\t\tCHANNEL_GROVE_XMAX = Channels.GROVE2_XMAX;\n\t\t\tCHANNEL_GROVE_YMIN = Channels.GROVE2_YMIN;\n\t\t\tCHANNEL_GROVE_YMAX = Channels.GROVE2_YMAX;\n\n\t\t\tbreak;\n\t\tcase 3:\n\n\t\t\tCHANNEL_GARDENER_COUNT = Channels.GARDENER3_COUNT;\n\t\t\tCHANNEL_GROVE_COUNT = Channels.GROVE3_COUNT;\n\n\t\t\tCHANNEL_GROVE_LOCATIONS = Channels.GROVE3_LOCATIONS;\n\t\t\tCHANNEL_GROVE_ASSIGNED = Channels.GROVE3_ASSIGNED;\n\t\t\tCHANNEL_GROVE_X = Channels.GROVE3_X;\n\t\t\tCHANNEL_GROVE_Y = Channels.GROVE3_Y;\n\n\t\t\tCHANNEL_GROVE_XMIN = Channels.GROVE3_XMIN;\n\t\t\tCHANNEL_GROVE_XMAX = Channels.GROVE3_XMAX;\n\t\t\tCHANNEL_GROVE_YMIN = Channels.GROVE3_YMIN;\n\t\t\tCHANNEL_GROVE_YMAX = Channels.GROVE3_YMAX;\n\n\t\t\tbreak;\n\t\tdefault:\n\n\t\t\tCHANNEL_GARDENER_COUNT = Channels.GARDENER1_COUNT;\n\t\t\tCHANNEL_GROVE_COUNT = Channels.GROVE1_COUNT;\n\n\t\t\tCHANNEL_GROVE_LOCATIONS = Channels.GROVE1_LOCATIONS;\n\t\t\tCHANNEL_GROVE_ASSIGNED = Channels.GROVE1_ASSIGNED;\n\t\t\tCHANNEL_GROVE_X = Channels.GROVE1_X;\n\t\t\tCHANNEL_GROVE_Y = Channels.GROVE1_Y;\n\n\t\t\tCHANNEL_GROVE_XMIN = Channels.GROVE1_XMIN;\n\t\t\tCHANNEL_GROVE_XMAX = Channels.GROVE1_XMAX;\n\t\t\tCHANNEL_GROVE_YMIN = Channels.GROVE1_YMIN;\n\t\t\tCHANNEL_GROVE_YMAX = Channels.GROVE1_YMAX;\n\n\t\t\tbreak;\n\t\t}\n\t}", "@Override\n public void start(GameData gameData, World world) {\n asteroids = new ArrayList<>();\n for (int i = 0; i <= random.nextInt(MAX_NUM_ASTEROIDS); i++) {\n asteroid = createAsteroid(gameData);\n System.out.println(\"Build asteroid: \" + (i + 1) + asteroid.getID());\n asteroids.add(asteroid);\n world.addEntity(asteroid);\n }\n }", "public void printAllScenes() {\r\n\t\tList <Scene> allScenes = handlerBridge.loadScenes();\r\n\t\tfor (Scene scene : allScenes) {\r\n\t\t\tSystem.out.print(\"Name: \" + scene.getName());\r\n\t\t\tSystem.out.println(\" - Ident: \" + scene.getIdentifier());\r\n\t\t}\r\n\t}", "void newGame() {\n\t\tstate = new model.State () ; \n\t\tif(host != null ) host.show(state) ; \n\t}", "public World() {\n\t\tbackgroundLoader.submit(new Callable<Object>() {\n\t\t\t@Override\n\t\t\tpublic Object call() throws Exception {\n\t\t\t\tItemDefinition.load();\n\t\t\t\treturn null;\n\t\t\t}\n\t\t});\n\t\tbackgroundLoader.submit(new Callable<Object>() {\n\t\t\t@Override\n\t\t\tpublic Object call() throws Exception {\n\t\t\t\tNPCDefinition.load();\n\t\t\t\tNPCStyle.init();\n\t\t\t\treturn null;\n\t\t\t}\n\t\t});\n\t\tbackgroundLoader.submit(new Callable<Object>() {\n\t\t\t@Override\n\t\t\tpublic Object call() throws Exception {\n\t\t\t\tDegradeSystem.init();\n\t\t\t\tProjectileManager.init();\n\t\t\t\treturn null;\n\t\t\t}\n\t\t});\n\t\tbackgroundLoader.submit(new Callable<Object>() {\n\t\t\t@Override\n\t\t\tpublic Object call() throws Exception {\n\t\t\t\tShops.loadShopFile();\n\t\t\t\treturn null;\n\t\t\t}\n\t\t});\n\t}", "@Override\n\tprotected void on_boss_death() {\n\n\t}", "public void createChooseGameUI()\n {\n \tHashMap<InventoryRunnable, InventoryItem> inventoryStuff = new HashMap<InventoryRunnable, InventoryItem>();\n \t\n \tInventoryRunnable gladiatorJoinRunnable = new GladiatorJoinInventoryRunnable(plugin);\n \t\n \tArrayList<String> gladiatorLore = new ArrayList<String>();\n \tgladiatorLore.add(\"FIGHT TO THE DEATH AND WIN YOUR FREEDOM\");\n \tgladiatorLore.add(\"GOOD LUCK WARRIOR!\");\n \tInventoryItem gladiatorItem = new InventoryItem(plugin, Material.SHIELD, \"GLADIATOR\", gladiatorLore, 1, true, 1);\n \tinventoryStuff.put(gladiatorJoinRunnable, gladiatorItem);\n \t\n \tchooseGameUI = new GUIInventory(plugin, \"MINIGAMES\", inventoryStuff, 3);\n }", "public void generate() {\n currentlyGenerating = true;\n Bukkit.broadcastMessage(ChatColor.GREEN + \"The world generation process has been started!\");\n createUhcWorld();\n }", "private void crearGen(int id){\n Random random = new Random();\n int longitud = random.nextInt(6) + 5;\n\n random = null;\n\n Gen gen = new Gen(id, longitud);\n agregarGen(gen);\n }", "@Override\n\tpublic void init(GameContainer gc, StateBasedGame sbg) throws SlickException\n\t{\n\t\tcoin = new Image(\"res/GUI/Coin.png\");\n\t\tmenu = new Image(\"res/GUI/InGameMenu.png\");\n\t\tmenuChild = new Image(\"res/GUI/InGameMenuMenu.png\");\n\t\tclick = new Sound(\"res/Audio/click.wav\");\n\t\tmovimento = new Sound(\"res/Audio/movimento.wav\");\n\t\tbattaglia = new Sound(\"res/Audio/inizioBattaglia.wav\");\n\t\topzioniMenu = new Bottone[3];\n\t\topzioniMenu[0] = new Bottone(\"Riprendi Partita\");\n\t\topzioniMenu[1] = new Bottone(\"Menu Principale\");\n\t\topzioniMenu[2] = new Bottone(\"Esci dal Gioco\");\n\t}", "public void createGenesisEvent() {\n handleNewEvent(buildEvent(null, null));\n }", "public Game createGame();", "@Override\n public void memoria() {\n \n }", "public void InitGame(){\n System.out.format(\"New game initiated ...\");\n Game game = new Game(client_List);\n SetGame(game);\n }", "public void gored() {\n\t\t\n\t}", "public Higiene(){\n\t\t\n\t}", "public Level1()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(560, 560, 1); \n prepare();\n gfs_level1 = new GreenfootSound(\"main.wav\");\n\n }", "@Override\n\tpublic void registrarLlegada() {\n\t}", "private GUIMain() {\n\t}", "public interface GameFactory {\n\n /**\n * Creates an item stack from the given compound tag.\n *\n * @param tag\n * The tag.\n * @return The item stack.\n */\n ItemStack createItemStack(CompoundTag tag);\n\n /**\n * Gets the material map.\n * \n * @return The material map.\n */\n WorldMaterialMap getMaterialMap();\n}", "public void loadGame() {\n game.loadGame();\n }", "private GameManager() \n\t{\n\t\t\n\t}", "public interface WorldListener {\n\t\tpublic void pickUpMineral();\n\t\t\n\t\tpublic void hit();\n\t}", "public void newGame(){\n\t\tsoundMan.BackgroundMusic1();\n\n\t\tstatus.setGameStarting(true);\n\n\t\t// init game variables\n\t\tbullets = new ArrayList<Bullet>();\n\n\t\tstatus.setShipsLeft(8);\n\t\tstatus.setGameOver(false);\n\n\t\tif (!status.getNewLevel()) {\n\t\t\tstatus.setAsteroidsDestroyed(0);\n\t\t}\n\n\t\tstatus.setNewAsteroid(false);\n\n\t\t// init the ship and the asteroid\n\t\tnewShip(gameScreen);\n\t\tnewAsteroid(gameScreen);\n\n\t\t// prepare game screen\n\t\tgameScreen.doNewGame();\n\t\tsoundMan.StopMusic2();\n\t\tsoundMan.StopMusic3();\n\t\tsoundMan.StopMusic4();\n\t\tsoundMan.StopMusic5();\n\t\tsoundMan.StopMusic6();\n\t\t// delay to display \"Get Ready\" message for 1.5 seconds\n\t\tTimer timer = new Timer(1500, new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tstatus.setGameStarting(false);\n\t\t\t\tstatus.setGameStarted(true);\t\n\n\t\t\t\tstatus.setLevel(1);\n\t\t\t\tstatus.setNumLevel(1);\n\t\t\t\tstatus.setScore(0);\n\t\t\t\tstatus.setYouWin(false);\n\t\t\t\tstatus.setBossLife(0);\n\t\t\t}\n\t\t});\n\t\ttimer.setRepeats(false);\n\t\ttimer.start();\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n public String getName() {\n return \"Genetic\";\n }", "@java.lang.Override\n public java.lang.String getGenesis() {\n return instance.getGenesis();\n }", "public Scenario() {\n Room ninjaRoom, weaponroom, meetingRoom, zenTemple, stealthRoom, restRoom, masterRoom, ninjaTransporter;\n\n // create the rooms\n ninjaRoom = new Room(\"in the main enterence to the camp. You'll need to walk 10000 steps to get to the next room.\");\n weaponroom = new Room(\"in the Weapon's room. Normally this is where you go to grab your Nunchaku, but not today.\");\n meetingRoom = new Room(\"in the Meeting room. This is where classes are normally held. We will be here tomorrow to be sure\");\n zenTemple = new Room(\"in the Meditation room. When done for the day, this is where you clear your head.\");\n stealthRoom = new Room(\"in the Stealth training room. Ninja are made here, slow but steady will keep you alive.\");\n restRoom = new Room(\"in the Barracks. When I am done for th day, I will come back here for some rest.\");\n masterRoom = new Room(\"in the Master's room. Master is current meditating right now. Better leave him alone.\");\n ninjaTransporter = new TransporterRoom(\"in the secret Shumpo room...with this I can teleport anywhere\", this);\n\n weaponroom.addItem(new Item(\"Katana\", 3));\n weaponroom.addItem(new Item(\"Nunchaku\", 1));\n weaponroom.addItem(new Item(\"Bo\", 2));\n weaponroom.addItem(new Item(\"Sai\", 2));\n ninjaRoom.addItem(new Item(\"Master's Keys\", 1));\n meetingRoom.addItem(new Item(\"Secret Plans\", 1));\n zenTemple.addItem(new Item(\"Prayer beads\", 1));\n stealthRoom.addItem(new Item(\"Throwing Star\", 2));\n restRoom.addItem(new Item(\"Risque magazines\", 1));\n masterRoom.addItem(new Item(\"Ancient Shinobi Scroll\", 5));\n\n // initialise room exits\n ninjaRoom.setExits(\"north\", ninjaTransporter);\n\n ninjaTransporter.setExits(\"north\", weaponroom);\n ninjaTransporter.setExits(\"south\", ninjaRoom);\n\n weaponroom.setExits(\"north\", meetingRoom);\n weaponroom.setExits(\"south\", ninjaTransporter);\n\n meetingRoom.setExits(\"north\", stealthRoom);\n meetingRoom.setExits(\"east\", restRoom);\n meetingRoom.setExits(\"south\", weaponroom);\n meetingRoom.setExits(\"west\", zenTemple);\n\n zenTemple.setExits(\"east\", meetingRoom);\n\n stealthRoom.setExits(\"south\", meetingRoom);\n\n restRoom.setExits(\"east\", masterRoom);\n restRoom.setExits(\"west\", meetingRoom);\n\n masterRoom.setExits(\"west\", restRoom);\n\n // Set the start room\n startRoom = ninjaRoom; // start game @ ninjaRoom\n\n rooms = new ArrayList();\n rooms.add(ninjaRoom);\n rooms.add(weaponroom);\n rooms.add(meetingRoom);\n rooms.add(zenTemple);\n rooms.add(stealthRoom);\n rooms.add(restRoom);\n rooms.add(masterRoom);\n rooms.add(ninjaTransporter);\n\n random = new Random();\n }", "public StartupHandler(){\r\n\t\tloadGameFiles();\r\n\t\tnew Engine();\r\n\t}", "public void sendeLobby();", "@Override\n\tpublic void classroom() {\n\t\t\n\t}", "public void act()\r\n {\n \r\n if (Background.enNum == 0)\r\n {\r\n length = Background.length;\r\n width = Background.width;\r\n getWorld().addObject (new YouWon(), length / 2, width / 2);\r\n \r\n //long lastAdded2 = System.currentTimeMillis();\r\n //long curTime3 = System.currentTimeMillis();\r\n //long curTime3 = System.currentTimeMillis();\r\n //long seconds = curTime3 / 1000;\r\n //sleep = 3;\r\n //try {\r\n //TimeUnit.SECONDS.sleep(sleep);\r\n //} catch(InterruptedException ex) {\r\n //Thread.currentThread().interrupt();\r\n //}\r\n //Greenfoot.delay(3);\r\n //long curTime3 = System.currentTimeMillis();\r\n //long secs2 = curTime3 / 1000;\r\n //long curTime4;\r\n //long secs3;\r\n //do\r\n //{\r\n //getWorld().addObject (new YouWon(), length / 2, width / 2);\r\n //curTime4 = System.currentTimeMillis();\r\n //secs3 = curTime3 / 1000;\r\n //} while (curTime4 / 1000 < curTime3 / 1000 + 3);\r\n //if (System.currentTimeMillis()/1000 - 3 >= secs2)\r\n //{\r\n //do\r\n //{\r\n pause(3000);\r\n Actor YouWon;\r\n YouWon = getOneObjectAtOffset(0, 0, YouWon.class);\r\n World world;\r\n world = getWorld();\r\n world.removeObject(this);\r\n Background.xp += 50;\r\n Background.myGold += 100;\r\n if (Background.xp >= 50 && Background.xp < 100){\r\n Background.myLevel = 2;\r\n getWorld().addObject (new Level(), getWorld().getWidth() / 2, getWorld().getHeight() / 2);\r\n } else if (Background.xp >= 100 && Background.xp < 200){\r\n Background.myLevel = 3;\r\n getWorld().addObject (new Level(), getWorld().getWidth() / 2, getWorld().getHeight() / 2);\r\n } else if (Background.xp >= 200 && Background.xp < 400){\r\n Background.myLevel = 4;\r\n getWorld().addObject (new Level(), getWorld().getWidth() / 2, getWorld().getHeight() / 2);\r\n } else if (Background.xp >= 400 && Background.xp < 800){\r\n Background.myLevel = 5;\r\n getWorld().addObject (new Level(), getWorld().getWidth() / 2, getWorld().getHeight() / 2);\r\n } else if (Background.xp >= 800 && Background.xp < 1600){\r\n Background.myLevel = 6;\r\n getWorld().addObject (new Level(), getWorld().getWidth() / 2, getWorld().getHeight() / 2);\r\n } else if (Background.xp >= 1600 && Background.xp < 3200){\r\n Background.myLevel = 7;\r\n getWorld().addObject (new Level(), getWorld().getWidth() / 2, getWorld().getHeight() / 2);\r\n } else if (Background.xp >= 3200 && Background.xp < 6400){\r\n Background.myLevel = 8;\r\n getWorld().addObject (new Level(), getWorld().getWidth() / 2, getWorld().getHeight() / 2);\r\n } else if (Background.xp >= 6400 && Background.xp < 12800){\r\n Background.myLevel = 9;\r\n getWorld().addObject (new Level(), getWorld().getWidth() / 2, getWorld().getHeight() / 2);\r\n } else if (Background.xp >= 12800){\r\n Background.myLevel = 10;\r\n getWorld().addObject (new Level(), getWorld().getWidth() / 2, getWorld().getHeight() / 2);\r\n }\r\n //curTime3 = System.currentTimeMillis();\r\n //secs2 = curTime3 / 1000;\r\n //index2++;\r\n //Greenfoot.setWorld(new YouWon());\r\n //lastAdded2 = curTime3;\r\n //}\r\n //} while (index2 <= 0);\r\n }\r\n }", "public gameWorld()\n { \n // Create a new world with 600x600 cells with a cell size of 1x1 pixels.\n super(600, 600, 1); \n \n addObject(new winSign(), 310, 300);\n addObject(new obscureDecorative(), 300, 400);\n addObject(new obscureDecorative(), 300, 240);\n \n for(int i = 1; i < 5; i++) {\n addObject(new catchArrow(i * 90), 125 * i, 100);\n }\n for (int i = 0; i < 12; i++) {\n addObject(new damageArrowCatch(), 50 * i + 25, 50); \n }\n \n \n //Spawning Interval\n\n if(timerInterval >= 10) {\n arrowNumber = Greenfoot.getRandomNumber(3);\n }\n if(arrowNumber == 0) {\n addObject(new upArrow(directionOfArrow[0], imageOfArrow[0]), 125, 590);\n arrowNumber = 5;\n }\n if(arrowNumber == 1) {\n addObject(new upArrow(directionOfArrow[1], imageOfArrow[1]), 125 * 2, 590);\n arrowNumber = 5;\n }\n if(arrowNumber == 2) {\n addObject(new upArrow(directionOfArrow[2], imageOfArrow[2]), 125 * 3, 590);\n arrowNumber = 5;\n }\n if( arrowNumber == 3) {\n addObject(new upArrow(directionOfArrow[3], imageOfArrow[3]), 125 * 4, 590);\n arrowNumber = 5;\n }\n \n \n\n \n }", "@Override\n public void run(){\n Settings.setGameSettings(new Player(0,Color.RED,1800, \"Player 1\",true),\n new Player(1,Color.BLUE,1800, \"Player 2\",false),1800,25);\n MenuFrame menuFrame = new MenuFrame();\n }", "private void createInstances()\n {\n Room EnchantedForest, IdyllicGlade, GumdropHill, DenseWoods, VolcanoHell, SecretHotSpring, MagmaChamber, MysteriousCloud, SkyParadise, Cirrostratus, Nimbostratus, Stratocumulus, WaterTemple, Whirlpool, EyeoftheStorm, BossQuarters, Portal;\n \n random = new Random();\n allrooms = new ArrayList<Room>();\n \n // create the rooms providing an ID to be passed into the room constructor\n EnchantedForest = new EnchantedForestRoom();\n allrooms.add(EnchantedForest);\n IdyllicGlade = new IdyllicGladeRoom();\n allrooms.add(IdyllicGlade);\n GumdropHill = new GumdropHillRoom();\n allrooms.add(GumdropHill);\n DenseWoods = new DenseWoodsRoom();\n allrooms.add(DenseWoods);\n VolcanoHell = new VolcanoHellRoom();\n allrooms.add(VolcanoHell);\n SecretHotSpring = new SecretHotSpringRoom();\n allrooms.add(SecretHotSpring);\n MagmaChamber = new MagmaChamberRoom();\n allrooms.add(MagmaChamber);\n MysteriousCloud = new MysteriousCloudRoom();\n allrooms.add(MysteriousCloud);\n SkyParadise = new SkyParadiseRoom();\n allrooms.add(SkyParadise);\n Cirrostratus = new CirrostratusRoom();\n allrooms.add(Cirrostratus);\n Nimbostratus = new NimbostratusRoom();\n allrooms.add(Nimbostratus);\n Stratocumulus = new StratocumulusRoom();\n allrooms.add(Stratocumulus);\n WaterTemple = new WaterTempleRoom();\n allrooms.add(WaterTemple);\n Whirlpool = new WhirlpoolRoom();\n allrooms.add(Whirlpool);\n EyeoftheStorm = new EyeoftheStormRoom();\n allrooms.add(EyeoftheStorm);\n BossQuarters = new BossQuartersRoom(); \n allrooms.add(BossQuarters);\n Portal = new PortalRoom();\n \n \n // initialise room exits, items and creatures\n EnchantedForest.setExit(\"east\", IdyllicGlade);\n EnchantedForest.setExit(\"west\", GumdropHill);\n EnchantedForest.setExit(\"south\", DenseWoods);\n \n IdyllicGlade.setExit(\"west\", EnchantedForest);\n \n GumdropHill.setExit(\"down\", EnchantedForest);\n GumdropHill.setExit(\"up\", MysteriousCloud);\n\n DenseWoods.setExit(\"north\", EnchantedForest);\n DenseWoods.setExit(\"south\", VolcanoHell);\n \n MagmaChamber.setExit(\"north\",VolcanoHell);\n \n VolcanoHell.setExit(\"east\", SecretHotSpring);\n VolcanoHell.setExit(\"north\", DenseWoods);\n VolcanoHell.setExit(\"west\", MysteriousCloud);\n VolcanoHell.setExit(\"south\", MagmaChamber);\n \n SecretHotSpring.setExit(\"west\", VolcanoHell);\n \n MysteriousCloud.setExit(\"west\", VolcanoHell);\n MysteriousCloud.setExit(\"in\", Portal);\n MysteriousCloud.setExit(\"up\", SkyParadise);\n \n SkyParadise.setExit(\"down\", MysteriousCloud);\n SkyParadise.setExit(\"up\", Cirrostratus);\n SkyParadise.setExit(\"east\", Nimbostratus);\n \n Cirrostratus.setExit(\"north\", SkyParadise);\n Cirrostratus.setExit(\"down\", WaterTemple);\n \n Nimbostratus.setExit(\"west\", SkyParadise);\n Nimbostratus.setExit(\"east\", Stratocumulus);\n \n Stratocumulus.setExit(\"west\", Nimbostratus);\n Stratocumulus.setExit(\"down\", WaterTemple);\n \n WaterTemple.setExit(\"up\",Stratocumulus);\n WaterTemple.setExit(\"high\", Cirrostratus);\n WaterTemple.setExit(\"down\", Whirlpool);\n WaterTemple.setExit(\"in\", BossQuarters);\n \n Whirlpool.setExit(\"up\", WaterTemple);\n Whirlpool.setExit(\"down\", EyeoftheStorm);\n \n EyeoftheStorm.setExit(\"up\", Whirlpool);\n EyeoftheStorm.setExit(\"in\", BossQuarters);\n \n BossQuarters.setExit(\"out\", WaterTemple);\n \n currentRoom = EnchantedForest; \n }", "@Override\n\tpublic void newGame(String level) {\n\t\tmanager.newGame(level);\n\t}", "public void gameEngineInitializer() {\n\t\t\r\n\t\tthis.sputacchioGameEngine = new SputacchioGameEngine(supportDeck, mainDeck, mainBoard, players, gamestate, playerDoingTurnNumber);// da implementare alla fine\r\n\t\tthis.classicGameEngine = new ClassicGameEngine(supportDeck, mainDeck, mainBoard, players, gamestate, playerDoingTurnNumber, engineUtility, filter);\r\n\t\t\r\n\t\tthis.gamestate.setCurrentGameType(GameType.CLASSICGAME);//si dovrebbe iniziare dal cucù ma facciamo dopo\r\n\t\tthis.gamestate.setCurrentHandNumber(INITIALHANDNUMBER);\r\n\t\tthis.givePersonalJolly();\r\n\t\t\r\n\t\tthis.classicGameEngine.distributeHands();//queste due si fanno all'inizio di ogni mano, non sono da fare solo la prima volta e basta\r\n\t\tthis.classicGameEngine.substituteJolly();\r\n\t\t\r\n\t\tmainEngine();\r\n\t\t//TODO ci vuole un metodo che, a parte la prima chiamata di Server Room, chiama il sotto-engine giusto in base a game type. Se classic game engine fa una return per segnalare\r\n\t\t//che la mano è finita perchè nessuno ha carte in mano, game engine deve ridare le 6 carte o settare l'ultima mano, o la mano della scala obbligatoria, e cambiare chi inizia a cucù.\r\n\t\t//Poi penso che debba chiamare Filter per mostrare a entrambi cosa accade, stampare le nuove carte e dichiarare l'inizio del cucù.\r\n\t}", "public GameOverStandalone() {\n initComponents();\n \n ranks = new LinkedList<String>();\n \n FadingEffect fader = new FadingEffect();\n fader.Fade(this);\n \n// mainActivity=this;\n// \n// Thread fading = new Thread(new Runnable() {\n// @Override\n// public void run() {\n// while (true) {\n// int x=java.awt.MouseInfo.getPointerInfo().getLocation().x;\n// int y=java.awt.MouseInfo.getPointerInfo().getLocation().y;\n// if (x>mainActivity.getX()&&x<(mainActivity.getX()+mainActivity.getWidth())&&y>mainActivity.getY()&&y<(mainActivity.getY()+mainActivity.getHeight())) {\n// mainActivity.setOpacity(1.0f);\n// }\n// else {\n// mainActivity.setOpacity(0.75f);\n// }\n// try {\n// Thread.sleep(100);\n// } catch (Exception e) {\n// \n// }\n// }\n// }\n// });\n// fading.start();\n }", "public static void init()\n {\n oreStarSteel = new BlockOreStarSteel(MSAConfig.ores, Material.rock);\n storageStarSteel = new BlockStorageStarSteel(MSAConfig.storageBlock, Material.iron);\n // tech blocks\n launchTower = new BlockLaunchTower(MSAConfig.launchTower, Material.iron);\n launchTowerController = new BlockLaunchControl(MSAConfig.launchController, Material.iron);\n rocketAssembler = new BlockRocketAssembler(MSAConfig.rocketAssembler, Material.iron);\n comSatellite = new BlockComSatellite(MSAConfig.comSatellite, Material.iron);\n ssBuilding = new BlockSSBuilding(MSAConfig.ssBuilding, Material.rock);\n commandCenter = new BlockCommandCenter(MSAConfig.commandCenter, Material.iron);\n\n /* Register Blocks */\n // ore blocks\n GameRegistry.registerBlock(oreStarSteel, \"oreStarSteel\");\n GameRegistry.registerBlock(storageStarSteel, \"storageStarSteel\");\n // tech blocks\n GameRegistry.registerBlock(launchTower, \"launchTower\");\n GameRegistry.registerBlock(launchTowerController, \"launchTowerController\");\n GameRegistry.registerBlock(rocketAssembler, \"rocketAssembler\");\n GameRegistry.registerBlock(comSatellite, \"comSatellite\");\n GameRegistry.registerBlock(ssBuilding, \"ssBuilding\");\n GameRegistry.registerBlock(commandCenter, \"commandCenter\");\n\n /* Set block harvest level */\n // ore blocks\n MinecraftForge.setBlockHarvestLevel(oreStarSteel, \"pickaxe\", 2);\n MinecraftForge.setBlockHarvestLevel(storageStarSteel, \"pickaxe\", 2);\n // building blocks\n MinecraftForge.setBlockHarvestLevel(ssBuilding, \"pickaxe\", 2);\n // tech blocks\n MinecraftForge.setBlockHarvestLevel(launchTower, \"pickaxe\", 1);\n }", "public GameGenerator() {\r\n\t\tthis.actionsCommand = new ArrayList<ICommand>();\r\n\t\tthis.invokerCommands = new ArrayList<InvokerCommand>();\r\n\t}", "FuelCan(){\n\t\tsuper();\n\t\tsetSize(randInt(3,6));\n\t}", "public Genome() {\n this.code = new int[GENOME_SIZE];\n for (int i = 0; i < 8; ++i) {\n this.code[i] = i;\n }\n for (int i = 8; i < Genome.GENOME_SIZE; ++i) {\n this.code[i] = r.nextInt(8);\n }\n this.repairGenome();\n Arrays.sort(this.code);\n this.calculatePopularity();\n }", "public interface Registry {\n\n Bonus getRandom();\n Bonus getByName(String name);\n\n}", "public void buscarGestor(){\r\n\t\t\r\n\t}", "public interface GameOfLifeLogic {\n \n /**\n * Testet, ob die Zelle an der Position (x,y) in der aktuellen Generation lebt.\n * @param x Kooridnate\n * @param y Koordinate\n * @return true genau dann wenn die Zelle an der Position (x,y) in der aktuellen\n * Generation lebt. Ansonsten false.\n */\n boolean isCellAlive(int x, int y);\n \n /**\n * Berechnet nach den Spielregeln die neue Generation aus der startGeneration,\n * speichert sie in einem neuen Feld und überschreibt nach der Berechnung die \n * alte Generation mit der neuen und setzt das Feld der neuenGeneration wieder\n * auf false für alle Positionen.\n */\n void nextGeneration();\n \n /**\n * Übergibt die Startgeneration.\n * @param generation eine der Startgenerationen.\n */\n void setStartGeneration(boolean[][] generation);\n\n}", "public void newGame() {\n // this.dungeonGenerator = new TowerDungeonGenerator();\n this.dungeonGenerator = cfg.getGenerator();\n\n Dungeon d = dungeonGenerator.generateDungeon(cfg.getDepth());\n Room[] rooms = d.getRooms();\n\n String playername = JOptionPane.showInputDialog(null, \"What's your name ?\");\n if (playername == null) playername = \"anon\";\n System.out.println(playername);\n\n this.player = new Player(playername, rooms[0], 0, 0);\n player.getCurrentCell().setVisible(true);\n rooms[0].getCell(0, 0).setEntity(player);\n\n frame.showGame();\n frame.refresh(player.getCurrentRoom().toString());\n frame.setHUD(player.getGold(), player.getStrength(), player.getCurrentRoom().getLevel());\n }", "@Override\r\n\tpublic void onPopulateScene(Scene pScene,\r\n\t\t\tOnPopulateSceneCallback pOnPopulateSceneCallback) throws Exception {\r\n\t\t\r\n\t\t// We will create a timer-handler to handle the duration\r\n\t\t// in which the splash screen is shown\r\n\t\tmEngine.registerUpdateHandler(new TimerHandler(4, new ITimerCallback(){\r\n\t\t\r\n\t\t// Override ITimerCallback's 'onTimePassed' method to allow\r\n\t\t// us to control what happens after the timer duration ends\r\n\t\t@Override\r\n\t\tpublic void onTimePassed(TimerHandler pTimerHandler) {\r\n\t\t\t// When 4 seconds is up, switch to our menu scene\r\n\t\t\tmEngine.setScene(mMenuScene);\r\n\t\t\t}\r\n\t\t}));\r\n\r\n\t\tpOnPopulateSceneCallback.onPopulateSceneFinished();\t\r\n\t}", "@Override\n protected void initGame() {\n getGameWorld().setEntityFactory(new PlatformerFactory());\n getGameWorld().setLevelFromMap(\"Platformergame1.json\");\n\n // Sets spawnloction of the player\n player = getGameWorld().spawn(\"player\", 50, 50);\n }", "public OrchardGame() {\n\t\t\n\t}" ]
[ "0.5767191", "0.5721539", "0.5623619", "0.5584521", "0.55216205", "0.55216205", "0.55216205", "0.5503036", "0.54859805", "0.547391", "0.5452931", "0.5428785", "0.5419998", "0.5396115", "0.53878224", "0.53553694", "0.53430504", "0.5329361", "0.5310201", "0.53058034", "0.53045595", "0.53027314", "0.529708", "0.5296463", "0.52929103", "0.52835155", "0.5273982", "0.52627444", "0.52473974", "0.52432907", "0.5242746", "0.5232381", "0.5230565", "0.5225012", "0.52239376", "0.5222948", "0.52220803", "0.521348", "0.5205375", "0.5204384", "0.5201837", "0.51814747", "0.5178369", "0.5175721", "0.5172462", "0.5170394", "0.51673645", "0.51637894", "0.5148558", "0.5144768", "0.5139577", "0.5131637", "0.51308656", "0.512807", "0.5118394", "0.51159376", "0.51044214", "0.51002973", "0.50953937", "0.50920355", "0.5091731", "0.5089981", "0.5088712", "0.50844896", "0.5073847", "0.5072282", "0.50717866", "0.5058893", "0.5057055", "0.5056453", "0.50526196", "0.5046749", "0.5039524", "0.5036627", "0.5036313", "0.5035518", "0.5033897", "0.5030659", "0.503019", "0.5025252", "0.50180167", "0.5017574", "0.5015215", "0.5010334", "0.5008663", "0.5003981", "0.5001823", "0.5001164", "0.49975052", "0.49943593", "0.49927145", "0.4984156", "0.49800247", "0.4979339", "0.4975034", "0.49731588", "0.49726367", "0.49725604", "0.4969464", "0.49677834", "0.49663657" ]
0.0
-1
/ public: DaysGenDisp (bean) interface
public Entry[] getEntries() { return entries; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"unchecked\")\n\tprotected void genObjects(GenCtx ctx, Date day)\n\t throws GenesisError\n\t{\n\t\tEntry[] entries = selectEntries(ctx, genObjsNumber(ctx));\n\t\tMap inds = new IdentityHashMap(getEntries().length);\n\n\t\t//~: put initial in-day indices\n\t\tfor(Entry e : getEntries())\n\t\t\tinds.put(e, 0);\n\n\t\t//c: for all the objects number of the day\n\t\tfor(int ei = 0;(ei < entries.length);ei++)\n\t\t{\n\t\t\t//~: find present per-day index\n\t\t\tint i = (Integer)inds.get(entries[ei]);\n\n\t\t\t//~: and store it in the context\n\t\t\tctx.set(DAYI, i + 1); //<-- starting from 1, not 0\n\n\t\t\t//~: generate the in-day time\n\t\t\tctx.set(TIME, genDayTime(ctx, day, ei + 1, entries.length));\n\n\t\t\t//!: call the genesis unit\n\t\t\tif(callGenesis(ctx, entries[ei]))\n\t\t\t{\n\t\t\t\t//~: update per-day counter\n\t\t\t\tinds.put(entries[ei], i + 1);\n\n\t\t\t\t//~: update total counter\n\t\t\t\tif(total.containsKey(entries[ei]))\n\t\t\t\t\ttotal.put(entries[ei], 1 + total.get(entries[ei]));\n\t\t\t\telse\n\t\t\t\t\ttotal.put(entries[ei], 1);\n\t\t\t}\n\n\t\t\tctx.set(TIME, null);\n\t\t}\n\n\t\t//~: write to the log\n\t\tlogGen(ctx, day, inds);\n\t}", "public int getDays(){\r\n\t\treturn days;\r\n\t}", "public int getDays() {\n return this.days;\n }", "public int getDay(){\n\t return this.day;\n }", "public void setDays(int days) {\n this.days = days;\n }", "public long getDays() {\r\n \treturn days;\r\n }", "public int getLBR_CollectionReturnDays();", "public TypicalDay() {\n\t\tnbDeliveries = 0;\n\t\twareHouse = -1;\n\t}", "ArrayList<Day> getDays() {\n return days;\n }", "public Integer getPresentDays()\r\n/* 48: */ {\r\n/* 49:51 */ return this.presentDays;\r\n/* 50: */ }", "@Override\n protected String serializeDaysBetween(ImmutableList<? extends ImmutableTerm> terms,\n Function<ImmutableTerm, String> termConverter, TermFactory termFactory) {\n return String.format(\"DATEDIFF(DAY, %s, %s) - IIF(CAST(%s AS TIME) > CAST(%s AS TIME), 1, 0)\",\n termConverter.apply(terms.get(1)),\n termConverter.apply(terms.get(0)),\n termConverter.apply(terms.get(1)),\n termConverter.apply(terms.get(0)));\n }", "private WeekDays(String mood){\n this.mood = mood;\n }", "public void calculateVacationDays(){\n }", "public abstract int daysInMonth(DMYcount DMYcount);", "public int getDay()\n {\n return day;\n }", "int getNumberDays();", "Integer getDaysSpanned();", "public int getDay() {\n return day;\n }", "private RepeatWeekdays() {}", "protected void genObjectsTx(GenCtx ctx, Date day)\n\t throws GenesisError\n\t{\n\t\tgenObjects(ctx, day);\n\n\t\t//~: mark that day\n\t\tfor(Entry e : getEntries())\n\t\t\tif(e.getGenesis() instanceof DaysGenPart)\n\t\t\t\t((DaysGenPart)e.getGenesis()).markDayGenerated(ctx);\n\t}", "public int getDay() {\n\treturn day;\n }", "public void fillDays(int days){\n\t\tnumberDate.removeAllItems();\n\t\tfor(int i = 0; i< days; i++){\n\t\t\t//daylist[i] = \"\" + (i+1);\n\t\t\tnumberDate.addItem((i+1));\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}", "public int getIDays() {\n return iDays;\n }", "public Integer getTotalDays()\r\n/* 68: */ {\r\n/* 69:67 */ return this.totalDays;\r\n/* 70: */ }", "public int getNumDaysForComponent(Record record);", "io.dstore.values.StringValue getDay();", "@Override\r\n public String toString() {\r\n \treturn (\"[Days=\" + days + \"], [Millis=\" + millis + \"], [Micros=\" + micros + \"]\");\r\n }", "protected void sequence_DAYS(ISerializationContext context, DayValue semanticObject) {\n\t\tgenericSequencer.createSequence(context, semanticObject);\n\t}", "public int getLBR_ProtestDays();", "public int getDay(){\n\t\treturn day;\n\t}", "public interface FindDaysView {\n void onFoundDays(ArrayList<Integer> days, int year, int month);\n}", "public int getDay() {\r\n return day;\r\n }", "public void setDays(String days) {\n\t\tthis.days = days;\n\t}", "public Day[] getDays() {\n\t\treturn days;\n\t}", "public int getEDays() {\n return eDays;\n }", "private Date getdDay() {\n\t\treturn this.dDay;\r\n\t}", "public void setEDays(int days){\n \teDays = days;\n }", "long getTermDays();", "private String getDays() {\n StringBuilder daysSB = new StringBuilder();\n\n if (days > 0) {\n daysSB.append(days);\n } else {\n daysSB.append(\"0\");\n }\n\n return daysSB.toString();\n }", "public int getNumberOfDays() {\n return numberOfDays;\n }", "private Day(int value) {\r\n\t\tthis.value = value;\r\n\t}", "public void setIDays(int iDays) {\n this.iDays = iDays;\n }", "void displaySpecifiedDayList();", "double getAgeDays();", "public io.dstore.values.StringValue.Builder getDayBuilder() {\n \n onChanged();\n return getDayFieldBuilder().getBuilder();\n }", "@java.lang.Override public int getDayValue() {\n return day_;\n }", "public final void addDays(int days)\n {\n if ( days == 0 ) return;\n this.ordinal += days;\n toGregorian();\n }", "public DayCount getDayCount() {\n return dayCount;\n }", "@Override\n public String toString() {\n return \"Day \" + day\n +\" Open \" + open\n +\" Close \"+ close;\n }", "public void setDaysAdded(int value) {\n this.daysAdded = value;\n }", "public Integer getDay()\n {\n return this.day;\n }", "@Override\n\tpublic Calendar generateEndDate( ValueSetType vst, VariableValueType value ) {\n\t\treturn generateStartDate( vst, value );\n\t}", "public void setDays(int daysIn){\r\n\t\tdays = daysIn;\r\n\t}", "@Override\n\tpublic int widgetDday(WidgetCheck wc, String[] dlist) {\n\t\treturn dDao.widgetDday(sqlSession, wc, dlist);\n\t}", "@Override\n void generateExpression(ExpressionClassBuilder acb, MethodBuilder mb)\n\t\tthrows StandardException\n\t{\n acb.pushDataValueFactory(mb);\n\t\tleftOperand.generateExpression(acb, mb);\n mb.cast( ClassName.DataValueDescriptor);\n\t\trightOperand.generateExpression(acb, mb);\n mb.cast( ClassName.DataValueDescriptor);\n mb.callMethod( VMOpcode.INVOKEINTERFACE, null, methodName, ClassName.DateTimeDataValue, 2);\n }", "public int getCycles();", "public DayPeriod() {\n\t}", "public int getDay() {\n\t\treturn day;\n\t}", "Integer getDay();", "public int getNumDays() {\n\t\treturn numDays;\n\t}", "private void creatBirth(){\n\n for (int i = 0; i < repeatLunar.size() - 1; i++) {\n mLunar = repeatLunar.get(i);\n mLunarDay = mLunar.getLunarDay();\n mLunarMonth = mLunar.getLunarMonth();\n mLunarYear = mLunar.getLunarYear();\n mRepeat = mLunar.getRepeat();\n\n createEvent(getDate(mLunarYear, mLunarMonth, mLunarDay));\n\n\n }\n\n\n\n }", "public MonthPanel(DayPanel dp) {\n \t\tsuper(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);\n \t\t\n \t\tJPanel panel = new JPanel(new GridLayout(6,7));\n \n \t\tDayDto day = dp.getDay();\n \t\tthis.d = day.getDate();\n \t\t\n \t\t//GregorianCalendar cal = new GregorianCalendar();\n \t\tCalendar cal = GregorianCalendar.getInstance();\n \t\tcal.setTime(this.d);\n \t\t\n \t\t//cal.set(Calendar.DATE, 1);\n \t\t//cal.set(Calendar.MONTH, d.getMonth() - 1);\n \t\t//cal.set(Calendar.YEAR, d.getYear());\n \t\t\n \t\tint m= cal.get(Calendar.MONTH) + 1;\n \t\t\n \t\tString month = \"December\";\n \t\tif (m == 1) month = \"January\";\n \t\telse if (m == 2) month = \"February\";\n \t\telse if (m == 3) month = \"March\";\n \t\telse if (m == 4) month = \"April\";\n \t\telse if (m == 5) month = \"May\";\n \t\telse if (m == 6) month = \"June\";\n \t\telse if (m == 7) month = \"July\";\n \t\telse if (m == 8) month = \"August\";\n \t\telse if (m == 9) month = \"September\";\n \t\telse if (m == 10) month = \"October\";\n \t\telse if (m == 11) month = \"November\";\n \t\t\n \t\tmonth = month + \" \" + cal.get(Calendar.YEAR);\n \t\t\n \t\t//prevDays is the number of boxes in the upper left, before the first of the month, needed since the \n \t\t//calendar is going to be a 6x7 set of boxes. Calendar.SUNDAY is 1 and so forth, so we use day of week - 1\n \t\tint prevDays = cal.get(Calendar.DAY_OF_WEEK) - 1; \n \t\tint endDays = 42 - cal.getActualMaximum(Calendar.DAY_OF_MONTH) - prevDays;\n \t\t\n \t\t/*System.out.println(\"Calendar.DAY_OF_WEEK: \" + Calendar.DAY_OF_WEEK);\n \t\t//System.out.println(\"Calendar.DATE\" + Calendar.DATE);\n \t\t//System.out.println(\"Calendar.MONTH\" + cal.get(Calendar.MONTH));\n \t\t//System.out.println(\"Calendar.YEAR\" + cal.get(Calendar.YEAR));\n \t\t//System.out.println(\"prevDays: \" + prevDays);\n \t\t//System.out.println(\"endDays: \" + endDays);*/\n \t\t\n\t\tcal.roll(Calendar.MONTH, false);\n \t\t\n \t\tfor (int i = 1; i <= prevDays; i++) {\n\t\t\tCalendar c = new GregorianCalendar(cal.get(Calendar.MONTH) + 1, cal.getActualMaximum(Calendar.DAY_OF_MONTH) - prevDays + i, cal.get(Calendar.YEAR));\n \t\t\tjava.sql.Date date = new Date(c.getTime().getTime());\n \t\t\tpanel.add(new DayBlock(date, Color.LIGHT_GRAY));\n \t\t}\n\t\t\n\t\tcal.roll(Calendar.MONTH, true);\n\t\t\n \t\tfor (int i = 1; i <= cal.getActualMaximum(Calendar.DAY_OF_MONTH); i++) {\n\t\t\tCalendar c = new GregorianCalendar(cal.get(Calendar.MONTH), i, cal.get(Calendar.YEAR));\n \t\t\tjava.sql.Date date = new Date(c.getTime().getTime());\n \t\t\tpanel.add(new DayBlock(date));\n \t\t}\n \t\t\n\t\tcal.roll(Calendar.MONTH, true);\n\t\t\n \t\tfor (int i = 1; i <= endDays; i++) {\n\t\t\tCalendar c = new GregorianCalendar(cal.get(Calendar.MONTH) + 1, i, cal.get(Calendar.YEAR));\n \t\t\tjava.sql.Date date = new Date(c.getTime().getTime());\n \t\t\tpanel.add(new DayBlock(date, Color.LIGHT_GRAY));\n \t\t}\n \t\t\n \t\tMonthHeadingPanel mhp = new MonthHeadingPanel(month);\n \t\tJPanel main = new JPanel(new BorderLayout());\n \t\tmain.add(mhp, BorderLayout.NORTH);\n \t\t\n \t\tmain.add(panel, BorderLayout.CENTER);\n \t\t\n \t\tsetViewportView(main);\n \t}", "public void generate(GenCtx ctx)\n\t throws GenesisError\n\t{\n\t\tif((getEntries() == null) || (getEntries().length == 0))\n\t\t\treturn;\n\n\t\t//~: the start day (inclusive)\n\t\tDate curDay = findFirstGenDate(ctx);\n\t\tif(curDay == null) return;\n\n\t\t//~: the final day (inclusive)\n\t\tDate endDay = findLastGenDate(ctx);\n\t\tif(endDay == null) return;\n\n\t\t//c: generate till the last day\n\t\twhile(!curDay.after(endDay))\n\t\t{\n\t\t\t//~: set the day parameter of the context\n\t\t\tctx.set(DAY, curDay);\n\n\t\t\tgenObjectsTxDisp(ctx, curDay);\n\t\t\tcurDay = DU.addDaysClean(curDay, +1);\n\n\t\t\tctx.set(DAY, null);\n\t\t}\n\n\t\t//?: {has test} run it\n\t\tif(getTest() != null)\n\t\t\tgetTest().testGenesis(ctx);\n\t}", "public java.lang.Integer getNoOfDays () {\n\t\treturn noOfDays;\n\t}", "public java.lang.Integer getNoOfDays () {\n\t\treturn noOfDays;\n\t}", "@Override\n public void date_()\n {\n }", "public void setDays(int n) {\n this.days = n;\n this.total = this.days * this.price;\n }", "public void setDay(int day)\n {\n this.day = day;\n }", "private static void incrementDate() {\n\t\ttry {\r\n\t\t\tint days = Integer.valueOf(input(\"Enter number of days: \")).intValue();\r\n\t\t\tcalculator.incrementDate(days); // variable name changes CAL to calculator\r\n\t\t\tlibrary.checkCurrentLoans(); // variable name changes LIB to library\r\n\t\t\toutput(sdf.format(cal.date())); // variable name changes SDF to sdf , CAL to cal , method changes Date() to date()\r\n\t\t\t\r\n\t\t} catch (NumberFormatException e) {\r\n\t\t\t output(\"\\nInvalid number of days\\n\");\r\n\t\t}\r\n\t}", "public void setNumDays(int days) {\n maxDays = days;\n }", "public void setupDays() {\n\n //if(days.isEmpty()) {\n days.clear();\n int day_number = today.getActualMaximum(Calendar.DAY_OF_MONTH);\n SimpleDateFormat sdf = new SimpleDateFormat(\"EEEE\");\n SimpleDateFormat sdfMonth = new SimpleDateFormat(\"MMM\");\n today.set(Calendar.DATE, 1);\n for (int i = 1; i <= day_number; i++) {\n OrariAttivita data = new OrariAttivita();\n data.setId_utente(mActualUser.getID());\n\n //Trasformare in sql date\n java.sql.Date sqldate = new java.sql.Date(today.getTimeInMillis());\n data.setGiorno(sqldate.toString());\n\n data.setDay(i);\n data.setMonth(today.get(Calendar.MONTH) + 1);\n\n data.setDay_of_week(today.get(Calendar.DAY_OF_WEEK));\n Date date = today.getTime();\n String day_name = sdf.format(date);\n data.setDay_name(day_name);\n data.setMonth_name(sdfMonth.format(date));\n\n int indice;\n\n if (!attivitaMensili.isEmpty()) {\n if ((indice = attivitaMensili.indexOf(data)) > -1) {\n OrariAttivita temp = attivitaMensili.get(indice);\n if (temp.getOre_totali() == 0.5) {\n int occurence = Collections.frequency(attivitaMensili, temp);\n if (occurence == 2) {\n for (OrariAttivita other : attivitaMensili) {\n if (other.equals(temp) && other.getCommessa() != temp.getCommessa()) {\n data.setOtherHalf(other);\n data.getOtherHalf().setModifica(true);\n }\n }\n\n }\n }\n data.setFromOld(temp);\n data.setModifica(true);\n }\n }\n isFerie(data);\n\n\n //Aggiungi la data alla lista\n days.add(data);\n\n //Aggiugni un giorno alla data attuale\n today.add(Calendar.DATE, 1);\n }\n\n today.setTime(actualDate);\n\n mCalendarAdapter.notifyDataSetChanged();\n mCalendarList.setAdapter(mCalendarAdapter);\n showProgress(false);\n }", "@DISPID(57)\r\n\t// = 0x39. The runtime will prefer the VTID if present\r\n\t@VTID(55)\r\n\tint actualRunTime_Days();", "@java.lang.Override public int getDayValue() {\n return day_;\n }", "public void setNoOfDays (java.lang.Integer noOfDays) {\n\t\tthis.noOfDays = noOfDays;\n\t}", "public void setNoOfDays (java.lang.Integer noOfDays) {\n\t\tthis.noOfDays = noOfDays;\n\t}", "public abstract int getDy();", "public void setDay(int day) {\r\n this.day = day;\r\n }", "public void setNumberOfDays(int numberOfDays) {\n this.numberOfDays = numberOfDays;\n }", "DD createDD();", "public int getDay() {\n\t\treturn day;\n\t}", "public int getDay() {\n\t\treturn day;\n\t}", "public int getDay() {\n\t\treturn day;\n\t}", "public Date getDay() {\r\n return day;\r\n }", "public Date getDay() {\r\n return day;\r\n }", "public Date getDay() {\r\n return day;\r\n }", "public Date getDay() {\r\n return day;\r\n }", "public Date getDay() {\r\n return day;\r\n }", "public void setUDays(int days){\n \tuDays = days;\n }", "Date computeDays(Date d, int days){\n d.setTime(d.getTime() + days*1000*60*60*24);\n return d;\n }", "@Override\n\tpublic void setDurchmesser(int d) {\n\n\t}", "public void setPresentDays(Integer presentDays)\r\n/* 53: */ {\r\n/* 54:55 */ this.presentDays = presentDays;\r\n/* 55: */ }", "public ObservableList<Date> getStudentDays(int studentID);", "public int getDay() {\n\t\treturn this.day;\n\t}", "public int getDay() {\n\t\treturn this.day;\n\t}", "public DispenserFactory() {\n log = LogManager.getLogger(DispenserFactory.class.getName());\n dispensers = new LinkedHashMap<String, Dispenser>();\n addDispenser(\"exp\" , \"Expander\" );\n addDispenser(\"intexp\" , \"IntegerExpander\" );\n addDispenser(\"modo\" , \"ModoMeter\" );\n addDispenser(\"monexp\" , \"MonotoneExpander\" );\n addDispenser(\"perm\" , \"Permutator\" );\n addDispenser(\"range\" , \"RangeDispenser\" );\n }", "@Override\n public String toString() {\n\treturn Slot.DAYS[day] + start.toString() + \"-\" + end.toString() + \":\" + venue;\n }", "public int getUDays() {\n return uDays;\n }", "public java.lang.Integer getBillCycleDay() {\n return billCycleDay;\n }", "public int calcDays() {\n\t\tint days = day-1;\r\n\t\tdays += ((month-1)*30);\r\n\t\tdays += ((year -2000) * (12*30));\r\n\t\treturn days;\r\n\t}", "public DSSValue call(DSSValue... args){\r\n //args[0].add(args[1]);\r\n Date date = new Date(args[0].toLong());\r\n int days = args[1].toInt();\r\n Calendar cal = Calendar.getInstance();\r\n cal.setTime(date);\r\n cal.add(Calendar.DAY_OF_MONTH, days);\r\n \r\n Date newDate = cal.getTime();\r\n //System.out.println(\"addDays \"+newDate.toString());\r\n return DSSValueFactory.getDSSValue(newDate);\r\n }", "@Override\n public Date generate() {\n int year = 2000 + Rng.instance().nextInt(20);\n int date = Rng.instance().nextInt(28) + 1;\n int month = Rng.instance().nextInt(10) + 1;\n\n Calendar calendar = Calendar.getInstance();\n calendar.set(year, month, date);\n\n return calendar.getTime();\n }" ]
[ "0.5939649", "0.5782983", "0.5732747", "0.57224", "0.56892115", "0.5627462", "0.5582412", "0.55741113", "0.5568174", "0.55254006", "0.550635", "0.55055565", "0.54535896", "0.54507", "0.544911", "0.5448554", "0.54367036", "0.5416804", "0.5404859", "0.5400663", "0.53748256", "0.5364225", "0.53550386", "0.5340124", "0.5339629", "0.53335", "0.53292614", "0.53162944", "0.53152204", "0.5300326", "0.5300228", "0.528888", "0.5278201", "0.5277982", "0.5265488", "0.52634275", "0.52569133", "0.5250423", "0.5244045", "0.52091277", "0.51761925", "0.51747173", "0.51614004", "0.5161276", "0.5144366", "0.51296794", "0.5124701", "0.5120858", "0.51191294", "0.5116221", "0.51096934", "0.5092", "0.50902754", "0.5088897", "0.5086215", "0.50762606", "0.50755924", "0.5072224", "0.5070443", "0.5053048", "0.5038223", "0.50293404", "0.50258625", "0.50236773", "0.50236773", "0.5017866", "0.50167066", "0.50033635", "0.5003274", "0.4988828", "0.4987444", "0.4982586", "0.4973064", "0.49678314", "0.49678314", "0.49605098", "0.49474087", "0.49462184", "0.49305144", "0.4914738", "0.4914738", "0.4914738", "0.49042547", "0.49042547", "0.49042547", "0.49042547", "0.49042547", "0.4904241", "0.48985708", "0.48869145", "0.48854277", "0.4882268", "0.48797688", "0.48797688", "0.48763207", "0.48709366", "0.48657566", "0.4850331", "0.4847552", "0.48473096", "0.4842569" ]
0.0
-1
This flag (default is false) tells to create separated transaction for each new day. This allows to insert data for long terms without overloading the database write buffer.
@Param public boolean isDayTx() { return dayTx; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean createTransaction() {\n\t\t\treturn false;\n\t\t}", "public boolean insertDateToDB() {\n return false;\n }", "public boolean flushTransactions() {\n return true;\n }", "public void transactionStarted() {\n transactionStart = true;\n }", "@Override\n public void beginDatabaseBatchWrite() throws BlockStoreException {\n if (!autoCommit) {\n return;\n }\n if (instrument)\n beginMethod(\"beginDatabaseBatchWrite\");\n\n batch = db.createWriteBatch();\n uncommited = new HashMap<ByteBuffer, byte[]>();\n uncommitedDeletes = new HashSet<ByteBuffer>();\n utxoUncommittedCache = new HashMap<ByteBuffer, UTXO>();\n utxoUncommittedDeletedCache = new HashSet<ByteBuffer>();\n autoCommit = false;\n if (instrument)\n endMethod(\"beginDatabaseBatchWrite\");\n }", "@Override\r\n\tprotected boolean isAutoCommit() {\r\n\t\tif ((consistentRegionContext != null) || (transactionSize > 1)\r\n\t\t\t\t|| (commitInterval > 0) || (commitOnPunct)) {\r\n\t\t\t// Set automatic commit to false when transaction size is more than\r\n\t\t\t// 1 or it is a consistent region or commit on punct is enabled.\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "@Override\n\tpublic boolean supportsTransactions() {\n\n\t\treturn false;\n\t}", "public boolean isTransactionRunning();", "public boolean use1PcForAutoCommitTransactions() {\n return use1PcForAutoCommitTransactions;\n }", "private void generateTrades() {\n\t\tSystem.out.println(\"\\nGenerating fake trade records for stock: \" + stockSymbol);\n Random rd = new Random();\n \n for (int i = 0; i < 5; i++) {\n // Create arbitrary timestamp and TradeRecord data \n \t// within the last 20 minutes\n \n int minutes = rd.nextInt(21);\n int sharesQty = rd.nextInt(100) + 1;\n boolean isBuy = rd.nextBoolean();\n double price = (rd.nextDouble() + 0.1) * 100;\n // truncate price to 2 decimal places\n String tmpPrc = String.format(Locale.ENGLISH, \"%.2f\", price);\n price = Double.parseDouble(tmpPrc);\n TradeRecordType indicator = isBuy ? TradeRecordType.BUY : TradeRecordType.SELL;\n \n Calendar cal = Calendar.getInstance();\n cal.add(Calendar.MINUTE, -minutes);\n Date date = cal.getTime();\n \n // Create and save fake trade record\n TradeRecord rec = new TradeRecord(date, sharesQty, indicator, price);\n System.out.println(rec);\n this.stockTrades.put(date, rec);\n }\n }", "protected abstract Transaction createAndAdd();", "public DBMaker disableTransactions() {\n this.disableTransactions = true;\n return this;\n }", "public boolean transactionStarted();", "void addTransaction(Transaction transaction, long timestamp) throws TransactionNotInRangeException;", "public static void createTransaction() throws IOException {\n\t\t\n\t\tDate date = new Date((long) random(100000000));\n\t\tString date2 = \"'19\" + date.getYear() + \"-\" + (random(12)+1) + \"-\" + (random(28)+1) + \"'\";\n\t\tint amount = random(10000);\n\t\tint cid = random(SSNmap.size()) + 1;\n\t\tint vid = random(venders.size()) + 1;\n\t\t\n\t\twhile(ownership.get(cid) == null)\n\t\t\tcid = random(SSNmap.size()) + 1;\n\t\tString cc = ownership.get(cid).get(random(ownership.get(cid).size()));\n\t\t\n\t\twriter.write(\"INSERT INTO Transaction (Id, Date, vid, cid, CCNum, amount) Values (\" + tid++ +\", \" \n\t\t\t\t+ date2 + \", \" + vid + \", \" + cid + \", '\" + cc + \"', \" + amount + line);\n\t\twriter.flush();\n\t}", "boolean isAutoCommit();", "public void saveOrderDayInfos(OrderDayInfo[] orderDayInfos) {\n\t\ttry {\r\n\t\t\tgetSqlMapClientTemplate().getSqlMapClient().startBatch();\r\n\r\n\t\t\tfor(int i = 0;i < orderDayInfos.length;i++){\r\n\t\t\t\t OrderDayInfo orderDayInfo = orderDayInfos[i];\r\n\t\t\t\t\r\n\t\t\t\t\tLong id = orderDayInfo.getId(); \r\n\t\t\t\t\tint dayTimes = orderDayInfo.getAdDayTimes().intValue();\r\n\t\t\t\t\tboolean isNew = (id == null || id.longValue() == 0) ? true : false;\r\n\t\t\t\t\tint need=orderDayInfo.getNeedPublish().intValue();\r\n\t\t\t\t\t\r\n//\t\t\t\t\tSystem.out.println(\"saveOrderDayInfos isNew >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>needCal>>>>>>\" + isNew);\r\n//\t\t\t\t\tSystem.out.println(\"saveOrderDayInfos dayTimes >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>needCal>>>>>>\" + dayTimes);\r\n//\t\t\t\t\tSystem.out.println(\"saveOrderDayInfos need >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>needCal>>>>>>\" + need);\r\n\t\t\t\t\tif (isNew && dayTimes > 0&& need!=1) {\r\n\t\t\t\t\t\t getSqlMapClientTemplate().getSqlMapClient().insert(\"addOrderDayInfo\", orderDayInfo);\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 for(int i = 0;i < orderDayInfos.length;i++){\r\n\t\t\t\tOrderDayInfo orderDayInfo = orderDayInfos[i];\r\n\t\t\t\t \r\n\t\t\t\tLong id = orderDayInfo.getId();\r\n\t\t\t\tint dayTimes = orderDayInfo.getAdDayTimes().intValue();\r\n\t\t\t\tboolean isNew = (id == null || id.longValue() == 0) ? true\r\n\t\t\t\t\t\t: false;\r\n\r\n\t\t\t\tif (!isNew && dayTimes == 0) {\r\n\t\t\t\t\tgetSqlMapClientTemplate().getSqlMapClient().update(\r\n\t\t\t\t\t\t\t\"deleteOrderDayInfo\", id);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\t\t\t\r\n\t\t\t\r\n\t\t\tfor(int i = 0;i < orderDayInfos.length;i++){\r\n\t\t\t\t \tOrderDayInfo orderDayInfo = orderDayInfos[i];\r\n\t\t\t\t\tLong id = orderDayInfo.getId();\r\n\t\t\t\t\tint dayTimes = orderDayInfo.getAdDayTimes().intValue();\r\n\t\t\t\t\tboolean isNew = (id == null || id.longValue() == 0) ? true : false;\t\t\t\t \r\n\t\t\t\t \r\n\t\t\t\t\tif (!isNew && dayTimes > 0) {\r\n\t\t\t\t\t\tgetSqlMapClientTemplate().getSqlMapClient().update(\"updateOrderDayInfo\", orderDayInfo);\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t}\t\r\n\t\t\t//updateDayInfo\r\n\t\t\tfor(int i = 0;i < orderDayInfos.length;i++){\r\n\t\t\t\t OrderDayInfo orderDayInfo = orderDayInfos[i];\r\n//\t\t\t\t System.out.println(orderDayInfo.getDayInfo().getId()+\"???\"+orderDayInfo.getDayInfo().getUsed());\r\n\t\t\t\t if(orderDayInfo.getNeedPublish().intValue()!=1)\r\n\t\t\t\t\t \tgetSqlMapClientTemplate().getSqlMapClient().update(\"updateDayInfo-saveOrderDetail\", orderDayInfo.getDayInfo());\r\n\t\t\t}\r\n\t\t\tgetSqlMapClientTemplate().getSqlMapClient().executeBatch();\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "void addToBatch(String[] values) {\n if (values.length != 16) {\n logger.info(\"Incorrect format for insert query\");\n return;\n }\n\n try {\n batchPreparedStmt.clearParameters();\n DateFormat format = new SimpleDateFormat(\"yyyyMMdd/HHmm\");\n for (int i = 0, j = 1; i < values.length; ++i, ++j) {\n if (i == 1) {\n batchPreparedStmt.setTimestamp(j, new java.sql.Timestamp(format.parse(values[i]).getTime()));\n } else if (i == 0) {\n batchPreparedStmt.setString(j, values[i]);\n } else {\n batchPreparedStmt.setDouble(j, Double.parseDouble(values[i]));\n }\n }\n batchPreparedStmt.addBatch();\n currBatchSize--;\n if (currBatchSize <= 0) {\n this.commitBatch();\n }\n } catch (SQLException e) {\n logger.log(Level.WARNING, \"SQLException \", e.getMessage());\n } catch (ParseException e) {\n logger.log(Level.WARNING, \"ParseException \", e.getMessage());\n }\n }", "public boolean isRunInBackgroundTransaction () {\n return runInBackgroundTransaction;\n }", "public TransactionBuilder setTimestamp(long timestamp);", "protected void genObjectsTx(GenCtx ctx, Date day)\n\t throws GenesisError\n\t{\n\t\tgenObjects(ctx, day);\n\n\t\t//~: mark that day\n\t\tfor(Entry e : getEntries())\n\t\t\tif(e.getGenesis() instanceof DaysGenPart)\n\t\t\t\t((DaysGenPart)e.getGenesis()).markDayGenerated(ctx);\n\t}", "private boolean insertTransactions(String filename) {\n\n login = HibernateDaoFactory.DEFAULT.getAnalysisDatabaseLogin();\n\n mysqlDb = HibernateDaoFactory.DEFAULT.getAnalysisDatabaseName();\n mysqlUser = login.get(\"user\");\n mysqlPwd = login.get(\"password\");\n\n Runtime runTime = Runtime.getRuntime();\n\n String[] commands = new String[]{MYSQL, mysqlDb, userFlag + mysqlUser, pwdFlag + mysqlPwd,\n executeFlag, sourceCommand + filename};\n String[] commandsToPrint = new String[]{MYSQL, mysqlDb,\n userFlag + mysqlUser, pwdFlag + \"*****\",\n executeFlag, sourceCommand + filename};\n try {\n logger.info(\"Beginning insert of transactions. Command Params:\"\n + Arrays.toString(commandsToPrint));\n\n Process proc = runTime.exec(commands);\n\n StreamGobbler errorGobbler = new StreamGobbler(proc.getErrorStream(), \"ERROR\");\n\n StreamGobbler outputGobbler = new StreamGobbler(proc.getInputStream(), \"OUTPUT\");\n\n errorGobbler.start();\n outputGobbler.start();\n\n try {\n if (proc.waitFor() == 1) {\n logger.error(\"Return code indicates error in running the DBMerge mysql \"\n + \"process\");\n return false;\n }\n } catch (InterruptedException exception) {\n logger.error(\"Interrupted Exception while running the DBMerge mysql process.\",\n exception);\n return false;\n }\n\n } catch (IOException exception) {\n logger.error(\"Attempt to spawn a DBMerge mysql process failed for file: \"\n + filename, exception);\n return false;\n }\n return true;\n }", "@Override\n public boolean createSalesOrder(SalesOrderBean salesoder) {\n salesoder.setGendate(C_Util_Date.generateDate());\n return in_salesorderdao.createSalesOrder(salesoder);\n }", "@Override\r\n public void newTransaction(int vehicleID, int customerID, int employeeID, int locationID, String date) {\n transactionDao.newTransaction(vehicleID, customerID, employeeID, locationID, date); \r\n }", "@Override\n public void run() {\n addDelay();\n\n AppDatabase appDatabase = AppDatabase.getInstance(appContext, executors);\n\n List<WeatherEntry> weathers = DataGenerator.generateWeathers();\n\n Log.d(TAG, \"Codelab AppDatabase insertAll - begin\");\n\n insertAll(appDatabase, weathers);\n\n // notify that the database was created and it's ready to be used\n appDatabase.setDatabaseCreated();\n }", "public TransactionBuilder enableBatchLoading();", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\tfor(int i = 0; i < 1000; i++) {\r\n\t\t\t\t\tfinal BasicDBObject doc = new BasicDBObject(\"_id\", i);\r\n\t\t\t\t\tdoc.put(\"ts\", new Date());\r\n\t\t\t\t\tcoll.insert(doc);\r\n\t\t\t\t}\r\n\t\t\t}", "@Override\n public boolean createTelephoneSalesOrder(\n TelephoneSalesOderBean telephonesalesorder) {\n telephonesalesorder.setGendate(C_Util_Date.generateDate());\n return in_telephonesalesdao.createTelephoneSalesOrder(telephonesalesorder);\n }", "public boolean addTransaction(Transaction transaction) throws SQLException {\n\t\t\n\t\ttry (PreparedStatement statement = conn.prepareStatement(\"INSERT INTO transaction(Date, Type, Category, Amount) VALUES (?, ?, ?, ?)\")) {\n\t\t\tstatement.setDate(1, transaction.date());\n\t\t\tstatement.setString(2, transaction.type());\n\t\t\tstatement.setString(3, transaction.category());\n\t\t\tstatement.setDouble(4, transaction.amount());\n\t\t\treturn statement.executeUpdate() != 0;\n\t\t}\n\t}", "public void testSaveTableByTimeAllTransactional() throws Exception {\n\t\tfailed = false;\n\t\tlogger.info(\"loop test 1\");\n\n\t\tExecutorService executor = Executors.newFixedThreadPool(nThreads * 2);\n\t\tList<Callable<Object>> tasks1 = insertTasks();\n\n\t\tList<Callable<Object>> tasks2 = updateTasksPassing();\n\n\t\tCollection<Callable<Object>> tasks = new ArrayList<>();\n\t\ttasks.addAll(tasks1);\n\t\ttasks.addAll(tasks2);\n\n\t\trunTasks(executor, tasks);\n\n\t\tshutdownExecutor(executor);\n\n\t\tlogger.info(\"I have {} Tables saved\", getCountTablePassing());\n\t}", "public Transaction startTransaction(){\n\t\ttr = new Transaction(db);\n\t\treturn tr;\n\t}", "public void forceCommitTx()\n{\n}", "public void setTransactionUIShowMore(boolean flag) {\n SharedPreferences preference=m_context.getSharedPreferences(AppSectionsConstant.Storage.PREFERENCE_CONF_SETTING, Context.MODE_PRIVATE);\n preference.edit().putBoolean(KEY_TRANSACTIONUISHOWMORE, flag).commit();\n refresh();\n }", "public boolean generateSchedule(){\r\n return true;\r\n }", "private void insertNodesCatalogTransactionsPendingForPropagation(NodesCatalogTransaction transaction) throws CantInsertRecordDataBaseException {\n\n /*\n * Save into the data base\n */\n getDaoFactory().getNodesCatalogTransactionsPendingForPropagationDao().create(transaction);\n }", "@Override\n @Transactional\n public void addBulkInsertsAfterExtraction() {\n List<ScrapBook> scrapBooks = new ArrayList<ScrapBook>();\n boolean jobDone = false;\n boolean pause = false;\n while (!jobDone) {\n pause = false;\n int lineCount = 0;\n while (!pause) {\n ++lineCount;\n if (lineCount % 30 == 0) {\n scrapBooks = springJdbcTemplateExtractor.getPaginationList(\"SELECT * FROM ScrapBook\", 1, 30);\n pause = true;\n }\n }\n //convert scrapbook to book and insert into db\n convertedToBookAndInsert(scrapBooks);\n // delete all inserted scrapbooks\n springJdbcTemplateExtractor.deleteCollection(scrapBooks);\n scrapBooks = null;\n if (0 == springJdbcTemplateExtractor.findTotalScrapBook()) {\n jobDone = true;\n }\n }\n }", "public boolean insertDate(int greensid, int orderid, int count) {\n\t\tString sql = \"insert into orderdetail values(null,?,?,?,?)\";\n\t\treturn dbManager.execUpdate(sql, greensid, orderid, count, 1);\n\t}", "protected void reActivateDatabase(boolean deleteDb, boolean useBatchInserter, boolean autoTx) throws Exception {\n shutdownDatabase(deleteDb);\n Map<String, String> config = NORMAL_CONFIG;\n String largeMode = System.getProperty(\"spatial.test.large\");\n if (largeMode != null && largeMode.equalsIgnoreCase(\"true\")) {\n config = LARGE_CONFIG;\n }\n //graphDb = new TestGraphDatabaseFactory().setFileSystem( fileSystem ).newImpermanentDatabase( getNeoPath().getAbsolutePath() );\n graphDb = new GraphDatabaseFactory().newEmbeddedDatabaseBuilder(getNeoPath().getAbsolutePath()).setConfig( config ).newGraphDatabase();\n\n if (autoTx) {\n // with the batch inserter the tx is a dummy that simply succeeds all the time\n tx = graphDb.beginTx();\n }\n }", "@Override\n public void startTx() {\n \n }", "@Override\n public boolean createPettyCashJournal(PettyCashBean pettycashjournal) {\n pettycashjournal.setGendate(C_Util_Date.generateDate());\n return in_pettycashjournaldao.createPettyCashJournal(pettycashjournal);\n }", "int insertSelective(Transaction record);", "@Override\r\n\t\tpublic boolean getAutoCommit() throws SQLException {\n\t\t\treturn false;\r\n\t\t}", "public static void habilitarTransaccionManual() {\n try {\n con.setAutoCommit(false);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public boolean addPerformanceTransaction(PerformanceTransaction tr, int iteration, boolean overwrite){\n\t\tif(tr.getName().isEmpty()){ \n\t\t\treturn false;\n\t\t}\n\n\t\tif(!overwrite){\n\t\t\t//Reject transactions with same name as already exists\n\t\t\tif(this.getPerformanceTransactionByName(tr.getName(), iteration) != null) {\t\n\t\t\t\treturn false;\n\t\t\t}\t\t\t\t\n\t\t}else{\n\t\t\tthis.removePerformanceTransactionbyName(tr.getName(), iteration);\n\t\t}\n\t\t\n\t\tif(!transactions.containsKey(Integer.valueOf(iteration))){\n\t\t\tthis.transactions.put(Integer.valueOf(iteration), new ArrayList<PerformanceTransaction>());\n\t\t}\n\t\ttransactions.get(Integer.valueOf(iteration)).add(tr);\n\t\t\t\t\n\t\treturn true;\n\t}", "protected boolean isAutoFlushEnabled() {\r\n\t\treturn false;\r\n\t}", "public boolean insertMethod(Scanner scanner,Connection connection,Logger logger) {\n\t\tTransaction trxn = new Transaction();\n\t\tMySQLAccess create_Query=new MySQLAccess();\n\t\tboolean r = false;\n\t\ttry {\n\n\t\t\tSystem.out.println(\"-------Creating a Transaction-------\");\n\t\t\tSystem.out.println(\"Enter ID\");\n\t\t\ttrxn.setID(scanner.next());\n\t\t\tSystem.out.println(\"Enter Name_on_card\");\n\t\t\ttrxn.setNameOnCard(scanner.next()); \n\t\t\t//trxn.setCardNumber(CardNumber);\n\t\t\tSystem.out.println(\"CardNumber\");\n\t\t\tString CardNumber = scanner.next();\n\t\t\ttrxn.setCardNumber(CardNumber);\n\t\t\tSystem.out.println(\"UnitPrice\");\n\t\t\t//String up = scanner.next();\n\t\t\t\n\t\t\ttrxn.setUnitPrice(Integer.parseInt(scanner.next()) );\n\t\t\tSystem.out.println(\"Quantity\");\n\t\t\ttrxn.setQuantity(Integer.parseInt(scanner.next()));\n\t\t\tSystem.out.println(\"TotalPrice\");\n\t\t\ttrxn.setTotalPrice(Float.parseFloat(scanner.next()));\n\t\t\tSystem.out.println(\"ExpDate\");\n\t\t\tString ExpDate = scanner.next();\n\t\t\t\n\t\t\t//System.out.println(ExpDate.length());\n\t\t\t//System.out.println(ExpDate.lastIndexOf(\"/\"));\n\t\t\tint flag =0;\n\t\t\tif (ExpDate.length()== 7 && ExpDate.lastIndexOf(\"/\")==2)\n\t\t\t{\n\t\t\t\tint MM = Integer.parseInt(ExpDate.substring(0, ExpDate.lastIndexOf(\"/\")));\n\t\t\t\tint YYYY = Integer.parseInt(ExpDate.substring(ExpDate.lastIndexOf(\"/\")+1,ExpDate.length() ));\n\t\t\t\tSystem.out.println(MM);\n\t\t\t\tSystem.out.println(YYYY);\n\t\t\t\tif (MM>0 && YYYY>2015 && YYYY<2032 && MM<13)\n\t\t\t\t{\n\t\t\t\t\t//System.out.println(\"correct\");\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"Incorrect Date Format\");\n\t\t\t\t\tflag = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"Incorrect Date Format\");\n\t\t\t\tflag = 1;\n\t\t\t}\n\t\t\ttrxn.setExpDate(ExpDate);\t\n\t\t\t//System.out.println(\"CreatedOn\");\n\t\t\tString CreatedOn = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\").format(Calendar.getInstance().getTime());\n\t\t\ttrxn.setCreatedOn(CreatedOn);\n\t\t\t//System.out.println(\"CreatedBy\");\n\t\t\t//statement.setString(9, System.getProperty(\"user.name\"));\n\t\t\ttrxn.setCreatedBy(System.getProperty(\"user.name\"));\n\t\t\t//System.out.println(\"Credit card type(1.Visa/2.American Express/3.Mastercard)\");\n\t\t\t// String cardtype = scanner.next();\n\t\t\t//\n\t\t\tString cardtype = \"Unknown\";\n\t\t\tif (CardNumber.length() == 16) {\n\t\t\t\tif (CardNumber.startsWith(\"51\") || CardNumber.startsWith(\"52\") || CardNumber.startsWith(\"53\")\n\t\t\t\t\t\t|| CardNumber.startsWith(\"54\") || CardNumber.startsWith(\"55\")) {\n\t\t\t\t\tcardtype = \"Mastercard\";\n\n\t\t\t\t}\n\t\t\t\tif (CardNumber.startsWith(\"4\")) {\n\t\t\t\t\tcardtype = \"Visa\";\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (CardNumber.length() == 15 && (CardNumber.startsWith(\"34\") || (CardNumber.startsWith(\"37\")))) {\n\t\t\t\t\tcardtype = \"American Express\";\n\t\t\t\t}\n\n\t\t\t}\n\t\t\ttrxn.setCardtype(cardtype);\n\t\t\t//System.out.println(trxn);\n\n\t\t\t\n\t\t\t//statement.setString(10, cardtype);\n\t\t\t\n/*\t\t\tString DisplaysqlID = \"select * from transaction where ID =\"+ID;\n\t\t\tConnection con1 = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/tutorial1\", \"root\", \"root\");\n\t\t\tPreparedStatement stmt1 = con1.prepareStatement(DisplaysqlID);\t\n\t\t\tSystem.out.println(DisplaysqlID);\n\t\t\tResultSet resultSet = stmt1.executeQuery(DisplaysqlID);\n\t\t\tif(resultSet.next())\n\t\t\t\tflag = 2;\n\t\t\t\n\t\t\t// the validation of fields if empty is taken care by using Scanner.next()\n\t\t\tif (flag == 0)\n\t\t\t{\n\t\t\tint rowsInserted = statement.executeUpdate();\n\t\t\tif (rowsInserted == 1) {\n\t\t\t\tSystem.out.println(\"Your data has been inserted\");\n\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(flag==2)\n\t\t\t\t\tSystem.out.println(\"User already exists\");\n\t\t\t\telse\n\t\t\t\t\tSystem.out.println(\"Please once again check your data\");\n\t\t\t}\n\t\t\t//scanner.close();\n\t\t\tcon.close();*/\n\t\t\t r = create_Query.createTransaction(trxn,connection,logger);\n\t\t} catch (InputMismatchException e) {\n\t\t\tSystem.out.println(\"Enter Valid Input\");\n\t\t\tlogger.severe(e.getMessage());\n\t\t}\n\t\t//System.out.println(trxn);\n\t\treturn r;\n\n\t}", "public boolean beginTransaction() {\n boolean result = false;\n if (_canDisableAutoCommit) {\n try {\n _connection.setAutoCommit(false);\n result = true;\n } catch (SQLException e) {\n Log.warning(\"Transactions not supported\", this, \"startTransaction\");\n _canDisableAutoCommit = false;\n }\n }\n return result;\n }", "public void testSaveTableByTimeWithTxTemplateInTest() throws Exception {\n\t\tfailed = false;\n\t\tlogger.info(\"loop test 2\");\n\n\t\tExecutorService executor = Executors.newFixedThreadPool(nThreads * 2);\n\t\tList<Callable<Object>> tasks1 = insertTasks();\n\n\t\tList<Callable<Object>> tasks2 = updateTasksFailing();\n\n\t\tCollection<Callable<Object>> tasks = new ArrayList<>();\n\t\ttasks.addAll(tasks1);\n\t\ttasks.addAll(tasks2);\n\n\t\trunTasks(executor, tasks);\n\n\t\tshutdownExecutor(executor);\n\t\tlogger.info(\"I have {} Tables saved\", getCountTableFailing());\n\t}", "Transaction createTransaction();", "public void setRunInBackgroundTransaction (boolean runInBackgroundTransaction) {\n //this.runInBackgroundTransaction = runInBackgroundTransaction;\n this.runInBackgroundTransaction = false; // PDTool only supports foreground processing. \n }", "public boolean isPersistNbt() {\n return false;\n }", "public boolean is_global_transaction(){\n\t\treturn transaction_type == TransactionType.GLOBAL;\n\t}", "public void testSaveTableByTimeWithTxTemplateInService() throws Exception {\n\t\tfailed = false;\n\t\tlogger.info(\"loop test 3\");\n\n\t\tExecutorService executor = Executors.newFixedThreadPool(nThreads * 2);\n\t\tList<Callable<Object>> tasks1 = insertTasks();\n\n\t\tList<Callable<Object>> tasks2 = updateTasksFailing2();\n\n\t\tCollection<Callable<Object>> tasks = new ArrayList<>();\n\t\ttasks.addAll(tasks1);\n\t\ttasks.addAll(tasks2);\n\n\t\trunTasks(executor, tasks);\n\n\t\tshutdownExecutor(executor);\n\t\tlogger.info(\"I have {} Tables saved\", getCountTableServiceFailing());\n\t}", "private Boolean persistRecords() {\n\t\t//Declarations\n\t\tBoolean persisted = false;\n\t\t\n\t\ttry{\t\t\t\t\t\n\t\t\t//Create the DB Handler\n\t\t\tDBHandler dbHandler = new DBHandler();\t\t\t\n\t\t\tDate date = new Date();\n\t\t\t\t\t\t\n\t\t\t//Set the updated time\n\t\t\t_medicalData.setUpdatedOn(date.toString());\n\t\t\t\n\t\t\t//Store the data to data store\n\t\t\tpersisted = dbHandler.storeData(_medicalData);\t\t\t\t\t\t\n\t\t}catch(Exception ex){\n\t\t\tpersisted = false;\n\t\t}\n\t\t\n\t\treturn persisted;\t\t\n\t}", "@Override\n\tpublic boolean insertOne(finalDataBean t) throws Exception {\n\t\treturn false;\n\t}", "public boolean insertNews() {\n\t\treturn false;\n\t}", "public Mono<Boolean> addTransaction(Publisher<Transaction> transactionPublisher, long now) {\n LOGGER.debug(\"Add transaction to statistics store if valid before {} \",now);\n return store.save(Mono.from(transactionPublisher), now);\n }", "private void insertTestTransactionsForAccount(SmsAccount smsAccount) {\n\n\t\tint g = 10000;\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tSmsTransaction smsTransaction = new SmsTransaction();\n\t\t\tsmsTransaction.setCreditBalance(10L);\n\t\t\tsmsTransaction.setSakaiUserId(\"sakaiUserId\" + i);\n\t\t\tsmsTransaction.setTransactionDate(new Date(System\n\t\t\t\t\t.currentTimeMillis()\n\t\t\t\t\t+ g));\n\t\t\tsmsTransaction.setTransactionTypeCode(\"TC\");\n\t\t\tsmsTransaction.setTransactionCredits(666);\n\t\t\tsmsTransaction.setSmsAccount(smsAccount);\n\t\t\tsmsTransaction.setSmsTaskId(1L);\n\t\t\tg += 1000;\n\t\t\thibernateLogicLocator.getSmsTransactionLogic()\n\t\t\t\t\t.insertReserveTransaction(smsTransaction);\n\t\t}\n\t}", "public void generateImpatedRecords ()\r\n\t{\n\t\tRequest req = table.createRequest();\r\n\t\treq.setXPathFilter(path_to_id.format()+\"='\" + id +\"'\");\r\n\t\tRequestResult res = req.execute();\r\n\t\tshow(\"got results \" + res.getSize() );\r\n\t\tAdaptation ada = res.nextAdaptation();\r\n\t\tshow (\"STARTDATE: \" + startdate + \" ENDDATE: \" + enddate);\r\n\t\tshow(\"________________________________________________\");\r\n\t\twhile (ada!=null)\r\n\t\t{ \r\n\t\t\t\r\n\t\t\tDate adaStartDate = ada.getDate(path_to_start);\r\n\t\t\tDate adaEndDate = ada.getDate(path_to_end);\r\n\t\t\t//check im not me!\r\n\t\t\tif (!(ada.getOccurrencePrimaryKey().format().equals(newRecord.getOccurrencePrimaryKey().format())))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t// the record has been updated but date has not changed\r\n\t\t\t\tif (enddate!=null&&adaEndDate!=null&&(adaStartDate.equals(startdate)&&adaEndDate.equals(enddate)))\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\tshow(\"The Record needs Spliting\");\r\n\t\t\t\t\trecordToSplit = ada;\r\n\t\t\t\t\tnewEndDate = addDays(startdate,-1);\r\n\t\t\t\t\tbeforeRecord = ada;\r\n\t\t\t\t\tnewStartDate = addDays(enddate,+1);\r\n\t\t\t\t\tafterRecord = ada;\r\n\t\t\t\t}\r\n\t\t\t\telse if (enddate!=null&&adaEndDate!=null&&(adaStartDate.before(startdate)&&adaEndDate.after(enddate)))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tshow(\"The Record needs Spliting\");\r\n\t\t\t\t\t\t\trecordToSplit = ada;\r\n\t\t\t\t\t\t\tnewEndDate = addDays(startdate,-1);\r\n\t\t\t\t\t\t\tbeforeRecord = ada;\r\n\t\t\t\t\t\t\tnewStartDate = addDays(enddate,+1);\r\n\t\t\t\t\t\t\tafterRecord = ada;\r\n\t\t\t\t\t\t}\r\n\t\t\t\telse if (adaStartDate == null && adaEndDate == null)\r\n\t\t\t\t{\r\n\t\t\t\t\tshow (\"set end date on existing record\");\r\n\t\t\t\t\tbeforeRecord= ada;\r\n\t\t\t\t\tnewEndDate = addDays (startdate, -1);\r\n\t\t\t\t}\r\n\t\t\t\t\t\telse if (adaStartDate.before(startdate)&& adaEndDate==null)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tshow (\"set end date on existing record\");\r\n\t\t\t\t\t\t\tbeforeRecord= ada;\r\n\t\t\t\t\t\t\tnewEndDate = addDays (startdate, -1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\telse if (adaStartDate.before(startdate) && adaEndDate.after(startdate))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tshow (\"need to move existing end date\");\r\n\t\t\t\t\t\t\tbeforeRecord= ada;\r\n\t\t\t\t\t\t\tnewEndDate = addDays (startdate, -1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse if (enddate!=null&&enddate==null&&adaStartDate.after(enddate))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tshow (\"need to end date new record\");\r\n\t\t\t\t\t\t\tbeforeRecord = newRecord;\r\n\t\t\t\t\t\t\tnewEndDate = addDays(adaStartDate, -1);\r\n\t\t\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\tada = res.nextAdaptation();\r\n\t}\r\n\t\r\n\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "public void addTransaction(Transactions t){\n listOfTransactions.put(LocalDate.now(), t);\n }", "public void createTransaction(Transaction trans);", "void setInsertMode(boolean insertMode) {\r\n this.insertMode = insertMode;\r\n }", "public static boolean addFile(TranslationFile bf) {\n System.out.println(\"File added to database.\");\n DatabaseOperations.addOrUpdateFileName(bf.getFileID(), bf.getFileName());\n String sql = \"INSERT OR REPLACE INTO corpus1(id, fileID, fileName, thai, english, committed, removed, rank) VALUES(?,?,?,?,?,?,?,?)\";\n\n try (Connection conn = DatabaseOperations.connect();\n PreparedStatement pstmt = conn.prepareStatement(sql)) {\n\n conn.setAutoCommit(false);\n\n // this makes sure that the segments in the file, when retrieved from the db, can be ordered in the proper order.\n // simply increments by 1 on each segment. \n int rank = 0;\n // keeps count of the number of segs added so that the SQL can run a batch transaction (which is much more efficient than individual transactions).\n // when i=1000, or at the last segment, the SQL is then run as one batch transaction.\n int i = 0;\n\n for (Segment seg : bf.getActiveSegs()) {\n\n pstmt.setDouble(1, seg.getID());\n pstmt.setDouble(2, seg.getFileID());\n pstmt.setString(3, seg.getFileName());\n pstmt.setString(4, seg.getThai());\n pstmt.setString(5, seg.getEnglish());\n // committed/removed booleans are stored as binary (0 = false, 1 = true)\n pstmt.setInt(6, seg.isCommitted() ? 1 : 0);\n // removed is set to \"false\"\n pstmt.setInt(7, 0);\n pstmt.setInt(8, rank);\n pstmt.addBatch();\n rank++;\n i++;\n\n if (i % 1000 == 0 || i == bf.getActiveSegs().size()) {\n pstmt.executeBatch(); //Execute every 1000 segments.\n }\n }\n\n // resetting counters\n i = 0;\n rank = 0;\n for (Segment seg : bf.getHiddenSegs()) {\n\n pstmt.setDouble(1, seg.getID());\n pstmt.setDouble(2, seg.getFileID());\n pstmt.setString(3, seg.getFileName());\n pstmt.setString(4, seg.getThai());\n pstmt.setString(5, seg.getEnglish());\n // committed/removed booleans are stored as binary (0 = false, 1 = true)\n pstmt.setInt(6, seg.isCommitted() ? 1 : 0);\n // removed is set to \"true\"\n pstmt.setInt(7, 1);\n pstmt.setInt(8, rank);\n pstmt.addBatch();\n rank++;\n i++;\n\n if (i % 1000 == 0 || i == bf.getHiddenSegs().size()) {\n pstmt.executeBatch(); //Execute every 1000 segments.\n }\n }\n conn.commit();\n return true;\n\n } catch (SQLException e) {\n System.out.println(\"AddFileAsBatch: \" + e.getMessage());\n return false;\n }\n }", "protected boolean setDailyTimerSetting(byte[] edt) {return false;}", "public static void benchmarkPrivacyInsertTimeMultipleInsert()\n\t{\n\t\t\n\t\tString sampleInsertSQL \n\t\t\t= \"INSERT INTO attr0EncryptionInfoStorage (nodeGUID, realIDEncryption, subspaceId) VALUES\";\n\t\t\n\t\tConnection myConn = null;\n\t\tStatement statement = null;\n\t\ttry\n\t\t{\n\t\t\tmyConn = dsInst.getConnection();\n\t\t\t\n\t\t\tstatement = (Statement) myConn.createStatement();\n\t\t\t\n\t\t\t\n\t\t\tVector<Double> resultlist = new Vector<Double>();\n\t\t\tRandom rand = new Random(System.currentTimeMillis());\n\t\t\tfor(int i=0; i<100; i++)\n\t\t\t{\n\t\t\t\tString insertSQL = sampleInsertSQL ;\n\t\t\t\t\n\t\t\t\tfor(int j=0; j<5; j++)\n\t\t\t\t{\n\t\t\t\t\tif(j != 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tinsertSQL = insertSQL +\" , \";\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tbyte[] guidBytes = new byte[20];\n\t\t\t\t\trand.nextBytes(guidBytes);\n\t\t\t\t\tString guidString = Utils.byteArrayToHex(guidBytes);\n\t\t\t\t\t\n\t\t\t\t\tbyte[] realIDEncryptionBytes = new byte[128];\n\t\t\t\t\trand.nextBytes(realIDEncryptionBytes);\n\t\t\t\t\tString realIDHex = Utils.byteArrayToHex(realIDEncryptionBytes);\n\t\t\t\t\t\n\t\t\t\t\tint subsapceId = rand.nextInt(3);\n\t\t\t\t\t\n\t\t\t\t\tinsertSQL = insertSQL+ \"(X'\"+guidString+\"' , X'\"+realIDHex\n\t\t\t\t\t\t\t+\"' , \"+subsapceId+\")\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tlong start = System.currentTimeMillis();\n\t\t\t\tstatement.executeUpdate(insertSQL);\n\t\t\t\tlong end = System.currentTimeMillis();\n\t\t\t\t\n\t\t\t\tdouble timeTaken = end-start;\n\t\t\t\tresultlist.add(timeTaken);\n\t\t\t\t\n\t\t\t\ttry \n\t\t\t\t{\n\t\t\t\t\tThread.sleep(100);\n\t\t\t\t} catch (InterruptedException e) \n\t\t\t\t{\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"benchmarkPrivacyInsertTimeMultipleInsert: Insert times \"+\n\t\t\tStatisticsClass.toString(StatisticsClass.computeStats(resultlist)));\n\t\t} catch (SQLException e) \n\t\t{\n\t\t\te.printStackTrace();\n\t\t} finally\n\t\t{\n\t\t\ttry \n\t\t\t{\n\t\t\t\tif( statement != null )\n\t\t\t\t\tstatement.close();\n\t\t\t\t\n\t\t\t\tif( myConn != null )\n\t\t\t\t\tmyConn.close();\n\t\t\t\t\n\t\t\t} catch (SQLException e) \n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public TitanTransaction start();", "private static void createDummyTransactions() {\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 10L, new Transaction(10000d, \"cars\", 0L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 11L, new Transaction(15000d, \"shopping\", 10L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 12L, new Transaction(20000d, \"keys\", 11L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 13L, new Transaction(25000d, \"furniture\", 12L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 14L, new Transaction(30000d, \"keys\", 13L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 15L, new Transaction(40000d, \"cars\", 14L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 16L, new Transaction(50000d, \"cars\", 15L)));\n }", "public void addTXBtoLedger(Transaction tx, int currentTime, boolean isNew)\r\n {\r\n int index;\r\n /*\r\n if the transaction is new it is added to the\r\n transaction set\r\n */\r\n if (isNew)\r\n index = mTransactions.addToSet(tx);\r\n /*\r\n Otherwise, it is reloaded from the transaction set\r\n */\r\n else\r\n index = tx.getIndex();\r\n int ownerIndex = tx.getOwnerIndex();\r\n ((Node) getTG().mNodeSet.getNode(ownerIndex)).addToTXSet(index);\r\n if (index > 0)\r\n {\r\n insert(tx, mTransactions, index, true, currentTime);\r\n }\r\n\r\n }", "@Override\n public boolean generateSalesManagerTask(\n SalesManagerTastBean salesmanagertask) {\n salesmanagertask.setDate1(C_Util_Date.generateDate());\n return in_salesmanagerdao.generateSalesManagerTask(salesmanagertask);\n }", "@Override\n\tpublic boolean isJoinedToTransaction() {\n\t\treturn false;\n\t}", "void readOnlyTransaction();", "void generateSameTX(String name, List<String> types, Settings settings);", "public boolean isNotNullNewBatchCloseEnabled() {\n return genClient.cacheValueIsNotNull(CacheKey.newBatchCloseEnabled);\n }", "void startTransaction();", "Transaction createTransaction(Settings settings);", "@Value.Default\n public int maxTraceEntriesPerTransaction() {\n return 2000;\n }", "public void saveDay() {\n day.setServices(serviciosTotales);\n day.setTasks(tasksTotales);\n\n databaseReference.child(day.getDate() + \"_\" + day.getUserId()).setValue(day);\n Toast.makeText(context, \"Creando archivo para enviar por correo.\", Toast.LENGTH_LONG).show();\n //todo, so far it will keep updating the day\naskPermissions();\n createExcel();\n\n }", "public void PushTransaction(Transaction new_transaction){\n try{\n \n FileWriter fileWriter = new FileWriter(\"C:\\\\Users\\\\cmpun\\\\Desktop\\\\SoftwareEngineeringProject\\\\src\\\\softwareengineeringproject\\\\TransactionLog.txt\", true);\n\n fileWriter.write(new_transaction.Date + \",\" + new_transaction.processed_items + \",\" + new_transaction.Total + \"\\n\");\n \n fileWriter.close();\n\n }catch(Exception E){\n \n System.out.println(\"Unable to enter transaction into Log...\");\n \n }\n \n }", "public static void prepopulateBookingData() {\n // Write to the database on a worker thread (so as not to clog up the main thread)\n databaseExecutor.execute(() -> {\n BookingDao dao = dbInstance.bookingDao();\n\n // Start with a fresh database each load\n dao.deleteAllBookings();\n\n Booking stretchBooking = new Booking.BookingBuilder()\n .withType(\"Stretch Tent\")\n .withFirstName(\"Joe\")\n .withLastName(\"Copping\")\n .withAddress(\"1 Pleasant Drive GT53DP\")\n .withCost(800)\n .withDate(LocalDate.of(2021, 8, 1))\n .withNumDays(5)\n .build();\n dao.insertBooking(stretchBooking);\n\n Booking tipiBooking = new Booking.BookingBuilder()\n .withType(\"Tipi\")\n .withFirstName(\"Jason\")\n .withLastName(\"Hitching\")\n .withAddress(\"76 Inway Drive KL25TP\")\n .withCost(233)\n .withDate(LocalDate.of(2021, 6, 3))\n .withNumDays(10)\n .build();\n dao.insertBooking(tipiBooking);\n\n Booking marqueeBooking = new Booking.BookingBuilder()\n .withType(\"Marquee\")\n .withFirstName(\"Daniel\")\n .withLastName(\"Rose\")\n .withAddress(\"26 Flyway Drive TY5YYH\")\n .withCost(500)\n .withDate(LocalDate.of(2022, 1, 22))\n .withNumDays(2)\n .build();\n dao.insertBooking(marqueeBooking);\n\n Booking marqueeBooking2 = new Booking.BookingBuilder()\n .withType(\"Marquee\")\n .withFirstName(\"Daniel\")\n .withLastName(\"Rose\")\n .withAddress(\"26 Flyway Drive TY5YYH\")\n .withCost(500)\n .withDate(LocalDate.of(2022, 1, 22))\n .withNumDays(2)\n .build();\n dao.insertBooking(marqueeBooking2);\n\n Booking tipiBooking2 = new Booking.BookingBuilder()\n .withType(\"Tipi\")\n .withFirstName(\"Jason\")\n .withLastName(\"Hitching\")\n .withAddress(\"76 Inway Drive KL25TP\")\n .withCost(233)\n .withDate(LocalDate.of(2021, 6, 3))\n .withNumDays(10)\n .build();\n dao.insertBooking(tipiBooking2);\n\n Booking tipiBooking3 = new Booking.BookingBuilder()\n .withType(\"Tipi\")\n .withFirstName(\"Jason\")\n .withLastName(\"Hitching\")\n .withAddress(\"76 Inway Drive KL25TP\")\n .withCost(233)\n .withDate(LocalDate.of(2021, 6, 3))\n .withNumDays(10)\n .build();\n dao.insertBooking(tipiBooking3);\n\n Booking tipiBooking4 = new Booking.BookingBuilder()\n .withType(\"Tipi\")\n .withFirstName(\"Jason\")\n .withLastName(\"Hitching\")\n .withAddress(\"76 Inway Drive KL25TP\")\n .withCost(233)\n .withDate(LocalDate.of(2021, 6, 3))\n .withNumDays(10)\n .build();\n dao.insertBooking(tipiBooking4);\n\n Booking stretchBooking2 = new Booking.BookingBuilder()\n .withType(\"Stretch Tent\")\n .withFirstName(\"Joe\")\n .withLastName(\"Copping\")\n .withAddress(\"1 Pleasant Drive GT53DP\")\n .withCost(800)\n .withDate(LocalDate.of(2021, 8, 1))\n .withNumDays(5)\n .build();\n dao.insertBooking(stretchBooking2);\n\n Booking stretchBooking3 = new Booking.BookingBuilder()\n .withType(\"Stretch Tent\")\n .withFirstName(\"Joe\")\n .withLastName(\"Copping\")\n .withAddress(\"1 Pleasant Drive GT53DP\")\n .withCost(800)\n .withDate(LocalDate.of(2021, 8, 1))\n .withNumDays(5)\n .build();\n dao.insertBooking(stretchBooking3);\n\n });\n }", "@Override\n\tpublic boolean createOrderBill(OrderBill orderBill) {\n\t\treturn false;\n\t}", "public void denda()\n {\n transaksi.setDenda(true);\n }", "@Override\n public void onCreate(@NonNull SupportSQLiteDatabase db) {\n super.onCreate(db);\n\n executors.getDiskIOExecutor().execute(new Runnable() {\n @Override\n public void run() {\n\n // Add a delay to simulate a long-running operation\n addDelay();\n\n AppDatabase appDatabase = AppDatabase.getInstance(appContext, executors);\n\n List<WeatherEntry> weathers = DataGenerator.generateWeathers();\n\n Log.d(TAG, \"Codelab AppDatabase insertAll - begin\");\n\n insertAll(appDatabase, weathers);\n\n // notify that the database was created and it's ready to be used\n appDatabase.setDatabaseCreated();\n }\n });\n }", "boolean shouldCommit();", "public void createTempSpecialDayTrainSchedule(Timestamp date);", "void setInsertableMode(boolean b) {\n this.setInsertMode(b);\n }", "private synchronized boolean create_tuples(String table_name, String[] data, StringBuilder tuples){\n\t\tint seq_no = 0;\n\t\tint schema_id = 0;\n\t\t\n\t\t// msg is null\n\t\tif(tuples == null){\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (!measurementPointCounter.isEmpty()) {\n\t\t\tseq_no = measurementPointCounter.get(table_name);\n\t\t\tmeasurementPointCounter.put(table_name, seq_no + 1);\n\t\t} else\n\t\t\treturn false;\n \n\t\tif (!schemaCounter.isEmpty()) {\n\t\t\tschema_id = schemaCounter.get(table_name);\n\t\t} else\n\t\t\treturn false;\n \n\t\tif (!isSrvConnected())\n\t\t\treturn false;\n \n\t\t\n\t\t/**\n\t\t * CALCULATE THE TIME INTERVAL\n\t\t */\n\t\tlong cur_time = System.currentTimeMillis();\n\t\tlong dif_time = cur_time - head_time;\n\t\tdouble lcl_dif_time = dif_time/1000.0;\n\t\tString dif_time_str = Double.toString(lcl_dif_time);\n \n\t\t/**\n\t\t * CREATE THE TUPLE STRING\n\t\t */\n\t\ttuples.append(\tdif_time_str + // #1 : timestamp\n\t\t\t\t\t\t\"\\t\" + \n\t\t\t\t\t\tString.valueOf(schema_id) + // #2 : stream_id\n\t\t\t\t\t\t\"\\t\" + \n\t\t\t\t\t\tString.valueOf(seq_no) // #3 : seq_no\n\t\t\t\t\t); \n\t\t\n\t\tfor (int i = 0; i < data.length; i++) { // #4 : data\n\t\t\ttuples.append(\"\\t\" + data[i]);\n\t\t}\n\t\t\n\t\ttuples.append(\"\\n\");\n\t\treturn true;\n\t}", "public int Trans1(Long userid,Long amount,Double price,Double comp_id)throws SQLException {\n\tint i=DbConnect.getStatement().executeUpdate(\"Insert into transaction values(trans_seq.nextval,\"+userid+\",sysdate,\"+amount+\",'sale','self',\"+comp_id+\",\"+price+\")\");\r\n\treturn i;\r\n}", "public TransactionEvent() {\n this.local = true;\n }", "public void logBatch(String sql, int repeatTimes, long nanoTime) ;", "@Override\n\tpublic boolean create(Dates obj) {\n\t\treturn false;\n\t}", "private void m14053d() {\n try {\n File file = new File(f18051l);\n File file2 = new File(f18052m);\n if (!file.exists()) {\n file.mkdirs();\n }\n if (!file2.exists()) {\n file2.createNewFile();\n }\n if (file2.exists()) {\n SQLiteDatabase openOrCreateDatabase = SQLiteDatabase.openOrCreateDatabase(file2, null);\n openOrCreateDatabase.execSQL(\"CREATE TABLE IF NOT EXISTS bdcltb09(id CHAR(40) PRIMARY KEY,time DOUBLE,tag DOUBLE, type DOUBLE , ac INT);\");\n openOrCreateDatabase.execSQL(\"CREATE TABLE IF NOT EXISTS wof(id CHAR(15) PRIMARY KEY,mktime DOUBLE,time DOUBLE, ac INT, bc INT, cc INT);\");\n openOrCreateDatabase.setVersion(1);\n openOrCreateDatabase.close();\n }\n this.f18053a = true;\n } catch (Exception e) {\n }\n }", "boolean hasInsert();", "@SuppressWarnings(\"resource\")\n @Explain(\"We close the statement later, this is just an intermediate\")\n protected void addBatch() throws SQLException {\n prepareStmt().addBatch();\n batchBacklog++;\n if (batchBacklog > batchBacklogLimit) {\n commit();\n }\n }", "protected Boolean m14036a(Boolean... boolArr) {\n SQLiteDatabase sQLiteDatabase = null;\n if (boolArr.length != 4) {\n return Boolean.valueOf(false);\n }\n try {\n sQLiteDatabase = SQLiteDatabase.openOrCreateDatabase(C3335a.f18052m, null);\n } catch (Exception e) {\n }\n if (sQLiteDatabase == null) {\n return Boolean.valueOf(false);\n }\n int currentTimeMillis = (int) (System.currentTimeMillis() >> 28);\n try {\n sQLiteDatabase.beginTransaction();\n if (boolArr[0].booleanValue()) {\n try {\n sQLiteDatabase.execSQL(\"delete from wof where ac < \" + (currentTimeMillis - 35));\n } catch (Exception e2) {\n }\n }\n if (boolArr[1].booleanValue()) {\n try {\n sQLiteDatabase.execSQL(\"delete from bdcltb09 where ac is NULL or ac < \" + (currentTimeMillis - 130));\n } catch (Exception e3) {\n }\n }\n sQLiteDatabase.setTransactionSuccessful();\n sQLiteDatabase.endTransaction();\n sQLiteDatabase.close();\n } catch (Exception e4) {\n }\n return Boolean.valueOf(true);\n }", "public boolean hasNewBatchCloseEnabled() {\n return genClient.cacheHasKey(CacheKey.newBatchCloseEnabled);\n }", "@Override\n public boolean createSalesCallLog(SalesCallLog salescalllog) {\n salescalllog.setGendate(C_Util_Date.generateDate());\n return in_salescalllogdao.createSalesCallLog(salescalllog);\n }", "WithCreate withIncremental(Boolean incremental);", "private static boolean transactionAddArticle(Transaction tx, ArticleBean newArt) {\n HashMap<String, Object> parameters = new HashMap<>();\n parameters.put(\"author\", newArt.getAuthor());\n parameters.put(\"id\", newArt.getId());\n parameters.put(\"timestamp\", newArt.getTimestamp().toString());\n parameters.put(\"title\", newArt.getTitle());\n parameters.put(\"game1\", newArt.getListGame().get(0));\n parameters.put(\"game2\", (newArt.getListGame().size() == 2) ? newArt.getListGame().get(1) : \"\" );\n String query = \"\";\n\n if (newArt.getListGame().size() == 1 || newArt.getListGame().get(1).equals(\"\")) {\n query =\n \"MATCH(u:User {username:$author}), (g1:Game{name:$game1})\"\n + \" CREATE (u)-[p:PUBLISHED{timestamp:$timestamp}]->(a:Article{idArt:$id, title:$title})\"\n + \" CREATE (g1)<-[:REFERRED]-(a)\"\n + \" return a \";\n } else {\n query =\n \"MATCH(u:User {username:$author}), (g1:Game{name:$game1}), (g2:Game{name:$game2}) \"\n + \" CREATE (u)-[p:PUBLISHED{timestamp:$timestamp}]->(a:Article{idArt:$id, title:$title}) \"\n + \" CREATE (g1)<-[:REFERRED]-(a)-[:REFERRED]->(g2) \"\n + \" return a \";\n }\n\n\n Result result = tx.run(query, parameters);\n if(result.hasNext()) {\n return true;\n }\n\n return false;\n }", "protected void sequence_ALL_BEGIN_BOOL_BY_CURRENT_DAYS_DEFINE_DELETE_DOUBLE_END_EVENTS_EXPIRED_FALSE_FIRST_FLOAT_FOR_FROM_FULL_GROUP_HAVING_HOURS_INNER_INSERT_INTO_INTS_IS_JOIN_Keyword_LAST_LEFT_LONG_MILLISECONDS_MINUTES_MONTHS_NULL_OBJECT_OUTER_OUTPUT_PARTITION_RAW_RETURN_RIGHT_SECONDS_SELECT_SNAPSHOT_STREAM_STRINGS_TABLE_TRUE_UPDATE_WEEKS_WINDOW_WITH_WITHIN_YEARS(ISerializationContext context, Keyword semanticObject) {\n\t\tgenericSequencer.createSequence(context, semanticObject);\n\t}", "private void createTempDatabase() {\n\t\thandler = new ERXmlDocumentHandler(doc);\n\t\tList<String> filter = initFilter(subjectId);\n\t\tparseEntitys(filter);\n\t}" ]
[ "0.60562706", "0.5508413", "0.5108981", "0.50928473", "0.5044753", "0.50286454", "0.49920648", "0.48847282", "0.4858228", "0.48275346", "0.47845173", "0.476541", "0.4751032", "0.47408172", "0.47401765", "0.4729107", "0.47284794", "0.47131416", "0.47071055", "0.47059298", "0.46892354", "0.46863246", "0.46772113", "0.46679968", "0.46342543", "0.46331644", "0.46256363", "0.4600076", "0.45886633", "0.45850885", "0.45819747", "0.4574493", "0.45729962", "0.4565738", "0.4565355", "0.45640355", "0.4558739", "0.45578307", "0.4550734", "0.45469564", "0.45298952", "0.45235386", "0.4523503", "0.45043087", "0.44954267", "0.44932213", "0.44910917", "0.4490881", "0.44900715", "0.4477417", "0.44634637", "0.44533807", "0.44505182", "0.44495618", "0.4432612", "0.4430839", "0.44276872", "0.44266596", "0.44260684", "0.44220066", "0.44162712", "0.44097602", "0.44094822", "0.44087392", "0.44081742", "0.44049013", "0.44014284", "0.439475", "0.4394579", "0.43933514", "0.43852365", "0.43834642", "0.43800017", "0.43726614", "0.4372582", "0.43659908", "0.43585527", "0.435715", "0.43564937", "0.43499526", "0.43472555", "0.4344182", "0.43441606", "0.43423477", "0.43378097", "0.43246478", "0.43244758", "0.43229997", "0.43228427", "0.43188342", "0.4318462", "0.4317466", "0.43157628", "0.43107203", "0.43094486", "0.43052086", "0.4294688", "0.42931384", "0.42830026", "0.42820734" ]
0.531055
2
/ public: Entry (bean) interface
public Genesis getGenesis() { return genesis; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface Entry {\n\n}", "protected Entry(){}", "public interface Entry {\n // TODO: constraint, depends on event.isRelayEvent / isIndividualEvent\n @NotNull\n MeetAthlete getAthlete();\n RelayTeam getRelayTeam();\n\n Club getClub();\n\n @NotNull\n Event getEvent();\n // TODO: if relay event, constraint: event.swimstyle.relayscount = relayteam.getSize()\n\n /**\n * This is used for the entry status information.\n */\n EntryStatus getStatus();\n\n Duration getEntryTime();\n\n // TODO: qualifying time?\n\n // TODO: PreparedHeat, not null\n @Nullable\n Heat getHeat();\n @Nullable\n Integer getLane();\n\n /**\n * @return true if heat and lane are set, false otherwise\n */\n boolean isHeatPrepared();\n\n AgeGroup getAgeGroup();\n\n // TODO: not null, throw exception\n @Nullable\n Result getResult();\n}", "public E getEntry() {\n return _entry;\n }", "public Entry() {\n }", "public void onEntry()\n\t{\n\t}", "@Override\n\tpublic void entry(Object... params) {\n\n\t}", "@Override\n\tpublic void entry() {\n\n\t}", "public Entry()\n {\n this(null, null, true);\n }", "public Label getEntry() {\n return entry;\n }", "protected abstract S get(E entry);", "protected SafeHashMap.Entry instantiateEntry()\n {\n return new Entry();\n }", "protected SafeHashMap.Entry<K, V> instantiateEntry()\n {\n return new Entry<>();\n }", "public interface EntryHome extends EJBHome {\n\n /**\n Creates an Entry entity bean.\n @param compoID the id of the compo this entry belongs to\n @param entryID the id of this entry\n @param entryName the name of this entry\n @param entryDesc description\n @param entryAuthor author of this entry\n @return entry the remote reference to the created Entry bean.\n */\n public Entry create(int compoID,\n\t\t\tint entryID,\n\t\t\tString entryName,\n\t\t\tString entryDesc,\n\t\t\tString entryAuthor) throws CreateException, RemoteException;\n\n /**\n Finds an Entry by its primary key\n @param entryID the primary key\n @return entry the Entry found\n */\n public Entry findByPrimaryKey(EntryPK pk) throws FinderException, RemoteException;\n\n /**\n Returns all the Entries in the database.\n @return enum an Enumeration with all the Entries in the database\n */\n public Enumeration findAll() throws FinderException, RemoteException;\n\n}", "public String getEntry() {\n return mEntry;\n }", "public interface Entry<K, V> {\n K getKey();\n V getValue();\n}", "public VFSEntry getEntry() {\r\n\t\treturn entry;\r\n\t}", "public EvEntry() {\n\t}", "public interface IEntryFactory\n\t{\n\t\t/** \n\t\t Create an entry based on name alone\n\t\t \n\t\t @param name\n\t\t Name of the new EntryPointNotFoundException to create\n\t\t \n\t\t @return created TarEntry or descendant class\n\t\t*/\n\t\tTarEntry CreateEntry(String name);\n\n\t\t/** \n\t\t Create an instance based on an actual file\n\t\t \n\t\t @param fileName\n\t\t Name of file to represent in the entry\n\t\t \n\t\t @return \n\t\t Created TarEntry or descendant class\n\t\t \n\t\t*/\n\t\tTarEntry CreateEntryFromFile(String fileName);\n\n\t\t/** \n\t\t Create a tar entry based on the header information passed\n\t\t \n\t\t @param headerBuffer\n\t\t Buffer containing header information to create an an entry from.\n\t\t \n\t\t @return \n\t\t Created TarEntry or descendant class\n\t\t \n\t\t*/\n\t\tTarEntry CreateEntry(byte[] headerBuffer);\n\t}", "interface Entry {\n\n /** The entry name separator as a string. */\n String SEPARATOR = ArchiveEntry.SEPARATOR;\n\n /** The entry name separator as a character. */\n char SEPARATOR_CHAR = ArchiveEntry.SEPARATOR_CHAR;\n\n /**\n * Denotes the entry name of the virtual root directory.\n * This name is used as the value of the <code>innerEntryName</code>\n * property if a <code>File</code> instance denotes an archive file.\n * <p>\n * This constant may be safely used for identity comparison.\n */\n String ROOT_NAME = \"\";\n}", "void onEntryAdded(Entry entry);", "public DataObjectEntry getDataObjectEntry(String entryKey);", "public KeyedEntry() { }", "public interface Entry extends Serializable {\n Identifier getIdentifier();\n\n void setIdentifier(Identifier id);\n\n Shape getShape();\n\n void setShape(Shape s);\n\n void setIdentifier(long id);\n\n byte[] getData();\n\n void setData(byte[] data);\n\n long getDataLength();\n\n static Entry create(Identifier identifier, Shape shape, byte[] data) {\n return new EntryImpl(identifier, shape, data);\n }\n}", "@Override\n\tpublic void update(Entry entry) {\n\t\tentryDAO.save(entry);\n\t}", "protected abstract Map.Entry<Sheet, EvaluationSheet> getInstance();", "@Override\n\tpublic Set<Map.Entry<K, V>> entrySet() {\n\t\t// TODO\n\t\treturn new EntryView();\n\t}", "public interface IEntry {\n\tpublic int getViewType();\n public View getView(LayoutInflater inflater, View convertView);\n}", "public HashEntry( AnyType e )\n {\n \tkey = e;\n }", "void visit(Entry entry);", "public Entry(K key, V value) {\r\n this.key = key;\r\n this.value = value;\r\n }", "public Entry(K key, V value) {\r\n this.key = key;\r\n this.value = value;\r\n }", "public EventEntry getEventEntry();", "public Entry(K key, V value) {\n this.key = key;\n this.value = value;\n }", "public Entry(K key, V value) {\n this.key = key;\n this.value = value;\n }", "public Object getNativeEntry();", "public T caseEntry(Entry object) {\n\t\treturn null;\n\t}", "protected abstract V getValue(E entry);", "public void addEntry(Entry entry) {\n entries.add(entry);\n }", "public CTentry(CTentry entry) {\n\t\tthis.vTable = new HashMap<String, STentry>(entry.getVTable());\n\t\tthis.offsetFields = entry.getOffsetFields();\n\t\tthis.offsetMethods = entry.getOffsetMethods();\n\t\tthis.allFields = new ArrayList<Node>(entry.getAllFields());\n\t\tthis.allMethods = new ArrayList<Node>(entry.getAllMethods());\n\t\tthis.locals = new HashSet<Integer>();\t\n\t}", "@Override\n synchronized public void addEntry(Entry e) throws RemoteException {\n if (this.map.containsKey(e.getHash())) {\n return;\n }\n //System.out.println(\"Mapper.addEntry() :: entry=\"+e.getHash()+\",\"+e.getLocation());\n this.map.put(e.getHash(), e.getLocation());\n printAct(\">added entry:\" + e.hash);\n }", "@Override\n public void insertEntry(Entry entry) {\n members.add(entry);\n\n }", "public Entry(K key, V value)\r\n\t\t{\r\n\t\t\tthis.key = key;\r\n\t\t\tthis.value = value;\r\n\t\t}", "public Entry(String n)\n {\n name = n;\n }", "public String getEntryId() {\n return entryId;\n }", "@Override\n public T getValue() {\n return entry.getValue().getValue();\n }", "public Entry output();", "public void setEntryId(String entryId) {\n this.entryId = entryId;\n }", "public Entry method_1584() {\n return this.c();\n }", "public Entry() {\n\t\tthis.typeCode = XActRelationshipEntry.COMP;\n\t\tthis.contextConductionInd = true;\n\t}", "public boolean add(T entry) {\n return false;\n }", "@Override\n\tpublic List<Entry> getAllEntry() {\n\t\treturn entryDAO.getAllEntry();\n\t}", "protected UUID add(E entry) {\n\t\treturn add(entry, true);\n\t}", "private static Entry<String, Rectangle> entry(JSONObject entry) {\n\t\t\tfinal String name = entry.getString(\"name\").trim();\n\t\t\tfinal JSONArray array = entry.getJSONArray(\"rect\");\n\t\t\tfinal Rectangle rect = new Rectangle(\n\t\t\t\t\tarray.getInt(0),\n\t\t\t\t\tarray.getInt(1),\n\t\t\t\t\tarray.getInt(2),\n\t\t\t\t\tarray.getInt(3)\n\t\t\t);\n\t\t\treturn Map.entry(name, rect);\n\t\t}", "public interface IONNNEntry {\r\n int getId();\r\n String getTargetId();\r\n String getVoterId();\r\n String getChatId();\r\n long getTimestamp();\r\n}", "public final ZipEntry getEntry()\n\t{\n\t\treturn entry_;\n\t}", "@Override\n public Set<Map.Entry<K, V>> entrySet() {\n return new EntrySet();\n }", "<T> AbstractMultiTenantPool.Entry<T> getEntry();", "private void put(PrimitiveEntry entry) {\n int hashIndex = findHashIndex(entry.getKey());\n entries[hashIndex] = entry;\n }", "public void setEntry(Flow.DataflowObject value) {\n entry.copy(value);\n }", "public interface DocumentEntry\n extends Entry\n{\n\n /**\n * get the zize of the document, in bytes\n *\n * @return size in bytes\n */\n\n public int getSize();", "protected StandardEntrySet() {}", "public void addEntry(Entry entry) {\n getEntryList().addEntry(entry);\n }", "public final void entryRuleEntry() throws RecognitionException {\n try {\n // ../org.eclipse.ese.android.dsl.ui/src-gen/org/eclipse/ese/ui/contentassist/antlr/internal/InternalAndroid.g:62:1: ( ruleEntry EOF )\n // ../org.eclipse.ese.android.dsl.ui/src-gen/org/eclipse/ese/ui/contentassist/antlr/internal/InternalAndroid.g:63:1: ruleEntry EOF\n {\n before(grammarAccess.getEntryRule()); \n pushFollow(FollowSets000.FOLLOW_ruleEntry_in_entryRuleEntry61);\n ruleEntry();\n _fsp--;\n\n after(grammarAccess.getEntryRule()); \n match(input,EOF,FollowSets000.FOLLOW_EOF_in_entryRuleEntry68); \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }", "public org.drip.graph.heap.PriorityQueueEntry<KEY, ITEM> entry()\n\t{\n\t\treturn _entry;\n\t}", "private void entryAction() {\n\t}", "public String getDisplayName(){return entryName;}", "public Entry()\n {\n m_dtLastUse = m_dtCreated = getSafeTimeMillis();\n }", "public static EntryList getEntryList(){\n if (entryList == null){\n entryList = new EntryList();\n\n }\n return entryList;\n }", "public Entry() {\n this(GtkEntry.createEntry());\n }", "public T getEntry(int givenPosition);", "public static Entry getEntry(String entry)\r\n\t{\n\t\tEntry batchEntry = new Entry(entry.substring(0, entry.length() - 1), entry.substring(entry.length() - 1));\r\n\t\treturn batchEntry;\r\n\t}", "public void addEntry(Entry e) {\n entries.put(e.getName(), e);\n }", "public void postEntry(Entry entry) {\n\t\tentries.addFirstElement(entry);\n\t}", "@Override\r\n public void updateEntryValue(Object key, Object value) throws Exception\r\n {\n }", "void addNewEntry(BlogEntry entry) throws DAOException;", "EntryNotFoundException() {\n super();\n }", "@Experimental\n public interface WriteEntryView<K, V> {\n /**\n * Key of the write-only entry view. Guaranteed to return a non-null value.\n * The instance of the key must not be mutated.\n */\n K key();\n\n /**\n * Set this value along with optional metadata parameters.\n *\n * <p>This method returns {@link Void} instead of 'void' to avoid\n * having to add overloaded methods in functional map that take\n * {@link Consumer} instead of {@link Function}. This is an\n * unfortunate side effect of the Java language itself which does\n * not consider 'void' to be an {@link Object}.\n */\n Void set(V value, MetaParam.Writable... metas);\n\n /**\n * Set this value along with metadata object.\n *\n * <p>This method returns {@link Void} instead of 'void' to avoid\n * having to add overloaded methods in functional map that take\n * {@link Consumer} instead of {@link Function}. This is an\n * unfortunate side effect of the Java language itself which does\n * not consider 'void' to be an {@link Object}.\n */\n Void set(V value, Metadata metadata);\n\n /**\n * Removes the value and any metadata parameters associated with it.\n *\n * <p>This method returns {@link Void} instead of 'void' to avoid\n * having to add overloaded methods in functional map that take\n * {@link Consumer} instead of {@link Function}. This is an\n * unfortunate side effect of the Java language itself which does\n * not consider 'void' to be an {@link Object}.\n */\n Void remove();\n }", "@Override\n\t\tpublic List<? extends MyHashMap.Entry<K, V>> getEntries() {\n\t\t\treturn e;\n\t\t}", "private void checkEntry(Map.Entry<? extends ExecutableElement, ? extends AnnotationValue> entry) {\n ExecutableElement key = entry.getKey();\n Object value = entry.getValue().getValue();\n if (ERROR.equals(value)) {\n TypeRef returnType = referenceAdapterFunction.apply(key.getReturnType());\n if (returnType.equals(Types.CLASS)) {\n throw new SundrException(\"Failed to extract class parameter from annotation. \" + Messages.POTENTIAL_UNRESOLVED_SYMBOL);\n }\n }\n }", "public Object process(Entry entry) {\n\t\tObject newValue = null;\n\t\ttry {\t\t\t\n\t\t\tnewValue = getNewUser();\n\t\t\tentry.setValue(newValue);\n \t} catch (Exception e) {\n \t\tlogger.error(\"Error occured when entry was being processed!\", e);\n\t\t}\n \t\n\t\treturn newValue;\n\t}", "public Set<AddressEntry> getEntry() {\n return entrySet;\n }", "public final Entries getEntries() {\n return this.entries;\n }", "@Override\n\tpublic Set<Entry<K, V>> entrySet() {\n\t\treturn null;\n\t}", "@Override\n\tpublic Set<Entry<K, V>> entrySet() {\n\t\treturn null;\n\t}", "@Override\n\tpublic Set<Entry<K, V>> entrySet() {\n\t\treturn null;\n\t}", "@Override\n\tpublic Set<Entry<K, V>> entrySet() {\n\t\treturn null;\n\t}", "public PQEntry() {}", "public Git.Entry getObject() { return ent; }", "public final EObject ruleEntryEvent() throws RecognitionException {\r\n EObject current = null;\r\n\r\n Token otherlv_1=null;\r\n\r\n enterRule(); \r\n \r\n try {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:2125:28: ( ( () otherlv_1= 'entry' ) )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:2126:1: ( () otherlv_1= 'entry' )\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:2126:1: ( () otherlv_1= 'entry' )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:2126:2: () otherlv_1= 'entry'\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:2126:2: ()\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:2127:5: \r\n {\r\n if ( state.backtracking==0 ) {\r\n\r\n current = forceCreateModelElement(\r\n grammarAccess.getEntryEventAccess().getEntryEventAction_0(),\r\n current);\r\n \r\n }\r\n\r\n }\r\n\r\n otherlv_1=(Token)match(input,39,FOLLOW_39_in_ruleEntryEvent4737); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \tnewLeafNode(otherlv_1, grammarAccess.getEntryEventAccess().getEntryKeyword_1());\r\n \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n leaveRule(); \r\n }\r\n }\r\n \r\n catch (RecognitionException re) { \r\n recover(input,re); \r\n appendSkippedTokens();\r\n } \r\n finally {\r\n }\r\n return current;\r\n }", "void entry() throws Exception;", "public T caseEntryEvent(EntryEvent object) {\r\n\t\treturn null;\r\n\t}", "public Entry(int field) {\n this.field = field;\n }", "private Entry readEntry(XmlPullParser parser) throws XmlPullParserException, IOException {\n\t parser.require(XmlPullParser.START_TAG, ns, \"entry\");\n\t String title = null;\n\t String summary = null;\n\t String link = null;\n\t while (parser.next() != XmlPullParser.END_TAG) {\n\t if (parser.getEventType() != XmlPullParser.START_TAG) {\n\t continue;\n\t }\n\t String name = parser.getName();\n\t if (name.equals(\"title\")) {\n\t title = readTitle(parser);\n\t } else if (name.equals(\"summary\")) {\n\t summary = readSummary(parser);\n\t } else if (name.equals(\"link\")) {\n\t link = readLink(parser);\n\t } else {\n\t skip(parser);\n\t }\n\t }\n\t return new Entry(title, summary, link);\n\t }", "protected abstract void updateEntry(PersistentEntity persistentEntity, K id, T entry);", "public static com.tangosol.coherence.Component get_Instance()\n {\n return new com.tangosol.coherence.component.util.collections.WrapperMap.EntrySet.Entry();\n }", "public HashEntry(Word e) {\n\t this(e, true);\n\t }", "private IEntry getEntryEditorWidgetTreeViewerInput()\n {\n TreeViewer viewer = getEntryEditorWidgetTreeViewer();\n if ( viewer != null )\n {\n Object o = viewer.getInput();\n if ( o instanceof IEntry )\n {\n return ( IEntry ) o;\n }\n }\n return null;\n }", "public Entry[] getEntries()\n\t{\n\t\treturn entries;\n\t}", "protected abstract Object getEntryValue(T nativeEntry, String property);", "@Test\n public void mapEntry() {\n check(MAPENTRY);\n query(EXISTS.args(MAPENTRY.args(\"A\", \"B\")), true);\n query(EXISTS.args(MAPENTRY.args(1, 2)), true);\n query(EXISTS.args(MAPNEW.args(MAPENTRY.args(1, 2))), \"true\");\n error(EXISTS.args(MAPENTRY.args(\"()\", 2)), Err.XPTYPE);\n error(EXISTS.args(MAPENTRY.args(\"(1,2)\", 2)), Err.XPTYPE);\n }" ]
[ "0.7700391", "0.75066566", "0.707916", "0.6817557", "0.66536736", "0.65787023", "0.6563431", "0.6556655", "0.6398198", "0.639472", "0.6362455", "0.63378686", "0.63330525", "0.6307396", "0.62938946", "0.6252663", "0.62268025", "0.62088364", "0.61385715", "0.6137679", "0.61115515", "0.60554606", "0.6041104", "0.60142684", "0.60051614", "0.5986637", "0.5984639", "0.5963192", "0.5912058", "0.58687997", "0.5832652", "0.5832652", "0.58235013", "0.5788546", "0.5788546", "0.5773614", "0.5770743", "0.57662326", "0.5745888", "0.573879", "0.5734568", "0.5731493", "0.57134044", "0.57037544", "0.56995386", "0.56964225", "0.56938064", "0.5677785", "0.5677482", "0.5673329", "0.5672059", "0.5668988", "0.56561416", "0.5651712", "0.5651026", "0.56500626", "0.5642017", "0.5622843", "0.56185997", "0.55799913", "0.5576471", "0.55743384", "0.5573691", "0.5562392", "0.5552759", "0.55523306", "0.5551186", "0.5548067", "0.5542376", "0.5539884", "0.5537899", "0.55341506", "0.55287385", "0.55223507", "0.5521973", "0.5517556", "0.55076003", "0.5495037", "0.54934984", "0.54885805", "0.5484685", "0.5473483", "0.5470795", "0.5470616", "0.5470616", "0.5470616", "0.5470616", "0.54625523", "0.5460859", "0.5456164", "0.54493594", "0.544914", "0.54439414", "0.54402643", "0.5439556", "0.54382", "0.5436396", "0.54357123", "0.5433381", "0.54302025", "0.54300374" ]
0.0
-1
/ protected: generation support
protected Date findFirstGenDate(GenCtx ctx) { return EX.assertn(ctx.get(Date.class)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract void generate();", "public void generate() {\n\t}", "public abstract void generate();", "public static void generateCode()\n {\n \n }", "@SuppressWarnings(\"unused\")\n private void generateInfo()\n {\n }", "abstract T generate();", "@Override\r\n\tpublic void billGenerate() {\n\t\t\r\n\t}", "public abstract String generate(Object... args);", "public void generateData()\n {\n }", "public interface Generator {\n String prepareSql();\n\n String getTemplateName();\n\n String prepareCategorySql();\n\n String getExcludedProductIds();\n\n String getDiscounts();\n\n String fixImageUrl(String imageUrl);\n}", "public void generate() {\n\t\tthis.initializePathBindingClass();\n\t\t// managed at abstract level ; name provided at binding generation time\n\t\t// this.addGetName();\n\t\t// this.addGetType();\n\n\t\t// add all properties methods\n\t\tthis.addProperties();\n\t\t// add getter that provides property list\n\t\tthis.addGetChildBindings();\n\n\t\t// initialize class declaration (*Binding)\n\t\tthis.initializeRootBindingClass();\n\t\t// add constructors\n\t\tthis.addConstructors();\n\t\t// add getWithRoot method\n\t\tthis.addGetWithRoot();\n\t\t// add getSafelyWithRoot method\n\t\tthis.addGetSafelyWithRoot();\n\n\t\tthis.addGeneratedTimestamp();\n\t\tthis.addSerialVersionUID();\n\t\tthis.saveCode(this.pathBindingClass);\n\t\tthis.saveCode(this.rootBindingClass);\n\t}", "public void gen(CodeSeq code, ICodeEnv env) {\n\r\n\t}", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:36:02.373 -0500\", hash_original_method = \"00F8174F9E89D0C972FA6D3F19742382\", hash_generated_method = \"D90463461B2A94FF94D13FDF69BB80C9\")\n \npublic int describeContents() {\n return 0;\n }", "@Test\n\tpublic void testDoGeneration() {\n\t}", "public Generateur() {\n }", "@Override\n\tpublic void generate() {\n\t\tJavaObject object = new JavaObject(objectType);\n\n\t\t// Fields\n\t\taddFields(object);\n\n\t\t// Empty constructor\n\t\taddEmptyConstructor(object);\n\n\t\t// Types constructor\n\t\taddTypesConstructor(object);\n\n\t\t// Clone constructor\n\t\taddCloneConstructor(object);\n\n\t\t// Setters\n\t\taddSetters(object);\n\n\t\t// Build!\n\t\taddBuild(object);\n\n\t\t// Done!\n\t\twrite(object);\n\t}", "public interface Generator {\r\n\r\n interface UUIDSource {\r\n\r\n String generateUUID();\r\n }\r\n\r\n void setDefaultArgType(SourceType sourceType);\r\n\r\n void setLanguageFromMapping(String language);\r\n\r\n void setNamespace(String prefix, String uri);\r\n\r\n String getLanguageFromMapping();\r\n\r\n public interface ArgValues {\r\n\r\n ArgValue getArgValue(String name, SourceType sourceType);\r\n }\r\n\r\n GeneratedValue generate(String name, ArgValues arguments);\r\n}", "public BPELGeneratorImpl() {\r\n \t\tsuper(GENERATOR_NAME);\r\n \t}", "public boolean generate();", "ObjectFactoryGenerator objectFactoryGenerator();", "protected void genWriter() {\n\t\t\n\t\tfixWriter_h();\n\t\tfixWriter_cpp();\n\t}", "public void genCode(CodeFile code) {\n\t\t\n\t}", "@Override\n public void generate(ToolContext context) throws ToolException {\n //Sorry but I needed to rewrite the code, doesn't have any point to override\n boolean initialized = getFieldValue(\"initialized\");\n if (!initialized) {\n initialize(context);\n }\n\n S2JJAXBModel rawJaxbModelGenCode = getFieldValue(\"rawJaxbModelGenCode\");\n if (rawJaxbModelGenCode == null) {\n return;\n }\n\n if (context.getErrorListener().getErrorCount() > 0) {\n return;\n }\n\n try {\n ByteArrayOutputStream stream = new ByteArrayOutputStream();\n\n CustomOutputStreamCodeWriter fileCodeWriter = new CustomOutputStreamCodeWriter(stream, \"utf-8\", results);\n ClassCollector classCollector = context.get(ClassCollector.class);\n for (JClass cls : rawJaxbModelGenCode.getAllObjectFactories()) {\n classCollector.getTypesPackages().add(cls._package().name());\n }\n JCodeModel jcodeModel = rawJaxbModelGenCode.generateCode(null, null);\n\n jcodeModel.build(fileCodeWriter);\n\n context.put(JCodeModel.class, jcodeModel);\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 13:00:49.404 -0500\", hash_original_method = \"CD5C82C799E78C74801FDB521CEE7324\", hash_generated_method = \"CD5C82C799E78C74801FDB521CEE7324\")\n \nContext ()\n {\n copyTables();\n }", "private PSUniqueObjectGenerator()\n {\n }", "private ReportGenerationUtil() {\n\t\t\n\t}", "protected LLVMGenerator doGenerate(IAstModule mod) throws Exception {\n \t\treturn doGenerate(mod, false);\n \t}", "@Override\n public void codegen(Emitter output) {\n }", "public int generation()\r\n {\r\n\treturn generation;\r\n }", "@Override\n\tpublic void pathGenerated() {\n\n\t}", "public void generate(Object entity) throws AAException;", "CodegenFactory getCodegenFactory();", "void generate(String name, List<String> types, Settings settings);", "@java.lang.Override\n public long getGeneration() {\n return generation_;\n }", "public void generateCode() {\n new CodeGenerator(data).generateCode();\n }", "public interface Generator {\n ClazzGenerator generateClazzString();\n}", "public GenerateurImpl() {\n\t\tsuper();\n\t\tthis.value = 0;\n\t}", "private void generateSolution() {\n\t\t// TODO\n\n\t}", "public void generate() {\n\t\t// Print generation stamp\n\t\tcontext.getNaming().putStamp(elementInterface, out);\n\t\t// Print the code\n\t\t// Print header\n\t\tout.println(\"package \"+modelPackage+\";\");\n\t\tout.println();\n\t\tout.println(\"public interface \"+elementInterface);\n\t\tif (context.isGenerateVisitor()) {\n\t\t\tout.println(indent+\"extends \"+context.getNaming().getVisitableInterface(modelName));\n\t\t}\n\t\tout.println(\"{\");\n\t\tif (context.isGenerateID()) {\n\t\t\tout.println(indent+\"/** Get the id */\");\n\t\t\tout.println(indent+\"public String getId();\");\n\t\t\tout.println(indent+\"/** Set the id */\");\n\t\t\tout.println(indent+\"public void setId(String id);\");\n\t\t\tout.println();\n\t\t}\n\t\tif (context.isGenerateBidirectional()) {\n\t\t\tout.println(indent+\"/** Delete */\");\n\t\t\tout.println(indent+\"public void delete();\");\n\t\t}\n\t\tout.println(indent+\"/** Override toString */\");\n\t\tout.println(indent+\"public String toString();\");\n//\t\tif (context.isGenerateInvariant()) {\n//\t\t\tout.println();\n//\t\t\tout.println(indent+\"/** Parse all invariants */\");\n//\t\t\tout.println(indent+\"public Boolean parseInvariants(ILog log);\");\n//\t\t\tout.println(indent+\"/** Evaluate all invariants */\");\n//\t\t\tout.println(indent+\"public Boolean evaluateInvariants(ILog log);\");\n//\t\t}\n\t\tout.println(\"}\");\n\t}", "@Override\n public JavaFile generate() {\n String versionCatalogSimpleName = \"VersionFactory\";\n\n // Creates the getCatalog method.\n MethodSpec.Builder getCatalogBuilder =\n MethodSpec.methodBuilder(\"getVersions\")\n .addModifiers(Modifier.PROTECTED, Modifier.STATIC)\n .addException(IllegalAccessException.class)\n .addException(InstantiationException.class)\n .returns(ParameterizedTypeName.get(IMMUTABLE_SET_CLASS_NAME, VERSION_CLASS_NAME))\n .addStatement(\n \"$T.Builder<$T> builder = $T.builder()\",\n IMMUTABLE_SET_CLASS_NAME,\n VERSION_CLASS_NAME,\n IMMUTABLE_SET_CLASS_NAME);\n\n /*\n * <code>\n * builder.add(new Version(\n * \"v123\",\n * new GoogleAdsException.Factory(),\n * GoogleAdsVersion.class,\n * new DefaultMessageProxyProvider(\n * new SearchGoogleAdsStreamResponseMessageProxy())));\n * </code>\n */\n // Creates a Version instance for each version of the API.\n for (Integer version : versions) {\n // Defines the exception factory class name.\n ClassName exceptionFactoryName =\n ClassName.get(\n \"com.google.ads.googleads.v\" + version + \".errors\", \"GoogleAdsException\", \"Factory\");\n // Defines the GoogleAdsVersion class name.\n ClassName versionClassName =\n ClassName.get(\"com.google.ads.googleads.v\" + version + \".services\", \"GoogleAdsVersion\");\n // Adds a Version instance to the builder with the params as defined above.\n getCatalogBuilder.addStatement(\n \"builder.add(new Version(\\n\" + \" $S,\\n\" + \" new $T(),\\n\" + \" $T.class))\",\n \"v\" + version,\n exceptionFactoryName,\n versionClassName);\n }\n\n getCatalogBuilder.addStatement(\"return builder.build()\");\n\n MethodSpec getCatalog = getCatalogBuilder.build();\n\n // Creates and returns the VersionCatalog class.\n TypeSpec versionCatalogGeneratedCode =\n TypeSpec.classBuilder(versionCatalogSimpleName)\n .addAnnotation(Utils.generatedAnnotation())\n .addModifiers(Modifier.PUBLIC)\n .addMethod(getCatalog)\n .build();\n\n JavaFile javaFile =\n Utils.createJavaFile(\"com.google.ads.googleads.lib.catalog\", versionCatalogGeneratedCode);\n Utils.writeGeneratedClassToFile(javaFile, targetDirectory);\n return javaFile;\n }", "@Override\n protected void codeGenMain(DecacCompiler compiler, Registres regs, Pile p) {\n }", "For createFor();", "public String generateCode(){\n return \"P\" + repository.getCount();\n }", "@java.lang.Override\n public long getGeneration() {\n return generation_;\n }", "interface Generator {\n int[] generate(int size);\n }", "public interface Generator<T> {\n\n T generate();\n\n}", "private void generate() throws FileNotFoundException {\n if (clazz.isInterface())\n generateInterface();\n writer.close();\n }", "public void generate(File file) throws IOException;", "public interface IGenerator {\n\n void execute(List<ClassInfo> classInfos, Map<String, Object> extParam, ZipOutputStream zipOutputStream) throws Exception;\n\n}", "LoadGenerator createLoadGenerator();", "LoadGenerator createLoadGenerator();", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2014-09-06 12:51:01.208 -0400\", hash_original_method = \"02D67B7BBDDCEC9BC9A477128D96A70E\", hash_generated_method = \"73DCA79669D2BAEA0D08C443D09F446C\")\n \npublic Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}", "public AbstractGenerateurAbstractSeule() {\r\n\t\tsuper();\r\n\t}", "public abstract Image gen();", "@DSSafe(DSCat.SAFE_OTHERS)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 13:00:49.362 -0500\", hash_original_method = \"1F62AD2938072A93E19EAFFCDA555D07\", hash_generated_method = \"E522C6EE17CC779935F0D04DE1F1F350\")\n \npublic NamespaceSupport ()\n {\n reset();\n }", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:55:06.831 -0500\", hash_original_method = \"E7A2FB4AC135D29D78CE09D5448C290F\", hash_generated_method = \"74B066602ECC20A74FD97E770D65E8BD\")\n \npublic String encodeBody() {\n return encodeBody(new StringBuffer()).toString();\n }", "public interface BasicDataGeneratorInterface {\r\n\tpublic int generateInteger();\r\n\tpublic int generateInteger(int size);\r\n\tpublic short generateShort();\r\n\tpublic long generateLong();\r\n\tpublic double generateDouble();\r\n\tpublic float generateFloat();\r\n\tpublic boolean generateBoolean();\r\n\tpublic char generateLowerCaseChar();\r\n\tpublic char generateUpperCaseChar();\r\n\tpublic char generateCharEnglishChar();\r\n\tpublic char generateChar();\r\n\tpublic byte generateByte();\r\n\tpublic String generateString(DataGeneratorEnums.StringType stringType);\r\n\tpublic String generateString(DataGeneratorEnums.StringType stringType,int size);\r\n\tpublic String generateStringNoSpecialChars(DataGeneratorEnums.StringType stringType);\r\n\tpublic String generateStringNoSpecialChars(DataGeneratorEnums.StringType stringType,int size);\r\n\tpublic void setSeed(int seed);\r\n}", "public Generator(){}", "@DSSafe(DSCat.SAFE_OTHERS)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 13:02:01.348 -0500\", hash_original_method = \"70C01DEF86829F68F838E9F8223EE1C9\", hash_generated_method = \"C660A4FDE54A073E97068B4FD92F16CB\")\n \n@Override public void shutdownOutput() throws IOException {\n throw new UnsupportedOperationException();\n }", "public interface DataDescriptorSampleGenerator {\n\n /**\n * Whether this sample generator supports given descriptor object.\n *\n * @param descriptor to generate sample for\n *\n * @return true if supports\n */\n boolean supports(Object descriptor);\n\n /**\n * Generate a sample/template import file\n *\n * @param descriptor to generate sample for\n *\n * @return template file name and content (defines aas list as implementation can add supporting files such as\n * readme files of XSD)\n */\n List<Pair<String, byte[]>> generateSample(Object descriptor);\n\n}", "public interface ICodeGenerator extends IGenerator {\n\n String OUTPUT_PACKAGE = \"com.adversespaceloneliness.game.assets.generated\";\n String OUTPUT_PATH = \"src/main/java\";\n\n /**\n * Ends the generation process for this generator.\n * <p>\n * This method is supposed to be called once all the intended assets were passed through this generator and that the resulting code must be generated.\n */\n void endGeneration();\n}", "public interface JavaGenerationHelper {\n\n /**\n * Populates the JavaComponentDefinition with generation information\n *\n * @param definition the JavaComponentDefinition to populate\n * @param component the component being generated\n * @throws GenerationException if there is an error generating the JavaComponentDefinition\n */\n void generate(JavaComponentDefinition definition, LogicalComponent<? extends JavaImplementation> component) throws GenerationException;\n\n /**\n * Populates the JavaWireSourceDefinition with reference wiring information.\n *\n * @param definition the JavaWireSourceDefinition to populate\n * @param reference the reference the wire is being generated for\n * @param policy the effective wire policy\n * @throws GenerationException if there is an error generating the JavaWireSourceDefinition\n */\n void generateWireSource(JavaSourceDefinition definition, LogicalReference reference, EffectivePolicy policy) throws GenerationException;\n\n /**\n * Populates the JavaWireSourceDefinition with callback wiring information.\n *\n * @param definition the JavaWireSourceDefinition to populate\n * @param component the component to be injected with the callback, i.e. the component providing the forward service\n * @param serviceContract the callback service contract\n * @param policy the effective wire policy\n * @throws GenerationException if there is an error generating the JavaWireSourceDefinition\n */\n void generateCallbackWireSource(JavaSourceDefinition definition,\n LogicalComponent<? extends JavaImplementation> component,\n ServiceContract serviceContract,\n EffectivePolicy policy) throws GenerationException;\n\n /**\n * Populates the JavaWireTargetDefinition with wiring information.\n *\n * @param definition the JavaWireTargetDefinition to populate\n * @param service the target service for the wire\n * @throws GenerationException if there is an error generating the JavaWireSourceDefinition\n */\n void generateWireTarget(JavaTargetDefinition definition, LogicalService service) throws GenerationException;\n\n /**\n * Populates the JavaConnectionSourceDefinition with information for connecting it to a component producer.\n *\n * @param definition the JavaConnectionSourceDefinition to populate\n * @param producer the producer\n * @throws GenerationException if there is an error generating the JavaConnectionSourceDefinition\n */\n void generateConnectionSource(JavaConnectionSourceDefinition definition, LogicalProducer producer) throws GenerationException;\n\n /**\n * Populates the JavaConnectionTargetDefinition with information for connecting it to a component consumer .\n *\n * @param definition the JavaConnectionTargetDefinition to populate\n * @param consumer the consumer\n * @throws GenerationException if there is an error generating the JavaConnectionSourceDefinition\n */\n void generateConnectionTarget(JavaConnectionTargetDefinition definition, LogicalConsumer consumer) throws GenerationException;\n\n /**\n * Populates the JavaWireSourceDefinition with resource wiring information.\n *\n * @param definition the JavaWireSourceDefinition to populate\n * @param resourceReference the resource to be wired\n * @throws GenerationException if there is an error generating the JavaWireSourceDefinition\n */\n void generateResourceWireSource(JavaSourceDefinition definition, LogicalResourceReference<?> resourceReference) throws GenerationException;\n\n}", "public synchronized void generate () {\n\t\tgenerate( () -> {\n\t\t});\n\t}", "public interface ParameterGenerator {\n\n String generateArgs(Parameter parameter);\n\n String generateFieldDeclaration(Parameter parameter);\n\n String generateConstructorParameter(Parameter parameter);\n\n// String generateFieldAssignment(Parameter parameter);\n\n String generateWidget(Parameter parameter);\n\n String generateDescriptorMethod(Parameter parameter);\n\n String generateFinallyBlock(Parameter parameter);\n\n}", "public boolean generated () {\n\t\treturn generated;\n\t}", "public interface IModelGenerator\n{\n\tpublic static final String MAIN_MODEL = \"mainModel\";\n\tpublic static final String CURRENT_DATE = \"currentDate\";\n\t/**\n\t * Generate whole entity with cascade all. Include all sub entities, such as EmbeddedId, and Embedded class.\n\t * \n\t * @param entity domain model entity\n\t */\n\tpublic void generate(Object entity) throws AAException;\n\n\t/**\n\t * Generate whole entity with cascade all. Include all sub entities, such as EmbeddedId, and Embedded class.\n\t * \n\t * @param entity domain model entity\n\t * @param ormContext ORM context.\n\t */\n\tpublic void generate(Object entity, Context ormContext) throws AAException;\n}", "String getGeneratedClassName();", "String getGeneratedClassName();", "String getGeneratedClassName();", "protected void generar() {\n generar(1, 1);\n }", "String[] getGenerators();", "public void generateAndwriteToFile() {\n List<GeneratedJavaFile> gjfs = generate();\n if (gjfs == null || gjfs.size() == 0) {\n return;\n }\n for (GeneratedJavaFile gjf : gjfs) {\n writeToFile(gjf);\n }\n }", "public interface Generator extends AutoCloseable {\n\n /** Get the name of the output (for error messages).\n * @return name of the output\n */\n String getOutputName();\n\n /** Get the generated file format.\n * @return generated file format\n */\n FileFormat getFormat();\n\n /** Start CCSDS message.\n * @param messageTypeKey key for message type\n * @param root root element for XML files\n * @param version format version\n * @throws IOException if an I/O error occurs.\n */\n void startMessage(String root, String messageTypeKey, double version) throws IOException;\n\n /** End CCSDS message.\n * @param root root element for XML files\n * @throws IOException if an I/O error occurs.\n */\n void endMessage(String root) throws IOException;\n\n /** Write comment lines.\n * @param comments comments to write\n * @throws IOException if an I/O error occurs.\n */\n void writeComments(List<String> comments) throws IOException;\n\n /** Write a single key/value entry.\n * @param key the keyword to write\n * @param value the value to write\n * @param unit output unit (may be null)\n * @param mandatory if true, null values triggers exception, otherwise they are silently ignored\n * @throws IOException if an I/O error occurs.\n */\n void writeEntry(String key, String value, Unit unit, boolean mandatory) throws IOException;\n\n /** Write a single key/value entry.\n * @param key the keyword to write\n * @param value the value to write\n * @param mandatory if true, null values triggers exception, otherwise they are silently ignored\n * @throws IOException if an I/O error occurs.\n */\n void writeEntry(String key, List<String> value, boolean mandatory) throws IOException;\n\n /** Write a single key/value entry.\n * @param key the keyword to write\n * @param value the value to write\n * @param mandatory if true, null values triggers exception, otherwise they are silently ignored\n * @throws IOException if an I/O error occurs.\n */\n void writeEntry(String key, Enum<?> value, boolean mandatory) throws IOException;\n\n /** Write a single key/value entry.\n * @param key the keyword to write\n * @param converter converter to use for dates\n * @param date the date to write\n * @param forceCalendar if true, the date is forced to calendar format\n * @param mandatory if true, null values triggers exception, otherwise they are silently ignored\n * @throws IOException if an I/O error occurs.\n */\n void writeEntry(String key, TimeConverter converter, AbsoluteDate date, boolean forceCalendar, boolean mandatory) throws IOException;\n\n /** Write a single key/value entry.\n * @param key the keyword to write\n * @param value the value to write\n * @param mandatory if true, null values triggers exception, otherwise they are silently ignored\n * @throws IOException if an I/O error occurs.\n */\n void writeEntry(String key, char value, boolean mandatory) throws IOException;\n\n /** Write a single key/value entry.\n * @param key the keyword to write\n * @param value the value to write\n * @param mandatory if true, null values triggers exception, otherwise they are silently ignored\n * @throws IOException if an I/O error occurs.\n */\n void writeEntry(String key, int value, boolean mandatory) throws IOException;\n\n /** Write a single key/value entry.\n * @param key the keyword to write\n * @param value the value to write (in SI units)\n * @param unit output unit\n * @param mandatory if true, null values triggers exception, otherwise they are silently ignored\n * @throws IOException if an I/O error occurs.\n */\n void writeEntry(String key, double value, Unit unit, boolean mandatory) throws IOException;\n\n /** Write a single key/value entry.\n * @param key the keyword to write\n * @param value the value to write (in SI units)\n * @param unit output unit\n * @param mandatory if true, null values triggers exception, otherwise they are silently ignored\n * @throws IOException if an I/O error occurs.\n */\n void writeEntry(String key, Double value, Unit unit, boolean mandatory) throws IOException;\n\n /** Finish current line.\n * @throws IOException if an I/O error occurs.\n */\n void newLine() throws IOException;\n\n /** Write raw data.\n * @param data raw data to write\n * @throws IOException if an I/O error occurs.\n */\n void writeRawData(char data) throws IOException;\n\n /** Write raw data.\n * @param data raw data to write\n * @throws IOException if an I/O error occurs.\n */\n void writeRawData(CharSequence data) throws IOException;\n\n /** Enter into a new section.\n * @param name section name\n * @throws IOException if an I/O error occurs.\n */\n void enterSection(String name) throws IOException;\n\n /** Exit last section.\n * @return section name\n * @throws IOException if an I/O error occurs.\n */\n String exitSection() throws IOException;\n\n /** Close the generator.\n * @throws IOException if an I/O error occurs.\n */\n void close() throws IOException;\n\n /** Convert a date to string value with high precision.\n * @param converter converter for dates\n * @param date date to write\n * @return date as a string (may be either a relative date or a calendar date)\n */\n String dateToString(TimeConverter converter, AbsoluteDate date);\n\n /** Convert a date to calendar string value with high precision.\n * @param converter converter for dates\n * @param date date to write\n * @return date as a calendar string\n * @since 12.0\n */\n String dateToCalendarString(TimeConverter converter, AbsoluteDate date);\n\n /** Convert a date to string value with high precision.\n * @param year year\n * @param month month\n * @param day day\n * @param hour hour\n * @param minute minute\n * @param seconds seconds\n * @return date as a string\n */\n String dateToString(int year, int month, int day, int hour, int minute, double seconds);\n\n /** Convert a double to string value with high precision.\n * <p>\n * We don't want to loose internal accuracy when writing doubles\n * but we also don't want to have ugly representations like STEP = 1.25000000000000000\n * so we try a few simple formats first and fall back to scientific notation\n * if it doesn't work.\n * </p>\n * @param value value to format\n * @return formatted value, with all original value accuracy preserved, or null\n * if value is null or {@code Double.NaN}\n */\n String doubleToString(double value);\n\n /** Convert a list of units to a bracketed string.\n * @param units lists to output (may be null or empty)\n * @return bracketed string (null if units list is null or empty)\n */\n String unitsListToString(List<Unit> units);\n\n /** Convert a SI unit name to a CCSDS name.\n * @param siName si unit name\n * @return CCSDS name for the unit\n */\n String siToCcsdsName(String siName);\n\n}", "private void _generate() {\n System.out.println(\"Started...\");\n try {\n log_ = new PrintStream(new FileOutputStream(System.getProperty(\"user.dir\") +\n \"\\\\\" + LOG_FILE));\n //writer_.start(); \n\t for (int i = 0; i < instances_[CS_C_UNIV].num; i++) {\n\t _generateUniv(i + startIndex_);\n\t }\n \n //writer_.end();\n log_.close();\n }\n catch (IOException e) {\n System.out.println(\"Failed to create log file!\");\n }\n System.out.println(\"Completed!\");\n }", "@Override\n public String generaCodigo() {\n return \"\";\n }", "public interface LinkGenerator {\n\n String ATTRIBUTE_CONTROLLER = \"controller\";\n String ATTRIBUTE_RESOURCE = \"resource\";\n String ATTRIBUTE_ACTION = \"action\";\n String ATTRIBUTE_METHOD = \"method\";\n String ATTRIBUTE_URI = \"uri\";\n String ATTRIBUTE_RELATIVE_URI = \"relativeUri\";\n String ATTRIBUTE_INCLUDE_CONTEXT = \"includeContext\";\n String ATTRIBUTE_CONTEXT_PATH = \"contextPath\";\n String ATTRIBUTE_URL = \"url\";\n String ATTRIBUTE_BASE = \"base\";\n String ATTRIBUTE_ABSOLUTE = \"absolute\";\n String ATTRIBUTE_ID = \"id\";\n String ATTRIBUTE_FRAGMENT = \"fragment\";\n String ATTRIBUTE_PARAMS = \"params\";\n String ATTRIBUTE_MAPPING = \"mapping\";\n String ATTRIBUTE_EVENT = \"event\";\n String ATTRIBUTE_ELEMENT_ID = \"elementId\";\n String ATTRIBUTE_PLUGIN = \"plugin\";\n String ATTRIBUTE_NAMESPACE = \"namespace\";\n \n\n Set<String> LINK_ATTRIBUTES = CollectionUtils.newSet(\n ATTRIBUTE_RESOURCE,\n ATTRIBUTE_METHOD,\n ATTRIBUTE_CONTROLLER,\n ATTRIBUTE_ACTION,\n ATTRIBUTE_URI,\n ATTRIBUTE_RELATIVE_URI,\n ATTRIBUTE_CONTEXT_PATH,\n ATTRIBUTE_URL,\n ATTRIBUTE_BASE,\n ATTRIBUTE_ABSOLUTE,\n ATTRIBUTE_ID,\n ATTRIBUTE_FRAGMENT,\n ATTRIBUTE_PARAMS,\n ATTRIBUTE_MAPPING,\n ATTRIBUTE_EVENT,\n ATTRIBUTE_ELEMENT_ID,\n ATTRIBUTE_PLUGIN,\n ATTRIBUTE_NAMESPACE\n );\n\n Map<String, String> REST_RESOURCE_ACTION_TO_HTTP_METHOD_MAP = CollectionUtils.<String, String>newMap(\n \"create\", \"GET\",\n \"save\", \"POST\",\n \"show\", \"GET\",\n \"index\", \"GET\",\n \"edit\", \"GET\",\n \"update\", \"PUT\",\n \"patch\", \"PATCH\",\n \"delete\", \"DELETE\"\n );\n\n Map<String, String> REST_RESOURCE_HTTP_METHOD_TO_ACTION_MAP = CollectionUtils.<String, String>newMap(\n \"GET_ID\", \"show\",\n \"GET\", \"index\",\n \"POST\", \"save\",\n \"DELETE\", \"delete\",\n \"PUT\", \"update\",\n \"PATCH\", \"patch\"\n );\n\n\n /**\n * Generates a link to a static resource for the given named parameters.\n *\n * Possible named parameters include:\n *\n * <ul>\n * <li>base - The base path of the URL, typically an absolute server path</li>\n * <li>contextPath - The context path to link to, defaults to the servlet context path</li>\n * <li>dir - The directory to link to</li>\n * <li>file - The file to link to (relative to the directory if specified)</li>\n * <li>plugin - The plugin that provides the resource</li>\n * <li>absolute - Whether the link should be absolute or not</li>\n * </ul>\n *\n * @param params The named parameters\n * @return The link to the static resource\n */\n String resource(@SuppressWarnings(\"rawtypes\") Map params);\n\n /**\n * Generates a link to a controller, action or URI for the given named parameters.\n *\n * Possible named parameters include:\n *\n * <ul>\n * <li>resource - If linking to a REST resource, the name of the resource or resource path to link to. Either 'resource' or 'controller' should be specified, but not both</li>\n * <li>controller - The name of the controller to use in the link, if not specified the current controller will be linked</li>\n * <li>action - The name of the action to use in the link, if not specified the default action will be linked</li>\n * <li>uri - relative URI</li>\n * <li>url - A map containing the action,controller,id etc.</li>\n * <li>base - Sets the prefix to be added to the link target address, typically an absolute server URL. This overrides the behaviour of the absolute property, if both are specified.</li>\n * <li>absolute - If set to \"true\" will prefix the link target address with the value of the grails.serverURL property from Config, or http://localhost:&lt;port&gt; if no value in Config and not running in production.</li>\n * <li>contextPath - The context path to link to, defaults to the servlet context path</li>\n * <li>id - The id to use in the link</li>\n * <li>fragment - The link fragment (often called anchor tag) to use</li>\n * <li>params - A map containing URL query parameters</li>\n * <li>mapping - The named URL mapping to use to rewrite the link</li>\n * <li>event - Webflow _eventId parameter</li>\n * </ul>\n * @param params The named parameters\n * @return The generator link\n */\n String link(@SuppressWarnings(\"rawtypes\") Map params);\n\n /**\n * Generates a link to a controller, action or URI for the given named parameters.\n *\n * Possible named parameters include:\n *\n * <ul>\n * <li>resource - If linking to a REST resource, the name of the resource or resource path to link to. Either 'resource' or 'controller' should be specified, but not both</li>\n * <li>controller - The name of the controller to use in the link, if not specified the current controller will be linked</li>\n * <li>action - The name of the action to use in the link, if not specified the default action will be linked</li>\n * <li>uri - relative URI</li>\n * <li>url - A map containing the action,controller,id etc.</li>\n * <li>base - Sets the prefix to be added to the link target address, typically an absolute server URL. This overrides the behaviour of the absolute property, if both are specified.</li>\n * <li>absolute - If set to \"true\" will prefix the link target address with the value of the grails.serverURL property from Config, or http://localhost:&lt;port&gt; if no value in Config and not running in production.</li>\n * <li>id - The id to use in the link</li>\n * <li>fragment - The link fragment (often called anchor tag) to use</li>\n * <li>params - A map containing URL query parameters</li>\n * <li>mapping - The named URL mapping to use to rewrite the link</li>\n * <li>event - Webflow _eventId parameter</li>\n * </ul>\n * @param params The named parameters\n * @param encoding The character encoding to use\n * @return The generator link\n */\n String link(@SuppressWarnings(\"rawtypes\") Map params, String encoding);\n\n /**\n * Obtains the context path from which this link generator is operating.\n *\n * @return The base context path\n */\n String getContextPath();\n\n /**\n * The base URL of the server used for creating absolute links.\n *\n * @return The base URL of the server\n */\n String getServerBaseURL();\n}", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2014-09-03 14:59:52.264 -0400\", hash_original_method = \"994F669A59E4B3A0EE398298B336F810\", hash_generated_method = \"2BEECC6B96D4108E92CF5063E98986E9\")\n \npublic ProxyOutputStream(OutputStream proxy) {\r\n super(proxy);\r\n // the proxy is stored in a protected superclass variable named 'out'\r\n }", "@Override\r\n public void execute() throws BuildException { \r\n AbstractGenerator g;\r\n \r\n if (kind == null) {\r\n throw new BuildException(\"kind was not specified\");\r\n }\r\n final String k = kind.getValue();\r\n if (k.equals(INTERFACE)) {\r\n g = new InterfaceGen();\r\n }\r\n else if (k.equals(CRYSTAL)) {\r\n g = new CrystalGen();\r\n }\r\n else if (k.equals(OPERATOR)) {\r\n g = new OperatorGen();\r\n }\r\n else {\r\n throw new BuildException(\"Unknown kind was specified: \"+kind);\r\n }\r\n if (dest != null) {\r\n srcs.add(0, \"-out\");\r\n srcs.add(1, dest);\r\n }\r\n g.generate(srcs.toArray(new String[srcs.size()]));\r\n }", "public interface ValueGenerationManager\n{\n /**\n * Method to clear out the generators managed by this manager.\n */\n void clear();\n\n /**\n * Method to access the currently defined ValueGenerator for the specified member \"key\" (if any).\n * @param memberKey The member \"key\"\n * @return Its ValueGenerator\n */\n ValueGenerator getValueGeneratorForMemberKey(String memberKey);\n\n /**\n * Method to store a ValueGenerator for the specified member \"key\".\n * @param memberKey The member \"key\"\n * @param generator The ValueGenerator to use for that member key\n */\n void registerValueGeneratorForMemberKey(String memberKey, ValueGenerator generator);\n\n /**\n * Accessor for the \"unique\" ValueGenerator for the specified name (if any).\n * @param name The (strategy) name.\n * @return The ValueGenerator for that name\n */\n ValueGenerator getUniqueValueGeneratorByName(String name);\n\n /**\n * Simple way of generating a member \"key\" for use in lookups for datastore-identity.\n * @param cmd Metadata for the class using datastore-identity\n * @return The member \"key\" to use\n */\n String getMemberKey(AbstractClassMetaData cmd);\n\n /**\n * Simple way of generating a member \"key\" for use in lookups.\n * @param mmd Metadata for the member\n * @return The member \"key\" to use\n */\n String getMemberKey(AbstractMemberMetaData mmd);\n\n /**\n * Method to create and register a generator of the specified strategy, for the specified memberKey.\n * @param memberKey The member key\n * @param strategyName Strategy for the generator\n * @param props The properties to use\n * @return The ValueGenerator\n */\n ValueGenerator createAndRegisterValueGenerator(String memberKey, String strategyName, Properties props);\n\n /**\n * Accessor for the type of value that is generated by the ValueGenerator for the specified strategy, for the member \"key\".\n * @param strategyName The value generation strategy\n * @param memberKey The member \"key\"\n * @return The type of value generated\n */\n Class getTypeForValueGeneratorForMember(String strategyName, String memberKey);\n\n /**\n * Convenience accessor for whether the specified strategy is supported for this datastore.\n * @param strategy The strategy name\n * @return Whether it is supported\n */\n boolean supportsStrategy(String strategy);\n\n /**\n * Method to create a ValueGenerator when the generator is datastore based.\n * This is used solely by the NucleusSequence API to create a generator, but not to register it here for further use.\n * @param strategyName Strategy name\n * @param seqName Symbolic name of the generator\n * @param props Properties to control the generator\n * @param connectionProvider Provider for connections\n * @return The ValueGenerator\n */\n ValueGenerator createValueGenerator(String strategyName, String seqName, Properties props, ValueGenerationConnectionProvider connectionProvider);\n}", "public interface Generator {\n /**\n * Generates part of the output lines for each input line\n * One outline for each:\n * -Given\n * -Postfix\n * -Postfix Evaluation\n * @param outputLine - string to be appended\n * @param index - index of the input line being processed\n */\n public void generateOutputLine(String outputLine, int index);\n}", "public interface MISPLicenseGenerator<T> {\r\n\t/**\r\n\t * Method that generates a license of specified length.\r\n\t * \r\n\t * @return the generated license.\r\n\t */\r\n\tpublic T generateLicense();\r\n}", "public void generate(PSGenerator gen) throws IOException {\n/* 146 */ if (this.resources == null || this.resources.size() == 0) {\n/* */ return;\n/* */ }\n/* 149 */ StringBuffer sb = new StringBuffer();\n/* 150 */ sb.append(\"%%\").append(getName()).append(\": \");\n/* 151 */ boolean first = true;\n/* 152 */ Iterator<PSResource> i = this.resources.iterator();\n/* 153 */ while (i.hasNext()) {\n/* 154 */ if (!first) {\n/* 155 */ gen.writeln(sb.toString());\n/* 156 */ sb.setLength(0);\n/* 157 */ sb.append(\"%%+ \");\n/* */ } \n/* 159 */ PSResource res = i.next();\n/* 160 */ sb.append(res.getResourceSpecification());\n/* 161 */ first = false;\n/* */ } \n/* 163 */ gen.writeln(sb.toString());\n/* */ }", "@Override\n\tpublic void generate() {\n\t\tJavaObject objectInterface = new JavaObject(interfaceType);\n\t\tif (hasFields() && getBean().get().isCompare()) {\n\t\t\tobjectInterface.addExtends(getComparableInterface());\n\t\t}\n\t\tif (bean.isExecutable()) {\n\t\t\tIJavaType type = resolve(IExecutableBean.class, bean.getReturnType());\n\t\t\tobjectInterface.addExtends(type);\n\t\t} else {\n\t\t\tIJavaType type = resolve(IBean.class);\n\t\t\tobjectInterface.addExtends(type);\n\t\t}\n\t\taddExtends(objectInterface);\n\t\tif (isImmutable()) {\n\t\t\tobjectInterface.addExtends(resolve(IImmutable.class));\n\t\t}\n\n\t\t// For each bean we generate a class\n\t\tJavaObject object = new JavaObject(classType);\n\t\tobject.addExtends(interfaceType);\n\t\taddExtends(object);\n\n\t\t// Add the fields, getters and setter methods\n\t\taddBlocks(object, objectInterface);\n\n\t\t// Done!\n\t\twrite(object);\n\t\twrite(objectInterface);\n\t}", "CreationData creationData();", "@Override\n public void startMethodGeneration() {\n byteArrayOut.addMethodStatus();\n }", "Map getGenAttributes();", "public boolean doGeneration(Class<?> clazz);", "public void generate(Object entity, Context ormContext) throws AAException;", "void generate(List<Customer> customers);", "protected MetadataUGWD() {/* intentionally empty block */}", "@Override\n public Object generate(Object o, Method method, Object... objects) {\n StringBuilder sb = new StringBuilder();\n sb.append(o.getClass().getName());\n sb.append(method.getName());\n for (Object obj : objects) {\n sb.append(obj.toString());\n }\n return sb.toString();\n }", "public Generator getGenerator(String theClass);", "public interface StringGeneratorService {\n String generateString();\n}", "private void generateData(){\n generateP50boys();\n generateP50girls();\n generateP97boys();\n generateP97girls();\n }", "public int generateRoshambo(){\n ;]\n\n }", "public interface TravelOrderCodeGenerationStrategy\n{\n\t/**\n\t * Generates a suitable unique code and sets it against the order\n\t * \n\t * @param orderModel\n\t */\n\tvoid generateTravelOrderCode(AbstractOrderModel orderModel);\n}", "public JsonGenerator createGenerator(DataOutput out)\n/* */ throws IOException\n/* */ {\n/* 1181 */ return createGenerator(_createDataOutputWrapper(out), JsonEncoding.UTF8);\n/* */ }", "private int genKey()\n {\n return (nameValue.getData() + scopeDefined.getTag()).hashCode();\n }", "public void generateCode() {\n code = java.util.UUID.randomUUID().toString();\n }", "public static String generateData() {\n\t\tStringBuilder res = new StringBuilder();\n\t\tres.append(generateID(9));\n\t\tres.append(\",\");\n\t\tres.append(\"Galsgow\");\n\t\tres.append(\",\");\n\t\tres.append(\"UK\");\n\t\tres.append(\",\");\n\t\tres.append(generateDate());\n\t\treturn res.toString();\n\t}", "@DSSafe(DSCat.SAFE_OTHERS)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:59:49.370 -0500\", hash_original_method = \"02D67B7BBDDCEC9BC9A477128D96A70E\", hash_generated_method = \"73DCA79669D2BAEA0D08C443D09F446C\")\n \npublic Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}" ]
[ "0.8226954", "0.792424", "0.78549045", "0.7177981", "0.695731", "0.6873769", "0.67692804", "0.674632", "0.67127967", "0.6707469", "0.6678337", "0.665548", "0.66452366", "0.6605502", "0.65726936", "0.6553309", "0.6546041", "0.65458405", "0.6487469", "0.6466948", "0.63739663", "0.63364846", "0.63132036", "0.6301619", "0.6259272", "0.6253912", "0.6249714", "0.6248312", "0.6239491", "0.6207303", "0.61882246", "0.61838955", "0.6161591", "0.61469007", "0.61105704", "0.61028856", "0.61004406", "0.6089157", "0.6088859", "0.6081675", "0.60697246", "0.6067062", "0.60480225", "0.6030769", "0.600866", "0.6006182", "0.6005401", "0.60018027", "0.6000073", "0.5990304", "0.5990304", "0.59842414", "0.5973568", "0.5968472", "0.5953382", "0.5931477", "0.5930323", "0.5923529", "0.5917155", "0.59039855", "0.5901798", "0.5899219", "0.5891553", "0.58898085", "0.588974", "0.58843625", "0.58628917", "0.58628917", "0.58628917", "0.5862366", "0.58621633", "0.5854599", "0.58455193", "0.5832282", "0.5823793", "0.5810024", "0.5808877", "0.5805025", "0.5802219", "0.5793297", "0.5787091", "0.5783658", "0.5770521", "0.5765979", "0.5765396", "0.57574654", "0.57520294", "0.5746937", "0.57453007", "0.57381487", "0.5737618", "0.57369727", "0.5736131", "0.57236105", "0.57234234", "0.57230157", "0.5719228", "0.57187814", "0.57169056", "0.5709034", "0.57078975" ]
0.0
-1
!: invoke day generation
protected void genObjectsTx(GenCtx ctx, Date day) throws GenesisError { genObjects(ctx, day); //~: mark that day for(Entry e : getEntries()) if(e.getGenesis() instanceof DaysGenPart) ((DaysGenPart)e.getGenesis()).markDayGenerated(ctx); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void runEachDay() {\n \n }", "@SuppressWarnings(\"unchecked\")\n\tprotected void genObjects(GenCtx ctx, Date day)\n\t throws GenesisError\n\t{\n\t\tEntry[] entries = selectEntries(ctx, genObjsNumber(ctx));\n\t\tMap inds = new IdentityHashMap(getEntries().length);\n\n\t\t//~: put initial in-day indices\n\t\tfor(Entry e : getEntries())\n\t\t\tinds.put(e, 0);\n\n\t\t//c: for all the objects number of the day\n\t\tfor(int ei = 0;(ei < entries.length);ei++)\n\t\t{\n\t\t\t//~: find present per-day index\n\t\t\tint i = (Integer)inds.get(entries[ei]);\n\n\t\t\t//~: and store it in the context\n\t\t\tctx.set(DAYI, i + 1); //<-- starting from 1, not 0\n\n\t\t\t//~: generate the in-day time\n\t\t\tctx.set(TIME, genDayTime(ctx, day, ei + 1, entries.length));\n\n\t\t\t//!: call the genesis unit\n\t\t\tif(callGenesis(ctx, entries[ei]))\n\t\t\t{\n\t\t\t\t//~: update per-day counter\n\t\t\t\tinds.put(entries[ei], i + 1);\n\n\t\t\t\t//~: update total counter\n\t\t\t\tif(total.containsKey(entries[ei]))\n\t\t\t\t\ttotal.put(entries[ei], 1 + total.get(entries[ei]));\n\t\t\t\telse\n\t\t\t\t\ttotal.put(entries[ei], 1);\n\t\t\t}\n\n\t\t\tctx.set(TIME, null);\n\t\t}\n\n\t\t//~: write to the log\n\t\tlogGen(ctx, day, inds);\n\t}", "private RepeatWeekdays() {}", "@Override\n public Date generate() {\n int year = 2000 + Rng.instance().nextInt(20);\n int date = Rng.instance().nextInt(28) + 1;\n int month = Rng.instance().nextInt(10) + 1;\n\n Calendar calendar = Calendar.getInstance();\n calendar.set(year, month, date);\n\n return calendar.getTime();\n }", "public int determineDayRandomly() {\n\t\treturn 0;\r\n\t}", "public void generateSchedule(){\n\t\t\n\t}", "public void generate(GenCtx ctx)\n\t throws GenesisError\n\t{\n\t\tif((getEntries() == null) || (getEntries().length == 0))\n\t\t\treturn;\n\n\t\t//~: the start day (inclusive)\n\t\tDate curDay = findFirstGenDate(ctx);\n\t\tif(curDay == null) return;\n\n\t\t//~: the final day (inclusive)\n\t\tDate endDay = findLastGenDate(ctx);\n\t\tif(endDay == null) return;\n\n\t\t//c: generate till the last day\n\t\twhile(!curDay.after(endDay))\n\t\t{\n\t\t\t//~: set the day parameter of the context\n\t\t\tctx.set(DAY, curDay);\n\n\t\t\tgenObjectsTxDisp(ctx, curDay);\n\t\t\tcurDay = DU.addDaysClean(curDay, +1);\n\n\t\t\tctx.set(DAY, null);\n\t\t}\n\n\t\t//?: {has test} run it\n\t\tif(getTest() != null)\n\t\t\tgetTest().testGenesis(ctx);\n\t}", "protected abstract void calcNextDate();", "public static void boarDay (Grid grid) {\n grid.weekday = dateArray[(int) (Math.random() * 7)];\n }", "public void setDay(int day) {\r\n this.day = day;\r\n }", "public void setDay(int day)\n {\n this.day = day;\n }", "private void incrementeDate() {\n dateSimulation++;\n }", "public static Date createDate(int yyyy, int month, int day) {\n/* 75 */ CALENDAR.clear();\n/* 76 */ CALENDAR.set(yyyy, month - 1, day);\n/* 77 */ return CALENDAR.getTime();\n/* */ }", "public void setupDays() {\n\n //if(days.isEmpty()) {\n days.clear();\n int day_number = today.getActualMaximum(Calendar.DAY_OF_MONTH);\n SimpleDateFormat sdf = new SimpleDateFormat(\"EEEE\");\n SimpleDateFormat sdfMonth = new SimpleDateFormat(\"MMM\");\n today.set(Calendar.DATE, 1);\n for (int i = 1; i <= day_number; i++) {\n OrariAttivita data = new OrariAttivita();\n data.setId_utente(mActualUser.getID());\n\n //Trasformare in sql date\n java.sql.Date sqldate = new java.sql.Date(today.getTimeInMillis());\n data.setGiorno(sqldate.toString());\n\n data.setDay(i);\n data.setMonth(today.get(Calendar.MONTH) + 1);\n\n data.setDay_of_week(today.get(Calendar.DAY_OF_WEEK));\n Date date = today.getTime();\n String day_name = sdf.format(date);\n data.setDay_name(day_name);\n data.setMonth_name(sdfMonth.format(date));\n\n int indice;\n\n if (!attivitaMensili.isEmpty()) {\n if ((indice = attivitaMensili.indexOf(data)) > -1) {\n OrariAttivita temp = attivitaMensili.get(indice);\n if (temp.getOre_totali() == 0.5) {\n int occurence = Collections.frequency(attivitaMensili, temp);\n if (occurence == 2) {\n for (OrariAttivita other : attivitaMensili) {\n if (other.equals(temp) && other.getCommessa() != temp.getCommessa()) {\n data.setOtherHalf(other);\n data.getOtherHalf().setModifica(true);\n }\n }\n\n }\n }\n data.setFromOld(temp);\n data.setModifica(true);\n }\n }\n isFerie(data);\n\n\n //Aggiungi la data alla lista\n days.add(data);\n\n //Aggiugni un giorno alla data attuale\n today.add(Calendar.DATE, 1);\n }\n\n today.setTime(actualDate);\n\n mCalendarAdapter.notifyDataSetChanged();\n mCalendarList.setAdapter(mCalendarAdapter);\n showProgress(false);\n }", "private void nextDay() {\r\n tmp.setDay(tmp.getDay() + 1);\r\n int nd = tmp.getDayOfWeek();\r\n nd++;\r\n if (nd > daysInWeek) nd -= daysInWeek;\r\n tmp.setDayOfWeek(nd);\r\n upDMYcountDMYcount();\r\n }", "public static void main(String[] args) {\n // TODO code application logic here\n //Percipitation p = new Percipitation(\"cm(s)\", 10);\n //Random rand = new Random();\n //System.out.println(rand.nextInt(2));\n System.out.println(\"Welcome to Weather-Tron. Here's your report: \");\n for(int i = 1 ; i <= 10; i++){\n System.out.println(\"Day \" + i + \" :\");\n Day day = new Day(); \n }\n \n }", "Integer getDay();", "private void changeNextDay(){\n\t\tplanet.getClimate().nextDay();\n\t}", "@Override\n\t\tpublic WeekDay1 nextDay() {\n\t\t\treturn SUN;\n\t\t}", "private void creatBirth(){\n\n for (int i = 0; i < repeatLunar.size() - 1; i++) {\n mLunar = repeatLunar.get(i);\n mLunarDay = mLunar.getLunarDay();\n mLunarMonth = mLunar.getLunarMonth();\n mLunarYear = mLunar.getLunarYear();\n mRepeat = mLunar.getRepeat();\n\n createEvent(getDate(mLunarYear, mLunarMonth, mLunarDay));\n\n\n }\n\n\n\n }", "public void incrementDay(){\n //Step 1\n this.currentDate.incrementDay();\n //step2\n if (this.getSavingsAccount() != null)\n this.getSavingsAccount().incrementDay();\n if (this.getCheckingAccount() != null)\n this.getCheckingAccount().incrementDay();\n if (this.getMoneyMarketAccount() != null)\n this.getMoneyMarketAccount().incrementDay();\n if (this.getCreditCardAccount() != null)\n this.getCreditCardAccount().incrementDay();\n //step 3\n if (this.getDate().getDay() == 1) {\n \n if (this.getSavingsAccount() != null)\n this.getSavingsAccount().incrementMonth();\n if (this.getCheckingAccount() != null)\n this.getCheckingAccount().incrementMonth();\n if (this.getMoneyMarketAccount() != null)\n this.getMoneyMarketAccount().incrementMonth();\n if (this.getCreditCardAccount() != null)\n this.getCreditCardAccount().incrementMonth();\n }\n \n }", "private static void incrementDate() {\n\t\ttry {\r\n\t\t\tint days = Integer.valueOf(input(\"Enter number of days: \")).intValue();\r\n\t\t\tcalculator.incrementDate(days); // variable name changes CAL to calculator\r\n\t\t\tlibrary.checkCurrentLoans(); // variable name changes LIB to library\r\n\t\t\toutput(sdf.format(cal.date())); // variable name changes SDF to sdf , CAL to cal , method changes Date() to date()\r\n\t\t\t\r\n\t\t} catch (NumberFormatException e) {\r\n\t\t\t output(\"\\nInvalid number of days\\n\");\r\n\t\t}\r\n\t}", "public void nextDay() {\r\n\t\tif (day >= daysPerMonth[month] && !(month == 2 && day == 28) && !(month == 12 && day == 31)) {\r\n\t\t\tthis.month++;\r\n\t\t\tthis.day = 1;\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\r\n\t\telse if (month == 2 && day == 28 && !(year % 400 == 0 || (year % 4 == 0 && year % 100 != 0))) {\r\n\t\t\tthis.month++;\r\n\t\t\tthis.day = 1;\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\r\n\t\telse if (month == 12 && day == 31) {\r\n\t\t\tthis.year++;\r\n\t\t\tthis.month = 1;\r\n\t\t\tthis.day = 1;\r\n\t\t\tSystem.out.println(\"\\nhappy new year!!!\\n\");\r\n\t\t}\r\n\r\n\t\telse\r\n\t\t\tthis.day++;\r\n\t}", "public void setDay(Date day) {\r\n this.day = day;\r\n }", "public void setDay(Date day) {\r\n this.day = day;\r\n }", "public void setDay(Date day) {\r\n this.day = day;\r\n }", "public void setDay(Date day) {\r\n this.day = day;\r\n }", "public void setDay(Date day) {\r\n this.day = day;\r\n }", "public TypicalDay() {\n\t\tnbDeliveries = 0;\n\t\twareHouse = -1;\n\t}", "void displaySpecifiedDayList();", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint[] arr = {31,28,31,30,31,30,31,31,30,31,30,31};\n\t\tString[] day = {\"SUN\",\"MON\",\"TUE\",\"WED\",\"THU\",\"FRI\",\"SAT\"};\n\t\tint month = sc.nextInt();\n\t\tint date = sc.nextInt();\n\t\tint result = date;\n\t\tfor(int i=0; i<month-1;i++) {\n\t\t\tresult += arr[i];\n\t\t}\n\t\tSystem.out.println(day[result % 7]);\n\t}", "public void setDay(int day) {\n\t\tthis.day = day;\n\t}", "public void setDay(int day) {\n\t\tthis.day = day;\n\t}", "@Override\n\tpublic void proceedNewDay(int p_date) \n\t\t\tthrows RemoteException \n\t{\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "public void produceDateFromDay(String dayInput, int plus) {\n LocalDate date = null;\n \n if (plus == 2) {\n date = LocalDate.now().plusWeeks(1);\n } else if (plus == 3) {\n date = LocalDate.now().plusMonths(1);\n } else if (plus == 4) {\n date = LocalDate.now().plusYears(1);\n } else if (plus == 5) {\n date = LocalDate.now();\n } else if (plus == 6) {\n date = LocalDate.now().plusDays(1);\n } else {\n for (int n = 0; n < Constants.DAYS_LIST.length; n++) {\n if (dayInput.toLowerCase().matches(Constants.DAYS_LIST[n])) {\n int days = (n+1) - LocalDate.now().getDayOfWeek().getValue();\n\n if (days >= 0) {\n if (plus == 1) {\n date = LocalDate.now().plusDays(days+7);\n } else {\n date = LocalDate.now().plusDays(days);\n }\n } else {\n date = LocalDate.now().plusDays(days+7);\n }\n\n break;\n }\n }\n }\n startDate = date.getDayOfMonth() + \"/\" + date.getMonthValue() + \"/\" +date.getYear();\n }", "public void setDay(Date day) {\n this.day = day;\n }", "public Day()\n\t{\n\t\tthis(TimeZone.getDefault(), new Date());\n\t}", "public int getDay()\n {\n return day;\n }", "void dailyLife() {\n\t\tString action = inputPrompt.dailyOptions(dailyTime).toLowerCase();\r\n\t\tswitch(action) {\r\n\t\tcase \"exercise\":\tthis.exercise();\r\n\t\t\t\t\t\t\tbreak;\r\n\t\tcase \"study\":\t\tthis.study();\r\n\t\t\t\t\t\t\tbreak;\r\n\t\tcase \"rocket\":\t\tthis.buildRocket();\r\n\t\t\t\t\t\t\tbreak;\r\n\t\tcase \"eat\":\t\t\tthis.eat();\r\n\t\t\t\t\t\t\tbreak;\r\n\t\tcase \"meds\":\t\tthis.getEnergised();\r\n\t\t\t\t\t\t\tbreak;\r\n\t\tcase \"fun\":\t\t\tthis.haveFun();\r\n\t\t\t\t\t\t\tbreak;\r\n\t\tdefault:\t\t\tdailyLife();\r\n\t\t}\t\r\n\t}", "public void setCalDay() {\n\t\tfloat goal_bmr;\n\t\tif(gender==\"male\") {\n\t\t\tgoal_bmr= (float) (10 * (weight+loseGainPerWeek) + 6.25 * height - 5 * age + 5);\n\t\t}\n\t\telse {\n\t\t\tgoal_bmr=(float) (10 * (weight+loseGainPerWeek) + 6.25 * height - 5 * age - 161);\n\t\t}\n\t\tswitch (gymFrequency) {\n\t\tcase 0:calDay = goal_bmr*1.2;\n\t\t\t\tbreak;\n\t\tcase 1:\n\t\tcase 2:\n\t\tcase 3:calDay = goal_bmr*1.375;\n\t\t\t\tbreak;\n\t\tcase 4:\n\t\tcase 5:calDay = goal_bmr*1.55;\n\t\t\n\t\t\t\tbreak;\n\t\tcase 6:\n\t\tcase 7:calDay = goal_bmr*1.725;\n\t\t\t\tbreak;\n\t\t}\n\t}", "protected void runEachHour() {\n \n }", "@Test\r\n public void test14()\r\n {\r\n \tPaymentImpl p1 = null;\r\n \tString day = \"\";\t\t\r\n \t\r\n \ttry{\r\n \t\tp1 = new PaymentImpl(getCalendar(\"ltu.CalenderSaturday\"));\r\n \t\tday = p1.getNextPaymentDay();\r\n \t\tassertEquals(day, \"20160429\");\r\n \t}catch(AssertionError err){\r\n \t\tSystem.out.println(\"Test 14, correct : 20160429, got : \" + day);\r\n \t} catch (IOException e) {\r\n\t\t\tSystem.out.println(\"Clouldn't load the calender\");\r\n\t\t}\r\n }", "public void createTempSpecialDayTrainSchedule(Timestamp date);", "public void toPunish() {\n\n //// TODO: 24/03/2017 delete the following lines\n// dalDynamic.addRowToTable2(\"23/03/2017\",\"Thursday\",4,walkingLength,deviation)\n\n\n\n int dev,sum=0;\n long id;\n id=dalDynamic.getRecordIdAccordingToRecordName(\"minutesWalkTillEvening\");\n Calendar now = Calendar.getInstance();//today\n Calendar calendar = Calendar.getInstance();\n SimpleDateFormat dateFormat=new SimpleDateFormat(\"dd/MM/yyyy\");\n String date;\n for (int i = 0; i <DAYS_DEVIATION ; i++) {\n date=dateFormat.format(calendar.getTime());\n Log.v(\"Statistic\",\"date \"+date);\n dev = dalDynamic.getDeviationAccordingToeventTypeIdAnddate(id,date);\n sum+=dev;\n calendar.add(Calendar.DATE,-1);//// TODO: -1-i????\n }\n if(sum==DAYS_DEVIATION){\n Intent intent = new Intent(context,BlankActivity.class);\n context.startActivity(intent);\n //todo:punishment\n }\n\n }", "public static void main(String[] args) {\n\t\r\n\tlogger.info(\"{}\" , addDay(new Date(),1));\r\n\t\r\n}", "public static void main(String[] args) {\n\n LocalDate today = LocalDate.now();\n System.out.println(\"today = \" + today);\n\n LocalDate tomorrow = today.plus(1, ChronoUnit.DAYS);\n System.out.println(\"tomorrow = \" + tomorrow );\n\n LocalDate yesterday = tomorrow.minusDays(2);\n System.out.println(\"yesterday = \" + yesterday);\n\n LocalDate independenceDay = LocalDate.of(2019, Month.DECEMBER, 11);\n DayOfWeek dayOfWeek = independenceDay.getDayOfWeek();\n System.out.println(\"dayOfWeek = \" + dayOfWeek);\n\n\n\n\n }", "public int getDay() {\n return day;\n }", "public int getDay() {\r\n return day;\r\n }", "public void inputDay () {\n\t\tSystem.out.print(\"Enter a day: \");\r\n\t\tday = input.nextInt();\r\n\r\n\t}", "public static String generateCurrentDayString() {\n\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\treturn dateFormat.format(new Date());\n\t}", "Integer getStartDay();", "private String dayName() {\n int arrayDay = (day + month + year + (year/4) + (year/100) % 4) % 7;\n return dayName[arrayDay];\n }", "public void goToToday() {\n goToDate(today());\n }", "public void setDay(final int day) {\n\t\tthis.day = day;\n\t}", "public void verifyDate(){\n\n // currentDateandTime dataSingleton.getDay().getDate();\n\n }", "public String randomDateGenerator() {\n\n\t\tLocalDate startDate = LocalDate.now();\n\n\t\tint year = startDate.getYear();\n\t\tint month = startDate.getMonthValue();\n\t\tint day = startDate.getDayOfMonth();\n\n\t\tLocalDate endDate = LocalDate.of(year + 1, month, day);\n\n\t\tlong randomDate = randBetween(startDate.toEpochDay(), endDate.toEpochDay());\n\t\treturn LocalDate.ofEpochDay(randomDate).toString();\n\n\t}", "private String getRandomDate() {\n\t\tint currentYear = Calendar.getInstance().get(Calendar.YEAR); \t\t\n\t\tint year = (int) Math.round(Math.random()*(currentYear-1950)+1950); \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// between 1950 and currentYear\n\t\tint month = (int) Math.round(Math.floor(Math.random()*11)+1);\t\t\n\t\t// 3. select a random day in the selected month\n\t\t// 3.1 prepare an array to store how many days in each month\n\t\tint[] months = new int[]{31,28,30,30,31,30,31,31,30,31,30,31};\n\t\t// 3.2 if it is a leap year, feb (months[1]) should be 29\n\t\tif ((currentYear % 4 == 0) && ((currentYear % 100 != 0) || (currentYear % 400 == 0))) {\n\t\t\tmonths[1] = 29;\n\t\t}\n\t\tlong day = Math.round(Math.floor(Math.random()*(months[month-1]-1)+1));\n\t\treturn \"\"+year+\"-\"+month+\"-\"+day;\n\t}", "private String getFileOftheDay() throws IOException {\n Calendar calendar = Calendar.getInstance();\n int day = calendar.get(Calendar.DAY_OF_WEEK);\n if (Calendar.SUNDAY == day) {\n day = Calendar.SATURDAY;\n } else if (Calendar.MONDAY <= day && Calendar.SATURDAY >= day) {\n day -= 1;\n }\n return (pathFiles + \"h_\" + day + \"_\" + getCustomerCode() + \".xml\");\n }", "public int getDay() {\n\treturn day;\n }", "Date getStartDay();", "public static void main(String[] args) {\n LocalDate[] dates=new LocalDate[10];\n\n for (int i = 0; i <dates.length ; i++) {\n dates[i] = LocalDate.now().plusDays(i+1);\n }\n System.out.println(Arrays.toString(dates));\n for (LocalDate each:dates){\n System.out.println(each.format(DateTimeFormatter.ofPattern(\"MMMM/dd, EEEE\")));\n }\n\n\n }", "private void setDay() {\n Boolean result = false;\n for (int i = 0; i < 7; ++i) {\n if(mAlarmDetails.getRepeatingDay(i))\n result = true;\n mAlarmDetails.setRepeatingDay(i, mAlarmDetails.getRepeatingDay(i));\n }\n if(!result)\n mAlarmDetails.setRepeatingDay((Calendar.getInstance().get(Calendar.DAY_OF_WEEK) - 1), true);\n }", "public static void dayOfWeek(){\n\t\t int x , y0 , m0 , d0;\n\t\t \n\t\t System.out.println(\"enter day month and year\");\n\t\t int day = scanner.nextInt();\n\t\t int month = scanner.nextInt();\n\t\t int year = scanner.nextInt();\n\t\t\n\t\ty0 = year - (14-month) / 12;\n\t\tx = y0 + y0 / 4-y0 / 100+y0 / 400;\n\t\tm0 = month + 12 * ((14-month)/12) -2;\n\t\td0 =(day+x+(31*m0) / 12) % 7;\n\t\t\n\t\tswitch(d0)\n\t\t{\n\t\t\tcase 0:\n\t\t\t\tSystem.out.println(\"it is sunday\");\n\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 1:\n\t\t\t\tSystem.out.println(\"it is monday\");\n\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 2:\n\t\t\t\tSystem.out.println(\"it is tuesday\");\n\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 3:\n\t\t\t\tSystem.out.println(\"it is wednesday\");\n\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 4:\n\t\t\t\tSystem.out.println(\"it is thursday\");\n\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 5:\n\t\t\t\tSystem.out.println(\"it is friday\");\n\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 6:\n\t\t\t\tSystem.out.println(\"it is saturday\");\n\t\t\tbreak;\n\t\t}\n\t\t\t\n\t}", "public int getDay(){\n\t return this.day;\n }", "private void makeDayButtons() \n\t{\n\t\t\n\t\tSystem.out.println(monthMaxDays);\n\t\tfor (int i = 1; i <= monthMaxDays; i++) \n\t\t{\n\t\t\t//the first day starts from 1\n\t\t\tfinal int dayNumber = i;\n\t\t\t\n\t\t\t//create new button\n\t\t\tJButton day = new JButton(Integer.toString(dayNumber));\n\t\t\tday.setBackground(Color.WHITE);\n\t\n\t\t\t//attach a listener\n\t\t\tday.addActionListener(new \n\t\t\t\t\tActionListener() \n\t\t\t\t\t{\n\t\t\t\t\t\tpublic void actionPerformed(ActionEvent arg0) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//if button is pressed, highlight it \n\t\t\t\t\t\t\tborderSelected(dayNumber -1);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//show the event items in the box on the right\n\t\t\t\t\t\t\twriteEvents(dayNumber);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tchangeDateLabel(dayNumber);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//make these buttons available for use\n\t\t\t\t\t\t\tnextDay.setEnabled(true);\n\t\t\t\t\t\t\tprevDay.setEnabled(true);\n\t\t\t\t\t\t\tcreateButton.setEnabled(true);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\n\t\t\t//add this button to the day button ArrayList\n\t\t\tbuttonArray.add(day);\n\t\t}\n\t}", "public void downloadDay(){\n\n}", "public static void main(String args[]){\n\t\tTimeUtil.getBetweenDays(\"2019-01-01\",TimeUtil.dateToStr(new Date(), \"-\"));\n\t\t\n\t\t/*\tTimeUtil tu=new TimeUtil();\n\t\t\tString r=tu.ADD_DAY(\"2009-12-20\", 20);\n\t\t\tSystem.err.println(r);\n\t\t\tString [] a= TimeUtil.getPerNyyMMdd(\"20080808\", \"4\",9);\n\t\t\tfor(int i=0;i<a.length;i++){\n\t\t\t\tSystem.out.println(a[i]);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tSystem.out.println(TimeUtil.getPerNyyMMdd(\"20080808\", \"1\",9));\n\t\t\tSystem.out.println(TimeUtil.getPerNyyMMdd(\"20080808\", \"2\",3));\n\t\t\tSystem.out.println(TimeUtil.getPerNyyMMdd(\"20080808\", \"3\",3));\n\t\t\tSystem.out.println(TimeUtil.getPerNyyMMdd(\"20080808\", \"4\",3));\n\t*/\n\t\tTimeUtil tu=new TimeUtil();\n\t//\tString newDate = TimeUtil.getDateOfCountMonth(\"2011-03-31\", 6);\n\t//\tSystem.out.println(newDate);\n//\t\tSystem.err.println(tu.getDateTime(\"\")+\"|\");\n\t\t\n\t\t}", "public int getDay(){\n\t\treturn day;\n\t}", "public void processForDays(){\r\n\t\tboolean inDaySection = false;\r\n\t\tint dataSize;\r\n\t\tfor(int i=0; i<Constant.dataList.size(); i++){\r\n\t\t\tString line = Constant.dataList.get(i);\r\n\t\t\tString[] linesplit = line.split(\",\");\r\n\t\t\tdataSize = linesplit.length;\r\n\t\t\t\r\n\t\t\tif (i==0) {\r\n//\t\t\t\tConstant.dataList.set(i, \"Days,Dummy,\" + line);\r\n\t\t\t\tConstant.dayDataList.add(\"Days,Dummy,\"+linesplit[0]+\",\"+linesplit[1]+\",\"+\"Day00\");\r\n\t\t\t}\r\n\t\t\telse if(linesplit[1].equals(\"PM10\")){\r\n\t\t\t\tString m,a,e,n;\r\n//\t\t\t\tm = \"M,1000,\"+linesplit[0]+\"m,\"+linesplit[1];\r\n//\t\t\t\ta = \"A,1000,\"+linesplit[0]+\"a,\"+linesplit[1];\r\n//\t\t\t\te = \"E,1000,\"+linesplit[0]+\"e,\"+linesplit[1];\r\n//\t\t\t\tn = \"N,1000,\"+linesplit[0]+\"n,\"+linesplit[1];\r\n\t\t\t\t//morning,afternoon,evening\r\n\t\t\t\tfor(int j=0; j<4; j++){\r\n\t\t\t\t\tfor(int k=0; k<2; k++){\r\n\t\t\t\t\t\tif(j==0){\r\n\t\t\t\t\t\t\tif(k+7<dataSize){\r\n//\t\t\t\t\t\t\t\tm = m + \",\" + linesplit[k+7];\r\n\t\t\t\t\t\t\t\tm = \"Morning,1000,\"+linesplit[0]+\"m-\"+k+\",\"+linesplit[1]+\",\"+linesplit[k+7];\r\n\t\t\t\t\t\t\t\tConstant.dayDataList.add(m);\r\n\t\t\t\t\t\t\t}\r\n//\t\t\t\t\t\t\telse{\r\n//\t\t\t\t\t\t\t\tm = m + \",\";\r\n//\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse if(j==1){\r\n\t\t\t\t\t\t\tif(k+13<dataSize){\r\n//\t\t\t\t\t\t\t\ta = a + \",\" + linesplit[k+13];\r\n\t\t\t\t\t\t\t\ta = \"Afternoon,1000,\"+linesplit[0]+\"a-\"+k+\",\"+linesplit[1]+\",\"+linesplit[k+13];\r\n\t\t\t\t\t\t\t\tConstant.dayDataList.add(a);\r\n\t\t\t\t\t\t\t}\r\n//\t\t\t\t\t\t\telse{\r\n//\t\t\t\t\t\t\t\ta = a + \",\";\r\n//\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse if(j==2){\r\n\t\t\t\t\t\t\tif(k+19<dataSize){\r\n//\t\t\t\t\t\t\t\te = e + \",\" + linesplit[k+19];\r\n\t\t\t\t\t\t\t\te = \"Evening,1000,\"+linesplit[0]+\"e-\"+k+\",\"+linesplit[1]+\",\"+linesplit[k+19];\r\n\t\t\t\t\t\t\t\tConstant.dayDataList.add(e);\r\n\t\t\t\t\t\t\t}\r\n//\t\t\t\t\t\t\telse{\r\n//\t\t\t\t\t\t\t\te = e + \",\";\r\n//\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\tif(k<1){\r\n\t\t\t\t\t\t\t\tif(k+25<dataSize){\r\n//\t\t\t\t\t\t\t\t\tn = n + \",\" +linesplit[k+25];\r\n\t\t\t\t\t\t\t\t\tn = \"Night,1000,\"+linesplit[0]+\"n-\"+k+\",\"+linesplit[1]+\",\"+linesplit[k+25];\r\n\t\t\t\t\t\t\t\t\tConstant.dayDataList.add(n);\r\n\t\t\t\t\t\t\t\t}\r\n//\t\t\t\t\t\t\t\telse{\r\n//\t\t\t\t\t\t\t\t\tn = n + \",\";\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\telse{\r\n\t\t\t\t\t\t\t\tif(k+1<dataSize){\r\n//\t\t\t\t\t\t\t\t\tn = n + \",\" +linesplit[k+1];\r\n\t\t\t\t\t\t\t\t\tn = \"Night,1000,\"+linesplit[0]+\"n-\"+k+\",\"+linesplit[1]+\",\"+linesplit[k+1];\r\n\t\t\t\t\t\t\t\t\tConstant.dayDataList.add(n);\r\n\t\t\t\t\t\t\t\t}\r\n//\t\t\t\t\t\t\t\telse{\r\n//\t\t\t\t\t\t\t\t\tn = n + \",\";\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}\r\n\t\t\t\t\t\r\n//\t\t\t\t\tif(j==0){\r\n//\t\t\t\t\t\tConstant.dayDataList.add(m);\r\n//\t\t\t\t\t}\r\n//\t\t\t\t\telse if(j==1){\r\n//\t\t\t\t\t\tConstant.dayDataList.add(a);\r\n//\t\t\t\t\t}\r\n//\t\t\t\t\telse if(j==2){\r\n//\t\t\t\t\t\tConstant.dayDataList.add(e);\r\n//\t\t\t\t\t}\r\n//\t\t\t\t\telse{\r\n//\t\t\t\t\t\tConstant.dayDataList.add(n);\r\n//\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\t\r\n\t\t}\r\n\t}", "public static void date(int num) {\n String date = \"\";\n // Tests for what day of the week it is by using modulus to allign with a day.\n if (num%7==0) {\n date = \"Saturday\";\n } else if (num%7 == 1) {\n date = \"Sunday\";\n } else if (num%7 == 2) {\n date = \"Monday\";\n } else if (num%7 == 3) {\n date = \"Tuesday\";\n } else if (num%7 == 4) {\n date = \"Wednesday\";\n } else if (num%7 == 5) {\n date = \"Thursday\";\n } else if (num%7 == 6) {\n date = \"Friday\";\n }\n // Prints name of day inputted date falls on.\n System.out.println(\"That day is a \"+date);\n }", "public static void main(String[] args) {\n\t\tint day=Integer.parseInt(args[0]);\n\t\tint month=Integer.parseInt(args[1]);\n\t\tint year=Integer.parseInt(args[2]);\n\t\tint arr[]=dayOfWeek(day, month, year);\n\t\tSystem.out.print(\"It is : \"+arr[0]+\" : \");\n\t\tswitch(arr[0]) {\n\t\tcase 1: System.out.println(\"January\");break;\n\t\tcase 2: System.out.println(\"February\");break;\n\t\tcase 3: System.out.println(\"March\");break;\n\t\tcase 4: System.out.println(\"April\");break;\n\t\tcase 5: System.out.println(\"May\");break;\n\t\tcase 6: System.out.println(\"June\");break;\n\t\tcase 7: System.out.println(\"July\");break;\n\t\tcase 8: System.out.println(\"August\");break;\n\t\tcase 9: System.out.println(\"September\");break;\n\t\tcase 10: System.out.println(\"October\");break;\n\t\tcase 11: System.out.println(\"November\");break;\n\t\tcase 12: System.out.println(\"December\");break;\n\t\tdefault:System.out.println(\"Error In Month\");\n\t\t}\n\t\tSystem.out.print(\"It is : \"+arr[1]+\" : \");\n\t\tswitch(arr[1]) {\n\t\tcase 0: System.out.println(\"Sunday\");break;\n\t\tcase 1: System.out.println(\"Monday\");break;\n\t\tcase 2: System.out.println(\"Tuesday\");break;\n\t\tcase 3: System.out.println(\"Wednesday\");break;\n\t\tcase 4: System.out.println(\"Thursday\");break;\n\t\tcase 5: System.out.println(\"Friday\");break;\n\t\tcase 6: System.out.println(\"Saturday\");break;\n\t\tdefault:System.out.println(\"Error In Month\");\n\t\t}\n\t}", "private void nextDate() {\r\n\t\tCalendar calendar = Calendar.getInstance();\r\n\t\tlong hourMills = this.nextHourMills;\r\n\t\tint day;\r\n\t\t\r\n\t\tcalendar.setTimeInMillis(this.nextHourMills);\r\n\t\tcalendar.add(Calendar.HOUR_OF_DAY, 1);\r\n\t\t\r\n\t\tthis.nextHourMills = calendar.getTimeInMillis();\r\n\t\t\r\n\t\tday = calendar.get(Calendar.DATE);\r\n\t\tif (day != this.day) {\r\n\t\t\t// 날짜가 바뀌었으면 calendar.set(Calendar.HOUR_OF_DAY, 0) 는 불필요. 단지 최종 날짜만 바꾸어준다.\r\n\t\t\tthis.day = day;\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// 바뀌지 않았으면\r\n\t\t\tcalendar.set(Calendar.HOUR_OF_DAY, 0);\r\n\t\t}\r\n\t\t\r\n\t\ttry {\r\n\t\t\tFile dir = new File(this.root, Long.toString(calendar.getTimeInMillis()));\r\n\t\t\tFile file = new File(dir, Long.toString(hourMills));\r\n\t\t\t\r\n\t\t\tthis.data = JSONFile.getJSONObject(file);\r\n\t\t} catch (IOException e) {\r\n\t\t\tthis.data = null;\r\n\t\t\t\r\n\t\t\tthis.date.setTimeInMillis(this.nextHourMills);\r\n\t\t}\r\n\t}", "public Date getDay() {\r\n return day;\r\n }", "public Date getDay() {\r\n return day;\r\n }", "public Date getDay() {\r\n return day;\r\n }", "public Date getDay() {\r\n return day;\r\n }", "public Date getDay() {\r\n return day;\r\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tint []month_Days={31,28 ,31,30,31,30,31,31,30,31,30,31};\r\n\t\t\r\n\t\t System.out.println(\"enter the year month date\");\r\n\t\t Scanner scan=new Scanner(System.in);\r\n\t\t int year=scan.nextInt();\r\n\t\t int month1=scan.nextInt();\r\n\t\t int date1=scan.nextInt();\r\n\t\t \r\n\t\t int new_year=year%400;\r\n\t\t int odd_days=(new_year/100)*5;\r\n\t\t new_year=(new_year-1)%100;\r\n\t\t int normal_year=new_year-new_year/4;\r\n\t\t odd_days=odd_days+(new_year/4)*2+normal_year;\r\n\t\t odd_days=odd_days%7;\r\n\t\t \r\n\t\t \r\n\t\t int sum_of_days=0;\r\n\t\t for(int i=0;i<(month1-1);i++){\r\n\t\t \tsum_of_days=sum_of_days+month_Days[i];\r\n\t\t }\r\n\t\t if(year%4==0&&year%100!=0||year%400==0&&month1>2){\r\n\t\t \tsum_of_days=sum_of_days+1;\r\n\t\t }\r\n\t\t sum_of_days=sum_of_days+date1;\r\n\t\t odd_days=(odd_days+sum_of_days%7)%7;\r\n\t\t String day=\"\";\r\n\t\t switch(odd_days){\r\n\t\t case 0:\r\n\t\t\t day=\"Sunday\";\r\n\t\t\t break;\r\n\t\t case 1:\r\n\t\t\t day=\"Monday\";\r\n\t\t\t break;\r\n\t\t case 2:\r\n\t\t\t day=\"Tuesday\";\r\n\t\t\t break;\r\n\t\t\t \r\n\t\t case 3:\r\n\t\t\t day=\"WednesDay\";\r\n\t\t\t break;\r\n\t\t case 4:\r\n\t\t\t day=\"Thursday\";\r\n\t\t\t break;\r\n\t\t case 5:\r\n\t\t\t day=\"Friday\";\r\n\t\t\t break;\r\n\t\t case 6:\r\n\t\t\t day=\"Saturday\";\r\n\t\t\t break;\r\n\t\t \r\n\t\t }\r\n\t\t System.out.println(day);\r\n\t}", "private static String makeDateUrl(String day, String times) {\n StringBuffer sb = new StringBuffer();\n sb.append(\"DAY \");\n sb.append(day);\n sb.append(\" \");\n sb.append(day);\n sb.append(\";TIME \");\n sb.append(times);\n // System.err.println(\"time:\" + sb);\n return sb.toString();\n }", "public int newDay() {\r\n\t\tfor (CrewMember crewMember : this.crewMembers) {\r\n\t\t\tcrewMember.modifyHunger(20);\r\n\t\t\tif (crewMember.hasPlague()) {\r\n\t\t\t\tcrewMember.modifyHealth(-20);\r\n\t\t\t}\r\n\t\t\tif (crewMember.getHunger() >= crewMember.getMaxHunger()) {\r\n\t\t\t\tcrewMember.modifyHealth(-20);\r\n\t\t\t}\r\n\t\t\tcrewMember.setActions(crewMember.getTiredness() < crewMember.getMaxTiredness() ? 2 : 1);\r\n\t\t}\r\n\t\treturn pruneCrewMembers();\r\n\t}", "public static void main(String[] args) {\n\t\tint d = Integer.parseInt(args[0]);\n\t\tint m = Integer.parseInt(args[1]);\n\t\tint y = Integer.parseInt(args[2]);\n\t\tint y1 = y - (14 - m) / 12;\n\t\tint x = y1 + y1 / 4 - y1 / 100 + y1 / 400;\n\t\tint m1 = m + 12 * ((14 - m) / 12) - 2;\n\t\tint d1 = (d + x + 31 * m1 / 12) % 7;\n\t\tSystem.out.println(\"day :\" + d1);\n\n\t\tswitch (d1) {\n\t\tcase 0:\n\t\t\tSystem.out.println(\"sunday\");\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tSystem.out.println(\"monday\");\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tSystem.out.println(\"tuesday\");\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tSystem.out.println(\"wednsday\");\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tSystem.out.println(\"thursday\");\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tSystem.out.println(\"friday\");\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\tSystem.out.println(\"saturday\");\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tSystem.out.println(\"invalid output\");\n\t\t\tbreak;\n\t\t}\n\t}", "public int getDay() {\n\t\treturn day;\n\t}", "public static void main(String[] args) {\n\t\tCalendar today = new GregorianCalendar();\n\t\tSystem.out.println(today);\n\t\t\n\t\tGregorianCalendar christmas = new GregorianCalendar(1970,11,5);\n\t\t\n\t\tSystem.out.println(christmas.get(Calendar.DAY_OF_WEEK));\n\t\t\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd (E)\");\n\t\tSystem.out.println(sdf.format(christmas.getGregorianChange())); // 날짜오류\n\t\t\n\t\tSystem.out.println(sdf.format(today.getTime()));\n\t\t\n\t}", "private void dayOfWeek(HplsqlParser.Expr_func_paramsContext ctx) {\n Integer v = getPartOfDate(ctx, Calendar.DAY_OF_WEEK);\n if (v != null) {\n evalInt(v);\n }\n else {\n evalNull();\n }\n }", "private void generateDefaultTimeSlots() {\n\t\tLocalTime startTime = LocalTime.of(9, 0); // 9AM start time\n\t\tLocalTime endTime = LocalTime.of(19, 0); // 5PM end time\n\n\t\tfor (int i = 1; i <= 7; i++) {\n\t\t\tList<Timeslot> timeSlots = new ArrayList<>();\n\t\t\tLocalTime currentTime = startTime.plusMinutes(15);\n\t\t\twhile (currentTime.isBefore(endTime) && currentTime.isAfter(startTime)) {\n\t\t\t\tTimeslot newSlot = new Timeslot();\n\t\t\t\tnewSlot.setTime(currentTime);\n\t\t\t\tnewSlot = timeslotRepository.save(newSlot);\n\t\t\t\ttimeSlots.add(newSlot);\n\t\t\t\tcurrentTime = currentTime.plusHours(1); // new slot after one hour\n\t\t\t}\n\t\t\tDay newDay = new Day();\n\t\t\tnewDay.setTs(timeSlots);\n\t\t\tnewDay.setDayOfWeek(DayOfWeek.of(i));\n\t\t\tdayRepository.save(newDay);\n\t\t}\n\t}", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n JDayChooser jDayChooser0 = new JDayChooser(true);\n PDFDocumentGraphics2D pDFDocumentGraphics2D0 = new PDFDocumentGraphics2D();\n JDayChooser.DecoratorButton jDayChooser_DecoratorButton0 = jDayChooser0.new DecoratorButton();\n assertTrue(jDayChooser0.isWeekOfYearVisible());\n \n jDayChooser0.setWeekOfYearVisible(true);\n jDayChooser_DecoratorButton0.paint(pDFDocumentGraphics2D0);\n jDayChooser0.drawDays();\n XML11DTDConfiguration xML11DTDConfiguration0 = new XML11DTDConfiguration();\n xML11DTDConfiguration0.getEntityResolver();\n Locale locale0 = xML11DTDConfiguration0.getLocale();\n jDayChooser0.setLocale(locale0);\n assertEquals(14, jDayChooser0.getDay());\n }", "public void generatePlan(Integer id,Date fromDate, Date toDate) throws Exception;", "public DayOfWeek primeiroDiaSemanaAno(int ano);", "private void getData(int day){\n try {\n String today = DateUtilities.getCurrentDateInString();\n DateFormat dateFormat = new SimpleDateFormat(\"dd-MM-yyyy\");\n Date currentDate = dateFormat.parse(today);\n Calendar calendar = Calendar.getInstance();\n calendar.setTime(currentDate);\n calendar.add(Calendar.DAY_OF_YEAR,-day);\n Date datebefore = calendar.getTime();\n String dateBeforeStr = dateFormat.format(datebefore);\n\n stepsTakenModels = db.stepsTakenDao().getStepsTakenInrange(dateBeforeStr,today);\n// stepsTakenModels.addAll(db.stepsTakenDao().getStepsTakenInrange(\"01-10-2019\",today));\n\n for(int i = 0 ; i < 7 ; i++){\n stepsTakenModelsLastWeek.add(stepsTakenModels.get(i));\n }\n\n for(int i = 7 ; i<stepsTakenModels.size() ; i++){\n stepsTakenModelsThisWeek.add(stepsTakenModels.get(i));\n }\n// if(stepsTakenModelsThisWeek.size()==0){\n// StepsTakenModel stepsTakenModel = new StepsTakenModel();\n// stepsTakenModel.setSteps(659);\n// stepsTakenModel.setDate(today);\n// stepsTakenModelsThisWeek.add(stepsTakenModel);\n// }\n\n }catch (Exception e){\n Log.d(\"TAG\",e.getMessage());\n }\n }", "@Override\n\t\tpublic WeekDay1 nextDay() {\n\t\t\treturn MON;\n\t\t}", "public void setDay(byte value) {\n this.day = value;\n }", "public Entry(int day) {\n\t\tthis.day = day;\n\t}", "private Day getDay(int day, int month) {\n return mainForm.getDay(day, month);\n }", "private Day(int value) {\r\n\t\tthis.value = value;\r\n\t}", "@Test public void Day_1__month__year()\t\t\t\t\t\t\t{tst_date_(\"03-31-02\"\t\t\t\t, \"2002-03-31\");}", "public void createDate(){\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy_MM_dd\"); //TODO -HHmm si dejo diagonales separa bonito en dia, pero para hacer un armado de excel creo que debo hacer un for mas\n currentDateandTime = sdf.format(new Date());\n Log.e(TAG, \"todays date is: \"+currentDateandTime );\n\n}", "public static void main(String[] args) {\n\t\tLocalDate today = LocalDate.now();\n\t\t\n\t\tLocalDate dayOffDate = today.with(temporal -> {\n\t\t\t//1. temporal로부터 기준이 되는 날짜를 구한다.\n\t\t\tLocalDate theDay = LocalDate.from(temporal);\n\t\t\t\n\t\t\t//2. 둘째, 넷째 일요일을 구한다.\n\t\t\tLocalDate secondSunday = theDay.with(dayOfWeekInMonth(2, DayOfWeek.SUNDAY));\n\t\t\tLocalDate fourthSunday = theDay.with(dayOfWeekInMonth(4, DayOfWeek.SUNDAY));\n\t\t\t\n\t\t\t//3. 기준날짜와 쉬는 날을 비교해준다.\n\t\t\t// 2번째 일요일보다 기준일이 이전이면, 쉬는날을 2번째 일요일로 리턴\n\t\t\t// 4번째 일요일보다 기준일이 이전이면, 쉬는날을 4번째 일요일로 리턴\n\t\t\t// 4번째 일요일보다 기준일이 지났으면, 쉬는날을 다음달 2번째 일요일로 리턴\n\t\t\tif(theDay.isBefore(secondSunday)) {\n\t\t\t\treturn secondSunday;\n\t\t\t}else if(theDay.isBefore(fourthSunday)) {\n\t\t\t\treturn fourthSunday;\n\t\t\t}else {\n\t\t\t\treturn theDay.plusMonths(1).with(dayOfWeekInMonth(2, DayOfWeek.SUNDAY));\n\t\t\t}\n\t\t});\n\t\t\n\t\tSystem.out.println(\"오늘 기준 다음 마트 쉬는 날은 \" + dayOffDate + \"일 입니다.\");\n\t}", "public void dayIsLike() \r\n\t{ \r\n\t\tswitch (day) \r\n\t\t{ \r\n\t\tcase MONDAY: \r\n\t\t\tSystem.out.println(\"Mondays are bad.\"); \r\n\t\t\tbreak; \r\n\t\tcase FRIDAY: \r\n\t\t\tSystem.out.println(\"Fridays are better.\"); \r\n\t\t\tbreak; \r\n\t\tcase SATURDAY: \r\n\t\t\tSystem.out.println(\"Saturdays are better.\"); \r\n\t\t\tbreak;\r\n\t\tcase SUNDAY: \r\n\t\t\tSystem.out.println(\"Weekends are best.\"); \r\n\t\t\tbreak; \r\n\t\tdefault: \r\n\t\t\tSystem.out.println(\"Midweek days are so-so.\"); \r\n\t\t\tbreak; \r\n\t\t} \r\n\t}", "public static String generateDate()\r\n\t{\r\n\t\tDate d = new Date();\r\n\t\tSimpleDateFormat datef = new SimpleDateFormat(\"YYYY_MM_dd_ss\");\r\n\t\treturn datef.format(d);\r\n\r\n\r\n\t}", "public void setDay(byte value) {\n this.day = value;\n }" ]
[ "0.74691164", "0.69458467", "0.6908332", "0.68715966", "0.6846067", "0.66031194", "0.65805554", "0.6449804", "0.64338934", "0.6293451", "0.62634283", "0.62375504", "0.62353384", "0.62108797", "0.62060606", "0.61771405", "0.6163382", "0.61617225", "0.60671264", "0.60326904", "0.60182005", "0.6008171", "0.5991803", "0.59737146", "0.59737146", "0.59737146", "0.59737146", "0.59737146", "0.5936151", "0.59282166", "0.5912659", "0.59084076", "0.59084076", "0.5905674", "0.59056115", "0.59024364", "0.58935595", "0.586919", "0.5865221", "0.5849496", "0.584161", "0.5832149", "0.5831676", "0.5827074", "0.5818778", "0.5818721", "0.5795299", "0.5792314", "0.57862544", "0.5772105", "0.5771796", "0.57689095", "0.57613647", "0.57612973", "0.576035", "0.5760214", "0.57597315", "0.5757636", "0.5748209", "0.5734542", "0.5732961", "0.572584", "0.57227117", "0.57220477", "0.5721783", "0.5712326", "0.5711739", "0.5705264", "0.56992745", "0.5699075", "0.5675532", "0.5675121", "0.5673998", "0.5673998", "0.5673998", "0.5673998", "0.5673998", "0.5673399", "0.56690603", "0.5666158", "0.5665309", "0.5657895", "0.565482", "0.56546116", "0.56516963", "0.5651648", "0.5649968", "0.564533", "0.56438595", "0.5638758", "0.56262845", "0.5623696", "0.5609102", "0.56079537", "0.5606271", "0.5597853", "0.5597661", "0.5589906", "0.55838346", "0.55825925" ]
0.6734308
5
~: select the generator entries
@SuppressWarnings("unchecked") protected void genObjects(GenCtx ctx, Date day) throws GenesisError { Entry[] entries = selectEntries(ctx, genObjsNumber(ctx)); Map inds = new IdentityHashMap(getEntries().length); //~: put initial in-day indices for(Entry e : getEntries()) inds.put(e, 0); //c: for all the objects number of the day for(int ei = 0;(ei < entries.length);ei++) { //~: find present per-day index int i = (Integer)inds.get(entries[ei]); //~: and store it in the context ctx.set(DAYI, i + 1); //<-- starting from 1, not 0 //~: generate the in-day time ctx.set(TIME, genDayTime(ctx, day, ei + 1, entries.length)); //!: call the genesis unit if(callGenesis(ctx, entries[ei])) { //~: update per-day counter inds.put(entries[ei], i + 1); //~: update total counter if(total.containsKey(entries[ei])) total.put(entries[ei], 1 + total.get(entries[ei])); else total.put(entries[ei], 1); } ctx.set(TIME, null); } //~: write to the log logGen(ctx, day, inds); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void select() {}", "public void selectorGenero(java.util.Scanner key) {\n\t\tint selector2;\n\t\tdo {\n\t\t\tSystem.out.println(\"1 para hombre 2 para mujer\");\n\t\t\tselector2 = key.nextInt();\n\t\t\t\n\t\t\tswitch(selector2) {\n\t\t\tcase 1:\n\t\t\t\tthis.setGenero(Genero.H);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tthis.setGenero(Genero.M);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}while(selector2 < 1 || selector2 > 2);\n\t\t\n\t}", "public void select();", "protected Entry[] selectEntries(GenCtx ctx, int length)\n\t{\n\t\tEntry[] result = new Entry[length];\n\n\t\t//~: get total weight\n\t\tint W = 0; for(Entry e : getEntries())\n\t\t\tif(e.getWeight() < 0) throw EX.state();\n\t\t\telse W += e.getWeight();\n\n\t\t//~: select other entries in random\n\t\tnext: for(int i = 0;(i < length);i++)\n\t\t{\n\t\t\tint x = 0, w = ctx.gen().nextInt(W);\n\n\t\t\tfor(Entry e : getEntries())\n\t\t\t\tif((x += e.getWeight()) >= w)\n\t\t\t\t{\n\t\t\t\t\tresult[i] = e;\n\t\t\t\t\tcontinue next;\n\t\t\t\t}\n\n\t\t\tthrow EX.state();\n\t\t}\n\n\t\treturn result;\n\t}", "@Override\n protected void processSelect() {\n \n }", "private List<Individual<T>> selectIndividuals(Deme<T> deme) {\n return IntStream.range(0, tournamentSize).mapToObj(i -> selRandomOp.select(deme.getIndividuals()))\n .collect(Collectors.toList());\n }", "public void select ();", "protected abstract void select();", "@Override\n\tpublic void select() {\n\t}", "Collect selectByPrimaryKey(Integer id);", "private static void DoSelection()\n\t{\n\n\t\tArrayList<Attribute> inAtts = new ArrayList<Attribute>();\n\t\tinAtts.add(new Attribute(\"Int\", \"o_orderkey\"));\n\t\tinAtts.add(new Attribute(\"Int\", \"o_custkey\"));\n\t\tinAtts.add(new Attribute(\"Str\", \"o_orderstatus\"));\n\t\tinAtts.add(new Attribute(\"Float\", \"o_totalprice\"));\n\t\tinAtts.add(new Attribute(\"Str\", \"o_orderdate\"));\n\t\tinAtts.add(new Attribute(\"Str\", \"o_orderpriority\"));\n\t\tinAtts.add(new Attribute(\"Str\", \"o_clerk\"));\n\t\tinAtts.add(new Attribute(\"Int\", \"o_shippriority\"));\n\t\tinAtts.add(new Attribute(\"Str\", \"o_comment\"));\n\n\t\tArrayList<Attribute> outAtts = new ArrayList<Attribute>();\n\t\toutAtts.add(new Attribute(\"Int\", \"att1\"));\n\t\toutAtts.add(new Attribute(\"Float\", \"att2\"));\n\t\toutAtts.add(new Attribute(\"Str\", \"att3\"));\n\t\toutAtts.add(new Attribute(\"Int\", \"att4\"));\n\n\t\tString selection = \"o_orderdate > Str (\\\"1996-12-19\\\") && o_custkey < Int (100)\";\n\n\t\tHashMap<String, String> exprs = new HashMap<String, String>();\n\t\texprs.put(\"att1\", \"o_orderkey\");\n\t\texprs.put(\"att2\", \"(o_totalprice * Float (1.5)) + Int (1)\");\n\t\texprs.put(\"att3\", \"o_orderdate + Str (\\\" this is my string\\\")\");\n\t\texprs.put(\"att4\", \"o_custkey\");\n\n\t\t// run the selection operation\n\t\ttry\n\t\t{\n\t\t\tnew Selection(inAtts, outAtts, selection, exprs, \"orders.tbl\", \"out.tbl\", \"g++\", \"cppDir/\");\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}", "abstract protected Entity selectNextEntity();", "private TupleList DirectSelect(String[] p){\n TupleList tpl = new TupleList();\n int attrnumber = Integer.parseInt(p[1]);\n String[] attrname = new String[attrnumber];\n int[] attrid = new int[attrnumber];\n String[] attrtype= new String[attrnumber];\n String classname = p[2+4*attrnumber];\n int classid = 0;\n for(int i = 0;i < attrnumber;i++){\n for (ClassTableItem item:classt.classTable) {\n if (item.classname.equals(classname) && item.attrname.equals(p[2+4*i])) {\n classid = item.classid;\n attrid[i] = item.attrid;\n attrtype[i] = item.attrtype;\n attrname[i] = p[5+4*i];\n //重命名\n\n break;\n }\n }\n }\n\n\n int sattrid = 0;\n String sattrtype = null;\n for (ClassTableItem item:classt.classTable) {\n if (item.classid == classid && item.attrname.equals(p[3+4*attrnumber])) {\n sattrid = item.attrid;\n sattrtype = item.attrtype;\n break;\n }\n }\n\n\n for(ObjectTableItem item : topt.objectTable){\n if(item.classid == classid){\n Tuple tuple = GetTuple(item.blockid,item.offset);\n if(Condition(sattrtype,tuple,sattrid,p[4*attrnumber+5])){\n //Switch\n\n for(int j = 0;j<attrnumber;j++){\n if(Integer.parseInt(p[3+4*j])==1){\n int value = Integer.parseInt(p[4+4*j]);\n int orivalue = Integer.parseInt((String)tuple.tuple[attrid[j]]);\n Object ob = value+orivalue;\n tuple.tuple[attrid[j]] = ob;\n }\n\n }\n\n\n\n tpl.addTuple(tuple);\n }\n }\n }\n for(int i =0;i<attrnumber;i++){\n attrid[i]=i;\n }\n PrintSelectResult(tpl,attrname,attrid,attrtype);\n return tpl;\n\n }", "public Iterator<Item> iterator() { return new RandomIterator();}", "private AttributesSelectionConfig generateSelect(Selector selector) {\n\n AttributesSelectionConfigGenerator attributesSelectionConfigGenerator =\n new AttributesSelectionConfigGenerator(siddhiAppString);\n preserveCodeSegmentsOf(attributesSelectionConfigGenerator);\n return attributesSelectionConfigGenerator.generateAttributesSelectionConfig(selector);\n }", "public void select(List<Object> objs, boolean selectionFlag) throws Exception;", "private TupleList InDirectSelect(String[] p){\n TupleList tpl= new TupleList();\n String classname = p[3];\n String attrname = p[4];\n String crossname = p[2];\n String[] attrtype = new String[1];\n String[] con =new String[3];\n con[0] = p[6];\n con[1] = p[7];\n con[2] = p[8];\n\n int classid = 0;\n int crossid = 0;\n String crossattrtype = null;\n int crossattrid = 0;\n for(ClassTableItem item : classt.classTable){\n if(item.classname.equals(classname)){\n classid = item.classid;\n if(attrname.equals(item.attrname))\n attrtype[0]=item.attrtype;\n }\n if(item.classname.equals(crossname)){\n crossid = item.classid;\n if(item.attrname.equals(con[0])) {\n crossattrtype = item.attrtype;\n crossattrid = item.attrid;\n }\n }\n }\n\n for(ObjectTableItem item1:topt.objectTable){\n if(item1.classid == crossid){\n Tuple tuple = GetTuple(item1.blockid,item1.offset);\n if(Condition(crossattrtype,tuple,crossattrid,con[2])){\n for(BiPointerTableItem item3: biPointerT.biPointerTable){\n if(item1.tupleid == item3.objectid&&item3.deputyid == classid){\n for(ObjectTableItem item2: topt.objectTable){\n if(item2.tupleid == item3.deputyobjectid){\n Tuple ituple = GetTuple(item2.blockid,item2.offset);\n tpl.addTuple(ituple);\n }\n }\n }\n }\n\n }\n }\n\n }\n String[] name = new String[1];\n name[0] = attrname;\n int[] id = new int[1];\n id[0] = 0;\n PrintSelectResult(tpl,name,id,attrtype);\n return tpl;\n\n\n\n\n }", "void select(int index) throws InvalidValueException;", "@Override\n\tpublic Teatask selectByMore(Teatask ta)\n\t{\n\t\treturn teataskMapper.selectByMore(ta);\n\t}", "public void testEntrySetIteratorHasProperMappings() {\n return;\r\n }", "String[] getGenerators();", "@Override\n\tpublic List<Generator> getAll() {\n\n\t\tList<Generator> result = new ArrayList<>();\n\n\t\ttry (Connection c = context.getConnection(); \n\t\t\tStatement stmt = c.createStatement()) {\n\n\t\t\tResultSet rs = stmt.executeQuery(getAllQuery);\n\n\t\t\twhile (rs.next()) {\n \tGenerator generator = new Generator(\n \t\trs.getInt(1),\n \t\trs.getString(2),\n \t\trs.getString(3),\n \t\trs.getInt(4),\n \t\trs.getInt(5),\n \t\trs.getInt(6)\n \t);\n\t\t\t\tresult.add(generator);\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn result;\n\t\t}\n\t\treturn result;\n\n\t}", "Iterator<Map.Entry<String, Integer>> getNextPair(){\r\n return entrySet.iterator();\r\n }", "public Iterator<T> byGenerations() {\r\n ArrayIterator<T> iter = new ArrayIterator<T>();\r\n\r\n for (int i = 0; i < SIZE; i++) {\r\n iter.add(tree[i]);\r\n }\r\n\r\n return iter;\r\n }", "public void selectAllAccessibleSelection() {\n // To be fully implemented in a future release\n }", "@Override\n public Tuple next() {\n return nonDistinctNext();\n }", "protected abstract void doSelection() throws IOException;", "RegisterTuple pickSeeds(ArrayList<Register> registers);", "public static void main(String[] args) {\n int stream[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12};\n int n = stream.length;\n int k = 5;\n selectKItems(stream, n, k);\n }", "private static void iterator() {\n\t\t\r\n\t}", "List<Factory> selectAll();", "void select();", "protected synchronized void nextScan() {\n\t\t// Select a node\n\t\ttry (Jedis jedis = jedisNodes.get(getCursor().getSelectionPos()).getResource()) {\n\t\t\t// Traverse only the primary node\n\t\t\tif (containsIgnoreCase(jedis.info(REPLICATION), ROLE_MASTER)) {\n\t\t\t\tprocessResult(doScanNode(jedis));\n\t\t\t} else {\n\t\t\t\tnextTo();\n\t\t\t}\n\t\t}\n\t}", "public IterableIterator<T> select(String predicate);", "private void nextSelect() {\n\t\tif (selectionIndex + 1 > selections.size() - 1) {\n\t\t\tselectionIndex = 0;\n\t\t} else {\n\t\t\tselectionIndex++;\n\t\t}\n\t\tselected.setVisible(true);\n\t\tselected = selections.get(selectionIndex);\n\t\t\n\t}", "@Override\n public List<String> getNextMappings(NextGroup nextGroup) {\n return Collections.emptyList();\n }", "@Override\n public List<String> getNextMappings(NextGroup nextGroup) {\n return Collections.emptyList();\n }", "List<ToolsOutIn> selectAll();", "public abstract OptionGroup getMapGeneratorOptions();", "public abstract OptionGroup getMapGeneratorOptions();", "@Override\n\t\t\tpublic String pickItem(Map<String, Integer> distribution) {\n\t\t\t\treturn null;\n\t\t\t}", "@Override\n\t\t\tpublic String pickItem(Map<String, Integer> distribution) {\n\t\t\t\treturn null;\n\t\t\t}", "public Iterable<Todo> select(TodoQuery t){\n\t return (select(t.getStatement()));\n\t}", "IEmpleado next();", "public Iterator iterator() {\n\t return new EntryIterator(set.iterator());\n\t}", "public static void main(String[] args) {\n Set<String> mySet = new HashSet<String>(100,50);\n mySet.add(\"APPLE\");\n mySet.add(\"LG\");\n mySet.add(\"HTTC\");\n mySet.add(\"APPLE\");\n mySet.add(\"SAMSUNG\");\n Iterator<String> iterator = mySet.iterator();\n while (iterator.hasNext()){\n System.out.println(iterator.next());\n }\n\n\n\n }", "Select(){\n }", "@Override\r\n\tpublic void visit(Choose choose)\r\n\t{\n\t\t\r\n\t}", "public K select(int k);", "void processSelectedKeys() throws IOException {\n\t\t\tfor (Iterator i = sel.selectedKeys().iterator(); i.hasNext();) {\n\n\t\t\t\t// Retrieve the next key and remove it from the set\n\t\t\t\tSelectionKey sk = (SelectionKey) i.next();\n\t\t\t\ti.remove();\n\n\t\t\t\t// Retrieve the target and the channel\n\t\t\t\tTarget t = (Target) sk.attachment();\n\t\t\t\tSocketChannel sc = (SocketChannel) sk.channel();\n\n\t\t\t\t// Attempt to complete the connection sequence\n\t\t\t\ttry {\n\t\t\t\t\tif (sc.finishConnect()) {\n\t\t\t\t\t\tsk.cancel();\n\t\t\t\t\t\tt.connectFinish = System.currentTimeMillis();\n\t\t\t\t\t\tsc.close();\n\t\t\t\t\t\tprinter.add(t);\n\t\t\t\t\t}\n\t\t\t\t} catch (IOException x) {\n\t\t\t\t\tsc.close();\n\t\t\t\t\tt.failure = x;\n\t\t\t\t\tprinter.add(t);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "@Override\n public List<Beheerder> select() {\n ArrayList<Beheerder> beheerders = new ArrayList<>();\n Connection connection = createConnection();\n try {\n PreparedStatement preparedStatement = connection.prepareStatement(\"SELECT * FROM gebruiker ORDER BY id;\");\n ResultSet resultSet = preparedStatement.executeQuery();\n beheerders = fillListFromResultSet(resultSet, beheerders);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n closeConnection(connection);\n return beheerders;\n }", "@Override\n\tpublic List<Generator> getAll() {\n\t\treturn new ArrayList<>();\n\t}", "@Override\n public Collection<KlantBedrijf> select() {\n return null;\n }", "List<CaseLinkman> selectAll();", "public Iterator<T> iterator() {\r\n return byGenerations();\r\n }", "private CharSequence[] getSelections() {\n BluetoothAdapter btAdapter = BluetoothAdapter.getDefaultAdapter();\n if (null != btAdapter) {\n int idx = 0;\n Set<BluetoothDevice> setDevices = btAdapter.getBondedDevices();\n CharSequence[] entries = new CharSequence[setDevices.size() + 1];\n entries[idx++] = NONE;\n\n for (BluetoothDevice btd : setDevices) {\n entries[idx++] = btd.getName();\n }\n\n // tell bluetooth to stop scanning. it's a power issue\n btAdapter.cancelDiscovery();\n return entries;\n }\n\n CharSequence[] entries = new CharSequence[1];\n entries[0] = NONE;\n return entries;\n }", "Select createSelect();", "private int[] genKeys() {\n HashSet<Integer> set = new HashSet<Integer>();\n HashSet<int[]> next = new HashSet<int[]>();\n rowKeys = new HashMap<Integer, Integer>();\n int[] rowKeys2combo = new int[keySize];\n\n // 1st set starts with 0004, 0040, 0400, 4000\n int counter = 0;\n int key;\n for (int i = 0; i < rowSize; i++) {\n int[] temp = new int[rowSize];\n temp[i] = rowSize;\n key = rowCombo2Key(temp);\n rowKeys2combo[counter] = key;\n rowKeys.put(key, counter++);\n set.add(key);\n next.add(temp);\n }\n\n while (next.size() > 0) {\n HashSet<int[]> expand = next;\n next = new HashSet<int[]>();\n for (int[] combo : expand) {\n for (int i = 0; i < rowSize; i++) {\n if (combo[i] > 0) {\n for (int j = 0; j < rowSize; j++) {\n if (i != j) {\n int[] shift = new int[rowSize];\n System.arraycopy(combo, 0, shift, 0, rowSize);\n shift[i] = combo[i] - 1;\n shift[j] = combo[j] + 1;\n key = rowCombo2Key(shift);\n if (!set.contains(key)) {\n rowKeys2combo[counter] = key;\n rowKeys.put(key, counter++);\n set.add(key);\n next.add(shift);\n }\n }\n }\n }\n }\n }\n }\n\n final int splitIdx = counter;\n\n // 2nd set starts with 0003, 0030, 0300, 3000\n for (int i = 0; i < rowSize; i++) {\n int[] temp = new int[rowSize];\n temp[i] = rowSize - 1;\n key = rowCombo2Key(temp);\n rowKeys2combo[counter] = key;\n rowKeys.put(key, counter++);\n set.add(key);\n next.add(temp);\n }\n\n while (next.size() > 0) {\n HashSet<int[]> expand = next;\n next = new HashSet<int[]>();\n for (int[] combo : expand) {\n for (int i = 0; i < rowSize; i++) {\n if (combo[i] > 0) {\n for (int j = 0; j < rowSize; j++) {\n if (i != j) {\n int[] shift = new int[rowSize];\n System.arraycopy(combo, 0, shift, 0, rowSize);\n shift[i] = combo[i] - 1;\n shift[j] = combo[j] + 1;\n key = rowCombo2Key(shift);\n if (!set.contains(key)) {\n rowKeys2combo[counter] = key;\n rowKeys.put(key, counter++);\n set.add(key);\n next.add(shift);\n }\n }\n }\n }\n }\n }\n }\n return genKeyLink(splitIdx, rowKeys2combo);\n }", "private void findResourcesFake() {\r\n\t\t\r\n\t\tRandom random = new Random();\t\r\n\t\t\r\n\t\t\t\t\t\t\r\n\t\tif (random.nextInt() % 10 == 0) {PoCOnline.setSelected(true); loadContainerOnline.setSelected(true);}\t\r\n\t\tif (random.nextInt() % 10 == 0) {fillRedOnline.setSelected(true);}\r\n\t\tif (random.nextInt() % 10 == 0) {fillYellowOnline.setSelected(true);}\r\n\t\tif (random.nextInt() % 10 == 0) {fillBlueOnline.setSelected(true);}\r\n\t\tif (random.nextInt() % 10 == 0) {testOnline.setSelected(true);}\r\n\t\tif (random.nextInt() % 10 == 0) {lidOnline.setSelected(true);}\r\n\t\tif (random.nextInt() % 10 == 0) {dispatchOnline.setSelected(true);}\t\t\r\n\t\t\r\n\t\t\r\n\t}", "List<MockHolder> select(T selection, List<MockHolder> mocks);", "@Override\n public Iterator<FindOption> iterator() {\n return Collections.unmodifiableSet(options).iterator();\n }", "@Override\n public Iterator<FindOption> iterator() {\n return Collections.unmodifiableSet(options).iterator();\n }", "public boolean select(String entry);", "int[] getSelection();", "private synchronized void block () throws IOException {\n //assert available == 0;\n int n = selector.select ();\n //assert n == 1;\n selector.selectedKeys().clear();\n available ();\n }", "public void testSelect_0()\n throws Exception {\n BestChromosomesSelector selector = new BestChromosomesSelector(conf);\n Gene gene = new IntegerGene(conf);\n gene.setAllele(new Integer(444));\n Chromosome secondBestChrom = new Chromosome(conf, gene, 3);\n secondBestChrom.setFitnessValue(11);\n selector.add(secondBestChrom);\n gene = new BooleanGene(conf);\n gene.setAllele(Boolean.valueOf(false));\n Chromosome bestChrom = new Chromosome(conf, gene, 3);\n bestChrom.setFitnessValue(12);\n selector.add(bestChrom);\n selector.select(1, null, new Population(conf));\n }", "Iterable<LdapEntry> select(Connection connection) throws SyncException;", "protected void selectRenderables(DrawContext dc)\n {\n ArrayList<GraticuleTile> tileList = getVisibleTiles(dc);\n if (tileList.size() > 0)\n {\n for (GraticuleTile gz : tileList)\n {\n // Select tile visible elements\n gz.selectRenderables(dc);\n }\n }\n }", "List<PageItemCfg> selectByExample(PageItemCfgExample example);", "SelectSubSet createSelectSubSet();", "List<DictDoseUnit> selectByExample(DictDoseUnitExample example);", "public static void main(String[] args) {\n \tselect();\n\n\t}", "public DbIterator iterator() {\n // some code goes here\n if (gbfield == Aggregator.NO_GROUPING) {\n Type[] tp = new Type[1];\n tp[0] = Type.INT_TYPE;\n String[] fn = new String[1];\n fn[0] = aop.toString();\n TupleDesc td = new TupleDesc(tp, fn);\n Tuple t = new Tuple(td);\n t.setField(0, new IntField(gbCount.get(null)));\n ArrayList<Tuple> a = new ArrayList<>();\n a.add(t);\n return new TupleIterator(td, a);\n } else {\n Type[] tp = new Type[2];\n tp[0] = gbfieldtype;\n tp[1] = Type.INT_TYPE;\n String[] fn = new String[2];\n fn[0] = gbname;\n fn[1] = aop.toString();\n TupleDesc td = new TupleDesc(tp, fn);\n ArrayList<Tuple> a = new ArrayList<>();\n for (Field f : gbCount.keySet()) {\n Tuple t = new Tuple(td);\n t.setField(0, f);\n t.setField(1, new IntField(gbCount.get(f)));\n a.add(t);\n }\n return new TupleIterator(td, a);\n }\n }", "List<FeedsUsersKey> selectByExample(FeedsUsersExample example);", "public void set_random_choice()\r\n\t{\r\n\t\tfor (int i=0 ; i<size ; i++)\r\n\t\t{\r\n\t\t\tnumbers.add(get_not_selected_random_digit());\r\n\t\t}\r\n\t}", "private ArrayList<Element> select(Selector selector, Document document){\n\t\tArrayList<Element> result = new ArrayList<Element>();\n\t\t\n\t\tselectTraverse(selector, document.documentElement(), result);\n\t\t\n\t\treturn result;\n\t}", "@Override\r\n\tpublic List<Temi> selectAll() {\n\t\treturn temiMapper.selectAll();\r\n\t}", "private Iterator getEntries(){\r\n\t\tSet entries = items.entrySet();\r\n\t\treturn entries.iterator();\r\n\t}", "@Override\n public Iterator<Map.Entry<K, V>> iterator() {\n return new SetIterator();\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 }", "@Override\n public Iterator<NFetchMode> iterator() {\n return Arrays.asList(all).iterator();\n }", "public void extendSelection(int index) {\n/* 107 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "private ElementSelection getSelectedElements()\n {\n final int[] rowViewIndexes = this.getSelectedRows();\n final NetPlan np = callback.getDesign();\n\n final List<NetworkElement> elementList = new ArrayList<>();\n final List<Pair<Demand, Link>> frList = new ArrayList<>();\n\n if (rowViewIndexes.length != 0)\n {\n final int maxValidRowIndex = model.getRowCount() - 1 - (hasAggregationRow() ? 1 : 0);\n final List<Integer> validRows = new ArrayList<Integer>();\n for (int a : rowViewIndexes) if ((a >= 0) && (a <= maxValidRowIndex)) validRows.add(a);\n\n if (networkElementType == NetworkElementType.FORWARDING_RULE)\n {\n for (int rowViewIndex : validRows)\n {\n final int viewRowIndex = this.convertRowIndexToModel(rowViewIndex);\n final String demandInfo = (String) getModel().getValueAt(viewRowIndex, AdvancedJTable_forwardingRule.COLUMN_DEMAND);\n final String linkInfo = (String) getModel().getValueAt(viewRowIndex, AdvancedJTable_forwardingRule.COLUMN_OUTGOINGLINK);\n final int demandIndex = Integer.parseInt(demandInfo.substring(0, demandInfo.indexOf(\"(\")).trim());\n final int linkIndex = Integer.parseInt(linkInfo.substring(0, linkInfo.indexOf(\"(\")).trim());\n frList.add(Pair.of(np.getDemand(demandIndex), np.getLink(linkIndex)));\n }\n } else\n {\n for (int rowViewIndex : validRows)\n {\n final int viewRowIndex = this.convertRowIndexToModel(rowViewIndex);\n final long id = (long) getModel().getValueAt(viewRowIndex, 0);\n elementList.add(np.getNetworkElement(id));\n }\n }\n }\n\n // Parse into ElementSelection\n final Pair<List<NetworkElement>, List<Pair<Demand, Link>>> selection = Pair.of(elementList, frList);\n final boolean nothingSelected = selection.getFirst().isEmpty() && selection.getSecond().isEmpty();\n\n // Checking for selection type\n final ElementSelection elementHolder;\n\n if (!nothingSelected)\n {\n if (!selection.getFirst().isEmpty())\n elementHolder = new ElementSelection(NetworkElementType.getType(selection.getFirst()), selection.getFirst());\n else if (!selection.getSecond().isEmpty())\n elementHolder = new ElementSelection(selection.getSecond());\n else elementHolder = new ElementSelection();\n } else\n {\n elementHolder = new ElementSelection();\n }\n\n return elementHolder;\n }", "public void selectAt(MouseEvent e) {\r\n \t\tactivateSelect();\r\n \t\tmouseListner.mousePressed(e);\r\n \t}", "@Override\r\n\t\t\tpublic Iterator<K> iterator() {\t\t\t//iterator() returns a ViewIterator\t\r\n\t\t\t\treturn new ViewIterator<K>() {\t\t//ViewIterator needs to define the next() method\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic K next() {\r\n\t\t\t\t\t\treturn nextEntry().getKey();//next() returns the key\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\t\t\t}", "public void selectedtoall(boolean g) {\n for (TableMaker.Person p : allProducts) {\n if (p.invitedProperty().get() != g) {\n p.invitedProperty().set(g);\n int v = p.numBerProperty().get();\n if (g) {\n TableMaker.ans[v] = 1;\n } else if (!g) {\n TableMaker.ans[v] = 0;\n } else {\n TableMaker.ans[v] = -1;\n }\n }\n\n }\n }", "@Override\n public int[] next() {\n min = rand.nextInt(100);\n max = rand.nextInt(100);\n Thread.yield();\n if (min > max) max = min;\n int[] ia = {min, max};\n return ia;\n }", "protected void generateEntries() {\n Iterator<Label> entryLabelsIterator = entryLabels.iterator();\n for (KtWhenEntry entry : expression.getEntries()) {\n v.visitLabel(entryLabelsIterator.next());\n\n FrameMap.Mark mark = codegen.myFrameMap.mark();\n codegen.gen(entry.getExpression(), resultType);\n mark.dropTo();\n\n if (!entry.isElse()) {\n v.goTo(endLabel);\n }\n }\n }", "private List<EObject> getElements(ISelector s) {\n\t\tList<EObject> result = new ArrayList<EObject>();\n\t\t\n\t\tfor (EObject next : charStartMap.keySet()) {\n\t\t\tint start = charStartMap.get(next);\n\t\t\tint end = charEndMap.get(next);\n\t\t\tif (s.accept(start, end)) {\n\t\t\t\tresult.add(next);\n\t\t\t}\n\t\t}\n\t\tCollections.sort(result, new Comparator<EObject>() {\n\t\t\tpublic int compare(EObject objectA, EObject objectB) {\n\t\t\t\tint lengthA = getCharEnd(objectA) - getCharStart(objectA);\n\t\t\t\tint lengthB = getCharEnd(objectB) - getCharStart(objectB);\n\t\t\t\treturn lengthA - lengthB;\n\t\t\t}\n\t\t});\n\t\treturn result;\n\t}", "public DbIterator iterator() {\n // some code goes here\n //throw new UnsupportedOperationException(\"please implement me for proj2\");\n List<Tuple> tuparr = new ArrayList<Tuple>();\n Type[] typearr = new Type[]{gbfieldtype, Type.INT_TYPE};\n TupleDesc fortup = new TupleDesc(typearr, new String[]{null, null});\n Object[] keys = groups.keySet().toArray();\n for (int i = 0; i < keys.length; i++) {\n \n int key = (Integer) keys[i];\n \n Tuple tup = new Tuple(fortup);\n if (gbfieldtype == Type.STRING_TYPE) {\n tup.setField(0, hashstr.get(key));\n }\n else {\n tup.setField(0, new IntField(key));\n }\n //tup.setField(0, new IntField(key));\n tup.setField(1, new IntField(groups.get(key)));\n tuparr.add(tup); \n\n }\n List<Tuple> immutable = Collections.unmodifiableList(tuparr);\n TupleIterator tupiter = new TupleIterator(fortup, immutable);\n if (gbfield == NO_GROUPING) {\n List<Tuple> tuparr1 = new ArrayList<Tuple>();\n TupleDesc fortup1 = new TupleDesc(new Type[]{Type.INT_TYPE}, new String[]{null});\n Tuple tup1 = new Tuple(fortup1);\n tup1.setField(0, new IntField(groups.get(-1)));\n tuparr1.add(tup1);\n List<Tuple> immutable1 = Collections.unmodifiableList(tuparr1);\n TupleIterator tupiter1 = new TupleIterator(fortup1, immutable1);\n \n return (DbIterator) tupiter1;\n }\n return (DbIterator) tupiter;\n }", "Optional<Pairof<X, MultiSet<X>>> choose();", "public RunIterator iterator() {\n // Replace the following line with your solution.\n return new RunIterator(runs.getFirst());\n // You'll want to construct a new RunIterator, but first you'll need to\n // write a constructor in the RunIterator class.\n \n \n }", "List<TbFreightTemplate> selectAll();", "@Override\n public List<SpriteDefinition> getChosen () {\n return mySelected.getListView().getItems();\n }", "List<EcsSupplierRebate> selectAll();", "public List selectByExample(EpAssetsExample example) {\n List list = getSqlMapClientTemplate().queryForList(\"EP_ASSETS.abatorgenerated_selectByExample\", example);\n return list;\n }", "private void processSelectedKeys() {\r\n Iterator<SelectionKey> it = selector.selectedKeys().iterator();\r\n while (it.hasNext()) {\r\n // remove the selected key to not process it twice\r\n SelectionKey key = it.next();\r\n it.remove();\r\n\r\n // erase flags of ready operation\r\n key.interestOps(key.interestOps() & ~key.readyOps());\r\n\r\n if (key.isAcceptable()) {\r\n ((AcceptHandler) key.attachment()).handleAccept();\r\n }\r\n if (key.isValid() && key.isConnectable()) {\r\n ((ConnectHandler) key.attachment()).handleConnect();\r\n }\r\n if (key.isValid() && key.isReadable()) {\r\n ((ReadWriteHandler) key.attachment()).handleRead();\r\n }\r\n if (key.isValid() && key.isWritable()) {\r\n ((ReadWriteHandler) key.attachment()).handleWrite();\r\n }\r\n }\r\n }", "ManageableHistoricalTimeSeriesInfo select(Collection<ManageableHistoricalTimeSeriesInfo> candidates, String selectionKey);", "List<TLinkman> selectByExample(TLinkmanExample example);", "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}", "private void getAllIds() {\n try {\n ArrayList<String> NicNumber = GuestController.getAllIdNumbers();\n for (String nic : NicNumber) {\n combo_nic.addItem(nic);\n\n }\n } catch (Exception ex) {\n Logger.getLogger(ModifyRoomReservation.class.getName()).log(Level.SEVERE, null, ex);\n }\n }" ]
[ "0.58004403", "0.5610756", "0.55949426", "0.5530605", "0.54300696", "0.53839684", "0.5368364", "0.5322632", "0.5309272", "0.5308054", "0.5225257", "0.52063495", "0.51636326", "0.5156463", "0.5153673", "0.51329595", "0.5130576", "0.5130242", "0.5083571", "0.505495", "0.5049616", "0.5043193", "0.50317264", "0.5020178", "0.5003775", "0.499968", "0.49948168", "0.49869904", "0.49829397", "0.49508935", "0.49442878", "0.49433786", "0.4926162", "0.4923942", "0.49237832", "0.49122998", "0.49122998", "0.49053648", "0.48919815", "0.48919815", "0.48916757", "0.48916757", "0.4889541", "0.48640105", "0.48631653", "0.4851597", "0.48509264", "0.48481002", "0.48388374", "0.48369092", "0.48325387", "0.48323599", "0.4829391", "0.48278216", "0.48252654", "0.4805593", "0.48024088", "0.4787631", "0.47712174", "0.4761768", "0.47592834", "0.47592834", "0.4747681", "0.47443625", "0.47409964", "0.4738002", "0.47238636", "0.47098708", "0.46886724", "0.46847016", "0.467683", "0.46671662", "0.46635517", "0.46566996", "0.4647972", "0.4644706", "0.46445352", "0.4641603", "0.46412775", "0.46377012", "0.46308953", "0.46262008", "0.46256432", "0.46249095", "0.46248457", "0.4623549", "0.46218196", "0.46165538", "0.45940527", "0.45888782", "0.45861882", "0.45835423", "0.45822084", "0.45773342", "0.45750755", "0.45736155", "0.4564507", "0.45612985", "0.45608488", "0.45542565", "0.45467535" ]
0.0
-1
Chooses random entries with of number given depending on their weights.
protected Entry[] selectEntries(GenCtx ctx, int length) { Entry[] result = new Entry[length]; //~: get total weight int W = 0; for(Entry e : getEntries()) if(e.getWeight() < 0) throw EX.state(); else W += e.getWeight(); //~: select other entries in random next: for(int i = 0;(i < length);i++) { int x = 0, w = ctx.gen().nextInt(W); for(Entry e : getEntries()) if((x += e.getWeight()) >= w) { result[i] = e; continue next; } throw EX.state(); } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int getWeightedRand(int[] weights) {\n double total = 0;\n for(int weight : weights) {\n total += (double)weight;\n }\n\n double rand = Math.random() * total;\n for(int i = 0; i < weights.length; i++) {\n if (rand < (double)weights[i]) return i;\n rand -= (double)weights[i];\n }\n\n return 0; //Should never be called.\n }", "private int randomWeight()\n {\n return dice.nextInt(1000000);\n }", "public static float getRandomWeight() {\n\t\tfloat weight = (float)(Math.random()*17+3);\n\t\treturn weight;\n\t}", "public static float[] initializeWeights(int numWeights){\n\t\tfloat[] weights = new float[numWeights];\n\t\tfor (int i = 0; i < weights.length; i++) {\n\t\t\tweights[i] = (float)(randomGenerator.nextInt(100)/ 100.0 + 0.5);\n\t\t}\n\n\t\treturn weights;\n\t}", "private void setWeightsUniformly(RandomDataImpl rnd, double eInit) {\n\t\tfor (int i = 0; i < weights.length; i++) {\t\t\n\t\t\tweights[i] = rnd.nextUniform(-eInit, eInit);\n\t\t}\n\t}", "@Nullable\n public T choose(Predicate<T> predicate, Random random) {\n List<Entry<T>> filteredEntries = entries.stream()\n .filter(t -> predicate.apply(t.getValue()))\n .collect(Collectors.toList());\n if (Iterables.isEmpty(filteredEntries)) {\n return null;\n }\n\n int maximumPriority = Ordering.natural().max(Iterables.transform(filteredEntries, Entry::getPriority));\n filteredEntries = filteredEntries.stream()\n .filter(t -> t.getPriority() == maximumPriority)\n .collect(Collectors.toList());\n\n if(Iterables.isEmpty(filteredEntries)) {\n return null;\n }\n\n double sum = 0;\n for(Entry<T> entry : filteredEntries)\n sum += entry.getWeight();\n\n double selection = random.nextDouble() * sum;\n for(Entry<T> entry : filteredEntries) {\n selection -= entry.getWeight();\n if(selection <= 0)\n return entry.getValue();\n }\n // should not get here.\n throw new IllegalStateException();\n }", "private void initialiseWeights() {\n\n threshold = -1+2*Math.random();\n thresholdDiff = 0;\n\n for(int i = 0; i < weight.length; i++) {\n weight[i]= -1+2*Math.random();\n weightDiff[i] = 0;\n }\n\n }", "public synchronized int setPassengerWeight(){\n return random.nextInt((100-40)+1)+40;\n }", "public int getWeightedBucket() {\n float val = (float)(new Float((Math.random() * 100)));\n int totalWeight = 0;\n int i = 0;\n for (i = 0; i < weights.length; i++) {\n totalWeight += weights[i];\n if (val <= totalWeight)\n break;\n }\n return(i);\n }", "public List<Vec> sample(int count, Random rand);", "public int getRandom() {\n int k = 1;\n ListNode node = this.head;\n int i = 0;\n ArrayList<Integer> reservoir = new ArrayList<Integer>();\n //先把前k个放进水塘\n while (i < k && node != null) {\n reservoir.add(node.val);\n node = node.next;\n i++;\n }\n // i++; // i == k => i == k+1 这样i就代表了现在已经处理过的总共数字个位\n i = 1;\n while (node != null) {\n //更换水塘里的数字的概率要是 k/(现在处理过的数字总数),所以因为i是从0开始,所以概率为从0\n // 到i的数当中选0 到k-1的数字,rand.nextInt(i) < k的概率是k/(现在处理过的数字总数)\n if (rand.nextInt(k+i) == i) {\n reservoir.set(rand.nextInt(k), node.val);\n }\n i++;\n node = node.next;\n }\n return reservoir.get(0);// or return reservoir when k > 1;\n }", "public void initWeights(){\n setNextLayer(network.getNextLayer(layerNumber));\n //determine the number of neurons in the next layer\n int neuronNextLayer = next.neuronCount;\n //create arrays for backpopagation learning\n createArr();\n //set the weightThreshold\n weightThreshold = new double[neuronCount+1][neuronNextLayer];\n //System.out.println(\"weightThreshold row:\"+weightThreshold.length+\" col:\"+weightThreshold[0].length);\n //randomize all the elements. range is between -.5 and .5\n for(int i=0; i<weightThreshold.length; i++){\n for(int j=0; j<weightThreshold[i].length; j++){\n weightThreshold[i][j] = getRandomNumber();\n }\n }\n }", "private int getRandomWithExclusion(int bound, List<Integer> exclude) {\n int random = Constants.RAND.nextInt(bound - exclude.size());\n for (int ex : exclude) {\n if (random < ex) break;\n random++;\n }\n return random;\n \n }", "WeightedRandomSampling(double[] w){\n int len = w.length;\n aggregatedW = new double[len];\n counts = new int[len];\n double temp = 0;\n\n for(int i=0; i<len; i++){\n aggregatedW[i] = temp;\n //System.out.println(aggregatedW[i]);\n temp+= w[i];\n }\n }", "public static int[][] greedy(float[] benefit, float[] weight, int[] knapsackWeight) {\n // number of items\n int itemLen = benefit.length;\n // number of knapsacks\n int knapsackLen = knapsackWeight.length;\n // key: index of item, value: benefit / weight of item\n Map<Integer, Float> benefitPerWeightMap = new TreeMap<>();\n // if item i is included in knapsack j, result[i][j] = 1, otherwise result[i][j] = 0\n int[][] result = new int[itemLen][knapsackLen];\n // initialize the map\n for (int i = 0; i < itemLen; i++) {\n benefitPerWeightMap.put(i, (benefit[i] / weight[i]));\n }\n\n // the value comparator for sorting the entrySet in the map by value in descending order (using lambda)\n Comparator<Map.Entry<Integer, Float>> valueComparator = (o1, o2) -> o2.getValue().compareTo(o1.getValue());\n // convert the map to list to sort it by value comparator\n List<Map.Entry<Integer, Float>> benefitPerWeightList = new ArrayList<>(benefitPerWeightMap.entrySet());\n benefitPerWeightList.sort(valueComparator);\n\n // put items in list into knapsacks\n for (int j = 0; j < knapsackLen; j++) {\n // the items have been put in and ready to be delete\n List<Map.Entry<Integer, Float>> deleteList = new ArrayList<>();\n for (Map.Entry<Integer, Float> entry:\n benefitPerWeightList) {\n int i = entry.getKey();\n if (weight[i] <= knapsackWeight[j]) {\n result[i][j] = 1;\n deleteList.add(entry);\n knapsackWeight[j] -= weight[i];\n }\n }\n // delete the items have been put in\n benefitPerWeightList.removeAll(deleteList);\n }\n return result;\n }", "private ExtractedItemsCollection selectItemByChance(Collection<ExtractedItemsCollection> itemsCollections) {\n float sumOfChances = calcSumOfChances(itemsCollections);\n float currentSum = 0f;\n float rnd = (float) Rnd.get(0, (int) (sumOfChances - 1) * 1000) / 1000;\n ExtractedItemsCollection selectedCollection = null;\n for (ExtractedItemsCollection collection : itemsCollections) {\n currentSum += collection.getChance();\n if (rnd < currentSum) {\n selectedCollection = collection;\n break;\n }\n }\n return selectedCollection;\n }", "private ExtractedItemsCollection selectItemByChance(Collection<ExtractedItemsCollection> itemsCollections) {\n float sumOfChances = calcSumOfChances(itemsCollections);\n float currentSum = 0f;\n float rnd = (float) Rnd.get(0, (int) (sumOfChances - 1) * 1000) / 1000;\n ExtractedItemsCollection selectedCollection = null;\n for (ExtractedItemsCollection collection : itemsCollections) {\n currentSum += collection.getChance();\n if (rnd < currentSum) {\n selectedCollection = collection;\n break;\n }\n }\n return selectedCollection;\n }", "public synchronized int setLuggageWeight(){\n return random.nextInt((30-0)+1)+0;\n }", "public int pickIndex() {\n int len = weightPrefixSum.length;\n\n int idx = random.nextInt(weightPrefixSum[len - 1]) + 1;\n\n int start = 0;\n int end = len - 1;\n while(start <= end){\n int mid = start + (end - start) / 2;\n\n if(weightPrefixSum[mid] == idx){\n return mid;\n }else if(weightPrefixSum[mid] < idx){\n start = mid + 1;\n }else{\n end = mid - 1;\n }\n }\n\n return start;\n\n }", "void ksUnbounded(int targetWeight, int nItems, int[] iWeights, int[] iValues) {\n\r\n\t\tint[][] ksItemCapacity = new int[nItems + 1][targetWeight + 1];\r\n\t\tint[][] ksTrack = new int[nItems + 1][targetWeight + 1];\r\n\r\n\t\tfor (int w = 0; w <= targetWeight; w++) {\r\n\t\t\tksItemCapacity[0][w] = 0;\r\n\t\t}\r\n\r\n\t\tfor (int item = 1; item < nItems; item++) {\r\n\t\t\tfor (int w = 0; w <= targetWeight; w++) {\r\n\t\t\t\t// last known Maximum value of KS contents s.t. their weight\r\n\t\t\t\t// totals to atmost w-iWeights[item]\r\n\t\t\t\tint eItemValue = (iWeights[item] <= w) ? ksItemCapacity[item - 1][w\r\n\t\t\t\t\t\t- iWeights[item]]\r\n\t\t\t\t\t\t: 0;\r\n\t\t\t\tif ((iWeights[item] <= w)\r\n\t\t\t\t\t\t&& (iValues[item] + eItemValue) > ksItemCapacity[item - 1][w]) {\r\n\t\t\t\t\tksItemCapacity[item][w] = eItemValue + iValues[item];\r\n\t\t\t\t\t// current item included\r\n\t\t\t\t\tksTrack[item][w] = 1;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tksItemCapacity[item][w] = ksItemCapacity[item - 1][w];\r\n\t\t\t\t\t// current item not included\r\n\t\t\t\t\tksTrack[item][w] = 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Print KS contents\r\n\t\tArrayList<Integer> ksContents = new ArrayList<Integer>();\r\n\t\tint tW = targetWeight;\r\n\t\tfor (int item = nItems; item >= 0; item--) {\r\n\t\t\tif (ksTrack[item][tW] == 1) {\r\n\t\t\t\ttW -= iWeights[item];\r\n\t\t\t\tksContents.add(item);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"Items choosen are:\");\r\n\t\tint W = 0, V = 0;\r\n\t\tfor (Integer e : ksContents) {\r\n\t\t\tW += iWeights[e];\r\n\t\t\tV += iValues[e];\r\n\t\t\tSystem.out.println(\"Weight: \" + iWeights[e] + \", Value: \"\r\n\t\t\t\t\t+ iValues[e]);\r\n\t\t}\r\n\t\tSystem.out.println(\"Total weight: \" + W + \" Total value: \" + V);\r\n\t}", "public void initWeights(){\r\n Random rand = new Random();\r\n double e = Math.sqrt(6.0/(wordSize*windowSize+hiddenSize));\r\n \r\n W = SimpleMatrix.random(hiddenSize, windowSize*wordSize, -e, e, rand);\r\n b1 = new SimpleMatrix(hiddenSize, 1);\r\n b1.zero();\r\n \r\n //U = SimpleMatrix.random(hiddenSize, 1, -0.1, 0.1, rand);\r\n U = new SimpleMatrix(hiddenSize, 1);\r\n U.zero();\r\n b2 = 0.0;\r\n \r\n C = C/(W.getNumElements()+U.getNumElements());\r\n \t}", "private int choose(){\n\t\tdouble temp = 10 * Math.random();\n\t\tint i = (int)temp;\n\t\treturn i;\n\t}", "public static <T> RandomSelector<T> weighted(\n final Collection<T> elements,\n final ToDoubleFunction<? super T> weighter)\n throws IllegalArgumentException {\n requireNonNull(elements, \"elements must not be null\");\n requireNonNull(weighter, \"weighter must not be null\");\n checkArgument(!elements.isEmpty(), \"elements must not be empty\");\n\n final int size = elements.size();\n final T[] elementArray = elements.toArray((T[]) new Object[size]);\n\n double totalWeight = 0d;\n final double[] discreteProbabilities = new double[size];\n for (int i = 0; i < size; i++) {\n final double weight = weighter.applyAsDouble(elementArray[i]);\n checkArgument(weight > 0d, \"weighter returned a negative number\");\n discreteProbabilities[i] = weight;\n totalWeight += weight;\n }\n for (int i = 0; i < size; i++) {\n discreteProbabilities[i] /= totalWeight;\n }\n return new RandomSelector<>(elementArray, new RandomWeightedSelection(discreteProbabilities));\n }", "private static long calculateBestPickWithoutRepetition(int weight, Item[] items, long[][] DP) {\n\n for(int w = 1; w <= weight; w++) {\n for(int i = 1; i <= items.length; i++) {\n DP[w][i] = DP[w][i-1];\n Item item = items[i-1];\n\n if (item.getWeight() <= w) {\n DP[w][i] = Math.max(DP[w][i], DP[w - item.getWeight() ][i-1] + item.getValue());\n }\n }\n }\n\n return DP[DP.length -1][DP[0].length - 1];\n }", "private ArrayList<Integer> getRandomPointsIndex(float ratio,\n ArrayList<Integer> occupiedNList) {\n ArrayList<Integer> newNList = new ArrayList<Integer>();\n ArrayList<Integer> freeNList = new ArrayList<Integer>();\n Dimension dim = layoutPanel.getLayoutSize();\n int height = dim.height;\n int width = dim.width;\n int size = height * width;\n int newNListSize = (int) (size * ratio);\n\n // create a free list\n for (int i = 0; i < size; i++) {\n if (occupiedNList == null || !occupiedNList.contains(i)) {\n freeNList.add(i);\n }\n }\n\n // create a new neurons list\n Random rnd = new Random();\n while (freeNList.size() > 0 && newNList.size() < newNListSize) {\n int i = rnd.nextInt(freeNList.size());\n newNList.add(freeNList.get(i));\n freeNList.remove(i);\n }\n Collections.sort(newNList);\n\n return newNList;\n }", "public ArrayList<Integer> generateWinner() {\n if (winner.size() == 7) {\n if (!sorted) {\n Collections.sort(winner);\n sorted = true;\n }\n return winner;\n }\n if (numbers.size() == 32 || winner.size() != 0) {\n init();\n }\n\n for (int i = 0; i < 7; i++) {\n winner.add(numbers.get(random.nextInt(numbers.size())));\n numbers.remove(winner.get(i));\n }\n Collections.sort(winner);\n return winner;\n }", "public Sample SelectSample() {\n\t\t\n\t\tif(sample_map.size() == 0) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tfloat sum = 0;\n\t\tfloat min = Float.MAX_VALUE;\n\t\tLinkSample ptr = k_closest;\n\t\twhile(ptr != null) {\n\t\t\tmin = Math.min(min, ptr.s.weight);\n\t\t\tptr = ptr.next_ptr;\n\t\t}\n\t\t\n\t\tmin = Math.abs(min) + 1;\n\t\tptr = k_closest;\n\t\twhile(ptr != null) {\n\t\t\tsum += ptr.s.weight + min;\n\t\t\tif(ptr.s.weight + min < 0) {\n\t\t\t\tSystem.out.println(\"neg val\");System.exit(0);\n\t\t\t}\n\n\t\t\tptr = ptr.next_ptr;\n\t\t}\n\t\t\n\t\tfloat val = (float) (Math.random() * sum);\n\n\t\tsum = 0;\n\t\tptr = k_closest;\n\t\twhile(ptr != null) {\n\t\t\tsum += ptr.s.weight + min;\n\n\t\t\tif(sum >= val) {\n\t\t\t\treturn ptr.s;\n\t\t\t}\n\t\t\t\n\t\t\tptr = ptr.next_ptr;\n\t\t}\n\t\tSystem.out.println(\"error\");System.exit(0);\n\t\treturn null;\n\t}", "private void distribute() {\n\t\t\tfor (Entry<String, List<String>> r : groups.entrySet()) {\n\t\t\t\tRandom random = new Random();\n\t\t\t\tint randomIndex = random.nextInt(r.getValue().size());\n\t\t\t\tdistribution.put(r.getKey(), r.getValue().get(randomIndex));\n\t\t\t}\n\t\t}", "public List<Integer> pickRandom(int n, int k) {\n\t\tList<Integer> wynik = new ArrayList<Integer>();\n\t Random random = new Random();\n\t Set<Integer> picked = new HashSet<>();\n\t while(picked.size() < n) {\n\t \tint sizeNaPoczatku = picked.size();\n\t \tint znaleziona = random.nextInt(k);\n\t picked.add(znaleziona);\n\t int sizeNaKoncu = picked.size();\n\t if(sizeNaPoczatku != sizeNaKoncu) {\n\t \twynik.add(znaleziona);\n\t }\n\t }\n\t return wynik;\n\t}", "private int generateRandomNumber() {\n\t\treturn new SplittableRandom().nextInt(0, 3);\n\t}", "public List<Integer> createN_TSpecificTrainingSet(int n,int t,int k,INDArray weight){\r\n\t\tdouble[][] distanceMatrix=new double[this.trainingData.size()][this.trainingData.size()];\r\n\t\tfor(int i=0;i<this.trainingData.size();i++) {\r\n\t\t\tfor(int j=0;j<=i;j++) {\r\n\t\t\t\tif(j==i) {\r\n\t\t\t\t\tdistanceMatrix[i][i]=0;\r\n\t\t\t\t}\r\n\t\t\t\tdouble distance=Variogram.calcDistance(this.trainingData.get(i).getX(), this.trainingData.get(j).getX(), n, t, weight);\r\n\t\t\t\tdistanceMatrix[i][j]=distance;\r\n\t\t\t\tdistanceMatrix[j][i]=distance;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn FarthestPointSampler.pickKFurthestPoint(Nd4j.create(distanceMatrix), k);\r\n\t}", "public int getRandom() {\r\n if ((itemSize / nextIndexInCache) < 0.25) {\r\n rebuildCache();\r\n }\r\n while (true) {\r\n int i = random.nextInt(nextIndexInCache);\r\n int v = cache[i];\r\n if (contains(v)) {\r\n return v;\r\n }\r\n }\r\n }", "public static Object getRandom(Object... kv)\n {\n return getRandom(distributeChance(kv));\n }", "private void initialiseNumbers() {\r\n double choice = Math.random();\r\n sourceNumbers = new int[6];\r\n if(choice<0.8) {\r\n //one big number, 5 small.\r\n sourceNumbers[0] = (Integer) bigPool.remove(0);\r\n for( int i=1; i<6; i++) {\r\n sourceNumbers[i] = (Integer) smallPool.remove(0);\r\n }\r\n } else {\r\n //two big numbers, 5 small\r\n sourceNumbers[0] = (Integer) bigPool.remove(0);\r\n sourceNumbers[1] = (Integer) bigPool.remove(0);\r\n for( int i=2; i<6; i++) {\r\n sourceNumbers[i] = (Integer) smallPool.remove(0);\r\n }\r\n }\r\n\r\n //for target all numbers from 101 to 999 are equally likely\r\n targetNumber = 101 + (int) (899 * Math.random());\r\n }", "public NCRPNode select() {\n\t\t\t\n\t\t\t//dim number of children + 1 (unallocated mass) \n\t\t\tdouble[] weights = new double[children.size() + 1];\n\t \n\t\t\t//weight of unallocated probability mass\n\t\t\tweights[0] = gamma / (gamma + customers);\n\t\t\t\n\t\t\t//calc weight for each child based on the number of customers on them\n\t\t\tint i = 1;\n\t\t\tfor (NCRPNode child: children) {\n\t\t\t\tweights[i] = (double) child.customers / (gamma + customers);\n\t\t\t\ti++;\n\t\t\t}\n\n\t\t\t//sample a child with higher weight\n\t\t\tint choice = random.nextDiscrete(weights);\n\t\t\t//if unallocated mass is sampled, create a new child\n\t\t\tif (choice == 0) {\n\t\t\t\treturn(addChild());\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn children.get(choice - 1);\n\t\t\t}\n\t\t}", "public abstract void initiateRandomCells(double probabilityForEachCell);", "public void setWeight(Integer weight) {\n this.weight = weight;\n }", "static void selectKItems(int stream[], int n, int k)\n {\n int i; // index for elements in stream[]\n\n // reservoir[] is the output array. Initialize it with\n // first k elements from stream[]\n int reservoir[] = new int[k];\n for (i = 0; i < k; i++)\n reservoir[i] = stream[i];\n Random r = new Random();\n // Iterate from the (k+1)th element to nth element\n for (; i < n; i++)\n {\n // Pick a random index from 0 to i.\n int j = r.nextInt(i + 1);\n\n // If the randomly picked index is smaller than k,\n // then replace the element present at the index\n // with new element from stream\n if(j < k)\n reservoir[j] = stream[i];\n }\n System.out.println(\"Following are k randomly selected items\");\n System.out.println(Arrays.toString(reservoir));\n }", "@SuppressWarnings(\"boxing\")\n private void sample(Instances bigger, Instances smaller, ArrayList<double[]> values) {\n // we want to at keep the indices we select the same\n int indices_to_draw = smaller.size();\n ArrayList<Integer> indices = new ArrayList<>();\n Random rand = new Random();\n while (indices_to_draw > 0) {\n\n int index = rand.nextInt(bigger.size() - 1);\n\n if (!indices.contains(index)) {\n indices.add(index);\n indices_to_draw--;\n }\n }\n\n // now reduce our values to the indices we choose above for every attribute\n for (int att = 0; att < bigger.numAttributes() - 1; att++) {\n\n // get double for the att\n double[] vals = values.get(att);\n double[] new_vals = new double[indices.size()];\n\n int i = 0;\n for (Iterator<Integer> it = indices.iterator(); it.hasNext();) {\n new_vals[i] = vals[it.next()];\n i++;\n }\n\n values.set(att, new_vals);\n }\n }", "private Species getRandomSpeciesBaisedAdjustedFitness(Random random) {\r\n\t\tdouble completeWeight = 0.0;\r\n\t\tfor (Species s : species) {\r\n\t\t\tcompleteWeight += s.totalAdjustedFitness;\r\n\t\t}\r\n\t\tdouble r = Math.random() * completeWeight;\r\n\t\tdouble countWeight = 0.0;\r\n\t\tfor (Species s : species) {\r\n\t\t\tcountWeight += s.totalAdjustedFitness;\r\n\t\t\tif (countWeight >= r) {\r\n\t\t\t\treturn s;\r\n\t\t\t}\r\n\t\t}\r\n\t\tthrow new RuntimeException(\"Couldn't find a species... Number is species in total is \" + species.size()\r\n\t\t\t\t+ \", and the toatl adjusted fitness is \" + completeWeight);\r\n\t}", "public static int uniform(int N) {\r\n return random.nextInt(N);\r\n }", "public LeveledMonster pickRandomMonster(List<LeveledMonster> availableMonsters){\n List<Entry> entries = new ArrayList<>();\n double accumulatedWeight = 0.0;\n\n for (LeveledMonster m : availableMonsters){\n accumulatedWeight += m.getSpawnWeight();\n Entry e = new Entry();\n e.object = m;\n e.accumulatedWeight = accumulatedWeight;\n entries.add(e);\n }\n\n double r = Utils.getRandom().nextDouble() * accumulatedWeight;\n\n for (Entry e : entries){\n if (e.accumulatedWeight >= r){\n return e.object;\n }\n }\n return null;\n }", "public Item sample() {\n if (N == 0) throw new java.util.NoSuchElementException();\n return collection[rnd.nextInt(N)];\n }", "public int getRandom() {\r\n var list = new ArrayList<>(set);\r\n return list.get(new Random().nextInt(set.size()));\r\n }", "@Override\r\n\tpublic Item sample() {\r\n\t\tint index = StdRandom.uniform(count);\r\n\t\tItem item = arr[index];\r\n\t\treturn item;\r\n\t}", "public Item sample() {\n \t if (size==0){\n \t \tthrow new NoSuchElementException();\n \t }\n \t int index = StdRandom.uniform(size);\n // System.out.println(\"The index of the number is: \" + index);\n int k = 0;\n \t Node p=sentinel.next.next;\n \t for (int i = 0; i < index; i++){\n p = p.next; \n \t }\n \t return p.item;\n }", "public void setWeight(final int weight) {\n this.weight = weight;\n }", "public void setWeight(int weight){\n\t\tthis.weight = weight;\n\t}", "private void getRandomNumber() {\n\t\tRandom generator = new Random();\n\t\trandomNumber = generator.nextInt(POSSIBLE_CHOICE.length);\n\t}", "public static int uniform( int N ) {\n return random.nextInt( N + 1 );\n }", "public Item sample() {\n if (n == 0) throw new NoSuchElementException();\n return arr[StdRandom.uniform(n)];\n }", "public static final Triple<List<DirectedGraphNode>,\n DirectedGraphWeightFunction,\n CoordinateMap> getRandomGraph(\n int size,\n float elf,\n Random r,\n HeuristicFunction f) {\n ArrayList<DirectedGraphNode> graph =\n new ArrayList<DirectedGraphNode>(size);\n DirectedGraphWeightFunction w = new DirectedGraphWeightFunction();\n CoordinateMap m = new CoordinateMap(2, size);\n\n for (int i = 0; i < size; ++i) {\n DirectedGraphNode u = new DirectedGraphNode(\"\" + i);\n graph.add(u);\n m.put(u, getRandomCoordinates(2, r, 1000));\n }\n\n for (int i = 0; i < size; ++i) {\n for (int j = 0; j < size; ++j) {\n if (r.nextFloat() < elf) {\n graph.get(i).addChild(graph.get(j));\n w.put(graph.get(i),\n graph.get(j),\n 1.5 * f.get(m.get(graph.get(i)),\n m.get(graph.get(j))));\n }\n }\n }\n\n for (int i = 0; i < size - 1; ++i) {\n graph.get(i).addChild(graph.get(i + 1));\n w.put(graph.get(i),\n graph.get(i + 1),\n 1.5 * f.get(m.get(graph.get(i)),\n m.get(graph.get(i + 1))));\n }\n\n graph.get(size - 1).addChild(graph.get(0));\n w.put(graph.get(size - 1),\n graph.get(0),\n 1.5 * f.get(m.get(graph.get(size - 1)),\n m.get(graph.get(0))));\n\n return new Triple<List<DirectedGraphNode>,\n DirectedGraphWeightFunction,\n CoordinateMap>(graph, w, m);\n\n }", "public static void main(String[] args) {\n System.out.println(\"------Random items and knapsacks------\");\n int itemLen = 10;\n int knapsackLen = 4;\n float[] benefit = new float[itemLen];\n float[] weight = new float[itemLen];\n int[] knapsackWeight = new int[knapsackLen];\n\n Random random = new Random();\n for (int i = 0; i < itemLen; i++) {\n // random benefit: 1 ~ 10\n benefit[i] = random.nextInt(9) + 1;\n // random weight: 1 ~ 10\n weight[i] = random.nextInt(9) + 1;\n }\n for (int i = 0; i < knapsackLen; i++) {\n // random knapsack weight: 5 ~ 15\n knapsackWeight[i] = random.nextInt(10) + 5;\n }\n\n /*\n Print items and knapsacks\n */\n System.out.print(\"Items benefit:\");\n for (int i = 0; i < itemLen; i++) {\n System.out.print(benefit[i] + \" \");\n }\n System.out.println();\n\n System.out.print(\"Items weight:\");\n for (int i = 0; i < itemLen; i++) {\n System.out.print(weight[i] + \" \");\n }\n System.out.println();\n\n System.out.print(\"Knapsacks weight:\");\n for (int i = 0; i < knapsackLen; i++) {\n System.out.print(knapsackWeight[i] + \" \");\n }\n System.out.println();\n\n // neighborhood search\n neighborhoodSearch(benefit, weight, knapsackWeight);\n\n }", "private static void InitRandBag()\n {\n int k=(int)Math.floor(Math.random()*50);\n R[0]=k;\n\n //Generate the rest of the numbers\n for(int i=1;i<950;i++)\n {\n k=k+(int)Math.floor(Math.random()*50);\n R[i]=k;\n }\n\n //Shuffle the list\n for(int i=0;i<950;i++)\n {\n int temp = R[i];\n k = (int)Math.floor(Math.random()*950);\n R[i]=R[k];\n R[k]=temp;\n }\n }", "public static int[][] neighborhoodSearch(float[] benefit, float[] weight, int[] knapsackWeight){\n\n /*\n Using greedy algorithm to put items in knapsacks\n */\n\n // number of items\n int itemLen = benefit.length;\n // number of knapsacks\n int knapsackLen = knapsackWeight.length;\n // key: index of item, value: benefit / weight of item\n Map<Integer, Float> benefitPerWeightToIndexMap = new TreeMap<>();\n // if item i is included in knapsack j, result[i][j] = 1, otherwise result[i][j] = 0\n int[][] result = new int[itemLen][knapsackLen];\n // initialize the map\n for (int i = 0; i < itemLen; i++) {\n benefitPerWeightToIndexMap.put(i, (benefit[i] / weight[i]));\n }\n\n // the value comparator for sorting the entrySet in the map by value in descending order (using lambda)\n Comparator<Map.Entry<Integer, Float>> valueComparator = (o1, o2) -> o2.getValue().compareTo(o1.getValue());\n // convert the map to list to sort it by value comparator\n List<Map.Entry<Integer, Float>> benefitPerWeightToIndexList = new ArrayList<>(benefitPerWeightToIndexMap.entrySet());\n benefitPerWeightToIndexList.sort(valueComparator);\n\n printBenefitPerWeightList(benefitPerWeightToIndexList);\n\n int greedyTotalBenefit = 0;\n\n // put items in list into knapsacks\n for (int j = 0; j < knapsackLen; j++) {\n // the items have been put in and ready to be delete\n List<Map.Entry<Integer, Float>> deleteList = new ArrayList<>();\n for (Map.Entry<Integer, Float> entry:\n benefitPerWeightToIndexList) {\n int i = entry.getKey();\n if (weight[i] <= knapsackWeight[j]) {\n result[i][j] = 1;\n greedyTotalBenefit += benefit[i];\n deleteList.add(entry);\n knapsackWeight[j] -= weight[i];\n }\n }\n // delete the items have been put in\n benefitPerWeightToIndexList.removeAll(deleteList);\n }\n // After greedy algorithm\n System.out.println(\"------After greedy algorithm------\");\n printKnapsackWeight(knapsackWeight);\n printItemsNotIncluded(benefitPerWeightToIndexList);\n System.out.println(\"Total benefit:\" + greedyTotalBenefit);\n printResult(result);\n\n /*\n Search neighborhood\n */\n\n int neighborTotalBenefit = greedyTotalBenefit;\n\n // traversing knapsacks\n for (int j1 = 0; j1 < knapsackLen - 1; j1++) {\n for (int j2 = j1 + 1; j2 < knapsackLen; j2++) {\n // traversing items in the two knapsacks\n for (int i1 = 0; i1 < itemLen; i1++) {\n for (int i2 = 0; i2 < itemLen; i2++) {\n // judge if item i1 and item i2 exists in knapsack j1 and j2 respectively\n if (result[i1][j1] == 1 && result[i2][j2] == 1) {\n // tempList for update benefitPerWeightToIndexList in iteration\n List<Map.Entry<Integer, Float>> tempList = new ArrayList<>(benefitPerWeightToIndexList);\n // traversing items that have not been included\n for (Map.Entry<Integer, Float> entry:\n benefitPerWeightToIndexList) {\n int i3 = entry.getKey();\n // judge if the neighborhood solution is feasible\n if (knapsackWeight[j2] + weight[i2] - weight[i1] >= 0\n && knapsackWeight[j1] + weight[i1] - weight[i3] >= 0) {\n // judge if the neighborhood solution is better\n if (neighborTotalBenefit - benefit[i2] + benefit[i3] > neighborTotalBenefit) {\n // change the current solution to the neighborhood solution\n result[i1][j1] = 0;\n result[i1][j2] = 1;\n\n result[i2][j2] = 0;\n\n result[i3][j1] = 1;\n\n tempList.remove(entry);\n int finalI2 = i2;\n tempList.add(new Map.Entry<Integer, Float>() {\n @Override\n public Integer getKey() {\n return finalI2;\n }\n\n @Override\n public Float getValue() {\n return benefit[finalI2] / weight[finalI2];\n }\n\n @Override\n public Float setValue(Float value) {\n return null;\n }\n });\n\n knapsackWeight[j1] += weight[i1] - weight[i3];\n knapsackWeight[j2] += weight[i2] - weight[i1];\n\n neighborTotalBenefit = (int) (neighborTotalBenefit - benefit[i2] + benefit[i3]);\n\n System.out.println(\"------Find a better solution------\");\n System.out.println(\"Remove item\" + i2 + \" in \" + \"knapsack\" + j2 + \", move item\" + i1 + \" from knapsack\" + j1 + \" to \" + \"knapsack\" + j2 + \" and put item\" + i3 + \" in knapsack\" + j1);\n printKnapsackWeight(knapsackWeight);\n printItemsNotIncluded(tempList);\n System.out.println(\"Total benefit:\" + neighborTotalBenefit);\n printResult(result);\n }\n }\n }\n // update the list after traversing the list\n benefitPerWeightToIndexList = tempList;\n }\n }\n }\n }\n }\n\n return result;\n }", "public void sample(RandomGenerator rng) {\n\t\tdouble rate = priorRate;\n\t\tint sumTk = 0;\n\t\tfor (ProbabilityNode node : tiedNodes) {\n\t\t\tBetaDistribution betaD = new BetaDistribution(rng, this.c, node.marginal_nk);\n\t\t\tdouble q = Math.max(1e-75, betaD.sample());\n\t\t\trate += FastMath.log(1.0 / q);\n\t\t\tsumTk += node.marginal_tk;\n\t\t}\n\t\tdouble scale = 1.0 / rate;\n\t\t// marginal nk here is \\sum_{child}child.marginal_tk\n\t\tGammaDistribution gammaD = new GammaDistribution(rng, sumTk + priorShape, scale);\n\t\tthis.setConcentration(gammaD.sample());\n\t}", "public static int generateRandomWinner(int numberOfTickets) {\n return RandomUtils.nextInt(0, numberOfTickets);\n }", "private void genRandomPattern(float ratioInh, float ratioAct) {\n layoutPanel.inhNList = getRandomPointsIndex(ratioInh, null);\n layoutPanel.activeNList = getRandomPointsIndex(ratioAct,\n layoutPanel.inhNList);\n }", "double fractionalKnapsack(int W, Item arr[], int n) \n {\n Arrays.sort(arr, new Comparator<Item>() {\n \n public int compare(Item a, Item b)\n {\n return b.value*a.weight - a.value*b.weight;\n }\n });\n \n double ans = 0.0;\n \n for(Item it : arr )\n {\n int wt = it.weight;\n int val = it.value;\n \n if( W > wt )\n {\n W -= wt;\n ans += val;\n }\n \n else\n {\n ans += (val*W)/(double)wt;\n break;\n }\n }\n \n return ans;\n }", "private double bound(int i, double weight, double value, int[] items) {\n\t\tint item, wi;\n\t\tassert weight - k < EPS; // Because of when bound is called in fill\n\t\tfor (int j = n - 1; j >= 0; j--) {\n\t\t\titem = items[j];\n\t\t\tif (item <= i)\n\t\t\t\tcontinue;\n\t\t\twi = w[item];\n\t\t\tif (wi < k - weight) {\n\t\t\t\tweight += wi;\n\t\t\t\tvalue += v[item];\n\t\t\t}\n\t\t\telse return value + ((double) (k - weight) / wi) * v[item];\n\t\t}\n\t\treturn value;\n\t}", "public int getRandom() {\n int n = set.size();\n if (n == 0) return 0;\n Object[] res = set.toArray();\n Random rand = new Random();\n int result = rand.nextInt(n);\n return (Integer)res[result];\n }", "public void setNewWeights(boolean clearWeights) {\n Random randomEngine = new Random();\n if (clearWeights) {\n for (int i = 0; i <= inputs; ++i) {\n weights[i] = 0.0;\n exWeights[i] = 0.0;\n changes[i] = 0.0;\n }\n }\n else {\n for (int i = 0; i <= inputs; ++i) {\n weights[i] = randomEngine.nextDouble() - 0.5;\n exWeights[i] = 0.0;\n changes[i] = 0.0;\n }\n }\n }", "public static List<Integer> getRandomMLessThanN(int m, int n){\n\t\tif(m > n || m < 1 )\n\t\t\tthrow new InvalidParameterException(\"Invalid input parameters\");\n\t\tMap<Integer, Integer> randomNs = new HashMap<Integer, Integer>();\n\t\tRandom randomGen = new Random();\n\t\tfor(int index = 0; index < m ; index++){\n\t\t\t// Get a random index greater than the current \"index\" being considered\n\t\t\tint randomIndex = index + randomGen.nextInt(n - index);\t\t\t\n\t\t\t// If we have already touched the value at this random index location then \n\t\t\t// consider that value, else consider the value as random index itself\n\t\t\tint valueAtRandomIndex = randomNs.getOrDefault(randomIndex, randomIndex);\n\t\t\t\n\t\t\t// Now put(treat) the earlier found random value as the value found for current index\n\t\t\t\n\t\t\t// If there already a value at this index, consider it for replacement, else, just replace\n\t\t\t// this index itself\n\t\t\tint valueAtIndex = randomNs.getOrDefault(index, index);\n\t\t\t\n\t\t\trandomNs.put(index, valueAtRandomIndex);\n\t\t\trandomNs.put(randomIndex, valueAtIndex);\n\t\t}\n\t\t//System.out.println(randomNs);\n\t\tList<Integer> result = new ArrayList<>();\n\t\tfor(int index = 0 ; index < m; index++){\n\t\t\tresult.add(randomNs.get(index));\n\t\t}\n\t\n\t\treturn result;\n\t}", "public double[] newstater (){\r\n double[] styles = new double[Config.numberOfSeeds];\r\n for(int iii=0; iii < Config.numberOfSeeds; iii++)\r\n {\r\n Random randomr = new Random();\r\n styles[iii] = 0 + (5 - 0) * randomr.nextDouble();\r\n// RandGenerator.randDouble(0, 5);\r\n }\r\n return styles;\r\n }", "public void setWeight(int w){\n\t\tweight = w;\n\t}", "private void addRandomANewHopeOrHothCard(List<CardCollection.Item> result, int count) {\n List<String> possibleCards = new ArrayList<String>();\n possibleCards.addAll(_aNewHopeSetRarity.getAllCards());\n possibleCards.addAll(_hothSetRarity.getAllCards());\n filterNonExistingCards(possibleCards);\n Collections.shuffle(possibleCards, _random);\n addCards(result, possibleCards.subList(0, Math.min(possibleCards.size(), count)), false);\n }", "public Item sample() {\n if (isEmpty()) {\n throw new NoSuchElementException();\n }\n double rand = Math.random() * N;\n int idx = (int) Math.floor(rand);\n Item item = s[idx];\n return item;\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 }", "public void set_random_choice()\r\n\t{\r\n\t\tfor (int i=0 ; i<size ; i++)\r\n\t\t{\r\n\t\t\tnumbers.add(get_not_selected_random_digit());\r\n\t\t}\r\n\t}", "private static int getRandomNumberOfRooms(){\r\n return r.nextInt(50)+1;\r\n }", "public int selectRandom(int x) {\n count++; // increment count of numbers seen so far\n\n // If this is the first element from stream, return it\n if (count == 1)\n res = x;\n else {\n // Generate a random number from 0 to count - 1\n Random r = new Random();\n int i = r.nextInt(count);\n\n // Replace the prev random number with new number with 1/count probability\n if (i == count - 1)\n res = x;\n }\n return res;\n }", "public static int pickWeighted(int start, int end, Vector data, Random rng)\r\n\t{\r\n\t\t//System.out.println(Arrays.toString(data));\r\n\t\tVector dupes = data.copy();\r\n\t\tdouble totalSum=0;\r\n\t\tfor(int a=start;a<end;a++)\r\n\t\t{\r\n\t\t\ttotalSum+=data.get(a);\r\n\t\t}\r\n\t\t//divide chances by a.\r\n\t\tdupes.scale(1.0/totalSum);\r\n\t\tdouble check = rng.nextDouble();\r\n\t\ttotalSum=0;\r\n\t\tfor(int a=start;a<end;a++)\r\n\t\t{\r\n\t\t\tif(totalSum+dupes.get(a)>check)\r\n\t\t\t\treturn a;\r\n\t\t\ttotalSum+=dupes.get(a);\r\n\t\t}\r\n\t\treturn end-1;\r\n\t}", "public static int getRandomAmount(){\n return rand.nextInt(1000);\n }", "int RandomGeneratorZeroToThree (){\n\t\t int randomInt = 0;\n\t\t Random randomGenerator = new Random();\n\t\t for (int idx = 1; idx <= 10; ++idx) {\n\t\t\t randomInt = randomGenerator.nextInt(4);\n\n\t\t }\n\t\t return randomInt;\n\t }", "public static LinkedHashMap<Double, Object> distributeChance(Object... kv)\n {\n LinkedHashMap<Double, Object> result = new LinkedHashMap<>();\n\n // Sort them one after another.\n // e.g. 50, 25, 25 becomes 50, 75, 100\n double max = 0;\n for (int i = 0; i < kv.length; i += 2)\n {\n double chance = Double.valueOf(kv[i + 1].toString());\n if (chance <= 0) continue;\n\n max += chance;\n result.put(max, kv[i]);\n }\n\n result.put(-1d, max);\n return result;\n }", "public void setWeights(Weight[] weights) {\n this.weights = weights;\n }", "public static List<Integer> getRandomSample(int n, List<Double> rateList) {\n\t\t\n\t\tdouble sum = 0;\n\t\tfor( int i = 0; i < rateList.size(); i++ ) {\n\t\t\tsum += rateList.get(i);\n\t\t}\n\t\tList<Integer> result = new ArrayList<Integer>();\n\t\t\n\t\tdouble[] randomValueLise = new double[n];\n\t\tfor( int i = 0; i < n; i++ )\n\t\t{\n\t\t\trandomValueLise[i] = RandomManager.getRandom() * sum;\n\t\t}\n\t\tArrays.sort(randomValueLise);\n\t\tint searchIndex = 0;\n\t\t\n\t\tdouble cumulativeValue = 0;\n\t\tfor( int i = 0; i < rateList.size(); i++ ) {\n\t\t\tcumulativeValue += rateList.get(i);\n\t\t\tfor( ; searchIndex < randomValueLise.length && randomValueLise[searchIndex] <= cumulativeValue; searchIndex++ ) {\n\t\t\t\tresult.add( i );\n\t\t\t}\n\t\t}\n\t\tshuffle(result);\n\t\treturn result;\n\t}", "public void setWeight(int w) {\n\t\tweight = w;\n\t}", "public Item sample(){\n if(size == 0){\n throw new NoSuchElementException();\n }\n int ri = StdRandom.uniform(size);\n \n Iterator<Item> it = this.iterator();\n \n for(int i = 0; i < ri; i++){\n it.next();\n }\n \n return it.next();\n }", "public int getRandom(int bound) {\n return ThreadLocalRandom.current().nextInt(bound);\n }", "public void randomize()\n {\n int max = list.length;\n for (int i=0; i<list.length; i++)\n list[i] = (int)(Math.random() * max) + 1;\n }", "public static int knapSackWithDP(int expectedWeight) {\n\t\tint N = values.length;\n\t\tint[][] dP = new int[N + 1][expectedWeight + 1];\n\t\tboolean[][] takeSoln = new boolean[N + 1][expectedWeight + 1];\n\n\t\tfor (int i = 1; i <= N; i++) {\n\t\t\tfor (int j = 1; j <= expectedWeight; j++) {\n\t\t\t\tif (weights[i - 1] > j) {\n\t\t\t\t\tdP[i][j] = dP[i - 1][j];\n\t\t\t\t} else {\n\t\t\t\t\tint option1 = dP[i - 1][j], option2 = values[i - 1] + dP[i - 1][j - weights[i - 1]];\n\t\t\t\t\tdP[i][j] = Math.max(option2, option1);\n\t\t\t\t\ttakeSoln[i][j] = (option2 > option1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(\"Selected items are: \");\n\t\tint totalWt = 0, totalValue = 0;\n\t\tfor (int k = N, wt = expectedWeight; k > 0; k--) {\n\t\t\tif (takeSoln[k][wt]) {\n\t\t\t\ttotalWt += weights[k - 1];\n\t\t\t\ttotalValue += values[k - 1];\n\t\t\t\tSystem.out.printf(\"\tItem %d with weight %d and value %d\\n\", k, weights[k - 1], values[k - 1]);\n\t\t\t\twt -= weights[k - 1];\n\t\t\t}\n\t\t}\n\t\tSystem.out.printf(\"Calculated total weight= %d and total value= %d\\n\", totalWt, totalValue);\n\t\treturn dP[N][expectedWeight];\n\t}", "private double generateWeight(String model) {\n\t\tif (model.equals(\"compact\")) {\n\t\t\treturn (double) Math.round((1500 + (2000 - 1500) * randomGenerator.nextDouble()) * 100) / 100;\n\t\t} else if (model.equals(\"intermediate\")) {\n\t\t\treturn (double) Math.round((2000 + (2500 - 2000) * randomGenerator.nextDouble()) * 100) / 100;\n\t\t} else {\n\t\t\treturn (double) Math.round((2500 + (4000 - 2500) * randomGenerator.nextDouble()) * 100) / 100;\n\t\t}\n\t}", "public int[] getArrayOfRandomSamples(int numberofSamples){\n int[] ret = new int[numberofSamples];\n\n for(int i=0; i<numberofSamples; i++){\n int p = getWeightedRandomSample();\n ret[i] = p;\n //System.out.println(\"p: \" + p);\n counts[p]++;\n }\n return ret;\n }", "public static int getRandomNumbers(ArrayList simList) {\r\n return r.nextInt(simList.size());\r\n }", "public Integer randomDecision(List<Integer> options) {\n Random random = new Random();\n return options.get(random.nextInt(options.size()));\n }", "public List<Integer> getRandomElement(List<Integer> list) {\n\t\t//Random rand = new Random(); \n\t\tList<Integer> newList = new ArrayList<>();\n\t\t//newList.add(10);\n\n//\t\tfor(int i=0;i<5;i++) {\n//\t\tif(newList.size()<4) {\n//\t\t\tint n=Random(list);\n//\t\t\tif(newList.contains(n)) {\n//\t\t\t\t\n//\t\t\t}else {\n//\t\t\t\tnewList.add(n);\n//\t\t\t}\n//\t\t}\n//\t\t}\n\t\twhile(newList.size()<=2) {\n\t\t\tint n=Random(list);\n\t\t\tif(newList.contains(n)) {\n\t\t\t\t\n\t\t\t}else {\n\t\t\t\tnewList.add(n);\n\t\t\t}\n\t\t}\t\n\t\t\n\t\t\n\t\treturn newList;\n\t}", "private static int randomHeight(double p)\n {\n\tint h = 1;\n\twhile (r.nextDouble() < p) {\n\t // make it higher!\n\t h++;\n\t}\n\treturn h;\n }", "public synchronized void setWeight(int weight){\n\t\tthis.personWeight = weight; \n\t}", "private void randomizeNum() {\n randomNums.clear();\n for (int i = 0; i < 4; i++) {\n Integer rndNum = rnd.nextInt(10);\n randomNums.add(rndNum);\n }\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 static Option pickRandom() {\n\t\treturn Option.values()[rand.nextInt(3)];\n\t}", "private List<Integer> generateRandom() {\n Integer[] randArr = new Integer[numCols*numRows];\n\n int start = 0;\n int end;\n for(int i = 0; i < myStateMap.size(); i++) {\n int amt = myStateMap.get(i).getAmount();\n end = amt + start;\n for(int j = start; j < end; j++) {\n if(end > randArr.length) {\n break;\n }\n randArr[j] = myStateMap.get(i).getType();\n }\n start = end;\n }\n\n List<Integer> arr = new ArrayList<>(Arrays.asList(randArr));\n Collections.shuffle(arr);\n return arr;\n }", "private static double[] randomDoubles(int elements) {\n double[] array = new double[elements];\n for (int i = 0; i < array.length; i++) {\n double chance = Math.random();\n if (chance < 0.25) \n array[i] = Math.random() * (1000);\t\n else if (chance <= 0.50)\n array[i] = Math.random() * (1001);\t\n else if (chance <= 0.75)\n array[i] = Math.random() * (1002);\n else\n array[i] = Math.random() * (1003);\t\n }\n return array;\n }", "int getWeight();", "int getWeight();", "public static void main(String[] args){ w = the total weight\n\t\t// i = item i\n\t\t// m[i, w] = maximum value attained with weight <= w using items up to i\n\t\t//\n\t\t// recurrence relation:\n\t\t// m[0, w] = 0, if there's zero items, the sum is zero\n\t\t// m[i, w] = m[i-1, w], if w(i) > w, the new item's weight > current weight limit\n\t\t// m[i, w] = max(m[i-1, w],\n\t\t// \t\t\t\t m[i-1, w-w(i)] + v(i), if w(i) <= w\n\t\t//\n\t\t//\n\t\tArrayList<Item> items = new ArrayList<Item>();\n\n\t\titems.add(new Item(10, 60));\n\t\titems.add(new Item(20, 100));\n\t\titems.add(new Item(30, 120));\n\n\t\tSystem.out.println(knapsack(items.size()-1, 50, items));\n\t}", "public void randomize()\n {\n for (int i=0; i<list.length; i++)\n list[i] = (int)(Math.random() * 100) + 1;\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic T sample(boolean useMostLikely) {\n\t\tif (itemProbs_.isEmpty())\n\t\t\treturn null;\n\n\t\t// If using most likely, just get the highest prob one\n\t\tif (useMostLikely)\n\t\t\treturn getOrderedElements().get(0);\n\n\t\tif (elementArray_ == null) {\n\t\t\tprobArray_ = null;\n\t\t\t// Need to use flexible element array which ignores extremely low\n\t\t\t// probability items\n\t\t\tArrayList<T> elementArray = new ArrayList<T>();\n\t\t\tfor (T element : itemProbs_.keySet()) {\n\t\t\t\tif (itemProbs_.get(element) > MIN_PROB)\n\t\t\t\t\telementArray.add(element);\n\t\t\t}\n\t\t\telementArray_ = (T[]) new Object[elementArray.size()];\n\t\t\telementArray_ = elementArray.toArray(elementArray_);\n\t\t}\n\t\tif (rebuildProbs_ || probArray_ == null)\n\t\t\tbuildProbTree();\n\n\t\tdouble val = random_.nextDouble();\n\t\tint index = Arrays.binarySearch(probArray_, val);\n\t\tif (index < 0)\n\t\t\tindex = Math.min(-index - 1, elementArray_.length - 1);\n\n\t\treturn elementArray_[index];\n\t}", "private void mostValuePerWeightFirst(Instance instance) {\n ArrayList<Pair> order = new ArrayList<Pair>();\n\n for (int i = 0; i < instance.getSize(); i++) {\n order.add(i, new Pair(i, instance.getValue(i), instance.getWeight(i)));\n }\n\n // Sort items according to c_i/w_i >= c_i+1/w_i+1\n order.sort(new Comparator<Pair>() {\n @Override\n public int compare(Pair o1, Pair o2) {\n return o1.compareTo(o2) * -1;\n }\n });\n\n setSolution(order);\n }" ]
[ "0.703548", "0.6733252", "0.6191518", "0.6172298", "0.61425906", "0.60898334", "0.59679973", "0.58679074", "0.58645606", "0.58399886", "0.5825537", "0.5742653", "0.5707178", "0.5677591", "0.5600547", "0.5598978", "0.5598978", "0.5594992", "0.55867124", "0.5570183", "0.5513669", "0.55113494", "0.55042076", "0.5492324", "0.5430644", "0.5429244", "0.5425652", "0.54188293", "0.5390571", "0.5386543", "0.5367219", "0.5361853", "0.53486055", "0.53444934", "0.5342473", "0.5335789", "0.53259665", "0.53054786", "0.5305462", "0.5300282", "0.528826", "0.5282455", "0.5281375", "0.52803296", "0.5276499", "0.52734995", "0.52577394", "0.5250736", "0.5250136", "0.52269334", "0.52209073", "0.52024597", "0.5191178", "0.5189693", "0.5187783", "0.51874316", "0.51858246", "0.5176912", "0.5176437", "0.51757956", "0.51646006", "0.5158832", "0.5150959", "0.5136531", "0.5134303", "0.5122784", "0.51180786", "0.51054335", "0.5102553", "0.5096761", "0.5093452", "0.5089448", "0.50861335", "0.5084837", "0.5078165", "0.50740737", "0.5071653", "0.5069083", "0.5068107", "0.5066847", "0.5066111", "0.50660616", "0.5064799", "0.50638294", "0.50607026", "0.5052461", "0.5052289", "0.5051507", "0.50499904", "0.5048066", "0.50471747", "0.5046329", "0.5045642", "0.5036985", "0.50360715", "0.50360715", "0.50359297", "0.5034664", "0.5030418", "0.50259393" ]
0.5733086
12
/4 create constructor and var for field
@Transactional//to interacting with the relational database //Create method called signup inside this class which take RegisterRequest as input /*1*/ public void signup(RegisterRequest registerRequest) throws SpringRedditException { //the first thing we create an object for the user class User user = new User(); //and we will map the data we have from the register request object to the user object user.setUsername(registerRequest.getUsername()); user.setEmail(registerRequest.getEmail()); user.setPassword(passwordEncoder.encode(registerRequest.getPassword())); /*pass in value as instant.now => this is java class took at current time and lastly we will disable and set it false */ user.setEnabled(false); //save userRepository.save(user); /*5*/ //create verified user via email using UUID to generate String token = generateVerificationToken(user); //after that, create mailTemp.html /*6*/ //right after generate verification token method mailService.sendMail(new NotificationEmail("Please Active Your Account", user.getEmail(), "Thank you for signing up to Spring Reddit," + " please click on the below url to activate your account : " + "http://localhost:8080/api/auth/accountVerification" + "/" + token)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Field() {\r\n\t}", "ObjectField createObjectField();", "public Field(String watermark,\n String showfieldname,\n String saveRequired,\n String jfunction,\n String onChange,\n String onKeyDown,\n String defaultValue,\n String type,\n String sqlValue,\n String field_name,\n String relation,\n String states,\n String relationField,\n String onClickVList,\n String jIdList,\n String name,\n String searchRequired,\n String id,\n String placeholder,\n String value,\n String fieldType,\n String onclicksummary,\n String newRecord,\n List<Field> dListArray,\n List<OptionModel> mOptionsArrayList,\n String onclickrightbutton,\n String webSaveRequired,\n String field_type) {\n\n this.watermark = watermark;\n this.showfieldname = showfieldname;\n this.saveRequired = saveRequired;\n this.jfunction = jfunction;\n this.onChange = onChange;\n this.onKeyDown = onKeyDown;\n this.defaultValue = defaultValue;\n this.type = type;\n this.sqlValue = sqlValue;\n this.field_name = field_name;\n this.relation = relation;\n this.states = states;\n this.relationField = relationField;\n this.onClickVList = onClickVList;\n this.jIdList = jIdList;\n this.name = name;\n this.searchRequired = searchRequired;\n this.id = id;\n this.placeholder = placeholder;\n this.value = value;\n this.fieldType = fieldType;\n this.onclicksummary = onclicksummary;\n this.newRecord = newRecord;\n this.dListArray = dListArray;\n this.optionsArrayList = mOptionsArrayList;\n this.onclickrightbutton = onclickrightbutton;\n this.webSaveRequired = webSaveRequired;\n this.field_type = field_type;\n\n// this( watermark, showfieldname, saveRequired, jfunction,\n// onChange, onKeyDown, defaultValue, type, sqlValue,\n// field_name, relation, states, relationField,\n// onClickVList, jIdList, name, \"\",\n// searchRequired, id, placeholder, value,\n// fieldType, onclicksummary, newRecord, \"\",\n// dListArray,mOptionsArrayList,onclickrightbutton);\n }", "private Field(String name) {\n\t\t\tthis.name = name;\n\t\t}", "public FieldScrapper() \r\n {\r\n }", "private FieldInfo() {\r\n\t}", "public AttributeField(Field field){\n this.field = field;\n }", "Field() {\n value = 0;\n }", "public Field(){\n\n // this(\"\",\"\",\"\",\"\",\"\");\n }", "public FormField(String variable) {\n this.variable = variable;\n }", "public AirField() {\n\n\t}", "FieldRefType createFieldRefType();", "FieldDefinition createFieldDefinition();", "public static TreeNode makeField(Field field) {\n return new FieldNode(field);\n }", "public interface FieldGenerator extends Serializable {\n\n\t/**\n\t * Generate {@link Field} based on bean type and {@link JNIPropertyConstraint}\n\t * @param type\n\t * @param restriction\n\t * @return {@link Field}\n\t */\n\tpublic Field<?> createField(Class<?> type, JNIPropertyConstraint restriction);\n\t\n\t/**\n\t * Generate {@link Field} based on bean type and {@link JNIProperty}\n\t * @param type\n\t * @param property\n\t * @return {@link Field}\n\t */\n\tpublic Field<?> createField(Class<?> type, JNIProperty property);\n}", "private final Field makeField(String data) {\n Field result = null;\n\n if (termVector == null) {\n result = new Field(label, data, store, index);\n }\n else {\n result = new Field(label, data, store, index, termVector);\n }\n\n return result;\n }", "FieldInstance fieldNamed(String name);", "public ValorVariavel() {\r\n }", "public FieldObject() {\n super(\"fields/\");\n setEnterable(true);\n }", "public BaseField setupField(int iFieldSeq)\n {\n BaseField field = null;\n //if (iFieldSeq == 0)\n //{\n // field = new CounterField(this, ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n // field.setHidden(true);\n //}\n //if (iFieldSeq == 1)\n //{\n // field = new RecordChangedField(this, LAST_CHANGED, Constants.DEFAULT_FIELD_LENGTH, null, null);\n // field.setHidden(true);\n //}\n //if (iFieldSeq == 2)\n //{\n // field = new BooleanField(this, DELETED, Constants.DEFAULT_FIELD_LENGTH, null, new Boolean(false));\n // field.setHidden(true);\n //}\n if (iFieldSeq == 3)\n field = new StringField(this, NAME, 60, null, null);\n if (field == null)\n field = super.setupField(iFieldSeq);\n return field;\n }", "private ImmutableByHavingOnlyAPrivateConstructorUsingTheBuilderPattern (String field) {\n this.field = field;\n }", "HxField createField(final String fieldType,\n final String fieldName);", "public BaseField setupField(int iFieldSeq)\n {\n BaseField field = null;\n if (iFieldSeq == 0)\n field = new HotelField(this, PRODUCT_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 1)\n // field = new DateField(this, START_DATE, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 2)\n // field = new DateField(this, END_DATE, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 3)\n // field = new StringField(this, DESCRIPTION, 10, null, null);\n //if (iFieldSeq == 4)\n // field = new CityField(this, CITY_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 5)\n // field = new CityField(this, TO_CITY_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 6)\n // field = new ContinentField(this, CONTINENT_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 7)\n // field = new RegionField(this, REGION_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 8)\n // field = new CountryField(this, COUNTRY_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 9)\n // field = new StateField(this, STATE_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 10)\n // field = new VendorField(this, VENDOR_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n if (iFieldSeq == 11)\n field = new HotelRateField(this, RATE_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n if (iFieldSeq == 12)\n field = new HotelClassField(this, CLASS_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 13)\n // field = new DateField(this, DETAIL_DATE, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 14)\n // field = new ShortField(this, PAX, Constants.DEFAULT_FIELD_LENGTH, null, new Short((short)2));\n //if (iFieldSeq == 15)\n // field = new HotelScreenRecord_LastChanged(this, LAST_CHANGED, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 16)\n // field = new BooleanField(this, REMOTE_QUERY_ENABLED, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 17)\n // field = new ShortField(this, BLOCKED, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 18)\n // field = new ShortField(this, OVERSELL, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 19)\n // field = new BooleanField(this, CLOSED, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 20)\n // field = new BooleanField(this, DELETE, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 21)\n // field = new BooleanField(this, READ_ONLY, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 22)\n // field = new ProductSearchTypeField(this, PRODUCT_SEARCH_TYPE_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 23)\n // field = new ProductTypeField(this, PRODUCT_TYPE_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n if (iFieldSeq == 24)\n field = new PaxCategorySelect(this, PAX_CATEGORY_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n if (field == null)\n field = super.setupField(iFieldSeq);\n return field;\n }", "public IntegerField() {\r this(3, 0, 0, 0);\r }", "public FieldInfo() {\r\n \t// No implementation required\r\n }", "d(a aVar) {\n super(0);\n this.this$0 = aVar;\n }", "Variable createVariable();", "Variable createVariable();", "public Variable(){\n name = \"\";\n initialValue = 0;\n }", "@ConstructorProperties({\"fieldDeclaration\"})\n public Identity( Fields fieldDeclaration )\n {\n super( fieldDeclaration ); // don't need to set size, default is ANY\n\n this.types = fieldDeclaration.getTypes();\n }", "c(a aVar) {\n super(0);\n this.this$0 = aVar;\n }", "private Value() {\n\t}", "public JsonField() {\n }", "private static ReflectField convertField(DocletEnvironment docletEnvironment, VariableElement fieldDoc, List<ReflectClass<TypeElement>> reflectClasses) {\n ReflectField field = new ReflectField();\n field.setSimpleName(fieldDoc.getSimpleName().toString());\n // use the same, variable element does not have a qualified name\n field.setName(fieldDoc.getSimpleName().toString());\n field.setStatic(fieldDoc.getModifiers().contains(Modifier.STATIC));\n field.setPublic(fieldDoc.getModifiers().contains(Modifier.PUBLIC));\n field.setDescription(convertDoc(docletEnvironment, fieldDoc));\n field.setDefaultValue(fieldDoc.getConstantValue() != null ? fieldDoc.getConstantValue().toString() : null);\n field.setType(convertGenericClass(docletEnvironment, fieldDoc.asType(), reflectClasses));\n //find annotations\n for (AnnotationMirror annotationDesc : fieldDoc.getAnnotationMirrors()) {\n field.getAnnotations().add(convertAnnotation(docletEnvironment, annotationDesc));\n }\n return field;\n }", "private void __sep__Constructors__() {}", "public UserInputField() {\n }", "protected Value(Value v) {\n flags = v.flags;\n num = v.num;\n str = v.str;\n object_labels = v.object_labels;\n getters = v.getters;\n setters = v.setters;\n excluded_strings = v.excluded_strings;\n included_strings = v.included_strings;\n functionPartitions = v.functionPartitions;\n functionTypeSignatures = v.functionTypeSignatures;\n var = v.var;\n hashcode = v.hashcode;\n }", "public Field(String name, String type, VisibleDeclaration.visibility vis)\n {\n super(name, type, vis);\n }", "public Var(String var) {\r\n this.variable = var;\r\n }", "Variable(String _var) {\n this._var = _var;\n }", "public CpFldMemo() { super(10010, 5); }", "FieldType createFieldType();", "public BaseField setupField(int iFieldSeq)\n {\n BaseField field = null;\n //if (iFieldSeq == 0)\n // field = new TicketScreenRecord_ReportDate(this, REPORT_DATE, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 1)\n // field = new TicketScreenRecord_ReportTime(this, REPORT_TIME, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 2)\n // field = new TicketScreenRecord_ReportUserID(this, REPORT_USER_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 3)\n // field = new ShortField(this, REPORT_PAGE, Constants.DEFAULT_FIELD_LENGTH, null, new Short((short)1));\n //if (iFieldSeq == 4)\n // field = new IntegerField(this, REPORT_COUNT, Constants.DEFAULT_FIELD_LENGTH, null, new Integer(0));\n //if (iFieldSeq == 5)\n // field = new CurrencyField(this, REPORT_TOTAL, Constants.DEFAULT_FIELD_LENGTH, null, new Double(0));\n //if (iFieldSeq == 6)\n // field = new IntegerField(this, REPORT_KEY_AREA, Constants.DEFAULT_FIELD_LENGTH, null, null);\n if (iFieldSeq == 7)\n field = new ShortField(this, COUNT, Constants.DEFAULT_FIELD_LENGTH, null, null);\n if (iFieldSeq == 8)\n field = new CurrencyField(this, TOTAL, Constants.DEFAULT_FIELD_LENGTH, null, null);\n if (iFieldSeq == 9)\n field = new TicketReportOrderField(this, REPORT_ORDER, Constants.DEFAULT_FIELD_LENGTH, null, null);\n if (iFieldSeq == 10)\n field = new DateField(this, START_DEPARTURE, Constants.DEFAULT_FIELD_LENGTH, null, null);\n if (iFieldSeq == 11)\n field = new DateField(this, END_DEPARTURE, Constants.DEFAULT_FIELD_LENGTH, null, null);\n if (iFieldSeq == 12)\n field = new DateField(this, START_ISSUE, Constants.DEFAULT_FIELD_LENGTH, null, null);\n if (iFieldSeq == 13)\n field = new DateField(this, END_ISSUE, Constants.DEFAULT_FIELD_LENGTH, null, null);\n if (iFieldSeq == 14)\n field = new BooleanField(this, INCLUDE_VOID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n if (iFieldSeq == 15)\n field = new AirlineField(this, AIRLINE_1ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n if (iFieldSeq == 16)\n field = new AirlineField(this, AIRLINE_2ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n if (iFieldSeq == 17)\n field = new AirlineField(this, AIRLINE_3ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n if (iFieldSeq == 18)\n field = new AirlineField(this, AIRLINE_4ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n if (iFieldSeq == 19)\n field = new StringField(this, START_TICKET, 20, null, null);\n if (iFieldSeq == 20)\n field = new StringField(this, END_TICKET, 20, null, null);\n if (field == null)\n field = super.setupField(iFieldSeq);\n return field;\n }", "public Entry(int field) {\n this.field = field;\n }", "protected abstract void initViewValue(final T field);", "FieldsType createFieldsType();", "public Tuple(Datum fieldIn) {\n fields = new ArrayList<Datum>(1);\n fields.add(fieldIn);\n }", "public Field(int value) {\n\n if (isPowerOfTwo(value)) {\n this.value = value;\n } else {\n throw new IllegalArgumentException(\"Value has to be a power of 2\");\n }\n }", "public Field newField(Catalog catalog)\r\n {\r\n Field newObj = (Field)SAP_Field.newObj((com.informatica.adapter.sdkadapter.patternblocks.catalog.semantic.auto.SAP_Catalog)catalog);\r\n SEMTableFieldExtensions newExtnObj = newSEMTableFieldExtensions(catalog);\r\n newObj.setExtensions(newExtnObj);\r\n return newObj;\r\n }", "public Field(int a, int b, Pawn.Color c, Pawn.Type t) {\n x = a;\n y = b;\n pawn = new Pawn(c, t);\n }", "private Field(String jsonString) {\n this.jsonString = jsonString;\n }", "public BinaryField(JNIBinaryField field)\n\t{\n\t\tsetInternal(field);\n\t}", "private SystemValue(final String nm, final Object obj, final Field field, final Consumer<V> method) {\n\t super(nm, Type.SYSTEM, false);\n\n\t object = obj;\n\t getField = field;\n\t setMethod = method;\n\t}", "public UpperCaseField() {\n this(null, 0, 0);\n }", "private Field(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public ObjectCodeField(Class<T> objectClass) {\n this(null, objectClass);\n }", "static _field to( Class clazz, _field _fl ){\n try {\n Field f = clazz.getDeclaredField(_fl.getName());\n applyAllAnnotationMacros(_fl, f);\n return _fl;\n } catch( NoSuchFieldException nsfe ){\n throw new _jdraftException(\"no Field \"+ _fl+\" on \"+clazz, nsfe);\n }\n }", "public FieldDefinition(FieldData fieldData)\n\t{\n\t\tcommonInitialisation();\n\t\tthis.fieldName = fieldData.getFieldName().toUpperCase();\n\t\tthis.fieldType = fieldData.getFieldType();\n\t\tthis.fieldLength = fieldData.getFieldLength();\n\t\tthis.fieldDecimal = fieldData.getFieldDecimal();\n\t\tthis.upperCase = fieldData.isUpperCase();\n\t\tthis.workField = fieldData.isWorkField();\n\t\tthis.repeating = fieldData instanceof RepeatingFieldData;\n\t}", "default HxField createField(final Class<?> type,\n final String fieldName) {\n return createField(type.getName(), fieldName);\n }", "protected void createSmartField() {\n\t\tthis.smartField = new SmartField();\n\t}", "Object getObjectField();", "InstrumentedType withField(FieldDescription.Token token);", "public Field createFieldRef(Position pos, Expr receiver, Name name) {\n final Type type = receiver.type();\n X10FieldInstance fi = X10TypeMixin.getProperty(type, name);\n if (null == fi) {\n fi = (X10FieldInstance) type.toClass().fieldNamed(name);\n }\n if (null == fi) return null;\n return createFieldRef(pos, receiver, fi);\n }", "public Clade() {}", "VarAssignment createVarAssignment();", "public PropertySelector(SingularAttribute<E, F> field) {\n this.field = field;\n }", "protected Value() {\n flags = 0;\n num = null;\n str = null;\n object_labels = getters = setters = null;\n excluded_strings = included_strings = null;\n functionPartitions = null;\n functionTypeSignatures = null;\n var = null;\n hashcode = 0;\n }", "d(b bVar) {\n super(2);\n this.this$0 = bVar;\n }", "public Valvula(){}", "private void init() {\n FieldWrapper id = new FieldWrapper();\n id.fieldDescription = new HashMap<String, Object>();\n id.fieldDescription.put(\"fullName\", \"Id\");\n id.fieldDescription.put(\"type\", \"Text\");\n\n FieldWrapper name = new FieldWrapper();\n name.fieldDescription = new HashMap<String, Object>();\n name.fieldDescription.put(\"fullName\", \"Name\");\n\n FieldWrapper createdBy = new FieldWrapper();\n createdBy.fieldDescription = new HashMap<String, Object>();\n createdBy.fieldDescription.put(\"fullName\", \"CreatedBy\");\n createdBy.fieldDescription.put(\"type\", \"Lookup\");\n\n FieldWrapper lastModifiedBy = new FieldWrapper();\n lastModifiedBy.fieldDescription = new HashMap<String, Object>();\n lastModifiedBy.fieldDescription.put(\"fullName\", \"LastModifiedBy\");\n lastModifiedBy.fieldDescription.put(\"type\", \"Lookup\");\n\n FieldWrapper owner = new FieldWrapper();\n owner.fieldDescription = new HashMap<String, Object>();\n owner.fieldDescription.put(\"fullName\", \"Owner\");\n owner.fieldDescription.put(\"type\", \"Lookup\");\n\n fieldDescribe = new HashMap<String, FieldWrapper>();\n\n fieldDescribe.put((String) id.fieldDescription.get(\"fullName\"), id);\n fieldDescribe.put((String) name.fieldDescription.get(\"fullName\"), name);\n fieldDescribe.put((String) createdBy.fieldDescription.get(\"fullName\"), createdBy);\n fieldDescribe.put((String) lastModifiedBy.fieldDescription.get(\"fullName\"), lastModifiedBy);\n fieldDescribe.put((String) owner.fieldDescription.get(\"fullName\"), owner);\n }", "@ConstructorProperties({\"fieldDeclaration\", \"types\"})\n public Identity( Fields fieldDeclaration, Class... types )\n {\n super( fieldDeclaration );\n this.types = Arrays.copyOf( types, types.length );\n\n if( !fieldDeclaration.isSubstitution() && fieldDeclaration.size() != types.length )\n throw new IllegalArgumentException( \"fieldDeclaration and types must be the same size\" );\n }", "VariableExp createVariableExp();", "ControlVariable createControlVariable();", "protected void createJoinPointSpecificFields() {\n String[] fieldNames = null;\n // create the field argument field\n Type fieldType = Type.getType(m_calleeMemberDesc);\n fieldNames = new String[1];\n String fieldName = ARGUMENT_FIELD + 0;\n fieldNames[0] = fieldName;\n m_cw.visitField(ACC_PRIVATE, fieldName, fieldType.getDescriptor(), null, null);\n m_fieldNames = fieldNames;\n\n m_cw.visitField(\n ACC_PRIVATE + ACC_STATIC,\n SIGNATURE_FIELD_NAME,\n FIELD_SIGNATURE_IMPL_CLASS_SIGNATURE,\n null,\n null\n );\n }", "private JCVariableDecl makeAttributeListField(DiagnosticPosition diagPos, List<AttributeInfo> attrInfos) {\n ListBuffer<JCExpression> attrs = ListBuffer.lb();\n \n for (AttributeInfo ai : attrInfos) {\n if (ai.needsCloning()) {\n attrs.append(make.at(diagPos).Ident(ai.getName()));\n }\n }\n \n return make.at(diagPos).VarDef(make.Modifiers(Flags.PRIVATE), \n defs.attributesFieldName, \n make.TypeArray( toJava.makeTypeTree(abstractVariableType, diagPos) ), \n make.NewArray(toJava.makeTypeTree(abstractVariableType, diagPos), \n List.<JCExpression>nil(), attrs.toList()));\n }", "private void addConstructors() {\n\t\tthis.rootBindingClass.getConstructor().body.line(\"super({}.class);\\n\", this.name.getTypeWithoutGenerics());\n\t\tGMethod constructor = this.rootBindingClass.getConstructor(this.name.get() + \" value\");\n\t\tconstructor.body.line(\"super({}.class);\", this.name.getTypeWithoutGenerics());\n\t\tconstructor.body.line(\"this.set(value);\");\n\t}", "public UiFieldRecord() {\n super(UiField.UI_FIELD);\n }", "public Field(String fieldType, boolean empty) {\r\n\t\tthis.fieldType = fieldType;\r\n\t\tthis.empty = empty;\r\n\t}", "Reproducible newInstance();", "public Variable(String name){\n this.name = name;\n }", "public Identity()\n {\n super( Fields.ARGS );\n }", "@Test\n public void testConstructorSetCorrect() {\n String name = \"A modifier\";\n int cost = 10;\n\n Modifier m = new Modifier(name, cost) {\n @Override\n public int getValue() {\n return 0;\n }\n };\n\n assertEquals(name, m.getName());\n assertEquals(cost, m.getCost());\n }", "public Node(IField field) {\n\t\tthis.x = field.getX();\n\t\tthis.y = field.getY();\n\n\t\tthis.growRate = field.getGrowingRate();\n\t\tthis.ressourceValue = field.getFood();\n\t\t\n\t\tthis.neighbors = new ArrayList<Edge>();\n\t}", "public FieldNotFoundException() {\n }", "@Override\n\tpublic void VisitGetFieldNode(GetFieldNode Node) {\n\n\t}", "public final BuilderField field() throws RecognitionException {\n BuilderField field = null;\n\n\n CommonTree SIMPLE_NAME20 = null;\n int access_list18 = 0;\n EncodedValue field_initial_value19 = null;\n TreeRuleReturnScope nonvoid_type_descriptor21 = null;\n Set<Annotation> annotations22 = null;\n\n try {\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:253:3: ( ^( I_FIELD SIMPLE_NAME access_list ^( I_FIELD_TYPE nonvoid_type_descriptor ) field_initial_value ( annotations )? ) )\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:253:4: ^( I_FIELD SIMPLE_NAME access_list ^( I_FIELD_TYPE nonvoid_type_descriptor ) field_initial_value ( annotations )? )\n {\n match(input, I_FIELD, FOLLOW_I_FIELD_in_field383);\n match(input, Token.DOWN, null);\n SIMPLE_NAME20 = (CommonTree) match(input, SIMPLE_NAME, FOLLOW_SIMPLE_NAME_in_field385);\n pushFollow(FOLLOW_access_list_in_field387);\n access_list18 = access_list();\n state._fsp--;\n\n match(input, I_FIELD_TYPE, FOLLOW_I_FIELD_TYPE_in_field390);\n match(input, Token.DOWN, null);\n pushFollow(FOLLOW_nonvoid_type_descriptor_in_field392);\n nonvoid_type_descriptor21 = nonvoid_type_descriptor();\n state._fsp--;\n\n match(input, Token.UP, null);\n\n pushFollow(FOLLOW_field_initial_value_in_field395);\n field_initial_value19 = field_initial_value();\n state._fsp--;\n\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:253:98: ( annotations )?\n int alt7 = 2;\n int LA7_0 = input.LA(1);\n if ((LA7_0 == I_ANNOTATIONS)) {\n alt7 = 1;\n }\n switch (alt7) {\n case 1:\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:253:98: annotations\n {\n pushFollow(FOLLOW_annotations_in_field397);\n annotations22 = annotations();\n state._fsp--;\n\n }\n break;\n\n }\n\n match(input, Token.UP, null);\n\n\n int accessFlags = access_list18;\n\n\n if (!AccessFlags.STATIC.isSet(accessFlags) && field_initial_value19 != null) {\n throw new SemanticException(input, \"Initial field values can only be specified for static fields.\");\n }\n\n field = dexBuilder.internField(classType, (SIMPLE_NAME20 != null ? SIMPLE_NAME20.getText() : null), (nonvoid_type_descriptor21 != null ? ((smaliTreeWalker.nonvoid_type_descriptor_return) nonvoid_type_descriptor21).type : null), access_list18,\n field_initial_value19, annotations22);\n\n }\n\n } catch (RecognitionException re) {\n reportError(re);\n recover(input, re);\n } finally {\n // do for sure before leaving\n }\n return field;\n }", "public void createField(Field field) {\n Span span = this.tracer.buildSpan(\"Client.CreateField\").start();\n try {\n String path = String.format(\"/index/%s/field/%s\", field.getIndex().getName(), field.getName());\n String body = field.getOptions().toString();\n ByteArrayEntity data = new ByteArrayEntity(body.getBytes(StandardCharsets.UTF_8));\n clientExecute(\"POST\", path, data, null, \"Error while creating field\");\n } finally {\n span.finish();\n }\n }", "@Override\n public Field<?> createField(Container container, Object itemId,\n Object propertyId, Component uiContext) {\n Field<?> field = super.createField(container, itemId,\n propertyId, uiContext);\n\n // ...and just set them as immediate\n ((AbstractField<?>) field).setImmediate(true);\n\n // Also modify the width of TextFields\n if (field instanceof TextField)\n field.setWidth(\"100%\");\n field.setRequired(true);\n ((TextField) field).setInputPrompt(\"Введите назначение\");\n field.addStyleName(ValoTheme.LAYOUT_HORIZONTAL_WRAPPING);\n field.focus();\n\n return field;\n }", "public FactoryValue( ) \r\n {\r\n }", "public BabbleValue() {}", "public Value() {}", "public static MemberExpression field(Expression expression, Class type, String fieldName) { throw Extensions.todo(); }", "public static MemberExpression field(Expression expression, Field field) { throw Extensions.todo(); }", "@Override\n\t\t\tpublic void visit(ConstructorDeclaration arg0, Object arg1) {\n\t\t\t\tif((arg0.getModifiers() & Modifier.PUBLIC) > 0)\n\t\t\t\t\tfields.add(\"+\" + arg0.getDeclarationAsString(false, false));\n\t\t\t\tsuper.visit(arg0, arg1);\n\t\t\t}", "public InfixField(String num, String val) {\n tagNum = num;\n tagVal = val;\n }", "public CampoModelo(String valor, String etiqueta, Integer longitud)\n/* 10: */ {\n/* 11:17 */ this.valor = valor;\n/* 12:18 */ this.etiqueta = etiqueta;\n/* 13:19 */ this.longitud = longitud;\n/* 14: */ }", "protected ObjectRepresentant (Object counterPart, TypeSystemNode type, String name) {\r\n this.counterPart = counterPart;\r\n if (name!=null) {\r\n setName(name);\r\n }\r\n else {\r\n setName(\"this\");\r\n }\r\n typeSystemNode = type;\r\n System.out.println(this+\" value: \"+value());\r\n }", "public Value(){}", "private Constructor getConstructor() throws Exception {\r\n return type.getConstructor(Contact.class, label, Format.class);\r\n }", "d(l lVar, m mVar, b bVar) {\n super(mVar);\n this.f11484d = lVar;\n this.f11483c = bVar;\n }", "a(c cVar) {\n super(0);\n this.this$0 = cVar;\n }" ]
[ "0.7172083", "0.6816015", "0.66348636", "0.65322614", "0.6490631", "0.6478056", "0.64475757", "0.6441657", "0.6427961", "0.63535255", "0.6306492", "0.6265273", "0.62511826", "0.6159978", "0.6129341", "0.6044088", "0.60129356", "0.6000999", "0.5988052", "0.5966708", "0.59093475", "0.5903258", "0.58884", "0.58715063", "0.5847791", "0.5846779", "0.58352375", "0.58352375", "0.58296984", "0.5825818", "0.58209074", "0.5819904", "0.5812616", "0.58105123", "0.579447", "0.5765594", "0.57587886", "0.5752163", "0.5748114", "0.5743743", "0.57401145", "0.57136005", "0.5691689", "0.5689845", "0.5685408", "0.5645716", "0.5643023", "0.561299", "0.56119484", "0.5594828", "0.5585508", "0.55684125", "0.5567324", "0.5562521", "0.5553198", "0.55495846", "0.55460846", "0.55332774", "0.5530019", "0.55282116", "0.5516849", "0.5515959", "0.5511369", "0.55029696", "0.54733276", "0.5461792", "0.54514694", "0.54494053", "0.5448068", "0.5426796", "0.5410793", "0.54045683", "0.5399598", "0.5396274", "0.5394484", "0.5391575", "0.5379074", "0.5378039", "0.53767073", "0.5369422", "0.5366159", "0.5365496", "0.53598845", "0.53587687", "0.53577167", "0.53557914", "0.5354284", "0.5348816", "0.5340605", "0.53367674", "0.5335738", "0.5334375", "0.5330178", "0.53269815", "0.5326084", "0.53240544", "0.5322032", "0.53220063", "0.53215504", "0.5316403", "0.5314592" ]
0.0
-1
we take a token whenever user clicks on url, and look it up DB, fetch the user who created token and enable user remaining part here is call this signup from AuthController
private String generateVerificationToken(User user) { String token = UUID.randomUUID().toString(); VerificationToken verificationToken = new VerificationToken(); verificationToken.setToken(token); verificationToken.setUser(user);// after that we save it to repository verificationTokenRepository.save(verificationToken); return token; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void registerUser()\n {\n /*AuthService.createAccount takes a Consumer<Boolean> where the result will be true if the user successfully logged in, or false otherwise*/\n authService.createAccount(entryService.extractText(namedFields), result -> {\n if (result.isEmpty()) {\n startActivity(new Intent(this, DashboardActivity.class));\n } else {\n makeToast(result);\n formContainer.setAlpha(1f);\n progressContainer.setVisibility(View.GONE);\n progressContainer.setOnClickListener(null);\n }\n });\n }", "private void doSignup(RoutingContext ctx){\n // Get Data from view\n JsonObject req = ctx.getBodyAsJson();\n String username = req.getString(\"username\");\n String password = req.getString(\"password\");\n\n GoogleAuthenticator authenticator = new GoogleAuthenticator();\n\n //Get Generate Key\n System.out.println(\" Calling Google Authenticator to generate AuthKey\");\n GoogleAuthenticatorKey authKey = authenticator.createCredentials();\n String key = authKey.getKey();\n System.out.println(\" Google Authenticator generated AuthKey\");\n\n //Store Data from Repository\n User user = new User(username,password,key);\n\n //send response to the user\n JsonObject res = new JsonObject().put(\"key\",key);\n ctx.response().setStatusCode(200).end(res.encode());\n }", "private void requestToken(){\n APIAuth auth = new APIAuth(this.prefs.getString(\"email\", \"\"), this.prefs.getString(\"password\", \"\"), this.prefs.getString(\"fname\", \"\") + \" \" +this.prefs.getString(\"lname\", \"\"), this.prefs, null);\n auth.authenticate();\n }", "public void onClick_AGSU_signUp(View view) {\n AnimationTools.startLoadingAnimation(Constants.ANIMATION_CODE_AGSU_LOADING, this, signUpButton_rootLayout, R.style.AGSU_loading_progress_bar);\n\n FirestoreManager.saveUserData(SecondarySignUpManager.getDatabaseUser());\n\n //add a password-email auth method\n AuthCredential credential = EmailAuthProvider.getCredential(SecondarySignUpManager.getDatabaseUser().getEmail(), SecondarySignUpManager.getDatabaseUser().getPassword());\n AuthenticationManager.getCurrentUser().linkWithCredential(credential).addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if(task.isSuccessful()) {\n System.out.println(\"[Neuron.SecondarySignUpActivity.onClick_AGSU_signUp]: link with email credential SUCCESSFUL! User uid = \" + task.getResult().getUser().getDisplayName());\n Constants.isSignUpInProcess = false; //sign up is now finished\n\n //in AGSU user is always new --> send verification email\n EmailVerification.sendVerificationEmail();\n\n Constants.isSecondarySignUpInProcess = false; //end of secondary sign up process\n\n ActivityTools.startNewActivity(activityContext, MainActivity.class);\n } else {\n System.err.println(\"[Neuron.SecondarySignUpActivity.onClick_AGSU_signUp]: ERROR: link with email credential FAILED! \" + task.getException().getMessage());\n }\n\n AnimationTools.stopLoadingAnimation(Constants.ANIMATION_CODE_AGSU_LOADING);\n }\n });\n\n }", "@Transactional\n void fetchUserAndEnable(VerificationToken verificationToken) throws SpringRedditException {\n String username = verificationToken.getUser().getUsername();\n //and call orElseThrow as supplier to throws out custom springRedEx\n User user = userRepository.findByUsername(username).orElseThrow(() -> new SpringRedditException(\"User not found with name - \" + username));\n //and store this result inside var user and enable this user by typing user.set\n user.setEnabled(true);\n userRepository.save(user);\n /*lastly sava user to database and mark the method as transaction\n and go back to auth controller and return response entity back to the client\n by typing written new response entity\n */\n }", "void activateUser(String email, String activationToken);", "private void register_user() {\n\n\t\tHttpRegister post = new HttpRegister();\n\t\tpost.execute(Config.URL + \"/api/newuser\");\n\n\t}", "@Override\n protected Boolean doInBackground(Void... params) {\n try {\n OkHttpClient client = new OkHttpClient();\n RequestBody body = new FormBody.Builder()\n .add(\"Token\",session.get(\"Token\"))\n .add(\"User\",ruser)\n .build();\n\n okhttp3.Request request = new okhttp3.Request.Builder()\n .url(\"http://donationearners.net/cab_token/lobscab_tokenphp.php\")\n .post(body)\n .build();\n try {\n client.newCall(request).execute();\n } catch (IOException e) {\n\n e.printStackTrace();\n return false;\n }\n // TODO: register the new account here.\n return true;\n }catch (Exception er){\n return false;\n }\n\n }", "@Override\n public void onNewToken(@NonNull String token)\n {\n super.onNewToken(token);\n String currentUserId = getCurrentUserId();\n if (currentUserId != null)\n {\n sendRegistrationToServer(token, currentUserId);\n }\n }", "private void signUpNewUserToDB(){\n dbAuthentication.createUserWithEmailAndPassword(this.newUser.getEmail(), this.newUser.getPassword())\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if(task.isSuccessful()){\n /**signUp success, will update realTime DB ant firebase Authentication*/\n FirebaseUser currentUser = dbAuthentication.getCurrentUser();\n addToRealDB(currentUser.getUid());\n /**will send verification email to the user from Firebase Authentication*/\n currentUser.sendEmailVerification().addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n }\n });\n }else{isBadEmail = true;}\n }\n });\n }", "@Transactional//to interacting with the relational database\n //Create method called signup inside this class which take RegisterRequest as input\n /*1*/ public void signup(RegisterRequest registerRequest) throws SpringRedditException {\n //the first thing we create an object for the user class\n User user = new User();\n //and we will map the data we have from the register request object to the user object\n user.setUsername(registerRequest.getUsername());\n user.setEmail(registerRequest.getEmail());\n user.setPassword(passwordEncoder.encode(registerRequest.getPassword()));\n /*pass in value as instant.now => this is java class took at current time\n and lastly we will disable and set it false\n */\n user.setEnabled(false);\n //save\n userRepository.save(user);\n /*5*/ //create verified user via email using UUID to generate\n String token = generateVerificationToken(user);\n //after that, create mailTemp.html\n /*6*/ //right after generate verification token method\n\n mailService.sendMail(new NotificationEmail(\"Please Active Your Account\", user.getEmail(), \"Thank you for signing up to Spring Reddit,\" +\n \" please click on the below url to activate your account : \"\n + \"http://localhost:8080/api/auth/accountVerification\" + \"/\" + token));\n }", "private void registerUser() {\n\n // Get register name\n EditText mRegisterNameField = (EditText) findViewById(R.id.register_name_field);\n String nickname = mRegisterNameField.getText().toString();\n\n // Get register email\n EditText mRegisterEmailField = (EditText) findViewById(R.id.register_email_field);\n String email = mRegisterEmailField.getText().toString();\n\n // Get register password\n EditText mRegisterPasswordField = (EditText) findViewById(R.id.register_password_field);\n String password = mRegisterPasswordField.getText().toString();\n\n AccountCredentials credentials = new AccountCredentials(email, password);\n credentials.setNickname(nickname);\n\n if (DataHolder.getInstance().isAnonymous()) {\n credentials.setOldUsername(DataHolder.getInstance().getUser().getUsername());\n }\n\n sendRegistrationRequest(credentials);\n }", "@Override\n public void receiveAuthToken(String token) {\n loginFragment.signUpUserWithParse();\n }", "protected void validateToken() {\n\n authToken = preferences.getString(getString(R.string.auth_token), \"\");\n saplynService = new SaplynService(preferences.getInt(debugLvl, -1), authToken);\n\n // Check if user already authenticated\n if (authToken.equals(\"\")) {\n Intent intent = new Intent(HomeActivity.this, AuthenticationActivity.class);\n startActivityForResult(intent, 0);\n }\n else {\n populateUser();\n }\n }", "private void login() {\n RegistrationRequests.LoginModel loginModel = new RegistrationRequests.LoginModel(\n edtEmail.getText().toString(), edtPaswd.getText().toString(), true);\n\n final Context context = this;\n Response.Listener<RegistrationRequests.LoginApiResponse> responseListener = new Response.Listener<RegistrationRequests.LoginApiResponse>() {\n @Override\n public void onResponse(RegistrationRequests.LoginApiResponse response) {\n Log.d(TAG, \"login: \" + response.toString());\n if (response.getId() != 0) {\n Accounts.checkNewAccount(context, response.getId());\n //stores JWT token\n PrefUtil.putString(context, AppConstants.SESSION_TOKEN, response.getSessionToken());\n PrefUtil.putInt(context, AppConstants.USER_ID, response.getId());\n PrefUtil.putString(context, AppConstants.USER_NAME, response.getUsername());\n PrefUtil.putLong(context, AppConstants.LAST_LOGIN_DATE, Calendar.getInstance().getTimeInMillis());\n addToUsers(response.getId(), edtDisplayName.getText().toString());\n }\n }\n };\n\n Response.ErrorListener errorListener = new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n progressDialog.cancel();\n if (error != null) {\n String err = (error.getMessage() == null) ? \"error message null\" : error.getMessage();\n Log.d(TAG, err);\n AlertDialog.Builder alertDialog = new AlertDialog.Builder(RegisterActivity.this);\n alertDialog.setTitle(getString(R.string.error_title_signup));\n alertDialog.setMessage(getString(R.string.error_message_network)).setCancelable(false)\n .setPositiveButton(getString(R.string.dialog_ok), new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }\n });\n alertDialog.show();\n }\n }\n };\n\n progressDialog.setMessage(getString(R.string.progress_dialog_message_login));\n RegistrationRequests loginRequest =\n RegistrationRequests.login(this, loginModel, responseListener, errorListener);\n if (loginRequest != null) loginRequest.setTag(CANCEL_TAG);\n VolleyRequest.getInstance(this.getApplicationContext()).addToRequestQueue(loginRequest);\n }", "@Override\n protected void onSubmit()\n {\n final ApplicationUser appUser = (ApplicationUser) getModelObject();\n UserRegistration userRegistration = new UserRegistration(appUser.getBusinessUser());\n paramUserId = userRegistration.getUserId();\n //paramDateTime = userRegistration.getRequestTimeAsString();\n //paramToken = userRegistration.getMailToken();\n\n // Note: Dccd does not use a validation Page!\n\n\t\t\t// Construct the url for the activation of member and/or organisation\n\t\t\tMap<String, String> parameterMap = new HashMap<String, String>();\n\t\t\tparameterMap.put(\"userId\", paramUserId);\n\t\t\tparameterMap.put(\"inEditMode\", \"0\"); // activation button is placed on non-edit page!\n\t\t\tparameterMap.put(\"enableModeSwitch\", \"1\");\n\t\t\tfinal String activationUrl = createPageURL(MemberPage.class, parameterMap);\n\t\t\tuserRegistration.setActivationUrl(activationUrl);\n\t\t\tlogger.debug(\"activationUrl: \" + activationUrl);\n\n if (isOrganisationEdit())\n {\n \tlogger.debug(\"new Organisation must now be registered\");\n \tassert(null != newOrganisation);\n \t// Also register the new organisation\n \tlogger.debug(\"New organistation: \" + newOrganisation.getId());\n \tOrganisationRegistration organisationRegistration =\n \t\tnew OrganisationRegistration(newOrganisation);\n\n \tuserRegistration.setOrganisation(newOrganisation);\n \tDccdUserService.getService().handleRegistrationRequest(userRegistration, organisationRegistration);\n\n \tif (!organisationRegistration.isCompleted())\n \t{\n \t\t// something went wrong!\n \tlogger.debug(\"Could not complete organisation registration\");\n for (String stateKey : organisationRegistration.getAccumulatedStateKeys())\n {\n //error(getString(stateKey));\n \t// allow for substitution\n error(getString(stateKey, new Model(organisationRegistration)));\n }\n \t}\n }\n else\n {\n \tuserRegistration.setOrganisation(selectedOrganisation);\n \tuserRegistration = DccdUserService.getService().handleRegistrationRequest(userRegistration);\n }\n\n if (userRegistration.isCompleted())\n {\n disableForm(new String[] {});\n info(getString(\"missionAccomplished\", new Model(appUser)));\n //setResponsePage(new InfoPage(getString(\"registrationpage.header\")));\n // use specific page for the confirmation\n setResponsePage(new RegistrationConfirmPage(appUser));\n }\n else\n {\n \tlogger.debug(\"Could not complete user registration\");\n for (String stateKey : userRegistration.getAccumulatedStateKeys())\n {\n error(getString(stateKey));\n }\n }\n logger.debug(\"End onSubmit: \" + userRegistration.toString());\n }", "private void loginWithUserId(final TokenHandler tokenHandler) throws JSONException {\n// String url = Router.User.getWIthIdComplete(userId);\n// Logg.m(\"MAIN\", \"Pulling all data with userID : \" + userId);\n// JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.GET, url, new JSONObject(), new Response.Listener<JSONObject>() {\n// @Override\n// public void onResponse(JSONObject response) {\n// try {\n// Logg.m(\"MAIN\", \"Response : Email check = \" + response.toString());\n// if(response.getString(\"status\").equalsIgnoreCase(\"success\")) {\n//\n// //Gets if user has previous registration data\n// MainApplication.getInstance().data.refillCompleteData(response.getJSONObject(\"result\"));\n// tellserviceToReconnectToOpenfire();\n//\n// loginToMainApp();\n// }else{\n// Utils.showDebugToast(getApplicationContext(),\"error in creating user\");\n// }\n// } catch (JSONException e) {\n// e.printStackTrace();\n// }\n// }\n// }, new Response.ErrorListener() {\n// @Override\n// public void onErrorResponse(VolleyError error) {\n// Log.d(\"ERROR\",\"Error in getting all user data\"+error.getLocalizedMessage());\n// }\n// });\n//\n// MainApplication.getInstance().getRequestQueue().add(jsonObjectRequest);\n }", "String createToken(User user);", "@Override\n public void onTokenRefresh(){\n if (FirebaseAuth.getInstance().getCurrentUser() != null) {\n String token = FirebaseInstanceId.getInstance().getToken();\n Log.v(TAG, \"success in getting instance \"+ token);\n onSendRegistrationToServer(token);\n }\n }", "private void checkUserRegister() {\n console.log(\"aschschjcvshj\", mStringCountryCode + mStringMobileNO);\n console.log(\"asxasxasxasx_token\",\"Register here!!!!!\");\n mUtility.hideKeyboard(RegisterActivity.this);\n mUtility.ShowProgress(\"Please Wait..\");\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"mobile_number\", mStringMobileNO);\n Call<VoLoginData> mLogin = mApiService.checkUserAlreadyRegistered(params);\n mLogin.enqueue(new Callback<VoLoginData>() {\n @Override\n public void onResponse(Call<VoLoginData> call, Response<VoLoginData> response) {\n mUtility.HideProgress();\n VoLoginData mLoginData = response.body();\n // If not register then send detail with otp.\n if (mLoginData != null && mLoginData.getResponse().equalsIgnoreCase(\"false\")) {\n Intent mIntent = new Intent(RegisterActivity.this, VerifyRegisterAccount.class);\n mIntent.putExtra(\"intent_username\", mStringUsername);\n mIntent.putExtra(\"intent_account_name\", mStringAccountName);\n mIntent.putExtra(\"intent_email\", mStringEmail);\n mIntent.putExtra(\"intent_mobileno\", mStringMobileNO);\n mIntent.putExtra(\"intent_password\", mStringPassword);\n mIntent.putExtra(\"intent_fcm_token\", mStringDevicesUIDFCMToken);\n mIntent.putExtra(\"intent_country_code\", mStringCountryCode);\n mIntent.putExtra(\"intent_is_from_signup\", true);\n startActivity(mIntent);\n } else if (mLoginData != null && mLoginData.getResponse().equalsIgnoreCase(\"true\")) {\n showMessageRedAlert(mRelativeLayoutMain, getResources().getString(R.string.str_sign_up_already_register, mStringMobileNO), getResources().getString(R.string.str_ok));\n } else {\n if (mLoginData != null && mLoginData.getMessage() != null && !mLoginData.getMessage().equalsIgnoreCase(\"\"))\n showMessageRedAlert(mRelativeLayoutMain, mLoginData.getMessage(), getResources().getString(R.string.str_ok));\n }\n }\n\n @Override\n public void onFailure(Call<VoLoginData> call, Throwable t) {\n mUtility.HideProgress();\n console.log(\"asxasxasx\",new Gson().toJson(call.request().body()));\n t.printStackTrace();\n showMessageRedAlert(mRelativeLayoutMain, getResources().getString(R.string.str_server_error_try_again), getResources().getString(R.string.str_ok));\n }\n });\n }", "private void doRegister(){\n Map<String, String> mParams = new HashMap<>();\n mParams.put(\"account\", etPhone.getText().toString());\n mParams.put(\"password\", etPwd.getText().toString());\n mParams.put(\"code\", etValid.getText().toString());\n\n x.http().post(HttpUtils.getRequestParams(\"/teacher/v1/register\", mParams),\n\n new Callback.CommonCallback<String>() {\n @Override\n public void onSuccess(String result) {\n\n CustomProgress.hideDialog();\n LogUtil.d(\"\"+result);\n Response response = CommonUtil.checkResponse(result);\n if (response.isStatus()) {\n SharedPreferences shareAutoLogin = MyApplication.getInstance().getShareAutoLogin();\n SharedPreferences.Editor editor = shareAutoLogin.edit();\n editor.putBoolean(MyApplication.getInstance().AUTOLOGIN, true);\n editor.commit();\n MyApplication.getInstance().setShareApp(etPhone.getText().toString(), etPwd.getText().toString());\n User user = User.getUserFromJsonObj(response.getData().optJSONObject(\"data\"));\n User.setCurrentUser(user);\n MobclickAgent.onProfileSignIn(user.getNickName());\n\n // 登录环信\n if (!StringUtils.isEmpty(user.hxId) && !StringUtils.isEmpty(user.hxPwd))\n AppUtils.loginEmmobAndSaveInfo(user);\n\n // 极光推送设置别名\n JPushInterface.setAlias(RegisterActivity.this, user.getId() + \"\", new TagAliasCallback() {\n @Override\n public void gotResult(int i, String s, Set<String> set) {\n if (i == 0) {\n LogUtil.i(\"极光推送别名设置成功,别名:\" + s);\n }\n }\n });\n\n socketLogin(user.getToken());\n\n Intent intent = new Intent(RegisterActivity.this, CodeActivity.class);\n startActivity(intent);\n finish();\n } else {\n Toast.makeText(x.app(), response.getData().optString(\"message\"), Toast.LENGTH_SHORT).show();\n\n }\n }\n\n @Override\n public void onError(Throwable ex, boolean isOnCallback) {\n\n CustomProgress.hideDialog();\n\n if (ex instanceof HttpException) { // 网络错误\n HttpException httpEx = (HttpException) ex;\n int responseCode = httpEx.getCode();\n String responseMsg = httpEx.getMessage();\n String errorResult = httpEx.getResult();\n LogUtil.d(responseCode + \":\" + responseMsg);\n Toast.makeText(x.app(), x.app().getResources().getString(R.string.net_error), Toast.LENGTH_SHORT).show();\n } else { // 其他错误\n // ...\n }\n //Toast.makeText(x.app(), ex.getMessage(), Toast.LENGTH_LONG).show();\n }\n\n @Override\n public void onCancelled(CancelledException cex) {\n Toast.makeText(x.app(), \"cancelled\", Toast.LENGTH_LONG).show();\n }\n\n @Override\n public void onFinished() {\n\n }\n });\n\n }", "private void sentRequestGG(FirebaseAuth firebaseAuth) {\n if (firebaseAuth.getCurrentUser() != null) {\n SharedPref.instance.putName(firebaseAuth.getCurrentUser().getDisplayName());\n SharedPref.instance.putPassword(firebaseAuth.getCurrentUser().getUid());\n SharedPref.instance.putUrlAvatar(String.valueOf(firebaseAuth.getCurrentUser().getPhotoUrl()));\n SharedPref.instance.putUser(firebaseAuth.getCurrentUser().getDisplayName());\n SharedPref.instance.putEmail(firebaseAuth.getCurrentUser().getEmail());\n username = firebaseAuth.getCurrentUser().getEmail();\n password = firebaseAuth.getCurrentUser().getUid();\n\n UserService userService = NetContext.instance.create(UserService.class);\n MediaType jsonType = MediaType.parse(\"application/json\");\n String loginJson = (new Gson().toJson(new UserRegisterResponseJson(username, password)));\n final RequestBody loginBody = RequestBody.create(jsonType, loginJson);\n // create call\n Call<Token> loginCall = userService.postNewAccount(loginBody);\n loginCall.enqueue(new Callback<Token>() {\n @Override\n public void onResponse(Call<Token> call, Response<Token> response) {\n DBContext.instance.cleanCart();\n SharedPref.instance.putCount(0);\n //EventBus.getDefault().postSticky(new SentUserIdEvent(u.getId().get$oid()));\n //Dang nhap 1 tai khoan moi hay tai khoan cu deu tra ve 307\n if (response.code() == 307){\n login(username, password);\n } else {\n Toast.makeText(LoginActivity.this, \"Could not parse body\", Toast.LENGTH_SHORT).show();\n }\n }\n\n @Override\n public void onFailure(Call<Token> call, Throwable t) {\n Toast.makeText(LoginActivity.this, \"Lỗi xác minh tài khoản google!\", Toast.LENGTH_SHORT).show();\n progressDialog.dismiss();\n }\n });\n }\n }", "@Override\n protected Boolean doInBackground(Void... params) {\n\n try {\n String userToken = fetchUserToken(mEmail, mPassword);\n mTanker.open(mEmail, userToken).then((openFuture) -> {\n if (openFuture.getError() != null) {\n return null;\n }\n\n if (mSignUp) {\n mTanker.generateAndRegisterUnlockKey().then((unlockKeyFuture) -> {\n if (unlockKeyFuture.getError() != null) {\n mError = 1;\n return null;\n }\n runOnUiThread(() -> {\n Intent intent = new Intent(LoginActivity.this, SaveUnlockKeyActivity.class);\n intent.putExtra(\"EXTRA_UNLOCK_KEY\", unlockKeyFuture.get());\n intent.putExtra(\"EXTRA_USERID\", mEmail);\n intent.putExtra(\"EXTRA_PASSWORD\", mPassword);\n startActivity(intent);\n showProgress(false);\n });\n return null;\n });\n }\n else {\n runOnUiThread(() -> {\n // Redirect to the MainActivity\n Intent intent = new Intent(LoginActivity.this, MainActivity.class);\n intent.putExtra(\"EXTRA_USERID\", mEmail);\n intent.putExtra(\"EXTRA_PASSWORD\", mPassword);\n startActivity(intent);\n showProgress(false);\n });\n }\n return null;\n });\n } catch (ConnectException e) {\n Log.i(\"TheTankerShow\", \"Server Connection error\", e);\n mError = 503;\n } catch (IOException e) {\n Log.i(\"TheTankerShow\", \"Login error\", e);\n return false;\n } catch (Throwable e) {\n Log.e(\"TheTankerShow\", \"Other error\", e);\n return false;\n }\n\n return true;\n }", "public void onSendRegistrationToServer(final String token){\n DatabaseReference databaseReference = FirebaseDatabase.getInstance().getReference();\n databaseReference.child(Constants.ARG_USERS)\n .child(FirebaseAuth.getInstance().getCurrentUser().getUid())\n .child(Constants.ARG_FIREBASE_TOKEN)\n .setValue(token);\n }", "@Override\n public void onSuccess(AuthResult authResult) {\n userWAPFirebase.create(newUser, firebaseAuth.getCurrentUser().getUid()).addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Log.d(TAG, \"User \" + newUser.getUsername() + \" has been successfully created\");\n Toast.makeText(SignUpActivity.this, \"Sign up successful!\", Toast.LENGTH_SHORT).show();\n\n //Go back to Login Activity\n Intent loginIntent = new Intent(SignUpActivity.this, LoginActivity.class);\n loginIntent.putExtra(PASSWORD_KEY, etPasswordSignup.getText().toString());\n loginIntent.putExtra(EMAIL_KEY, newUser.getEmail());\n startActivity(loginIntent);\n }\n });\n }", "private void handleFacebookAccessToken(AccessToken token) {\n //Log.d(TAG, \"handleFacebookAccessToken:\" + token);\n\n AuthCredential credential = FacebookAuthProvider.getCredential(token.getToken());\n mAuth.signInWithCredential(credential)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n // Sign in success, update UI with the signed-in user's information\n //Log.d(TAG, \"signInWithCredential:success\");\n FirebaseUser user = mAuth.getCurrentUser();\n updateUI(user);\n\n //Aqui envia os dados para o banco ou pega os dados de lá\n DadosUsuario dados = new DadosUsuario();\n dados.setTipoConexao(1);\n\n for (UserInfo profile : user.getProviderData()) {\n // Id of the provider (ex: google.com)\n\n dados.setUid(profile.getUid());\n\n // Name, email address, and profile photo Url\n dados.setNome(profile.getDisplayName());\n dados.setEmail(profile.getEmail());\n dados.setUrlFoto(profile.getPhotoUrl().toString());\n\n }\n\n //Verifica se já ah conta\n dados.verificarExistencia();\n if(dados.getConta()==false){\n\n criarNickName = new Intent(InicialLoginActivity.this, CriarNomeUsuario.class);\n startActivity(criarNickName);\n finish();\n\n } else {\n\n //Aqui importa e inicial a tela inicial do jogo logo após o usuario estar conectado\n telaInicial = new Intent(InicialLoginActivity.this, TelaInicial.class);\n startActivity(telaInicial);\n finish();\n }\n\n } else {\n // If sign in fails, display a message to the user.\n //Log.w(TAG, \"signInWithCredential:failure\", task.getException());\n Toast.makeText(InicialLoginActivity.this, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n updateUI(null);\n }\n\n // ...\n }\n });\n }", "@Override\r\n public void onClick(View v) {\n String email = editTextEmail.getText().toString().trim();\r\n String password = editTextPassword.getText().toString().trim();\r\n //predefined users\r\n User admin = new User(\"admin2\",\"admin2\",\"admin2\");\r\n User testuser1 = new User(\"testuser1\",\"testuser1\",\"testuser1\");\r\n db.insert(admin);\r\n db.insert(testuser1);\r\n //getting user from login\r\n User user = db.getUser(email, password);\r\n\r\n //checking if there is a user\r\n if (user != null) {\r\n Intent i = new Intent(MainActivity.this, HomeActivity.class);\r\n i.putExtra(ACTIVE_USER_KEY, user);\r\n startActivity(i);\r\n //finish();\r\n }else{\r\n Toast.makeText(MainActivity.this, \"Unregistered user, or incorrect password\", Toast.LENGTH_SHORT).show();\r\n }\r\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();\n //delete user just created\n user.delete();\n //prompt user to create account\n Toast.makeText(MainActivity.this, \"No Email Exist \", Toast.LENGTH_SHORT).show();\n Toast.makeText(MainActivity.this, \"Create New Account \", Toast.LENGTH_SHORT).show();\n } else {\n // if failed, email already exist and move on to verify passoword\n //Toast.makeText(MainActivity.this, \"Loggin In\", Toast.LENGTH_SHORT).show();\n signUserIn(emailX);\n }\n\n }", "@Override\n public void performRegister(final String name, final String email, final String gender, final String password){\n\n mAuth.createUserWithEmailAndPassword(email.toLowerCase(),password)\n .addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n User user = new User();\n user.setName(name);\n user.setEmail(email.toLowerCase());\n user.setGender(gender);\n user.setPassword(password);\n FirebaseDatabase.getInstance().getReference(\"Users\")\n .child(FirebaseAuth.getInstance().getCurrentUser().getUid())\n .setValue(user).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) {\n Toast.makeText(context, \"Authentication Success.\",\n Toast.LENGTH_LONG).show();\n view.redirectToLogin();\n } else {\n Toast.makeText(context, \"Authentication Failed.\",\n Toast.LENGTH_LONG).show();\n }\n }\n });\n } else {\n Log.w(TAG, \"createUserWithEmail:failure\", task.getException());\n Toast.makeText(context, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n }\n }\n });\n\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n\n\n saveUser save = new saveUser(registerEmailString, registerPassword);\n FirebaseDatabase.getInstance().getReference(\"Register\").child(FirebaseAuth.\n getInstance().getCurrentUser().getUid()).setValue(save).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n\n if (task.isSuccessful()) {\n progressDialog.dismiss();\n Toast.makeText(Sign_Up.this, \"Sign up successful\", Toast.LENGTH_SHORT).show();\n\n pleaseWait.setVisibility(View.GONE);//\n Intent bac = new Intent(Sign_Up.this, Sign_In.class);\n startActivity(bac);\n\n } else {\n progressDialog.dismiss();\n Toast.makeText(Sign_Up.this, \"Email already exist error\", Toast.LENGTH_SHORT).show();\n pleaseWait.setVisibility(View.GONE);\n\n }\n }\n });\n } else {\n progressDialog.dismiss();\n Toast.makeText(Sign_Up.this, \"Error try again\", Toast.LENGTH_SHORT).show();\n pleaseWait.setVisibility(View.GONE);\n }\n }", "@OnClick(R.id.register_button)\n public void register () {\n InputMethodManager imm = (InputMethodManager) context\n .getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromInputMethod(usernameField.getWindowToken(), 0);\n imm.hideSoftInputFromInputMethod(passwordField.getWindowToken(), 0);\n imm.hideSoftInputFromInputMethod(confirmField.getWindowToken(), 0);\n imm.hideSoftInputFromInputMethod(emailField.getWindowToken(), 0);\n\n\n\n\n String username = usernameField.getText().toString();\n String password = passwordField.getText().toString();\n String confirm = confirmField.getText().toString();\n String email = emailField.getText().toString();\n String avatarBase64 = \"string\";\n\n if (username.isEmpty() || password.isEmpty() || confirm.isEmpty() || email.isEmpty()) {\n\n Toast.makeText(context, R.string.field_empty, Toast.LENGTH_LONG).show();\n } else if(!Patterns.EMAIL_ADDRESS.matcher(email).matches()) {\n\n Toast.makeText(context, R.string.provide_vaild_email, Toast.LENGTH_SHORT).show();\n\n } else if (!password.equals(confirm)) {\n\n Toast.makeText(context, R.string.passwords_dont_match, Toast.LENGTH_SHORT).show();\n } else {\n\n registerButton.setEnabled(false);\n spinner.setVisibility(VISIBLE);\n }\n Account account = new Account(email, username, avatarBase64, password);\n RestClient restClient = new RestClient();\n restClient.getApiService().register(account).enqueue(new Callback<Void>() {\n @Override\n public void onResponse(Call<Void> call, Response<Void> response) {\n\n if (response.isSuccessful()) {\n Toast.makeText(context, R.string.registration_successful, Toast.LENGTH_LONG).show();\n //This will run if everything comes back good and sets the users token and expiration\n// User regUser = response.body();\n// UserStore.getInstance().setToken(regUser.getToken());\n// UserStore.getInstance().setTokenExpiration(regUser.getExpiration());\n\n //This will set up the flow of the application to show the next view upon successful registration\n Flow flow = PeoplemonApplication.getMainFlow();\n flow.goBack();\n } else {\n\n //This will return if the user has entered info but they have registered before\n resetView();\n Toast.makeText(context, R.string.registration_failed + \": \" + response.code(), Toast.LENGTH_LONG).show();\n }\n }\n @Override\n public void onFailure(Call<Void> call, Throwable t) {\n\n //This will show up if the data didn't come back from the server correctly or there is a timeout.\n resetView();\n Toast.makeText(context, R.string.registration_failed, Toast.LENGTH_LONG).show();\n }\n });\n }", "@Override\n /**\n * Handles a HTTP GET request. This implements obtaining an authentication token from the server.\n */\n protected void handleGet(Request request, Response response) throws IllegalStateException {\n String username = String.valueOf(request.getAttributes().get(\"username\"));\n String password = String.valueOf(request.getAttributes().get(\"password\"));\n /* Construct MySQL Query. */\n String query = \"SELECT COUNT(id) AS `CNT`, `authToken` FROM accounts WHERE `username` = '\" + username + \"' AND \" +\n \"`password` = '\" + password + \"' LIMIT 0,1;\";\n /* Obtain the account count and existing token pair, as object array. */\n Object[] authenticationArray = dataHandler.handleAuthentication(database.ExecuteQuery(query,\n new ArrayList<String>()));\n int cnt = (int) authenticationArray[0];\n String existingToken = (String) authenticationArray[1];\n String authenticationToken = null;\n if (cnt == 1) { // There is exactly one account matching the parameterised username and password.\n if (existingToken == null) { // No token yet existed, generate one.\n authenticationToken = TokenGenerator.getInstance().generateAuthenticationToken(TOKEN_LENGTH);\n } else {\n authenticationToken = existingToken;\n }\n } else {\n this.returnStatus(response, new IllegalArgumentStatus(null));\n }\n if (!(authenticationToken == null || authenticationToken == \"\")) { // Update the database with the new token.\n Database.getInstance().ExecuteUpdate(\"UPDATE `accounts` SET `authToken` = '\" + authenticationToken +\n \"', `authTokenCreated` = CURRENT_TIMESTAMP WHERE `username` = '\" + username + \"';\",\n new ArrayList<String>());\n this.returnResponse(response, authenticationToken, new TokenSerializer());\n } else {\n this.returnStatus(response, new IllegalArgumentStatus(null));\n }\n }", "UserWithPersistedAuth getUserWithToken();", "@Override\n public void injectToken(User user, HttpServletResponse res) {\n refreshTokenRepository.findByUserUsername(user.getUsername()).ifPresentOrElse(token -> {\n res.addCookie(createCookie(token.getId()));\n }, () -> {\n final Refresh entityToSave = Refresh.builder()\n .user(user)\n .id(UUID.randomUUID()).build();\n final Refresh savedEntity = refreshTokenRepository.save(entityToSave);\n res.addCookie(createCookie(savedEntity.getId()));\n });\n }", "private void onSignInBtnClicked() {\n\n if (checkIfAllFieldsAreFilled(new EditText[]{mEmailOrPhoneET, mPasswordET})) {\n\n mProgressBar.setVisibility(View.VISIBLE);\n\n final RequestLogIn requestLogIn = new RequestLogIn();\n\n if (isEmailValid(mEmailOrPhoneET.getText().toString())) {\n requestLogIn.setEmail(mEmailOrPhoneET.getText().toString());\n } else {\n requestLogIn.setPhone(mEmailOrPhoneET.getText().toString());\n }\n\n requestLogIn.setDeviceType(ANDROID);\n requestLogIn.setPassword(mPasswordET.getText().toString());\n\n\n FirebaseInstanceId.getInstance().getInstanceId().addOnSuccessListener(new OnSuccessListener<InstanceIdResult>() {\n\n @Override\n public void onSuccess(InstanceIdResult instanceIdResult) {\n String token = instanceIdResult.getToken();\n requestLogIn.setFcmToken(token);\n\n saveFcmToken(token);\n RequestManager.login(requestLogIn).subscribe(new Observer<Result<User>>() {\n @Override\n public void onSubscribe(Disposable d) {\n\n }\n\n @Override\n public void onNext(Result<User> userResult) {\n\n saveToken(userResult.getData().getToken());\n Log.d(TAG, \"Token: \" + userResult.getData().getToken());\n saveUser(userResult.getData());\n\n if (mMasechtotList != null) {\n\n getGemaraDafYomiDetailes();\n }\n\n getDonationData();\n\n\n }\n\n @Override\n public void onError(Throwable e) {\n\n mProgressBar.setVisibility(View.GONE);\n\n if (!isNetworkAvailable()) {\n\n Toast.makeText(SignInActivity.this, getResources().getString(R.string.no_internet) , Toast.LENGTH_LONG).show();\n\n } else {\n\n if (e instanceof HttpException) {\n HttpException exception = (HttpException) e;\n ErrorResponse response = null;\n try {\n response = new Gson().fromJson(Objects.requireNonNull(exception.response().errorBody()).string(), ErrorResponse.class);\n Toast.makeText(SignInActivity.this, Objects.requireNonNull(response).getErrors().get(0).getMessage(), Toast.LENGTH_LONG).show();\n } catch (Exception e1) {\n e1.printStackTrace();\n }\n\n }\n }\n }\n\n @Override\n public void onComplete() {\n\n }\n });\n }\n });\n\n\n\n }\n }", "@Override\n public void onClick(View view) {\n registerUser();\n\n\n }", "protected void checkToken(){\n DBManager dao = new DBManager(appContext);\n dao= dao.open();\n Cursor c = dao.selectionner();\n if (c.getCount()>0) {\n System.out.println(\"Base activity token:\"+c.getCount());\n System.out.println(\"Base activity token:\"+c.getString(0));\n Intent main =new Intent(this, SplashScreenActivity.class).setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(main);\n } else {\n System.out.println(\"No token Found\");\n Intent main = new Intent(this, LoginActivity.class).setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(main);\n }\n }", "private void registerForEmail(final String email, final String name, final String facebookId, final String token, final String imageUrl, final boolean isFb){\n// String url = Router.User.getWIthEmailComplete(email);\n// JSONObject params = new JSONObject();\n// try {\n// params.put(\"name\",name);\n// params.put(\"isFb\",isFb);\n// params.put(\"token\",token);\n// params.put(\"email\",email);\n// params.put(\"profilepic\",imageUrl);\n// params.put(\"facebookId\",facebookId);\n// } catch (JSONException e) {e.printStackTrace();}\n// JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.POST, url, params, new Response.Listener<JSONObject>() {\n//\n// @Override\n// public void onResponse(JSONObject jsonObject) {\n// try {\n// JSONObject result = jsonObject.getJSONObject(\"result\");\n// String userId = result.getString(\"userId\");\n// userMain.userId = userId;\n// userMain.token = token;\n// userMain.email = email;\n// userMain.authProvider = (isFb)?\"facebook\":\"google\";\n// updateLoginTokens();\n// userMain.saveUserDataLocally();\n//\n// loginWithUserId(userId);\n// } catch (JSONException e) {\n// e.printStackTrace();\n// }\n// }\n// }, new Response.ErrorListener() {\n// @Override\n// public void onErrorResponse(VolleyError volleyError) {\n// Log.e(\"ERROR\",\"error in registerForEmail\");\n// }\n// });\n// MainApplication.getInstance().getRequestQueue().add(jsonObjectRequest);\n }", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n\n switch (requestCode) {\n case RC_SIGN_IN:\n\n if (requestCode == RC_SIGN_IN) {\n IdpResponse response = IdpResponse.fromResultIntent(data);\n if (resultCode == RESULT_OK) {\n FirebaseUser user = firebaseAuth.getCurrentUser();\n user.getIdToken(false);\n if (response.isNewUser()) {\n authViewModel.createUser(user);\n authViewModel.userLiveData.observe(this, dataOrException -> {\n if (dataOrException.data != null) {\n NavHostFragment.findNavController(this).navigate(R.id.action_nav_register_fragment_to_nav_join_group_fragment);\n }\n\n if (dataOrException.exception != null) {\n Log.w(this.getClass().getName(), dataOrException.exception.getMessage());\n Toast.makeText(getActivity(), \"Could not create new user!\", Toast.LENGTH_SHORT).show();\n }\n });\n }\n // ...\n } else {\n Toast.makeText(getActivity(), \"Sign in cancelled by user\", Toast.LENGTH_SHORT).show();\n }\n }\n break;\n }\n }", "private String newToken(String token) {\n UserDetails userDetails = new UserDetails();\r\n userDetails.setEmail(jwtUtils.extractEmail(token));\r\n userDetails.setUserType((String) jwtUtils.extractAllClaims(token).get(\"userType\"));\r\n return jwtUtils.generateToken(userDetails);\r\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(getApplicationContext(), SignupActivity.class);\n intent.putExtra(SignupActivity.EXTRA_TYPEUSER, Constants.flowSignupUser);\n User u = new User(); u.setEmail(text_email.getText().toString()); u.setPassword(text_password.getText().toString());\n intent.putExtra(SignupActivity.LOGIN_PARAMS,u );\n startActivityForResult(intent, Constants.REQUEST_SIGNUP);\n }", "public void goClicked(View view){\n final String email=emailEditText.getText().toString();\n final String password=passwordEditText.getText().toString();\n\n\n mAuth.signInWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n //Sign in the user\n Log.i(\"Infograph\", \"Sign in was successful\");\n loginUser();\n Toast.makeText(MainActivity.this, \"Signed in successfully !\", Toast.LENGTH_SHORT).show();\n } else {\n //Sign up the user\n Log.i(\"Infograph\", \"Sign in was not successful, Attempting SignUp\");\n mAuth.createUserWithEmailAndPassword(email,password).addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if(task.isSuccessful()){\n //Add to database\n DatabaseReference reference=database.getReference().child(\"users\").child(mAuth.getCurrentUser().getUid()).child(\"email\");\n\n reference.setValue(email);\n\n Log.i(\"Infograph\",\"Sign up was successful\");\n loginUser();\n Toast.makeText(MainActivity.this, \"Signed up successfully !\", Toast.LENGTH_SHORT).show();\n\n\n }else{\n Log.i(\"Infograph\",\"Sign up was not successful\");\n Toast.makeText(MainActivity.this, task.getException().getMessage(), Toast.LENGTH_SHORT).show();\n\n }\n }\n });\n }\n\n\n }\n });\n }", "@PostMapping(\"/process_register\")\n public String processRegistration(User user,Model model)\n throws SignatureException, NoSuchAlgorithmException, InvalidKeyException{\n\n //checking if user exists\n if(userService.existByLogin(user.getLogin())) {\n model.addAttribute(\"error\", true);\n return \"registerForm\";\n }\n\n model.addAttribute(\"user\", user);\n //saving user\n /* userRepository.save(user);*/\n userService.saveUser(user, Sha512.generateSalt().toString());\n return \"registerSuccessful\";\n }", "public void registerUser(View view) {\n TextView emailAddressField = (TextView) findViewById(R.id.registerEmailAddress);\n final String emailAddress = emailAddressField.getText().toString();\n\n TextView passwordField = (TextView) findViewById(R.id.registerPassword);\n final String password = passwordField.getText().toString();\n\n TextView nameField = (TextView) findViewById(R.id.registerName);\n final String name = nameField.getText().toString();\n\n final String company = \"Purple Store\";\n\n if(emailAddress.isEmpty() || password.isEmpty() || name.isEmpty()) {\n Toast.makeText(this, \"Email Address, password or name cannot be blank\",Toast.LENGTH_SHORT).show();\n return;\n }\n\n mAuth.createUserWithEmailAndPassword(emailAddress, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n // Sign in success, update UI with the signed-in user's information\n Log.d(TAG, \"createUserWithEmail:success\");\n FirebaseUser currentUser = mAuth.getCurrentUser();\n String uid = currentUser.getUid();\n\n // Write credentials in Fire Store\n User newUser = new User();\n newUser.createUser(uid, emailAddress, name, company);\n newUser.writeData();\n\n // Save the details on shared preferences for future calls\n SharedPreferences sharedPreferences = getSharedPreferences(\"USER_DETAILS\", Context.MODE_PRIVATE);\n\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(\"userId\", uid);\n editor.putString(\"emailAddress\", emailAddress);\n editor.putString(\"name\", name);\n editor.putString(\"companyId\", company);\n editor.apply();\n\n // Redirect to Dashboard\n Intent intent = new Intent(RegisterActivity.this, MainActivity.class);\n startActivity(intent);\n } else {\n // If sign in fails, display a message to the user.\n Log.w(TAG, \"createUserWithEmail:failure\", task.getException());\n Toast.makeText(RegisterActivity.this, task.getException().getMessage(),Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "private void registerUser(String number) {\n HashMap<String, String> parameters = new HashMap<>(); // for our app, we are using the verified phone number as parameters\n parameters.put(\"phone\", number);\n\n String apiKey = \"https://crtsapp.herokuapp.com/api/crts/auth/register/\"; // change this whenever you upload the project to some other backend service.\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(\n Request.Method.POST,\n apiKey,\n new JSONObject(parameters),\n response -> {\n try {\n if(response.getBoolean(\"success\")){\n // On successful registration, we will login the user subsequently.\n // Logging in the user will also help to get the information of the user\n // that can be stored in the local storage(Using SharedPreference) to fasten the App.\n loginUser(number);\n }else{\n Toast.makeText(MainActivity.this, \"Please click on Verify again\", Toast.LENGTH_SHORT).show();\n }\n } catch (JSONException jsonException) {\n jsonException.printStackTrace();\n }\n },\n error -> {\n\n NetworkResponse response = error.networkResponse;\n if(error instanceof ServerError && response!=null){\n try {\n String res = new String(response.data, HttpHeaderParser.parseCharset(response.headers, \"utf-8\"));\n JSONObject obj = new JSONObject(res);\n Toast.makeText(MainActivity.this, obj.getString(\"msg\"), Toast.LENGTH_SHORT).show();\n\n }catch (JSONException | UnsupportedEncodingException jsonException){\n jsonException.printStackTrace();\n }\n }\n }\n ){\n @Override\n public Map<String, String> getHeaders() {\n HashMap<String, String> headers = new HashMap<>();\n headers.put(\"Content-Type\", \"application/json\");\n return headers;\n }\n };\n\n // Adding a retry policy to ensure user can try again to login in case there is an issue with the backend.\n int socketTime = 5000; // 5sec time is given to register\n RetryPolicy retryPolicy = new DefaultRetryPolicy(socketTime,\n DefaultRetryPolicy.DEFAULT_MAX_RETRIES, DefaultRetryPolicy.DEFAULT_BACKOFF_MULT);\n jsonObjectRequest.setRetryPolicy(retryPolicy);\n\n RequestQueue requestQueue = Volley.newRequestQueue(this);\n requestQueue.add(jsonObjectRequest);\n\n }", "public UserAuthToken createUser(CreateUserRequest request);", "@Override\n public void onClick(View view) {\n regUser();\n }", "private void signUpEvt() {\n String emailRegex = \"(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\\\"(?:[\\\\x01-\\\\x08\\\\x0b\\\\x0c\\\\x0e-\\\\x1f\\\\x21\\\\x23-\\\\x5b\\\\x5d-\\\\x7f]|\\\\\\\\[\\\\x01-\\\\x09\\\\x0b\\\\x0c\\\\x0e-\\\\x7f])*\\\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\\\x01-\\\\x08\\\\x0b\\\\x0c\\\\x0e-\\\\x1f\\\\x21-\\\\x5a\\\\x53-\\\\x7f]|\\\\\\\\[\\\\x01-\\\\x09\\\\x0b\\\\x0c\\\\x0e-\\\\x7f])+)\\\\])\";\n // Get User Details\n String fullname = this.view.getWelcomePanel().getSignUpPanel().getFullnameText().getText().trim();\n String email = this.view.getWelcomePanel().getSignUpPanel().getEmailText().getText().trim();\n String password = new String(this.view.getWelcomePanel().getSignUpPanel().getPasswordText().getPassword()).trim();\n\n if (!fullname.equals(\"\") && !email.equals(\"\") && !password.equals(\"\")) {\n if (email.matches(emailRegex)) {\n if (model.getSudokuDB().registerUser(fullname, email, password)) {\n view.getWelcomePanel().getCardLayoutManager().next(view.getWelcomePanel().getSlider());\n // Clear Fields\n view.getWelcomePanel().getSignUpPanel().clear();\n Object[] options = {\"OK\"};\n JOptionPane.showOptionDialog(this, \"Your registration was successful!\\n You can now sign in to your account.\", \"Successful Registration\", JOptionPane.OK_OPTION, JOptionPane.INFORMATION_MESSAGE, null, options, null);\n } else {\n Object[] options = {\"Let me try again\"};\n JOptionPane.showOptionDialog(this, \"Your registration was unsuccessful!\\nBe sure not to create a duplicate account.\", \"Unsuccessful Registration\", JOptionPane.OK_OPTION, JOptionPane.ERROR_MESSAGE, null, options, null);\n }\n } else {\n // Email doesn't meet requirement\n Object[] options = {\"I will correct that\"};\n JOptionPane.showOptionDialog(this, \"You must provide a valid email address.\", \"Invalid Email Address\", JOptionPane.OK_OPTION, JOptionPane.INFORMATION_MESSAGE, null, options, null);\n }\n } else {\n // Empty Fields\n Object[] options = {\"Alright\"};\n JOptionPane.showOptionDialog(this, \"In order to register, all fields must be filled out.\", \"Empty Fields\", JOptionPane.OK_OPTION, JOptionPane.INFORMATION_MESSAGE, null, options, null);\n }\n }", "private void sendRegistrationToServer(String token) {\n }", "private void sendRegistrationToServer(String token) {\n }", "private void sendRegistrationToServer(String token) {\n }", "private void sendRegistrationToServer(String token) {\n }", "String registerUserWithGetCurrentSession(User user);", "private void userRegister(String email, String password)\n {\n mAuth.createUserWithEmailAndPassword(email, password)\n .addOnCompleteListener(getActivity(), new OnCompleteListener<AuthResult>()\n {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task)\n {\n // if successful, send email verification\n String TAG = \"LoginActivity.userRegister\";\n if (task.isSuccessful())\n {\n Log.d(TAG, \"createUserWithEmailAndPassword:success\");\n FirebaseUser user = mAuth.getCurrentUser();\n\n user.sendEmailVerification()\n .addOnCompleteListener(new OnCompleteListener<Void>()\n {\n @Override\n public void onComplete(@NonNull Task<Void> task)\n {\n String TAG = \"LoginActivity.userRegister.EmailVerify\";\n if (task.isSuccessful())\n {\n Log.d(TAG, \"sendEmailVerification:success\");\n Toast.makeText(getActivity(),\n \"Please check Email for Verification\",Toast.LENGTH_SHORT).show();\n }\n else\n {\n Log.w(TAG, \"sendEmailVerification:failure\", task.getException());\n Toast.makeText(getActivity(),\"Unable to Verify: \"\n + task.getException().getMessage(),Toast.LENGTH_SHORT).show();\n\n }\n }\n });\n }\n else\n {\n Log.w(TAG, \"createUserWithEmailAndPassword:failure\", task.getException());\n Toast.makeText(getActivity(), \"Unable to Register: \"\n + task.getException().getMessage(), Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n progressBar.setVisibility(View.GONE);\n\n if (!task.isSuccessful()) {\n Toast.makeText(RegisterActivity.this, \"Registration failed, Check your Network Connection!\", Toast.LENGTH_SHORT).show();\n } else {\n onAuthSuccess(task.getResult().getUser());\n //Toast.makeText(RegisterActivity.this, \"we will make pass of login here\", Toast.LENGTH_SHORT).show();\n //finish();\n }\n }", "@Override\n public void onClick(View view) {\n registerUser();\n }", "public void authenticateemail(final String email, final String pass){\n\n mAuth2.createUserWithEmailAndPassword(email, pass)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n // Sign in success, update UI with the signed-in user's information\n Log.d(\"MAIN\", \"createUserWithEmail:success\");\n FirebaseUser user = mAuth.getCurrentUser();\n linking(email,pass);\n //Log.d(\"MAIN\", \"yupyup\"+user.getUid());\n\n } else {\n // If sign in fails, display a message to the user.\n Log.w(\"MAIN\", \"createUserWithEmail:failure\", task.getException());\n Toast.makeText(otherinfoActivity.this, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n }\n\n // ...\n }\n });\n\n }", "private void registerUser(String email, String passwd){\n\n mAuth.createUserWithEmailAndPassword(email, passwd)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n String key = \"\";\n //checking if success\n if(task.isSuccessful()){\n key = task.getResult().getUser().getUid();\n toastMessage(\"seccuss here \"+key);\n String name = \"\";\n String phone = \"\";\n String c = String.valueOf(spinner.getSelectedItem());\n Classe classe = new Classe(c);\n name = nom.getText().toString();\n phone = tel.getText().toString();\n UserInformation U = new UserInformation(name,phone,classe);\n // toastMessage(\"hello uid \"+Useruid);\n myRef.child(\"users\").child(key).setValue(U);\n /* sharedPref = getApplicationContext().getSharedPreferences(Name, MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPref.edit();\n editor.putString(Key, key);\n editor.apply();*/\n\n }else{\n toastMessage(\"Failed\"); }\n\n\n }\n });\n /*sharedPref = getApplicationContext().getSharedPreferences(Name, MODE_PRIVATE);\n uid = sharedPref.getString(Key, null);\n // toastMessage(\"hello thoast \"+uid);\n return uid ;*/\n }", "@Test\n public void createNewUserByExternalTokenAndCheckIt() throws Exception {\n UserLogin userLogin = new UserLogin();\n userLogin.setUserToken(UUID.randomUUID().toString());\n boolean isThrow = false;\n try {\n UserResponse userResponse = loginsService.checkLoginSignInSignUp(userLogin, \"SignUp\");\n } catch (ApplicationException e) {\n isThrow = true;\n }\n assertThat(isThrow);\n\n //Add login and expect new user successful registration\n userLogin.setUserLogin(\"val@gmail.com\");\n UserResponse userResponse = loginsService.checkLoginSignInSignUp(userLogin, \"SignUp\");\n assertThat(userResponse.getUserMail().equals(userLogin.getUserLogin()));\n assertThat(userResponse.getUserPoints()).size().isEqualTo(5);\n }", "private void onSucessGoogleLogin(GoogleSignInResult result) {\n\n GoogleSignInAccount account = result.getSignInAccount();\n\n mUser = new UserModel();\n mUser.createUser(Objects.requireNonNull(account).getIdToken(), account.getDisplayName(), account.getEmail(), Objects.requireNonNull(account.getPhotoUrl()).toString(), account.getPhotoUrl());\n// SessionManager.getInstance().createUser(mUser);\n if (mUser.getIdToken() != null) {\n AuthCredential credential = GoogleAuthProvider.getCredential(mUser.getIdToken(), null);\n firebaseAuthWithGoogle(credential);\n }\n\n\n }", "public void registerNewEmail(String email, String password){\n\n showProgressDialog();\n FirebaseAuth.getInstance().createUserWithEmailAndPassword(email, password)\n .addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n Log.d(TAG, \"createUserWithEmail:onComplete:\" + task.isSuccessful());\n\n if (task.isSuccessful()){\n Log.d(TAG, \"onComplete: AuthState: \" + FirebaseAuth.getInstance().getCurrentUser().getUid());\n\n // TODO(\"send verification email\")\n // sendVerificationEmail();\n\n //insert some default user data\n String selectedLanguage = mUserRegBinding.spinnerLanguage.getSelectedItem().toString();\n String selectedCountry = mUserRegBinding.spinnerCountry.getSelectedItem().toString();\n String userId = FirebaseAuth.getInstance().getCurrentUser().getUid();\n PrivateUser user = new PrivateUser();\n user.setFirstName(mUserRegBinding.editTextFirstName.getText().toString());\n user.setLastName(mUserRegBinding.editTextLastName.getText().toString());\n user.setTelephone(mUserRegBinding.editTextPrivTelephone.getText().toString());\n user.setCountry(selectedCountry);\n user.setLanguage(selectedLanguage);\n user.setUser_id(userId);\n\n\n // get the document reference for private users\n FirebaseFirestore db = FirebaseFirestore.getInstance();\n DocumentReference privateUserRef = db\n .collection(getString(R.string.private_user))\n .document(userId);\n\n privateUserRef.set(user).addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n hideProgressDialog();\n Snackbar.make(getCurrentFocus().getRootView(), \"Registration Successful :)\", Snackbar.LENGTH_SHORT).show();\n\n // sign current user out\n FirebaseAuth.getInstance().signOut();\n\n // send user to login screen on successful registration\n Bundle bundle = new Bundle();\n bundle.putString(\"TYPE_OF_USER\", getString(R.string.private_user));\n redirectLoginScreen(bundle);\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n hideProgressDialog();\n Log.e( \"Db Creation Failed\", \"Failed\", e );\n Snackbar.make(getCurrentFocus().getRootView(), e.getMessage(), Snackbar.LENGTH_SHORT).show();\n }\n });\n\n }\n if (!task.isSuccessful()) {\n FirebaseAuthException e = (FirebaseAuthException) task.getException();\n Snackbar.make(getCurrentFocus().getRootView(), e.getMessage(), Snackbar.LENGTH_LONG).show();\n Log.e( \"User Registration: \" , \"Failed\", e );\n }\n hideProgressDialog();\n }\n });\n }", "public void register(View view) {\n if(radioGroup.getCheckedRadioButtonId() == -1){\n Snackbar.make(getCurrentFocus(),\"Please select one of the Options: Student or Professor\",Snackbar.LENGTH_LONG).show();\n return;\n }\n if (usn.getText().toString().trim().equals(\"\")){\n usn.setError(\"This field cannot be empty\");\n return;\n } else if (password.getText().toString().trim().equals(\"\")){\n password.setError(\"This field cannot be empty\");\n return;\n } else if(password.getText().toString().trim().length() < 8){\n password.setError(\"Password too short.\");\n return;\n } else if(confirmPassword.getText().toString().trim().equals(\"\")){\n confirmPassword.setError(\"This field cannot be empty\");\n return;\n } else if(!(password.getText().toString().trim()\n .equals(confirmPassword.getText().toString().trim()))){\n password.setError(\"Passwords do not match\");\n confirmPassword.setError(\"Passwords do not match\");\n return;\n }\n progressBar.setVisibility(View.VISIBLE);\n mAuth.signInAnonymously().addOnSuccessListener(authResult -> myRef.child(usn.getText().toString().trim()).addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n try {\n String username = dataSnapshot.child(\"emailId\").getValue().toString();\n String password = confirmPassword.getText().toString().trim();\n System.out.println(username);\n mAuth.createUserWithEmailAndPassword(username,password)\n .addOnCompleteListener(RegisterActivity.this,task -> {\n Log.d(\"TAG\",\"Created User:\"+task.isSuccessful());\n if(!task.isSuccessful()){\n Toast.makeText(RegisterActivity.this, \"Error occurred.\" +\n \" Could not create user. Please \" +\n \"check your internet connection\", Toast.LENGTH_LONG).show();\n return;\n }\n else {\n startActivity(new Intent(RegisterActivity.this,LoginActivity.class));\n finish();\n }\n });\n\n }catch (NullPointerException e){\n usn.setError(\"Invalid USN. Please check your input or contact\" +\n \" your department for help\");\n progressBar.setVisibility(View.INVISIBLE);\n }\n }\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n }))\n .addOnFailureListener(e -> {\n progressBar.setVisibility(View.INVISIBLE);\n Snackbar.make(view,\"Something went wrong.Please check if you have an internet connection or that the details\" +\n \"entered are valid\",Snackbar.LENGTH_LONG).show();\n });\n }", "public void Register() {\n Url url = new Url();\n User user = new User(fname.getText().toString(), lname.getText().toString(), username.getText().toString(), password.getText().toString());\n Call<Void> registerUser = url.createInstanceofRetrofit().addNewUser(user);\n registerUser.enqueue(new Callback<Void>() {\n @Override\n public void onResponse(Call<Void> call, Response<Void> response) {\n Toast.makeText(getActivity(), \"User Registered successfully\", Toast.LENGTH_SHORT).show();\n }\n\n @Override\n public void onFailure(Call<Void> call, Throwable t) {\n Toast.makeText(getActivity(), \"Error\" + t, Toast.LENGTH_SHORT).show();\n }\n });\n }", "Boolean registerNewUser(User user);", "boolean signUp(User user);", "public void signup(View view){\r\n if(editText1.getText().toString().isEmpty()||editText2.getText().toString().isEmpty()||editText3.getText().toString().isEmpty()\r\n ||editText4.getText().toString().isEmpty()||editText5.getText().toString().isEmpty()){\r\n Toast.makeText(this, \"Παρακαλώ εισάγετε όλα τα απαραίτητα πεδία προκειμένου να εγγραφείτε.\", Toast.LENGTH_SHORT).show();\r\n }\r\n else{\r\n mAuth.createUserWithEmailAndPassword(editText1.getText().toString(), editText2.getText().toString())\r\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\r\n @Override\r\n public void onComplete(@NonNull Task<AuthResult> task) {\r\n\r\n if (task.isSuccessful()) {\r\n new_user = mAuth.getCurrentUser();\r\n create_users_list(new_user.getUid());\r\n String userid=new_user.getUid();\r\n String firstname=editText3.getText().toString();\r\n String lastname=editText4.getText().toString();\r\n String address=editText5.getText().toString();\r\n SharedPreferences.Editor editor=pref.edit();\r\n editor.putString(userid+\"firstname\",firstname);\r\n editor.putString(userid+\"lastname\",lastname);\r\n editor.putString(userid+\"address\",address);\r\n editor.apply();\r\n Intent intent = new Intent(getApplicationContext(), MainActivity3.class);\r\n intent.putExtra(\"userid\", new_user.getUid());\r\n\r\n startActivity(intent);\r\n\r\n\r\n } else {\r\n Toast.makeText(getApplicationContext(), task.getException().getMessage(),\r\n Toast.LENGTH_SHORT).show();\r\n\r\n }\r\n }\r\n }\r\n );}}", "public void setUserToken(Guid param) {\n localUserTokenTracker = param != null;\n\n this.localUserToken = param;\n }", "public void setUserToken(Guid param) {\n localUserTokenTracker = param != null;\n\n this.localUserToken = param;\n }", "public void setUserToken(Guid param) {\n localUserTokenTracker = param != null;\n\n this.localUserToken = param;\n }", "private void registerCSRFUser() {\n\n RestAssured.given()\n .when()\n .relaxedHTTPSValidation()\n .formParam(\"username\", \"csrf-\" + this.getUser())\n .formParam(\"password\", \"password\")\n .formParam(\"matchingPassword\", \"password\")\n .formParam(\"agree\", \"agree\")\n .post(url(\"register.mvc\"));\n\n }", "public AuthToken loginUser(){\n return null;\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 }", "@Override\n public void onClick(View v) {\n sendUserToRegisterActivity();\n }", "public Token createAuthorizationToken(User user);", "public void onClick(View view) {\n if(validate_info()){\n create_user();\n user = FirebaseAuth.getInstance().getCurrentUser();\n if (user != null) {\n submit_profile(user);\n }\n }\n else{\n return;\n\n\n }\n }", "@Transactional\n public UserToken generateToken() {\n if (!firebaseService.canProceed())\n return null;\n\n try {\n Optional<UserAuth> userOptional = Auditor.getLoggedInUser();\n if (!userOptional.isPresent()) return UNAUTHENTICATED;\n UserAuth user = userOptional.get();\n Map<String, Object> claims = new HashMap<>();\n claims.put(\"type\", user.getType().toString());\n claims.put(\"department\", user.getDepartment().getName());\n claims.put(\"dean_admin\", PermissionManager.hasPermission(user.getAuthorities(), Role.DEAN_ADMIN));\n String token = FirebaseAuth.getInstance().createCustomTokenAsync(user.getUsername(), claims).get();\n return fromUser(user, token);\n } catch (InterruptedException | ExecutionException e) {\n return UNAUTHENTICATED;\n }\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task)\n {\n String TAG = \"LoginActivity.userRegister\";\n if (task.isSuccessful())\n {\n Log.d(TAG, \"createUserWithEmailAndPassword:success\");\n FirebaseUser user = mAuth.getCurrentUser();\n\n user.sendEmailVerification()\n .addOnCompleteListener(new OnCompleteListener<Void>()\n {\n @Override\n public void onComplete(@NonNull Task<Void> task)\n {\n String TAG = \"LoginActivity.userRegister.EmailVerify\";\n if (task.isSuccessful())\n {\n Log.d(TAG, \"sendEmailVerification:success\");\n Toast.makeText(getActivity(),\n \"Please check Email for Verification\",Toast.LENGTH_SHORT).show();\n }\n else\n {\n Log.w(TAG, \"sendEmailVerification:failure\", task.getException());\n Toast.makeText(getActivity(),\"Unable to Verify: \"\n + task.getException().getMessage(),Toast.LENGTH_SHORT).show();\n\n }\n }\n });\n }\n else\n {\n Log.w(TAG, \"createUserWithEmailAndPassword:failure\", task.getException());\n Toast.makeText(getActivity(), \"Unable to Register: \"\n + task.getException().getMessage(), Toast.LENGTH_SHORT).show();\n }\n }", "@PostMapping(\"/registration\")\n\t public String registration(@ModelAttribute(\"userForm\") User userForm, BindingResult bindingResult,Model model) {if (bindingResult.hasErrors()) {\n\t return \"registration\";\n\t }\n\t userService.save(userForm);\n\t localUsername=userForm.getUsername();\n\t boolean flag=userService.autoLogin(userForm.getUsername(), userForm.getPasswordConfirm());\n\t model.addAttribute(\"expense\", expenseService.getMonthAndYearAndAmount());\n\t model.addAttribute(\"username\",userForm.getUsername());\n\t return \"redirect:/dashboard\";\n\t }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\n new Thread(new Runnable() {\n @Override\n public void run() {\n User instance = User.getInstance();\n instance.setName(name.getText().toString());\n instance.setEmail(email.getText().toString());\n Bitmap bitmap = ((BitmapDrawable)imageButton.getDrawable()).getBitmap();\n instance.setAvatar(bitmap);\n String json = buildJsonForSignUp();\n\n String result = \"\";\n result = PostUtil.POST(getString(R.string.signUp),json);\n\n try {\n JSONObject obj = new JSONObject(result).getJSONObject(\"0\");\n JSONObject info = obj.getJSONObject(\"info\");\n\n if(info.getBoolean(\"result\") && info.getString(\"userId\") != null){\n\n instance.setId(info.getString(\"userId\"));\n showToast(\"Your account is created!\");\n Intent intent = new Intent(ProfileActivity.this,MainActivity.class);\n startActivity(intent);\n finish();\n }\n else{\n showToast(\"Failed to create, please try again!\");\n User.clear();\n Intent intent = new Intent(ProfileActivity.this,LoginActivity.class);\n startActivity(intent);\n finish();\n }\n\n\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }).start();\n\n\t\t\t}", "@Override\r\n\t\t\tpublic void onSuccess(Void result) {\n\t\t\t\tsynAlert.clear();\r\n\t\t\t\tauthenticationController.initializeFromExistingAccessTokenCookie(new AsyncCallback<UserProfile>() {\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void onFailure(Throwable caught) {\r\n\t\t\t\t\t\tsynAlert.handleException(caught);\r\n\t\t\t\t\t\tview.showLogin();\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(UserProfile result) {\r\n\t\t\t\t\t\t// Signed ToU. Check for temp username, passing record, and then forward\r\n\t\t\t\t\t\tuserAuthenticated();\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}", "private void signUp() {\n final String email = ((EditText) findViewById(R.id.etSignUpEmail))\n .getText().toString();\n final String password = ((EditText) findViewById(R.id.etSignUpPassword))\n .getText().toString();\n\n mAuth.createUserWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n Log.d(\"SIGN_UP_USER\", \"createUserWithEmail:success\");\n sendVerificationEmail(mAuth.getCurrentUser());\n updateUI();\n } else {\n Log.d(\"SIGN_UP_USER\", \"createUserWithEmail:failure\");\n Toast.makeText(LoginActivity.this,\n \"Failed to create a new user.\",\n Toast.LENGTH_LONG).show();\n }\n }\n });\n }", "User getUserByToken(HttpServletResponse response, String token) throws Exception;", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();\n //delete user just created\n user.delete();\n //prompt user to create account\n Toast.makeText(MainActivity.this, \"No Email Exist \", Toast.LENGTH_SHORT).show();\n Toast.makeText(MainActivity.this, \"Create New Account \", Toast.LENGTH_SHORT).show();\n } else {\n // if failed, email already exist and move on to verify passoword\n //Toast.makeText(MainActivity.this, \"Loggin In\", Toast.LENGTH_SHORT).show();\n sentReset(finalInputUsername);\n }\n }", "private UsernamePasswordAuthenticationToken getAuthtication(HttpServletRequest request){\n // Get token from request header.\n String token = request.getHeader(\"Authorization\");\n if (token != null){\n //Get the username from the jwt token\n String username = JwtUtil.getUsernameByToken(token);\n //Check the existence of the username.\n Optional<User> userTry = userRepository.findByUsername(username);\n Collection<GrantedAuthority> authorities = new ArrayList<>();\n if (userTry.isPresent()){\n User user = userTry.get();\n authorities.add(new SimpleGrantedAuthority(user.getRole().getName()));\n return new UsernamePasswordAuthenticationToken(user,token,authorities);\n }\n }\n return null;\n }", "@Override\n protected void onActivityResult(\n final int requestCode,\n final int resultCode,\n final Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (requestCode != FRAMEWORK_REQUEST_CODE) {\n return;\n }\n\n final String toastMessage;\n final AccountKitLoginResult loginResult = AccountKit.loginResultWithIntent(data);\n if (loginResult == null || loginResult.wasCancelled())\n {\n toastMessage = \"Cancelled\";\n Toast.makeText(RegisterUser.this,toastMessage,Toast.LENGTH_SHORT).show();\n }\n else if (loginResult.getError() != null) {\n Toast.makeText(RegisterUser.this,\"Error\",Toast.LENGTH_SHORT).show();\n } else {\n final AccessToken accessToken = loginResult.getAccessToken();\n if (accessToken != null) {\n\n AccountKit.getCurrentAccount(new AccountKitCallback<Account>() {\n @Override\n public void onSuccess(final Account account) {\n String phoneNumber = account.getPhoneNumber().toString();\n\n if(phoneNumber.length()==14)\n phoneNumber = phoneNumber.substring(3);\n\n newUserRegistration(phoneNumber);\n progressBar.setVisibility(View.VISIBLE);\n }\n\n @Override\n public void onError(final AccountKitError error) {\n }\n });\n } else {\n toastMessage = \"Unknown response type\";\n Toast.makeText(RegisterUser.this, toastMessage, Toast.LENGTH_SHORT).show();\n }\n }\n }", "private void register() {\n\n //Displaying a progress dialog\n final ProgressDialog loading = ProgressDialog.show(this, \"Registering\",\n \"Please wait...\", false, false);\n\n\n //Getting user data\n// username = editTextUsername.getText().toString().trim();\n// password = editTextPassword.getText().toString().trim();\n// phone = editTextPhone.getText().toString().trim();\n\n\n Handler handler = new Handler();\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n loading.dismiss();\n confirmOtp();\n }\n }, 3000);\n\n\n //Again creating the string request\n// StringRequest stringRequest = new StringRequest(Request.Method.POST, Config.REGISTER_URL,\n// new Response.Listener<String>() {\n// @Override\n// public void onResponse(String response) {\n// loading.dismiss();\n// try {\n// //Creating the json object from the response\n// JSONObject jsonResponse = new JSONObject(response);\n//\n// //If it is success\n// if(jsonResponse.getString(Config.TAG_RESPONSE).equalsIgnoreCase(\"Success\")){\n// //Asking user to confirm otp\n// confirmOtp();\n// }else{\n// //If not successful user may already have registered\n// Toast.makeText(BusinessRegistration.this, \"Username or Phone number already registered\", Toast.LENGTH_LONG).show();\n// }\n// } catch (JSONException e) {\n// e.printStackTrace();\n// }\n// }\n// },\n// new Response.ErrorListener() {\n// @Override\n// public void onErrorResponse(VolleyError error) {\n// loading.dismiss();\n// Toast.makeText(BusinessRegistration.this, error.getMessage(), Toast.LENGTH_LONG).show();\n// }\n// }) {\n// @Override\n// protected Map<String, String> getParams() throws AuthFailureError {\n// Map<String, String> params = new HashMap<>();\n// //Adding the parameters to the request\n// params.put(Config.KEY_USERNAME, username);\n// params.put(Config.KEY_PASSWORD, password);\n// params.put(Config.KEY_PHONE, phone);\n// return params;\n// }\n// };\n\n //Adding request the the queue\n// requestQueue.add(stringRequest);\n }", "public F.Promise<Result> handleSignUp() {\n final Form<SignUp> filledForm = signUpForm.bindFromRequest();\n if(customerService().isLoggedIn()) {\n return asPromise(redirectToReturnUrl());\n } else if (filledForm.hasErrors()) {\n return asPromise(badRequest(signupView.render(data().build(), filledForm)));\n } else {\n return handleSignUpWithValidForm(filledForm);\n }\n }", "@Override\n\tprotected void successfulAuthentication(HttpServletRequest request,\n\t\t\tHttpServletResponse response, FilterChain chain,\n\t\t\tAuthentication auth) throws IOException, ServletException {\n\t\t\n\t\tString userName=((User)auth.getPrincipal()).getUsername();\n\t\tUserService userService =(UserService)SpringApplicationContext.getBean(\"userServiceImpl\");\n \n\t UserDto userDto = userService.getUser(userName);\n\t\tString token=Jwts.builder()\n\t\t\t\t.setSubject(userName)\n\t\t\t\t.claim(\"id\", userDto.getUserId())\n\t .claim(\"name\", userDto.getFirstName() + \" \" + userDto.getLastName())\n\t\t\t\t.setExpiration(new Date(System.currentTimeMillis()+SecurityConstants.EXPIRATION_TIME))\n\t\t\t\t.signWith(SignatureAlgorithm.HS512,SecurityConstants.TOKEN_SECRET)\n\t\t\t\t.compact();\n\t\tresponse.addHeader(SecurityConstants.HEADER_STRING, SecurityConstants.TOKEN_PREFIX+token);\n\t\tresponse.addHeader(\"user_id\",userService.getUser(userName).getUserId());\n response.getWriter().write(\"{\\\"token\\\": \\\"\" + token + \"\\\", \\\"id\\\": \\\"\"+ userDto.getUserId() + \"\\\"}\");\n System.out.println(response.getHeader(SecurityConstants.HEADER_STRING));\n\n\t}", "@PostMapping(path = \"/register\")\n public @ResponseBody\n String registerUser( @RequestBody TaiKhoan user) {\n // Admin admin = mAdminDao.findByToken(token);\n //if (admin != null) {\n TaiKhoan taiKhoan = mTaiKhoanDao.save(new TaiKhoan(user.getTentk(), user.getMatkhau(), user.getGmail(), user.getSdt(),user.getCmt(),user.getTypeuser(),user.getAnh()));\n if (taiKhoan != null) return AC_REGISTER_SUCESS;\n else return AC_REGISTER_NO_SUCESS;\n //} else return AC_REGISTER_NO_SUCESS;\n }", "private void addUserToFireBase() {\n Storage storage = new Storage(activity);\n RetrofitInterface retrofitInterface = RetrofitClient.getRetrofit().create(RetrofitInterface.class);\n Call<String> tokenCall = retrofitInterface.addUserToFreebase(RetrofitClient.FIREBASE_ENDPOINT + \"/\" + storage.getUserId() + \"/\" + storage.getFirebaseToken(), storage.getAccessToken());\n tokenCall.enqueue(new Callback<String>() {\n @Override\n public void onResponse(Call<String> call, Response<String> response) {\n if (response.isSuccessful()) {\n\n Toast.makeText(activity, \"Firebase success!\", Toast.LENGTH_SHORT).show();\n\n } else {\n Toast.makeText(activity, \"Failed to add you in Firebase!\", Toast.LENGTH_SHORT).show();\n }\n }\n\n @Override\n public void onFailure(Call<String> call, Throwable t) {\n\n /*handle network error and notify the user*/\n if (t instanceof SocketTimeoutException) {\n Toast.makeText(activity, R.string.connection_timeout, Toast.LENGTH_SHORT).show();\n }\n }\n });\n\n }", "@Override\n public void onSuccess() {\n Handler.Callback bayunAuthSuccess = msg -> {\n confirmHandler.onSuccess();\n return false;\n };\n\n\n // Bayun Registration failure Callback\n Handler.Callback bayunAuthFailure = msg -> {\n Exception exception = new Exception(msg.getData().getString(Constants.ERROR));\n confirmHandler.onFailure(exception);\n return false;\n };\n\n // Bayun Registration authorizeEmployeeCallback Callback\n Handler.Callback authorizeEmployeeCallback = msg -> {\n String employeePublicKey = msg.getData().getString(Constants.EMPLOYEE_PUBLICKEY);\n Exception exception = new Exception(\"Employee Authorization is Pending\");\n confirmHandler.onFailure(exception);\n return false;\n };\n\n // Registration with Bayun\n BasicBayunCredentials basicBayunCredentials = new BasicBayunCredentials\n (appId, companyName, user.getUserId(), signUpPassword.toCharArray(),\n appSecret, applicationKeySalt);\n\n\n if(signUpIsRegisterWithPwd){\n BayunApplication.bayunCore.registerEmployeeWithPassword\n (activity,companyName,user.getUserId(),signUpPassword, authorizeEmployeeCallback, bayunAuthSuccess, bayunAuthFailure);\n }else {\n BayunApplication.bayunCore.registerEmployeeWithoutPassword(activity,companyName,user.getUserId()\n ,signUpEmail,false, authorizeEmployeeCallback,\n null,null,null, bayunAuthSuccess, bayunAuthFailure);\n\n }\n// BayunApplication.bayunCore.registerEmployeeWithPassword\n// (activity,companyName,user.getUserId(),signUpPassword, authorizeEmployeeCallback, bayunAuthSuccess, bayunAuthFailure);\n\n\n }", "@Override\n\tpublic void login() {\n\t\tAccountManager accountManager = AccountManager.get(context);\n\t\tAccount[] accounts = accountManager.getAccountsByType(GOOGLE_ACCOUNT_TYPE);\n\t\tif(accounts.length < 1) throw new NotAccountException(\"This device not has account yet\");\n\t\tfinal String userName = accounts[0].name;\n\t\tfinal String accountType = accounts[0].type;\n\t\tBundle options = new Bundle();\n\t\tif(comService.isOffLine()){\n\t\t\tsetCurrentUser(new User(userName, userName, accountType));\n\t\t\treturn;\n\t\t}\n\t\taccountManager.getAuthToken(accounts[0], AUTH_TOKEN_TYPE, options, (Activity)context, \n\t\t\t\tnew AccountManagerCallback<Bundle>() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run(AccountManagerFuture<Bundle> future) {\n\t\t\t\t\t\tString token = \"\";\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tBundle result = future.getResult();\n\t\t\t\t\t\t\ttoken = result.getString(AccountManager.KEY_AUTHTOKEN);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tsetCurrentUser(new User(userName, userName, accountType, token));\n\t\t\t\t\t\t} catch (OperationCanceledException e) {\n\t\t\t\t\t\t\tandroid.os.Process.killProcess(android.os.Process.myPid());\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\tandroid.os.Process.killProcess(android.os.Process.myPid());\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tLog.d(\"Login\", \"Token: \" + token);\n\t\t\t\t\t}\n\t\t\t\t}, new Handler(new Handler.Callback() {\n\t\t\t\t\t\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic boolean handleMessage(Message msg) {\n\t\t\t\t\t\tLog.d(\"Login\", msg.toString());\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}));\n\t}", "@Override\n public void fromWXRegister(Map<String, Object> data, String token, final IBaseModel.OnCallbackListener listener) {\n RequestBody body = RequestBody.create(MediaType.parse(\"application/json;charset=UTF-8\"),\n GsonUtils.parseToJson(data));\n final Request request = new Request.Builder()\n .url(\"URL\")\n .header(\"Authorization\", token)\n .post(body)//默认就是GET请求,可以不写\n .build();\n HttpProvider.getOkHttpClient().newCall(request).enqueue(new Callback() {\n @Override\n public void onFailure(Call call, IOException e) {\n Log.d(\"onFailure: \", e.getMessage());\n }\n\n @Override\n public void onResponse(Call call, Response response) throws IOException {\n if (response.isSuccessful()) {\n delayedExecuteCallback(response.body().string(), new TypeToken<ResponseEntity<UserInfoEntity>>() {\n }.getType(), listener);\n } else {\n delayedExecuteCallback(null, new TypeToken<ResponseEntity<UserInfoEntity>>() {\n }.getType(), listener);\n }\n }\n });\n\n /* HttpProvider.doPost(URL, data, new HttpProvider.ResponseCallback() {\n @Override\n public void callback(String responseText) {\n delayedExecuteCallback(responseText, new TypeToken<ResponseEntity<UserInfoEntity>>() {\n }.getType(), listener);\n }\n });*/\n }", "private void register() {\n RegisterModel registerModel = new RegisterModel(edtEmail.getText().toString(),\n edtPaswd.getText().toString(),\n edtDisplayName.getText().toString());\n\n Response.Listener<RegisterApiResponse> responseListener = new Response.Listener<RegisterApiResponse>() {\n @Override\n public void onResponse(RegisterApiResponse response) {\n if (response.isSuccess()) login();\n }\n };\n\n Response.ErrorListener errorListener = new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n progressDialog.cancel();\n if (error != null) {\n String errorMsg = \"An error occurred\";\n String err = (error.getMessage() == null) ? errorMsg : error.getMessage();\n Log.d(TAG, err);\n error.printStackTrace();\n\n if (err.matches(AppConstants.CONNECTION_ERROR) || err.matches(AppConstants.TIMEOUT_ERROR)) {\n AlertDialog.Builder alertDialog = new AlertDialog.Builder(RegisterActivity.this);\n alertDialog.setTitle(getString(R.string.error_title_signup));\n alertDialog.setMessage(getString(R.string.error_message_network)).setCancelable(false)\n .setPositiveButton(getString(R.string.dialog_ok), new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }\n });\n alertDialog.show();\n } else if (err.matches(\".*Duplicate entry .* for key 'name_UNIQUE'.*\")) {\n edtDisplayName.setError(\"username taken\");\n edtDisplayName.requestFocus();\n } else if (err.matches(\".*The email has already been taken.*\")) {\n edtEmail.setError(\"email taken\");\n edtEmail.requestFocus();\n } else {\n AlertDialog.Builder alertDialog = new AlertDialog.Builder(RegisterActivity.this);\n alertDialog.setTitle(getString(R.string.error_title_signup));\n alertDialog.setMessage(getString(R.string.error_message_network)).setCancelable(false)\n .setPositiveButton(getString(R.string.dialog_ok), new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }\n });\n alertDialog.show();\n }\n }\n }\n };\n\n\n progressDialog.setMessage(getString(R.string.progress_dialog_message_login));\n RegistrationRequests registerRequest =\n RegistrationRequests.register(this, registerModel, responseListener, errorListener);\n VolleyRequest.getInstance(this.getApplicationContext()).addToRequestQueue(registerRequest);\n progressDialog.show();\n }", "public void signUp(View v) {\n attemptRegistration();\n }", "private void registerUser(){\n mAuth.createUserWithEmailAndPassword(correo, password).addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if(task.isSuccessful()){\n //mapa de valores\n Map<String, Object> map = new HashMap<>();\n map.put(\"name\",name);\n map.put(\"email\",correo);\n map.put(\"password\",password);\n map.put(\"birthday\",cumple);\n map.put(\"genre\",genre);\n map.put(\"size\",size);\n //obtenemos el id asignado por la firebase\n String id= mAuth.getCurrentUser().getUid();\n //pasamos el mapa de valores\n mDatabase.child(\"Users\").child(id).setValue(map).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task2) {\n //validams que la tarea sea exitosa\n if(task2.isSuccessful()){\n startActivity(new Intent(DatosIniciales.this, MainActivity.class));\n //evitamos que vuelva a la pantalla con finsh cuando ya se ha registrado\n finish();\n }else{\n Toast.makeText(DatosIniciales.this, \"Algo fallo ups!!\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }else{\n Toast.makeText(DatosIniciales.this, \"No pudimos completar su registro\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "User registration(User user);", "private void registerUserToFirebaseAuth() {\n Utils.showProgressDialog(this);\n Task<AuthResult> task = mAuth.createUserWithEmailAndPassword(etEmail.getText().toString().trim(), etPassword.getText().toString().trim());\n task.addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n Utils.dismissProgressDialog();\n if (task.isSuccessful()) {\n String firebaseId = task.getResult().getUser().getUid();\n\n // Storage Image to Firebase Storage.\n addProfileImageToFirebaseStorage(firebaseId);\n\n } else {\n Utils.toast(context, \"Some Error Occurs\");\n }\n }\n });\n }", "@Override\n public void onClick(View v) {\n try {\n Login login = new Login();\n login.setSalt(new Date());\n login.setUsername(mUsernameInput.getText().toString());\n login.setPassword(login.hashedPassword(mPasswordInput.getText().toString()));\n\n if (mLoginDb.getLogin(login.getUsername()) == null && mPasswordInput.getText().toString().length() != 0) {\n mLoginDb.addLogin(login);\n mUserId = login.getId().toString();\n //Log.d(TAG, \"register \" + mUserId);\n Bundle bundle = new Bundle();\n Intent intent = PasswordListActivity.newIntent(getActivity());\n setBundles(bundle, intent);\n\n startActivity(intent, bundle);\n\n Toast.makeText(getActivity(),\n R.string.register_successful,\n Toast.LENGTH_SHORT).show();\n } else if (mUsernameInput.getText().toString().length() == 0) {\n Toast.makeText(getActivity(),\n R.string.register_username_length,\n Toast.LENGTH_SHORT).show();\n }\n else if (mPasswordInput.getText().toString().length() == 0) {\n Toast.makeText(getActivity(),\n R.string.register_password_length,\n Toast.LENGTH_SHORT).show();\n } else if (mLoginDb.getLogin(login.getUsername()).getUsername() != null) {\n Toast.makeText(getActivity(),\n R.string.register_exists,\n Toast.LENGTH_SHORT).show();\n } else {\n throw new Exception();\n }\n } catch (Exception e) {\n e.printStackTrace();\n Toast.makeText(getActivity(),\n R.string.register_error,\n Toast.LENGTH_SHORT).show();\n }\n }", "@RequestMapping(value=\"/signup/{username}/{password}\")\n @ResponseBody\n public boolean signup(@PathVariable String username, @PathVariable String password){\n\n User user = new User(username, password);\n try{\n customUserDetailsService.save(user);\n return true;\n }catch (Exception e) {\n System.out.println(e);\n //ef return false tha er username fratekid...\n return false;\n }\n }", "public void onCreateAccountPressed(View view) {\n\n\n mUserName = mEditTextUsernameCreate.getText().toString();\n mUserEmail = mEditTextEmailCreate.getText().toString().toLowerCase();\n mPassword = mEditTextPasswordCreate.getText().toString();\n\n /**\n * Check that email and user name are okay\n */\n boolean validEmail = isEmailValid(mUserEmail);\n boolean validUserName = isUserNameValid(mUserName);\n boolean validPassword = isPasswordValid(mPassword);\n if (!validEmail || !validUserName || !validPassword) return;\n /**\n * If everything was valid show the progress dialog to indicate that\n * account creation has started\n */\n mAuthProgressDialog.show();\n\n\n // [START create_user_with_email]\n mAuth.createUserWithEmailAndPassword(mUserEmail, mPassword)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n Log.d(LOG_TAG, \"createUserWithEmail:onComplete:\" + task.isSuccessful());\n\n // If sign in fails, display a message to the user. If sign in succeeds\n // the auth state listener will be notified and logic to handle the\n // signed in user can be handled in the listener.\n if (!task.isSuccessful()) {\n Toast.makeText(CreateAccountActivity.this, R.string.auth_failed,\n Toast.LENGTH_SHORT).show();//error message\n //showErrorToast(\"createUserWithEmail : \"+task.isSuccessful());\n }\n\n // [START_EXCLUDE]\n mAuthProgressDialog.dismiss();\n Intent intent = new Intent(CreateAccountActivity.this, LoginActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n startActivity(intent);\n finish();\n // [END_EXCLUDE]\n //end\n }\n });\n // [END create_user_with_email]\n\n\n\n /**\n * Create new user with specified email and password\n */\n /*mFirebaseRef.createUser(mUserEmail, mPassword, new Firebase.ValueResultHandler<Map<String, Object>>() {\n @Override\n public void onSuccess(Map<String, Object> result) {\n Dismiss the progress dialog\n mAuthProgressDialog.dismiss();\n Log.i(LOG_TAG, getString(R.string.log_message_auth_successful));\n }\n\n @Override\n public void onError(FirebaseError firebaseError) {\n *//* Error occurred, log the error and dismiss the progress dialog *//*\n Log.d(LOG_TAG, getString(R.string.log_error_occurred) +\n firebaseError);\n mAuthProgressDialog.dismiss();\n *//* Display the appropriate error message *//*\n if (firebaseError.getCode() == FirebaseError.EMAIL_TAKEN) {\n mEditTextEmailCreate.setError(getString(R.string.error_email_taken));\n } else {\n showErrorToast(firebaseError.getMessage());\n }\n\n }\n });*/\n }" ]
[ "0.66236436", "0.6529038", "0.64220417", "0.63642794", "0.63069105", "0.62621313", "0.62568706", "0.6226217", "0.6219281", "0.61505866", "0.6123191", "0.6112136", "0.6102174", "0.6090469", "0.60674345", "0.6035616", "0.5992802", "0.59833187", "0.5977764", "0.5965706", "0.59626824", "0.59586084", "0.59538215", "0.59368825", "0.58930063", "0.5886569", "0.5884053", "0.5874895", "0.5874332", "0.58417", "0.58380735", "0.5833373", "0.5830223", "0.58297056", "0.582538", "0.58135086", "0.57944554", "0.5787644", "0.5782736", "0.5782523", "0.57809025", "0.5780773", "0.5777931", "0.5776797", "0.57709885", "0.5769999", "0.57682246", "0.57609594", "0.575779", "0.575779", "0.575779", "0.575779", "0.5756239", "0.57525444", "0.5747214", "0.5731435", "0.57286304", "0.57270694", "0.57228005", "0.5708114", "0.57074904", "0.570546", "0.5703964", "0.5703165", "0.5698178", "0.56954086", "0.5693051", "0.5693051", "0.5693051", "0.56927806", "0.5685732", "0.5684161", "0.5681665", "0.567575", "0.5675618", "0.56749475", "0.5674805", "0.5667141", "0.5667093", "0.56670576", "0.56666243", "0.5663477", "0.56618786", "0.56602347", "0.5658831", "0.5658354", "0.5654003", "0.5653578", "0.5645158", "0.5637688", "0.5637476", "0.56335753", "0.56319046", "0.5620735", "0.5619607", "0.56136173", "0.5600324", "0.55985177", "0.5595305", "0.55945", "0.5592703" ]
0.0
-1
get username by typing verification token
@Transactional void fetchUserAndEnable(VerificationToken verificationToken) throws SpringRedditException { String username = verificationToken.getUser().getUsername(); //and call orElseThrow as supplier to throws out custom springRedEx User user = userRepository.findByUsername(username).orElseThrow(() -> new SpringRedditException("User not found with name - " + username)); //and store this result inside var user and enable this user by typing user.set user.setEnabled(true); userRepository.save(user); /*lastly sava user to database and mark the method as transaction and go back to auth controller and return response entity back to the client by typing written new response entity */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getUsernameFromToken(String token);", "String getUserUsername();", "java.lang.String getUsername();", "java.lang.String getUsername();", "java.lang.String getUsername();", "java.lang.String getUsername();", "java.lang.String getUsername();", "java.lang.String getUsername();", "java.lang.String getUsername();", "java.lang.String getUsername();", "java.lang.String getUsername();", "public String getUsernameFromToken() {\n\t\tHttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();\n\t\tfinal String requestTokenHeader = request.getHeader(AUTH);\n\t\tString jwtToken = requestTokenHeader.substring(BEARER.length());\n\t\treturn getClaimFromToken(jwtToken, Claims::getSubject);\n\t}", "String getUsername();", "String getUsername();", "String getUsername();", "String getUsername();", "String getUsername();", "String getUsername();", "@Override\n\t\t\t\tpublic String getUsername() {\n\t\t\t\t\treturn token;\n\t\t\t\t}", "String getUser();", "String getUser();", "java.lang.String getUser();", "java.lang.String getUserName();", "java.lang.String getUserName();", "java.lang.String getUserName();", "public String getUsernameFromToken(String token) {\n\t\tString username;\n\t\ttry {\n\t\t\tfinal Claims claims = this.getClaimsFromToken(token);\n\t\t\tusername = claims.getSubject();\n\t\t} catch (Exception e) {\n\t\t\tusername = null;\n\t\t}\n\t\treturn username;\n\t}", "public String getUsernameFromToken(String token) {\n\t\treturn getClaimFromToken(token, Claims::getSubject);\n\t}", "public String getUsernameFromToken(String token) {\n\t\treturn getClaimFromToken(token, Claims::getSubject);\n\t}", "String getUserName();", "String getUserName();", "public String getUsername(String authToken) {\n String username = null;\n try {\n final Claims claims = getClaimsFromToken(authToken);\n username = claims.getSubject();\n } catch (Exception e){\n username = null;\n }\n return username;\n }", "public static String getToken(String username)\n\t{\n\t\tif(Application.getAccountLibrary().getAccount(username) == null)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\tString token = StringUtils.getRandomStringOfLettersAndNumbers(10)\n\t\t\t\t.toUpperCase();\n\t\tusernames.put(token, username);\n\t\treturn token;\n\t}", "String extractUserNameFromData(String userInfoDataFromServer);", "public String getUserByToken(String token) throws SQLException;", "public String getUsernameFromToken(HttpServletRequest request) {\n\t\tfinal String requestTokenHeader = request.getHeader(AUTH);\n\t\tString jwtToken = requestTokenHeader.substring(BEARER.length());\n\t\treturn getClaimFromToken(jwtToken, Claims::getSubject);\n\t}", "private String extractUsername() {\n return SwingUtil.extract(usernameJTextField, Boolean.TRUE);\n }", "private String searchForUser() {\n String userId = \"\";\n String response = given().\n get(\"/users\").then().extract().asString();\n List usernameId = from(response).getList(\"findAll { it.username.equals(\\\"Samantha\\\") }.id\");\n if (!usernameId.isEmpty()) {\n userId = usernameId.get(0).toString();\n }\n return userId;\n }", "public String getUserNameFromToken(String authToken) {\n\t\tif (null == authToken) {\n\t\t\treturn null;\n\t\t}\n\n\t\tString[] parts = authToken.split(\":\");\n\t\treturn parts[0];\n\t}", "@Override\n public String getUsername() {\n String username = mTxtUsername.getText().toString().trim()\n .toLowerCase(Locale.getDefault());\n checkUsername(username);\n return username;\n }", "private String getUserName(String authToken) {\n if (authToken != null) {\n try {\n return jwtTokenService.getUsernameFromToken(authToken);\n } catch (final IllegalArgumentException e) {\n LOG.error(\"an error occured during getting username from token\", e);\n return null;\n } catch (final Exception e) {\n LOG.warn(\"the token is expired and not valid anymore\", e);\n }\n } else {\n LOG.warn(\"couldn't find bearer string, will ignore the header\");\n }\n return UUID.randomUUID().toString();\n }", "public static String getUsername() { return lblUsername.getText(); }", "public java.lang.CharSequence getUsername() {\n return username;\n }", "private String getUsername(AuthenticationContext context) {\n String username = null;\n for (Integer stepMap : context.getSequenceConfig().getStepMap().keySet())\n if (context.getSequenceConfig().getStepMap().get(stepMap).getAuthenticatedUser() != null\n && context.getSequenceConfig().getStepMap().get(stepMap).getAuthenticatedAutenticator()\n .getApplicationAuthenticator() instanceof LocalApplicationAuthenticator) {\n username = String.valueOf(context.getSequenceConfig().getStepMap().get(stepMap).getAuthenticatedUser());\n break;\n }\n return username;\n }", "public String getUserName();", "@Test\n public void successAtGettingUsername4Token() {\n GetUsername4Token service = new GetUsername4Token(token);\n service.execute();\n \n assertEquals(USERNAME,service.getUsername());\n\n }", "public java.lang.CharSequence getUsername() {\n return username;\n }", "public String returnUserName() {\n\t\treturn this.registration_username.getAttribute(\"value\");\r\n\t}", "String getUserName(String userId);", "protected String loginIdentifyString() {\r\n return \"hao\";\r\n }", "private String getUserName() {\n EditText nameEditText = (EditText) findViewById(R.id.name_edit_text);\n return nameEditText.getText().toString().trim();\n }", "User getUserByToken(HttpServletResponse response, String token) throws Exception;", "Optional<String> username();", "public String getUserNameFromJwtToken(String token) {\n return Jwts.parser().setSigningKey(jwtSecretKey.secretKey()).parseClaimsJws(token).getBody().getSubject();\n }", "public String returnUsername(){\n return username;\n }", "public User getUserByName(String username);", "public User getUserByName(String username);", "private String getUserName(Callback[] callbacks) throws LoginException\n {\n String userName = ((NameCallback)callbacks[0]).getName();\n if (userName == null) {\n throwLoginException(\"Username not supplied.\");\n }\n System.out.println(\"Username: \"+userName);\n return userName;\n }", "public java.lang.String getUsername() {\n java.lang.Object ref = username_;\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 username_ = s;\n }\n return s;\n }\n }", "public java.lang.String getUsername() {\n java.lang.Object ref = username_;\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 username_ = s;\n }\n return s;\n }\n }", "public java.lang.String getUsername() {\n java.lang.Object ref = username_;\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 username_ = s;\n }\n return s;\n }\n }", "public java.lang.String getUsername() {\n java.lang.Object ref = username_;\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 username_ = s;\n }\n return s;\n }\n }", "private String getUserName( Callback[] callbacks )\n throws LoginException\n {\n String userName = ( ( NameCallback ) callbacks[0] ).getName();\n if ( userName == null ) {\n throwLoginException( \"Username not supplied.\" );\n }\n // Print debugging information\n if ( 1 == 1 ) {\n cLogger.info( \"\\tuserName\\t= \" + userName );\n }\n\n return userName;\n }", "private static String getUser(String message) { return message.split(\"!\")[0].substring(1); }", "public String getUserInSessionToken(String username){\n\t\tfor(Session s : getSessionSet()){\n\t\t\tif(s.getName().equals(username)){\n\t\t\t\treturn s.getToken();\n\t\t\t}\t\t\t\n\t\t}\n\t\treturn null;\n\t}", "public String valiationOfUsernameField()\n\t{\n\t\twaitForVisibility(validationUsername);\n\t\treturn validationUsername.getText();\n\t}", "public String getNombreUsuarioFromToken(String token){\n return Jwts.parser().setSigningKey(secret).parseClaimsJws(token).getBody().getSubject();\n }", "public String getUserName(int userId);", "User getUser(String username);", "java.lang.String getAuthentication(int index);", "public java.lang.String getUsername() {\n java.lang.Object ref = username_;\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 username_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getUsername() {\n java.lang.Object ref = username_;\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 username_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getUsername() {\n java.lang.Object ref = username_;\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 username_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getUsername() {\n java.lang.Object ref = username_;\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 username_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getNombreUsuarioFromToken(String token){\n\t\treturn Jwts.parser().setSigningKey(secret).parseClaimsJws(token).getBody().getSubject();\n\t}", "public String getUsername() {\n return username.get();\n }", "public String getUserName() {\n return txtUserName().getText();\n }", "java.lang.String getToken();", "java.lang.String getToken();", "java.lang.String getToken();", "java.lang.String getToken();", "java.lang.String getToken();", "java.lang.String getToken();", "public String getUserName() {\n\t\treturn phoneText.getText().toString();\n\t}", "public String getUserFromAuth(String authToken) throws AuthTokenNotFoundException {\n if (authTokens.containsKey(authToken)) {\n return authTokens.get(authToken).getUser();\n }\n else {\n String username = persistenceFacade.getUsernameFromAuthToken(authToken);\n if(username == null) throw new AuthTokenNotFoundException();\n return username;\n }\n }", "public User getUser(String username);", "protected static String getUsername() {\n if (username == null || username.isEmpty()) {\n Console console = System.console();\n if (console != null) {\n username = console.readLine(\"Username:\");\n } else {\n throw new UnsupportedOperationException(\n \"Username must be specified\");\n }\n }\n return username;\n }", "private String issueToken(String username) {\n \n String token =TokenManagement.getTokenHS256(username,tokenSec,tokenduration);\n return token;\n }", "public User getSpecificUser(String username);", "private static String getUserName(){\r\n Scanner in = new Scanner(System.in);\r\n System.out.print(\"What is your character's name?\");\r\n return in.nextLine();\r\n }", "private String getUser(String name) {\n\t\treturn null;\n\t}", "User getUserByUsername(String name) throws InvalidUserException;", "public String getUsername() {return username;}", "public final String getUser() {\n return username;\n }", "public java.lang.String getUsername() {\n java.lang.Object ref = username_;\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 username_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getUsername() {\n java.lang.Object ref = username_;\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 username_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getUsername() {\n java.lang.Object ref = username_;\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 username_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getUsername() {\n Object ref = username_;\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 username_ = s;\n return s;\n }\n }", "String getFromNick();", "String usernameLabel();", "public String getToken();", "public String getUserNameFromWebToken(String webToken) {\n\t\treturn Jwts.parser().setSigningKey(jwtSecret).parseClaimsJws(webToken).getBody().getSubject();\n\t}" ]
[ "0.82861555", "0.73254615", "0.72933716", "0.72933716", "0.72933716", "0.72933716", "0.72933716", "0.72933716", "0.72933716", "0.72933716", "0.72933716", "0.714396", "0.7081972", "0.7081972", "0.7081972", "0.7081972", "0.7081972", "0.7081972", "0.7024256", "0.69844455", "0.69844455", "0.6894923", "0.6845525", "0.6845525", "0.6845525", "0.6840433", "0.67512167", "0.67512167", "0.674553", "0.674553", "0.6687446", "0.65659934", "0.6563338", "0.65628046", "0.65571064", "0.6548602", "0.65213376", "0.6497948", "0.64840287", "0.6476578", "0.644122", "0.6390208", "0.63562804", "0.6333747", "0.6312177", "0.62975794", "0.6293861", "0.6276856", "0.62694496", "0.6265549", "0.6264442", "0.6263309", "0.6254373", "0.62479645", "0.62361544", "0.62361544", "0.6213891", "0.61639464", "0.61639464", "0.61639464", "0.61639464", "0.61554676", "0.6151637", "0.61485726", "0.6145374", "0.61363465", "0.6132212", "0.6119436", "0.6117917", "0.61164707", "0.61164707", "0.61164707", "0.61164707", "0.61157155", "0.61019844", "0.6100896", "0.6093283", "0.6093283", "0.6093283", "0.6093283", "0.6093283", "0.6093283", "0.6088863", "0.6083513", "0.60682315", "0.6063276", "0.60494316", "0.6046078", "0.6022631", "0.6015137", "0.60077614", "0.60063064", "0.6003696", "0.60005534", "0.60005534", "0.60005534", "0.5998665", "0.5997253", "0.59965634", "0.5989917", "0.59895486" ]
0.0
-1
Constructor injecting the WebDriver interface.
public Page(final WebDriver webDriver) { this.webDriver = webDriver; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public BasePage(WebDriver driver) {\n this.driver = driver;\n }", "public Page(WebDriver driver) {\n this.driver = driver;\n }", "public RegisterPage(WebDriver driver){ this.driver = driver; }", "public Page(WebDriver webDriver) {\n this.webDriver = webDriver;\n\t}", "protected WebDriverManager() {\n initialize();\n }", "protected void init(WebDriver driver) {\n }", "public BasePage(WebDriver driver) {\r\n\t\tsuper(driver);\r\n\t}", "public Page(WebDriver driver) {\r\n\t\tthis.driver = driver;\r\n\t}", "public BasePage(WebDriver pDriver) {\n PageFactory.initElements(pDriver, this);\n pDriver.manage().window().maximize();\n this.eventDriver = new EventFiringWebDriver(pDriver);\n this.eventHandler = new EventHandler();\n this.eventDriver.register(eventHandler);\n //driver = pDriver;\n }", "public LoginPage(WebDriver _driver) {\n driver = _driver;\n }", "public Page() {\n PageFactory.initElements(getDriver(), this); //snippet to use for @FindBy\n }", "public BasePage(WebDriver driver)\n\t{\n\t\tpageDriver= driver;\n\t\tPageFactory.initElements(new AjaxElementLocatorFactory(driver, 25), this);\n\t}", "public PageObject(WebDriver driver) {\n this.driver = driver;\n PageFactory.initElements(driver, this);\n }", "public MainPage(WebDriver driver) {\n super(driver);\n }", "public void initialize() {\n webDriverConfig = WebDriverConfig.getInstance();\n webDriver = WebDriverFactory.getDriver(webDriverConfig.getBrowser());\n webDriver.manage().window().maximize();\n webDriver.manage().timeouts().implicitlyWait(webDriverConfig.getImplicitWaitTime(), TimeUnit.SECONDS);\n webDriverWait = new WebDriverWait(webDriver, webDriverConfig.getExplicitWaitTime());\n }", "public Common(WebDriver driver) {\n\t\tthis.driver = driver;\n\n\t}", "public GenericMethods(WebDriver driver) {\n\t\tthis.driver = driver;\n\t}", "public SearchPageObject(WebDriver driver) {\n this.driver = driver;\n }", "public static WebDriver setupDriver()\r\n\t{\r\n\t driver = getWebDriver();\r\n\t return driver;\r\n\t}", "public Page(WebDriver webDriver) {\n\t\tthis.webDriver = webDriver;\n wait = new WebDriverWait(webDriver, 10);\n\t}", "public ELogin(WebDriver driver)\r\n{\r\n\tthis.driver =driver;\r\n\t//System.out.println(\"Elogin as been instantiated\");\r\n}", "public GoogleAutomation() {\n\t\t\n\t\t//The setProperty() method of Java system class sets the property of the system which is indicated by a key.\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"driver//chromedriver.exe\");\n\t\t\n\t\t//initilize webDriver \n\t\twebDriver = new ChromeDriver();\n\t}", "public MyAccountPageObject(WebDriver driver) {\n this.driver = driver;\n PageFactory.initElements(driver, this);\n wait = new WebDriverWait(driver, 20);\n }", "public void initializeWebElement(){\n\t\tPageFactory.initElements(driver, this);\n\t}", "public LoginPage(WebDriver driver){\n super(driver);\n PageFactory.initElements(driver, this);\n }", "public LoginPage(){\n PageFactory.initElements(driver, this); //all vars in this class will be init with this driver\n }", "public PaymentPage(WebDriver driver) {\n\t\tsuper(driver);\n\t}", "private WebDriver getDriver() {\n return new ChromeDriver();\n }", "protected void init() {\n PageFactory.initElements(webDriver, this);\n }", "public HomePage(WebDriver driver) {\n\t\tthis.driver=driver;\n\t\teleutil=new ElementUtil(this.driver); \n\t}", "public Payment(WebDriver driver)\n\t{\n\t\tPageFactory.initElements(driver, this);\n\t}", "public BasePageObject() {\n this.driver = BrowserManager.getInstance().getDriver();\n this.wait = BrowserManager.getInstance().getWait();\n PageFactory.initElements(driver, this);\n }", "public void initDriver() {\n if (getBrowser().equals(\"firefox\")) {\n WebDriverManager.firefoxdriver().setup();\n if (System.getProperty(\"headless\") != null) {\n FirefoxOptions firefoxOptions = new FirefoxOptions();\n firefoxOptions.setHeadless(true);\n driver = new FirefoxDriver(firefoxOptions);\n } else {\n driver = new FirefoxDriver();\n }\n } else {\n WebDriverManager.chromedriver().setup();\n if (System.getProperty(\"headless\") != null) {\n ChromeOptions chromeOptions = new ChromeOptions();\n chromeOptions.setHeadless(true);\n driver = new ChromeDriver(chromeOptions);\n } else {\n driver = new ChromeDriver();\n }\n }\n }", "public SeleniumServerConfiguration() {\n }", "public interface WebDriverHandler {\n\t/**\n\t * Extracts the integrated web driver and configures the system properties\n\t * @param tempFiles A collection to place references to any temporary files in\n\t */\n\tvoid configureWebDriver(@NotNull List<File> tempFiles);\n}", "private void initialize() {\n int implicitWaitTime = 20;\n int explicitWaitTime = 30;\n int waitSleepTime = 10;\n\n ChromeDriverManager.getInstance(CHROME).setup();\n// FirefoxDriverManager.getInstance(FIREFOX).setup();\n this.webDriver = new ChromeDriver();\n this.webDriver.manage().window().maximize();\n this.webDriver.manage().timeouts().implicitlyWait(implicitWaitTime, TimeUnit.SECONDS);\n webDriverWait = new WebDriverWait(webDriver, explicitWaitTime,waitSleepTime);\n }", "public LoginPage(WebDriver driver) {\r\n this.driver=driver;\r\n\t\tPageFactory.initElements(driver, this);\r\n\t}", "public Homepage(WebDriver driver) {\n\t\tthis.driver=driver;\n\t}", "public BrowserActions(WebDriver driver){\r\n\t\tthis.driver=driver;\r\n\t}", "@BeforeClass\n public static void instanceDriver() {\n ChromeOptions options = ConfigUtil.chromeOptions();\n driver = new ChromeDriver(options);\n wait = new WebDriverWait(driver, WEB_DRIVER_TIMEOUT);\n }", "public LoginPage(WebDriver driver) {\n\t this.driver = driver;\n\t }", "SeleniumFactory getSeleniumFactory();", "public Zip_Code(WebDriver driver){\n super();\n PageFactory.initElements(driver,this);\n //local page logger gets set to abstract class logger when you use it in\n //page object\n this.logger = super.logger;\n\n }", "@Override\n public WebDriver getWebDriver() {\n return new FirefoxDriver();\n }", "public Flight(WebDriver driver){\n this.driver=driver;\n wait = new WebDriverWait(driver,10);\n\n\n }", "private void initDriver(){\r\n String browserToBeUsed = (String) jsonConfig.get(\"browserToBeUsed\");\r\n switch (browserToBeUsed) {\r\n case \"FF\":\r\n System.setProperty(\"webdriver.gecko.driver\", (String) jsonConfig.get(\"fireFoxDriverPath\"));\r\n FirefoxProfile ffProfile = new FirefoxProfile();\r\n // ffProfile.setPreference(\"javascript.enabled\", false);\r\n ffProfile.setPreference(\"intl.accept_languages\", \"en-GB\");\r\n\r\n FirefoxOptions ffOptions = new FirefoxOptions();\r\n ffOptions.setProfile(ffProfile);\r\n driver = new FirefoxDriver(ffOptions);\r\n break;\r\n case \"CH\":\r\n String driverPath = (String) jsonConfig.get(\"chromeDriverPath\");\r\n System.setProperty(\"webdriver.chrome.driver\", driverPath);\r\n\r\n Map<String, Object> prefs = new HashMap<String, Object>();\r\n prefs.put(\"profile.default_content_setting_values.notifications\", 2);\r\n\r\n ChromeOptions options = new ChromeOptions();\r\n options.setExperimentalOption(\"prefs\", prefs);\r\n options.addArguments(\"--lang=en-GB\");\r\n driver = new ChromeDriver(options);\r\n break;\r\n case \"IE\":\r\n System.setProperty(\"webdriver.ie.driver\", (String) jsonConfig.get(\"ieDriverPath\"));\r\n\r\n InternetExplorerOptions ieOptions = new InternetExplorerOptions();\r\n ieOptions.disableNativeEvents();\r\n ieOptions.requireWindowFocus();\r\n ieOptions.introduceFlakinessByIgnoringSecurityDomains();\r\n driver = new InternetExplorerDriver(ieOptions);\r\n }\r\n\r\n driver.manage().window().maximize();\r\n }", "public UsagePoints(WebDriver driver) {\n this.driver = driver;\n }", "public DashboardModule(WebDriver driver) {\n\t\tPageFactory.initElements(driver, this);\n\t}", "public WebDriver initializeDriver() {\n System.setProperty(\"webdriver.chrome.driver\", projectPath + \"//src//main//resources//chromedriver\");\n driver = new ChromeDriver();\n driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n driver.manage().window().maximize();\n return driver;\n }", "public FlightConfirmationPage(WebDriver driver) {\n this.driver = driver;\n }", "public void initialization() {\n\t\t\t\n\t\t if(prop.getProperty(\"browser\").equals(\"chrome\")) {\n\t\t \t\n\t\t \tWebDriverManager.chromedriver().setup();\n\t\t\t\t\n\t\t\t\t driver=new ChromeDriver();\n\t\t\t\t\n\t\t } else if(prop.getProperty(\"browser\").equals(\"firefox\")) {\n\t\t \t\n\t\t \tWebDriverManager.firefoxdriver().setup();\n\t\t\t\t\n\t\t\t\t driver=new FirefoxDriver();\n\t\t\t\t \n\t\t } else if(prop.getProperty(\"browser\").equals(\"edge\")) {\n\t\t \tWebDriverManager.edgedriver().setup();\n\t\t\t\t\n\t\t\t\t driver=new EdgeDriver();\n\t\t \t\n\t\t }\n\t\t\t\n\t }", "public ExcursionPage( WebDriver driver ) {\r\n\t\r\n\t\tsuper( driver );\r\n\t}", "public FaceLoginPage(WebDriver driver){ // ===> Bu bir constructor\n\n this.driver = driver;\n // **** PageFactory.initElements() **** ==> page objelerini(Web element) baslatmak icin kullanilir\n PageFactory.initElements(driver, this);\n\n }", "public HomePage(WebDriver driver) {\n\t\tthis.driver = driver;\n\t\tPageFactory.initElements(driver, this); //now all Page Factory elements will have access to the driver, \n\t\t\t\t\t\t\t\t\t\t\t\t//which is need to get a hold of all the elements. w/o it, tests will fail. \n\t\t\t\t\t\t\t\t\t\t\t\t//\"this\" is referring to the Class HomePage\n\t}", "@BeforeMethod\n public void setDriver() throws MalformedURLException {\n\n\n driver = WebDriverFactory.getDriver(WebDriverFactory.CHROME).get();\n\n\n loginPage = new LoginPage(driver);\n loginPageHelper = new LoginPageHelper(driver);\n menuHelper = new MenuHelper(driver);\n }", "public WebDriver initDriver (Properties prop) {\r\n\t\tString browserName = prop.getProperty(\"browser\");\r\n\t\tif(browserName.equals(\"chrome\")) {\r\n\t\t\toptionsManager = new OptionsManager(prop);\r\n\t\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"./src/test/resources/chrome/chromedriver.exe\");\r\n\t\t\tdriver = new ChromeDriver(optionsManager.getChromeOptions());\r\n\t\t}else if(browserName.equals(\"firefox\")) {\r\n\t\t\toptionsManager = new OptionsManager(prop);\r\n\t\t\tSystem.setProperty(\"webdriver.gecko.driver\",\"./src/test/resources/firefox/geckodriver.exe\");\r\n\t\t\tdriver = new FirefoxDriver(optionsManager.getFirefoxOptions());\r\n\t\t}\r\n\t\t\r\n\t\teventDriver = new EventFiringWebDriver(driver);\r\n\t\teventListener = new WebEventListener();\r\n\t\teventDriver.register(eventListener);\r\n\t\tdriver = eventDriver;\r\n\t\t\r\n\t\tdriver.manage().window().maximize();\r\n\t\tdriver.manage().deleteAllCookies();\r\n\t\tdriver.manage().timeouts().implicitlyWait(15, TimeUnit.SECONDS);\r\n\t\tdriver.get(prop.getProperty(\"url\"));\r\n\t\treturn driver;\r\n\t}", "public ListCategoryPage(WebDriver driver)\n {\n this.driver = driver;\n }", "public GoogleSearchPage(WebDriver _driver) {\n\t\tthis.driver = _driver;\n\t}", "SearchResultsPage(WebDriver webDriver) {\n this.webDriver = webDriver;\n PageFactory.initElements(webDriver, this);\n }", "private void setup() {\n if (config.getProperty(\"browser\").equals(\"chrome\")) {\n System.setProperty(\"webdriver.chrome.driver\", chromeDriverPath);\n driver = new ChromeDriver();\n } else if (config.getProperty(\"browser\").equals(\"firefox\")) {\n System.setProperty(\"webdriver.gecko.driver\", geckoDriverPath);\n driver = new FirefoxDriver();\n }\n\n event_driver = new EventFiringWebDriver(driver);\n // Now create object of EventListerHandler to register it with EventFiringWebDriver\n eventListener = new WebEventListener();\n event_driver.register(eventListener);\n driver = event_driver;\n\n wait = new WebDriverWait(driver, 30);\n }", "public Selenium(String chromePath) {\n this.browserDriverPath = chromePath; \n }", "public loginPage(WebDriver driver) {\n this.driver = driver;\n }", "public static WebDriver initializatio(){\n\t\t \r\n\t\t\t String browse_name= prop.getProperty(\"browser\");\r\n\t\t\t \r\n\t\t\t \r\n\t\t if(driver==null && browse_name.equals(\"chrome\")){\r\n\t\t\t System.setProperty(\"webdriver.chrome.driver\", \"C://Users//RJ//Downloads//chromedriver.exe\");\r\n\t\t\t driver=new ChromeDriver();\r\n\t\t\t //E:\\Yadav Selenium\r\n\t\t }\r\n\t\t \r\n\t\t else if(driver==null && browse_name.equals(\"FF\")){\r\n\t\t\t System.setProperty(\"webdriver.gecko.driver\", \"E://Yadav Selenium//geckodriver.exe\");\r\n\t\t\t driver=new FirefoxDriver();\r\n\t\t }\r\n\t\t event_driver=new EventFiringWebDriver(driver);\r\n\t\t //now cearte Eventlistnerhandler to resgistor with eventFireingWebdriver\r\n\t\t event_lisner=new WebEventListner();\r\n\t\t event_driver.register(event_lisner);\r\n\t\t driver=event_driver;\r\n\t\t \r\n\t\t driver.manage().window().maximize();\r\n\t\t driver.manage().deleteAllCookies();\r\n\t\t driver.manage().timeouts().pageLoadTimeout(Testutil.PAGE_LOAD_TIMEOUT, TimeUnit.SECONDS);\r\n\t\t driver.manage().timeouts().implicitlyWait(Testutil.IMPLICIT_WAIT, TimeUnit.SECONDS);\r\n\t\t // driver.get(prop.getProperty(\"url\"));\r\n\t\t driver.navigate().to(prop.getProperty(\"url\"));\r\n\t\treturn driver;\r\n\t}", "public Nexus_HomeLocators(WebDriver driver){\n this.driver = driver;\n }", "public IntentPizzaAccountPageObject(WebDriver driver){\n\t\t\tPageFactory.initElements(driver, this);\n\t}", "public ReviewTLPage(WebDriver driver) {\r\n\t\tsuper(driver);\r\n\t}", "public Start (WebDriver driver) {\n\t\tthis.driver=driver;\n\t}", "public CampoObligatorio(WebDriver driver) {\n\n this.driver = driver;\n }", "protected WebDriver newDriver() {\n SupportedWebDriver supportedDriverType = Configuration.getDriverType();\n return webDriverFactory.newInstanceOf(supportedDriverType);\n }", "public static WebDriver setUp() {\n\t\n \t\n \tSystem.setProperty(\"webdriver.chrome.driver\", \"drivers\\\\chromedriver.exe\"); //if it doesn't work we can check with user.dir...\n \tdriver = new ChromeDriver(); //launch the Browser it opens empty page\n \tdriver.manage().window().maximize();\n \tdriver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS); //to wait globally\n \tdriver.get(\"http://166.62.36.207/humanresources/symfony/web/index.php/auth/login\");\n \t \n \treturn driver; //return object of the driver \t\n}", "public AmazonHomePage(WebDriver driver) {\n\t\tsuper(driver);\n\t}", "public LoginPage()\n{\n\tPageFactory.initElements(driver, this);\n}", "public PolicyBinderPage(WebDriver driver) {\r\n this.driver = driver;\r\n PageFactory.initElements(driver, this);\r\n policybinderpageDTO = new PolicyBinderPageDTO(TestCaseDetails.testDataDictionary);\r\n }", "public AddUser(WebDriver driver) \n\t{\n\t\t//assigning driver to the driver variable in this class\n\t\tthis.driver=driver;\n\t}", "public Cibc(WebDriver driver) {\r\n\t\tthis.driver = driver;\r\n\t\taction = new Actions(driver);\r\n\t\twait = new WebDriverWait(driver, 30);\r\n\r\n\t}", "public RegistrationRutPage(WebDriver driver) {\n super(driver);\n PageFactory.initElements(driver, this);\n }", "public static void initialization() {\n String browserName = properties.getProperty(\"browserName\");\n\n if (browserName.equalsIgnoreCase(\"chrome\")) {\n System.setProperty(\"webdriver.chrome.driver\", \"F:/LearningStuff/WebDrivers/chromedriver.exe\");\n driver = new ChromeDriver();\n\n } else if (browserName.equalsIgnoreCase(\"firefox\")) {\n System.setProperty(\"webdriver.gecko.driver\", \"\");\n driver = new FirefoxDriver();\n }\n\n driver.manage().window().maximize(); //maximize browser\n driver.manage().deleteAllCookies(); //clear cookies\n driver.manage().timeouts().pageLoadTimeout(TestUtil.PAGE_LOAD_TIMEOUT, TimeUnit.SECONDS); //waits for a page load\n driver.manage().timeouts().implicitlyWait(TestUtil.IMPLICIT_WAIT, TimeUnit.SECONDS); //waits for an element\n driver.get(properties.getProperty(\"url\")); //opens the url\n }", "public TeacherPage(WebDriver driver) {\n super(driver);\n }", "public AmazonHomePageFactory(WebDriver driver){\n\t\t\n\t\tPageFactory.initElements(driver, this);\n \n elementControl=new CommonElements();\n \n \n dropdownControl=new DropdownControl();\n \n \n\t}", "public ReviewBookingPage(WebDriver driver){\n\t\t\tthis.driver = driver;\n\t\t\telementUtil = new ElementUtil(this.driver);\n\t\t}", "public SpotifyPageOne( WebDriver driver )\n {\n this.driver = driver;\n PageFactory.initElements( driver, this );\n }", "public void open() {\n setWebDriver();\n }", "@SuppressWarnings(\"static-access\")\n\tpublic void setWebDriver(WebDriver driver) {\n\t\tthis.driver = driver;\n\t}", "protected WebDriver getDriver() {\n return Web.getDriver(Browser.CHROME, server.getURL() + \"TEST\", By.className(\"AuO\"));\n }", "@Before\n public void setWebDriver() throws IOException {\n System.setProperty(\"webdriver.chrome.driver\", DRIVER_PATH);\n ChromeOptions chromeOptions = new ChromeOptions();\n chromeOptions.addArguments(\"start-maximized\");\n driver = new ChromeDriver(chromeOptions);\n }", "public HomePage (WebDriver driver1)\r\n\t\t\t{\r\n\t\t\t\tPageFactory.initElements(driver1, this);\r\n\t\t\t}", "public ProfilePage(WebDriver driver) {\n super(driver);\n PageFactory.initElements(driver, this);\n }", "public WebDriver createWebDriver()\n {\n WebDriver result = null;\n \n LoggingHelper.LogInfo(getClass().getName(), \"Initializing the FirefoxDriver instance.\");\n try \n { \n result = new FirefoxDriver(); \n } \n catch(Exception e)\n {\n LoggingHelper.LogError(getClass().getName(), \"Cannot initialize the FirefoxDriver: %s\", e.toString());\n throw e;\n }\n \n LoggingHelper.LogVerbose(getClass().getName(), \"Succesfully initialized the FirefoxDriver instance.\"); \n return result;\n }", "public Driver()\n {\n // instantiate joysticks & controllers here.\n\n // bind button objects to physical buttons here.\n\n // bind buttons to commands here.\n\n }", "private static WebDriver driver() {\n\t\treturn null;\r\n\t}", "public QAPracticeFormTestNG(WebDriver driver) {\n this.driver = driver;\n this.wait = new WebDriverWait(driver,30);\n PageFactory.initElements(driver,this);\n }", "public BuscadorPage(WebDriver pDriver) {\r\n\t\tthis.aDriver = pDriver;\r\n\t\t//this.aDriver.manage().window().maximize();\r\n\t\taccessURL();\r\n\t}", "public Banner(WebDriver driver) {\r\n\t\tsuper(driver);\r\n\t}", "protected void construct()\n\t{\n\t\tassert(driver != null);\n\t\t// V�rification que l'on est bien sur la bonne page\n\t String sTitle = driver.getTitle();\n\t\tif(!sTitle.equals(TITLE)) {\n throw new IllegalStateException(\"This is not Login Page, current page is: \" +driver.getCurrentUrl());\n\t\t}\t\t\n\t\ttbUserName = driver.findElement(ByUserName);\n\t\ttbPassword = driver.findElement(ByPassword);\n\t\tbtnConnect = driver.findElement(ByConnect);\n\t}", "private void setWebdriver() throws Exception {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\n\t\t\t\tcurrentDir + fileSeparator + \"lib\" + fileSeparator + \"chromedriver.exe\");\n\t\tcapability = DesiredCapabilities.chrome();\n\t\tChromeOptions options = new ChromeOptions();\n\t\toptions.addArguments(\"--disable-extensions\");\n\t\toptions.addArguments(\"disable-infobars\");\n\t\tcapability.setCapability(ChromeOptions.CAPABILITY, options);\n\t\tdriver = new ChromeDriver(capability);\n\t\tdriver.manage().deleteAllCookies();\n\t\t_eventFiringDriver = new EventFiringWebDriver(driver);\n\t\t_eventFiringDriver.get(getUrl());\n\t\t_eventFiringDriver.manage().window().maximize();\n\n\t}", "private static void initialiseBrowser() {\n\t\tif (System.getProperty(\"proxyname\") != null) {\n\t\t\tFirefoxProfile profile = new FirefoxProfile();\n\t\t\tprofile.setPreference(\"network.proxy.type\", 1);\n\t\t\tprofile.setPreference(\"network.proxy.http\", System.getProperty(\"proxyname\"));\n\t\t\tprofile.setPreference(\"network.proxy.http_port\", 3128);\n\n\t\t\tdriver = new FirefoxDriver(profile);\n\t\t\tsetDriver(driver);\n\t\t}\n\t\telse{\n\t\t\tdriver = new FirefoxDriver();\n\t\t\tsetDriver(driver);\n\t\t}\n\t}", "public CalculationFamPO(WebDriver driver){\n\n this.driver = driver;\n PageFactory.initElements(driver, this);\n }", "public static void initialization()\r\n\t{\r\n\t\tString browserName = prop.getProperty(\"browser\");\r\n\t\tif(browserName.equalsIgnoreCase(\"chrome\"))\r\n\t\t{\r\n\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"src\\\\test\\\\resources\\\\chromedriver.exe\");\r\n\t\t\tdriver = new ChromeDriver();\r\n\t\t}\r\n\t\tdriver.manage().window().maximize();\r\n\t\tdriver.manage().timeouts().pageLoadTimeout(TestUtil.PAGE_LOAD_TIMEOUT, TimeUnit.SECONDS);\r\n\t\tdriver.manage().timeouts().implicitlyWait(TestUtil.PAGE_LOAD_TIMEOUT,TimeUnit.SECONDS);\r\n\t\tdriver.get(prop.getProperty(\"url\"));\r\n\t}", "public HomePage(WebDriver driver) {\n\t\tthis.driver= driver;\n\t\t\n\t\t//Initializing the webelements for this class\n\t\tPageFactory.initElements(driver, this);\n\t\t\n\t}", "public ContactsPage(WebDriver driver){\n\t\tthis.driver=driver;\n\t\telementAction=new ElementActions(this.driver);\n\t}" ]
[ "0.75262916", "0.73818785", "0.72721624", "0.72582823", "0.72486126", "0.72485757", "0.71461356", "0.71263057", "0.7042996", "0.69736767", "0.69716954", "0.6943052", "0.6933009", "0.6930859", "0.6876304", "0.6796572", "0.67641866", "0.67588985", "0.6721847", "0.6701314", "0.66813654", "0.66129375", "0.65968937", "0.6578159", "0.65642303", "0.6558552", "0.653814", "0.6507864", "0.6505013", "0.6504036", "0.6499007", "0.6493269", "0.64874005", "0.64828867", "0.6479765", "0.6479212", "0.6469657", "0.64584965", "0.64573354", "0.64355785", "0.6433845", "0.6432707", "0.6426945", "0.6424097", "0.6391078", "0.638752", "0.63799876", "0.63791436", "0.63713837", "0.6368115", "0.6365424", "0.63635564", "0.63547754", "0.63526434", "0.6342753", "0.63392377", "0.63375187", "0.63156104", "0.62943864", "0.6294251", "0.6293223", "0.62873894", "0.6263011", "0.62536895", "0.6250595", "0.6250091", "0.6246362", "0.6245739", "0.62449354", "0.62439865", "0.6201975", "0.61927044", "0.6180442", "0.61764187", "0.61704147", "0.61665285", "0.61450803", "0.6120932", "0.61135185", "0.61030996", "0.60973513", "0.6088835", "0.6082335", "0.6075711", "0.6059311", "0.6051544", "0.6049787", "0.6040526", "0.6030584", "0.60141295", "0.59985423", "0.5997442", "0.59859955", "0.5966371", "0.59661055", "0.5966074", "0.5964673", "0.5957207", "0.5952795", "0.5939562" ]
0.6546548
26
Wrapper to open pages in tests.
public static final <E extends Page> E open(String url, final Class<E> page) { log.info("Open page: " + url); WebDriver wd = WebDriverStorage.getDriver(); wd.get(url); final E result = PageFactory.initElements(wd, page); if (!wd.getCurrentUrl().contains(url)) { throw new RuntimeException("Expected url: " + url + "\nBut opened: " + wd.getCurrentUrl()); } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testRegularOpen() {\n openUrl();\n }", "@Override\n\tprotected void openPage(PageLocator arg0, Object... arg1) {\n\t\t\n\t}", "@Override\r\n\tprotected void openPage(PageLocator locator, Object... args) \r\n\t{\n\t\t\r\n\t}", "public interface TestPage<D> {\r\n\tpublic TestPage<D> getParent();\r\n\r\n\tpublic PageLocator getPageLocator();\r\n\r\n\t/***\r\n\t * This method check for existence of page in browser so we can proceed\r\n\t * further with page functionality.\r\n\t * \r\n\t * @param args\r\n\t * optional arguments required to identify page.\r\n\t * @return\r\n\t */\r\n\tpublic boolean isPageActive(PageLocator loc, Object... args);\r\n\r\n\t/**\r\n\t * selenium base instance to provide selenium\r\n\t * \r\n\t * @return\r\n\t */\r\n\tpublic UiTestBase<D> getTestBase();\r\n\r\n\t/**\r\n\t * Returns the body text of the current page\r\n\t * \r\n\t * @return\r\n\t */\r\n\tpublic String getText();\r\n\r\n\t/**\r\n\t * Use only launchPage method to load a page. For more usability you can\r\n\t * overload this method in your page class but make sure to call this method\r\n\t * within it to load page. eg:\r\n\t * \r\n\t * <pre>\r\n\t * <code>\r\n\t * void launchPage(){\r\n\t * \t\tlaunchPage(null)\r\n\t * }\r\n\t * OR\r\n\t * void launchPage(String locator){\r\n\t * \t\tlaunchPage(new DefaultPageLocator(locator));\r\n\t * }\r\n\t * </code>\r\n\t * </pre>\r\n\t * \r\n\t * @param locator\r\n\t * to locate page on parent page.\r\n\t * <p>\r\n\t * This locator will be passed to other fw methods for example\r\n\t * {@link #isPageActive(PageLocator, Object...)}\r\n\t * @param args\r\n\t * optional page identifiers to verify is this page for what we\r\n\t * aspect? for example: view details page for specific user or\r\n\t * item, you can identify page by user or item id/name\r\n\t * <p>\r\n\t * This args will be passed to other fw methods for example\r\n\t * {@link #isPageActive(PageLocator, Object...)}\r\n\t */\r\n\tpublic void launchPage(PageLocator locator, Object... args);\r\n\r\n\t/**\r\n\t * You can specify launch behavior before launching the page by calling this\r\n\t * method.\r\n\t * \r\n\t * @param strategy\r\n\t * launch strategy.\r\n\t */\r\n\tpublic void setLaunchStrategy(LaunchStrategy strategy);\r\n\r\n\tpublic enum LaunchStrategy {\r\n\t\t/**\r\n\t\t * To specify that even if the page is active, launch page form the\r\n\t\t * parent page.\r\n\t\t */\r\n\t\talwaysRelaunchFromParent,\r\n\t\t/**\r\n\t\t * To specify that even if the page or its parent page is active, launch\r\n\t\t * form the root by navigating entire hierarchy.\r\n\t\t */\r\n\t\talwaysRelaunchFromRoot,\r\n\t\t/**\r\n\t\t * To specify that launch the page if it is not active.\r\n\t\t */\r\n\t\tonlyIfRequired;\r\n\t}\r\n\r\n}", "@Test\n public void clickFaqLink() {\n homePage.clickAboutLink().clickFaqLink();\n }", "protected void openWebPage() {\n\t\tEseoTest.driver.get(Configuration.getString(\"website_address\"));\n\t\t//Assert.assertEquals(\"Web page title does not appear correct.\", Configuration.getString(\"login_title\"),\n\t\t\t//\tEseoTest.driver.getTitle());\t\t\n\t\tAssert.assertEquals(\"Browser title bar does not appear correct.\",Configuration.getString(\"homepage_title\"),EseoTest.driver.getTitle());\n\t\tAssert.assertEquals(\"Site title does not appear correct.\",Configuration.getString(\"blog_title\"),EseoTest.driver.findElement(By.tagName(\"h1\")).getText());\n\t\tAssert.assertEquals(\"Site description does not appear correct.\",Configuration.getString(\"blog_description\"),EseoTest.driver.findElement(By.tagName(\"p\")).getText());\n\t\tAssert.assertTrue(\"Log in item does not appear correct.\",EseoTest.driver.findElement(By.linkText(Configuration.getString(\"mainmenu_login_item\"))).isDisplayed());\n\t}", "@Test\n @When(\"I open URL\")\n public void s02_UrlOpen() {\n driver.get(urlHP);\n System.out.println(\"Step02 PASSED\");\n }", "@Test\n public void clickContactLink() {\n aboutPage.clickContactLink();\n }", "@Override\n\tprotected void openPage(PageLocator locator, Object... args) {\n\t\tget(\"/\");\n\t\tdriver.manage().window().maximize();\n\t\tdriver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\n\t}", "public ICurrentPage openNewWindow(String url);", "@Test\n public void clickResourceLink() {\n aboutPage.clickResourceLink();\n }", "public void testExamplePage() throws Exception\n\t{\n\t\tWebNavigator nav = new WebNavigator();\n\n\t\tnav.gotoUrl(BASE_URL);\n\t\tnav.bodyChildren().deep().id(\"randomLink\").activate();\n\n\t\t// Same as above, but the search for id \"randomLink\" starts at the page\n\t\t// level\n\t\tnav.gotoUrl(BASE_URL);\n\t\tnav.page().deep().id(\"randomLink\").activate();\n\n\t\t// Gets the first element whose id matches starts with \"random\" and\n\t\t// attempts to activate it.\n\t\t// Note that if we had, say, a BR tag earlier in the page that had an id\n\t\t// of \"randomBreak\",\n\t\t// the navigation would attempt to activate it and throw an exception.\n\t\tnav.gotoUrl(BASE_URL);\n\t\tnav.page().deep().pattern().id(\"random.*\").activate();\n\n\t\t// Search for the anchor by href. Here you assume that the href will\n\t\t// always be \"goRandom.html\".\n\t\tnav.gotoUrl(BASE_URL);\n\t\tnav.page().deep().href(\"goRandom.html\").activate();\n\n\t\t// Do a step-by-step navigation down the dom. This assumes a lot about\n\t\t// the page layout,\n\t\t// and makes for a very brittle navigation.\n\t\tnav.gotoUrl(BASE_URL);\n\t\tnav.bodyChildren().div().id(\"section1\").children().div().id(\"subsectionA\").children().a().activate();\n\n\t\t// Do a deep search for an anchor that contains the exact text \"Click\n\t\t// here to go a random location\"\n\t\tnav.gotoUrl(BASE_URL);\n\t\tnav.page().deep().a().text(\"Click here to go a random location\").activate();\n\n\t\t// Do a deep search for an anchor whose text contains \"random\" at any\n\t\t// point.\n\t\tnav.gotoUrl(BASE_URL);\n\t\tnav.page().deep().a().pattern().text(\".*random.*\").activate();\n\t}", "PageAgent getPage();", "@BeforeMethod\n public void beforeMethod() {\n loginPage = new LoginPage(driver);\n loginPage.open(); //open poker URL\n }", "@BeforeTest(alwaysRun = true)\n\tpublic void StartBrowser_NavURL() throws IOException {\n\t\t\n\t\tinitData();\n\n\t}", "@Test\n\tpublic void openGoogle(){\n\t\tSystem.out.println(\"Starting test \" + \n\t\t\t\tnew Object(){}.getClass().getEnclosingMethod().getName().toString());\n\t\tdriver.get(\"http://www.google.com\");\n\t\tSystem.out.println(\"Ending test \" + \n\t\t\t\tnew Object(){}.getClass().getEnclosingMethod().getName().toString());\n\t}", "@Given(\"the user opens the index page\")\r\n\tpublic final void givenTheUserOpensTheIndexPage() {\r\n\t\tgetHomePage(chromeDriver);\r\n\t\tgetHomePage(firefoxDriver);\r\n\t\tgetHomePage(internetExplorerDriver);\r\n\t}", "@Test(description = \"Open Page\")\n\tpublic void TC_03_OpenPageDynamic() {\n\t\tlog.info(\"TC_03_Open New Customer Page\");\n\t\tnewCustomerPage = (NewCustomerPageObject)homePageObject.openPageCustomizeDynamic(driver, AbstractPageUI.DYNAMIC_LINK, \"New Customer\");\n\t\tlog.info(\"TC_03_Verify New Customer Page is Display\");\n\t\tverifyTrue(newCustomerPage.isPageDisplayDynamic(driver, \"Add New Customer\"));\n\t\tlog.info(\"TC_03_Open New Account Page\");\n\t\tnewAccountPage = (NewAccountPageObject) newCustomerPage.openPageCustomizeDynamic(driver, AbstractPageUI.DYNAMIC_LINK, \"New Account\");\n\t\tlog.info(\"TC_03_Verify New Account Page is Display\");\n\t\tverifyTrue(newAccountPage.isPageDisplayDynamic(driver, \"Add new account form\"));\n\t\tlog.info(\"TC_03_Open Home Page\");\n\t\thomePageObject = (HomePageObject)newAccountPage.openPageCustomizeDynamic(driver, AbstractPageUI.DYNAMIC_LINK, \"Manager\");\n\t\tlog.info(\"TC_03_Verify Home Page is Display\");\n\t\tverifyTrue(homePageObject.isPageDisplayDynamic(driver,AbstractPageUI.DYNAMIC_VERIFY_MARQUEE_PAGE_TEXT ,\"Welcome To Manager's Page of Guru99 Bank\"));\n\t\t\n\t\t\n\t}", "public abstract void pageDisplayed();", "public void open() {\n setWebDriver();\n }", "@BeforeEach\n void setUp() throws Exception {\n context.currentPage(context.create().page(\"/content/unittest/de_test/brand/de/section/page\",\n DummyAppTemplate.CONTENT.getTemplatePath()));\n\n // create internal pages for unit tests\n targetPage = context.create().page(\"/content/unittest/de_test/brand/de/section/content\",\n DummyAppTemplate.CONTENT.getTemplatePath());\n context.create().page(\"/content/unittest/en_test/brand/en/section/content\",\n DummyAppTemplate.CONTENT.getTemplatePath());\n\n }", "@Test(priority=0) \r\n\tpublic void openApplication() { \r\n\t\tdriver.get(\"https://locator.chase.com/\");\r\n\t}", "@Test\n public void stage04_searchAndPage() {\n String keyWord = \"bilgisayar\";\n Integer pageNumber = 2;\n //Searching with parameters\n SearchKey searchKey = new SearchKey(driver);\n HomePage homePage = searchKey.search(keyWord, pageNumber);\n //Getting current url\n String currentUrl = homePage.getCurrentURL();\n //Testing if this is desired page\n assertEquals(currentUrl, \"https://www.gittigidiyor.com/arama/?k=bilgisayar&sf=2\");\n //logging\n if (currentUrl.equals(\"https://www.gittigidiyor.com/arama/?k=bilgisayar&sf=2\")) {\n logger.info(\"( stage02_testOpenLoginPage )Actual location : \" + currentUrl);\n } else {\n logger.error(\"( stage02_testOpenLoginPage )Actual location : \" + currentUrl);\n }\n }", "@Test\n\tpublic void testQueryPage() {\n\n\t}", "private static MockPageManager createPageManager()\r\n {\r\n return new MockPageManager();\r\n }", "@Override\n protected BasePage openPage() {\n return null;\n }", "@Test(priority = 5)\n public void openDifferentElementsPageTest() {\n driver.findElement(new By.ByLinkText(\"SERVICE\")).click();\n driver.findElement(By.xpath(\"//a[contains(text(),'Different elements')]\")).click();\n }", "public static final <E extends Page> E open(final Class<E> page) {\n\t\treturn open(getStaticUrl(page).get(), page);\n\t}", "@Test\n public void searchPageTest (){\n searchPage=new SearchPage();\n\n // loginPage.goToLoginPage();\n // loginPage.login();\n searchPage.searchKeysFromHeader(\"İphone\");\n searchPage.searchResultPage(\"İphone\");\n\n}", "private void openPage(String address)\n {\n String os = System.getProperty(\"os.name\").toLowerCase();\n \n if(os.contains(\"win\"))\n {\n if(Desktop.isDesktopSupported())\n {\n Desktop desktop = Desktop.getDesktop();\n if(desktop.isSupported(Desktop.Action.BROWSE))\n {\n try { desktop.browse(new URI(address)); }\n\n catch(IOException | URISyntaxException e)\n {\n JOptionPane.showMessageDialog(null, \"Could not open page\");\n }\n }\n }\n }\n \n else \n JOptionPane.showMessageDialog(null, \"Cannot open page, system is not supported\");\n }", "@Test(priority=3)\n\t\tpublic void HouseAccount_Method_OpenPage() throws Exception\n\t\t{\n\t\t\tdriver.get(Utility.getProperty(\"baseURL\")+Utility.getProperty(\"store_Id\")+\"houseAccount\");\n\t\t\tThread.sleep(5000);\n\t\t\t//Check House Account page opened or not\n\t\t\tif(driver.findElement(By.xpath(\"//a[.='HouseAccount']\")).getText().equalsIgnoreCase(\"HouseAccount\"))\n\t\t\t{\n\t\t\t\ttest.log(LogStatus.PASS,\"House Account page loaded Successfully\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\ttest.log(LogStatus.FAIL,\"House Account page loaded Failed\");\n\t\t\t}\n\t\t\t\n\t\t}", "@Given(\"^Open mmt home page$\")\n\tpublic void open_mmt_home_page() throws Throwable {\n\t loginPage = new LoginPage();\n\t}", "@Override\n public void establish() {\n logger.info(\"Opening page {}...\", pageObject);\n initializePage();\n pageObject.open();\n }", "@Test\n public void testSubFrames() {\n openSubFrames();\n }", "public boolean openDescriptionPagesInBrowser() {\r\n\t\tif (OSPRuntime.isJS)\r\n\t\t\treturn true;\r\n\t\tFile tempDir = extractResources();\r\n\t\tif (tempDir == null)\r\n\t\t\treturn false;\r\n\t\tboolean failed = false;\r\n\t\tfor (EditorAndScroll pane : descriptionPagesList) {\r\n\t\t\tHtmlPageInfo pageInfo = model._getHtmlPageInfo(pane.name, currentLocaleItem);\r\n\t\t\tif (pageInfo == null) {\r\n\t\t\t\tSystem.err.println(\"DescriptionPages : Could not find the page: \" + pane.name);\r\n\t\t\t\tfailed = true;\r\n\t\t\t}\r\n\t\t\tif (!openExternalBrowser(tempDir, pageInfo))\r\n\t\t\t\tfailed = true;\r\n\t\t}\r\n\t\treturn failed;\r\n\t}", "Page getPage();", "@BeforeClass\n public void GotoURL() {\n\t\tString URL = Base.GetDataFromPropertiesFile(\"url1\");\n\t\t// set implicit wt at page level\n\t\t\t\tdriver.manage().timeouts().implicitlyWait(300, TimeUnit.SECONDS);\n\t\tdriver.get(URL);\n\t\t\n\n\t \n }", "HtmlPage clickLink();", "public void openHomePage() {\n\t\tlogger.info(\"Opening Home Page\");\n\t\tdriver.get(ReadPropertyFile.getConfigPropertyVal(\"homePageURL\"));\n\t\t\n\t}", "@Test\r\n\tpublic void getSearchPage() throws IOException {\r\n\t\topen(\"https://www.google.com\");\r\n\t\tWebElement element = driver.findElement(By.name(\"q\"));\r\n\t\tassertNotNull(\"Testing driver works\", element);\r\n\t\tgenfilesMd();\r\n\t}", "@Test\n public void testGetPageFromURI() {\n System.out.println(\"getPageFromURI\");\n String requestURI = \"http://localhost:8084/BettingApp/pages/common/about.jsp\";\n String expResult = \"about\";\n String result = URIUtil.getPageFromURI(requestURI);\n assertEquals(expResult, result);\n }", "private CommonMethodsPage gotoCommonMethodsPage() throws Exception {\n\t\treturn new CommonMethodsPage(driver);\n\t}", "@Given(\"^I go to \\\"([^\\\"]*)\\\" on \\\"([^\\\"]*)\\\"$\") \n\tpublic void openWebPage(String url, String browser){\n\t\tString result = selenium.openBrowser(browser);\n\t\tAssert.assertEquals(selenium.result_pass, result);\n\t\tString result2 = selenium.navigate(url);\n\t\tAssert.assertEquals(selenium.result_pass, result2);\n\t}", "public HtmlPage clickContentPath();", "@BeforeTest\r\n\tpublic void operBrowser(){\n\t\td1=Driver.getBrowser();\r\n\t\tWebDriverCommonLib wlib=new WebDriverCommonLib();\r\n\t\td1.get(Constant.url);\r\n\t\twlib.maximizeBrowse();\r\n\t\twlib.WaitPageToLoad();\r\n\t}", "@Test\n public void selenium(){\n LandingPage landingPage = new LandingPage();\n landingPage.setDriver(driver);\n landingPage\n .assertTitle()\n .clickFindMeeting()\n .assertTitle()\n .search(\"10011\")\n .printFirstLocation()\n .printFirstDistance()\n .clickOnLocation()\n .assertLocationMatches()\n .printTodaysHours();\n }", "@Test(groups = { \"tree\" })\n\t\tpublic void testLoadViaGetURL() throws Exception {\n\t\t\t\tstartupTest(\"treeLoadViaGetURL.html\",null);\n\n\t\t\t\t//Verify the url\n\t\t\t\tString url = getBrowserUrl();\n\t\t\t\tlog(\"URL##########\"+ url);\n\n\t\t\t\t// Verify if the title of the page is correct\n\t\t\t\tverifyTitle(\"Incorrect page title;\", TITLE_GETURL);\n\t\t\t\tcheckPageContent(TITLE_GETURL);\n\n\t\t\t\tcommonLoadTestForJson();\n\n\n }", "@Test\r\n\tpublic void test_5_NavigatePage() throws InterruptedException {\n\t\tdriver.findElement(By.linkText(\"2\")).click();\r\n\t\tThread.sleep(3000);\r\n\t\t// get page title\r\n\t\tString pageTitle = driver.getTitle();\r\n\t\t// get current page number\r\n\t\tWebElement element = driver.findElement(By.xpath(\"//div[@id='pagn']/span[3]\"));\r\n\t\tString actualPageNumber = element.getText();\r\n\t\tString expectedPageNumber = \"2\";\r\n\t\tAssert.assertEquals(actualPageNumber, expectedPageNumber);\r\n\t\t// if the page title contains \"samsung\" then navigation is successful \r\n\t\tAssert.assertTrue(pageTitle.contains(\"Amazon.com: samsung\"));\r\n\t\tSystem.out.println(\"Page \" + actualPageNumber + \" is displayed\");\r\n\t}", "@Test //Index\n public void testPageNavigationAsUserIndex() {\n loginAsUser();\n\n vinyardApp.navigationCultureClick();\n final String expectedURL = \"http://localhost:8080/index\";\n final String result = driver.getCurrentUrl();\n assertEquals(expectedURL, result);\n }", "@Override\r\n\tpublic URLModule gotoPage(int page) {\n\t\treturn null;\r\n\t}", "private boolean openExternalBrowser(File _tmpDir, HtmlPageInfo _pageInfo) {\r\n\t\tString localPage = _pageInfo.getLink();\r\n\t\tif (localPage.startsWith(\"./\"))\r\n\t\t\tlocalPage = model._getClassModelDirectory() + localPage.substring(2);\r\n\t\tif (extractToDirectory(localPage, _tmpDir, false) == null)\r\n\t\t\treturn false;\r\n\t\tlocalPage = \"file:///\" + FileUtils.correctUrlString(FileUtils.getPath(_tmpDir) + localPage);\r\n\t\treturn org.opensourcephysics.desktop.OSPDesktop.displayURL(localPage);\r\n\t}", "@Test\n public void test001() {\n String login = \"admin\";\n String password = \"admin\";\n\n openBasicAuthPage(login, password);\n assertThatAuthenticated();\n\n }", "public void Open() {\r\n\t click();\r\n\t }", "@Test(priority = 1)\n\n public void test_Search_Appear_WikiLink() {\n\n resultsPage.clickWikiResult();\n\n // Go the next page\n// wikiPage = new WikiPage(driver);\n\n //Wait until QA Wikipedia page is loaded\n WebDriverWait wait = new WebDriverWait(driver, 10);\n wait.until(ExpectedConditions.elementToBeClickable(By.className(\"noprint\")));\n\n //Verify the URL is wiki URL\n String URL = driver.getCurrentUrl();\n Assert.assertEquals(URL, \"https://en.wikipedia.org/wiki/Quality_assurance\" );\n\n }", "@When(\"^the user open Automation Home page$\")\r\n\tpublic void the_user_open_Automation_Home_page() throws Throwable {\n\t w.Homepage1();\r\n\t}", "@BeforeTest //special type of testng method which alway run before.\r\n\t\t\tpublic void openBrowser() {\r\n\t\t\t\tWebDriverManager.chromedriver().setup();\r\n\t\t\t\tdriver = new ChromeDriver();\r\n\t\t\t\tdriver.get(\"https://locator.chase.com/\");\r\n\t\t\t}", "@Given(\"open landing page {string}\")\n public void openLandingPage(String string) {\n open(variables.URL);\n }", "@Test\n\tpublic void test02_PreviewAPage() {\n\t\tinfo(\"Test 2: Preview a page\");\n\t\t/*Step Number: 1\n\t\t*Step Name: Step 1: Open form to create new page\n\t\t*Step Description: \n\t\t\t- Choose path to add new page\n\t\t\t- Click [Add Page] --> [Blank Page]/[From Template...]\n\t\t*Input Data: \n\t\t\t\n\t\t*Expected Outcome: \n\t\t\tForm to create new page is shown and in the [Rich Text] editor*/\n\t\tinfo(\"Go to Add a Wiki page\");\n\t\tString title = txData.getContentByArrayTypeRandom(1)+getRandomNumber();\n\t\tString content = txData.getContentByArrayTypeRandom(1)+getRandomNumber();\n\t\thp.goToWiki();\n\t\twHome.goToAddBlankPage();\n\t\t\n\t\t/*Step Number: 2\n\t\t*Step Name: Step 2: Create new page\n\t\t*Step Description: \n\t\t\t- Put the title for this page\n\t\t\t- Put the content of page\n\n\t\t*Input Data: \n\t\t\t\n\t\t*Expected Outcome: \n\t\t\tAll fields are inputed with values*/\n\t\trichEditor.addSimplePage(title, content);\n\t\t\n\t\t/*Step Number: 3\n\t\t*Step Name: Step 3: Preview a page\n\t\t*Step Description: \n\t\t\t- Click on Preview \n\t\t*Input Data: \n\t\t\t\n\t\t*Expected Outcome: \n\t\t\tContent of page is shown*/\n\t\t\n\t\twikiMg.PreviewASimplePage(title, content);\n \t}", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void verifySubmitMeterReadingLandingPageLink()\t\n{\t\n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verify the link navigations of Submit meter read landing page\");\n\t\tnew SubmitMeterReadAction()\n\t\t.openSMRpage1()\n\t\t.verifySubmitMeterreadLandingPageNavigationLinks();\n}", "@Before\n public void setup() throws IOException {\n REQUEST_FILE_MAPPING.put(TEST_URL_PAGINATION_1, \"/pagination_1.html\");\n REQUEST_FILE_MAPPING.put(TEST_URL_PAGINATION_2, \"/pagination_2.html\");\n REQUEST_FILE_MAPPING.put(TEST_URL_PAGINATION_ABSENT, \"/pagination_3.html\");\n REQUEST_FILE_MAPPING.put(TEST_URL_AD_CONTENT_1, \"/ad_content_1.html\");\n\n\n JSoupDocumentRetriever jSoupDocumentRetriever = mock(JSoupDocumentRetriever.class);\n when(jSoupDocumentRetriever.getDocument(anyString())).thenAnswer(new Answer<Document>() {\n @Override\n public Document answer(InvocationOnMock invocation) throws Throwable {\n Object[] args = invocation.getArguments();\n String url = (String) args[0];\n\n return getDocument(REQUEST_FILE_MAPPING.get(url));\n }\n });\n\n when(jSoupDocumentRetriever.getDocument(anyString(), anyInt())).thenAnswer(new Answer<Document>() {\n @Override\n public Document answer(InvocationOnMock invocation) throws Throwable {\n Object[] args = invocation.getArguments();\n String url = (String) args[0];\n\n return getDocument(REQUEST_FILE_MAPPING.get(url));\n }\n });\n\n when(jSoupDocumentRetriever.getNumberedPage(anyString(), anyInt())).thenAnswer(new Answer<String>() {\n @Override\n public String answer(InvocationOnMock invocation) throws Throwable {\n Object[] args = invocation.getArguments();\n String url = (String) args[0];\n int pageNumber = (Integer) args[1];\n\n return new JSoupDocumentRetriever().getNumberedPage(url, pageNumber);\n }\n });\n\n imobiParser = new ImobiParser(jSoupDocumentRetriever);\n }", "@Override\n public void testRenderMyPage() {\n\n\tsetMockSupportedCarriers(dailyRhythmPortalService);\n\n\tEntitlementLookup entitlementLookup = EntitlementLookupFactory.getEntitlementLookup();\n\n\t// start and render the test page\n\tEntitlementLookupPage page = new EntitlementLookupPage(entitlementLookup, null, null);\n\ttester.startPage(page);\n\n\t// Check that the right page was rendered (no unexpected redirect or\n\t// intercept)\n\ttester.assertRenderedPage(EntitlementLookupPage.class);\n\ttester.assertNoErrorMessage();\n\n\tassertNavigation();\n }", "@Test (priority = 1, description=\"Navigates to the time doctor Login page\")\n\n\t\tpublic void browserCalling() throws IOException, InterruptedException\n\t\t{\n\t\t\tTDLoginPage();\n\t\t}", "public void openURL() throws Exception{\r\n\r\n\t try{\r\n\t driverUtil.trigger();\r\n\t reporter.reportTestStep(\"App Launch\", \"ok\", \"ok\", \"PASS\", false);\r\n\t }\r\n\t\t\r\n\tcatch(Exception e){\r\n\t\te.printStackTrace();\r\n\t}\r\n}", "@Test\n public void navigateForward() throws Exception {\n }", "@Override\n public void test(PageParam pageParam) {\n\n }", "@Then(\"^I should go to the next page$\")\n public void iShouldGoToTheNextPage() throws Throwable {\n driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n second = new SecondPage(driver);\n second.isPageOpened();\n driver.close();\n //throw new PendingException();\n }", "@Given(\"^the user Opens the opencart webpage$\")\r\n\tpublic void the_user_Opens_the_opencart_webpage() throws Throwable {\n\t r.web();\r\n\t}", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void verifyElectricityYourdetailsPageNavigationLink()\t\n{\t\n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verifies the Your details Electricity Page Navigation Links\");\n\n\t\tnew SubmitMeterReadAction()\n\t\t.openSMRpage(\"Electricity\")\t\t\n\t\t.verifyElectricNavigationLinks();\n\t\t\n}", "@Test\n public void testMotherLinkNavigation() {\n println(\"mother link navigation test\");\n assertTrue(\"Navigation failed\",\n mothersNavigationExercise());\n println();\n }", "void openInAppBrowser(String url, String title, String subtitle, int errorMsg);", "@Test\n public void testHomePage() throws Exception {\n }", "public static void openTrivia() { \n\t\tdriver.manage().window().setPosition(new Point(400,0));\n\t\tdriver.get(url);\n\t}", "public void openUrlInBrowser(String URL) {}", "private final void createAppPages() {\r\n\t\t//Instantiate Page objects that have no associated test properties\r\n\t\t//Note that if a test DOES need to specify test properties for one of these pages\r\n\t\t// (e.g., search terms), it can create its own local version of the page, and pass\r\n\t\t// the pagePropertiesFilenameKey argument, OR create it here, by calling createPage\r\n\t\t// instead of createStaticPage\r\n\r\n\t\t//Can also instantiate regular (i.e., with associated test properties) DD-specific\r\n\t\t// Page objects here, but typically it is best for the test or utility methods to do that;\r\n\t\t// if we do it here we may end up creating Page objects that never get used.\r\n }", "private IndexPage initializeTest() {\n Dimension dimension = new Dimension(1920, 1080);\n driver.manage().window().setSize(dimension);\n driver.get(baseUrl);\n indexPage = new IndexPage(driver);\n return indexPage;\n }", "public T _gotoPage(Class<? extends Page> pageClass)\n {\n tester.startPage(pageClass);\n return getBuilder();\n }", "Page createPage();", "HtmlPage clickSiteLink();", "private void openWebPage(String url) {\n Uri webpage = Uri.parse(url);\n Intent intent = new Intent(Intent.ACTION_VIEW, webpage);\n if (intent.resolveActivity(getActivity().getPackageManager()) != null) {\n startActivity(intent);\n }\n }", "@Test\n public void openLoginActivity() {\n }", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void verifyGasYourdetailsPageNavigationLink()\t\n{\t\n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verifies the Your details Gas Page Navigation Links\");\n\t\tnew SubmitMeterReadAction()\n\t\t.openSMRpage(\"Gas\")\t\t\n\t\t.verifyGasNavigationLinks();\n}", "@Given(\"^I am on the Home page$\")\n public void iAmOnTheHomePage() throws Throwable {\n home.isPageOpened();\n //throw new PendingException();\n }", "@Test\n public void urlTest() {\n // TODO: test url\n }", "@Test\r\n\tpublic void testScanePage_malformedLink() {\n\t}", "public void open(){\n driver.get(\"https://demoqa.com/slider\");\n }", "@Override\n public synchronized Response getApiExplorer(final UriInfo uriInfo) {\n return Response.seeOther(uriInfo.getBaseUriBuilder().path(\"../explorer/index.html\").build()).build();\n }", "@Given(\"^the url of the application under test$\")\r\n\tpublic void getUrl() throws Exception {\n\t\tdriver.get(url);\r\n\t}", "void openLink(Link target);", "@Test\n @Then(\"URL is opened\")\n public void s03_UrlCcheck() {\n currentUrlHP = driver.getCurrentUrl();\n Assert.assertEquals(urlHP, currentUrlHP);\n System.out.println(\"Step03 PASSED\");\n }", "@Given(\"^Open Book My Show Website$\")\r\n\tpublic void open_Book_My_Show_Website() {\n\t\twait=new WebDriverWait(driver, 20);\r\n\t\t driver.get(\"https://in.bookmyshow.com\");\r\n\t\t uimap = new UIMap(\"src//test//resources//locators.properties\");\r\n\t}", "@Override\r\n\tpublic void mypage() {\n\t\t\r\n\t}", "@BeforeMethod()\n public void setUp() throws URI.MalformedURIException, MalformedURLException, InterruptedException {\n driverManager.setUp();\n this.driver = driverManager.getDriver();\n MenuPage menuPage = new MenuPage(driver);\n menuPage.waitBtnMenu();\n }", "@Test\n public void getListingsPages_1() throws IOException {\n List<String> listingsPages = imobiParser.getListingPages(TEST_URL_PAGINATION_1);\n\n Assert.assertThat(listingsPages, notNullValue());\n Assert.assertThat(listingsPages.size(), is(10));\n Assert.assertThat(listingsPages, hasItem(is(TEST_URL_PAGINATION_1.replaceFirst(\"\\\\{pageNumber\\\\}\", String.valueOf(1)))));\n Assert.assertThat(listingsPages, hasItem(is(TEST_URL_PAGINATION_1.replaceFirst(\"\\\\{pageNumber\\\\}\", String.valueOf(5)))));\n Assert.assertThat(listingsPages, hasItem(is(TEST_URL_PAGINATION_1.replaceFirst(\"\\\\{pageNumber\\\\}\", String.valueOf(10)))));\n }", "@Given(\"open dev login page\")\n public void openDevLoginPage() {\n open(variables.URL_Login);\n }", "@Test\n public void readUrl() throws IOException {\n\n }", "@Test\n public void openMainActivity() {\n }", "@Test\n public void testLink() {\n try {\n Message email = emailUtils.getMessagesBySubject(\"You've received a document via HelloSign\", true, 5)[0];\n String link = emailUtils.getUrlsFromMessage(email, Data.mainUrl + \"/t\").get(0);\n\n driver.get(link);\n\n //TODO: continue testing\n } catch (Exception e) {\n e.printStackTrace();\n Assert.fail(e.getMessage());\n }\n }", "@Test\n @When(\"I navigate to Market\")\n public void s04_MarketOpen(){\n WebElement marketLink = driver.findElementByLinkText(\"Маркет\");\n marketLink.click();\n System.out.println(\"Step04 PASSED\");\n }", "boolean getUsePage();", "void openUrl (String url);" ]
[ "0.69010645", "0.67921484", "0.6714992", "0.6296569", "0.6237414", "0.607682", "0.60683686", "0.606623", "0.60536754", "0.5950383", "0.59331644", "0.5932362", "0.59070784", "0.5893632", "0.5873894", "0.586733", "0.5819968", "0.5805144", "0.5738264", "0.57318187", "0.5727439", "0.57200676", "0.56943053", "0.56893486", "0.5682465", "0.5667797", "0.5664479", "0.5646532", "0.5636028", "0.56200606", "0.5618128", "0.56097466", "0.5609173", "0.5603442", "0.5602408", "0.5602042", "0.55970126", "0.5582194", "0.5566842", "0.55541676", "0.554514", "0.55406564", "0.55188286", "0.55165553", "0.5501045", "0.549363", "0.54667157", "0.5461114", "0.5442585", "0.54359", "0.542451", "0.5417184", "0.5414517", "0.54113233", "0.53945225", "0.5386114", "0.5379148", "0.53734577", "0.5372862", "0.5370837", "0.53694755", "0.5344043", "0.5343472", "0.53360164", "0.5335837", "0.53349924", "0.5334096", "0.53314465", "0.53238285", "0.5313642", "0.53106374", "0.53096914", "0.5308336", "0.53057855", "0.53001904", "0.52939606", "0.5291624", "0.52903247", "0.52730936", "0.52694017", "0.5262204", "0.52389485", "0.5213558", "0.52087265", "0.52048075", "0.519624", "0.51935905", "0.51924545", "0.5182868", "0.5182353", "0.5182122", "0.5181766", "0.518002", "0.51777196", "0.517394", "0.5173004", "0.5170748", "0.5169265", "0.5157353", "0.51560384" ]
0.5672283
25
Allows to open pages that have URL static field in PageObject.class
public static final <E extends Page> E open(final Class<E> page) { return open(getStaticUrl(page).get(), page); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tprotected void openPage(PageLocator arg0, Object... arg1) {\n\t\t\n\t}", "@Override\r\n\tprotected void openPage(PageLocator locator, Object... args) \r\n\t{\n\t\t\r\n\t}", "public ICurrentPage openNewWindow(String url);", "public Object navigate(Class<? extends Page> pageObject) {\n\n Page page;\n\n try {\n page = pageObject.getConstructor(WebDriver.class).newInstance(driver.get());\n driver.get().navigate().to(page.getURL());\n//\t\t\tdriver.get().navigate().to(System.getProperty(\"APPLICATION_URL\"));\n return page;\n\n } catch (InstantiationException e) {\n LOGGER.log(Level.SEVERE,\n \"ERROR loading pageObject\", e);\n return null;\n } catch (IllegalAccessException e) {\n LOGGER.log(Level.SEVERE,\n \"ERROR loading pageObject\", e);\n return null;\n } catch (IllegalArgumentException e) {\n LOGGER.log(Level.SEVERE,\n \"ERROR loading pageObject\", e);\n return null;\n } catch (InvocationTargetException\n e) {\n LOGGER.log(Level.SEVERE,\n \"ERROR loading pageObject\", e);\n return null;\n } catch (NoSuchMethodException e) {\n LOGGER.log(Level.SEVERE,\n \"ERROR loading pageObject\", e);\n return null;\n } catch (SecurityException e) {\n LOGGER.log(Level.SEVERE,\n \"ERROR loading pageObject\", e);\n return null;\n }\n }", "public static final <E extends Page> E open(String url, final Class<E> page) {\n\t\tlog.info(\"Open page: \" + url);\n\t\tWebDriver wd = WebDriverStorage.getDriver();\n\t\twd.get(url);\n\t\tfinal E result = PageFactory.initElements(wd, page);\n\t\tif (!wd.getCurrentUrl().contains(url)) {\n\t\t\tthrow new RuntimeException(\"Expected url: \" + url + \"\\nBut opened: \" + wd.getCurrentUrl());\n\t\t}\n\t\treturn result;\n\t}", "String urlFor(Class<? extends Page> pageClazz, PageParameters params);", "Builder addMainEntityOfPage(URL value);", "@Override\n protected BasePage openPage() {\n return null;\n }", "Page getPage();", "HtmlPage clickSiteLink();", "public void testStaticPageAccessible() throws Exception {\n assertEquals(0, rootBlog.getStaticPages().size());\n BlogEntry draft = rootBlog.getBlogForToday().createBlogEntry();\n draft.setType(BlogEntry.STATIC_PAGE);\n draft.store();\n assertEquals(1, rootBlog.getStaticPages().size());\n assertEquals(draft, rootBlog.getStaticPage(draft.getId()));\n }", "@Override\r\n\tpublic URLModule gotoPage(int page) {\n\t\treturn null;\r\n\t}", "public void setPage(Page page) {this.page = page;}", "PagesAddress(String url) {\n applicationUrl = url;\n }", "private void viewPageClicked(ActionEvent event) {\n\n Item tempItem = new Item();\n String itemURL = tempItem.itemURL;\n Desktop dk = Desktop.getDesktop();\n try{\n dk.browse(new java.net.URI(itemURL));\n }catch(IOException | URISyntaxException e){\n System.out.println(\"The URL on file is invalid.\");\n }\n\n showMessage(\"Visiting Item Web Page\");\n\n }", "public abstract void pageDisplayed();", "HtmlPage clickLink();", "@Override\n public void establish() {\n logger.info(\"Opening page {}...\", pageObject);\n initializePage();\n pageObject.open();\n }", "PageAgent getPage();", "private void openWebPage(String url) {\n Uri webpage = Uri.parse(url);\n Intent intent = new Intent(Intent.ACTION_VIEW, webpage);\n if (intent.resolveActivity(getActivity().getPackageManager()) != null) {\n startActivity(intent);\n }\n }", "@Override\n public void visit(Page page) {\n\t visitObject.visitUrls(page);\n\t String url = page.getWebURL().getURL();\n\t System.out.println(\"URL: \" + url);\n\t if (page.getParseData() instanceof HtmlParseData) {\n\t\t HtmlParseData htmlParseData = (HtmlParseData) page.getParseData();\n\t\t String text = htmlParseData.getText();\n\t\t String html = htmlParseData.getHtml();\n\t\t Set<WebURL> links = htmlParseData.getOutgoingUrls();\n\t\t System.out.println(\"Text length: \" + text.length());\n\t\t System.out.println(\"Html length: \" + html.length());\n\t\t System.out.println(\"Number of outgoing links: \" + links.size());\n\t\t }\n }", "public void openUrlInBrowser(String URL) {}", "public void setURLObject(URL url) {\n\t\tthis.url = url;\n\t}", "@Test(description = \"Open Page\")\n\tpublic void TC_03_OpenPageDynamic() {\n\t\tlog.info(\"TC_03_Open New Customer Page\");\n\t\tnewCustomerPage = (NewCustomerPageObject)homePageObject.openPageCustomizeDynamic(driver, AbstractPageUI.DYNAMIC_LINK, \"New Customer\");\n\t\tlog.info(\"TC_03_Verify New Customer Page is Display\");\n\t\tverifyTrue(newCustomerPage.isPageDisplayDynamic(driver, \"Add New Customer\"));\n\t\tlog.info(\"TC_03_Open New Account Page\");\n\t\tnewAccountPage = (NewAccountPageObject) newCustomerPage.openPageCustomizeDynamic(driver, AbstractPageUI.DYNAMIC_LINK, \"New Account\");\n\t\tlog.info(\"TC_03_Verify New Account Page is Display\");\n\t\tverifyTrue(newAccountPage.isPageDisplayDynamic(driver, \"Add new account form\"));\n\t\tlog.info(\"TC_03_Open Home Page\");\n\t\thomePageObject = (HomePageObject)newAccountPage.openPageCustomizeDynamic(driver, AbstractPageUI.DYNAMIC_LINK, \"Manager\");\n\t\tlog.info(\"TC_03_Verify Home Page is Display\");\n\t\tverifyTrue(homePageObject.isPageDisplayDynamic(driver,AbstractPageUI.DYNAMIC_VERIFY_MARQUEE_PAGE_TEXT ,\"Welcome To Manager's Page of Guru99 Bank\"));\n\t\t\n\t\t\n\t}", "public abstract Page value();", "Page createPage();", "public abstract void addCustomPages();", "public Page getPage() {return page;}", "private void pageContent( String url) {\n\t\t\n\t\tif ( !url.matches(URL)) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tList<String> outlinks = null; // out link urls\n\t\tUrlBean bean = null; // basic info of the url\n\t\t\n\t\tbean = new UrlBean();\n\t\ttry {\n\t\t\t\n\t\t\tconn = Jsoup.connect(url).timeout(5000);\n\t\t\tif ( conn == null) {\n\t\t\t\treturn ;\n\t\t\t}\n\t\t\t\n\t\t\tdocument = conn.get(); // 得到网页源代码,超时时间是5秒\n\t\t\t\n\t\t\t/*\n\t\t\t * 文章基本信息\n\t\t\t */\n\t\t\telements = document.getElementsByTag(\"title\");\n\t\t\tif ( elements!= null && elements.size() != 0) {\n\t\t\t\telement = elements.get(0);\n\t\t\t}\n\t\t\tString title = element.text();\n\t\t\tbean.setTitle(title);\n\t\t\tbean.setKeywords(title);\n\t\t\t\n\t\t\telements = document.getElementsByTag(\"a\");\n\t\t\tif ( elements != null) {\n\t\t\t\tString linkUrl = null;\n\t\t\t\toutlinks = new ArrayList<String>();\n\t\t\t\tfor ( int i = 0; i < elements.size(); i++) {\n\t\t\t\t\tlinkUrl = elements.get(i).attr(\"href\");\n\t\t\t\t\tif ( linkUrl.matches(URL)) {\n\t\t\t\t\t\toutlinks.add(linkUrl);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn;\n\t\t} \n\t\t\n\t\tbean.setUrl(url);\n\t\tbean.setId(urlId++);\n\t\tbean.setRank(1);\n\t\tif ( outlinks != null) {\n\t\t\tint count = outlinks.size();\n\t\t\tbean.setOutlinks(count);\n\t\t\tfor ( int i = 0; i < count; i++) {\n\t\t\t\turlsSet.add(outlinks.get(i));\n\t\t\t}\n\t\t\tif ( new AllInterface().addOneUrlInfo(bean, outlinks)) {\n\t\t\t\tSystem.out.println(\"Add to database successfully, url is '\" + url + \"'.\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Fail to add to database, maybe url exists. Url is '\" + url + \"'.\");\n\t\t\t}\n\t\t\tSystem.out.println(\"[\" + count + \" urls remain...]\");\n\t\t\tSystem.out.println();\n\t\t} else {\n\t\t\tSystem.out.println(\"Error occurs in crawl, url is '\" + url + \"'.\");\n\t\t\tSystem.out.println(\"[[FINISHED]]\");\n\t\t\tSystem.out.println();\n\t\t}\n\t\t\n\t}", "public T caseURL(URL object)\n {\n return null;\n }", "public void openPage(final String webUrl) {\n openPageByUrlAndAssert(webUrl, PublicWebHelper.Page.PAGE_URI);\n }", "public URL getURLObject() {\n\t\treturn url;\n\t}", "public abstract String getURL();", "public void openWebPage(String url) {\n Intent intent= new Intent(Intent.ACTION_VIEW, Uri.parse(url));\n startActivity(intent);\n }", "@Override\n\tprotected void openPage(PageLocator locator, Object... args) {\n\t\tget(\"/\");\n\t\tdriver.manage().window().maximize();\n\t\tdriver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\n\t}", "public HtmlPage clickContentPath();", "public void clickDynamicPage() {\n driver.get(\"https://\"+B1MainClass.site);\n driver.findElement(dynamicPage).click();\n }", "public HomeSection enterUrl(){\r\n\t\tGlobal.driver.get(CONSTANT.proUrl);\r\n\t\treturn new HomeSection();\r\n\t}", "public String getPageUrl() {\n return pageUrl;\n }", "@BeforeClass\n public void GotoURL() {\n\t\tString URL = Base.GetDataFromPropertiesFile(\"url1\");\n\t\t// set implicit wt at page level\n\t\t\t\tdriver.manage().timeouts().implicitlyWait(300, TimeUnit.SECONDS);\n\t\tdriver.get(URL);\n\t\t\n\n\t \n }", "public void openHomePage() {\n\t\tlogger.info(\"Opening Home Page\");\n\t\tdriver.get(ReadPropertyFile.getConfigPropertyVal(\"homePageURL\"));\n\t\t\n\t}", "public LandingPage navigateToMainPage() {\n open(PropertiesReader.getProperty(\"URL\"));\n return this;\n }", "void openUrl (String url);", "@Given(\"open landing page {string}\")\n public void openLandingPage(String string) {\n open(variables.URL);\n }", "public T _gotoPage(Class<? extends Page> pageClass)\n {\n tester.startPage(pageClass);\n return getBuilder();\n }", "private void openWebPage(String url) {\n Uri webpage = Uri.parse(\"http://\" + url);\n Intent intent = new Intent(Intent.ACTION_VIEW, webpage);\n if (intent.resolveActivity(getPackageManager()) != null) {\n startActivity(intent);\n }\n }", "CartogramWizardShowURL (String url)\n\t{\n\t\tmUrl = url;\n\t\n\t}", "public OnPageFact(Class<? extends PageObject> pageObjectClass) {\n if (pageObjectClass == null) {\n throw new NullPointerException(\"You must specify a valid page object class.\");\n }\n this.pageObjectClass = pageObjectClass;\n }", "public abstract String getUrl();", "boolean getUsePage();", "@Override\r\n public String toString()\r\n {\r\n return \"Page \"+name;\r\n }", "@Override\r\n\tpublic void mypage() {\n\t\t\r\n\t}", "protected void openWebPage() {\n\t\tEseoTest.driver.get(Configuration.getString(\"website_address\"));\n\t\t//Assert.assertEquals(\"Web page title does not appear correct.\", Configuration.getString(\"login_title\"),\n\t\t\t//\tEseoTest.driver.getTitle());\t\t\n\t\tAssert.assertEquals(\"Browser title bar does not appear correct.\",Configuration.getString(\"homepage_title\"),EseoTest.driver.getTitle());\n\t\tAssert.assertEquals(\"Site title does not appear correct.\",Configuration.getString(\"blog_title\"),EseoTest.driver.findElement(By.tagName(\"h1\")).getText());\n\t\tAssert.assertEquals(\"Site description does not appear correct.\",Configuration.getString(\"blog_description\"),EseoTest.driver.findElement(By.tagName(\"p\")).getText());\n\t\tAssert.assertTrue(\"Log in item does not appear correct.\",EseoTest.driver.findElement(By.linkText(Configuration.getString(\"mainmenu_login_item\"))).isDisplayed());\n\t}", "public HomePageActions() {\n\t\tPageFactory.initElements(driver,HomePageObjects.class);\n\t}", "protected abstract String getUrl();", "public Page navigate(String URL) {\n driver.get().navigate().to(URL);\n\n return new Page(driver.get());\n }", "HtmlPage clickSiteName();", "public boolean isSetPageUrl() {\n return this.pageUrl != null;\n }", "public String getPageUrl() {\n\t\treturn pageUrl;\n\t}", "private void openPage(String address)\n {\n String os = System.getProperty(\"os.name\").toLowerCase();\n \n if(os.contains(\"win\"))\n {\n if(Desktop.isDesktopSupported())\n {\n Desktop desktop = Desktop.getDesktop();\n if(desktop.isSupported(Desktop.Action.BROWSE))\n {\n try { desktop.browse(new URI(address)); }\n\n catch(IOException | URISyntaxException e)\n {\n JOptionPane.showMessageDialog(null, \"Could not open page\");\n }\n }\n }\n }\n \n else \n JOptionPane.showMessageDialog(null, \"Cannot open page, system is not supported\");\n }", "@Test\n public void clickResourceLink() {\n aboutPage.clickResourceLink();\n }", "public String getURL();", "public void setURL(String url);", "public PageList() { \n// fileIO = new CharFileIO(\"utf-8\");\n// We are not currently using this to extract 'title' because it doesn't work \n// for whose title and meta-description tags are not explicitly specified;\n// Such as pages written in scripting languages like .jsp, .asp etc \n// parseJob = new ParseJob();\n }", "public Object getObjectInstance(Object obj, Name name, Context ctx, Hashtable environment) throws Exception {\r\n//\t\tContext ctx = getInitialContext(environment);\r\n\t\tReference ref = (Reference)obj;\r\n\t\tString url_string = (String)ref.get(\"URL\").getContent();\r\n\t\tURL url = new URL(url_string);\r\n\t\treturn url.getContent();\r\n }", "private String fetchUrl() {\n\t\tString url;\n\t\tint depth;\n\t\tdo\n\t\t{\n\t\t\tLandingPage lp = this.pagesToVisit.remove(0);\n\t\t\turl = lp.getUrl();\n\t\t\tdepth = lp.getDepth();\n\t\t\t\n\t\t}while(this.pagesVisited.containsKey(url) || !(isvalidURL(url)));\n\t\tthis.pagesVisited.put(url,depth);\n\t\treturn url;\n\t}", "Pages getPages();", "@Override\n public Page extractPage(String link) {\n\n return new Page(link, extract(link));\n }", "boolean canHandlePageClass(Class<? extends Page> pageClazz, PageParameters pageParameters);", "protected void addUrlPropertyDescriptor(Object object) {\n itemPropertyDescriptors.add\n (createItemPropertyDescriptor\n (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),\n getResourceLocator(),\n getString(\"_UI_ProceedingsType_url_feature\"),\n getString(\"_UI_PropertyDescriptor_description\", \"_UI_ProceedingsType_url_feature\", \"_UI_ProceedingsType_type\"),\n BibtexmlPackage.Literals.PROCEEDINGS_TYPE__URL,\n true,\n false,\n false,\n ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,\n null,\n null));\n }", "public PageTransporter() {\n System.out.println(ReadProperties.getInstance().getUrl());\n driver.get(ReadProperties.getInstance().getUrl());\n }", "public void setUrl(String url);", "public void setUrl(String url);", "public interface FacebookLinkHandler{\n public void openFacebookPage(String facebookAppURI, String facebookWebURL);\n public void openInstagramPage(String instagramAppURI, String instagramWebURL);\n}", "static BasePage getPageInstance(String page_name,HttpServletRequest request,\n HttpServletResponse response,HttpServlet servlet){\n HttpSession session = request.getSession();\n BasePage page = (BasePage)session.getAttribute(page_name);\n if(page == null){\n page = (BasePage)createInstance(page_name);\n session.setAttribute(page_name,page);\n if(page == null)\n System.err.println(\"Could not create \" + page_name);\n } //if\n page.request = request;\n page.session = session;\n page.servlet = servlet;\n if(!page.$isLoaded())\n page.fillDom();\n return page;\n}", "private void goToUrl (String url) {\n Intent launchWebview = new Intent(this, ManualWebviewActivity.class);\n launchWebview.putExtra(\"url\", url);\n startActivity(launchWebview);\n }", "public interface PageConnector {\n void onLastPage();\n void onNormalPage();\n}", "public void setPageUrl(String pageUrl) {\n this.pageUrl = pageUrl;\n }", "private void loadURLRequest() {\n if (news.getUrl() != null) {\n Intent loadNews = new Intent(itemView.getContext(), WebViewActivity.class);\n loadNews.putExtra(\"URL\", news.getUrl());\n loadNews.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n itemView.getContext().startActivity(loadNews);\n }\n }", "public interface BrowserService {\n\n void openLink(String url);\n}", "protected abstract Content getClassLink(LinkInfo linkInfo);", "@Override\n public void onOpenWebsite(@Nullable String url) {\n if (url == null) return;\n Log.d(TAG, \"onOpenWebsite: Url:\" + url);\n\n Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));\n if (intent.resolveActivity(getPackageManager()) != null) {\n startActivity(intent);\n }\n }", "public String getWebPageURL()\n\t{\n\t\treturn webPageURL;\n\t}", "@Test(groups = { \"tree\" })\n\t\tpublic void testLoadViaGetURL() throws Exception {\n\t\t\t\tstartupTest(\"treeLoadViaGetURL.html\",null);\n\n\t\t\t\t//Verify the url\n\t\t\t\tString url = getBrowserUrl();\n\t\t\t\tlog(\"URL##########\"+ url);\n\n\t\t\t\t// Verify if the title of the page is correct\n\t\t\t\tverifyTitle(\"Incorrect page title;\", TITLE_GETURL);\n\t\t\t\tcheckPageContent(TITLE_GETURL);\n\n\t\t\t\tcommonLoadTestForJson();\n\n\n }", "public void openmrsdemo() {\n\t\tutil.geturl(prop.getValue(\"locators.url\"));\n\t\tlogreport.info(\"Url loaded\");\n\t\tutil.maximize();\n\t}", "public String getLink();", "public StaticRoute(int objectID, String name) {\n super(objectID, name);\n }", "public void setURL(String _url) { url = _url; }", "public void setPage(Page page) {\n this.page=page;\n }", "public void setPage(Page page) {\n this.page=page;\n }", "public FilingDetailPage(URL url) {\n try (final WebClient webClient = new WebClient()) {\n filing13FPage = webClient.getPage(url);\n System.out.println(filing13FPage);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public String openPHPTravels() {\r\n\t\tString URL = CommonProperty.getProperty(\"url\" + PropertyManager.getProperty(\"zone\").toUpperCase());\r\n\t\tLog.info(\"\");\r\n\t\tLog.info(\"Opening URL : \" + URL);\r\n\t\tdriver.navigate().to(URL);\r\n\t\tString title = driver.getTitle();\r\n\t\tLog.info(title);\r\n\t\treturn URL;\r\n\t}", "public String getURL() { return url; }", "@Override\r\n\tpublic void getUrl() {\n\r\n\t}", "@Override\n public void onItemClick(String url) {\n RxBus2.getInstance().post(Constants.SHOW_WEBVIEW, url);\n RxBus3.getInstance().post(Constants.SHOW_WEBVIEW, url);\n }", "protected void WebClicked(View view){\n String url = this.itm.getItem(position).getUrl();\n if (!url.startsWith(\"http://\") && !url.startsWith(\"https://\"))\n url = \"http://\" + url;\n Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));\n try {\n startActivity(browserIntent);\n } catch (ActivityNotFoundException e){\n Toast.makeText(getBaseContext(), \"Webpage \" + url + \"does not exist\", Toast.LENGTH_SHORT).show();\n }\n }", "public boolean isPageActive(PageLocator loc, Object... args);", "@Test\r\n\tpublic void testScanePage_malformedLink() {\n\t}", "@Test(priority = 1)\n public void testIsPageLoad() throws MalformedURLException {\n\t\tassertTrue(true);\n }", "protected void goTo(String url) {\n \t\tcontext.goTo(url);\n \t}" ]
[ "0.6540353", "0.6419497", "0.6179777", "0.59741056", "0.592116", "0.59149235", "0.58629715", "0.57745343", "0.5752714", "0.57449883", "0.56971145", "0.5674129", "0.56550443", "0.56513774", "0.5634197", "0.56180793", "0.55975217", "0.55710465", "0.5552887", "0.54639757", "0.54567987", "0.54553306", "0.54552853", "0.54426503", "0.54023504", "0.5370404", "0.5366544", "0.5365958", "0.536533", "0.5339622", "0.53180647", "0.52975726", "0.52969706", "0.5283646", "0.5276554", "0.52541625", "0.5229708", "0.5227152", "0.52227324", "0.5215615", "0.52081573", "0.520246", "0.520174", "0.5187993", "0.518039", "0.5176701", "0.5176149", "0.5168751", "0.5165424", "0.5155148", "0.5153008", "0.51483506", "0.5145519", "0.5142071", "0.51354295", "0.51344746", "0.5132653", "0.5117956", "0.5117549", "0.5108256", "0.50985277", "0.509696", "0.50870234", "0.50860673", "0.50680333", "0.5064631", "0.505495", "0.5050218", "0.50493765", "0.5047601", "0.50447774", "0.50411713", "0.50411713", "0.50342554", "0.5031657", "0.50239927", "0.50191694", "0.5018541", "0.500974", "0.5007069", "0.4999182", "0.4996755", "0.49940622", "0.49923614", "0.49879187", "0.49785596", "0.49745217", "0.49726787", "0.49655417", "0.49655417", "0.49653494", "0.49583623", "0.49543297", "0.49454737", "0.49369982", "0.49318853", "0.4928899", "0.49224678", "0.49174726", "0.4916872" ]
0.6389967
2
Method to take current page screenshot.
public final File takeScreenshot() { return ((TakesScreenshot) this.webDriver).getScreenshotAs(OutputType.FILE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void takesScreenshot();", "private void screenshot() {\n final JComponent active = this.active;\n if (active != null && active.isValid()) {\n final BufferedImage image = new BufferedImage(active.getWidth(), active.getHeight(), BufferedImage.TYPE_INT_RGB);\n final Graphics2D handler = image.createGraphics();\n active.print(handler);\n handler.dispose();\n File file = new File(Preferences.userNodeForPackage(DesktopPane.class).get(SCREENSHOT_DIRECTORY_PREFS, \".\"));\n file = new File(file, getTitle(active.getClass()) + \".png\");\n try {\n assertTrue(ImageIO.write(image, \"png\", file));\n file = file.getParentFile();\n Desktop.getDesktop().open(file);\n } catch (IOException e) {\n JOptionPane.showInternalMessageDialog(active, e.getLocalizedMessage(),\n e.getClass().getSimpleName(), JOptionPane.ERROR_MESSAGE);\n }\n } else {\n JOptionPane.showInternalMessageDialog(this, \"No active window.\", \"Screenshot\", JOptionPane.WARNING_MESSAGE);\n }\n }", "public void screenshot() {\n\t\tRemoteWebDriver rwd = ((RemoteWebDriver) web.driver);\r\n\t\ttry {\r\n\t\t\trwd.getCommandExecutor().execute(new Command(rwd.getSessionId(), DriverCommand.ELEMENT_SCREENSHOT));\r\n\t\t} catch (IOException e) {\r\n\t\t\tlogger.reportStackTrace(e);\r\n\t\t}\r\n\r\n\t}", "public void takeScreenShot(){\n\t\tDate d=new Date();\r\n\t\tString screenshotFile=d.toString().replace(\":\", \"_\").replace(\" \", \"_\")+\".png\";\r\n\t\t// store screenshot in that file\r\n\t\tFile scrFile = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);\r\n\t\ttry {\r\n\t\t\tFileUtils.copyFile(scrFile, new File(System.getProperty(\"user.dir\")+\"//screenshots//\"+screenshotFile));\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catcsh block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t//put screenshot file in reports\r\n\t\ttest.log(LogStatus.INFO,\"Screenshot-> \"+ test.addScreenCapture(System.getProperty(\"user.dir\")+\"//screenshots//\"+screenshotFile));\r\n\t\t\r\n\t}", "public static Screenshot takeScreenShot() {\n\t\tScreenshot screenshot = new AShot().shootingStrategy(ShootingStrategies.viewportPasting(1000))\n\t\t\t\t.takeScreenshot(driver);\n\t\treturn screenshot;\n\t}", "public void takeScreenShot();", "public Bitmap makeScreenshot() {\n renderer.setScreenshot();\n requestRender();\n return renderer.getLastScreenshot();\n }", "@Override\n public void capture() {\n captureScreen();\n }", "private void takeScreenshot()\n\t\t{\n\t\t\tint width = getWidth();\n\t\t\tint height = getHeight();\n\t\t\tint capacity = width * height;\n\t\t\tint[] dataArray = new int[capacity];\n\t\t\tIntBuffer dataBuffer = IntBuffer.allocate(capacity);\n\t\t\tGLES20.glReadPixels(0, 0, width, height, GLES20.GL_RGBA, GLES20.GL_UNSIGNED_BYTE, dataBuffer);\n\t\t\tint[] dataArrayTemp = dataBuffer.array();\n\n\t\t\t// Flip the mirrored image.\n\t\t\tfor (int y = 0; y < height; y++)\n\t\t\t{\n\t\t\t\tSystem.arraycopy(dataArrayTemp, y * width, dataArray, (height - y - 1) * width, width);\n\t\t\t}\n\n\t\t\tBitmap screenshot = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);\n\t\t\tscreenshot.copyPixelsFromBuffer(IntBuffer.wrap(dataArray));\n\t\t\tBitmap thumbnail = Bitmap.createScaledBitmap(screenshot, width / THUMBNAIL_SHRINKING_FACTOR, height / THUMBNAIL_SHRINKING_FACTOR, true);\n\t\t\tproject.getSheetAt(screenshotSheetIndex).saveThumbnail(thumbnail);\n\t\t\tBitmapDrawable thumbnailDrawable = new BitmapDrawable(getResources(), thumbnail);\n\t\t\tproject.getSheetAt(screenshotSheetIndex).setThumbnail(thumbnailDrawable);\n\n\t\t\t// Refresh the sheet panel if the user is not requesting an exit.\n\t\t\tif (activity.taskRequested != NotepadActivity.TASK_EXIT)\n\t\t\t{\n\t\t\t\tactivity.refreshSheetDrawerAfterGeneratingThumbnail();\n\t\t\t}\n\n\t\t\t// The project thumbnail should be twice the width and height of a sheet thumbnail.\n\t\t\tBitmap projectThumbnail = Bitmap.createScaledBitmap(\n\t\t\t\t\tscreenshot, (width * 2) / THUMBNAIL_SHRINKING_FACTOR, (height * 2) / THUMBNAIL_SHRINKING_FACTOR, true);\n\t\t\tproject.saveThumbnail(projectThumbnail);\n\n\t\t\tif (activity.taskRequested > 0)\n\t\t\t{\n\t\t\t\tpost(new Runnable()\n\t\t\t\t{\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run()\n\t\t\t\t\t{\n\t\t\t\t\t\tactivity.performTask();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}", "public void getScreenshot() {\n String screenshotPath = System.getProperty(\"TEST_RESULTS_PATH\");\n getScreenshot(screenshotPath);\n }", "public void takeScreenShot() {\r\n \t\tgraph.clearSelection();\r\n \t\tgraph.showScreenShotDialog();\r\n \t}", "@After\t\n public void takeScreenShot() {\n File scrFile = ((TakesScreenshot)getDriver()).getScreenshotAs(OutputType.FILE);\n // now save the screenshot to a file some place\n try {\n\t\t\tFileUtils.copyFile(scrFile, new File(\"c:\\\\tmp\\\\TC_EditAppAddNewApiSTTC.png\"));\n\t\t} catch (IOException e) {\n\t\t\t\n\t\t\te.printStackTrace();\n\t\t}\n }", "private void takeScreenshot(Activity activity) {\n uiDevice.waitForIdle(2000);\n\n // Create a file and save it\n Date start = new Date();\n final File screenFile = new File(Environment.getExternalStorageDirectory(), \"screen_\" + start.toString() + \"_\" + rand.nextInt());\n uiDevice.takeScreenshot(screenFile, 0.5f, 50);\n\n // Finally, attempt to send that file over websockets\n socket.sendScreenshot(screenFile, activity, start);\n\n }", "public void takeScreenShot() {\n\t\t destDir = \"screenshots\";\n\t\t // Capture screenshot.\n\t\t File scrFile = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);\n\t\t // Set date format to set It as screenshot file name.\n\t\t dateFormat = new SimpleDateFormat(\"dd-MMM-yyyy__hh_mm_ssaa\");\n\t\t // Create folder under project with name \"screenshots\" provided to destDir.\n\t\t new File(destDir).mkdirs();\n\t\t // Set file name using current date time.\n\t\t String destFile = dateFormat.format(new Date()) + \".png\";\n\n\t\t try {\n\t\t // Copy paste file at destination folder location\n\t\t FileUtils.copyFile(scrFile, new File(destDir + \"/\" + destFile));\n\t\t } catch (IOException e) {\n\t\t e.printStackTrace();\n\t\t }\n\t\n}", "public void takescreenshot() throws IOException {\n\t\tString pwd = System.getProperty(\"user.dir\");\n\t\tFile sFile = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);\n\t\tFileUtils.copyFile(sFile, new File(pwd + \"\\\\Output_screen.jpg\"));\n\t}", "public void screenShot() {\n\n\t}", "public void getscreenshot(WebDriver driver, String testCaseNumber) {\n\n\t\tShutterbug.shootPage(driver, ScrollStrategy.WHOLE_PAGE).withName(testCaseNumber).save();\n\t\tlogger.info(\"Successfully screenshot is taken and stored in screenshot folder for the test case \" + testCaseNumber);\n\t}", "public void takeScreenshot( ) throws IOException {\n File source = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);\n String path = \"./reports/target/screenshots/\" + source.getName();\n FileUtils.copyFile(source, new File(path));\n }", "@Test\n\tprivate void takeScreenshot() throws IOException {\n\t\tFile screenshot = ((TakesScreenshot) this.driver).getScreenshotAs(OutputType.FILE);\n\t\tString fileName = this.getTimestamp() + \".png\";\n\t\tFileUtils.copyFile(screenshot, new File(fileName));\n\n\t}", "public static void captureScreenShot(WebDriver driver) {\n\t\tlogger.info(\"Taking the screenshot\");\n\t\ttry {\n\t\t\tString timeStamp = new SimpleDateFormat(\"yyyy.MM.dd.HH.mm.ss\").format(new Date());\n\n\t\t\tTakesScreenshot ScrObj = (TakesScreenshot) driver;\n\n\t\t\tThread.sleep(3000);\n\n\t\t\tFile CaptureImg = ScrObj.getScreenshotAs(OutputType.FILE);\n\t\t\tFileUtils.copyFile(CaptureImg, new File(\"./Screenshots/\" + timeStamp + \"_screenshot.png\"));\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tlogger.error(\"Error occured while Capturing Screenshot\");\n\t\t}\n\t}", "public static void take(WebDriver driver){\n try {\n Thread.sleep(5000);\n }catch (InterruptedException e){\n e.printStackTrace();\n }\n\n\n Screenshot screenshot = new AShot()\n .shootingStrategy(ShootingStrategies.viewportPasting(100))\n .takeScreenshot(driver);\n\n try {\n ImageIO.write(screenshot.getImage(), \"png\", new File(\"/home/stanislav/123.png\"));\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void screenshotView() {\n // Only take a screenshot if the activity is not finishing\n if (getContext() instanceof Activity && ((Activity) getContext()).isFinishing()) return;\n\n Bitmap screenshot = getScreenshotBitmap();\n if (screenshot == null) return;\n\n screenshotView = new ImageView(getContext());\n screenshotView.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));\n screenshotView.setClickable(true);\n screenshotView.setImageBitmap(screenshot);\n screenshotOrientation = getOrientation();\n\n addView(screenshotView);\n\n TurbolinksLog.d(\"Screenshot taken\");\n }", "public void capturescreen(WebDriver driver, String testName) throws IOException {\n\t\tTakesScreenshot ts = (TakesScreenshot) driver;\n\t\tFile source = ts.getScreenshotAs(OutputType.FILE);\n\t\tFile target = new File(System.getProperty(\"user.dir\")+ \"\\\\screenshots\\\\\" + testName + \".png\");\n\t\tSystem.out.println(target);\n\t\tFileUtils.copyFile(source, target);\n\t\tSystem.out.println(\"Screenshot Captured for : \" + testName);\n\t}", "public String getScreenshot() {\n\t\tFile src = ((TakesScreenshot) getDriver()).getScreenshotAs(OutputType.FILE);\n\t\tString path = System.getProperty(\"user.dir\") + \"/screenshots/\" + System.currentTimeMillis() + \".png\";\n\t\tFile destination = new File(path);\n\t\ttry {\n\t\t\tFileUtils.copyFile(src, destination);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn path;\n\t}", "public void screenshot(String methodName) throws Exception \r\n\t{\r\n\t\tCalendar calendar = Calendar.getInstance();\r\n\t\tSimpleDateFormat formater = new SimpleDateFormat(\"dd_MM_yyyy_hh_mm_ss\"); \r\n\t\tFile scrFile = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);\r\n\r\n\t\tString screenshotLocationWeb = FilesAndFolders.getPropValue(\"screenshotLocationWeb\");\r\n\t\ttry {\r\n\t\t\tFileUtils.copyFile(scrFile, new\r\n\t\t\t\t\tFile((screenshotLocationWeb + methodName + \"_\" + formater.format(calendar.getTime())+\".png\")));\r\n\t\t\tReporter.log(\"<a href='\" +\r\n\t\t\t\t\tscreenshotLocationWeb + methodName + \"_\" + formater.format(calendar.getTime()) + \".png'> <imgsrc='\" + screenshotLocationWeb + methodName + \"_\" + formater.format(calendar.getTime()) + \".png' /> </a>\");\r\n\t\t\tReporter.setCurrentTestResult(null);\r\n\t\t}\r\n\t\tcatch (IOException e1) {\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\t}", "protected BufferedImage snapshot() {\n\t\tBufferedImage bi = new BufferedImage(window.getContentPane().getWidth(), window.getContentPane().getHeight(), BufferedImage.TYPE_INT_RGB);\n\t\twindow.getContentPane().paint(bi.getGraphics());\n\t\treturn bi;\n\t}", "private Bitmap takeScreenshot2() {\n Bitmap bitmap = null;\n try {\n // image naming and path to include sd card appending name you choose for file\n String mPath = Environment.getExternalStorageDirectory().toString() + \"/Activity\" + \".jpg\";\n\n // create bitmap screen capture\n View v1 = activity.getWindow().getDecorView().getRootView();\n v1.setDrawingCacheEnabled(true);\n bitmap = Bitmap.createBitmap(v1.getDrawingCache());\n v1.setDrawingCacheEnabled(false);\n\n File imageFile = new File(mPath);\n\n FileOutputStream outputStream = new FileOutputStream(imageFile);\n int quality = 100;\n bitmap.compress(Bitmap.CompressFormat.JPEG, quality, outputStream);\n outputStream.flush();\n outputStream.close();\n return bitmap;\n\n } catch (Throwable e) {\n // Several error may come out with file handling or OOM\n e.printStackTrace();\n }\n return bitmap;\n }", "public static String getScreenshot() {\n TakesScreenshot screenshot = (TakesScreenshot) WebDriverBase.driver;\n File src = screenshot.getScreenshotAs(OutputType.FILE);\n String path = System.getProperty(\"user.dir\") + File.separator + \"target\" + File.separator + \"report\" + File.separator + System.currentTimeMillis() + \".png\";\n System.out.println(path);\n File dest = new File(path);\n try {\n FileUtils.copyFile(src, dest);\n } catch (IOException e) {\n e.printStackTrace();\n }\n return path;\n }", "public static Bitmap takeScreenshot(Activity activity) {\n int[] screenSize = new int[2];\n Utils.getScreenSize(activity, screenSize);\n\n final Bitmap bitmap = Bitmap.createBitmap(screenSize[0], screenSize[1],\n Bitmap.Config.ARGB_8888);\n drawViews(getScreenViews(activity), bitmap);\n\n return bitmap;\n }", "public void saveScreenshot() {\n if (ensureSDCardAccess()) {\n Bitmap bitmap = Bitmap.createBitmap(getWidth(), getHeight(), Bitmap.Config.ARGB_8888);\n Canvas canvas = new Canvas(bitmap);\n doDraw(1, canvas);\n File file = new File(mScreenshotPath + \"/\" + System.currentTimeMillis() + \".jpg\");\n FileOutputStream fos;\n try {\n fos = new FileOutputStream(file);\n bitmap.compress(Bitmap.CompressFormat.JPEG, 100, fos);\n fos.close();\n } catch (FileNotFoundException e) {\n Log.e(\"Panel\", \"FileNotFoundException\", e);\n } catch (IOException e) {\n Log.e(\"Panel\", \"IOEception\", e);\n }\n }\n }", "private void takeScreenShot(final View v) {\n // Get device dimmensions\n Display display = getWindowManager().getDefaultDisplay();\n Point size = new Point();\n display.getSize(size);\n\n // create bitmap screen capture\n\n View view = v.getRootView();\n view.setDrawingCacheEnabled(true);\n // Create the bitmap to use to draw the screenshot\n final Bitmap bitmap = Bitmap.createBitmap(size.x, size.y, Bitmap.Config.ARGB_4444);\n final Canvas canvas = new Canvas(bitmap);\n\n // Get current theme to know which background to use\n final Activity activity = this;\n final Resources.Theme theme = activity.getTheme();\n final TypedArray ta = theme\n .obtainStyledAttributes(new int[]{android.R.attr.windowBackground});\n final int res = ta.getResourceId(0, 0);\n final Drawable background = activity.getResources().getDrawable(res);\n\n // Draw background\n background.draw(canvas);\n\n // Draw views\n view.draw(canvas);\n\n // Save the screenshot to the file system\n FileOutputStream fos;\n try {\n\n final File sddir = new File(SCREENSHOTS_LOCATIONS);\n\n if (!sddir.exists()) {\n sddir.mkdirs();\n }\n\n mQuestionScreenShotName = \"question_capture\"\n + System.currentTimeMillis() + \".jpg\";\n\n mQuestionImagePath = SCREENSHOTS_LOCATIONS + mQuestionScreenShotName;\n\n fos = new FileOutputStream(mQuestionImagePath);\n\n if (!bitmap.compress(Bitmap.CompressFormat.JPEG, 90, fos)) {\n return;\n }\n fos.flush();\n fos.close();\n\n } catch (FileNotFoundException e) {\n\n e.printStackTrace();\n } catch (IOException e) {\n\n e.printStackTrace();\n }\n }", "public static void takeScreenshotAtEndOfTest() throws IOException {\n\t\t//Take screenshot.\n\t\t\t\tFile scrFile = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);//output type is file type//coverting driver to take a screen shot TakesScreenshot(I) and then getScreenshotAs this method will execute \n\t\t//Copy to a file\t\t\n\t\t\t\tString currentDir = System.getProperty(\"user.dir\");\n\t\t\t\tFileUtils.copyFile(scrFile, new File(currentDir + \"/screenshots/\" + System.currentTimeMillis() + \".png\"));\n\t\t\t\t\n\t\t\t\t}", "private static void ScreenShot(WebDriver driver, String Filepath) {\n\t\tTakesScreenshot screen=((TakesScreenshot)driver);\n\t\t\n\t\tFile SrcFile=screen.getScreenshotAs(OutputType.FILE);\n\n\t\t//Move image to new destination\n\t\tFile DestFile=new File(Filepath);\n\n\t\t//Copy file at destination location\n\t\t//FileUtils.copyFile(SrcFile, DestFile);\n\t\t\n\t}", "public static String CaptureScreenShot(WebDriver driver) {\n\t\ttry {\n\t\t\tTakesScreenshot ts = (TakesScreenshot) driver;\n\t\t\tFile screenshotSRC = ts.getScreenshotAs(OutputType.FILE);\n\t\t\tString path = System.getProperty(\"user.dir\") + \"/Screenshots/\" + System.currentTimeMillis() + \".png\";\n\t\t\tFile screenshotDest = new File(path);\n\t\t\tFileUtils.copyFile(screenshotSRC, screenshotDest);\n\t\t\treturn path;\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Some exception occured.\" + e.getMessage());\n\t\t\treturn null;\n\t\t}\n\t}", "public void takeScreenShot(String fileName) throws IOException {\n File scrFile = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);\n DateFormat dateFormat = new SimpleDateFormat(\"yy-mm-dd HH-mm-ss\");\n Date date = new Date();\n FileUtils.copyFile(scrFile, new File(\"TestoutputData/Screenshot/\" + fileName + \"_\" + dateFormat.format(date) + \".png\"));\n }", "private Bitmap getScreenshotBitmap() {\n if (!hasEnoughHeapMemoryForScreenshot()) return null;\n\n if (getWidth() <= 0 || getHeight() <= 0) return null;\n\n Bitmap bitmap = Bitmap.createBitmap(getWidth(), getHeight(), Bitmap.Config.ARGB_8888);\n draw(new Canvas(bitmap));\n return bitmap;\n }", "public static void screenshot() throws IOException {\n\tFile src = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);\n\n\t// copy to project location\n\tFileUtils.copyFile(src,\n\t\t\tnew File(System.getProperty(\"user.dir\") + \"\\\\src\\\\\" + \"screenshot_\" + timeStamp() + \".png\"));\n\n}", "public static void captureScreenshot() throws IOException {\n\t\tDate d = new Date();\n\t\tscreenshotName = (d.toString().replace(\":\", \"_\").replace(\" \", \"_\"))+\".jpg\";\n\t\tscreenshotLocation1 = (System.getProperty(\"user.dir\"))+(\"\\\\target\\\\surefire-reports\\\\html\\\\\")+screenshotName;\n\t\tscreenshotLocation2 = (System.getProperty(\"user.dir\")+\"\\\\test-output\\\\html\\\\\"+screenshotName);\n\t\t\n\t\t//TakesScreenshot on failure\n\t\tFile screenshot = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);\n\t\t//add screenshot to the report - Surefire & reportng\n\t\tFileUtils.copyFile(screenshot, new File(screenshotLocation1));\n\t\tFileUtils.copyFile(screenshot, new File(screenshotLocation2));\n\t\ttest.log(LogStatus.INFO, \"Screenshot captured on failure of testcase\");\n\t\t\n\t}", "public String getScreenshot(WebDriver driver) {\nTakesScreenshot ts= (TakesScreenshot)driver;\n\n//This gives screenshot in the form of file\nFile source=ts.getScreenshotAs(OutputType.FILE);\n\n//RETURNS path in user directory in the screenshot folder which is stored in \"path\" in the form of string\nString path= System.getProperty(\"user.dir\")+\"/Screenshot/\"+System.currentTimeMillis()+\".png\";\n\n//The path is returned to vaiable destination\nFile destination=new File(path);\n\ntry {\nFileUtils.copyFile(source,destination );\n} catch (IOException e) {\n// TODO Auto-generated catch block\nSystem.out.println(\"Capture Failed\" + e.getMessage());\n}\nreturn path;\n}", "private void takeScreenShot(WebDriver driver, String fName) throws IOException {\n\n\t\tFile scrshotFile = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);\n\t\tFileUtils.copyFile(scrshotFile, new File(fName));\n\t}", "public void getScreenshot(String path) {\n\n String screenshotPath;\n String timestamp = testHelper.getTimestamp();\n\n screenshotPath = path + \"//\" + timestamp + \".JPG\";\n try {\n setUpScreenshot(screenshotPath);\n } catch (WebDriverException e) {\n LOGGER.log(Level.INFO,\n MESSAGE_WEB_DRIVER_EXCEPTION_IN_GET_SCREENSHOT_METHOD, e);\n } catch (IOException e) {\n LOGGER.log(Level.INFO,\n MESSAGE_IO_EXCEPTION_IN_GET_SCREENSHOT_METHOD, e);\n }\n\n }", "private Bitmap takeShareableScreenshot() {\n // https://stackoverflow.com/questions/2661536/how-to-programmatically-take-a-screenshot-in-android\n// cameraActionLayout.setVisibility(View.GONE);\n// resultLayout.setVisibility(View.GONE);\n try {\n // create bitmap screen capture\n View v1 = getWindow().getDecorView().getRootView();\n v1.setDrawingCacheEnabled(true);\n return Bitmap.createBitmap(v1.getDrawingCache());\n } catch (Throwable e) {\n // Several error may come out with file handling or OOM\n e.printStackTrace();\n makeToast(e.toString());\n Timber.e(\"Error capturing screenshot: \" + e.toString());\n return null;\n }\n// finally {\n// cameraActionLayout.setVisibility(View.VISIBLE);\n// resultLayout.setVisibility(View.VISIBLE);\n// }\n }", "public static void takeScreenshot(String fileName) throws IOException\n\t {\n\t\t File file=((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);\n\t\t \n\t\t // copying the screenshot to the desired loacation by copyFile method\n\t\t String timestamp = new SimpleDateFormat(\"yyyy_MM_dd__hh_mm_ss\").format(new Date());\n\t\t \n\t\t FileUtils.copyFile(file, new File(\"E:\\\\screenshots\\\\\"+fileName+\" \"+timestamp+\" .jpg\"));\n\t\t \n\t }", "public void requestScreenshot(Project project)\n\t{\n\t\trenderer.requestScreenshot(project.getCurrentSheetIndex());\n\t}", "@Test\n public void captureEntirePageScreenshot() throws IllegalArgumentException {\n WebDriverCommandProcessor proc = new WebDriverCommandProcessor(\"http://localhost/\", manager.get());\n CommandFactory factory = new CommandFactory(proc);\n factory.newCommand(1, \"captureEntirePageScreenshot\");\n }", "public void screenshotToClipboard() {\n Image image = getScreenshot();\n Clipboard clipboard = Clipboard.getSystemClipboard();\n final ClipboardContent content = new ClipboardContent();\n content.putImage(image);\n clipboard.setContent(content);\n LOGGER.atInfo().log(\"Copied screenshot to clipboard\");\n }", "private String takeScreenshot(View view) {\n Date now = new Date();\n android.text.format.DateFormat.format(\"yyyy-MM-dd_hh:mm:ss\", now);\n\n try {\n // image naming and path to include sd card appending name you choose for file\n String mPath = Environment.getExternalStorageDirectory().toString() + \"/\" + now + \".jpg\";\n\n // create bitmap screen capture\n View v1 = getWindow().getDecorView().getRootView();\n v1.setDrawingCacheEnabled(true);\n Bitmap bitmap = Bitmap.createBitmap(v1.getDrawingCache(), (int)view.getX()+10,\n (int)view.getY()+35, view.getWidth()-22, view.getHeight()-33);\n v1.setDrawingCacheEnabled(false);\n File imageFile = new File(mPath);\n FileOutputStream outputStream = new FileOutputStream(imageFile);\n int quality = 100;\n bitmap.compress(Bitmap.CompressFormat.JPEG, quality, outputStream);\n outputStream.flush();\n outputStream.close();\n return mPath;\n } catch (Throwable e) {\n e.printStackTrace();\n }\n return \"\";\n }", "@Attachment(value = \"Page screenshot {fileWithPath}\", type = \"image/png\")\n protected byte[] takeSnapShot(String fileWithPath){\n try{\n TakesScreenshot scrShot =((TakesScreenshot)driver);\n\n File SrcFile=scrShot.getScreenshotAs(OutputType.FILE);\n\n File DestFile=new File(\"./target/pictures/\"+ fileWithPath);\n\n FileUtils.copyFile(SrcFile, DestFile);\n\n return scrShot.getScreenshotAs(OutputType.BYTES);\n\n }catch(WebDriverException e){\n e.printStackTrace(); \n\n }catch(Exception e){\n e.printStackTrace(); \n }\n return null; \n }", "static void takeSelfie() {\n\t\t\tSystem.out.println(\"I am defined static method of TakesScreenshot interface\");\n\t\t}", "public static File captureRootScreenShot(Activity activity){\n View decor = activity.getWindow().getDecorView();\n decor.setDrawingCacheEnabled(true);\n\n // Configure screenshot bounds\n Bitmap decorBmp = decor.getDrawingCache();\n\n // Create the screenshot per se\n Bitmap screenShot = Bitmap.createBitmap(decorBmp, 0, 0, decorBmp.getWidth(), decorBmp.getHeight());\n\n // Recycle the intial bitmap\n decorBmp.recycle();\n\n // Disable drawing cache on the decor\n decor.setDrawingCacheEnabled(false);\n\n // Save the newly generated screenshot into a temporary variable\n try {\n\n // Create an image file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"PNG_\" + timeStamp + \"_\";\n File cacheDir = activity.getCacheDir();\n File tempFile = File.createTempFile(imageFileName, \".png\", cacheDir);\n\n // Write bitmap to file\n boolean result = screenShot.compress(Bitmap.CompressFormat.PNG, 0, new FileOutputStream(tempFile));\n if(result)\n return tempFile;\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return null;\n }", "public static String createScreenshot(WebDriver driver) {\r\n\t \r\n\t UUID uuid = UUID.randomUUID();\r\n\t File scrFile = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);\r\n\t try {\r\n\t org.apache.commons.io.FileUtils.copyFile(scrFile, new File(\"/img\" + uuid + \".png\"));\r\n\t System.out.println(\"/img/screen\" + uuid + \".png\");\r\n\t } catch (IOException e) {\r\n\t System.out.println(\"Error while generating screenshot:\\n\" + e.toString());\r\n\t }\r\n\t return \"/img\" + uuid + \".png\";\r\n\t}", "public void performRequestCurrentDump()\n {\n super.performRequestCurrentDump();\n switchScreen();\n }", "public void takeScreenShot(String fileName) throws IOException {\n\t\tScreenshot takeScreenShot = new AShot().takeScreenshot(driver);\n\t\tImageIO.write(takeScreenShot.getImage(), \"png\", new File(path+\"\\\\ScreenShots\\\\\" + fileName + \".png\"));\n\t}", "public void fTakeScreenshot(String SSPath){\r\n \ttry{ \t\t\r\n \t\tWebDriver screenDriver;\r\n \t\tif(driverType.contains(\"FIREFOX\") || driverType.contains(\"CHROME\") || driverType.contains(\"IE\")){\r\n \t\t\tscreenDriver = driver;\r\n \t\t}else{\r\n \t\t\tscreenDriver = new Augmenter().augment(driver);\r\n \t\t}\r\n \t\t\r\n File scrFile = ((TakesScreenshot)screenDriver).getScreenshotAs(OutputType.FILE);\r\n \t FileUtils.copyFile(scrFile, new File(SSPath));\r\n \t\ttry {\r\n \t\t\tThread.sleep(1);\r\n \t\t} catch (InterruptedException e) {\r\n \t\t\te.printStackTrace();\r\n \t\t}\r\n \t\tscreenDriver = null;\r\n \t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n }", "public static String captureScreenshotOfDesktop() {\n\t\ttry {\n\t\t\tRobot robot = new Robot();\n\t\t\tBufferedImage tmp = robot.createScreenCapture(new Rectangle(Toolkit.getDefaultToolkit().getScreenSize()));\n\t\t\tString path = System.getProperty(\"user.dir\") + \"/Screenshots/\" + System.currentTimeMillis() + \".png\";\n\t\t\tImageIO.write(tmp, \"png\", new File(path));\n\t\t\treturn path;\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Some exception occured.\" + e.getMessage());\n\t\t\treturn null;\n\t\t}\n\n\t}", "public static String CaptureScreenShotWithTestStepName(WebDriver driver, String testStepName) {\n\t\ttry {\n\t\t\tTakesScreenshot ts = (TakesScreenshot) driver;\n\t\t\tFile screenshotSRC = ts.getScreenshotAs(OutputType.FILE);\n\t\t\tString path = System.getProperty(\"user.dir\") + \"/Screenshots/\" + testStepName + System.currentTimeMillis()\n\t\t\t\t\t+ \".png\";\n\t\t\tFile screenshotDest = new File(path);\n\t\t\tFileUtils.copyFile(screenshotSRC, screenshotDest);\n\t\t\treturn path;\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Some exception occured.\" + e.getMessage());\n\t\t\treturn null;\n\t\t}\n\t}", "public static String captureScreenshot(String scenariopath) {\n\t\tDate date = new Date();\r\n\t\tString snaptime = dateformat.format(date);\r\n\t\tString result=\"false\";\r\n\t\ttry {\r\n\t\t\tWebDriver augumentdriver = new Augmenter().augment(driver);\r\n\t\t\tFile source = ((TakesScreenshot) augumentdriver).getScreenshotAs(OutputType.FILE);\r\n\t\t\tString currentDate = new SimpleDateFormat(\"dd-mm-yyyy hh:mm:ss\").format(new Date());\r\n\t\t\tString path =\".//screenshots//\" + scenariopath+\"_\"+ snaptime + \".png\";\r\n\t\t\tfinal BufferedImage image = ImageIO.read(source);\r\n\t\t\tGraphics g = image.getGraphics();\r\n\t\t\tg.setFont(g.getFont().deriveFont(20f));\r\n\t\t\tg.setColor(Color.GREEN);\r\n\t\t\tg.drawString(currentDate, 20, 20);\r\n\t\t\tg.dispose();\r\n\t\t\tImageIO.write(image, \"png\", new File(path));\r\n\t\t\tresult= path;\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(\"Unable to take screenshot\");\r\n\t\t}\r\n\t\treturn result;\r\n\r\n\t}", "public static String capture(WebDriver driver, String screenShotName) throws IOException {\n\n TakesScreenshot ts = (TakesScreenshot) driver;\n File source = ts.getScreenshotAs(OutputType.FILE);\n String dest = \"target/extent/screenshots/\" + screenShotName + \".png\";\n File destination = new File(dest);\n FileUtils.copyFile(source, destination);\n String loctionForReport = \"screenshots/\" + screenShotName + \".png\";\n return loctionForReport;\n }", "public void takeScreenShot (WebDriver driver, String screenshotname) {\n\t\t\t File source = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);\n\t\t\t // Define path where Screenshots will be saved\n\t\t\n\t\t\t //Copy the source file at the screenshot path\n\t\t\t try {\n\t\t\t\tFileUtils.copyFile(source, new File(\"./ScreenShots/\" + screenshotname +\".png\"));\n\t\t\t} catch (IOException e1) {}\n\t\t\t try {\n//\t\t\t\t Change the thread value to run test files with delay\n\t\t\t\t\tThread.sleep(3_000);\n\t\t\t\t} catch (InterruptedException e) {}\n\t\t }", "public static void getScreenShot(String description, WebDriver driver) throws IOException {\n\t\t DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd, HH.mm.ss\");\n\t\t File scrFile = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);\n\t\t String outputFile = Common.outputFileDir + description + \" (\" + dateFormat.format(new Date()) + \").png\";\n\t\t fileWriterPrinter(outputFile);\n\t\t FileUtils.copyFile(scrFile, new File(outputFile));\n\t\t }", "public static String captureScreenshotOfDesktopWithTestStepName(String testStepName) {\n\t\ttry {\n\t\t\tRobot robot = new Robot();\n\t\t\tBufferedImage tmp = robot.createScreenCapture(new Rectangle(Toolkit.getDefaultToolkit().getScreenSize()));\n\t\t\tString path = System.getProperty(\"user.dir\") + \"/Screenshots/\" + testStepName + System.currentTimeMillis()\n\t\t\t\t\t+ \".png\";\n\t\t\tImageIO.write(tmp, \"png\", new File(path));\n\t\t\treturn path;\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Some exception occured.\" + e.getMessage());\n\t\t\treturn null;\n\t\t}\n\n\t}", "public static void captureScreenshot(WebDriver browserobject , String screenshotname) \n\t{\n\n\n\t\tPath dest = Paths.get(\"./ScreenShots\",screenshotname+\".png\"); \n\t\ttry {\n\t\t\tFiles.createDirectories(dest.getParent());\n\t\t\tFileOutputStream out = new FileOutputStream(dest.toString());\n\t\t\tout.write(((TakesScreenshot) browserobject).getScreenshotAs(OutputType.BYTES));\n\t\t\tout.close();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Excpetion while taking screenshot\"+ e.getMessage());\n\t\t}\n\t}", "public static void main(String[] args) throws Exception{\n Home_Page.lnk_SignIn().click();\n LogIn_Page.txtbx_UserName().sendKeys(Constant.Username);\n LogIn_Page.txtbx_Password().sendKeys(Constant.Password);\n LogIn_Page.btn_LogIn().click();\n System.out.println(\" Login Successfully, now it is the time to Log Off buddy.\");\n Home_Page.lnk_LogOut().click(); \n File scrFile = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);\n System.out.println(System.getProperty(\"user.dir\") + \"//data//CaptureScreenshot//google.jpg\");\n FileUtils.copyFile(scrFile, new File(System.getProperty(\"user.dir\") + \"//data//CaptureScreenshot//google.jpg\"));\n driver.quit();\n }", "public void screenShot(String data) throws IOException {\nTakesScreenshot screenShot=(TakesScreenshot) driver;\nFile screenshotAs = screenShot.getScreenshotAs(OutputType.FILE);\nFile file=new File(System.getProperty(\"user.dir\")+\"\\\\target\\\\\"+data+\".png\");\nFileUtils.copyFile(screenshotAs, file);\n\n}", "private static Bitmap getScreenshot(Context context, View view) {\n view.setDrawingCacheEnabled(true);\n Bitmap bitmap = Bitmap.createBitmap(view.getDrawingCache());\n\n // Remove status bar.\n if (view.findViewById(Window.ID_ANDROID_CONTENT) != null) {\n int top = (int) Math.ceil(25 * context.getResources().getDisplayMetrics().density);\n bitmap = Bitmap.createBitmap(bitmap, 0, top, bitmap.getWidth(), bitmap.getHeight() - top);\n }\n\n // Clear drawing cache.\n view.setDrawingCacheEnabled(false);\n\n return bitmap;\n }", "private Bitmap takeScreenShot(int x, int y, int width, int hight) {\n\t\tif (checkPath(PATH))\n\t\t\treturn ScreenShotWorker.getScreenBitmap(this);\n\t\treturn null;\n\t}", "private void takeScreenShot(WebDriver webdriver, String fileWithPath) {\n TakesScreenshot scrShot = ((TakesScreenshot) webdriver);\n //Call getScreenshotAs method to create image file\n File SrcFile = scrShot.getScreenshotAs(OutputType.FILE);\n //Move image file to new destination\n File DestFile = new File(fileWithPath);\n //Copy file at destination\n try {\n FileUtils.copyFile(SrcFile, DestFile);\n } catch (IOException e) {\n System.err.println(\"Something went wrong during copying\");\n }\n }", "public File captureWebElement(WebElement element, WebDriver driver) {\n Point start = element.getLocation();\n Dimension size = element.getSize();\n if (!\"FF\".equals(Configuration.getBrowser())) {\n Object[] rect = getBoundingClientRect(element, driver);\n start = (Point) rect[0];\n size = (Dimension) rect[1];\n }\n\n File image = imageEditor.cropImage(start, size, capturePage(driver));\n PageObjectLogging.logImage(\"Shooter\", image, true);\n return image;\n }", "public static String takeScreenShot(String methodName) throws Exception {\n\n\t\ttry {\n\t\t\tdateStamp=Calendar.getInstance().getTime().toString().split(\":\")[0].replaceAll(\" \", \"_\");\n\t\t\tfileDirectory=new File(\"\\\\\"+LoadProperty.getPropertyInstance().getProperty(\"SCREENSHOT_LOCATION\")+\"/\"+dateStamp);\n\t\t\tif(!fileDirectory.exists()) {\n\t\t\t\tfileDirectory.mkdir();\n\t\t\t}\n\t\t\tscreenShot = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);\n\t\t\t\n\t\t\tfilePath = fileDirectory + \"\\\\\" + methodName.replaceAll(\" \", \"_\") + \"_\"+ getTimeStamp() + \".jpg\";\n\t\t\tFileUtils.copyFile(screenShot, new File(filePath));\n\t\t\treturn filePath;\n\t\t} catch (Exception e) {\n\t\t\tthrow (new Exception());\n\t\t}\n\t}", "public synchronized void logScreenshot(String name) {\n try {\n if (get().getAppiumDriver() != null && System.getProperty(\"captureScreenshotForCurrentTest\").\n equalsIgnoreCase(\"Yes\")) {\n String captureScreenshot = captureScreenshot(get().getAppiumDriver(), name);\n if (!captureScreenshot.equalsIgnoreCase(\"No\"))\n info(\"<img src=\\\"file:///\" + captureScreenshot + \"\\\"alt='Screenshot'\\\" width=\\\"200\\\" height=\\\"200\\\"/>\");\n }\n } catch (Exception e) {\n error(\"Exception occurred while taking the Screen to click element with definition \" + name);\n error(Throwables.getStackTraceAsString(e));\n }\n }", "public Screenshot(Activity activity) {\n\t\t\tfinal View contentView = activity\n\t\t\t\t\t.findViewById(android.R.id.content);\n\t\t\tthis.view = contentView.getRootView();\n\t\t}", "public static void TakeScreenShot(String i) throws IOException {//a metod we will use onTestFail listener, I added i so i can call the method for a particular case and put the screenShots in separate files\n Date d =new Date();\n String fileName = d.toString().replace(\":\",\"_\").replace(\" \",\"_\");\n path = System.getProperty(\"user.dir\")+\"\\\\src\\\\test\\\\resources\\\\Prints\"+i+\"\\\\\"+fileName+\".jpg\";\n File screenshot = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);\n FileUtils.copyFile(screenshot,new File(System.getProperty(\"user.dir\")+\"\\\\src\\\\test\\\\resources\\\\Prints\"+i+\"\\\\\"+fileName+\".jpg\"));\n }", "public static void captureScreenshot(WebDriver driver , String screenshotname) throws IOException \n\t{\n\t\tPath dest = Paths.get(\"./ScreenShots\",screenshotname+\"gh.png\"); \n\t\t\n\t\t//take screenshot\n\t\tFile scrFile = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);\n\t\t//copy the screen shot to another file\n\t\tFileUtils.copyFile(scrFile, new File(dest.toString()));\n\t}", "public static String captureScreenshot(WebDriver driver,String screenshotName){\n\t\tTakesScreenshot ts=(TakesScreenshot)driver;\n\t\t//2.Take screen shot and define file type with a File Class:MAKE IT SOURCE FILE\n\t\tFile src=ts.getScreenshotAs(OutputType.FILE);\n\t\t//3.DEFINE where the taken screen shot will be save as FILE\n\t\tString destFilePath=(\"\\\\Users\\\\metootopa\\\\Desktop\\\\ECLIPSE_TEST\\\\com.MyAPP.HybridFrame\\\\ScreenShots\\\\\");\n\t\tString destFile=destFilePath+ screenshotName+ System.currentTimeMillis()+\".png\";\n\t\t//4.set src file to destinatoion folder\n\t\ttry {\n\t\t\tFileUtils.copyFile(src, new File(destFile));\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Screenshot was not Successfull\"+e.getMessage());\n\t\t}\n\t\t\n\t\treturn destFile;\n\t\t\n\t\t\n\t\t\n\t}", "public void captureScreenshot(String path_screenshot, String testCaseName) {\n try {\n File srcFile = ((TakesScreenshot) getDriver()).getScreenshotAs(OutputType.FILE);\n String filename = testCaseName + \"_\" + UUID.randomUUID().toString();\n File targetFile = new File(path_screenshot + filename + \".jpg\");\n FileUtils.copyFile(srcFile, targetFile);\n } catch (Exception e) {\n error(\"Failed while capturing screenshot\");\n error(Throwables.getStackTraceAsString(e));\n }\n }", "public static Image captureScreen(File file) throws Exception {\n\n\t\tDimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\n\t\tRectangle screenRectangle = new Rectangle(screenSize);\n\t\tRobot robot = new Robot();\n\t\treturn robot.createScreenCapture(screenRectangle);\n\t}", "@Test\n public void myTest() throws Exception {\n\n WebDriver driver = new ChromeDriver();\n\n driver.get(\"http://www.google.com\");\n\n // RemoteWebDriver does not implement the TakesScreenshot class\n // if the driver does have the Capabilities to take a screenshot\n // then Augmenter will add the TakesScreenshot methods to the instance\n WebDriver augmentedDriver = new Augmenter().augment(driver);\n File screenshot = ((TakesScreenshot) augmentedDriver).getScreenshotAs(OutputType.FILE);\n\n\n //File screenshot = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);\n // Now you can do whatever you need to do with it, for example copy somewhere\n FileUtils.copyFile(screenshot, new File(\"C:\\\\Dev\\\\screenshot.png\"));\n\n driver.quit();\n }", "public void captureGame() {\n gameScreen = robot.createScreenCapture(rect);\n gamePixels = gameScreen.getRGB(0, 0, gameScreen.getWidth(),\n gameScreen.getHeight(), null, 0, gameScreen.getWidth());\n }", "public String captureScreenshot(WebDriver driver, String testName) {\n String randomValue = \"_\" + StringUtils.getRandomAlphaNumeric(5);\n String fullPath = System.getProperty(\"user.dir\") + \"/screenshots/\" + testName + randomValue + \".png\";\n String captured = \"No\";\n try {\n WebDriver augmentedDriver = new Augmenter().augment(driver);\n File source = ((TakesScreenshot) augmentedDriver).getScreenshotAs(OutputType.FILE);\n FileUtils.copyFile(source, new File(fullPath));\n return fullPath;\n } catch (IOException e) {\n error(\"Failed to capture screenshot: <br/>\" + e.getMessage());\n error(Throwables.getStackTraceAsString(e));\n return captured;\n }\n }", "public void getCurrentScreenshots(String filePath, String fileName) {\n\t\ttry {\n\t\t\tString screenPath = filePath;\n\t\t\tString timeStamp = new SimpleDateFormat(\"yyyy_MM_dd_HH_mm_ss\")\n\t\t\t\t\t.format(Calendar.getInstance().getTime());\n\t\t\tString fileID = fileName + \"_\" + timeStamp;\n\t\t\tString screenName = String.format(\"%s.png\", fileID);\n\t\t\tscreenPath = screenPath + screenName;\n\t\t\tFile screenshot = ((TakesScreenshot) Driver.getInstance())\n\t\t\t\t\t.getScreenshotAs(OutputType.FILE);\n\t\t\tFileUtils.copyFile(screenshot, new File(screenPath));\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public String getScreenshotUrl() {\n return screenshotUrl;\n }", "public String getScreenshotUrl() {\n return screenshotUrl;\n }", "static void takeSelfie() {\n\t\tSystem.out.println(\"I am defined static method of TakesScreenshot interface\");\n\t}", "public static void captureScreenshot(WebDriver driver , String screenshotname) \n\t{\n\t\tPath dest = Paths.get(\"./Screenshots\",screenshotname+\".png\"); \n\t\t\n\t\ttry {\n\t\t\tFiles.createDirectories(dest.getParent());\n\t\t\tFileOutputStream out = new FileOutputStream(dest.toString());\n\t\t\tout.write(((TakesScreenshot) driver).getScreenshotAs(OutputType.BYTES));\n\t\t\tout.close();\n\t\t\t\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Excpetion while taking screenshot: \"+ e.getMessage());\n\t\t}\n\t}", "public static String takeScreenShot(WebDriver driver, String testName){\n File screenshot = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);\n String path = \"./\" + \"\\\\target\\\\surefire-reports\\\\\" + testName + \".png\";\n try {\n FileUtils.copyFile(screenshot, new File(path));\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n return testName + \".png\";\n }", "public static void takeScreenshot(String filename) throws IOException\n\t{\n\t\tFile file = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);\n\t\t\n\t\t//2. Now copy the file to the desired location using copyFile method\n\t\tFileUtils.copyFile(file, new File(\"E:\\\\Selenium\\\\SeleniumPractice\\\\src\\\\com\\\\seleniumpractice\\\\Screenshot\\\\\"+filename+\".jpg\"));\n\t\t\n\t\t\n\t}", "public static void takeSnapShot(WebDriver webdriver, String fPath) throws Exception {\n\n //Convert web driver object to TakeScreenshot\n TakesScreenshot scrShot = ((TakesScreenshot) webdriver);\n\n //Call getScreenshotAs method to create image file\n File SrcFile = scrShot.getScreenshotAs(OutputType.FILE);\n\n //Move image file to new destination\n File DestFile = new File(fPath);\n\n //Copy file at destination\n FileUtils.copyFile(SrcFile, DestFile);\n\n }", "public void snapshot(TakesScreenshot drivername, String foldername,String filename) {\r\n\t\t// this method will take screen shot ,require two parameters ,one is\r\n\t\t// driver name, another is file name\r\n String timeString=ts.getTimeString();\r\n\t\tString currentPath = System.getProperty(\"user.dir\");\r\n\t\t// get current workfolder\r\n\t\tFile scrFile = drivername.getScreenshotAs(OutputType.FILE);\r\n\t\t// Now you can do whatever you need to do with it, for example copy\r\n\t\t// somewhere\r\n\t\ttry {\r\n\t\t\tSystem.out.println(\"save snapshot path is:\" + currentPath + \"/\"\r\n\t\t\t\t\t+ filename + \".jpg\");\r\n\t\t\tFileUtils.copyFile(scrFile, new File(currentPath +\"\\\\\"+ \"screenshot\"+\"\\\\\"+timeString+\"\\\\\" +foldername+ \"\\\\\"+filename\r\n\t\t\t\t\t+ \".jpg\"));\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.out.println(\"Can't save screenshot\");\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\tSystem.out.println(\"screen shot finished, it's in \" + currentPath\r\n\t\t\t\t\t+ \" folder\");\r\n\t\t}\r\n\t}", "static String takeScreenShot(String ImagesPath, WebDriver driver) {\n TakesScreenshot takesScreenshot = (TakesScreenshot) driver;\n File screenShotFile = takesScreenshot.getScreenshotAs(OutputType.FILE);\n File destinationFile = new File(ImagesPath+\".png\");\n try {\n FileUtils.copyFile(screenShotFile, destinationFile);\n } catch (IOException e) {\n System.out.println(e.getMessage());\n }\n return ImagesPath+\".png\";\n }", "private void drawToScreen() {\n \n Graphics g2 = getGraphics();\n /*g2.drawImage(image, 0, 0, \n WIDTH * SCALE, HEIGHT * SCALE, \n 0, 0, WIDTH, HEIGHT, \n this);*/\n g2.drawImage(image,\n (int)gsm.getAttribute(\"CAMERA_X1\"),\n (int)gsm.getAttribute(\"CAMERA_Y1\"),\n (int)gsm.getAttribute(\"CAMERA_X1\") + WIDTH*SCALE,\n (int)gsm.getAttribute(\"CAMERA_Y1\") + HEIGHT*SCALE,\n (int)gsm.getAttribute(\"WORLD_X1\"),\n (int)gsm.getAttribute(\"WORLD_Y1\"),\n (int)gsm.getAttribute(\"WORLD_X1\") + WIDTH,\n (int)gsm.getAttribute(\"WORLD_Y1\") + HEIGHT,\n this);\n\t\t/*g2.drawImage(image, 0, 0,\n\t\t\t\tWIDTH * SCALE, HEIGHT * SCALE,\n\t\t\t\tnull);*/\n\t\tg2.dispose();}", "public static void rep_GetScreenshot(String outputlocation, String strFileName) throws IOException {\n File srcFiler = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);\n FileUtils.copyFile(srcFiler, new File(outputlocation + strFileName));\n rep_Report(2, \"Screen shot saved\");\n }", "public void screenShot(String name)\n\t{\n\t\tFile f1=((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);\n\t\tFile f2=new File(\"src/test/resources/ScreenShots/\"+name+\".png\");\n\t\ttry \n\t\t{\n\t\t\tFileUtils.copyFile(f1,f2);\n\t\t\tlog.update(\"ScreenShot taken in name of \"+name);\n\t\t} \n\t\tcatch (IOException e) \n\t\t{\n\t\t\te.printStackTrace();\n\t\t\tlog.update(\"Error in taking ScreenShots\");\n\t\t}\n\t\tcatch(IncompatibleClassChangeError e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t\tlog.update(\"Exception in incompatile class change error method\");\n\t\t}\n\t}", "public static void takeScreenShot(String filePath, String fileName) throws IOException { \n\t\ttry { \n\t\t\tFile scrFile = ((TakesScreenshot)SeleniumDriverManager.getManager().getDriver())\n\t\t\t\t\t.getScreenshotAs(OutputType.FILE); \n\t\t\tFileUtils.copyFile(scrFile, new File(filePath + fileName)); \n\t\t} catch (Exception e) { \n\t\t\te.printStackTrace(); \n\t\t} \n\t}", "private void takePicture() {\n\n captureStillPicture();\n }", "private void captureScreen(String reason) throws Exception {\n File file;\n try {\n file = new File(getWorkDirPath() + \"/dump.png\");\n file.getParentFile().mkdirs();\n file.createNewFile();\n } catch(IOException e) { throw new Exception(\"Error: Can't create dump file.\"); }\n PNGEncoder.captureScreen(file.getAbsolutePath());\n throw new Exception(reason);\n }", "public static String takeScreenshot(String filename) {\n\t\tTakesScreenshot ts= (TakesScreenshot)driver;\n\t\tFile file=ts.getScreenshotAs(OutputType.FILE);\n\t\tString destinationFile=Constants.SCREENSHOT_FILEPATH+filename+\".png\";\n\t\ttry {\n\t\tFileUtils.copyFile(file, new File(\"screenshot/\"+filename+\".pig\"));\n\t\t}catch (Exception ex) {\n\t\t\tSystem.out.println(\"Cannot take screenshot!\");\n\t\t}\n\t\treturn destinationFile;\n\t}", "public static void screenShot(WebDriver driver, String desc) {\n\t\tDate currentTime = new Date();\n\t\tSimpleDateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd-hh-mm-ss\");\n\t\tString dateString = formatter.format(currentTime);\n\t\tFile scrFile = ((TakesScreenshot) driver)\n\t\t\t\t.getScreenshotAs(OutputType.FILE);\n\t\ttry {\n\t\t\tdesc = desc.trim().equals(\"\") ? \"\" : \"-\" + desc.trim();\n\t\t\tFile screenshot = new File(\"screenshot\" + File.separator\n\t\t\t\t\t+ dateString + desc + \".png\");\n\t\t\tFileUtils.copyFile(scrFile, screenshot);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void getScreenShot(StackTraceElement l, String description, WebDriver driver) throws IOException {\n\t\t DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd, HH.mm.ss\");\n\t\t File scrFile = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);\n\t\t String packageNameOnly = l.getClassName().substring(0, l.getClassName().lastIndexOf(\".\"));\n\t\t String classNameOnly = l.getClassName().substring(1 + l.getClassName().lastIndexOf(\".\"), l.getClassName().length());\n\t\t String screenshotName = classNameOnly + \".\" + l.getMethodName() + \", \" + description +\", line # \" + l.getLineNumber();\n\t\t String outputFile = Common.outputFileDir + packageNameOnly + File.separator + classNameOnly + File.separator + screenshotName + \" (\" + dateFormat.format(new Date()) + \").png\";\n\t\t fileWriterPrinter(outputFile);\n\t\t FileUtils.copyFile(scrFile, new File(outputFile));\n\t\t }", "public static String capture(AndroidDriver driver, String screenShotName) throws IOException {\n\t\tFile source = driver.getScreenshotAs(OutputType.FILE);\n\t\tString dest = MyExtentListners.screenShotPath + screenShotName + \".png\";\n\t\tSystem.out.println(dest);\n\t\tFile destination = new File(dest);\n\t\tFileUtils.copyFile(source, destination);\n\t\treturn dest;\n\t}", "@SuppressLint(\"NewApi\")\n\tpublic void takeScreenshot(Context context, String fileFullPath)\n\t{\n\t\tif(fileFullPath == \"\"){\n\t\t\tformat = new SimpleDateFormat(\"yyyyMMddHHmmss\");\n\t\t\tString fileName = format.format(new Date(System.currentTimeMillis())) + \".png\";\n\t\t\tfileFullPath = \"/data/local/tmp/\" + fileName;\n\t\t}\n\t\t\n\t\tif(ShellUtils.checkRootPermission()){\n\t\t\tif(android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH){\n\t\t\t\tShellUtils.execCommand(\"/system/bin/screencap -p \"+ fileFullPath,true);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif(android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.JELLY_BEAN_MR2 && android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH){\n\t\t\t\twm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);\n\t\t\t\tmDisplay = wm.getDefaultDisplay();\n\t\t\t\tmDisplayMatrix = new Matrix();\n\t\t\t\tmDisplayMetrics = new DisplayMetrics();\n\t\t\t\t// We need to orient the screenshot correctly (and the Surface api seems to take screenshots\n\t\t\t\t// only in the natural orientation of the device :!)\n\t\t\t\tmDisplay.getRealMetrics(mDisplayMetrics);\n\t\t\t\tfloat[] dims =\n\t\t\t\t{\n\t\t\t\t\t\tmDisplayMetrics.widthPixels, mDisplayMetrics.heightPixels\n\t\t\t\t};\n\t\t\t\tfloat degrees = getDegreesForRotation(mDisplay.getRotation());\n\t\t\t\tboolean requiresRotation = (degrees > 0);\n\t\t\t\tif (requiresRotation)\n\t\t\t\t{\n\t\t\t\t\t// Get the dimensions of the device in its native orientation\n\t\t\t\t\tmDisplayMatrix.reset();\n\t\t\t\t\tmDisplayMatrix.preRotate(-degrees);\n\t\t\t\t\tmDisplayMatrix.mapPoints(dims);\n\t\t\t\t\tdims[0] = Math.abs(dims[0]);\n\t\t\t\t\tdims[1] = Math.abs(dims[1]);\n\t\t\t\t}\n\n\t\t\t\tBitmap mScreenBitmap = screenShot((int) dims[0], (int) dims[1]);\n\t\t\t\tif (requiresRotation)\n\t\t\t\t{\n\t\t\t\t\t// Rotate the screenshot to the current orientation\n\t\t\t\t\tBitmap ss = Bitmap.createBitmap(mDisplayMetrics.widthPixels, mDisplayMetrics.heightPixels,\n\t\t\t\t\t\t\tBitmap.Config.ARGB_8888);\n\t\t\t\t\tCanvas c = new Canvas(ss);\n\t\t\t\t\tc.translate(ss.getWidth() / 2, ss.getHeight() / 2);\n\t\t\t\t\tc.rotate(degrees);\n\t\t\t\t\tc.translate(-dims[0] / 2, -dims[1] / 2);\n\t\t\t\t\tc.drawBitmap(mScreenBitmap, 0, 0, null);\n\t\t\t\t\tc.setBitmap(null);\n\t\t\t\t\tmScreenBitmap = ss;\n\t\t\t\t\tif (ss != null && !ss.isRecycled())\n\t\t\t\t\t{\n\t\t\t\t\t\tss.recycle();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// If we couldn't take the screenshot, notify the user\n\t\t\t\tif (mScreenBitmap == null)\n\t\t\t\t{\n\t\t\t\t\tToast.makeText(context, \"screen shot fail\", Toast.LENGTH_SHORT).show();\n\t\t\t\t}\n\n\t\t\t\t// Optimizations\n\t\t\t\tmScreenBitmap.setHasAlpha(false);\n\t\t\t\tmScreenBitmap.prepareToDraw();\n\n\t\t\t\tsaveBitmap2file(context, mScreenBitmap, fileFullPath);\n\t\t\t}\n\t\t}\n\t\t\n\t}" ]
[ "0.7390073", "0.71678996", "0.71494514", "0.70816064", "0.70208395", "0.7005539", "0.68777084", "0.6793097", "0.673738", "0.67288154", "0.6672819", "0.6633908", "0.6625706", "0.64940333", "0.64525265", "0.6444902", "0.6421681", "0.64112014", "0.6382185", "0.6378296", "0.6350722", "0.6350678", "0.63009", "0.6239783", "0.6208345", "0.62002176", "0.6190263", "0.6189162", "0.61726725", "0.61582035", "0.61567074", "0.61523116", "0.6125256", "0.60996366", "0.6082808", "0.607039", "0.60598016", "0.6056934", "0.60540515", "0.6049854", "0.6049607", "0.604618", "0.60441947", "0.6033017", "0.5997208", "0.59962195", "0.5990899", "0.5985755", "0.59838957", "0.59774584", "0.59710336", "0.59688175", "0.5956528", "0.59492975", "0.592378", "0.58913386", "0.58909327", "0.58844924", "0.5860585", "0.5827361", "0.5804513", "0.5803322", "0.5799787", "0.57989603", "0.5794977", "0.5792321", "0.57890105", "0.5780364", "0.57745177", "0.57649803", "0.57648283", "0.5759936", "0.57599044", "0.5754292", "0.5738997", "0.5732733", "0.57208556", "0.5719713", "0.5719584", "0.5712479", "0.5712164", "0.5712164", "0.56977344", "0.56951696", "0.5693839", "0.5688961", "0.567448", "0.56728846", "0.56590503", "0.5658886", "0.5646118", "0.5645075", "0.56447214", "0.56238645", "0.56173337", "0.56144273", "0.5602497", "0.5600515", "0.55987614", "0.55979264" ]
0.6063615
36
Describes ExpectedCondition when element with locator can have different texts.
protected final ExpectedCondition<WebElement> anyTextToBePresentInElementLocated(final By by, final List<String> text) { return new ExpectedCondition<WebElement>() { @Override public WebElement apply(final WebDriver driver) { try { driver.manage().timeouts().implicitlyWait(0, TimeUnit.SECONDS); final List<WebElement> candidates = driver.findElements(by); for (final WebElement item : candidates) { for (final String msg : text) { Page.log.debug("Looking for " + msg); if (item.isDisplayed() && item.getText().contains(msg)) { return item; } } } return null; } catch (final StaleElementReferenceException e) { return this.apply(driver); } finally { driver.manage().timeouts(). implicitlyWait(Environment.TIMEOUT, TimeUnit.SECONDS); } } }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Then(\"^assert that the text \\\"([^\\\"]*)\\\" element has \\\"([^\\\"]*)\\\"$\")\n\tpublic void assert_that_the_text_element_has(String arg1, String arg2) throws Throwable {\n\t\tString[] parts = arg1.split(\"=\");\n\t\tString selector=parts[1];\n\t\tString result = driver.findElement(By.cssSelector(selector)).getText();\n\t\tAssert.assertTrue(\"Text is not included\", result.contains(arg2));\n\t\tSystem.out.println(\"Assert \"+ result +\" contain the text : \"+arg2 );\n\t}", "@Then(\"^assert that the text \\\"([^\\\"]*)\\\" element is the text \\\"([^\\\"]*)\\\"$\")\n\tpublic void assert_that_the_text_element_is(String arg1, String arg2) throws Throwable {\n\t\tString[] parts = arg1.split(\"=\");\n\t\tString selector=parts[1];\n\t\tString result = driver.findElement(By.cssSelector(selector)).getText();\n\t\tAssert.assertEquals(result, arg2);\n\t\tSystem.out.println(\"Assert \"+ arg2 +\" is the text : \"+result);\n\t}", "@Then(\"^assert that the text \\\"([^\\\"]*)\\\" element does not have \\\"([^\\\"]*)\\\"$\")\n\tpublic void assert_that_the_text_element_does_not_have(String arg1, String arg2) throws Throwable {\n\t\tString[] parts = arg1.split(\"=\");\n\t\tString selector=parts[1];\n\t\tString result = driver.findElement(By.cssSelector(selector)).getText();\n\t\tAssert.assertTrue(\"Text is present!\", !result.contains(arg2));\n\t\tSystem.out.println(\"Assert \"+ result +\" does not have the text : \"+arg2 );\n\t}", "public void assertText(final String elementLocator, final String text);", "@Then(\"^assert that the text \\\"([^\\\"]*)\\\" element is not \\\"([^\\\"]*)\\\"$\")\n\tpublic void assert_that_the_text_element_is_not(String arg1, String arg2) throws Throwable {\n\t\tString[] parts = arg1.split(\"=\");\n\t\tString selector=parts[1];\n\t\tString result = driver.findElement(By.cssSelector(selector)).getText();\n\t\tassertNotEquals(result,arg2);\n\t\tSystem.out.println(\"Assert \"+ result +\" is not the text : \"+arg2 );\n\t}", "@Test(priority=1)\n\tpublic void verifyText() {\n\t\tString expectedText = \"Facebook helps you connect and share with the people in your life.\";\n\t\tString actualText = driver.findElement(By.cssSelector(\"#content > div > div > div > div > div.lfloat._ohe > div > div\")).getText();\n\t\tAssert.assertEquals(actualText, expectedText);\n\t}", "public static void verify_element_text(By locator, String expectedText) throws CheetahException {\n\t\ttry {\n\t\t\twait_for_element(locator);\n\t\t\tWebElement element = CheetahEngine.getDriverInstance().findElement(locator);\n\t\t\tdriverUtils.highlightElement(element);\n\t\t\tdriverUtils.unHighlightElement(element);\n\t\t\tassertEquals(element.getText().contains(expectedText.trim()), true);\n\t\t} catch (Exception e) {\n\t\t\tthrow new CheetahException(e);\n\t\t}\n\t}", "public void assertTextPresent(final String text);", "public static By for_text_exact(String text) {\n return By.xpath(\"//UIAStaticText[@visible=\\\"true\\\" and (@name=\\\"\" + text\n + \"\\\" or @hint=\\\"\" + text + \"\\\" or @label=\\\"\" + text\n + \"\\\" or @value=\\\"\" + text + \"\\\")]\");\n }", "public boolean hasText(final String elementLocator, final String textPattern);", "public void VerifyFrequentlyBoughtTogetherTitle(String Exptext){\r\n\t\tString[] ExpectedTitle = getValue(Exptext).split(\",\",2);\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Frequently Bought Item title should be present\");\r\n\t\ttry{\r\n\t\t\tList<WebElement> ele = listofelements(locator_split(\"txtTitle\"));\r\n\t\t\tif(getAndVerifyPartialText(ele.get(Integer.valueOf(ExpectedTitle[0])-1), ExpectedTitle[1])){\r\n\t\t\t\tSystem.out.println(ExpectedTitle[1]+\" is present\");\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:- \"+ExpectedTitle[1]+\" is present in Frequenlty bought box\");\r\n\t\t\t} else{ \r\n\t\t\t\tthrow new Error(\"Actual Text: \"+ExpectedTitle[1]+\" is not present\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(NoSuchElementException e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- \"+elementProperties.getProperty(\"txtTitle\").toString() +\" is not Present\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtTitle\").toString()\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\t\tcatch(Error Er){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Expected text - '\"+ExpectedTitle[1]+\" and Actual Text : \"+getText(locator_split(\"txtTitle\"))+\" is not equal from Frequenlty bought box\");\r\n\t\t\tthrow new Error(\"Expected text - '\"+ExpectedTitle[1]+\" and Actual Text : \"+getText(locator_split(\"txtTitle\"))+\" is not equal\");\r\n\t\t}\r\n\t}", "@Test\n\t@TestProperties(name = \"Set element ${by}:${locator} text to '${text}'\", paramsInclude = { \"by\", \"locator\", \"text\" })\n\tpublic void setElementText() {\n\t\tthrow new IllegalStateException(\"Unimplemenetd\");\n\t}", "public void assertTextPresent(String expected, String actual) {\n if ( (actual==null)\n || (actual.indexOf(expected)==-1)\n ) {\n throw new AssertionFailedError(\"expected presence of [\"+expected+\"], but was [\"+actual+\"]\");\n }\n }", "public void VerifyFilterTextSelected(String text, String text1){\r\n\t\tString Text = text + \": \" + text1;\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+Text);\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Filtered value should be displayed \"+Text);\r\n\t\ttry{ \r\n\r\n\t\t\tif(verifySpecificElementContains((locator_split(\"verifyFilter\")),Text)){\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:- Filtered value is displayed and it has Text -\"+Text);\r\n\t\t\t\tSystem.out.println(\"Verified the text -\"+Text);\r\n\t\t\t}else {\r\n\r\n\t\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t\t+ elementProperties.getProperty(\"verifyFilter\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t\t+ \" not found\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(NoSuchElementException e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- \"+elementProperties.getProperty(\"verifyFilter\").toString() +\" is not Present\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"verifyFilter\").toString()\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\r\n\t\tcatch(Error Er){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- The Payment success Expected text - '\"+Text+\" and Actual Tesxt : \"+getText(locator_split(\"verifyFilter\"))+\" is not equal\");\r\n\t\t\tthrow new Error(\"The Payment success Expected test - '\"+Text+\" and Actual Tesxt : \"+getText(locator_split(\"verifyFilter\"))+\" is not equal\");\r\n\t\t}\r\n\t}", "public boolean textToBePresentInElementValue(final By by, final String text) {\n return new WebDriverWait(webDriver, DRIVER_WAIT_TIME)\n .until(ExpectedConditions.textToBePresentInElementValue(by, text));\n }", "public void validarTexto (By elementBy, String expectedText) {\r\n Assert.assertEquals(readText(elementBy), expectedText);\r\n }", "private void verifyTextAndLabels(){\n common.explicitWaitVisibilityElement(\"//*[@id=\\\"content\\\"]/article/h2\");\n\n //Swedish labels\n common.timeoutMilliSeconds(500);\n textAndLabelsSwedish();\n\n //Change to English\n common.selectEnglish();\n\n //English labels\n textAndLabelsEnglish();\n }", "public void isTextPresentInElement(WebElement elem, String text) {\n try {\n driverWait.until(ExpectedConditions.textToBePresentInElement(elem, text));\n System.out.println(\"The text:\" + text + \", is present in the element\");\n } catch (Exception e) {\n Assert.fail(\"The following text hasn't found in the element: \" + text);\n }\n }", "public boolean textToBePresentInElement(WebElement element, String text) {\n return new WebDriverWait(webDriver, DRIVER_WAIT_TIME)\n .until(ExpectedConditions.textToBePresentInElement(element, text));\n }", "public boolean textToBePresentInElementValue(final WebElement element, final String text) {\n return new WebDriverWait(webDriver, DRIVER_WAIT_TIME)\n .until(ExpectedConditions.textToBePresentInElementValue(element, text));\n }", "@Test\n public void testHomepageUsageText()\n {\n try {\n WebElement e = driver.findElement(By.className(\"row\"));\n String elementText = e.getText();\n assertTrue(elementText.contains(\"Used for CS1632 Software Quality Assurance, taught by Bill Laboon\"));\n } catch (NoSuchElementException e) {\n fail();\n }\n }", "@Test\n public void normalCategorySecondRangeInKgAndCm() {\n\n driver.findElement(By.xpath(\"//input[@name='wg']\")).sendKeys(\"81\");\n driver.findElement(By.xpath(\"//input[@name='ht']\")).sendKeys(\"180\");\n driver.findElement(By.xpath(\"//input[@name='cc']\")).click();\n Assert.assertEquals(driver.findElement(By.name(\"desc\")).getAttribute(\"value\"), \"Your category is Normal\",\n \"actual text is not: Your category is Normal\");\n }", "public boolean textToBePresentInElementLocated(final By by, final String text) {\n return new WebDriverWait(webDriver, DRIVER_WAIT_TIME)\n .until(ExpectedConditions.textToBePresentInElementLocated(by, text));\n }", "public static By for_text(String text) {\n String up = text.toUpperCase();\n String down = text.toLowerCase();\n return By.xpath(\"//UIAStaticText[@visible=\\\"true\\\" and (contains(translate(@name,\\\"\" + up\n + \"\\\",\\\"\" + down + \"\\\"), \\\"\" + down + \"\\\") or contains(translate(@hint,\\\"\" + up\n + \"\\\",\\\"\" + down + \"\\\"), \\\"\" + down + \"\\\") or contains(translate(@label,\\\"\" + up\n + \"\\\",\\\"\" + down + \"\\\"), \\\"\" + down + \"\\\") or contains(translate(@value,\\\"\" + up\n + \"\\\",\\\"\" + down + \"\\\"), \\\"\" + down + \"\\\"))]\");\n }", "public boolean verifyPartialText(WebElement ele, String expectedText) {\n\t\ttry {\r\n\t\t\tif(ele.getText().contains(expectedText)) {\r\n\t\t\t\treportSteps(\"Expected text contains the actualText \"+expectedText,\"pass\");\r\n\t\t\t\treturn true;\r\n\t\t\t}else {\r\n\t\t\t\treportSteps(\"Expected text doesn't contain the actualText \"+expectedText,\"fail\");\r\n\t\t\t}\r\n\t\t} catch (WebDriverException e) {\r\n\t\t\tSystem.out.println(\"Unknown exception occured while verifying the Text\");\r\n\t\t} \r\n\t\treturn false;\r\n\t}", "@Test\n public void testHomepageWelcomeText()\n {\n try {\n WebElement e = driver.findElement(By.className(\"lead\"));\n String elementText = e.getText();\n assertTrue(elementText.contains(\"Welcome, friend,\") && elementText.contains(\"to a land of pure calculation\"));\n } catch (NoSuchElementException e) {\n fail();\n }\n }", "public void checkAllHeadlinesContainText(String expectedText){\n List<WebElement> articles = this.articleHeadline.findAll();\n for (WebElement article : articles) {\n Assert.stringContains(\"Title check\", expectedText, article.getText());\n }\n }", "public void VerifyCustomeralsoOrderedtitle(String Exptext){\r\n\t\tString[] ExpText = getValue(Exptext).split(\",\", 2);\r\n\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Title with \"+ExpText[1]+\" should be present in SKU Page\");\r\n\t\ttry{\r\n\t\t\tif(getAndVerifyTextfromList(locator_split(\"txtCustomeralsoOrdered\"), ExpText[1], Integer.valueOf(ExpText[0]))){\r\n\t\t\t\tSystem.out.println(ExpText[1]+\" is present\");\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:- \"+ExpText[1]+\" is present in SKU Page\");\r\n\t\t\t} else{ \r\n\t\t\t\tthrow new Error(\"Actual Text: \"+ExpText[1]+\" is not present in SKU Page\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(NoSuchElementException e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- \"+elementProperties.getProperty(\"txtCustomeralsoOrdered\").toString() +\" is not Present\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCustomeralsoOrdered\").toString()\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\t\tcatch(Error Er){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Actual Text: \"+ExpText[1]+\" is not present in SKU Page\");\r\n\t\t\tthrow new Error(\"Expected text - '\"+ExpText[1]+\" and Actual Text : \"+getText(locator_split(\"txtCustomeralsoOrdered\"))+\" is not equal\");\r\n\t\t}\r\n\t}", "@Test\n public void normalCategoryFirstRangeInKgAndCm() {\n\n\n driver.findElement(By.xpath(\"//input[@name='wg']\")).sendKeys(\"59.3\");\n driver.findElement(By.xpath(\"//input[@name='ht']\")).sendKeys(\"179\");\n driver.findElement(By.xpath(\"//input[@name='cc']\")).click();\n Assert.assertEquals(driver.findElement(By.name(\"desc\")).getAttribute(\"value\"), \"Your category is Normal\",\n \"actual text is not: Your category is Normal\");\n }", "@Test\n public void overweightCategorySecondRangeInKgAndCm() {\n\n driver.findElement(By.xpath(\"//input[@name='wg']\")).sendKeys(\"94\");\n driver.findElement(By.xpath(\"//input[@name='ht']\")).sendKeys(\"177\");\n driver.findElement(By.xpath(\"//input[@name='cc']\")).click();\n Assert.assertEquals(driver.findElement(By.name(\"desc\")).getAttribute(\"value\"), \"Your category is Overweight\",\n \"actual text is not: Your category is Overweight\");\n }", "@Then(\"user verifies that {string} message is displayed\")\n public void user_verifies_that_message_is_displayed(String expectedWarningMessage) {\n\n String actualWarningMessage = loginPage.getWarningMessageText();\n Assert.assertEquals(expectedWarningMessage,actualWarningMessage);\n // Assert.assertTrue(loginPage.warningMessage.isDisplayed()); //if the webelement is setted as public\n\n\n\n }", "@Test(priority = 6)\n @Parameters(\"browser\")\n public void TC06_VERIFY_TEXT_LEARNMORE(String browser)throws IOException{\n String excel_TxtLearnmore = null;\n excel_TxtLearnmore = global.Read_Data_From_Excel(excelPath,\"ELEMENTS\", 5,2);\n if(excel_TxtLearnmore == null){\n System.out.println(\"ERROR - Cell or Row No. is wrong.\");\n exTest.log(LogStatus.ERROR, \"::[\" + browser + \"]:: ERROR - Cell or Row No. is wrong.\" );\n }\n // Locate Element by Xpath\n WebElement ele_TxtLearnmore = null;\n ele_TxtLearnmore = global.Find_Element_By_XPath(driver,excel_TxtLearnmore);\n if(ele_TxtLearnmore == null){\n exTest.log(LogStatus.FAIL,\"::[\" + browser + \"]:: TC06 - Text Learnmore is displayed.\");\n } else {\n exTest.log(LogStatus.PASS,\"::[\" + browser + \"]:: TC06 - Text Learnmore is not displayed.\");\n }\n // Get text from Element.\n String textLearnmoreFF = \"Không phải máy tính của bạn? Hãy sử dụng Cửa sổ riêng tư để đăng nhập. Tìm hiểu thêm\";\n String textLearnmoreGC = \"Không phải máy tính của bạn? Hãy sử dụng chế độ Khách để đăng nhập một cách riêng tư. Tìm hiểu thêm\";\n\n String textGetFromEle_TxtLearnMore = ele_TxtLearnmore.getText();\n System.out.println(\"DEBUG --- \" + textGetFromEle_TxtLearnMore);\n if(browser.equalsIgnoreCase(\"firefox\") && textGetFromEle_TxtLearnMore != null && textGetFromEle_TxtLearnMore.equals(textLearnmoreFF)){\n exTest.log(LogStatus.PASS,\":: [\" + browser + \"]:: TC06.1 - Text Learmore is correct.\");\n } else if(browser.equalsIgnoreCase(\"chrome\") && textGetFromEle_TxtLearnMore != null && textGetFromEle_TxtLearnMore.equals(textLearnmoreGC)){\n exTest.log(LogStatus.PASS,\"::[\" + browser + \"]:: TC06.1 - Text Learmore is correct.\");\n } else {\n exTest.log(LogStatus.FAIL,\"::[\" + browser + \"]:: TC06.1 - Text Learnmore is not correct.\");\n }\n global.Wait_For_Page_Loading(3);\n }", "public void verifyElementText(WebElement element, String text) {\r\n\t\t// _waitForJStoLoad();\r\n\t\tAssert.assertTrue(isElementPresent(element), element.toString() + \" is not present\");\r\n\t\tAssert.assertEquals(element.getText(), text);\r\n\t}", "public void assertStyle(final String elementLocator, final String styleText);", "public final void testAlwaysThereStrings() throws Exception\n {\n mSolo.sleep(TestValues.LET_UI_THREAD_UPDATE_DISPLAY);\n\n // working on a substring as does not work on multi-lines\n // Assert.assertTrue(mSolo.waitForText(mSolo.getString(R.string.mass_import__principle_explanation__label).substring(10)));\n Assert.assertTrue(mSolo.waitForText(mSolo.getString(R.string.mass_import__import__button)));\n\n // let human see the screen\n mSolo.sleep(Common.HUMAN_TIME_FOR_READING);\n }", "@Test\n public void starvationCategory() {\n\n driver.findElement(By.xpath(\"//input[@name='wg']\")).sendKeys(\"47.5\");\n driver.findElement(By.xpath(\"//input[@name='ht']\")).sendKeys(\"178\");\n driver.findElement(By.xpath(\"//input[@name='cc']\")).click();\n Assert.assertEquals(driver.findElement(By.name(\"desc\")).getAttribute(\"value\"), \"Your category is Starvation\",\n \"actual text is not: Your category is Starvation\");\n }", "public void checkElementsToHaveWord(By by, String word){\n List<WebElement> rows = driver.findElements(by);\n\n Iterator<WebElement> iter = rows.iterator();\n\n while (iter.hasNext()) {\n // Iterate one by one\n WebElement item = iter.next();\n // get the text\n String label = item.getText().toLowerCase();\n //check if title contains \"Word\"\n Assert.assertThat(label, containsString(word.toLowerCase()));\n\n }\n }", "@Test(enabled = false)\n public void testCase3() {\n String subHeading = driver.findElement(By.className(\"sub\")).getText();\n Assert.assertTrue(subHeading.contains(\"Practice\"));\n }", "public void assertAttribute(final String elementLocator, final String attributeName, final String textPattern);", "public static void validateTextMessage(WebElement obj, String expectedTextMsg, String objName) throws IOException {\r\n\t\tif (obj.isDisplayed()){\t\t\t\r\n\t\t\tString actualTextMsg = obj.getText().trim();\r\n\t\t\tif( actualTextMsg.equals(expectedTextMsg )){\r\n\t\t\t\t//\t\tSystem.out.println(expectedTextMsg+\" = \"+actualTextMsg);\r\n\t\t\t\tUpdate_Report( \"Pass\", \"validateTextMessage\",\"Expected message : '\" +expectedTextMsg+ \"' matched with actual message : '\" + actualTextMsg +\"'\");\r\n\t\t\t}else{\r\n\t\t\t\tUpdate_Report( \"Fail\", \"validateTextMessage\", \"Expected message '\" + expectedTextMsg + \"' did not match with actual message '\" + actualTextMsg +\"'\");\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tUpdate_Report( \"Fail\", \"validateTextMessage\", objName +\" is not displayed please check your application \");\r\n\t\t}\r\n\t}", "@Test\n public void overweightCategoryFirstRangeInKgAndCm() {\n\n driver.findElement(By.xpath(\"//input[@name='wg']\")).sendKeys(\"85.6\");\n driver.findElement(By.xpath(\"//input[@name='ht']\")).sendKeys(\"185\");\n driver.findElement(By.xpath(\"//input[@name='cc']\")).click();\n Assert.assertEquals(driver.findElement(By.name(\"desc\")).getAttribute(\"value\"), \"Your category is Overweight\",\n \"actual text is not: Your category is Overweight\");\n }", "@Test\n public void underweightCategorySecondRangeInKgAndCm() {\n\n driver.findElement(By.xpath(\"//input[@name='wg']\")).sendKeys(\"58.6\");\n driver.findElement(By.xpath(\"//input[@name='ht']\")).sendKeys(\"178\");\n driver.findElement(By.xpath(\"//input[@name='cc']\")).click();\n Assert.assertEquals(driver.findElement(By.name(\"desc\")).getAttribute(\"value\"), \"Your category is Underweight\",\n \"actual text is not: Your category is Underweight\");\n }", "public void VerifyCustomeralsoViewedTitle(String Exptext){\r\n\t\tString[] ExpText = getValue(Exptext).split(\",\", 2);\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Title with \"+ExpText+\" should be present in SKU Page\");\r\n\t\ttry{\r\n\t\t\tif(getAndVerifyTextfromList(locator_split(\"txtCustomeralsoOrdered\"), ExpText[1], Integer.valueOf(ExpText[0]))){\r\n\t\t\t\tSystem.out.println(ExpText[1]+\" is present\");\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:- \"+ExpText[1]+\" is present in SKU Page\");\r\n\t\t\t} else{ \r\n\t\t\t\tthrow new Error(\"Actual Text: \"+ExpText[1]+\" is not present in SKU Page\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(NoSuchElementException e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- \"+elementProperties.getProperty(\"txtCustomeralsoOrdered\").toString() +\" is not Present\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCustomeralsoOrdered\").toString()\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\t\tcatch(Error Er){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Actual Text: \"+ExpText[1]+\" is not present in SKU Page\");\r\n\t\t\tthrow new Error(\"Expected text - '\"+ExpText[1]+\" and Actual Text : \"+getText(locator_split(\"txtCustomeralsoOrdered\"))+\" is not equal\");\r\n\t\t}\r\n\t}", "private void assertStringContains(final String expected, final String comparison) {\n final String cleanedExpected = expected.replaceAll(\"[\\t\\n]\", \"\")\n .replaceAll(\" {2,}\", \" \");\n final String cleanedTest = comparison.replaceAll(\"[\\t\\n]\", \"\")\n .replaceAll(\" {2,}\", \" \");\n assertTrue(cleanedTest.contains(cleanedExpected));\n }", "public static boolean verifyInnerText(WebElement element, String expectedInnerText) throws InterruptedException {\n\t\ttry {\n\n\t\t\tThread.sleep(2000);\n\t\t\tif (element.isDisplayed() && element.isEnabled()) {\n\t\t\t\tString actualInnerText = element.getText().trim();\n\t\t\t\tif (actualInnerText.equalsIgnoreCase(expectedInnerText.trim())) {\n\t\t\t\t\tSystem.out.println(\"Actual inner text and expected inner text are matching.\");\n\t\t\t\t\treturn true;\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"Actual inner text and expected inner text are not matching.\");\n\t\t\t\t\tSystem.out.println(\"Expected: \" + expectedInnerText + \" but found: \" + actualInnerText);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"element is either not enabled or displayed. \");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Some exception occured.\");\n\t\t\treturn false;\n\t\t}\n\n\t}", "@Test\n public void obesityCategory() {\n\n driver.findElement(By.xpath(\"//input[@name='wg']\")).sendKeys(\"102.7\");\n driver.findElement(By.xpath(\"//input[@name='ht']\")).sendKeys(\"185\");\n driver.findElement(By.xpath(\"//input[@name='cc']\")).click();\n Assert.assertEquals(driver.findElement(By.name(\"desc\")).getAttribute(\"value\"), \"Your category is Overweight\",\n \"actual text is not: Your category is Overweight\");\n }", "@Test(dataProvider = \"expectedTextsUnderCorrespondingIcons\", dataProviderClass = DataProviders.class)\n public void underBenefitIconsTextsTest(int iconIndex, String expectedTextUnderIconWithIndex) {\n String iconsClass = \"benefit-icon\";\n\n // TODO This locator can be improved.\n List<WebElement> underBenefitIconsElements = getDriver()\n .findElements(By.xpath(\"//div[@class='\" + iconsClass + \"']/following::span[@class='benefit-txt']\"));\n\n // TODO This is a bit better, but what do you have in your logs in case of failure ? Just \"Expected true but was false\".\n // TODO Is it possible to improve this message somehow ?\n assertEquals(underBenefitIconsElements.size(), 4);\n assertTrue(underBenefitIconsElements.stream().allMatch(WebElement::isDisplayed));\n assertEquals(expectedTextUnderIconWithIndex, underBenefitIconsElements.get(iconIndex).getText());\n }", "public void waitForTextToBePresentInWebElement(WebElement webElement, String text){\r\n\t\twait.until(ExpectedConditions.textToBePresentInElement(webElement, text));\r\n\t}", "public void waitForTextDisplay(final By by, final String text)\n {\n WebDriverWait myWait = new WebDriverWait(driver, DEFAULT_TIMEOUT, DEFAULT_SLEEP_IN_MILLIS);\n\n ExpectedCondition<Boolean> conditionToCheck = new ExpectedCondition<Boolean>()\n {\n public Boolean apply(final WebDriver input)\n {\n return driver.findElement(by).getText().equalsIgnoreCase(text);\n }\n };\n myWait.ignoring(StaleElementReferenceException.class).until(conditionToCheck);\n }", "public String verifyTextNotPresentByUsingContains(String object, String data) {\n\t\tlogger.debug(\"Verifying the text\");\n\t\ttry {\n\t\t\tString actual = wait.until(explicitWaitForElement(By.xpath(OR.getProperty(object)))).getText().trim();\n\t\t\tString expected = data.trim();\n\n\t\t\tlogger.debug(\"data\" + data);\n\t\t\tlogger.debug(\"act\" + actual);\n\t\t\tif (actual.contains(expected))\n\t\t\t\treturn Constants.KEYWORD_FAIL + \"text present\";\n\t\t\telse\n\t\t\t\treturn Constants.KEYWORD_PASS + \"text not present\";\n\t\t} catch(TimeoutException ex)\n\t\t\n\t\t{\n\t\t\treturn Constants.KEYWORD_FAIL +\"Cause: \"+ ex.getCause();\n\t\t}catch (Exception e) {\n\t\t\n\t\t\treturn Constants.KEYWORD_FAIL + \" Object not found \" + e.getMessage();\n\t\t}\n\t}", "public void VerifyShopinsightTitle(String Exptext){\r\n\t\tString countryy=\"Germany\";\r\n\t\tString ExpectedTitle[] = getValue(Exptext).split(\",\",2);\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Shopping insight title should be present\");\r\n\t\ttry{\r\n\t\t\tif(countryy.contains(countries.get(countrycount))){\r\n\t\t\t\tif(getAndVerifyTextfromList(locator_split(\"txtShoppinginSightDesc\"), ExpectedTitle[1],1)){\r\n\t\t\t\t\tSystem.out.println(ExpectedTitle[1]+\" is present\");\r\n\t\t\t\t\tReporter.log(\"PASS_MESSAGE:- \"+ExpectedTitle[1]+\" is present in Shopping insight box\");\r\n\t\t\t\t} else{ \r\n\t\t\t\t\tthrow new Error(ExpectedTitle[1]+\" is not present\");\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(getAndVerifyTextfromList(locator_split(\"txtTitle\"), ExpectedTitle[1],Integer.valueOf(ExpectedTitle[0]))){\r\n\t\t\t\t\tSystem.out.println(ExpectedTitle[1]+\" is present\");\r\n\t\t\t\t\tReporter.log(\"PASS_MESSAGE:- \"+ExpectedTitle[1]+\" is present in Shopping insight box\");\r\n\t\t\t\t} else{ \r\n\t\t\t\t\tthrow new Error(ExpectedTitle[1]+\" is not present\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(NoSuchElementException e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- \"+elementProperties.getProperty(\"txtTitle\")+\" / \"+elementProperties.getProperty(\"txtShoppinginSightDesc\")+\" is not Present\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtTitle\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtShoppinginSightDesc\")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\t\tcatch(Error Er){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Expected text - '\"+ExpectedTitle[1]+\" is not present in Shopping insight box\");\r\n\t\t\tthrow new Error(\"Expected text - '\"+ExpectedTitle[1]+\" is not present\");\r\n\t\t}\r\n\t}", "public static boolean waitForTextToBePresentOnElement(WebElement element,\n\t\t\tint maxSecondTimeout, String matchText,\n\t\t\tboolean... isFailOnExcaption) throws Exception {\n\t\ttry {\n\t\t\tlogger.info(\"INTO METHOD waitForTextToBePresentOnElement\");\n\t\t\tmaxSecondTimeout = maxSecondTimeout * 20;\n\t\t\twhile ((!element.isDisplayed() && (maxSecondTimeout > 0) && (element\n\t\t\t\t\t.getText().toLowerCase().equalsIgnoreCase(matchText\n\t\t\t\t\t\t\t.toLowerCase().trim())))) {\n\t\t\t\tlogger.info(\"Loading...CountDown=\" + maxSecondTimeout);\n\t\t\t\tThread.sleep(50l);\n\t\t\t\tmaxSecondTimeout--;\n\t\t\t}\n\t\t\tif ((maxSecondTimeout == 0) && (isFailOnExcaption.length != 0)) {\n\t\t\t\tif (isFailOnExcaption[0] == true) {\n\t\t\t\t\tlogger.error(\"Element is not display within \"\n\t\t\t\t\t\t\t+ (maxSecondTimeout / 20) + \"Sec.\");\n\t\t\t\t\tthrow new Exception(\"Element is not display within \"\n\t\t\t\t\t\t\t+ (maxSecondTimeout / 20) + \"Sec.\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tlogger.info(\"OUT OF METHOD waitForTextToBePresentOnElement\");\n\t\t\treturn true;\n\t\t} catch (UnhandledAlertException e) {\n\t\t\tthrow new UnhandledAlertException(\n\t\t\t\t\t\"Unexpected alert is coming->waitForTextToBePresentOnElement->\"\n\t\t\t\t\t\t\t+ e.getMessage());\n\t\t} catch (NoSuchElementException e) {\n\t\t\tthrow new NoSuchElementException(\n\t\t\t\t\t\"The element to be search is not present in the page->waitForTextToBePresentOnElement->\"\n\t\t\t\t\t\t\t+ e.getMessage());\n\t\t} catch (Exception e) {\n\t\t\tthrow new Exception(\n\t\t\t\t\t\"Some exception in waitForTextToBePresentOnElement\"\n\t\t\t\t\t\t\t+ e.getMessage());\n\t\t}\n\t}", "public void assertSearchInputHasLabelText() {\n this.assertElementHasText(By.xpath(SEARCH_INIT_TEXT),\n \"Search Wikipedia\",\n \"Search wikipedia input has not label text 'Search Wikipedia'\");\n }", "public boolean containsSuccessMsg(String txt) {\n\t\n\t\tWebDriverWait wait = new WebDriverWait (driver, 90);\n\t\twait.until(ExpectedConditions.textToBePresentInElementLocated(By.xpath(\"//div/h1\"), Constants.SUCCESS_TITLE));\n\t\t\n\t\treturn driver.getPageSource().contains(txt);\n\t}", "public void assertAttribute(final String attributeLocator, final String textPattern);", "public static void VerifyTitleText_ContentTitle(String xPath, String headerTag){\n\t\tString actualTitleTextContentTitle = null;\n\t\tfor(int i=1; i<=3; i++){\n\t\ttry{\n\t\t\tactualTitleTextContentTitle=Driver.findElement(By.xpath(xPath + i + \"]/\" + headerTag + \"[1]\")).getText();\n\t\t\tAssert.assertEquals(actualTitleTextContentTitle, dataSourceProvider.getProperty(\"Article\" + i + \"Title\"));\n\t\t\tlog.info(\"The Actual AboutUs Title Text is - \"+actualTitleTextContentTitle);\n\t\t\tlog.info(\"The Expected AboutUs Title Text is - \"+dataSourceProvider.getProperty(\"Article\" + i + \"Title\"));\n\t\t\tlog.info(\"TEST PASSED: The Actual and Expected AboutUs Title Text are Same\");\n\t\t}catch(AssertionError e){\n\t\t\tlog.error(\"The Actual AboutUs Title Text is - \"+actualTitleTextContentTitle);\n\t\t\tlog.error(\"The Expected AboutUs Title Text is - \"+dataSourceProvider.getProperty(\"Article\" + i + \"Title\"));\n\t\t\tlog.error(\"TEST FAILED: The Actual and Expected AboutUs TitleText ContentTitle are NOT same\");\n\t\t}catch(org.openqa.selenium.NoSuchElementException e){\n\t\t\tlog.error(\"TEST FAILED: There is No Override article ContentTitle element On TitleText Container\");\n\t\t}\t\t\n\t }\n\t}", "public static void VerifyDescText_ContentDesc(String xPath, String headerTag){\n\t\t\tString actualDescTextContentDesc = null;\n\t\t\tfor(int i=1; i<=3; i++){\n\t\t\ttry{\n\t\t\t\tactualDescTextContentDesc=Driver.findElement(By.xpath(xPath + i + headerTag)).getText();\n\t\t\t\tAssert.assertEquals(actualDescTextContentDesc, dataSourceProvider.getProperty(\"Article\" + i + \"Desc\"));\n\t\t\t\tlog.info(\"The Actual AboutUs Desc Text is - \"+actualDescTextContentDesc);\n\t\t\t\tlog.info(\"The Expected AboutUs Desc Text is - \"+dataSourceProvider.getProperty(\"Article\" + i + \"Desc\"));\n\t\t\t\tlog.info(\"TEST PASSED: The Actual and Expected AboutUs Desc Text are Same\");\n\t\t\t}catch(AssertionError e){\n\t\t\t\tlog.error(\"The Actual AboutUs Desc Text is - \"+actualDescTextContentDesc);\n\t\t\t\tlog.error(\"The Expected AboutUs Desc Text is - \"+dataSourceProvider.getProperty(\"Article\" + i + \"Desc\"));\n\t\t\t\tlog.error(\"TEST FAILED: The Actual and Expected AboutUs DescText ContentDesc are NOT same\");\n\t\t\t}catch(org.openqa.selenium.NoSuchElementException e){\n\t\t\t\tlog.error(\"TEST FAILED: There is No Override article ContentDesc element On DescText Container\");\n\t\t\t}\t\t\n\t\t }\n\t\t}", "public void assertChecked(final String elementLocator);", "@Test\n public void underweightCategoryFirstRangeInKgAndCm() {\n\n driver.findElement(By.xpath(\"//input[@name='wg']\")).sendKeys(\"47\");\n driver.findElement(By.xpath(\"//input[@name='ht']\")).sendKeys(\"177\");\n driver.findElement(By.xpath(\"//input[@name='cc']\")).click();\n Assert.assertEquals(driver.findElement(By.name(\"desc\")).getAttribute(\"value\"), \"Your category is Underweight\",\n \"actual text is not: Your category is Underweight\");\n }", "public void Assert()\n\t{\n\t\tString c=driver.findElement(By.xpath(\"//a[text()='CTS']\")).getText();\n\t\t Assert.assertEquals(\"CTS\", c);\n\t}", "private static boolean isTextPresent(WebDriver driver, By by, String text) {\n\t\ttry {\n\t\t\treturn driver.findElement(by).getText().contains(text);\n\t\t} catch (NullPointerException e) {\n\t\t\treturn false;\n\t\t}\n\t}", "public interface CommonScriptCommands\n{\n /**\n * Asserts that the value of the attribute identified by the given attribute locator matches the given text pattern.\n * \n * @param attributeLocator\n * the attribute locator\n * @param textPattern\n * the text pattern that the attribute value must match\n */\n public void assertAttribute(final String attributeLocator, final String textPattern);\n\n /**\n * Asserts that the value of the attribute identified by the given element locator and attribute name matches the\n * given text pattern.\n * \n * @param elementLocator\n * the element locator\n * @param attributeName\n * the name of the attribute\n * @param textPattern\n * the text pattern that the attribute value must match\n */\n public void assertAttribute(final String elementLocator, final String attributeName, final String textPattern);\n\n /**\n * Asserts that the given checkbox/radio button is checked.\n * \n * @param elementLocator\n * the checkbox/radio button element locator\n */\n public void assertChecked(final String elementLocator);\n\n /**\n * Asserts that the given element has the given class(es).\n * \n * @param elementLocator\n * the element locator\n * @param clazzString\n * the class(es) string\n */\n public void assertClass(final String elementLocator, final String clazzString);\n\n /**\n * Asserts that the number of elements found by using the given element locator is equal to the given count.\n * \n * @param elementLocator\n * the element locator\n * @param count\n * the number of elements\n */\n public void assertElementCount(final String elementLocator, final int count);\n\n /**\n * Asserts that the number of elements found by using the given element locator is equal to the given count.\n * \n * @param elementLocator\n * the element locator\n * @param count\n * the number of elements\n */\n public void assertElementCount(final String elementLocator, final String count);\n\n /**\n * Asserts that the given element is present.\n * \n * @param elementLocator\n * locator identifying the element that should be present\n */\n public void assertElementPresent(final String elementLocator);\n\n /**\n * Asserts that evaluating the given expression matches the given text pattern.\n * \n * @param expression\n * the expression to evaluate\n * @param textPattern\n * the text pattern that the evaluation result must match\n */\n public void assertEval(final String expression, final String textPattern);\n\n /**\n * Asserts that the time needed to load a page does not exceed the given value.\n * \n * @param loadTime\n * maximum load time in milliseconds\n */\n public void assertLoadTime(final long loadTime);\n\n /**\n * Asserts that the time needed to load a page does not exceed the given value.\n * \n * @param loadTime\n * maximum load time in milliseconds\n */\n public void assertLoadTime(final String loadTime);\n\n /**\n * Asserts that the value of the attribute identified by the given attribute locator does NOT match the given text\n * pattern.\n * \n * @param attributeLocator\n * the attribute locator\n * @param textPattern\n * the text pattern that the attribute value must NOT match\n */\n public void assertNotAttribute(final String attributeLocator, final String textPattern);\n\n /**\n * Asserts that the value of the attribute identified by the given element locator and attribute name does NOT match\n * the given text pattern.\n * \n * @param elementLocator\n * the element locator\n * @param attributeName\n * the name of the attribute\n * @param textPattern\n * the text pattern that the attribute value must NOT match\n */\n public void assertNotAttribute(final String elementLocator, final String attributeName, final String textPattern);\n\n /**\n * Asserts that the given checkbox/radio button is unchecked.\n * \n * @param elementLocator\n * the checkbox/radio button element locator\n */\n public void assertNotChecked(final String elementLocator);\n\n /**\n * Asserts that the given element doesn't have the given class(es).\n * \n * @param elementLocator\n * the element locator\n * @param clazzString\n * the class(es) string\n */\n public void assertNotClass(final String elementLocator, final String clazzString);\n\n /**\n * Asserts that the number of elements found by using the given element locator is unequal to the given count.\n * \n * @param elementLocator\n * the element locator\n * @param count\n * the number of elements\n */\n public void assertNotElementCount(final String elementLocator, final int count);\n\n /**\n * Asserts that the number of elements found by using the given element locator is unequal to the given count.\n * \n * @param elementLocator\n * the element locator\n * @param count\n * the number of elements\n */\n public void assertNotElementCount(final String elementLocator, final String count);\n\n /**\n * Asserts that the given element is not present.\n * \n * @param elementLocator\n * locator identifying the element that should be NOT present\n */\n public void assertNotElementPresent(final String elementLocator);\n\n /**\n * Asserts that evaluating the given expression does NOT match the given text pattern.\n * \n * @param expression\n * the expression to evaluate\n * @param textPattern\n * the text pattern that the evaluation result must NOT match\n */\n public void assertNotEval(final String expression, final String textPattern);\n\n /**\n * Asserts that no ID of all selected options of the given select element matches the given pattern.\n * \n * @param selectLocator\n * the select element locator\n * @param idPattern\n * the ID pattern\n */\n public void assertNotSelectedId(final String selectLocator, final String idPattern);\n\n /**\n * Asserts that the option of the given select element at the given index is not selected.\n * \n * @param selectLocator\n * the select element locator\n * @param indexPattern\n * the option index pattern\n */\n public void assertNotSelectedIndex(final String selectLocator, final String indexPattern);\n\n /**\n * Asserts that no label of all selected options of the given select element matches the given pattern.\n * \n * @param selectLocator\n * the select element locator\n * @param labelPattern\n * the label pattern\n */\n public void assertNotSelectedLabel(final String selectLocator, final String labelPattern);\n\n /**\n * Asserts that no value of all selected options of the given select element matches the given pattern.\n * \n * @param selectLocator\n * the select element locator\n * @param valuePattern\n * the value pattern\n */\n public void assertNotSelectedValue(final String selectLocator, final String valuePattern);\n\n /**\n * Asserts that the effective style of the element identified by the given element locator does NOT match the given\n * style.\n * \n * @param elementLocator\n * the element locator\n * @param styleText\n * the style that must NOT match (e.g. <code>width: 10px; overflow: hidden;</code>)\n */\n public void assertNotStyle(final String elementLocator, final String styleText);\n\n /**\n * Asserts that the embedded text of the given element does not contain the given text.\n * \n * @param elementLocator\n * locator identifying the element\n * @param text\n * the text that should not be embedded in the given element\n */\n public void assertNotText(final String elementLocator, final String text);\n\n /**\n * Asserts that the given text is not present on the page.\n * \n * @param text\n * the text that should NOT be present\n */\n public void assertNotTextPresent(final String text);\n\n /**\n * Asserts that the page title does not match the given title.\n * \n * @param title\n * the title that should not match\n */\n public void assertNotTitle(final String title);\n\n /**\n * Asserts that the value of the given element doesn't match the given value. If the element is a &lt;textarea&gt;\n * this method asserts that the containing text doesn't match the given value.\n * \n * @param elementLocator\n * locator identifying the element whose value doesn't match the given value\n * @param valuePattern\n * the value that doesn't match the given element's value\n */\n public void assertNotValue(String elementLocator, String valuePattern);\n\n /**\n * Asserts that the given element is invisible.\n * \n * @param elementLocator\n * the element locator.\n */\n public void assertNotVisible(final String elementLocator);\n\n /**\n * Asserts that the number of elements locatable by the given XPath expression is not equal to the given count.\n * \n * @param xpath\n * the XPath expression\n * @param count\n * the number of elements that should NOT be equal to the actual number of elements matching the given\n * XPath expression\n */\n public void assertNotXpathCount(final String xpath, final int count);\n\n /**\n * Asserts that the number of elements locatable by the given XPath expression is not equal to the given count.\n * \n * @param xpath\n * the XPath expression\n * @param count\n * the number of elements that should NOT be equal to the actual number of elements matching the given\n * XPath expression\n */\n public void assertNotXpathCount(final String xpath, final String count);\n\n /**\n * Asserts that the size of the actual page (including images etc.) does not exceed the given value.\n * \n * @param pageSize\n * the number of bytes the page size must not exceed\n */\n public void assertPageSize(final long pageSize);\n\n /**\n * Asserts that the size of the actual page (including images etc.) does not exceed the given value.\n * \n * @param pageSize\n * the number of bytes the page size must not exceed\n */\n public void assertPageSize(final String pageSize);\n\n /**\n * Asserts that the ID of at least one selected option of the given select element matches the given pattern.\n * \n * @param selectLocator\n * the select element locator\n * @param idPattern\n * ID pattern\n */\n public void assertSelectedId(final String selectLocator, final String idPattern);\n\n /**\n * Asserts that the option of the given select element at the given index is selected.\n * \n * @param selectLocator\n * the select element locator\n * @param indexPattern\n * the option index pattern\n */\n public void assertSelectedIndex(final String selectLocator, final String indexPattern);\n\n /**\n * Asserts that the label of at least one selected option of the given select element matches the given pattern.\n * \n * @param selectLocator\n * the select element locator\n * @param labelPattern\n * the label pattern\n */\n public void assertSelectedLabel(final String selectLocator, final String labelPattern);\n\n /**\n * Asserts that the value of at least one selected option of the given select element matches the given pattern.\n * \n * @param selectLocator\n * the select element locator\n * @param valuePattern\n * the value pattern\n */\n public void assertSelectedValue(final String selectLocator, final String valuePattern);\n\n /**\n * Asserts that the effective style of the element identified by the given element locator matches the given style.\n * \n * @param elementLocator\n * the element locator\n * @param styleText\n * the style to match (e.g. <code>width: 10px; overflow: hidden;</code>)\n */\n public void assertStyle(final String elementLocator, final String styleText);\n\n /**\n * Asserts that the text embedded by the given element contains the given text.\n * \n * @param elementLocator\n * locator identifying the element whose text should contain the given text\n * @param text\n * the text that should be embedded in the given element\n */\n public void assertText(final String elementLocator, final String text);\n\n /**\n * Asserts that the given text is present.\n * \n * @param text\n * the text that should be present\n */\n public void assertTextPresent(final String text);\n\n /**\n * Asserts that the given title matches the page title.\n * \n * @param title\n * the title that should match the page title\n */\n public void assertTitle(final String title);\n\n /**\n * Asserts that the value of the given element matches the given value. If the element is a &lt;textarea&gt; this\n * method asserts that the containing text matches the given value.\n * \n * @param elementLocator\n * locator identifying the element whose value should match the given value\n * @param valuePattern\n * the value that should match the given element's value\n */\n public void assertValue(String elementLocator, String valuePattern);\n\n /**\n * Asserts that the given element is visible.\n * \n * @param elementLocator\n * the element locator\n */\n public void assertVisible(final String elementLocator);\n\n /**\n * Asserts that the number of elements locatable by the given XPath expression is equal to the given count.\n * \n * @param xpath\n * the XPath expression\n * @param count\n * the number of elements that must match the given XPath expression\n */\n public void assertXpathCount(final String xpath, final int count);\n\n /**\n * Asserts that the number of elements locatable by the given XPath expression is equal to the given count.\n * \n * @param xpath\n * the XPath expression\n * @param count\n * the number of elements that must match the given XPath expression\n */\n public void assertXpathCount(final String xpath, final String count);\n\n /**\n * Closes the browser.\n */\n public void close();\n\n /**\n * Creates a new cookie. The new cookie will be stored as session cookie for the current path and domain.\n * \n * @param cookie\n * name value pair of the new cookie\n */\n public void createCookie(final String cookie);\n\n /**\n * Creates a new cookie.\n * \n * @param cookie\n * name value pair of the new cookie\n * @param options\n * cookie creation options (path, max_age and domain)\n */\n public void createCookie(final String cookie, final String options);\n\n /**\n * Removes all cookies visible to the current page.\n */\n public void deleteAllVisibleCookies();\n\n /**\n * Removes the cookie with the specified name.\n * \n * @param name\n * the cookie's name\n */\n public void deleteCookie(final String name);\n\n /**\n * Removes the cookie with the specified name.\n * \n * @param name\n * the cookie's name\n * @param options\n * cookie removal options (path, domain and recurse)\n */\n public void deleteCookie(final String name, final String options);\n\n /**\n * Prints the given message to the log.\n * \n * @param message\n * the message to print\n */\n public void echo(final String message);\n\n /**\n * Returns whether or not the given expression evaluates to <code>true</code>.\n * \n * @param jsExpression\n * the JavaScript expression to evaluate\n * @return <code>true</code> if and only if the given JavaScript expression is not blank and evaluates to\n * <code>true</code>\n */\n public boolean evaluatesToTrue(final String jsExpression);\n\n /**\n * Returns the result of evaluating the given JavaScript expression.\n * \n * @param jsExpression\n * the JavaScript expression to evaluate\n * @return result of evaluation\n */\n public String evaluate(final String jsExpression);\n\n /**\n * Returns the value of the given element attribute locator.\n * \n * @param attributeLocator\n * the element attribute locator\n * @return value of given element attribute locator\n */\n public String getAttribute(final String attributeLocator);\n\n /**\n * Returns the value of the given element and attribute.\n * \n * @param elementLocator\n * the element locator\n * @param attributeName\n * the name of the attribute\n * @return value of given element attribute locator\n */\n public String getAttribute(final String elementLocator, final String attributeName);\n\n /**\n * Returns the number of matching elements.\n * \n * @param elementLocator\n * the element locator\n * @return number of elements matching the given locator\n */\n public int getElementCount(final String elementLocator);\n\n /**\n * Returns the (visible) text of the current page.\n * \n * @return the page's (visible) text\n */\n public String getPageText();\n\n /**\n * Returns the (visible) text of the given element. If the element is not visible, the empty string is returned.\n * \n * @param elementLocator\n * the element locator\n * @return the element's (visible) text\n */\n public String getText(final String elementLocator);\n\n /**\n * Returns the title of the current page.\n * \n * @return page title\n */\n public String getTitle();\n\n /**\n * Returns the value of the given element. If the element doesn't have a value, the empty string is returned.\n * \n * @param elementLocator\n * the element locator\n * @return the element's value\n */\n public String getValue(final String elementLocator);\n\n /**\n * Returns the number of elements matching the given XPath expression.\n * \n * @param xpath\n * the XPath expression\n * @return number of matching elements\n */\n public int getXpathCount(final String xpath);\n\n /**\n * Returns whether or not the value of the attribute identified by the given attribute locator matches the given\n * text pattern.\n * \n * @param attributeLocator\n * the attribute locator\n * @param textPattern\n * the text pattern\n * @return <code>true</code> if the attribute value matches the given pattern, <code>false</code> otherwise\n */\n public boolean hasAttribute(final String attributeLocator, final String textPattern);\n \n /**\n * Returns whether or not the value of the given element and attribute matches the given text pattern.\n * \n * @param elementLocator\n * the element locator\n * @param attributeName\n * the name of the attribute\n * @param textPattern\n * the text pattern\n * @return <code>true</code> if the attribute value matches the given pattern, <code>false</code> otherwise\n */\n public boolean hasAttribute(final String elementLocator, final String attributeName, final String textPattern);\n\n /**\n * Returns whether or not the given element has the given class(es).\n * \n * @param elementLocator\n * the element locator\n * @param clazz\n * the class string (multiple CSS classes separated by whitespace)\n * @return <code>true</code> if the element's class attribute contains all of the given class(es),\n * <code>false</code> otherwise\n */\n public boolean hasClass(final String elementLocator, final String clazz);\n\n /**\n * Returns whether or not the given element has the given style; that is, all of the given CSS properties must match\n * the element's actual style.\n * \n * @param elementLocator\n * the element locator\n * @param style\n * the CSS style text to check (e.g. <code>width: 10px; overflow: hidden;</code>)\n * @return <code>true</code> if ALL of the given CSS properties match the elements actual style, <code>false</code>\n * otherwise\n */\n public boolean hasStyle(final String elementLocator, final String style);\n \n /**\n * Returns whether or not the given element doesn't have the given class(es); that is, its class attribute doesn't\n * contain any of the given class(es).\n * \n * @param elementLocator\n * the element locator\n * @param clazz\n * the class string (multiple CSS classes separated by whitespace)\n * @return <code>true</code> if the element's class attribute does not contains any of the given class(es),\n * <code>false</code> otherwise\n */\n public boolean hasNotClass(final String elementLocator, final String clazz);\n\n /**\n * Returns whether or not the given element doesn't have the given style; that is, none of the given CSS properties\n * must match the element's actual style.\n * \n * @param elementLocator\n * the element locator\n * @param style\n * the CSS style text to check (e.g. <code>width: 10px; overflow: hidden;</code>)\n * @return <code>true</code> if NONE of the given CSS properties match the element's actual style,\n * <code>false</code> otherwise\n */\n public boolean hasNotStyle(final String elementLocator, final String style);\n \n /**\n * Checks that the text embedded by the given element contains the given text.\n * \n * @param elementLocator\n * locator identifying the element whose text should contain the given text\n * @param textPattern\n * the text that should be embedded in the given element\n * @return <code>true</code> the text embedded by the given element contains the given text, <code>false</code>\n * otherwise\n */\n public boolean hasText(final String elementLocator, final String textPattern);\n \n\n /**\n * Checks that the given title matches the page title.\n * \n * @param title\n * the title that should match the page title\n * @return <code>true</code> if the given title matches the page title, <code>false</code> otherwise\n */\n public boolean hasTitle(final String title);\n \n /**\n * Checks that the value of the given element matches the given value. If the element is a &lt;textarea&gt; this\n * method checks that the containing text matches the given value.\n * \n * @param elementLocator\n * locator identifying the element whose value should match the given value\n * @param valuePattern\n * the value that should match the given element's value\n * @return <code>true</code> if the value of the given element matches the given value, <code>false</code> otherwise\n */\n public boolean hasValue(final String elementLocator, final String valuePattern);\n \n /**\n * Returns whether or not the element identified by the given element locator is checked.\n * \n * @param elementLocator\n * the element locator\n * @return <code>true</code> if the element identified by the given element locator is checked, <code>false</code>\n * otherwise\n */\n public boolean isChecked(final String elementLocator);\n\n /**\n * Returns whether or not there is an element for the given locator.\n * \n * @param elementLocator\n * the element locator\n * @return <code>true</code> if there at least one element has been found for the given locator, <code>false</code>\n * otherwise\n */\n public boolean isElementPresent(final String elementLocator);\n\n /**\n * Returns whether or not the given element is enabled.\n * \n * @param elementLocator\n * the element locator\n * @return <code>true</code> if element was found and is enabled, <code>false</code> otherwise\n */\n public boolean isEnabled(final String elementLocator);\n\n /**\n * Returns whether or not the result of evaluating the given expression matches the given text pattern.\n * \n * @param expression\n * the expression to evaluate\n * @param textPattern\n * the text pattern\n * @return <code>true</code> if the evaluation result matches the given pattern, <code>false</code> otherwise\n */\n public boolean isEvalMatching(final String expression, final String textPattern);\n\n \n /**\n * Checks that the given text is present.\n * \n * @param textPattern\n * the text that should be present\n * @return <code>true</code> if the given text is present, <code>false</code> otherwise\n */\n public boolean isTextPresent(final String textPattern);\n \n\n \n /**\n * Returns whether or not the given element is visible.\n * \n * @param elementLocator\n * the element locator\n * @return <code>true</code> if element was found and is visible, <code>false</code> otherwise\n */\n public boolean isVisible(final String elementLocator);\n\n /**\n * Sets the timeout to the given value.\n * \n * @param timeout\n * the new timeout in milliseconds\n */\n public void setTimeout(final long timeout);\n\n /**\n * Sets the timeout to the given value.\n * \n * @param timeout\n * the new timeout in milliseconds\n */\n public void setTimeout(final String timeout);\n\n /**\n * Stores the given text to the given variable.\n * \n * @param text\n * the text to store\n * @param variableName\n * the variable name\n */\n public void store(final String text, final String variableName);\n\n /**\n * Stores the value of the attribute identified by the given attribute locator to the given variable.\n * \n * @param attributeLocator\n * the attribute locator\n * @param variableName\n * the variable name\n */\n public void storeAttribute(final String attributeLocator, final String variableName);\n\n /**\n * Stores the value of the given element and attribute to the given variable.\n * \n * @param elementLocator\n * the element locator\n * @param attributeName\n * the name of the attribute\n * @param variableName\n * the variable name\n */\n public void storeAttribute(final String elementLocator, final String attributeName, final String variableName);\n\n /**\n * Stores that the number of elements found by using the given element locator to the given variable.\n * \n * @param elementLocator\n * the element locator\n * @param variableName\n * the variable name\n */\n public void storeElementCount(final String elementLocator, final String variableName);\n\n /**\n * Stores the result of evaluating the given expression to the given variable.\n * \n * @param expression\n * the expression to evaluate\n * @param variableName\n * the variable name\n */\n public void storeEval(final String expression, final String variableName);\n\n /**\n * Stores the text of the element identified by the given locator to the given variable.\n * \n * @param elementLocator\n * the element locator\n * @param variableName\n * the variable\n */\n public void storeText(final String elementLocator, final String variableName);\n\n /**\n * Stores the title of the currently active document to the given variable.\n * \n * @param variableName\n * the variable\n */\n public void storeTitle(final String variableName);\n\n /**\n * Stores the value (in case of a <code>&lt;textarea&gt;</code> the contained text) of the element identified by the\n * given locator to the given variable.\n * \n * @param elementLocator\n * the element locator\n * @param variableName\n * the variable\n */\n public void storeValue(final String elementLocator, final String variableName);\n\n /**\n * Stores the number of elements matching the given XPath expression to the given variable.\n * \n * @param xpath\n * the XPath expression\n * @param variableName\n * the variable\n */\n public void storeXpathCount(final String xpath, final String variableName);\n}", "public boolean hasAttribute(final String elementLocator, final String attributeName, final String textPattern);", "public static void waitFortextToBePresentInElementLocated(WebDriver driver,\n\t\t\tBy locator, final String sText) {\n\t\tWebDriverWait wait = new WebDriverWait(driver,\n\t\t\t\tInteger.parseInt(getConfigValues(\"timeOutInSeconds\")));\n\t\twait.until(ExpectedConditions.textToBePresentInElementLocated(locator,\n\t\t\t\tsText));\n\t}", "protected void waitForTextToBePresentInElement(By locator, String text, Integer... timeOutInSeconds) {\n int attempts = 0;\n while (attempts < 2) {\n try {\n waitFor(ExpectedConditions.textToBePresentInElement(find(locator), text),\n timeOutInSeconds.length > 0 ? timeOutInSeconds[0] : null);\n break;\n } catch (StaleElementReferenceException e) {\n log.error(e.toString());\n }\n attempts++;\n }\n }", "public void compare(String message, String expect) {\n\t\tString actual = widget.getText();\n\t\t// replace all platform specific delimiters\n\t\tactual = actual.replaceAll(Text.DELIMITER, \"\\n\");\n\t\tassertEquals(message, expect, actual);\n\t}", "public void assertElementPresent(final String elementLocator);", "public String verifyButtonTextByValue(String object, String data) {\n\t\tlogger.debug(\"Verifying the button text\");\n\t\ttry {\n\t\t\tString actual = wait.until(explicitWaitForElement(By.xpath(OR.getProperty(object)))).getAttribute(OR.getProperty(\"ATTRIBUTE_VALUE\"));\n\t\t\tString expected = data;\n\t\t\tlogger.debug(\"actual\" + actual);\n\t\t\tlogger.debug(\"expected\" + expected);\n\t\t\tif (actual.equals(expected))\n\t\t\t\treturn Constants.KEYWORD_PASS;\n\t\t\telse\n\t\t\t\treturn Constants.KEYWORD_FAIL + \" -- Button text not verified \" + actual + \" -- \" + expected;\n\t\t} \n\t\tcatch(TimeoutException ex)\n\t\t{\n\t\t\treturn Constants.KEYWORD_FAIL +\"Cause: \"+ ex.getCause();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\n\t\t\treturn Constants.KEYWORD_FAIL + \" Object not found \" + e.getMessage();\n\t\t}\n\n\t}", "public void verifyAlertText(String message) {\n\t\tboolean assertion = message.equals(uiElementAction.getTextfromAlert());\n\t\tLog.info(\"Alert message is correct : \" + assertion);\n\t\tAssert.assertTrue(\"Alert message is correct : \" + assertion, assertion);\n\t}", "public void verifyText(String classname,String desiredtext) throws IOException{\r\n\t\tString S= driver.findElementByClassName(classname).getText();\r\n\t\tif (S.equalsIgnoreCase(desiredtext));\r\n\t\t\tSystem.out.println(\"First Name Verified Successfully\");\r\n\t}", "public DescriptionBuilder setExpected(String expectedContent) {\n descriptor.setExpected(expectedContent);\n return this;\n }", "@Then(\"User should be navigated to Conditions page on clicking conditions tab\")\n\tpublic static void services_positive_tc_003() throws IOException {\n\t\ttry {\n\t\t\tclick(\"conditions\");\n\t\t\tpage_wait(60);\n\t\t\tstr=driver.findElement(By.xpath(OR_reader(\"Object Locator\",\"conditions_title\"))).isDisplayed();\n\t\t\tAssert.assertEquals(str, true);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\ttakeScreenShot(\"services_positive_tc_003\");\n\t\t}\n\t}", "@Test\n public void checkDaySelected() {\n WebElement inputForms = driver.findElement(By.xpath(\"(//ul[@class='nav navbar-nav']//a)[1]\"));\n wait.until(ExpectedConditions.elementToBeClickable(inputForms)).click();\n\n WebElement selectDropdownList = driver.findElement(By.xpath(\"//ul[@class=\\\"dropdown-menu\\\"]//a[text()=\\\"Select Dropdown List\\\"]\"));\n wait.until(ExpectedConditions.elementToBeClickable(selectDropdownList)).click();\n\n WebElement selectForm = driver.findElement(By.xpath(\"//*[@id='select-demo']\"));\n wait.until(ExpectedConditions.elementToBeClickable(selectForm)).click();\n\n WebElement pickFriday = driver.findElement(By.xpath(\"//*[text() = 'Friday']\"));\n wait.until(ExpectedConditions.elementToBeClickable(pickFriday)).click();\n\n String theTextWeCheck = \"Day selected :- Friday\";\n String theTextWeReceived = driver.findElement(By.xpath(\"//p[@class='selected-value']\")).getText();\n\n Assert.assertEquals(theTextWeReceived, theTextWeCheck);\n }", "public void assertTextPresent ( final String text ) {\r\n try {\r\n assertTrue( driver.getPageSource().contains( text ) );\r\n }\r\n catch ( final Exception e ) {\r\n fail();\r\n }\r\n }", "@Test\n public void testDashboardLink() {\n dashboardPage.clickOnDashboardNavLink();\n //expected result: user is on dashboard \n \n String expectedPanelHeadingText = \"Dashboard\";\n String actualPanelHeadingText = dashboardPage.getPanelHeadingText();\n \n assertTrue(\"Failed - panel heading texts don't match\", expectedPanelHeadingText.equals(actualPanelHeadingText));\n \n}", "public void assertNotText(final String elementLocator, final String text);", "private void helperMethod(WebElement element, WebElement categoryIndicator) {\r\n try {\r\n wait.until(ExpectedConditions.textToBePresentInElement(element, categoryIndicator.getText()));\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }", "private void checkPassedResult_EnrollmentWizard_UI(WebDriver driver, String expectedPassed){\n\t\tBy by = By.xpath(\"//tr[descendant::td[contains(text(),'\"+Success_Msg+\"')]]/td[2]\");\n\t\tString failed = WebDriverUtils.getText(driver, by);\n\t\tJUnitAssert.assertEquals(expectedPassed, failed);\n\t}", "public void assertTextPresent ( final String text ) {\n try {\n assertTrue( driver.getPageSource().contains( text ) );\n }\n catch ( final Exception e ) {\n fail();\n }\n }", "@Then(\"^It must say \\\"([^\\\"]*)\\\"$\")\r\n\r\n\tpublic void it_must_say(String arg1) throws Throwable {\n\r\n\t\tif (ExpectedTitle.equals(ActualTitle)){\r\n\r\n\t\t\tSystem.out.println(\"Test Passed\");\r\n\r\n\t\t}else\r\n\r\n\t\t\tSystem.out.println(\"Test Failed\");\t\r\n\t\t\r\n\t\t\t\r\n\t\tdriver.quit();\r\n\t\t\r\n\r\n\t\t}", "public interface ExpectedCondition<T> extends Function<WebDriver, T> {}", "@Then(\"^'Login and password are required' message should be displayed$\")\n public void loginAndPasswordAreRequiredMessageShouldBeDisplayed() throws Throwable {\n }", "@Then(\"^items displayed as per choice made$\")\n\tpublic void items_displayed_as_per_choice_made() throws Throwable {\n\t\tString str = driver.findElement(By.xpath(\"//*[@id=\\\"center_column\\\"]/h1/span[2]\")).getText();\n\t\tassertEquals(\"7 results have been found.\", str);\n\t\tdriver.quit();\n\t}", "public void verifyThanksMessageTextAfterEndingAboutContentStructure(String text)\r\n\t {\r\n\t\t WebElement element_greetings_message=about_content_structure_end_thank_you_text.get(2);\r\n\t\t textVerification(element_greetings_message, text);\r\n\t }", "public void assertTextPresentIgnoreCase(String expected, String actual) {\n assertTextPresent(expected.toLowerCase(), actual.toLowerCase());\n }", "@Test\n public void testHelloNoTrail()\n {\n driver.findElement(By.linkText(\"Hello\")).click();\n WebElement e = driver.findElement(By.className(\"jumbotron\"));\n String elementText = e.getText();\n assertTrue(elementText.contains(\"Hello CS1632, from Prof. Laboon!\"));\n }", "public static void VerifyHeaderItem_CommonComponent_Div_Div2_P(String renderingControl){\t\t\t\t\n\t\ttry{\n\t\t\tactualHeaderText=sitecoreObj.aboutusCommonComponent_Div_Div2_P.isDisplayed();\n\t\t\tAssert.assertEquals(actualHeaderText, true);\n\t\t\tlog.info(\"The Actual AboutUs \" + renderingControl + \" Description - <\"+sitecoreObj.aboutusCommonComponent_Div_Div2_P.getTagName()+\">\");\n\t\t\tlog.info(\"The Expected AboutUs \" + renderingControl + \" Description - <p>\");\t\n\t\t\tlog.info(\"TEST PASSED: The Actual and Expected AboutUs \" + renderingControl + \" Description are Same\");\n\t\t}catch(AssertionError e){\n\t\t\tlog.error(\"The Actual AboutUs \" + renderingControl + \" Description - <\"+sitecoreObj.aboutusCommonComponent_Div_Div2_P.getTagName()+\">\");\n\t\t\tlog.error(\"The Expected AboutUs \" + renderingControl + \" Description - <p>\");\t\t\t\t\t\t\n\t\t\tlog.error(\"TEST FAILED: The Actual and Expected AboutUs \" + renderingControl + \" Description are NOT same\");\n\t\t}catch(org.openqa.selenium.NoSuchElementException e){\n\t\t\tlog.error(\"TEST FAILED: There is No Description On \" + renderingControl + \" element\");\n\t\t}\n\t}", "@Entao(\"o sistema deve exibir o form de busca por Componentes\")\n public void o_sistema_deve_exibir_o_form_de_busca_por_componentes() {\n String expected;\n expected = \"Consulta de Componentes Curriculares\";\n String actual = driver.findElement(By.cssSelector(\"#corpo > h2\")).getText();\n Assert.assertEquals(expected, actual);\n }", "public String verifyButtonText(String object, String data) {\n\t\tlogger.debug(\"Verifying the button text\");\n\t\ttry {\n\n\t\t\tString actual = wait.until(explicitWaitForElement((By.xpath(OR.getProperty(object))))).getText();\n\t\t\tString expected = data.trim();\n\t\t\tif (actual.equals(expected))\n\t\t\t\treturn Constants.KEYWORD_PASS;\n\t\t\telse\n\t\t\t\treturn Constants.KEYWORD_FAIL + \" -- Button text not verified \" + actual + \" -- \" + expected;\n\t\t} \n\t\tcatch(TimeoutException ex)\n\t\t{\n\t\t\treturn Constants.KEYWORD_FAIL +\"TimeoutCause: \"+ ex.getCause();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\treturn Constants.KEYWORD_FAIL + \" Object not found \" + e.getMessage();\n\t\t\t\t\t}\n\n\t}", "public void VerifyShowOnlyInkAndTonerLink(String text){\r\n\t\tString Text = getValue(text);\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+Text);\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Show Only Ink And Toner Link - '\"+Text+\"' should be displayed\");\r\n\t\ttry{\r\n\t\t\tif(getText(locator_split(\"lnkShowOnlyInkAndToner\")).equalsIgnoreCase(Text)){\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:- Show Only Ink And Toner Link - '\"+Text+\"' is displayed\");\r\n\t\t\t\tSystem.out.println(\"Verified the Text -\"+Text);\r\n\t\t\t}else {\r\n\t\t\t\tReporter.log(\"FAIL_MESSAGE:- Show Only Ink And Toner Link - '\"+Text+\"' is not displayed\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Show Only Ink And Toner Link - '\"+Text+\"' is not displayed\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"lnkShowOnlyInkAndToner\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\t}", "public void lookAndFeelOfNotificationModal() {\n String actualBanner1 = UtilityHelper.elementGetText(UnavailableItems_Modal.findElement(By.xpath(\".//p[1]\")));\n String actualBanner2 = UtilityHelper.elementGetText(UnavailableItems_Modal.findElement(By.xpath(\".//p[2]\")));\n String actualBanner3 = UtilityHelper.elementGetText(UnavailableItems_Modal.findElement(By.xpath(\".//p[3]\")));\n Assert.assertEquals(\"Verify Unavailable Modal Banner Text 1: \", Constants.UnavailableBannerText1, actualBanner1);\n Assert.assertEquals(\"Verify Unavailable Modal Banner Text 2: \", Constants.UnavailableBannerText2, actualBanner2);\n Assert.assertEquals(\"Verify Unavailable Modal Banner Text 3: \", Constants.UnavailableBannerText3, actualBanner3);\n Assert.assertTrue(\"Verify Unavailable Modal Button: \", UtilityHelper.isDisplayed(UnavailableItems_Modal_Button));\n }", "public static void waitFortextToBePresentInElement(WebDriver driver,\n\t\t\tfinal WebElement element, final String sText) {\n\t\tWebDriverWait wait = new WebDriverWait(driver,\n\t\t\t\tInteger.parseInt(getConfigValues(\"timeOutInSeconds\")));\n\t\twait.until(ExpectedConditions.textToBePresentInElement(element, sText));\n\t}", "public void process(WebDriver driver, WebElement element, String data) {\n\t\tActions action = new Actions(driver);\r\n\t\taction.moveToElement(element).build().perform();\r\n\t\tWebElement toolTipElement = driver.findElement(By\r\n\t\t\t\t.className(\"tooltip-inner\"));\r\n\t\tString toolTipText = toolTipElement.getText().trim();\r\n\t\tSystem.out.println(\"Tooltip message is \t\t\" + toolTipText);\r\n\t\tSystem.out.println(\"Data message is \t\t\" + data);\r\n\r\n\t\tArrayList<String> dataList = new ArrayList<String>(Arrays.asList(data\r\n\t\t\t\t.split(\"\\\\s+\")));\r\n\t\tArrayList<String> toolTipList = new ArrayList<String>(\r\n\t\t\t\tArrays.asList(toolTipText.split(\"\\\\s+\")));\r\n\r\n\t\tArrayList<String> al3 = new ArrayList<String>();\r\n\t\tfor (String temp : dataList)\r\n\t\t\tal3.add(toolTipList.contains(temp) ? \"Yes\" : \"No\");\r\n\t\tSystem.out.println(al3);\r\n\r\n\t\tif (data.trim().equals(toolTipText.trim())) {\r\n\t\t\tSystem.out.println(\"Text Macthes\");\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"Text Not Present\");\r\n\t\t\tthrow new InputMismatchException();\r\n\t\t}\r\n\t\tSystem.out.println(\"done\");\r\n\t}", "public static void VerifyCommonComponent_3DIVs_P(String renderingControl){\n\t\tboolean actualSideBySideText = false;\n\t\ttry{\n\t\t\tactualSideBySideText=sitecoreObj.aboutusCommonComponent_3DIVs_P.isDisplayed();\n\t\t\tAssert.assertEquals(actualSideBySideText, true);\n\t\t\tlog.info(\"The Actual AboutUs \" + renderingControl + \" Text - <\"+sitecoreObj.aboutusCommonComponent_3DIVs_P.getTagName()+\">\");\n\t\t\tlog.info(\"The Expected AboutUs \" + renderingControl + \" Text - <p>\");\n\t\t\tlog.info(\"TEST PASSED: The Actual and Expected AboutUs \" + renderingControl + \" Texts are Same\");\n\t\t}catch(AssertionError e){\n\t\t\tlog.error(\"The Actual AboutUs \" + renderingControl + \" Text - <\"+sitecoreObj.aboutusCommonComponent_3DIVs_P.getTagName()+\">\");\n\t\t\tlog.error(\"The Expected AboutUs \" + renderingControl + \" Text - <p>\");\n\t\t\tlog.error(\"TEST FAILED: The Actual and Expected AboutUs \" + renderingControl + \" Texts are NOT same\");\n\t\t}catch(org.openqa.selenium.NoSuchElementException e){\n\t\t\tlog.error(\"TEST FAILED: There is No Text element On \" + renderingControl + \" Container\");\n\t\t}\t\t\n\t}", "public void VerifyCheckoutTermsandCondition(String Exptitle){\r\n\t\tString ExpTitle=getValue(Exptitle);\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Terms and Condition should be present\");\r\n\r\n\t\ttry{\r\n\t\t\tif(getAndVerifyPartialText(locator_split(\"txtCheckoutTermstitle\"), ExpTitle)){\r\n\t\t\t\tSystem.out.println(\"Terms and Condition in Billing is present \"+getText(locator_split(\"txtCheckoutTermstitle\")));\r\n\t\t\t}else{\r\n\t\t\t\tthrow new Exception(\"Terms and Condition in Billing is not present\");\r\n\t\t\t}\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Terms and Condition is present\");\r\n\r\n\t\t}catch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Terms and Condition in Billing is not present\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCheckoutTermstitle\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\t}", "@Test\n public void seeInfoAboutAisleFromSearch(){\n String itemTest = \"Potatoes\";\n String aisleCheck = \"Aisle: 2\";\n String aisleDescriptionCheck = \"Aisle Description: Between Aisle 1 and Frozen Aisle\";\n onView(withId(R.id.navigation_search)).perform(click());\n onView(withId(R.id.SearchView)).perform(typeText(itemTest));\n onData(anything()).inAdapterView(withId(R.id.myList)).atPosition(0).perform(click());\n onView(withText(\"VIEW MORE INFORMATION\")).perform(click());\n onView(withId(android.R.id.message)).check(matches(allOf(withSubstring(aisleCheck), isDisplayed())));\n onView(withId(android.R.id.message)).check(matches(allOf(withSubstring(aisleDescriptionCheck), isDisplayed())));\n onView(withText(\"OK\")).perform(click());\n }", "public static void verifyToolTipDisplayedText(WebDriver driver, int cardNumber) {\n String expectedText = \"Displays message on TV connected to this equipment.\";\n String text = FindElement.waitForElementXpath(driver, \"(//spectrum-icon[@aria-label = 'Show Nickname Tooltip']//ancestor::div//div[@class = 'kite-tooltip-wrapper'])[\" + cardNumber + \"]\", \"TV device tooltip\").getText();\n if (text.equals(expectedText)){\n ExtentManager.stepReport(Status.PASS, \"Expected text of '\"+expectedText+\"' matches actual text of '\"+text+\"'\");\n } else{\n ExtentManager.stepReport(Status.FAIL, \"Expected text of '\"+expectedText+\"' does not match actual text of '\"+text+\"'\");\n }\n }", "private void assertEquals(String string, String title) {\n\t\r\n}", "public static void VerifyCommonComponent_3DIVs_H3(String renderingControl){\n\t\t\tboolean actualSideBySideText = false;\n\t\t\ttry{\n\t\t\t\tactualSideBySideText=sitecoreObj.aboutusCommonComponent_3DIVs_H3.isDisplayed();\n\t\t\t\tAssert.assertEquals(actualSideBySideText, true);\n\t\t\t\tlog.info(\"The Actual AboutUs \" + renderingControl + \" Text - <\"+sitecoreObj.aboutusCommonComponent_3DIVs_H3.getTagName()+\">\");\n\t\t\t\tlog.info(\"The Expected AboutUs \" + renderingControl + \" Text - <h3>\");\n\t\t\t\tlog.info(\"TEST PASSED: The Actual and Expected AboutUs \" + renderingControl + \" Texts are Same\");\n\t\t\t}catch(AssertionError e){\n\t\t\t\tlog.error(\"The Actual AboutUs \" + renderingControl + \" Text - <\"+sitecoreObj.aboutusCommonComponent_3DIVs_H3.getTagName()+\">\");\n\t\t\t\tlog.error(\"The Expected AboutUs \" + renderingControl + \" Text - <h3>\");\n\t\t\t\tlog.error(\"TEST FAILED: The Actual and Expected AboutUs \" + renderingControl + \" Texts are NOT same\");\n\t\t\t}catch(org.openqa.selenium.NoSuchElementException e){\n\t\t\t\tlog.error(\"TEST FAILED: There is No Text element On \" + renderingControl + \" Container\");\n\t\t\t}\t\t\n\t\t}", "public static void verifyEqualsText(String desc, String actResult, String expResult) throws Exception {\n\t\tif (expResult.equalsIgnoreCase(actResult)) {\n\t\t\tMyExtentListners.test.pass(\"Verify \" + desc + \" || Expected : \" + \"\\'\" + expResult + \"\\''\"\n\t\t\t\t\t+ \" eqauls to Actual : \" + actResult);\n\t\t} else {\n\t\t\tMyExtentListners.test.fail(MarkupHelper.createLabel(\"Verify \" + desc + \" || Expected : \" + \"\\'\" + expResult\n\t\t\t\t\t+ \"\\''\" + \" not eqauls to Actual : \" + \"\\'\" + actResult + \"\\'\", ExtentColor.RED));\n\t\t\tthrow new Exception();\n\t\t}\n\t}" ]
[ "0.6783888", "0.671721", "0.64287704", "0.634979", "0.6340184", "0.6204822", "0.59949017", "0.59425104", "0.5938809", "0.5888955", "0.5840092", "0.5781091", "0.5735741", "0.5679489", "0.5635543", "0.5616787", "0.55989254", "0.55959237", "0.558592", "0.55687857", "0.5553075", "0.5536865", "0.55209875", "0.55149037", "0.54921997", "0.5481915", "0.54766655", "0.54451865", "0.54348475", "0.5426978", "0.54023683", "0.5372417", "0.5355493", "0.5322659", "0.53061825", "0.53042716", "0.5299819", "0.52664965", "0.5261744", "0.525993", "0.52596074", "0.52426857", "0.5210999", "0.52001673", "0.5190917", "0.5189791", "0.51808506", "0.51797116", "0.5172907", "0.5169267", "0.5161406", "0.5152887", "0.5121242", "0.5109664", "0.5109106", "0.5107154", "0.5103402", "0.5085083", "0.5081949", "0.5074597", "0.5068854", "0.50650567", "0.5043998", "0.5042469", "0.5035556", "0.5032321", "0.50208753", "0.4994569", "0.49932122", "0.49860218", "0.4969698", "0.4968694", "0.4956172", "0.49560392", "0.49531564", "0.49513197", "0.49455053", "0.4942016", "0.49294552", "0.4925789", "0.49211043", "0.49177188", "0.49164718", "0.49085927", "0.4906415", "0.48898104", "0.48767462", "0.48666096", "0.48566312", "0.48556718", "0.48486826", "0.484858", "0.48450404", "0.48306108", "0.48284003", "0.482767", "0.4821675", "0.48199433", "0.481476", "0.48098254" ]
0.63082516
5
Searches element if we know its locator and several possible texts on it. Timeout for search is default framework timeout.
protected final WebElement findElementWithAnyMessage(final By by, final List<String> messages) { return new WebDriverWait(this.webDriver, Environment.TIMEOUT). withMessage("Couldn't find element by \"" + by + "\" with any text from " + messages). until(ExpectedConditions.refreshed( this.anyTextToBePresentInElementLocated(by, messages))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void waitForTextToBePresentInElement(By locator, String text, Integer... timeOutInSeconds) {\n int attempts = 0;\n while (attempts < 2) {\n try {\n waitFor(ExpectedConditions.textToBePresentInElement(find(locator), text),\n timeOutInSeconds.length > 0 ? timeOutInSeconds[0] : null);\n break;\n } catch (StaleElementReferenceException e) {\n log.error(e.toString());\n }\n attempts++;\n }\n }", "public static boolean waitForTextToBePresentOnElement(WebElement element,\n\t\t\tint maxSecondTimeout, String matchText,\n\t\t\tboolean... isFailOnExcaption) throws Exception {\n\t\ttry {\n\t\t\tlogger.info(\"INTO METHOD waitForTextToBePresentOnElement\");\n\t\t\tmaxSecondTimeout = maxSecondTimeout * 20;\n\t\t\twhile ((!element.isDisplayed() && (maxSecondTimeout > 0) && (element\n\t\t\t\t\t.getText().toLowerCase().equalsIgnoreCase(matchText\n\t\t\t\t\t\t\t.toLowerCase().trim())))) {\n\t\t\t\tlogger.info(\"Loading...CountDown=\" + maxSecondTimeout);\n\t\t\t\tThread.sleep(50l);\n\t\t\t\tmaxSecondTimeout--;\n\t\t\t}\n\t\t\tif ((maxSecondTimeout == 0) && (isFailOnExcaption.length != 0)) {\n\t\t\t\tif (isFailOnExcaption[0] == true) {\n\t\t\t\t\tlogger.error(\"Element is not display within \"\n\t\t\t\t\t\t\t+ (maxSecondTimeout / 20) + \"Sec.\");\n\t\t\t\t\tthrow new Exception(\"Element is not display within \"\n\t\t\t\t\t\t\t+ (maxSecondTimeout / 20) + \"Sec.\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tlogger.info(\"OUT OF METHOD waitForTextToBePresentOnElement\");\n\t\t\treturn true;\n\t\t} catch (UnhandledAlertException e) {\n\t\t\tthrow new UnhandledAlertException(\n\t\t\t\t\t\"Unexpected alert is coming->waitForTextToBePresentOnElement->\"\n\t\t\t\t\t\t\t+ e.getMessage());\n\t\t} catch (NoSuchElementException e) {\n\t\t\tthrow new NoSuchElementException(\n\t\t\t\t\t\"The element to be search is not present in the page->waitForTextToBePresentOnElement->\"\n\t\t\t\t\t\t\t+ e.getMessage());\n\t\t} catch (Exception e) {\n\t\t\tthrow new Exception(\n\t\t\t\t\t\"Some exception in waitForTextToBePresentOnElement\"\n\t\t\t\t\t\t\t+ e.getMessage());\n\t\t}\n\t}", "public WebElement getElement(WebDriver driver, By locator, int timeout) throws Exception {\n for (int i = 0; i <= timeout; i++) {\n try {\n element = driver.findElement(locator);\n log.info(\"Found element with : \" + locator);\n return element;\n } catch (Exception e) {\n log.info(i + \". Trying to find element with \" + locator);\n }\n Thread.sleep(2000);\n }\n StackTraceElement stackTrace = new Throwable().getStackTrace()[1];\n log.error(\"Cannot find element with : \" + locator);\n log.error(\"Cannot find element : \" + stackTrace.getClassName() + \".\" + stackTrace.getMethodName());\n throw new Exception(\"Unable to find Element\");\n }", "public static void waitFortextToBePresentInElementLocated(WebDriver driver,\n\t\t\tBy locator, final String sText) {\n\t\tWebDriverWait wait = new WebDriverWait(driver,\n\t\t\t\tInteger.parseInt(getConfigValues(\"timeOutInSeconds\")));\n\t\twait.until(ExpectedConditions.textToBePresentInElementLocated(locator,\n\t\t\t\tsText));\n\t}", "protected final ExpectedCondition<WebElement> anyTextToBePresentInElementLocated(final By by,\n\t\t\tfinal List<String> text) {\n\n\t\treturn new ExpectedCondition<WebElement>() {\n\t\t\t@Override\n\t\t\tpublic WebElement apply(final WebDriver driver) {\n\t\t\t\ttry {\n\t\t\t\t\tdriver.manage().timeouts().implicitlyWait(0, TimeUnit.SECONDS);\n\t\t\t\t\tfinal List<WebElement> candidates = driver.findElements(by);\n\t\t\t\t\tfor (final WebElement item : candidates) {\n\t\t\t\t\t\tfor (final String msg : text) {\n\t\t\t\t\t\t\tPage.log.debug(\"Looking for \" + msg);\n\t\t\t\t\t\t\tif (item.isDisplayed() && item.getText().contains(msg)) {\n\t\t\t\t\t\t\t\treturn item;\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\treturn null;\n\t\t\t\t} catch (final StaleElementReferenceException e) {\n\t\t\t\t\treturn this.apply(driver);\n\t\t\t\t} finally {\n\t\t\t\t\tdriver.manage().timeouts().\n\t\t\t\t\timplicitlyWait(Environment.TIMEOUT, TimeUnit.SECONDS);\n\t\t\t\t}\n\n\t\t\t}\n\t\t};\n\t}", "public List<WebElement> getElements(WebDriver driver, By locator, int timeout) throws Exception {\n for (int i = 0; i <= timeout; i++) {\n try {\n if (driver.findElements(locator).size() == 0) throw new Exception();\n elements = driver.findElements(locator);\n log.info(\"Found total \" + elements.size() + \" elements with : \" + locator);\n return elements;\n } catch (Exception e) {\n log.info(i + \". Trying to find all elements with \" + locator);\n }\n Thread.sleep(2000);\n }\n StackTraceElement stackTrace = new Throwable().getStackTrace()[1];\n log.error(\"Cannot find all elements with : \" + locator);\n log.error(\"Cannot find all elements : \" + stackTrace.getClassName() + \".\" + stackTrace.getMethodName());\n throw new Exception(\"Unable to find all Elements\");\n }", "public void searchProduct() throws InterruptedException {\n\n Thread.sleep(2000);\n\n if(isDisplayed(popup_suscriber)){\n click(popup_suscriber_btn);\n }\n\n if(isDisplayed(search_box) && isDisplayed(search_btn)){\n type(\"Remera\", search_box);\n click(search_btn);\n Thread.sleep(2000);\n click(first_product_gallery);\n Thread.sleep(2000);\n }else{\n System.out.println(\"Search box was not found!\");\n }\n\n }", "public static void waitFortextToBePresentInElement(WebDriver driver,\n\t\t\tfinal WebElement element, final String sText) {\n\t\tWebDriverWait wait = new WebDriverWait(driver,\n\t\t\t\tInteger.parseInt(getConfigValues(\"timeOutInSeconds\")));\n\t\twait.until(ExpectedConditions.textToBePresentInElement(element, sText));\n\t}", "private void waitForElement(WebDriver driver, int timeToWaitInSeconds, By ElementLocater) {\n\t\tWebDriverWait wait = new WebDriverWait(driver, timeToWaitInSeconds);\n\t\twait.until(ExpectedConditions.visibilityOfAllElementsLocatedBy(ElementLocater));\n\n\t}", "@Test\r\n\tpublic void test_3and4_Search() {\n\t\tdriver.findElement(By.id(\"twotabsearchtextbox\")).sendKeys(searchKey);\r\n\t\t// click on search button\r\n\t\tdriver.findElement(By.id(\"nav-search-submit-text\")).click();\r\n\t\t// use JavaScriptExecutor to scroll on page\r\n\t\t// cast driver to JavaScriptExecutor\r\n\t\texecutor = (JavascriptExecutor) driver;\r\n\t\texecutor.executeScript(\"window.scrollTo(0, 600)\");\r\n\r\n\t\t// try to get \"results for\" text on web page \r\n\t\t// if it is found then search is successful \r\n\t\tWebElement element = driver.findElement(By.xpath(\"//span[@id='s-result-count']\"));\r\n\t\tString resultFound = element.getText();\r\n\t\tAssert.assertTrue(resultFound.contains(\"results for\"));\r\n\t\tSystem.out.println(\"Search for Samsung is passed\");\r\n\t}", "public void searchKeyword() throws Exception {\n\t\t\n\t\tString keyword = dataHelper.getData(DataColumn.Keyword);\n\n\t\twh.sendKeys(CommonElements.searchTxtBox, keyword);\n\t\twh.clickElement(CommonElements.searchBtn);\n\n\t\tif (wh.isElementPresent(PLPUI.VerifyPLPPage, 4)\n\t\t\t\t&& wh.getText(CommonElements.breadCumb).contains(\n\t\t\t\t\t\tkeyword)) {\n\n\t\t\treport.addReportStep(\"Type '\" + keyword\n\t\t\t\t\t+ \"' in search text box and click on search button\",\n\t\t\t\t\t\"User navigated to search plp page.\", StepResult.PASS);\n\t\t} else {\n\n\t\t\treport.addReportStep(\"Type '\" + keyword\n\t\t\t\t\t+ \"' in search text box and click on search button\",\n\t\t\t\t\t\"User is not navigated to search plp page.\",\n\t\t\t\t\tStepResult.FAIL);\n\n\t\t\tterminateTestCase(\"search plp page\");\n\t\t}\n\t\t\n\t}", "@Test\n public void testFindAGiftButtonCheck() throws InterruptedException {\n findAGiftButtonCheck();\n Thread.sleep(8000);\n String actualText = driver.findElement(By.xpath(findAGiftActualText)).getText();\n Assert.assertEquals(actualText, findAGiftExpectedText);\n }", "private void search(){\n solo.waitForView(R.id.search_action_button);\n solo.clickOnView(solo.getView(R.id.search_action_button));\n\n //Click on search bar\n SearchView searchBar = (SearchView) solo.getView(R.id.search_experiment_query);\n solo.clickOnView(searchBar);\n solo.sleep(500);\n\n //Type in a word from the description\n solo.clearEditText(0);\n solo.typeText(0, searchTerm);\n }", "protected void findWebElementAndType (By webElementSelector, String text){\n\t\tWebElement inputBox = findWebElement(webElementSelector);\n\t\ttry {\n\t\t\tinputBox.sendKeys(text);\n\t\t} catch (ElementNotVisibleException e){\n\t\t\tthrow new AssertionError(\"Found the web element, but it's not visible to send keys. \" + webElementSelector.toString());\n\t\t}\n\t}", "public void waitForTextToBePresentInWebElement(WebElement webElement, String text){\r\n\t\twait.until(ExpectedConditions.textToBePresentInElement(webElement, text));\r\n\t}", "public void waitForText(final By by, int timeoutInSeconds)\n {\n WebDriverWait myWait = new WebDriverWait(driver, timeoutInSeconds, DEFAULT_SLEEP_IN_MILLIS);\n ExpectedCondition<Boolean> conditionToCheck = new ExpectedCondition<Boolean>()\n {\n public Boolean apply(final WebDriver input)\n {\n return !(driver.findElement(by).getText().equals(\"\"));\n }\n };\n myWait.ignoring(StaleElementReferenceException.class).until(conditionToCheck);\n }", "public boolean waitforelement(int timeout,By by){\n\t\twhile(timeout>0){\n\t\t\tsleep(1);\n\t\t\tList<WebElement> list = driver.findElements(by);\n\t\t\tif(list.size()!=0){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\ttimeout--;\n\t\t}\n\t\tSystem.out.println(\"waiting timeout.... Element not found \" +by.toString());\n\t\treturn false;\n\t}", "@Test\n public void enterTextInSearchField() {\n WebDriverWait wait = new WebDriverWait(driver, 5);\n\n // Afterwards, we need to inform WebDriver to wait until an expected condition is met\n // The ExpectedConditions class supplies many methods for dealing with scenarios that may occur before\n // executing the next Test Step\n }", "public boolean textToBePresentInElementLocated(final By by, final String text) {\n return new WebDriverWait(webDriver, DRIVER_WAIT_TIME)\n .until(ExpectedConditions.textToBePresentInElementLocated(by, text));\n }", "public interface ExplicitWait extends SearchScope{\n default Element await(Supplier<By> by) {\n return await((SearchScope e) -> e.findElement(by));\n }\n\n default void await(Predicate<SearchScope> predicate) {\n await((Function<SearchScope, Boolean>) predicate::test);\n }\n\n default <T> T await(Function<SearchScope, T> function) {\n return new FluentWait<>(this)\n .withTimeout(1, SECONDS)\n .pollingEvery(10, MILLISECONDS)\n .ignoring(Exception.class)\n .until(\n (SearchScope where) -> function.apply(where)\n );\n }\n\n default String getText(Supplier<By> by) {\n return await(by).getText();\n }\n\n default String getUpperText(Supplier<By> by) {\n return await(by).getText().toUpperCase();\n }\n\n default void click(Supplier<By> by) {\n await(by).click();\n }\n\n default Element untilFound(Supplier<By> by) {\n waitForPageToLoad();\n return new FluentWait<>(this)\n .withTimeout(30, TimeUnit.SECONDS)\n .pollingEvery(5, TimeUnit.MILLISECONDS)\n .ignoring(Exception.class)\n .until((ExplicitWait e) -> e.findElement(by));\n }\n\n default Element untilFound(Supplier<By> by, int duration) {\n waitForPageToLoad();\n return new FluentWait<>(this)\n .withTimeout(duration, TimeUnit.SECONDS)\n .pollingEvery(5, TimeUnit.MILLISECONDS)\n .ignoring(Exception.class)\n .until((ExplicitWait e) -> e.findElement(by));\n }\n\n default Wait<WebDriver> fluentWait() {\n return new FluentWait<>(TestBase.driver())\n .withTimeout(1, TimeUnit.MINUTES)\n .pollingEvery(5, TimeUnit.MILLISECONDS)\n .ignoreAll(new ArrayList<Class<? extends Throwable>>() {\n {\n add(StaleElementReferenceException.class);\n add(NoSuchElementException.class);\n add(TimeoutException.class);\n add(InvalidElementStateException.class);\n add(WebDriverException.class);\n }\n }).withMessage(\"The message you will see in if a TimeoutException is thrown\");\n }\n\n default void waitForPageToLoad() {\n waitForLoaderToComplete();\n waitForAjaxToComplete();\n waitForJavaScriptToComplete();\n }\n\n default void waitForLoaderToComplete() {\n Wait<WebDriver> wait = fluentWait();\n wait.until(loaderHasFinishProcessing());\n }\n\n default void waitForJavaScriptToComplete() {\n Wait<WebDriver> wait = fluentWait();\n wait.until(javaScriptHasFinishProcessing());\n }\n\n default void waitForAjaxToComplete() {\n Wait<WebDriver> wait = fluentWait();\n wait.until(jQuryHasFinishedProcessing());\n }\n\n default void waitForAngularToComplete() {\n Wait<WebDriver> wait = fluentWait();\n wait.until(angularHasFinishedProcessing());\n }\n\n default ExpectedCondition<Boolean> javaScriptHasFinishProcessing() {\n return driver -> (Boolean) ((JavascriptExecutor) driver)\n .executeScript(\"return document.readyState\").equals(\"complete\");\n }\n\n default ExpectedCondition<Boolean> loaderHasFinishProcessing() {\n return driver -> (Boolean) ((JavascriptExecutor) driver)\n .executeScript(\"return (window.show===false) || (window.show===undefined);\");\n }\n\n default ExpectedCondition<Boolean> jQuryHasFinishedProcessing() {\n return driver -> (Boolean) ((JavascriptExecutor) driver)\n .executeScript(\"return (window.jQuery != null) && (jQuery.active === 0);\");\n }\n\n default ExpectedCondition<Boolean> angularHasFinishedProcessing() {\n return driver -> Boolean.valueOf(((JavascriptExecutor) driver)\n .executeScript(\"return (window.angular !== undefined) &&\" +\n \" (angular.element(document).injector() !== undefined) &&\" +\n \" (angular.element(document).injector().get('$http')\" +\n \".pendingRequests.length === 0)\").toString());\n }\n}", "@Override\n protected void waitThePageToLoad() {\n WaitUtils.waitUntil(driver, ExpectedConditions.visibilityOf(driver\n .findElement(By.xpath(SEARCH_XPATH))));\n }", "public void waitUntilElement(WebDriver driver, final String xpath) throws NumberFormatException, IOException {\n\t\t\t\t\tlong start = System.currentTimeMillis();\n\t\t\t\t\tWebDriverWait wait = new WebDriverWait(driver, 30);\n\t\t\t\t\ttry {\n\t\t\t\t\tExpectedCondition<Boolean> e = new ExpectedCondition<Boolean>() {\n\t\t\t\t public Boolean apply(WebDriver driver) {\n\t\t\t\t return (driver.findElements(By.xpath(xpath)).size() > 0);\n\t\t\t\t }\n\t\t\t\t };\n\t\t\t\t wait.until(e);}\n\t\t\t\t\tcatch(Exception e) {\n\t\t\t\t\tif (driver.findElements(By.xpath(xpath)).size() == 0) { fileWriterPrinter(\"\\nElement not found!\\nXPATH: \" + xpath); }\n\t\t\t\t\t}\n\t\t\t\t fileWriterPrinter(\"Waiting time for Element: \" + waitTimeConroller(start, 30, xpath) + \" sec\\n\");\n\t\t\t\t}", "public void Search()\r\n {\r\n WaitTime(2000);\r\n \r\n //Generating Alert Using Javascript Executor\r\n if (driver instanceof JavascriptExecutor) \r\n ((JavascriptExecutor) driver).executeScript(\"alert('Logged in account!');\");\r\n \r\n WaitTime(2000);\r\n driver.switchTo().alert().accept();\r\n driver.switchTo().defaultContent();\r\n \r\n driver.findElement(By.cssSelector(\"#searchData\")).sendKeys(\"samsung\");\r\n WaitTime(2000);\r\n driver.findElement(By.cssSelector(\"a.searchBtn\")).click(); \r\n \r\n \r\n //Generating Alert Using Javascript Executor\r\n if (driver instanceof JavascriptExecutor) \r\n ((JavascriptExecutor) driver).executeScript(\"alert('Loaded Search Page');\");\r\n \r\n WaitTime(2000);\r\n driver.switchTo().alert().accept();\r\n driver.switchTo().defaultContent();\r\n\r\n }", "@Override\n public boolean verifysearch(String text, String name, String units) throws InterruptedException {\n commonFunctions.clickElement(addvitalsignsButton, 5);\n commonFunctions.clickElement(selectdate, 5);\n commonFunctions.clickElement(okButton,5);\n commonFunctions.clickElement(selectsource,5);\n Thread.sleep(1000);\n driver.findElementByXPath(\"//android.widget.TextView[@text='\"+text+\"']\").click();\n commonFunctions.clickElement(selecttesttype,5);\n driver.findElementByXPath(\"//android.widget.TextView[@text='\"+name+\"']\").click();\n commonFunctions.clickElement(addunit,5);\n commonFunctions.sendKey(addunit,units,5);\n commonFunctions.navigateback();\n commonFunctions.clickElement(submitButton,5);\n Thread.sleep(2000);\n commonFunctions.clickElement(fromdatesearchButton,5);\n commonFunctions.clickElement(okButton,5);\n commonFunctions.clickElement(todatesearchButton,5);\n commonFunctions.clickElement(okButton,5);\n commonFunctions.clickElement(searchButton,5);\n\n\n if (driver.findElementsByXPath(\"//*[@text='\"+name+\"']\").size()>0 && driver.findElementsByXPath(\"//*[@text='Clear']\").size()>0 ){\n isVerifySearch=true;\n }\n commonFunctions.clickElement(searchButton,5);\n Thread.sleep(1000);\n if (isVerifySearch && driver.findElementsByXPath(\"//*[@text='Clear']\").size()==0 ){\n isVerifySearch=true;\n }\n\n commonFunctions.clickElement(selectallcheckbox,5);\n commonFunctions.clickElement(deleteIcon,5);\n commonFunctions.clickElement(yesButton,5);\n return isVerifySearch;\n }", "@Test\n public void searchingItem() throws InterruptedException {\n ChromeDriver driver = openChromeDriver();\n driver.get(\"https://www.knjizare-vulkan.rs/\");\n WebElement cookieConsent = driver.findElement(By.xpath(\"//button[@class='cookie-agree 3'][.//span[contains(text(), 'Slažem se')]]\"));\n WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(3));\n\n wait.until(ExpectedConditions.visibilityOf(cookieConsent));\n cookieConsent.click();\n\n WebElement searchLocator = driver.findElement(By.xpath(\"//div[@data-content='Pretraži sajt']\"));\n searchLocator.click();\n\n\n WebElement searchField = driver.findElement(By.id(\"search-text\"));\n Thread.sleep(2000);\n\n\n searchField.click();\n searchField.clear();\n searchField.sendKeys(\"Prokleta avlija\");\n searchField.sendKeys(Keys.ENTER);\n\n WebElement numberOfProducts = driver.findElement(By.xpath(\"//div[@class='products-found']\"));\n if (numberOfProducts != null) {\n System.out.println(\"The book with title Prokleta avlija is found. \");\n } else{\n System.out.println(\"Product is not found. \");\n }\n\n\n\n\n\n\n }", "public boolean textToBePresentInElement(WebElement element, String text) {\n return new WebDriverWait(webDriver, DRIVER_WAIT_TIME)\n .until(ExpectedConditions.textToBePresentInElement(element, text));\n }", "public WebElement waitForElement(By locator, int timeOut)\n\t{\n\t\tif(driver == null){\n\t\t\tthrow new IllegalArgumentException(\"WebDriver cannot be null\");\n\t\t}\n\t\tWebDriverWait wait=new WebDriverWait(driver,timeOut);\n\t\treturn wait.until(ExpectedConditions.refreshed(ExpectedConditions.presenceOfElementLocated(locator)));\n\t}", "public String verifyAllAutoNameSearch(String object, String data) {\n\t\tlogger.debug(\"Verifying verifyAllAutoNameSearch\");\n\n\t\ttry {\n\t\t\tThread.sleep(3000);\n\t\t\tList<WebElement> l1 = explictWaitForElementList(object);\n\t\t\tlogger.debug(\"Number of elements found:- \" + l1.size());\n\t\t\tboolean flag = false;\n\t\t\tfor (int i = 0; i < l1.size(); i++) {\n\t\t\t\tWebElement ele = l1.get(i);\n\t\t\t\tString str = ele.getText();\n\t\t\t\tlogger.debug(\"actual string: \" + str);\n\t\t\t\tif (str.toLowerCase().contains(data.toLowerCase())) {\n\t\t\t\t\tflag = true;\n\t\t\t\t} else {\n\t\t\t\t\tlogger.debug(str + \" does not contain \" + data);\n\t\t\t\t\tflag = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (flag)\n\t\t\t\treturn Constants.KEYWORD_PASS + \"--elements in auto search contains the input\";\n\t\t\telse\n\t\t\t\treturn Constants.KEYWORD_FAIL + \"--elements in auto search do not contains the input\";\n\n\t\t} \ncatch(TimeoutException ex)\n\t\t\n\t\t{\n\t\t\treturn Constants.KEYWORD_FAIL +\"Cause: \"+ ex.getCause();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\n\t\t\treturn Constants.KEYWORD_FAIL + e.getLocalizedMessage();\n\n\t\t}\n\n\t}", "public static WebElement textbox_search(WebDriver driver) {\n\t\treturn driver.findElement(By.name(searchBoxame));\n\t}", "public Boolean waitUntilElementAppears(WebDriver driver, final String xpath) throws NumberFormatException, IOException {\n\t\t\t\t\tlong start = System.currentTimeMillis();\n\t\t\t\t\tWebDriverWait wait = new WebDriverWait(driver, 30);\n\t\t\t\t\ttry {\n\t\t\t\t\tExpectedCondition<Boolean> e = new ExpectedCondition<Boolean>() {\n\t\t\t\t public Boolean apply(WebDriver driver) {\t\t\t\t \t\n\t\t\t\t return (driver.findElements(By.xpath(xpath)).size() == 0);\n\t\t\t\t }\n\t\t\t\t };\n\t\t\t\t wait.until(e);}\n\t\t\t\t\tcatch(Exception e) {\n\t\t\t\t\tif (driver.findElements(By.xpath(xpath)).size() == 0) { fileWriterPrinter(\"\\nElement not found!\\nXPATH: \" + xpath); }\n\t\t\t\t\t}\n\t\t\t\t fileWriterPrinter(\"Waiting time for Element appearence: \" + waitTimeConroller(start, 30, xpath) + \" sec\");\n\t\t\t\t return (driver.findElements(By.xpath(xpath)).size() == 0);\n\t\t\t\t}", "public WebElement waitForElement(By by) {\n List<WebElement> elements = waitForElements(by);\n int size = elements.size();\n\n if (size == 0) {\n Assertions.fail(String.format(\"Could not find %s after %d attempts\",\n by.toString(),\n configuration.getRetries()));\n } else {\n // If an element is found then scroll to it.\n scrollTo(elements.get(0));\n }\n\n if (size > 1) {\n Logger.error(\"WARN: There are more than 1 %s 's!\", by.toString());\n }\n\n return getDriver().findElement(by);\n }", "@Override\n\tString search(String text) throws Exception {\n\t\tString result = null;\n\t\tthis.text = text;\n\t\tthis.connection = this.getConnection();\n\n\t\tresult = searchRes();\n\t\tif (result != null)\n\t\t\treturn result;\n\n\t\tresult = searchTour();\n\t\tif (result != null)\n\t\t\treturn result;\n\n\t\tconnection.close();\n\t\tthrow new Exception(\"NOT FOUND\");\n\t}", "public void contains(WebDriver driver, String text) {\r\n double start = System.currentTimeMillis();\r\n double res = (System.currentTimeMillis() - start) / 1000;\r\n String result = String.valueOf(res);\r\n if (driver.getPageSource().contains(text)) {\r\n log = \"+\";\r\n PASSED_TEST++;\r\n } else {\r\n log = \"!\";\r\n FAILED_TEST++;\r\n }\r\n resultSource = log + \" [checkPageContains \\\"\" + driver.getPageSource().contains(text) + \"\\\"]\" + \" \" + result + \"\\n\";\r\n resTime += res;\r\n countTESTS++;\r\n }", "public void handlingWaitToElement(By locator){\n WebDriverWait wait = new WebDriverWait(appiumDriver, 60);\n wait.until(ExpectedConditions.presenceOfElementLocated(locator));\n }", "private WebElement getXpath(String xpathInfo) {\n\t\tWebElement element = null;\n\t\t// WebDriverWait wait = new WebDriverWait(driver, 60);\n\t\telement = SearchTest.wait.until(visibilityOfElementLocated(By.xpath(xpathInfo)));\n\t\treturn element;\n\t}", "public WebElement getObject(WebDriver driver,String locatorType, String locator){\r\n\t\ttry{\r\n\t\t\tWebDriverWait wait = new WebDriverWait(driver, 60);\r\n\t\t\r\n\t\t\tif(locatorType.equalsIgnoreCase(\"name\")){\r\n\t\t\t\twait.until(ExpectedConditions.visibilityOf(driver.findElement(By.name(locator))));\r\n\t\t\t\tif(!(driver.findElement(By.name(locator)).isDisplayed() && driver.findElement(By.name(locator)).isEnabled())){\r\n\t\t\t\t\tTestLogger.logError(\"Element is not found with attribute : name=\"+locator+\" until timeout reaches\");\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\t\t\t\treturn (driver.findElement(By.name(locator)));\t\r\n\t\t\t}\r\n\t\t\telse if(locatorType.equalsIgnoreCase(\"id\")){\r\n\t\t\t\twait.until(ExpectedConditions.visibilityOf(driver.findElement(By.id(locator))));\r\n\t\t\t\tif(!(driver.findElement(By.id(locator)).isDisplayed() && driver.findElement(By.id(locator)).isEnabled())){\r\n\t\t\t\t\tTestLogger.logError(\"Element is not found with attribute : id=\"+locator+\" until timeout reaches\");\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\t\t\t\treturn (driver.findElement(By.id(locator)));\t\t\r\n\t\t\t}\r\n\t\t\telse if(locatorType.equalsIgnoreCase(\"linkText\")){\r\n\t\t\t\twait.until(ExpectedConditions.visibilityOf(driver.findElement(By.linkText(locator))));\r\n\t\t\t\tif(!(driver.findElement(By.linkText(locator)).isDisplayed() && driver.findElement(By.linkText(locator)).isEnabled())){\r\n\t\t\t\t\tTestLogger.logError(\"Element is not found with attribute : linkText=\"+locator+\" until timeout reaches\");\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\t\t\t\treturn (driver.findElement(By.linkText(locator)));\t\t\r\n\t\t\t}\r\n\t\t\telse if(locatorType.equalsIgnoreCase(\"partialLinkText\")){\r\n\t\t\t\twait.until(ExpectedConditions.visibilityOf(driver.findElement(By.partialLinkText(locator))));\r\n\t\t\t\tif(!(driver.findElement(By.partialLinkText(locator)).isDisplayed() && driver.findElement(By.partialLinkText(locator)).isEnabled())){\r\n\t\t\t\t\tTestLogger.logError(\"Element is not found with attribute : partialLinkText=\"+locator+\" until timeout reaches\");\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\t\t\t\treturn (driver.findElement(By.partialLinkText(locator)));\t\r\n\t\t\t}\r\n\t\t\telse if(locatorType.equalsIgnoreCase(\"className\")){\r\n\t\t\t\twait.until(ExpectedConditions.visibilityOf(driver.findElement(By.className(locator))));\r\n\t\t\t\tif(!(driver.findElement(By.className(locator)).isDisplayed() && driver.findElement(By.className(locator)).isEnabled())){\r\n\t\t\t\t\tTestLogger.logError(\"Element is not found with attribute : className=\"+locator+\" until timeout reaches\");\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\t\t\t\treturn (driver.findElement(By.className(locator)));\t\r\n\t\t\t}\r\n\t\t\telse if(locatorType.equalsIgnoreCase(\"tagName\")){\r\n\t\t\t\twait.until(ExpectedConditions.visibilityOf(driver.findElement(By.tagName(locator))));\r\n\t\t\t\tif(!(driver.findElement(By.tagName(locator)).isDisplayed() && driver.findElement(By.tagName(locator)).isEnabled())){\r\n\t\t\t\t\tTestLogger.logError(\"Element is not found with attribute : tagName=\"+locator+\" until timeout reaches\");\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\t\t\t\treturn (driver.findElement(By.tagName(locator)));\t\t\t\r\n\t\t\t}\r\n\t\t\telse if(locatorType.equalsIgnoreCase(\"xpath\")){\r\n\t\t\t\twait.until(ExpectedConditions.visibilityOf(driver.findElement(By.xpath(locator))));\r\n\t\t\t\tif(!(driver.findElement(By.xpath(locator)).isDisplayed() && driver.findElement(By.xpath(locator)).isEnabled())){\r\n\t\t\t\t\tTestLogger.logError(\"Element is not found with attribute : xpath=\"+locator+\" until timeout reaches\");\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\t\t\t\treturn (driver.findElement(By.xpath(locator)));\t\t\r\n\t\t\t}\r\n\t\t\telse if(locatorType.equalsIgnoreCase(\"css\")){\r\n\t\t\t\twait.until(ExpectedConditions.visibilityOf(driver.findElement(By.cssSelector(locator))));\r\n\t\t\t\tif(!(driver.findElement(By.cssSelector(locator)).isDisplayed() && driver.findElement(By.cssSelector(locator)).isEnabled())){\r\n\t\t\t\t\tTestLogger.logError(\"Element is not found with attribute : cssSelector=\"+locator+\" until timeout reaches\");\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\t\t\t\treturn (driver.findElement(By.cssSelector(locator)));\t\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tTestLogger.logError(\"Locator of type :\"+locatorType+\" is not valid\");\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t}catch(NoSuchElementException exception){\r\n\t\t\tTestLogger.logError(\"No such element found with attrribute : \"+locatorType+\"=\"+locator);\r\n\t\t\texception.printStackTrace();\r\n\t\t\tdriver.close();\r\n\t\t\tTestBase.driver = null;\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\te.printStackTrace();\r\n\t\t\tdriver.close();\r\n\t\t\tTestBase.driver = null;\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "@Test(priority=14)\n\tpublic void verifySearchFieldDisplayedAlongWithPlaceHolderTextAndCrossIconByClickingSeachIcon() throws Exception {\n\t\tOverviewTradusPROPage overviewPage = new OverviewTradusPROPage(driver);\n\t\texplicitWaitFortheElementTobeVisible(driver, overviewPage.SearchIconOnHeader);\n\t\tclick(overviewPage.SearchIconOnHeader);\n\t\twaitTill(2000);\n\t\tAssert.assertTrue(verifyElementPresent(overviewPage.SearchFieldOnHeader),\n\t\t\t\t\"Search field is not displaying upon clicking search icon on header\");\n\t\tAssert.assertTrue(getText(overviewPage.SearchFieldOnHeader).equals(\"Search...\"),\n\t\t\t\t\"Place holder text is not displaying on search field by clicking on search icon\");\n\t\tAssert.assertTrue(verifyElementPresent(overviewPage.crossIconOnSearchField),\n\t\t\t\t\"Cross icon is not displaying on search field upon clicking search icon on header\");\n\n\t}", "@Test\n public void ebayTestSearchResults() throws Exception {\n driver.findElement(By.id(\"gh-ac\")).sendKeys(\"java book\");\n driver.findElement(By.id(\"gh-btn\")).click();\n\n Thread.sleep(4000);\n\n WebElement searchResults = driver.findElement(By.tagName(\"h1\"));\n //21,761 results for java book\n String resultActual = searchResults.getText();\n System.out.println(resultActual);\n }", "public void selectByText(final By locator,String text){\n\t\tWebElement element = findElementClickable(locator);\n\n try {\n\n try {\n Select select = new Select(element);\n select.selectByVisibleText(text);\n }catch(StaleElementReferenceException e){\n\n \telement = findElementClickable(locator);\n Select select = new Select(element);\n select.selectByVisibleText(text);\n\n }\n\n LOGGER.info(\"Step : \"+Thread.currentThread().getStackTrace()[2].getMethodName()+\": Pass\");\n }catch(Exception e)\n {\n LOGGER.error(\"Step : \"+Thread.currentThread().getStackTrace()[2].getMethodName()+\": Fail\");\n //e.printStackTrace();\n throw new NotFoundException(\"Exception \"+ e +\" thrown while selecting the value by text \"+text+\" using locator \"+locator);\n\t\n }\n\n\n }", "protected void waitForElementToBeClickable(By locator, Integer... timeOutInSeconds) {\n int attempts = 0;\n while (attempts < 2) {\n try {\n waitFor(ExpectedConditions.elementToBeClickable(locator),\n timeOutInSeconds.length > 0 ? timeOutInSeconds[0] : null);\n break;\n } catch (StaleElementReferenceException e) {\n log.error(e.toString());\n }\n attempts++;\n }\n }", "public String findElement(String object, String data) {\n logger.debug(\"inside findElement()..\");\n try {\n\n int page_no = 0;\n while (true) {\n page_no++;\n List<WebElement> element_List = explictWaitForElementList(object);\n List<WebElement> next_Link_List = explictWaitForElementListByLinkText(\"next_link\");\n\n if (element_List.size() > 0) {\n return Constants.KEYWORD_PASS + \" element is found on page - \" + page_no;\n } else if (next_Link_List.size() > 0) {\n next_Link_List.get(0).click();\n }\n\n else {\n return Constants.KEYWORD_FAIL + \" Element not present\";\n }\n\n }\n } \ncatch(TimeoutException ex)\n\t\t\n\t\t{\n\t\t\treturn Constants.KEYWORD_FAIL +\"Cause: \"+ ex.getCause();\n\t\t}\n catch (Exception e) {\n \n return Constants.KEYWORD_FAIL + \" Object Not found \" + e.getMessage();\n }\n }", "public WebElement element(String strElement) throws Exception {\n String locator = prop.getProperty(strElement); \n // extract the locator type and value from the object\n String locatorType = locator.split(\";\")[0];\n String locatorValue = locator.split(\";\")[1];\n // System.out.println(By.xpath(\"AppLogo\"));\n \n // for testing and debugging purposes\n System.out.println(\"Retrieving object of type '\" + locatorType + \"' and value '\" + locatorValue + \"' from the Object Repository\");\n \n // wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(\"//input[@id='text3']\")));\n try {\n\n\n \tif(locatorType.equalsIgnoreCase(\"Id\"))\n \t\treturn driver.findElement(By.id(locatorValue)); \n \telse if(locatorType.equalsIgnoreCase(\"Xpath\")) \n \t\t\treturn driver.findElement(By.xpath(locatorValue)); \n// \t\t}catch(Exception e) {\n// \t\t\tdriver.navigate().refresh();\n//\n// \t\t\t@SuppressWarnings({ \"unchecked\", \"deprecation\", \"rawtypes\" })\n// \t\t\tWait<WebDriver> wait = new FluentWait(driver) \n// \t\t\t.withTimeout(8, TimeUnit.SECONDS) \n// \t\t\t.pollingEvery(1, TimeUnit.SECONDS) \n// \t\t\t.ignoring(NoSuchElementException.class);\n// \t\t\twait.until(ExpectedConditions.visibilityOf(driver.findElement(By.xpath(locatorValue))));\n// \t\t\treturn driver.findElement(By.xpath(locatorValue)); \n// \t\t}\n \n \n \n else if(locatorType.equalsIgnoreCase(\"Name\"))\n \treturn driver.findElement(By.name(locatorValue));\n else if(locatorType.equalsIgnoreCase(\"Classname\")) \n \treturn driver.findElement(By.className(locatorValue));\n else if(locatorType.equalsIgnoreCase(\"Tagname\"))\n \treturn driver.findElement(By.className(locatorValue));\n else if(locatorType.equalsIgnoreCase(\"Linktext\"))\n \treturn driver.findElement(By.linkText(locatorValue));\n else if(locatorType.equalsIgnoreCase(\"Partiallinktext\"))\n \treturn driver.findElement(By.partialLinkText(locatorValue));\n else if(locatorType.equalsIgnoreCase(\"Cssselector\")) \n \treturn driver.findElement(By.cssSelector(locatorValue));\n\n \n } catch (NoSuchElementException | StaleElementReferenceException e) {\n \t\t\n if(locatorType.equalsIgnoreCase(\"Id\"))\n return driver.findElement(By.id(locatorValue)); \n else if(locatorType.equalsIgnoreCase(\"Xpath\")) \n return driver.findElement(By.xpath(locatorValue)); \n else if(locatorType.equalsIgnoreCase(\"Name\"))\n \treturn driver.findElement(By.name(locatorValue));\n else if(locatorType.equalsIgnoreCase(\"Classname\")) \n \treturn driver.findElement(By.className(locatorValue));\n else if(locatorType.equalsIgnoreCase(\"Tagname\"))\n \treturn driver.findElement(By.className(locatorValue));\n else if(locatorType.equalsIgnoreCase(\"Linktext\"))\n \treturn driver.findElement(By.linkText(locatorValue));\n else if(locatorType.equalsIgnoreCase(\"Partiallinktext\"))\n \treturn driver.findElement(By.partialLinkText(locatorValue));\n else if(locatorType.equalsIgnoreCase(\"Cssselector\")) \n \treturn driver.findElement(By.cssSelector(locatorValue));\n }\n throw new NoSuchElementException(\"Unknown locator type '\" + locatorType + \"'\"); \n \t}", "public WebElement waitForClickable(By locator, int timeOut)\n\t{\n\t\tif(driver == null){\n\t\t\tthrow new IllegalArgumentException(\"WebDriver cannot be null\");\n\t\t}\n\t\tWebDriverWait wait=new WebDriverWait(driver,timeOut);\n\t\treturn wait.until(ExpectedConditions.refreshed(ExpectedConditions.elementToBeClickable(locator)));\n\t}", "@Override\n\tpublic boolean waitforExists(By by, int timeoutInSec) {\n\t\tint startcount = 0;\n\t\tthis.manage().timeouts().implicitlyWait(0, TimeUnit.MILLISECONDS);\n\t\tfor (int i = 0; i <= timeoutInSec; i++) {\n\t\t\tif (!this.findElements(by).isEmpty()) {\n\t\t\t\tif (this.findElements(by).get(0).isDisplayed()) {\n\t\t\t\t\tthis.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (startcount > timeoutInSec) {\n\t\t\t\tthis.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tThread.sleep(1000);\n\t\t\t\tstartcount = startcount + 1;\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\tthis.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);\n\t\treturn false;\n\t}", "@Test\n\tpublic void TC_01_Web_Element() {\n\t\tdriver.findElement(By.id(\"\")); //**\n\t\t\n\t\t//Tim nhieu element\n\t\tdriver.findElements(By.id(\"\"));//**\n\t\t\n\t\t//If chi thao tac vs element 1 lan thi ko can khai bao bien\n\t\tdriver.findElement(By.id(\"small-searchterms\")).sendKeys(\"Apple\");//**\n\t\t\n\t\t//If can thao tac element nhieu lan thi nen khai bao bien\n\t\tWebElement searchTextbox = driver.findElement(By.id(\"small-searchterms\"));\n\t\tsearchTextbox.clear();//**\n\t\tsearchTextbox.sendKeys(\"Apple\");\n\t\tsearchTextbox.getAttribute(\"value\");//**\n\t\t\n\t\t//driver.findElement(By.id(\"small-searchterms\")).clear();\n\t\t//driver.findElement(By.id(\"small-searchterms\")).sendKeys(\"Apple\");\n\t\t//driver.findElement(By.id(\"small-searchterms\")).getAttribute(\"value\");\n\t\t\n\t\t//Count co bao nhieu element thoa dieu kien\n\t\t//Verify so luong element tra ve nhu mong doi\n\t\t//Thao tac vs all cac loai element giong nhau trong 1 page (checkbox/textbox)\n\t\tList<WebElement> checkboxes = driver.findElements(By.xpath(\"//div[@class='inputs']/input[not(@type='checkbox')]\"));\n\t\t\n\t\t//Lay ra so luong\n\t\tAssert.assertEquals(checkboxes.size(), 6);\n\t\t\n\t\tWebElement singleElement = driver.findElement(By.className(\"\"));\n\t\t\n\t\t//Textbox TextArea/ Edittable dropdown\n\t\t//Du lieu duoc toan ven\n\t\tsearchTextbox.clear();\n\t\tsearchTextbox.sendKeys(\"\");\n\t\t\n\t\t//Button/Link/radio/checkbox/custom dropdown/..\n\t\tsingleElement.click();//**\n\t\t\n\t\t//Cac ham co tien to bat dau bang get lun lun tra ve du lieu \n\t\t//getTitle/ getCurrentUrl/ getPageSource/ getAttribute/ getCssValue/ getText/ get...\n\t\tsingleElement = driver.findElement(By.xpath(\"//input[@id='Firstname']\"));\n\t\tsingleElement.getAttribute(\"\");\n\t\t\n\t\t//Automation\n\t\tsingleElement = driver.findElement(By.xpath(\"//input[@id='small-searchterms']\"));\n\t\tsingleElement.getAttribute(\"placeholder\");\n\t\t//Search store\n\t\t\n\t\t//Lay ra gia tri cua cac thuoc tinh css thuong dung de test GUI\n\t\t//Font/Size/Color/Background/...\n\t\tsingleElement = driver.findElement(By.cssSelector(\"search-box-button\"));\n\t\tsingleElement.getCssValue(\"background-color\");//*\n\t\t//#4ab2f1\n\t\tsingleElement.getCssValue(\"text-transform\");\n\t\t//uppercase\n\t\t\n\t\t//Lay ra toa do element so voi page hien tai (get gox ben ngoai)\n\t\tsingleElement.getLocation();\n\t\t\n\t\t//lay ra kich thuoc cua element (rong x cao) -> get goc ben trong element\n\t\tsingleElement.getSize();\n\t\t\n\t\t//Location + size\n\t\tsingleElement.getRect();\n\t\t\n\t\t//Chup hinh loi => dua vao html export\n\t\tsingleElement.getScreenshotAs(OutputType.FILE);//*\n\t\t\n\t\t\n\t\t//id/class/css/name...//tu 1 element ko bik tagname -> lay ra duoc tagname truyen vao cho 1 locator khac\n\t\tsingleElement = driver.findElement(By.xpath(\"//div[@class='inputs']/input[not(@type='checkbox')]\"));\n\t\tString searchButtonTagname = singleElement.getTagName();//*\n\t\t\n\t\tsearchTextbox = driver.findElement(By.xpath(\"//\" + searchButtonTagname + \"[@class='inputs']/input[not(@type='checkbox')]\"));\n\t\t//input\n\t\t\n\t\t//xpath\n\t\t//tagname[@attribute='value']\n\t\t\n\t\t\n\t\t//lay ra text element (header/link/message/...)\n\t\tsingleElement.getText();//**\n\t\t\n\t\t//Cac ham co tien to la isXXX thi tra ve kieu Boolean (100%)\n\t\t//true/false\n\t\t\n\t\t//kiem tra xem 1 element la hien thi cho nguoi dung thao tac hay ko\n\t\t//true: dang hien thi\n\t\t//false: ko hien thi\n\t\tsingleElement.isDisplayed();//**\n\t\t\n\t\t//kiem tra xem 1 element la disable hay ko\n\t\t//disable: user ko thao tac duoc\n\t\t//true: ko thao tac duoc\n\t\t//false: co the thao tac\n\t\tsingleElement.isEnabled();//*\n\t\t\n\t\t//kiem tra xem 1 element da duoc chon roi hay chua\n\t\t//checkbox/ radio/ dropdown\n\t\t//true: da chon roi\n\t\t//false: chua duoc chon\n\t\tsingleElement.isSelected();//*\n\t\t\n\t\t//no thay cho hanh vi ENTER vao textbox/button\n\t\t//chi dung duoc trong form (Login/search/register/...)\n\t\tsingleElement.submit();\n\t\t\n\t\tsingleElement = driver.findElement(By.id(\"small-searchterms\"));\n\t\tsingleElement.sendKeys(\"Apple\");\n\t\tsingleElement.submit();\n\t\t\n\t\t\n\t\t\n\t}", "public void waitForTextDisplay(final By by, final String text)\n {\n WebDriverWait myWait = new WebDriverWait(driver, DEFAULT_TIMEOUT, DEFAULT_SLEEP_IN_MILLIS);\n\n ExpectedCondition<Boolean> conditionToCheck = new ExpectedCondition<Boolean>()\n {\n public Boolean apply(final WebDriver input)\n {\n return driver.findElement(by).getText().equalsIgnoreCase(text);\n }\n };\n myWait.ignoring(StaleElementReferenceException.class).until(conditionToCheck);\n }", "public boolean clickMatchingelementByText(By elementList, String itemName) {\n\t\tboolean res = false;\n\t\ttry {\n\t\t\tThread.sleep(implicitWaitTimeout*1000);\n\t\t\tList<WebElement> matchelements = getListOfMatchingElements(elementList);\n\t\t\tif (matchelements.size() > 0) {\n\t\t\t\tfor (int elecount = 0; elecount < matchelements.size(); elecount++) { // to get index of element\n\t\t\t\t\tSystem.out.println(matchelements.get(elecount).getText());\n\t\t\t\t\tif (matchelements.get(elecount).getText().equalsIgnoreCase(itemName)) {\n\t\t\t\t\t\t// reqindex = elecount;\n\t\t\t\t\t\tclickUsingJavaScript(matchelements.get(elecount));\n\t\t\t\t\t\tres = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (itemName.equalsIgnoreCase(\"anyitem\")) { // click first item\n\t\t\t\t\t\tclickUsingJavaScript(matchelements.get(elecount));\n\t\t\t\t\t\tres = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Exception Caught To click on Element Identifier :\" + elementList + \" With String name:\"\n\t\t\t\t\t+ itemName);\n\t\t}\n\n\t\treturn res;\n\n\t}", "public boolean isElementPresent(WebElement elementName, int timeout){\n //https://github.com/appium/java-client/issues/617\n\t/*try{\n\t WebDriverWait wait = new WebDriverWait(getDriver(), timeout);\n\t wait.until(ExpectedConditions.visibilityOf(elementName));\n\t return true;\n\t}catch(Exception e){\n\t return false;\n\t}*/\n try{\n int counter = 0;\n while(counter < timeout){\n Thread.sleep(1000);\n counter++;\n try{\n if(elementName.isDisplayed()){\n //if(ExpectedConditions.visibilityOf(elementName) !=null ){\n return true;\n }else{\n continue;\n }\n }catch(Exception e){\n continue;\n }\n }\n System.out.println(\"ELEMENT NOT FOUND - \" + elementName + \" AFTER \" + timeout );\n return false;\n }catch(Exception e){\n return false;\n }\n }", "public WebElement findElement(final WebDriver driver, final By locator, final int timeoutSeconds) {\n\t\tFluentWait<WebDriver> wait = new FluentWait<WebDriver>(driver).withTimeout(timeoutSeconds, TimeUnit.SECONDS)\n\t\t\t\t.pollingEvery(500, TimeUnit.MILLISECONDS).ignoring(NoSuchElementException.class);\n\n\t\treturn wait.until(new Function<WebDriver, WebElement>() {\n\t\t\tpublic WebElement apply(WebDriver webDriver) {\n\t\t\t\treturn driver.findElement(locator);\n\t\t\t}\n\t\t});\n\t}", "public static WebElement waitForElementExist(final WebDriver driver,final By by , long timeout) throws Exception {\n\t\ttry {\t\n\t\t\tWebDriverWait wait = new WebDriverWait(driver, timeout);\n\t\t\tWebElement element = wait.until(new Function<WebDriver, WebElement>(){\n\t\t\t\t public WebElement apply(WebDriver driver) {\t\t\t\t\t \t\n\t\t\t return driver.findElement(by);\n\t\t\t }\n\t\t\t});\n\t\t\treturn element;\n\t\t} catch(Exception exeption) {\n\t\t\tlogger.error(\"Can not find element with [\" + by + \"] \" + exeption);\n\t\t\tthrow exeption;\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}", "public void clickFromAutoCompleteByText(By locator, String string) throws InterruptedException {\n\t\tList<WebElement> elements = SharedSD.getDriver().findElements(locator);\n\t\tfor (WebElement s1 : elements) {\n\t\t\tif (s1.getText().contains(string)) {\n\t\t\t\ts1.click();\n\t\t\t\tThread.sleep(2000);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public static List<WebElement> explictWaitForElementListByLinkText(final String object) {\n Wait<WebDriver> wait = new FluentWait<WebDriver>(driver).withTimeout(explicitwaitTime, TimeUnit.SECONDS).pollingEvery(pollingTime, TimeUnit.MILLISECONDS).ignoring(NoSuchElementException.class);\n uiBlockerTest(\"\", \"\");\n \ttry{\n \t\tList<WebElement> elements = wait.until(new Function<WebDriver, List<WebElement>>() {\n\n \t\t\t@Override\n \t\t\tpublic List<WebElement> apply(WebDriver driver) {\n\n \t\t\t\tList<WebElement> listElements=driver.findElements(By.linkText(OR.getProperty(object)));\n \t\t\t\treturn listElements.size()>0?listElements:null; // Modified By Karan \n \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t});\n \n \t\t\t\treturn elements;\n \t}\n catch(TimeoutException e)\n { \n \treturn Collections.emptyList();\n }\n \n }", "public Boolean checkTextPresentInPage(String searchFor){\n waitForPageToLoad();\n return super.checkTextPresentInPage(searchFor);\n }", "private void performSearch() {\n String text = txtSearch.getText();\n String haystack = field.getText();\n \n // Is this case sensitive?\n if (!chkMatchCase.isSelected()) {\n text = text.toLowerCase();\n haystack = haystack.toLowerCase();\n }\n \n // Check if it is a new string that the user is searching for.\n if (!text.equals(needle)) {\n needle = text;\n curr_index = 0;\n }\n \n // Grab the list of places where we found it.\n populateFoundList(haystack);\n \n // Nothing was found.\n if (found.isEmpty()) {\n Debug.println(\"FINDING\", \"No occurrences of \" + needle + \" found.\");\n JOptionPane.showMessageDialog(null, \"No occurrences of \" + needle + \" found.\",\n \"Nothing found\", JOptionPane.INFORMATION_MESSAGE);\n \n return;\n }\n \n // Loop back the indexes if we have reached the end.\n if (curr_index == found.size()) {\n curr_index = 0;\n }\n \n // Go through the findings one at a time.\n int indexes[] = found.get(curr_index);\n field.select(indexes[0], indexes[1]);\n curr_index++;\n }", "public static WebElement waitForElementToBeVisible(By locator, int timeOut){\n\t\tWebDriverWait wait = new WebDriverWait(driver, timeOut);\n\t\treturn wait.until(ExpectedConditions.visibilityOf(getElement(locator)));\n\n\t}", "public SearchPage searchBtnClick(String cityName ) throws InterruptedException, IOException\t{\n\t\n\t//WebDriverWait wait =new WebDriverWait(driver,30);\n\t \n\tWebElement myDynamicElement = (new WebDriverWait(driver, 60).until(ExpectedConditions.presenceOfElementLocated(searchBtn)));\n\t\n\t\n\t\n\tmyDynamicElement.click();\n\t\n\tThread.sleep(4000);\n\t\t\n\t\n\t/*\n\t * Melchi Search Page navigation\n\t * \n\t * \n\t */\n\t\n\t/*driver.get(\"https://www.indiaproperty.com/searchresults.php?q=\");\n\t \n\t Actions act =new Actions(driver);\n\t\n\tact.sendKeys(Keys.ENTER);*/\n\t\n\t\n\n\t/*\n\t * Existing Search Page navigation\n\t * \n\t * \n\t */\n\t\n\t\n\tdriver.get(\"https://www.indiaproperty.com/searchs/ci=alangudi&pt=allresidential&litype=sale&vm=ltrboqViZ6ufnNrKl%5E~%5ETrxOKkmtfecaWPm9bYydegldPppt7MmK6ni96io7GpWuHSp67qxt6XV%5E~%5ETimLKeX6ejnJ5rXaasYKagX6OrkaRn&frm=15&srchtype=quick-search&f=srch&withapi=2&view=grid\");\n\t\n\t\n\tActions act =new Actions(driver);\n\t\n\tact.sendKeys(Keys.ENTER);\n\treturn new SearchPage(driver,cityName);\n\t\n\n\t\n}", "private WebElement checkElementWithGivenText(String givenTextPar) {\n\t\tfinal WebElement table = SearchTest.driver.findElement(By.tagName(\"table\"));\n\t\tfinal List<WebElement> rows = table.findElements(By.tagName(\"tr\"));\n\t\tfinal Iterator<WebElement> i = rows.iterator();\n\t\twhile (i.hasNext()) {\n\t\t\tfinal WebElement row = i.next();\n\t\t\tfinal List<WebElement> columns = row.findElements(By.tagName(\"td\"));\n\t\t\tfinal Iterator<WebElement> j = columns.iterator();\n\t\t\twhile (j.hasNext()) {\n\t\t\t\tfinal WebElement column = j.next();\n\t\t\t\t// System.out.print(column.getText());\n\t\t\t\tif (column.getText().equalsIgnoreCase(givenTextPar)) {\n\t\t\t\t\treturn column;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\n\t}", "protected final void searchForText() {\n Logger.debug(\" - search for text\");\n final String searchText = theSearchEdit.getText().toString();\n\n MultiDaoSearchTask task = new MultiDaoSearchTask() {\n @Override\n protected void onSearchCompleted(List<Object> results) {\n adapter.setData(results);\n }\n\n @Override\n protected int getMinSearchTextLength() {\n return 0;\n }\n };\n task.readDaos.add(crDao);\n task.readDaos.add(monsterDao);\n task.readDaos.add(customMonsterDao);\n task.execute(searchText.toUpperCase());\n }", "public static WebElement FindAndWaitForElement(WebDriver driver, final By by)\n\t\t\tthrows Exception {\n\n\t\tWebElement element = null;\n\t\tWebDriverWait wait = null;\n\t\tint timeOut = 0;\n\t\ttry {\n\t\t\ttimeOut = Integer.parseInt(Cls_Generic_methods.getConfigValues(\"timeOutInSeconds\"));\n\t\t\twait = new WebDriverWait(driver, timeOut, 10);\n\t\t\telement = wait.until(new Function<WebDriver, WebElement>() {\n\t\t\t\tpublic WebElement apply(WebDriver driver) {\n\t\t\t\t\treturn driver.findElement(by);\n\t\t\t\t}\n\t\t\t});\n\t\t} catch (Exception e) {\n\t\t\telement = retryingFindElement(driver, by);\n\t\t}\n\t\treturn element;\n\n\t}", "public void waitForElementToAppear(By locator,int timeToOut) {\n\t\tWebDriverWait wait = new WebDriverWait(_eventFiringDriver, timeToOut);\n\t\twait.until(ExpectedConditions.visibilityOfElementLocated(locator));\n\t}", "public static void waitForElementToDisplay(WebDriver driver, By by, long timeOut, long pollingTime) {\n\n\t\tFluentWait<WebDriver> wait = new FluentWait<WebDriver>(driver).withTimeout(Duration.ofSeconds(timeOut))\n\t\t\t\t.pollingEvery(Duration.ofSeconds(pollingTime)).ignoring(NoSuchElementException.class);\n\t\tFunction<WebDriver, Boolean> function = new Function<WebDriver, Boolean>() {\n\t\t\tpublic Boolean apply(WebDriver driver) {\n\t\t\t\tWebElement searchElement = driver.findElement(by);\n\t\t\t\tif (searchElement.isDisplayed()) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t};\n\t\twait.until(function);\n\t}", "@Test\n\tpublic void HandleAjaxMethod(){\n \tSystem.setProperty(\"webdriver.chrome.driver\", \"c:\\\\chromedriver.exe\");\n \tWebDriver driver = new ChromeDriver(); //launching the browser\n \tdriver.get(\"http://www.google.com\");\n \tdriver.manage().window().maximize(); //maximize\n \tdriver.findElement(By.name(\"q\")).sendKeys(\"kea\");\n \tWebDriverWait wait = new WebDriverWait(driver,30);\n \ttry{\n \t\t//need to wait for list of suggestions to appear after keying in\n \t\twait.until(ExpectedConditions.presenceOfElementLocated(By.xpath(\"//*[@role='listbox']/li[1]\")));\n \t\tList <WebElement> list = driver.findElements(By.xpath(\"//*[@role='listbox']/li\"));\n \t\tfor(WebElement element : list){\n \t\t\tif(element.getText().equals(\"keanu reeves\")){\n \t\t\t\telement.click();\n \t\t\t\tbreak;\n \t\t\t}\n \t\t}\n \t}catch(NoSuchElementException e){\n \t\tSystem.out.println(\"No Such ELement Found\");\n }\n}", "public void inputSearchText(String searchValue) {\n try {\n clickElement(eleToDoSearchInput, \"click to eleToDoSearchInput\");\n sendKeyTextBox(eleToDoSearchInput, searchValue, \"send key to searchTextToDoListPage\");\n Thread.sleep(smallerTimeOut);\n NXGReports.addStep(\"Ending Input Search.\", LogAs.PASSED, null);\n } catch (Exception e) {\n AbstractService.sStatusCnt++;\n NXGReports.addStep(\"Ending Input Search.\", LogAs.FAILED, new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n }\n }", "public static void searchInvalidProduct() throws InterruptedException {\n// 4- test case: search for in search box\n//********************************** step 1 open browser and navigate to url***************************\n // Open Browser and Navigate to URL\n browseSetUp(chromeDriver, chromeDriverPath, url);\n//****************************************<step 2- enter keyword in search box>**********************\n Thread.sleep(2000);\n driver.findElement(By.xpath(\"//*[@id=\\\"headerSearch\\\"]\")).sendKeys(\"milk \");\n Thread.sleep(3000);\n//*******************************************<step 3- click on the search button>**********************************\n driver.findElement(By.cssSelector(\".SearchBox__buttonIcon\")).click();\n//*******************************************<step 4- select the item>**********************************\n driver.findElement(By.cssSelector(\"#products > div > div.js-pod.js-pod-0.plp-pod.plp-pod--default.pod-item--0 > div > div.plp-pod__info > div.pod-plp__description.js-podclick-analytics > a\")).click();\n Thread.sleep(5000);\n//*******************************************<step 5- click to add the item to the cart>**********************************\n driver.findElement(By.xpath(\"//*[@id=\\\"atc_pickItUp\\\"]/span\")).click();\n Thread.sleep(6000);\n driver.close();\n\n\n }", "public String verifySearch(String object, String data) {\n\t\ttry {\n\t\t\tlogger.debug(\"Checking the search results...\");\n\n\t\t\tfinal String SEARCH_RESULT_LIST = OR.getProperty(object);\n\t\t\tfinal String SEARCH_CRITERIA = data.trim();\n\n\t\t\t// validate the parameters\n\t\t\tif (SEARCH_RESULT_LIST == null || SEARCH_RESULT_LIST == \"\" || SEARCH_RESULT_LIST.equals(\"\")) {\n\t\t\t\treturn Constants.KEYWORD_FAIL + \" Xpath is null. Please check the xpath\";\n\t\t\t}\n\t\t\tif (SEARCH_CRITERIA == null || SEARCH_CRITERIA == \"\" || SEARCH_CRITERIA.equals(\"\")) {\n\t\t\t\treturn Constants.KEYWORD_FAIL + \" Data is either null empty. Please check the data\";\n\t\t\t}\n\n\t\t\tList<WebElement> searchedElements = driver.findElements(By.xpath(SEARCH_RESULT_LIST));\n\t\t\tlogger.debug(\"Search criteria is \" + SEARCH_CRITERIA);\n\t\t\tlogger.debug(searchedElements.size() + \" elements Searched on the bases of \" + SEARCH_CRITERIA);\n\t\t\tString actualResult;\n\t\t\t/*\n\t\t\t * following loop checks each searched element whether it is\n\t\t\t * according to search criteria or not\n\t\t\t */\n\n\t\t\tfor (int i = 0; i < searchedElements.size(); i++) {\n\t\t\t\tactualResult = searchedElements.get(i).getText();\n\t\t\t\tif (!actualResult.contains(SEARCH_CRITERIA)) {\n\t\t\t\t\treturn Constants.KEYWORD_FAIL + \"---\" + actualResult + \" is not according to \" + SEARCH_CRITERIA;\n\t\t\t\t}\n\t\t\t}\n\t\t\tint paginationLastLink = driver.findElements(By.linkText(OR.getProperty(\"last_link\"))).size();\n\t\t\t// if pagination links present then check the last page for the\n\t\t\t// search results.\n\t\t\tif (paginationLastLink != 0) {\n\t\t\t\t// click on Last pagination link.\n\t\t\t\tlogger.debug(\"checking the last page for the search results...\");\n\t\t\t\tdriver.findElement(By.linkText(OR.getProperty(\"last_link\"))).click();\n\t\t\t\tThread.sleep(1500);\n\t\t\t\treturn verifySearch(object, data);\n\t\t\t}\n\t\t\treturn Constants.KEYWORD_PASS + \" All the search Results are according to search Criteria i.e. \" + SEARCH_CRITERIA;\n\t\t} catch (InterruptedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn Constants.KEYWORD_FAIL + \" following Exception occured \\n\" + e;\n\t\t} \ncatch(TimeoutException ex)\n\t\t\n\t\t{\n\t\t\treturn Constants.KEYWORD_FAIL +\"Cause: \"+ ex.getCause();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\n\t\t\treturn Constants.KEYWORD_FAIL + \" Following Exception occured \\n\" + e;\n\n\t\t}\n\t}", "@Override\n public boolean isPresent(long seconds){\n if (seconds < 0) {\n return false;\n }\n try\t{\n WebElement element = (WebElement) (new WebDriverWait(driver, seconds))\n .until((Function<? super WebDriver, ? extends Object>) ExpectedConditions.presenceOfElementLocated(locator));\n this.element = element;\n return true;\n }\n catch (NoSuchElementException ex){\n this.noSuchElementException = new NoSuchElementException(locator.toString());;\n return false;\n }\n catch (TimeoutException ex){\n this.noSuchElementException = new NoSuchElementException(locator.toString());\n return false;\n }\n }", "public boolean textToBePresentInElementValue(final WebElement element, final String text) {\n return new WebDriverWait(webDriver, DRIVER_WAIT_TIME)\n .until(ExpectedConditions.textToBePresentInElementValue(element, text));\n }", "public void isTextPresentInElement(WebElement elem, String text) {\n try {\n driverWait.until(ExpectedConditions.textToBePresentInElement(elem, text));\n System.out.println(\"The text:\" + text + \", is present in the element\");\n } catch (Exception e) {\n Assert.fail(\"The following text hasn't found in the element: \" + text);\n }\n }", "@And(\"^searches for \\\"([^\\\"]*)\\\"$\")\n\tpublic void searches_for_something(String stringtoBeSearched) throws Throwable {\n\t\thomepage.waitForPageToLoad(homepage.getTitle());\n\t\thomepage.waitForVisibility(homepage.searchbox);\n\t\thomepage.findElement(homepage.searchbox).sendKeys(stringtoBeSearched);\n\t}", "public SearchResultsPage searchRetry() throws Exception\n {\n int counter = 0;\n int waitInMilliSeconds = 3000;\n while (counter < 5)\n {\n synchronized (this)\n {\n try{ this.wait(waitInMilliSeconds); } catch (InterruptedException e) {}\n }\n waitInMilliSeconds += 3000;\n SearchResultsPage searchResults = folderSearchPage.clickSearch().render();\n if (searchResults.hasResults())\n {\n return searchResults;\n }\n else\n {\n counter++;\n searchResults.goBackToAdvanceSearch().render(); }\n }\n throw new Exception(\"search failed\");\n }", "@Test\n public void locatorsCombinationTest() throws Exception {\n /* Search the word \"test\" on Google */\n driver.get(\"https://www.google.co.uk/search?dcr=0&ei=qTR0WquJOojosAXBu5KoBA&q=octane&oq=octane&gs_l=psy-ab.3..0i71k1l4.861.861.0.1157.1.1.0.0.0.0.0.0..0.0....0...1c.1.64.psy-ab..1.0.0....0.rHW5osH_iok\");\n\n /* Using the standard devtools */\n driver.findElement(By.xpath(\"//*[@id='rhs_block']/div[1]/div[1]/div/div[1]/div[2]/div[1]/div/div[1]/div/div/div[2]/div[1]/span\"));\n\n /* Using the selenium OIC and combination of locators */\n driver.findElement(new ByEach(\n By.tagName(\"span\"),\n By.visibleText(\"Octane\")\n ));\n\n /* This test demonstrates the power of combinated locators :\n * Provide new ways to locate Web elements\n * Give more flexibility, accuracy and robustness\n * */\n }", "@Test\n public void testUserSearch() {\n try {\n //Navigate to users search page (faster this way)\n driver.get(\"http://stackoverflow.com/users\");\n \n wait(3);\n \n //Get user-search box; auto-polling by javascript; no submit() needed\n driver.findElement(By.id(\"userfilter\")).sendKeys(\"fojallupigi-4562\");\n \n wait(4);\n \n //determine if my username is the only result\n String username = driver.findElement(By.cssSelector(\".user-details > a:nth-child(1)\")).getText();\n assertEquals(\"fojallupigi-4562\", username);\n }\n catch(NoSuchElementException nsee) {\n fail();\n }\n }", "public boolean find(String sElement){\n\t\tboolean bReturn = false;\n\t\ttry{\n\t\t\tbReturn = findElement(sElement).isDisplayed();\n\t\t}catch(Exception e){\n\t\t\tlogger.error(\"Exception occured in finding the WebElement: \"+e.getMessage());\n\t\t}\n\t\t\n\t\treturn bReturn;\n\t}", "public static void setWaitSelenium() throws InterruptedException {\n WebDriverManager.chromedriver().setup();\n WebDriver driver = new ChromeDriver();\n driver.get(\"https://google.com\");\n\n WebElement input = driver.findElement(By.xpath(\"//input[@name=\\\"q\\\"]\"));\n input.sendKeys(\"Abcd\");\n Thread.sleep(10000);\n driver.findElement(By.name(\"btnK\")).click();\n //driver.findElement(By.name(\"btnK\")).sendKeys(Keys.RETURN);\n\n // Fluent wait\n // Waiting 30s for an element to be present on the page,\n // for its presence once every 2s\n Wait<WebDriver> wait = new FluentWait<WebDriver>(driver)\n .withTimeout(60, TimeUnit.SECONDS)\n .pollingEvery(2, TimeUnit.SECONDS)\n .ignoring(NoSuchElementException.class);\n\n WebElement clickseleniumlink = wait.until(new Function<WebDriver, WebElement>(){\n\n public WebElement apply(WebDriver driver ) {\n WebElement link = driver.findElement(By.xpath(\"/html[1]/body[1]/div[7]/div[3]/div[10]/div[1]/div[2]/div[1]/div[2]/div[2]/div[1]/div[1]/div[5]/div[1]/div[1]/div[1]/div[1]/div[1]/a[1]\"));\n if(link.isEnabled()){\n System.out.println(\"Element found\");\n }\n return link;\n }\n });\n //click on the selenium link\n clickseleniumlink.click();\n\n driver.close();\n driver.quit();\n }", "public void selectByPartialText(By locator,String partialText){\n\t\tWebElement element = findElementClickable(locator);\n\n try {\n\n Select select=new Select(element);\n List<WebElement> optionsList = select.getOptions();\n for (int i=0; i<optionsList.size(); i++)\n {\n if(optionsList.get(i).getText().contains(partialText))\n {\n optionsList.get(i).click();\n }\n }\n LOGGER.info(\"Step : \"+Thread.currentThread().getStackTrace()[2].getMethodName()+\": Pass\");\n }catch(Exception e)\n {\n LOGGER.error(\"Step : \"+Thread.currentThread().getStackTrace()[2].getMethodName()+\": Fail\");\n //e.printStackTrace();\n throw new NotFoundException(\"There is an error while selecting the text \"+partialText+\": with locator \"+locator+\". Exception \"+e);\n\t\t\t\n }\n\n\n }", "@Override\n\tpublic boolean waitTillExists(By by, int timeoutInSec) {\n\n\t\tint startcount = 0;\n\t\tthis.manage().timeouts().implicitlyWait(0, TimeUnit.MILLISECONDS);\n\t\tfor (int i = 0; i <= timeoutInSec; i++) {\n\t\t\ttry {\n\n\t\t\t\tif (!this.findElements(by).isEmpty()) {\n\t\t\t\t\tif (!this.findElements(by).get(0).isDisplayed()) {\n\t\t\t\t\t\tthis.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO: handle exception\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (startcount > timeoutInSec) {\n\t\t\t\tthis.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tThread.sleep(1000);\n\t\t\t\t// System.out.println(\"syncing...\");\n\t\t\t\tstartcount = startcount + 1;\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\tthis.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);\n\t\treturn false;\n\t}", "public void waitForAttributeDisplay(final By by, final String attribute,\n final String attributeText, int timeoutInSeconds)\n {\n WebDriverWait myWait = new WebDriverWait(driver, timeoutInSeconds, DEFAULT_SLEEP_IN_MILLIS);\n\n ExpectedCondition<Boolean> conditionToCheck = new ExpectedCondition<Boolean>()\n {\n public Boolean apply(final WebDriver input)\n {\n return driver.findElement(by).getAttribute(attribute).contains(attributeText);\n }\n };\n myWait.ignoring(StaleElementReferenceException.class).until(conditionToCheck);\n }", "public static void typeText(WebElement element, String text) throws InterruptedException {\n\t\tThread.sleep(2000);\n\t\ttry {\n\t\t\tif (element.isDisplayed() && element.isEnabled()) {\n\t\t\t\telement.click();\n\t\t\t\telement.sendKeys(text);\n\t\t\t\tThread.sleep(1000);\n\t\t\t\t//return true;\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Element is not displayed.\");\n\t\t\t\t//return false;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Some exception occured.\" + e.getMessage());\n\t\t\t//return false;\n\t\t}\n\t}", "public static void main(String[] args) \n\t{\n\t\tWebDriver driver=null;\n\t\tString url =\"http://bing.com\";\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"F:\\\\Seleniumworkspace\\\\webdriverexamples\\\\driverFiles\\\\chromedriver.exe\");\n\t\tdriver=new ChromeDriver();\n\t\n\t\tdriver.get(url);\n\t\tdriver.manage().window().maximize();\n\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\t\t/*\t<input class=\"b_searchbox\" id=\"sb_form_q\" name=\"q\" title=\"Enter your search term\" type=\"search\" value=\"\" maxlength=\"1000\"\n\t\t * autocapitalize=\"off\" autocorrect=\"off\" autocomplete=\"off\" spellcheck=\"false\" aria-controls=\"sw_as\" style=\"\" aria-autocomplete=\"both\" aria-owns=\"sw_as\">\n\t\t\n\t\t\n\t\t*/\n\t\t\n\t\tdriver.findElement(By.id(\"sb_form_q\")).sendKeys(\"Selenium\");\n\t\t//xpath pf bing list //*[@id=\"sa_ul\"]\n\t\t\n\t\tString Search_List_data = driver.findElement(By.xpath(\"//*[@id=\\\"sa_ul\\\"]\")).getText();\n\t\tSystem.out.println(\"the elements related to your search are \"+Search_List_data);\n\t\t\n\t\t\tString expected = \"Livetech\";\n\t\t\tString actual = Search_List_data;\n\t\t\tif(actual.contains(expected))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Element is found\");\n\t\t\t}\n\t\t\t\n\t\t\telse\n\t\t\t{\n\t\t\tSystem.out.println(\"Element not found\");\n\t\t}\ndriver.quit();\t\t\n\t}", "<T extends IElement> List<T> findElements(By locator, ElementType type, ElementsCount count);", "public WebElement waitFor(By by, int index)\n\t{\n\t\tTimer elemTimer = new Timer(ELEMENT_WAIT);\n\t\twhile(elemTimer.stillWaiting())\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tList<WebElement> elems = findElements(by);\n\t\t\t\tif(elems.size() > index) //can see enough elements\n\t\t\t\t{\n\t\t\t\t\tif(elems.get(index).isDisplayed() && elems.get(index).isEnabled())\n\t\t\t\t\t{\n\t\t\t\t\t\treturn elems.get(index);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch(ElementNotVisibleException | NoSuchElementException | StaleElementReferenceException e)\n\t\t\t{\n\n\t\t\t}\n\t\t\tcatch(UnhandledAlertException e)\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tswitchTo().alert().dismiss();\n\t\t\t\t}\n\t\t\t\tcatch(NoAlertPresentException a) //Really don't know\n\t\t\t\t{}\n\t\t\t}\n\t\t\tMacro.sleep(300);\n\t\t}\n\t\treturn null;\n\t}", "public void waitForAttributeDisplay(final WebElement element, final String attribute,\n final String attributeText, int timeoutInSeconds)\n {\n WebDriverWait myWait = new WebDriverWait(driver, timeoutInSeconds, DEFAULT_SLEEP_IN_MILLIS);\n\n ExpectedCondition<Boolean> conditionToCheck = new ExpectedCondition<Boolean>()\n {\n public Boolean apply(final WebDriver input)\n {\n return element.getAttribute(attribute).contains(attributeText);\n }\n };\n myWait.ignoring(StaleElementReferenceException.class).until(conditionToCheck);\n }", "protected void waitForVisibilityOf(By locator, Integer... timeOutInSeconds) {\n int attempts = 0;\n while (attempts < 2) {\n try {\n waitFor(ExpectedConditions.visibilityOfElementLocated(locator),\n timeOutInSeconds.length > 0 ? timeOutInSeconds[0] : null);\n break;\n } catch (StaleElementReferenceException e) {\n log.error(e.toString());\n }\n attempts++;\n }\n }", "@Test\n public void amazonTest() throws InterruptedException {\n driver.get(\"https://amazon.com\");\n WebElement input = driver.findElement(By.id(\"twotabsearchtextbox\"));\n input.sendKeys(\"paper towels\" + Keys.ENTER);\n\n List<WebElement> allResults = driver.findElements(By.cssSelector(\"span.a-size-base-plus\"));\n\n Thread.sleep(2000);\n System.out.println(\"Number of results: \" + allResults.size());\n\n System.out.println(\"First result: \" + allResults.get(0).getText());\n System.out.println(\"Second result: \" + allResults.get(1).getText());\n System.out.println(\"Last result: \" + allResults.get(allResults.size() - 1).getText());\n\n\n }", "private WebElement delayedFindElement(By by, int attempt) {\n try {\n return super.findElement(by);\n } catch (NoSuchElementException e) {\n if (attempt >= MAX_ATTEMPTS) {\n throw e;\n }\n try {\n Thread.sleep(attempt * SLEEP_TIME);\n } catch (InterruptedException ie) {\n throw new RuntimeException(\"Could not sleep thread\", ie);\n }\n return this.delayedFindElement(by, attempt + 1);\n }\n }", "public static void searchProduct() throws InterruptedException {\n browseSetUp(chromeDriver, chromeDriverPath, url);\n//****************************************<step 2- enter keyword in search box>**********************\n Thread.sleep(2000);\n driver.findElement(By.xpath(\"//*[@id=\\\"headerSearch\\\"]\")).sendKeys(\"paint roller\");\n Thread.sleep(3000);\n//*******************************************<step 3- click on the search button>**********************************\n driver.findElement(By.cssSelector(\".SearchBox__buttonIcon\")).click();\n//*******************************************<step 4- select the item>**********************************\n driver.findElement(By.cssSelector(\"#products > div > div.js-pod.js-pod-0.plp-pod.plp-pod--default.pod-item--0 > div > div.plp-pod__info > div.pod-plp__description.js-podclick-analytics > a\")).click();\n Thread.sleep(5000);\n//*******************************************<step 5- click to add the item to the cart>**********************************\n driver.findElement(By.xpath(\"//*[@id=\\\"atc_pickItUp\\\"]/span\")).click();\n Thread.sleep(6000);\n driver.close();\n\n\n }", "public void findElementInListByText(String value, By locator) {\n waitForVisibilityOf(locator);\n List<WebElement> listOfElements = findListOfElements(locator);\n if (listOfElements != null && !listOfElements.isEmpty()) {\n for (WebElement element : listOfElements) {\n if (value.toLowerCase(Locale.ROOT).equals(element.getText().toLowerCase(Locale.ROOT))) {\n element.click();\n break;\n }\n }\n } else {\n log.info(\"List is null or empty! Elements not found by locator: [\" + locator + \"]\");\n }\n }", "public static WebElement waitForElementPresent(WebDriver driver,\n\t\t\tfinal By by, long timeOutInSeconds) {\n\n\t\tWebElement we = null;\n\t\ttry {\n\t\t\tWebDriverWait wdw = new WebDriverWait(driver, timeOutInSeconds);\n\n\t\t\tif ((we = wdw.until(new ExpectedCondition<WebElement>() {\n\t\t\t\tpublic WebElement apply(WebDriver d) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\treturn d.findElement(by);\n\t\t\t\t}\n\t\t\t})) != null) {\n\t\t\t\t// Do something;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// Do something;\n\t\t}\n\t\treturn we;\n\n\t}", "public boolean waitForInvisibleElement(By locator, int timeOut)\n\t{\n\t\tif(driver == null){\n\t\t\tthrow new IllegalArgumentException(\"WebDriver cannot be null\");\n\t\t}\n\t\tWebDriverWait wait=new WebDriverWait(driver,timeOut);\n\t\treturn wait.until(ExpectedConditions.refreshed(ExpectedConditions.invisibilityOfElementLocated(locator)));\n\t}", "public String VerifyIsElementClickable(String object, String data) {\r\n\t\tString internalwait = CONFIG.getProperty(\"ImplicitWaitForElement\");\r\n\t\tint internalwaitNum = Integer.parseInt(internalwait);\r\n\t\twait = new WebDriverWait(driver, internalwaitNum);\r\n\t\ttry {\r\n\t\t\tAPP_LOGS.info(\"Wait until Element is clickable\");\r\n\t\t\twait.until(ExpectedConditions.elementToBeClickable(By.xpath(object)));\r\n\t\t\tThread.sleep(4000);\r\n\t\t} catch (Exception e) {\r\n\t\t\treturn Constants.KEYWORD_FAIL + \" Element Not Found or Clickable \" + e.getMessage();\r\n\t\t}\r\n\t\treturn Constants.KEYWORD_PASS;\r\n\t}", "public static void WebDriverExplicitWait(WebDriver driver, int timeoutInSeconds, String by, String locator) {\r\n\t\tWebDriverWait wait = new WebDriverWait(driver, timeoutInSeconds);\r\n\t\tif (by.equalsIgnoreCase(\"id\"))\r\n\t\t\twait.until(ExpectedConditions.visibilityOfElementLocated(By.id(locator)));\r\n\t\tif (by.equalsIgnoreCase(\"name\"))\r\n\t\t\twait.until(ExpectedConditions.visibilityOfElementLocated(By.name(locator)));\r\n\t\tif (by.equalsIgnoreCase(\"tagName\"))\r\n\t\t\twait.until(ExpectedConditions.visibilityOfElementLocated(By.tagName(locator)));\r\n\t\tif (by.equalsIgnoreCase(\"className\"))\r\n\t\t\twait.until(ExpectedConditions.visibilityOfElementLocated(By.className(locator)));\r\n\t\tif (by.equalsIgnoreCase(\"linkText\"))\r\n\t\t\twait.until(ExpectedConditions.visibilityOfElementLocated(By.linkText(locator)));\r\n\t\tif (by.equalsIgnoreCase(\"partialLinkText\"))\r\n\t\t\twait.until(ExpectedConditions.visibilityOfElementLocated(By.partialLinkText(locator)));\r\n\t\tif (by.equalsIgnoreCase(\"cssSelector\"))\r\n\t\t\twait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector(locator)));\r\n\t\tif (by.equalsIgnoreCase(\"xpath\"))\r\n\t\t\twait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(locator)));\r\n\t}", "public void waitForElement(String locator) {\n wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath(locator)));\n }", "public WebElement searchResultsLinks(String linkContaingText) {\r\n\t\treturn driver.findElement(By.xpath(\"//h2[contains(text(),'\"+linkContaingText+\"')]\"));\r\n\t}", "public void initSearchInput() {\n this.waitForElementAndClick(By.xpath(SEARCH_INIT_ELEMENT),\n \"Cannot find and click element\", 5);\n this.waitForElementPresent(By.xpath(SEARCH_INPUT),\n \"Cannot find search input after clicking init search element\");\n }", "@Test\n public void seeInfoAboutAisleFromSearch(){\n String itemTest = \"Potatoes\";\n String aisleCheck = \"Aisle: 2\";\n String aisleDescriptionCheck = \"Aisle Description: Between Aisle 1 and Frozen Aisle\";\n onView(withId(R.id.navigation_search)).perform(click());\n onView(withId(R.id.SearchView)).perform(typeText(itemTest));\n onData(anything()).inAdapterView(withId(R.id.myList)).atPosition(0).perform(click());\n onView(withText(\"VIEW MORE INFORMATION\")).perform(click());\n onView(withId(android.R.id.message)).check(matches(allOf(withSubstring(aisleCheck), isDisplayed())));\n onView(withId(android.R.id.message)).check(matches(allOf(withSubstring(aisleDescriptionCheck), isDisplayed())));\n onView(withText(\"OK\")).perform(click());\n }", "@Test\n public void testAdvancedSearchResult() throws InterruptedException {\n log.info(\"Go to Homepage \" );\n log.info(\"Click on Advanced Search link in footer \" );\n WebElement advancedSearchButton = driver.findElement(By.partialLinkText(\"Advanced Search\"));\n advancedSearchButton.click();\n WebElement searchCassette = driver.findElement(By.id(\"AdvancedSearchResults\")).findElement(By.tagName(\"input\"));\n WebElement searchButton = driver.findElement(By.id(\"AdvancedSearchResults\")).findElement(By.className(\"btn-standard\"));\n searchCassette.click();\n searchCassette.clear();\n log.info(\"Click in Search Casetter and introduce search term sculpture\" );\n searchCassette.sendKeys(\"sculpture\");\n log.info(\"Click on search Button \" );\n searchButton.click();\n log.info(\"Confirm Adavanced Search Page by keywords=sculpture is displayed in browser\" );\n assertTrue(driver.getCurrentUrl().contains(\"keywords=sculpture\"));\n }", "private String getElemText(List<WebElement> webElem){\n String tableParam = \"\";\n try{\n tableParam = webElem.get(1).getText();\n } catch (IndexOutOfBoundsException e){\n webDriver.quit();\n Assert.fail(\"Please select a longer delay duration.\");\n }\n\n return tableParam;\n }", "public void clickSearchButton(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- SearchButton should be clicked\");\r\n\t\ttry{\r\n\t\t\tsleep(3000);\r\n\t\t\twaitforElementVisible(locator_split(\"BybtnSearch\"));\r\n\t\t\tclick(locator_split(\"BybtnSearch\"));\r\n\t\t\twaitForPageToLoad(100);\r\n\t\t\tSystem.out.println(\"SearchButton is clicked\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- SearchButton is clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- SearchButton is not clicked\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"BybtnSearch\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t}", "public static void waitForelementClickable(By by, long time) {\n WebDriverWait wait = new WebDriverWait(driver, time);\n wait.until(ExpectedConditions.elementToBeClickable(by));\n }", "public static boolean waitForElementToStale(WebDriver driver,\n\t\t\tint iTimeOutInSeconds, By by) throws NumberFormatException,\n\t\t\tIOException {\n\t\tboolean isStale = true;\n\t\tint iAttempt = 0;\n\t\ttry {\n\t\t\tiTimeOutInSeconds = iTimeOutInSeconds * 20;\n\t\t\twhile (isStale && iTimeOutInSeconds > 0) {\n\t\t\t\tiAttempt++;\n\t\t\t\tlogger.info(\"Waiting for Element to Statle Attempt Number :\"\n\t\t\t\t\t\t+ iAttempt);\n\t\t\t\tdriver.manage().timeouts()\n\t\t\t\t.implicitlyWait(100, TimeUnit.MILLISECONDS);\n\t\t\t\tlogger.info(\"Element :\" + driver.findElement(by).isDisplayed());\n\t\t\t\tif (driver.findElements(by).size() == 0) {\n\t\t\t\t\tisStale = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tThread.sleep(30l);\n\t\t\t\tiTimeOutInSeconds--;\n\t\t\t}\n\t\t} catch (NoSuchElementException e) {\n\t\t\tlogger.error(\"No Element Found.This Means Loader is no more in HTML. Moving out of waitForElementToStale!!!\");\n\t\t\tisStale = false;\n\t\t} catch (StaleElementReferenceException s) {\n\t\t\tlogger.error(\"Given Element is stale from DOM Moving out of waitForElementToStale!!!\");\n\t\t\tisStale = false;\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(\"Some Exception ocurred Please check code!!!\");\n\t\t} finally {\n\t\t\tdriver.manage()\n\t\t\t.timeouts()\n\t\t\t.implicitlyWait(\n\t\t\t\t\tInteger.parseInt(getConfigValues(\"ImplicitWait\")),\n\t\t\t\t\tTimeUnit.SECONDS);\n\t\t}\n\t\treturn isStale;\n\t}" ]
[ "0.6675174", "0.63881874", "0.62251896", "0.6122042", "0.60644346", "0.6012101", "0.5949612", "0.59308994", "0.5917301", "0.58847475", "0.58665186", "0.58211386", "0.5784901", "0.57799923", "0.5778479", "0.5764724", "0.5749432", "0.5715082", "0.57046705", "0.56856763", "0.5676862", "0.5667885", "0.56640345", "0.5624831", "0.5610453", "0.5605313", "0.5575895", "0.55489755", "0.55316275", "0.55287105", "0.5514465", "0.5500057", "0.54985726", "0.5491962", "0.54913175", "0.5490536", "0.54772013", "0.5474448", "0.5462083", "0.5444347", "0.54225016", "0.541906", "0.54038763", "0.5392121", "0.5385326", "0.53818816", "0.5369631", "0.5367131", "0.5365438", "0.53640056", "0.53621787", "0.535952", "0.53471696", "0.534707", "0.53447735", "0.53424466", "0.5324857", "0.53246135", "0.5306272", "0.53016984", "0.5299499", "0.52991927", "0.5283357", "0.52804446", "0.5279728", "0.5276856", "0.5270713", "0.5259757", "0.5254205", "0.52431566", "0.52380186", "0.52351147", "0.523493", "0.52335614", "0.5213927", "0.5210875", "0.52068007", "0.5190038", "0.5186116", "0.5183374", "0.51833445", "0.5182631", "0.5181881", "0.51817536", "0.5174106", "0.51650727", "0.5162489", "0.51495343", "0.5142841", "0.5128282", "0.5127568", "0.5122403", "0.5122071", "0.51203597", "0.51194435", "0.5116831", "0.5103556", "0.51021254", "0.5088658", "0.50846213" ]
0.5607507
25
Allows to get displayed element from the list of elemnents, found by one locator.
protected final WebElement getDisplayed(final List<WebElement> items) { WebElement result = null; for (final WebElement item : items) { if (item.isDisplayed()) { result = item; break; } } if (result == null) { throw new StaleElementReferenceException("Couldn't find displayed element in the list."); } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Object getComponent(WebElement element);", "public static WebElement displayedElement(List<WebElement> elements){\n\t\n\t\t\n\t\tfor (WebElement element:elements)\n\t {\n\t if (element.isDisplayed()) // correct method: isDisplayed()\n\t return element;\n\t }\n\t\treturn null;\n\t}", "public WebElement getElement(By locator) {\n\t\tWebElement element= driver.findElement(locator);\n\t\treturn element;\n\t}", "public WebElement getElementShort(By locator) {\n\t\tWebElement ele = null;\n\n\t\ttry {\n\t\t\tWebDriverWait wait = new WebDriverWait(driver, IMPLICITE_WAIT_S);\n\t\t\twait.until(ExpectedConditions.visibilityOfElementLocated(locator));\n\t\t\tele = driver.findElement(locator);\n\t\t} catch (NoSuchElementException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (TimeoutException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\treturn ele;\n\n\t}", "public WebElement getElement(By locator) {\n\t\tWebElement ele = null;\n\n\t\ttry {\n\t\t\tWebDriverWait wait = new WebDriverWait(driver, EXPLICIT_WAIT_S);\n\t\t\twait.until(ExpectedConditions.visibilityOfElementLocated(locator));\n\t\t\tele = driver.findElement(locator);\n\t\t} catch (NoSuchElementException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (TimeoutException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\treturn ele;\n\n\t}", "public WebElement getElement(String locator){\n\t\tWebElement webElement = null;\n\t\twaitForElementVisibility(locator);\n\t\ttry{\n\t\t\tif(locator.startsWith(\"//\")) {\t\n\t\t\t\twebElement = driver.findElement(By.xpath(locator));\t\t\t\t\n\t\t\t}else if( locator.startsWith(\"css=\")) {\n\t\t\t\tlocator=locator.substring(4);\n\t\t\t\twebElement = driver.findElement(By.cssSelector(locator));\n\t\t\t}else if( locator.startsWith(\"class=\")) {\n\t\t\t\tlocator = locator.split(\"\\\\=\")[1];\n\t\t\t\twebElement = driver.findElement(By.className(locator));\n\t\t\t}else if( locator.startsWith(\"name=\")) {\n\t\t\t\tlocator = locator.split(\"\\\\=\")[1];\n\t\t\t\twebElement = driver.findElement(By.name(locator));\n\t\t\t}else if( locator.startsWith(\"link=\")) {\n\t\t\t\tlocator = locator.split(\"\\\\=\")[1];\n\t\t\t\twebElement = driver.findElement(By.linkText(locator));\n\t\t\t}else if( locator.startsWith(\"tag=\")) {\n\t\t\t\tlocator = locator.split(\"\\\\=\")[1];\n\t\t\t\twebElement = driver.findElement(By.tagName(locator));\n\t\t\t} else\n\t\t\t\twebElement = driver.findElement(By.id(locator));\n\t\t\tlog.debug(\"ELEMENT FOUND WITH LOCATOR : \"+locator);\n\t\t}catch (NoSuchElementException ex) {\n\t\t\tlog.debug(\"No such element \"+locator);\n\t\t\treturn webElement;\n\t\t} catch(Exception ex) {\n\t\t\tlog.debug(\"ELEMENT NOT FOUND WITH LOCATOR : \"+locator);\n\t\t ex.printStackTrace();\n\t\t return webElement;\n\t\t}\n\t\treturn webElement;\t\t\n\t}", "public WebElement findElement(By locator){\n\t\tWebElement element = null;\n\t\tif(driver == null){\n\t\t\tthrow new IllegalArgumentException(\"WebDriver cannot be null\");\n\t\t}\n\n\t\ttry {\n\t\t\twaitForElement(locator);\n\t\t\twaitForElement(ExpectedConditions.refreshed(ExpectedConditions.presenceOfElementLocated(locator)));\n\t\t\twaitForElement(ExpectedConditions.refreshed(ExpectedConditions.visibilityOfElementLocated(locator)));\n\t\t\telement = driver.findElement(locator);\n\t\t\t//((JavascriptExecutor) driver).executeScript(\"arguments[0].scrollIntoView(true);\", element);\n\n\t\t}catch(Exception e)\n\t\t{\n\t\t\t//e.printStackTrace();\n\t\t\tthrow new NotFoundException(\"Element with locator [\"+ locator.toString() +\"] was not found.\");\n\t\t}\n\t\treturn element;\n\t}", "public WebElement getElement(By locator ){\n \tWebElement element=null;\n \ttry{\n \t\t element=driver.findElement(locator);\n \t}catch(Exception e){\n \t\tSystem.out.println(\"some exception occured while creating web element \"+ locator);\n \t} \t\n \treturn element;\n }", "public WebElement findElementClickable(By locator){\n\t\tWebElement element = null;\n\t\tif(driver == null){\n\t\t\tthrow new IllegalArgumentException(\"WebDriver cannot be null\");\n\t\t}\n\n\t\ttry {\n\n\t\t\twaitForElement(locator);\n\t\t\twaitForElement(ExpectedConditions.refreshed(ExpectedConditions.elementToBeClickable(locator)));\n\t\t\telement = driver.findElement(locator);\n\t\t\t//((JavascriptExecutor) driver).executeScript(\"arguments[0].scrollIntoView(true);\", element);\n\t\t\treturn element;\n\n\t\t}catch(Exception e)\n\t\t{\n\t\t\t//e.printStackTrace();\n\t\t\tthrow new NotFoundException(\"Element with locator [\"+ locator.toString() +\"] was not found.\");\n\n\t\t}\n\t}", "protected List<WebElement> findListOfElements(By locator) {\n waitForVisibilityOf(locator);\n return driver.findElements(locator);\n }", "protected WebElement find(By locator) {\n try {\n return driver.findElement(locator);\n } catch (NoSuchElementException e) {\n log.error(\"Element not found: [\" + locator + \"]\");\n log.error(e.toString());\n return null;\n }\n }", "public String getText(final String elementLocator);", "public WebElement findElement(By locator) {\n try {\n WebElement element = getDriver().findElement(locator);\n return element;\n } catch (NoSuchElementException e) {\n error(\"Exception Occurred in while finding element with definition :: \" + locator);\n error(Throwables.getStackTraceAsString(e));\n throw new NoSuchElementException(e.getMessage());\n }\n }", "public List<WebElement> findElements(By locator) {\n try {\n List<WebElement> element = getDriver().findElements(locator);\n return element;\n } catch (NoSuchElementException e) {\n error(\"element not found\" + locator);\n throw new NoSuchElementException(e.getMessage());\n }\n }", "public boolean isVisible(final String elementLocator);", "@Override\r\n\tpublic void findElement() {\n\t\t\r\n\t}", "@Override\r\n\tpublic List<WebElement> findElements() {\n\t\thandleContext(bean.getIn());\r\n\t\treturn driver.getRealDriver().findElements(bean.getBys().get(0));\r\n\t}", "Element getElement();", "String getElem();", "Object element();", "Object element();", "public WebElement getElement(String locatorKey){\r\n\t\tWebElement e=null;\r\n\t\ttry{\r\n\t\tif(locatorKey.endsWith(\"_id\"))\r\n\t\t\te = driver.findElement(By.id(prop.getProperty(locatorKey)));\r\n\t\telse if(locatorKey.endsWith(\"_name\"))\r\n\t\t\te = driver.findElement(By.name(prop.getProperty(locatorKey)));\r\n\t\telse if(locatorKey.endsWith(\"_xpath\"))\r\n\t\t\te = driver.findElement(By.xpath(prop.getProperty(locatorKey)));\r\n\t\telse if(locatorKey.endsWith(\"_class\"))\r\n\t\t\te = driver.findElement(By.className(prop.getProperty(locatorKey)));\r\n\t\telse{\r\n\t\t\treportFailure(\"Locator not correct - \" + locatorKey);\r\n\t\t\tAssert.fail(\"Locator not correct - \" + locatorKey);\r\n\t\t}\r\n\t\t\r\n\t\t}catch(Exception ex){\r\n\t\t\t// fail the test and report the error\r\n\t\t\treportFailure(ex.getMessage());\r\n\t\t\tex.printStackTrace();\r\n\t\t\tAssert.fail(\"Failed the test - \"+ex.getMessage());\r\n\t\t}\r\n\t\treturn e;\r\n\t}", "public WebElement getElement(WebDriver driver, By locator, int timeout) throws Exception {\n for (int i = 0; i <= timeout; i++) {\n try {\n element = driver.findElement(locator);\n log.info(\"Found element with : \" + locator);\n return element;\n } catch (Exception e) {\n log.info(i + \". Trying to find element with \" + locator);\n }\n Thread.sleep(2000);\n }\n StackTraceElement stackTrace = new Throwable().getStackTrace()[1];\n log.error(\"Cannot find element with : \" + locator);\n log.error(\"Cannot find element : \" + stackTrace.getClassName() + \".\" + stackTrace.getMethodName());\n throw new Exception(\"Unable to find Element\");\n }", "Element getElement(Position pos);", "Element getElement(String id);", "public E element () throws NoSuchElementException;", "public WebElement element(String strElement) throws Exception {\n String locator = prop.getProperty(strElement); \n // extract the locator type and value from the object\n String locatorType = locator.split(\";\")[0];\n String locatorValue = locator.split(\";\")[1];\n // System.out.println(By.xpath(\"AppLogo\"));\n \n // for testing and debugging purposes\n System.out.println(\"Retrieving object of type '\" + locatorType + \"' and value '\" + locatorValue + \"' from the Object Repository\");\n \n // wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(\"//input[@id='text3']\")));\n try {\n\n\n \tif(locatorType.equalsIgnoreCase(\"Id\"))\n \t\treturn driver.findElement(By.id(locatorValue)); \n \telse if(locatorType.equalsIgnoreCase(\"Xpath\")) \n \t\t\treturn driver.findElement(By.xpath(locatorValue)); \n// \t\t}catch(Exception e) {\n// \t\t\tdriver.navigate().refresh();\n//\n// \t\t\t@SuppressWarnings({ \"unchecked\", \"deprecation\", \"rawtypes\" })\n// \t\t\tWait<WebDriver> wait = new FluentWait(driver) \n// \t\t\t.withTimeout(8, TimeUnit.SECONDS) \n// \t\t\t.pollingEvery(1, TimeUnit.SECONDS) \n// \t\t\t.ignoring(NoSuchElementException.class);\n// \t\t\twait.until(ExpectedConditions.visibilityOf(driver.findElement(By.xpath(locatorValue))));\n// \t\t\treturn driver.findElement(By.xpath(locatorValue)); \n// \t\t}\n \n \n \n else if(locatorType.equalsIgnoreCase(\"Name\"))\n \treturn driver.findElement(By.name(locatorValue));\n else if(locatorType.equalsIgnoreCase(\"Classname\")) \n \treturn driver.findElement(By.className(locatorValue));\n else if(locatorType.equalsIgnoreCase(\"Tagname\"))\n \treturn driver.findElement(By.className(locatorValue));\n else if(locatorType.equalsIgnoreCase(\"Linktext\"))\n \treturn driver.findElement(By.linkText(locatorValue));\n else if(locatorType.equalsIgnoreCase(\"Partiallinktext\"))\n \treturn driver.findElement(By.partialLinkText(locatorValue));\n else if(locatorType.equalsIgnoreCase(\"Cssselector\")) \n \treturn driver.findElement(By.cssSelector(locatorValue));\n\n \n } catch (NoSuchElementException | StaleElementReferenceException e) {\n \t\t\n if(locatorType.equalsIgnoreCase(\"Id\"))\n return driver.findElement(By.id(locatorValue)); \n else if(locatorType.equalsIgnoreCase(\"Xpath\")) \n return driver.findElement(By.xpath(locatorValue)); \n else if(locatorType.equalsIgnoreCase(\"Name\"))\n \treturn driver.findElement(By.name(locatorValue));\n else if(locatorType.equalsIgnoreCase(\"Classname\")) \n \treturn driver.findElement(By.className(locatorValue));\n else if(locatorType.equalsIgnoreCase(\"Tagname\"))\n \treturn driver.findElement(By.className(locatorValue));\n else if(locatorType.equalsIgnoreCase(\"Linktext\"))\n \treturn driver.findElement(By.linkText(locatorValue));\n else if(locatorType.equalsIgnoreCase(\"Partiallinktext\"))\n \treturn driver.findElement(By.partialLinkText(locatorValue));\n else if(locatorType.equalsIgnoreCase(\"Cssselector\")) \n \treturn driver.findElement(By.cssSelector(locatorValue));\n }\n throw new NoSuchElementException(\"Unknown locator type '\" + locatorType + \"'\"); \n \t}", "public RTWElementRef getAsElement(int i);", "String getElement();", "<T extends IElement> List<T> findElements(By locator, ElementType type, ElementsCount count);", "public String getValue(final String elementLocator);", "public WebElement locateElement(String locatorValue) {\n\t\tWebElement findElementById = getter().findElement(By.id(locatorValue));\r\n\t\treturn findElementById;\r\n\t}", "<T extends IElement> List<T> findElements(By locator, IElementSupplier<T> supplier, ElementsCount count);", "Elem getElem();", "public Object getElement();", "public WebElement apply(WebDriver driver ) {\n return driver.findElement(By.xpath(\"/html/body/div[1]/section/div[2]/div/div[1]/div/div[1]/div/div/div/div[2]/div[2]/div/div/div/div/div[1]/div/div/a/i\"));\n }", "private List<WebElement> findElements(String strategy, String locator, boolean xpath) {\n if (elementId.equals(\"\")) {\n return (List<WebElement>) driver.executeAtom(atoms.findElementsJs, xpath, strategy, locator);\n } else {\n return (List<WebElement>) driver.executeAtom(atoms.findElementsJs, xpath, strategy, locator, this);\n }\n }", "public WebElement findElement(By element) {\r\n\t\t\r\n\t\treturn driver.findElement(element);\r\n\t\t\t\r\n\t}", "default <T extends IElement> List<T> findElements(By locator, ElementType type) {\n return findElements(locator, type, ElementsCount.MORE_THEN_ZERO);\n }", "Elem getPointedElem();", "public void assertVisible(final String elementLocator);", "public native Element getEl() /*-{\r\n\t\tvar proxy = this.@com.ait.toolkit.core.client.JsObject::getJsObj()();\r\n\t\tvar el = proxy.getEl();\r\n\t\treturn @com.ait.toolkit.sencha.shared.client.dom.ExtElement::instance(Lcom/google/gwt/core/client/JavaScriptObject;)(el);\r\n\t}-*/;", "public WebElement getObject(WebDriver driver,String locatorType, String locator){\r\n\t\ttry{\r\n\t\t\tWebDriverWait wait = new WebDriverWait(driver, 60);\r\n\t\t\r\n\t\t\tif(locatorType.equalsIgnoreCase(\"name\")){\r\n\t\t\t\twait.until(ExpectedConditions.visibilityOf(driver.findElement(By.name(locator))));\r\n\t\t\t\tif(!(driver.findElement(By.name(locator)).isDisplayed() && driver.findElement(By.name(locator)).isEnabled())){\r\n\t\t\t\t\tTestLogger.logError(\"Element is not found with attribute : name=\"+locator+\" until timeout reaches\");\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\t\t\t\treturn (driver.findElement(By.name(locator)));\t\r\n\t\t\t}\r\n\t\t\telse if(locatorType.equalsIgnoreCase(\"id\")){\r\n\t\t\t\twait.until(ExpectedConditions.visibilityOf(driver.findElement(By.id(locator))));\r\n\t\t\t\tif(!(driver.findElement(By.id(locator)).isDisplayed() && driver.findElement(By.id(locator)).isEnabled())){\r\n\t\t\t\t\tTestLogger.logError(\"Element is not found with attribute : id=\"+locator+\" until timeout reaches\");\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\t\t\t\treturn (driver.findElement(By.id(locator)));\t\t\r\n\t\t\t}\r\n\t\t\telse if(locatorType.equalsIgnoreCase(\"linkText\")){\r\n\t\t\t\twait.until(ExpectedConditions.visibilityOf(driver.findElement(By.linkText(locator))));\r\n\t\t\t\tif(!(driver.findElement(By.linkText(locator)).isDisplayed() && driver.findElement(By.linkText(locator)).isEnabled())){\r\n\t\t\t\t\tTestLogger.logError(\"Element is not found with attribute : linkText=\"+locator+\" until timeout reaches\");\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\t\t\t\treturn (driver.findElement(By.linkText(locator)));\t\t\r\n\t\t\t}\r\n\t\t\telse if(locatorType.equalsIgnoreCase(\"partialLinkText\")){\r\n\t\t\t\twait.until(ExpectedConditions.visibilityOf(driver.findElement(By.partialLinkText(locator))));\r\n\t\t\t\tif(!(driver.findElement(By.partialLinkText(locator)).isDisplayed() && driver.findElement(By.partialLinkText(locator)).isEnabled())){\r\n\t\t\t\t\tTestLogger.logError(\"Element is not found with attribute : partialLinkText=\"+locator+\" until timeout reaches\");\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\t\t\t\treturn (driver.findElement(By.partialLinkText(locator)));\t\r\n\t\t\t}\r\n\t\t\telse if(locatorType.equalsIgnoreCase(\"className\")){\r\n\t\t\t\twait.until(ExpectedConditions.visibilityOf(driver.findElement(By.className(locator))));\r\n\t\t\t\tif(!(driver.findElement(By.className(locator)).isDisplayed() && driver.findElement(By.className(locator)).isEnabled())){\r\n\t\t\t\t\tTestLogger.logError(\"Element is not found with attribute : className=\"+locator+\" until timeout reaches\");\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\t\t\t\treturn (driver.findElement(By.className(locator)));\t\r\n\t\t\t}\r\n\t\t\telse if(locatorType.equalsIgnoreCase(\"tagName\")){\r\n\t\t\t\twait.until(ExpectedConditions.visibilityOf(driver.findElement(By.tagName(locator))));\r\n\t\t\t\tif(!(driver.findElement(By.tagName(locator)).isDisplayed() && driver.findElement(By.tagName(locator)).isEnabled())){\r\n\t\t\t\t\tTestLogger.logError(\"Element is not found with attribute : tagName=\"+locator+\" until timeout reaches\");\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\t\t\t\treturn (driver.findElement(By.tagName(locator)));\t\t\t\r\n\t\t\t}\r\n\t\t\telse if(locatorType.equalsIgnoreCase(\"xpath\")){\r\n\t\t\t\twait.until(ExpectedConditions.visibilityOf(driver.findElement(By.xpath(locator))));\r\n\t\t\t\tif(!(driver.findElement(By.xpath(locator)).isDisplayed() && driver.findElement(By.xpath(locator)).isEnabled())){\r\n\t\t\t\t\tTestLogger.logError(\"Element is not found with attribute : xpath=\"+locator+\" until timeout reaches\");\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\t\t\t\treturn (driver.findElement(By.xpath(locator)));\t\t\r\n\t\t\t}\r\n\t\t\telse if(locatorType.equalsIgnoreCase(\"css\")){\r\n\t\t\t\twait.until(ExpectedConditions.visibilityOf(driver.findElement(By.cssSelector(locator))));\r\n\t\t\t\tif(!(driver.findElement(By.cssSelector(locator)).isDisplayed() && driver.findElement(By.cssSelector(locator)).isEnabled())){\r\n\t\t\t\t\tTestLogger.logError(\"Element is not found with attribute : cssSelector=\"+locator+\" until timeout reaches\");\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\t\t\t\treturn (driver.findElement(By.cssSelector(locator)));\t\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tTestLogger.logError(\"Locator of type :\"+locatorType+\" is not valid\");\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t}catch(NoSuchElementException exception){\r\n\t\t\tTestLogger.logError(\"No such element found with attrribute : \"+locatorType+\"=\"+locator);\r\n\t\t\texception.printStackTrace();\r\n\t\t\tdriver.close();\r\n\t\t\tTestBase.driver = null;\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\te.printStackTrace();\r\n\t\t\tdriver.close();\r\n\t\t\tTestBase.driver = null;\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "public E element();", "public WebElement game() { return driver.findElement(gameLocator); }", "@Override\n\tpublic WebElement $x(String xpath) {\n\t\tList<WebElement> els = this.findElements(By.xpath(xpath));\n\t\tif (els.size() >= 0) {\n\t\t\treturn els.get(0);\n\t\t}\n\t\treturn null;\n\t}", "<T extends IElement> List<T> findElements(By locator, Class<? extends IElement> clazz, ElementsCount count);", "@Override\npublic void findElement(String by) {\n\t\n}", "public WebElement returnElementByXpath(String xpath){\n WebElement element;\n element = driver.findElement(By.xpath(xpath));\n return element;\n }", "public abstract LocalAbstractObject getObject(String locator) throws NoSuchElementException;", "public WebElement find_Element_Locators(String locators, String id) {\n\t\tWebElement find_Element = null;\n\t\ttry {\n\t\t\tif (locators.equalsIgnoreCase(\"id\")) {\n\t\t\t\tfind_Element = driver.findElement(By.id(id));\n\t\t\t}\n\t\t\telse if (locators.equalsIgnoreCase(\"name\")) {\n\t\t\t\tfind_Element=driver.findElement(By.name(id));\n\t\t\t}\n\t\t\telse if (locators.equalsIgnoreCase(\"xpath\")) {\n\t\t\t\t find_Element = driver.findElement(By.xpath(id));\n\t\t\t}\n\t\t\telse if (locators.equalsIgnoreCase(\"tagName\")) {\n\t\t\t\tfind_Element = driver.findElement(By.tagName(id));\n\t\t\t}\n\t\t\telse if (locators.equalsIgnoreCase(\"className\")) {\n\t\t\t\tfind_Element = driver.findElement(By.className(id));\n\t\t\t}\n\t\t\telse if (locators.equalsIgnoreCase(\"cssSelector\")) {\n\t\t\t\tfind_Element = driver.findElement(By.cssSelector(id));\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\treturn find_Element;\n\t}", "private WebElement getCssSelectorElement(String cssSelectorInfo) {\n\t\tWebElement element = null;\n\t\t// WebDriverWait wait = new WebDriverWait(driver, 60);\n\t\telement = SearchTest.wait.until(visibilityOfElementLocated(By.cssSelector(cssSelectorInfo)));\n\t\treturn element;\n\t}", "public static MobileElement element(By locator) {\n return w(driver.findElement(locator));\n }", "public static WebElement returnElement(String locatorType, String locatorPath) {\r\n\r\n\t\tWebDriverWait wait = new WebDriverWait(driver, TIMEOUT);\r\n\r\n\t\tswitch (locatorType.toLowerCase()) {\r\n\t\tcase \"id\":\r\n\t\t\treturn wait.until(ExpectedConditions.visibilityOf(driver.findElement(By.id(locatorPath))));\r\n\t\t// driver.findElement(By.id(locatorPath));\r\n\t\t\t\r\n\t\tcase \"xpath\":\r\n\t\t\treturn driver.findElement(By.xpath(locatorPath));\r\n\r\n\t\tcase \"name\":\r\n\t\t\treturn wait.until(ExpectedConditions.visibilityOf(driver.findElement(By.name(locatorPath))));\r\n\t\t// driver.findElement(By.name(locatorPath));\r\n\r\n\t\tcase \"classname\":\r\n\t\t\treturn wait.until(ExpectedConditions.visibilityOf(driver.findElement(By.className(locatorPath))));\r\n\t\t// driver.findElement(By.className(locatorPath));\r\n\r\n\t\tcase \"cssselector\":\r\n\t\t\treturn wait.until(ExpectedConditions.visibilityOf(driver.findElement(By.cssSelector(locatorPath))));\r\n\t\t// driver.findElement(By.cssSelector(locatorPath));\r\n\r\n\t\tcase \"linktext\":\r\n\t\t\treturn wait.until(ExpectedConditions.visibilityOf(driver.findElement(By.linkText(locatorPath))));\r\n\t\t// driver.findElement(By.linkText(locatorPath));\r\n\r\n\t\tcase \"tagname\":\r\n\t\t\treturn wait.until(ExpectedConditions.visibilityOf(driver.findElement(By.tagName(locatorPath))));\r\n\t\t// driver.findElement(By.tagName(locatorPath));\r\n\r\n\t\tdefault:\r\n\t\t\tthrow new RuntimeException(\"Unknown locator \" + locatorType + \" : \" + locatorPath);\r\n\t\t}\r\n\r\n\t}", "private WebElement getXpath(String xpathInfo) {\n\t\tWebElement element = null;\n\t\t// WebDriverWait wait = new WebDriverWait(driver, 60);\n\t\telement = SearchTest.wait.until(visibilityOfElementLocated(By.xpath(xpathInfo)));\n\t\treturn element;\n\t}", "public void findElementInListByText(String value, By locator) {\n waitForVisibilityOf(locator);\n List<WebElement> listOfElements = findListOfElements(locator);\n if (listOfElements != null && !listOfElements.isEmpty()) {\n for (WebElement element : listOfElements) {\n if (value.toLowerCase(Locale.ROOT).equals(element.getText().toLowerCase(Locale.ROOT))) {\n element.click();\n break;\n }\n }\n } else {\n log.info(\"List is null or empty! Elements not found by locator: [\" + locator + \"]\");\n }\n }", "<T extends IElement> T findChildElement(IElement parentElement, By childLoc, IElementSupplier<T> supplier);", "@DISPID(1001)\n @PropGet\n ms.html.IHTMLElement element();", "public ChosenItemPage rememberElementAndFindIt(){\n showxButton.click(); //делает выпадющее меню количества выбора показываемых товаров\n waitVisibilityOf(showx12Button); \n showx12Button.click(); //выбираем показывать по 12\n WebElement firstItem=results.get(0);\n waitVisibilityOf(firstItem);\n String name=firstItem.getText(); //name of the product in the first item\n\n Assert.assertEquals(\"Показывать по 12 не установлено\",\n \"Показывать по 12\", showx.getText());\n\n Stash.put(Stash.firstItemName, name); //remeber first item\n fillField(name,headerSearch);\n headerSearch.sendKeys(Keys.ENTER);\n return new ChosenItemPage();\n }", "@Override\n\tpublic Consultation getElementAt(int arg0) {\n\t\treturn listaConsultatii.get(arg0);\n\t}", "public ITabDescriptor getElementAt(int index) {\n\t\tif (index >= 0 && index < elements.size()) {\n\t\t\treturn elements.get(index);\n\t\t}\n\t\treturn null;\n\t}", "ViewElement getViewElement();", "public E getElement() { return element; }", "@Override\r\n\tpublic Object getElement(Object elementKey) {\n\t\treturn elements.get(elementKey);\r\n\t}", "default <T extends IElement> List<T> findElements(By locator, Class<? extends IElement> clazz) {\n return findElements(locator, clazz, ElementsCount.MORE_THEN_ZERO);\n }", "WebElement getSearchButton();", "public List<WebElement> locateElements(String type, String value) {\n\t\ttry {\r\n\t\t\tswitch(type.toLowerCase()) {\r\n\t\t\tcase \"id\": return getter().findElements(By.id(value));\r\n\t\t\tcase \"name\": return getter().findElements(By.name(value));\r\n\t\t\tcase \"class\": return getter().findElements(By.className(value));\r\n\t\t\tcase \"link\": return getter().findElements(By.linkText(value));\r\n\t\t\tcase \"xpath\": return getter().findElements(By.xpath(value));\r\n\t\t\t}\r\n\t\t} catch (NoSuchElementException e) {\r\n\t\t\tSystem.err.println(\"The Element locator:\"+type+\" value not found: \"+value);\r\n\t\t\tthrow new RuntimeException();\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "<T extends IElement> T findChildElement(IElement parentElement, By childLoc, Class<? extends IElement> clazz);", "public ExpectedCondition<WebElement> visibilityOfElementLocated(final By locator) {\n\t\treturn new ExpectedCondition<WebElement>() {\n\t\t\tpublic WebElement apply(WebDriver driver) {\n\t\t\t\tfinal WebElement toReturn = driver.findElement(locator);\n\t\t\t\tif (toReturn.isDisplayed()) {\n\t\t\t\t\treturn toReturn;\n\t\t\t\t}\n\t\t\t\treturn null;\n\t\t\t}\n\t\t};\n\t}", "private WebElement getid(String idInfo) {\n\t\tWebElement element = null;\n\t\t// WebDriverWait wait = new WebDriverWait(driver, 60);\n\t\telement = SearchTest.wait.until(visibilityOfElementLocated(By.id(idInfo)));\n\t\treturn element;\n\t}", "public void DisplayBestSellerFromCollection() {\r\n\tSystem.out.println(\"Items under BestSeller SubMenu are :-\");\r\n System.out.println(\"\\n\"); \r\n\r\n\t\tdriver.findElement(By.xpath(\"/html/body/div[1]/header/div[2]/div/nav/div/ul/li[10]/span\")).click();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tWebDriverWait wait1 = new WebDriverWait(driver,30);\r\n\t\twait1.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(\"/html/body/div[1]/header/div[2]/div/nav/div/ul/li[10]/div/div/ul/li[3]/div/a\")));\r\n\t\t\r\n\t\t\r\n\t\tList<WebElement> lst = driver.findElements(By.xpath(\"/html/body/div[1]/header/div[2]/div/nav/div/ul/li[10]/div/div/ul/li[3]/ul/li/a/span\"));\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tfor(int i=0;i<7;i++)\r\n\t\t{\r\n\t\t\tSystem.out.println(lst.get(i).getText());\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\tSystem.out.println(\"\\r\\n\"\r\n\t\t\t\t+ \"===============================================\");\r\n\t\t\r\n\t\t\r\n\t}", "public String getElement() { return element; }", "public static List<MobileElement> elements(By locator) {\n return w(driver.findElements(locator));\n }", "private Element findByIndex(int index) {\n\t\tElement e = head;\n\t\tfor (int i = 0; i < index; i++) {\n\t\t\te = e.next;\n\t\t}\n\t\treturn e;\n\t}", "@Override\r\n public Element findElement()\r\n {\n return null;\r\n }", "public IElement element(String id);", "public static WebElement lnk_clickSupplierNameTitle() throws Exception{\r\n \ttry{\r\n \t\t// comdev.qa\tdate: 23-Oct-2015\r\n \t//\telement = driver.findElement(By.xpath(\"(//*[contains(@class, 'supplierName_tit')]//a)[position()=1]\"));\r\n \t\t\r\n \t\tWebDriverWait waits = new WebDriverWait(driver, 20);\r\n \t\twaits.until(ExpectedConditions.elementToBeClickable(\r\n \t\t\t\tBy.xpath(\"(//a[contains(@class, 'supplierTit')])[position()=1]\")));\r\n \t\t\r\n \t\telement = driver.findElement(By.xpath(\"(//a[contains(@class, 'supplierTit')])[position()=1]\"));\r\n \t\tAdd_Log.info(\"Supplier name title is click on the page.\");\r\n \t\t\r\n \t}catch(Exception e){\r\n \t\tAdd_Log.error(\"Supplier name title is NOT found on the page.\");\r\n \t\tthrow(e);\r\n \t}\r\n \treturn element;\r\n }", "public T getElement();", "<T extends IElement> T findChildElement(IElement parentElement, By childLoc, ElementType type);", "private boolean elementDisplayed(String xpath){\n try {\n WebElement element = Driver.getDriver().findElement(By.xpath(xpath));\n return element.isDisplayed();\n }catch(Exception e){\n return false;\n }\n }", "public <T> T getElement(String name) {\n return elements.get(name);\n }", "public boolean elementIsDisplayed(By locator){\n \twaitForElementPresent(locator);\n \treturn getElement(locator).isDisplayed();\n }", "public List<AndroidElement> getListOfElementFromLocator(By locator) {\n return (List<AndroidElement>) appiumDriver.findElements(locator);\n }", "private String getCurrentElement(final ElementKind kind, final Element[] elementPtr)\n throws java.awt.IllegalComponentStateException {\n Node[] nodes = TopComponent.getRegistry ().getCurrentNodes ();\n if (nodes == null) return null;\n if (nodes.length != 1) return null;\n DataObject dataObject = nodes[0].getCookie(DataObject.class);\n if (dataObject == null) return null;\n JavaFXSource js = JavaFXSource.forFileObject(dataObject.getPrimaryFile());\n if (js == null) return null;\n // TODO: Can be called outside of AWT? Probably need invokeAndWait()\n EditorCookie ec = nodes[0].getCookie(EditorCookie.class);\n final int currentOffset;\n \n JEditorPane[] op = ec.getOpenedPanes ();\n JEditorPane ep = (op != null && op.length >= 1) ? op[0] : null;\n final String selectedIdentifier;\n if (ep != null) {\n String s = ep.getSelectedText ();\n currentOffset = ep.getCaretPosition();\n if (ep.getSelectionStart() > currentOffset || ep.getSelectionEnd() < currentOffset) {\n s = null; // caret outside of the selection\n }\n if (s != null && Utilities.isJavaIdentifier (s)) {\n selectedIdentifier = s;\n } else {\n selectedIdentifier = null;\n }\n } else {\n selectedIdentifier = null;\n currentOffset = 0;\n }\n \n //final int currentOffset = org.netbeans.editor.Registry.getMostActiveComponent().getCaretPosition();\n final String[] currentElementPtr = new String[] { null };\n final Future<Void> scanFinished;\n try {\n scanFinished = js.runWhenScanFinished(new CancellableTask<CompilationController>() {\n public void cancel() {\n }\n public void run(CompilationController ci) throws Exception {\n if (ci.toPhase(Phase.ANALYZED).lessThan(Phase.ANALYZED)) {\n ErrorManager.getDefault().log(ErrorManager.WARNING,\n \"Unable to resolve \"+ci.getCompilationUnit().getSourceFile()+\" to phase \"+Phase.ANALYZED+\", current phase = \"+ci.getPhase()+\n \"\\nDiagnostics = \"/*+ci.getDiagnostics()*/+\n \"\\nFree memory = \"+Runtime.getRuntime().freeMemory());\n return;\n }\n Element el = null;\n if (kind == ElementKind.CLASS) {\n boolean isMemberClass = false;\n if (selectedIdentifier != null) {\n Tree tree = ci.getTreeUtilities().pathFor(currentOffset).getLeaf();\n if (tree.getJavaFXKind() == Tree.JavaFXKind.MEMBER_SELECT) {\n MemberSelectTree mst = (MemberSelectTree) tree;\n el = ci.getTrees().getElement(ci.getTrees().getPath(ci.getCompilationUnit(), mst.getExpression()));\n TypeMirror tm = el.asType();\n if (tm.getKind().equals(TypeKind.DECLARED)) {\n currentElementPtr[0] = tm.toString();\n isMemberClass = true;\n }\n }\n } \n if (!isMemberClass) {\n JavaFXTreePath currentPath = ci.getTreeUtilities().pathFor(currentOffset);\n Tree tree = currentPath.getLeaf();\n TypeElement te;\n if (tree.getJavaFXKind() == Tree.JavaFXKind.CLASS_DECLARATION) {\n te = (TypeElement) ci.getTrees().getElement(currentPath);\n } else if (tree.getJavaFXKind() == Tree.JavaFXKind.COMPILATION_UNIT){\n //It is mean tyhat we have global variable and need to set name of the file as classname\n //TODO XXX Durty Hack\n String packageName = ci.getTrees().getElement(currentPath).getSimpleName().toString();\n String className = ci.getFileObject().getName();\n currentElementPtr[0] = packageName+\".\"+className;\n te = null;\n } else {\n Scope scope = ci.getTreeUtilities().scopeFor(currentOffset);\n // JavafxcScope scope = ci.getTreeUtilities().javafxcScopeFor(currentOffset);\n te = scope.getEnclosingClass();\n }\n if (te != null) {\n currentElementPtr[0] = getBinaryName(te);\n }\n el = te;\n }\n } else if (kind == ElementKind.METHOD) {\n Scope scope = ci.getTreeUtilities().scopeFor(currentOffset);\n // JavafxcScope scope = ci.getTreeUtilities().javafxcScopeFor(currentOffset);\n el = scope.getEnclosingMethod();\n if (el != null) {\n currentElementPtr[0] = el.getSimpleName().toString();\n if (currentElementPtr[0].equals(\"<init>\")) {\n // The constructor name is the class name:\n currentElementPtr[0] = el.getEnclosingElement().getSimpleName().toString();\n }\n }\n } else if (kind == ElementKind.FIELD) {\n int offset = currentOffset;\n \n if (selectedIdentifier == null) {\n String text = ci.getText();\n int l = text.length();\n char c = 0; // Search for the end of the field declaration\n while (offset < l && (c = text.charAt(offset)) != ';' && c != ',' && c != '\\n' && c != '\\r') offset++;\n if (offset < l && c == ';' || c == ',') { // we have it, but there might be '=' sign somewhere before\n int endOffset = --offset;\n int setOffset = -1;\n while(offset >= 0 && (c = text.charAt(offset)) != ';' && c != ',' && c != '\\n' && c != '\\r') {\n if (c == '=') setOffset = offset;\n offset--;\n }\n if (setOffset > -1) {\n offset = setOffset;\n } else {\n offset = endOffset;\n }\n while (offset >= 0 && Character.isWhitespace(text.charAt(offset))) offset--;\n }\n if (offset < 0) offset = 0;\n }\n Tree tree = ci.getTreeUtilities().pathFor(offset).getLeaf();\n if (tree.getJavaFXKind() == Tree.JavaFXKind.VARIABLE) {\n el = ci.getTrees().getElement(ci.getTrees().getPath(ci.getCompilationUnit(), tree));\n if (el.getKind() == ElementKind.FIELD || el.getKind() == ElementKind.ENUM_CONSTANT) {\n currentElementPtr[0] = ((VariableTree) tree).getName().toString();\n }\n } else if (tree.getJavaFXKind() == Tree.JavaFXKind.IDENTIFIER && selectedIdentifier != null) {\n IdentifierTree it = (IdentifierTree) tree;\n String fieldName = it.getName().toString();\n Scope scope = ci.getTreeUtilities().scopeFor(offset);\n // JavafxcScope scope = ci.getTreeUtilities().javafxcScopeFor(offset);\n TypeElement te = scope.getEnclosingClass();\n List<? extends Element> enclosedElms = te.getEnclosedElements();\n for (Element elm : enclosedElms) {\n if (elm.getKind().equals(ElementKind.FIELD) && elm.getSimpleName().contentEquals(fieldName)) {\n currentElementPtr[0] = fieldName;\n break;\n }\n }\n \n } else if (tree.getJavaFXKind() == Tree.JavaFXKind.MEMBER_SELECT && selectedIdentifier != null) {\n MemberSelectTree mst = (MemberSelectTree) tree;\n String fieldName = mst.getIdentifier().toString();\n el = ci.getTrees().getElement(ci.getTrees().getPath(ci.getCompilationUnit(), mst.getExpression()));\n if (el.asType().getKind().equals(TypeKind.DECLARED)) {\n List<? extends Element> enclosedElms = ((DeclaredType) el.asType()).asElement().getEnclosedElements();\n for (Element elm : enclosedElms) {\n if (elm.getKind().equals(ElementKind.FIELD) && elm.getSimpleName().contentEquals(fieldName)) {\n currentElementPtr[0] = fieldName;\n break;\n }\n }\n }\n } \n }\n if (elementPtr != null) {\n elementPtr[0] = el;\n }\n }\n }, true);\n if (!scanFinished.isDone()) {\n if (java.awt.EventQueue.isDispatchThread()) {\n // Hack: We should not wait for the scan in AWT!\n // Thus we throw IllegalComponentStateException,\n // which returns the data upon call to getMessage()\n throw new java.awt.IllegalComponentStateException() {\n \n private void waitScanFinished() {\n try {\n scanFinished.get();\n } catch (InterruptedException iex) {\n } catch (java.util.concurrent.ExecutionException eex) {\n ErrorManager.getDefault().notify(eex);\n }\n }\n \n public String getMessage() {\n waitScanFinished();\n return currentElementPtr[0];\n }\n \n };\n } else {\n try {\n scanFinished.get();\n } catch (InterruptedException iex) {\n return null;\n } catch (java.util.concurrent.ExecutionException eex) {\n ErrorManager.getDefault().notify(eex);\n return null;\n }\n }\n }\n } catch (IOException ioex) {\n ErrorManager.getDefault().notify(ioex);\n return null;\n }\n return currentElementPtr[0];\n }", "@WebElementLocator(webDesktop = \"section#faq div.container div.col-md-12 a.faq-title\",\n webPhone = \"section#faq div.container div.col-md-12 a.faq-title\")\n private static List<WebElement> faqElements() {\n return getDriver().findElements(By.cssSelector(new WebElementLocatorFactory().getLocator(ProductPage.class, \"faqElements\")));\n }", "Object getElementAt(int index);", "public T find(T element);", "protected List<WebElement> jsFindListOfElements(String locator) {\n JavascriptExecutor js = (JavascriptExecutor) driver;\n\n List<WebElement> listOfElements = (List<WebElement>) js.executeScript(\n \"var results = new Array();\"\n + \"var element = document.evaluate(\\\"\" + locator + \"\\\", document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);\"\n + \"for (var i=0; i<element.snapshotLength; i++)\"\n + \"{\"\n + \"results.push(element.snapshotItem(i));\"\n + \"}\"\n + \"return results;\", \"\");\n return listOfElements;\n }", "public abstract Element getElement(int id) throws PositionEX;", "public Object getElement()\r\n\t\t{ return element; }", "public static WebElement getElementByxpath(String xpath) throws Exception {\n\t\tWebElement element = null;\n\t\ttry {\n\t\t\telement = driver.findElement(By.xpath(xpath));\n\t\t\t// element =\n\t\t\t// explicitlyWait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(xpath)));\n\t\t} catch (Exception e) {\n\t\t\tthrow e;\n\t\t}\n\t\treturn element;\n\t}", "public ReportElement getElementAt(Point location)\r\n {\r\n Point p = new Point(getRealDim((int)location.getX()-10)+10,\r\n getRealDim((int)location.getY()-10)+10);\r\n\r\n for (int i=getCrosstabElement().getElements().size()-1; i>=0; --i)\r\n {\r\n ReportElement re = (ReportElement)getCrosstabElement().getElements().elementAt(i);\r\n if ((isDefaultCellMode() == (re.getCell().getType() == CrosstabCell.NODATA_CELL)) && re.intersects(p))\r\n {\r\n return re;\r\n }\r\n }\r\n\r\n return null;\r\n }", "public static WebElement findElement(String locatorType, String locatorPath) {\r\n\r\n\t\telement = returnElement(locatorType, locatorPath);\r\n\t\telement.isDisplayed();\r\n\r\n\t\treturn element;\r\n\t}", "public WebElement ProfileManagementLink()\n{\n return driver.findElement(By.xpath(\".//*[@id='ibm-primary-links']/li[2]/a\"));\n}", "public DomainElement elementForIndex(int index);", "public WebElement getXpathElements(String XPlocator, String XPtype) {\n\t\t\tXPtype = XPtype.toLowerCase();\n\t\t\tif (XPtype.equals(\"textarea\")) {\n\t\t\t\tSystem.out.println(\"Element found with textarea: \" + XPlocator);\n\t\t\t\treturn this.driver.findElement(By.xpath(XPlocator));\n\t\t\t\t\n\t\t\t}\n\n\t\t\telse if (XPtype.equals(\"input\")) {\n\t\t\t\tSystem.out.println(\"Element found with input: \" + XPlocator);\n\t\t\t\treturn this.driver.findElement(By.xpath(XPlocator));\n\t\t\t}\n\n\t\t\t// add more locator types here\n\n\t\t\telse\n\t\t\t\tSystem.out.println(\"Locator type not supported\");\n\t\t\treturn null;\n\t\t}", "public boolean isElementDisplayed(By locator) {\n\t\ttry {\n\t\t\tfindElement(locator);\n\t\t}catch(Exception e)\n\t\t{\n\t\t\tLOGGER.error(\"Step : \"+Thread.currentThread().getStackTrace()[2].getMethodName()+\": Fail\");\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public static WebElement waitForElementToBeVisible(By locator, int timeOut){\n\t\tWebDriverWait wait = new WebDriverWait(driver, timeOut);\n\t\treturn wait.until(ExpectedConditions.visibilityOf(getElement(locator)));\n\n\t}", "public By Presentation(int index) {\n\t\treturn By.xpath(\"//XCUIElementTypeCollectionView/XCUIElementTypeCell[\"+index+\"]\");\n\t}", "public ArrayList<String> WebElementArrayList(By locator) {\n List<WebElement> elementList = getDriver().findElements(locator);\n ArrayList<String> elementArrayList= new ArrayList<>();\n String temp = null;\n for (int i = 0; i < elementList.size()-1; i++) {\n temp = elementList.get(i).getText();\n\n elementArrayList.add(temp);\n }\n return elementArrayList;\n }" ]
[ "0.6736742", "0.66431296", "0.6629753", "0.6602465", "0.65580416", "0.6452647", "0.63413846", "0.6250691", "0.6211027", "0.6109853", "0.6059293", "0.60537016", "0.603422", "0.602124", "0.6007974", "0.6006582", "0.60048103", "0.5949047", "0.5940503", "0.5925605", "0.5925605", "0.5924745", "0.5893804", "0.58752257", "0.5865676", "0.5852317", "0.58519834", "0.58258724", "0.58207864", "0.5789006", "0.57600844", "0.5739579", "0.57254374", "0.571916", "0.5700213", "0.56990224", "0.5691113", "0.5679764", "0.56783676", "0.5663905", "0.5636378", "0.5634625", "0.5621443", "0.5613091", "0.560503", "0.5604604", "0.5604279", "0.55863535", "0.55841357", "0.55641145", "0.55525494", "0.5532352", "0.5528876", "0.55275244", "0.5521083", "0.5518501", "0.55183125", "0.54928565", "0.5483776", "0.5465944", "0.5456571", "0.5442428", "0.54325706", "0.5400264", "0.5393355", "0.5390215", "0.5387658", "0.5376182", "0.5373761", "0.536178", "0.53615165", "0.5357646", "0.53514993", "0.53462523", "0.5343724", "0.53431433", "0.534307", "0.53396434", "0.533474", "0.53289545", "0.53266644", "0.5289279", "0.5289213", "0.5288494", "0.52864873", "0.5267725", "0.52580655", "0.5254221", "0.52535546", "0.52459735", "0.5244467", "0.5244325", "0.52425456", "0.52313554", "0.5231313", "0.5226946", "0.5225894", "0.52137154", "0.5213035", "0.52028394" ]
0.656956
4
Attempts to sign in or register the account specified by the login form. If there are form errors (invalid email, missing fields, etc.), the errors are presented and no actual login attempt is made.
private void attemptLogin() { // Reset errors. mEmailView.setError(null); // Store values at the time of the login attempt. final String email = mEmailView.getText().toString(); boolean cancel = false; View focusView = null; // Check for a valid email address. if (TextUtils.isEmpty(email)) { mEmailView.setError(getString(R.string.error_field_required)); focusView = mEmailView; cancel = true; } else if (!isEmailValid(email)) { mEmailView.setError(getString(R.string.error_invalid_email)); focusView = mEmailView; cancel = true; } if (cancel) { // There was an error; don't attempt login and focus the first form field with an error. focusView.requestFocus(); } else { // Show a progress spinner, and kick off a background task to perform the user login attempt. showProgress(true); // Register user to server. Map<String, String> params = new HashMap<String, String>(); params.put("userId", email); params.put("gcmToken", UserManager.getUserGcmToken(this)); new HttpClientAsyncTask(Constants.APP_SERVER_USER_CREATE_URL, HttpClientCallable.POST, params) { @Override protected void onPostExecute(String response) { showProgress(false); try { if (response != null) { JSONObject responseObj = new JSONObject(response); Log.d(Constants.TAG, "User login server response: " + responseObj); String errorMsg = responseObj.getString("error"); if (errorMsg.isEmpty()) { UserManager.setUserLoggedIn(LoginActivity.this, true); UserManager.setUserId(LoginActivity.this, email); Log.d(Constants.TAG, "Successfully logged in. Directing to MainActivity."); startActivity(new Intent(LoginActivity.this, MainActivity.class)); finish(); } else { Toast.makeText(LoginActivity.this, "Email registration was rejected.", Toast.LENGTH_LONG).show(); } } else { Toast.makeText(LoginActivity.this, "Server response was unexpected.", Toast.LENGTH_LONG).show(); } } catch (Exception e) { e.printStackTrace(); Log.e(Constants.TAG, e.getMessage()); Toast.makeText(LoginActivity.this, "Error while communicating with server.", Toast.LENGTH_LONG).show(); } } }.execute(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void attemptLogin() {\n\n // Reset errors.\n mEmailField.setError(null);\n mPasswordField.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mEmailField.getText().toString();\n String password = mPasswordField.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n mPasswordField.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordField;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailField.setError(getString(R.string.error_field_required));\n focusView = mEmailField;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailField.setError(getString(R.string.error_invalid_email));\n focusView = mEmailField;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true);\n signIn(email, password);\n }\n }", "private void attemptRegistration() {\n emailView.setError(null);\n passwordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = emailView.getText().toString();\n String password = passwordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (TextUtils.isEmpty(password) || !isPasswordValid(password)) {\n passwordView.setError(getString(R.string.error_invalid_password));\n focusView = passwordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n emailView.setError(getString(R.string.error_field_required));\n focusView = emailView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n emailView.setError(getString(R.string.error_invalid_email));\n focusView = emailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n createFirebaseUser();\n\n }\n }", "private void attemptLogin() {\n\n if (!Utils.isNetworkAvailable(mBaseActivity)) {\n Utils.showNetworkAlertDialog(mBaseActivity);\n return;\n }\n if (signInTask != null) {\n return;\n }\n\n // Reset errors.\n binding.email.setError(null);\n binding.password.setError(null);\n\n // Store values at the time of the login attempt.\n String email = binding.email.getText().toString();\n String password = binding.password.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n binding.email.setError(getString(R.string.error_field_required));\n focusView = binding.email;\n cancel = true;\n } else if (TextUtils.isEmpty(password)) {\n binding.password.setError(getString(R.string.error_field_required));\n focusView = binding.password;\n cancel = true;\n } else if (!isEmailValid(email)) {\n binding.email.setError(getString(R.string.error_invalid_email));\n focusView = binding.email;\n cancel = true;\n } else if (!isPasswordValid(password)) {\n binding.password.setError(getString(R.string.error_invalid_password));\n focusView = binding.password;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // perform the user login attempt.\n signInTask = new AsyncTask(mBaseActivity);\n signInTask.execute(email, password);\n }\n }", "private void attemptLogin() {\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_email_is_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!mPresenter.isEmailValid(email)) {\n //mEmailView.setError(getString(R.string.error_invalid_email));\n customConfirmDialog(getString(R.string.message_incorrect_email), getString(R.string.message_require_format_email));\n focusView = mEmailView;\n cancel = true;\n }else if (!TextUtils.isEmpty(password) && !mPresenter.isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n //customConfirmDialog(getString(R.string.message_incorrect_password), getString(R.string.message_please_insert_valid_password));\n focusView = mPasswordView;\n cancel = true;\n }else if(TextUtils.isEmpty(password))\n {\n customConfirmDialog(getString(R.string.message_incorrect_password), getString(R.string.message_please_insert_valid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n if (isNetworkOffline()) {\n return;\n }\n showLoadingDialog(getString(R.string.message_please_wait));\n mPresenter.doLoginByEmail(email, password);\n }\n }", "private void attemptLogin() {\n if (mAuthTask != null) {\n return;\n }\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true);\n\n // Sets up a new login task with the provide login form\n mAuthTask = new UserLoginTask(email, password);\n try {\n // Executes login task\n mAuthTask.execute();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }", "private void attemptLogin() {\n if (mAuthTask != null) {\n return;\n }\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true);\n login(email, password);\n\n }\n }", "private void attemptLogin() {\n if (mAuthTask != null) {\n return;\n }\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true);\n mAuthTask = new UserLoginTask(email, password);\n mAuthTask.execute((Void) null);\n }\n }", "private void attemptLogin() {\n if (mAuthTask != null) {\n return;\n }\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true);\n mAuthTask = new UserLoginTask(email, password);\n mAuthTask.execute((Void) null);\n }\n }", "public void attemptLogin() {\n\n\t\t// Reset errors.\n\t\tmUserView.setError(null);\n\t\tmPasswordView.setError(null);\n\n\t\t// Save values.\n\t\tmUser = mUserView.getText().toString();\n\t\tmPassword = mPasswordView.getText().toString();\n\n\t\tboolean cancel = false;\n\t\tView focusView = null;\n\n\t\t// Check for a valid password.\n\t\tif (TextUtils.isEmpty(mPassword)) {\n\t\t\tmPasswordView.setError(getString(R.string.error_field_required));\n\t\t\tfocusView = mPasswordView;\n\t\t\tcancel = true;\n\t\t} else if (mPassword.length() < 4) {\n\t\t\tmPasswordView.setError(getString(R.string.error_invalid_password));\n\t\t\tfocusView = mPasswordView;\n\t\t\tcancel = true;\n\t\t}\n\n\t\t// Check for a valid user.\n\t\tif (TextUtils.isEmpty(mUser)) {\n\t\t\tmUserView.setError(getString(R.string.error_field_required));\n\t\t\tfocusView = mUserView;\n\t\t\tcancel = true;\n\t\t} else if (mUser.length() < 4) {\n\t\t\tmUserView.setError(getString(R.string.error_invalid_user));\n\t\t\tfocusView = mUserView;\n\t\t\tcancel = true;\n\t\t}\n\t\t\t\t\n\t\tif (cancel) {\n\t\t\t// There is an error, so registration does not success and focus on the error.\n\t\t\tfocusView.requestFocus();\n\t\t} else {\n\t\t\t// Send information to server.\n\t\t\tmLoginStatusMessageView.setText(R.string.login_progress_registering);\n\t\t\tshowProgress(true);\n\t\t\tsendInfoToServer();\n\t\t}\n\t}", "private void attemptSignup()\n\t{\n\t\t// Reset errors.\n\t\tmEmailView.setError(null);\n\t\tmPasswordView.setError(null);\n\n\t\t_signupButton.setEnabled(false);\n\n\t\t// Store values at the time of the login attempt.\n\t\tfinal String displayName = mNameView.getText().toString();\n\t\tString email = mEmailView.getText().toString();\n\t\tString password = mPasswordView.getText().toString();\n\n\t\tboolean cancel = false;\n\t\tView focusView = null;\n\n\t\t// Check for a valid password, if the user entered one.\n\t\tif (TextUtils.isEmpty(password))\n\t\t{\n\t\t\tmPasswordView.setError(getString(R.string.error_field_required));\n\t\t\tfocusView = mPasswordView;\n\t\t\tcancel = true;\n\t\t}\n\t\telse if (!isPasswordValid(password))\n\t\t{\n\t\t\tmPasswordView.setError(getString(R.string.error_invalid_password));\n\t\t\tfocusView = mPasswordView;\n\t\t\tcancel = true;\n\t\t}\n\n\t\t// Check for a valid email address.\n\t\tif (TextUtils.isEmpty(email))\n\t\t{\n\t\t\tmEmailView.setError(getString(R.string.error_field_required));\n\t\t\tfocusView = mEmailView;\n\t\t\tcancel = true;\n\t\t}\n\t\telse if (!isEmailFormatValid(email))\n\t\t{\n\t\t\tmEmailView.setError(getString(R.string.error_invalid_email));\n\t\t\tfocusView = mEmailView;\n\t\t\tcancel = true;\n\t\t}\n\n\t\t//Check for a valid display name\n\t\tif (displayName.isEmpty())\n\t\t{\n\t\t\tmNameView.setError(getString(R.string.error_field_required));\n\t\t\tfocusView = mNameView;\n\t\t\tcancel = true;\n\t\t}\n\n\t\tif (cancel)\n\t\t{\n\t\t\t// There was an error; don't attempt login and focus the first\n\t\t\t// form field with an error.\n\t\t\tfocusView.requestFocus();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//[START init_progress_dialog]\n\t\t\tfinal ProgressDialog progressDialog = new ProgressDialog(SignupPersonalActivity.this,\n\t\t\t\t\tR.style.AppTheme_Dark_Dialog);\n\t\t\tprogressDialog.setIndeterminate(true);\n\t\t\tprogressDialog.setMessage(\"Creating Account...\");\n\t\t\tprogressDialog.show();\n\t\t\t//[END init_progress_dialog]\n\t\t\tmAuth.createUserWithEmailAndPassword(email, password)\n\t\t\t\t\t.addOnCompleteListener(this, new OnCompleteListener<AuthResult>()\n\t\t\t\t\t{\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onComplete(@NonNull Task<AuthResult> task)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (task.isSuccessful())\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tonSignUpSuccess(displayName);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tonSignUpFailed();\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// [START_EXCLUDE]\n\t\t\t\t\t\t\tprogressDialog.dismiss();\n\t\t\t\t\t\t\t// [END_EXCLUDE]\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t}\n\t}", "private void attemptLogin() {\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !validateUtil.isPasswordValid(password)) {\n mPasswordView.setError(getString(net.iquesoft.android.seedprojectchat.R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(net.iquesoft.android.seedprojectchat.R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!validateUtil.isEmailValid(email)) {\n mEmailView.setError(getString(net.iquesoft.android.seedprojectchat.R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true);\n presenter.onLoginButtonClicked(mEmailView.getText().toString(), mPasswordView.getText().toString(), rememberPassword.isChecked(), (LoginActivity) getActivity(), updateCurentUser);\n }\n }", "private void attemptLogin() {\n if (mAuthTask != null) {\n return;\n }\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true);\n mAuthTask = new UserLoginTask(email, password, false);\n mAuthTask.execute((Void) null);\n }\n }", "public void attemptLogin() {\n\t\t// Reset errors.\n\t\temailTextView.setError(null);\n\t\tpasswordTextView.setError(null);\n\n\t\t// Store values at the time of the login attempt.\n\t\temail = emailTextView.getText().toString();\n\t\tpassword = passwordTextView.getText().toString();\n\n\t\tboolean cancel = false;\n\n\t\t// Check for a valid email address.\n\t\tcancel = Validate.PresenceOf(emailTextView);\n\t\tif (!cancel) cancel = Validate.PatternOf(emailTextView, Patterns.EMAIL_ADDRESS);\n\t\t\n\t\t// check valid password\n\t\tif (!cancel) cancel = Validate.PresenceOf(passwordTextView);\t\t\n\n\t\tif (!cancel) {\t\n\t\t\tKeyboard.hide(getActivity());\n\t\t\tlogin();\n\t\t}\n\t}", "private void attemptLogin() {\n if (mAuthTask != null) {\n return;\n }\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n// showProgress(true);\n mEmail = email;\n mPassword = password;\n mAuthTask = new UserLoginTask(this);\n mAuthTask.execute((Void) null);\n }\n }", "private void attemptLogin() {\n if (mAuthTask != null) {\n return;\n }\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (TextUtils.isEmpty(password)) {\n mPasswordView.setError(getString(R.string.error_field_required));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true);\n mAuthTask = new UserLoginTask(email.replace(\" \", \"%20\"), password.replace(\" \", \"%20\"));\n mAuthTask.execute((Void) null);\n }\n }", "private void attemptLogin() {\n if (mAuthTask != null) {\n return;\n }\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n\n showProgress(true);\n mAuthTask = new UserLoginTask(email, password);\n mAuthTask.execute((Void) null);\n }\n\n }", "public void attemptLogin() {\n if (mAuthTask != null) {\n return;\n }\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true);\n mAuthTask = new UserLoginTask(this, email, password);\n mAuthTask.execute((Void) null);\n }\n }", "private void attemptLogin() {\n\n // Reset errors.\n trylogin = false;\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n mPasswordView.setError(\"Invalid Password\");\n focusView = mPasswordView;\n cancel = true;\n }\n\n if(email.equals(null) || password.equals(null)) {\n mPasswordView.setError(\"Invalid Password\");\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(\"Please enter something\");\n focusView = mEmailView;\n cancel = true;\n }\n\n else if (TextUtils.isEmpty(password)) {\n mPasswordView.setError(\"Please enter something\");\n focusView = mPasswordView;\n cancel = true;\n }\n\n else if (!isEmailValid(email)) {\n mEmailView.setError(\"Invalid Email\");\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n\n dialog.setMessage(\"Registering user...\");\n dialog.show();\n\n firebaseAuth.signInWithEmailAndPassword(email, password)\n .addOnCompleteListener(MainActivity.this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n dialog.hide();\n if(task.isSuccessful()) {\n //trylogin = true;\n Toast.makeText(MainActivity.this, \"Login Successful!\", Toast.LENGTH_SHORT).show();\n Intent i = new Intent(MainActivity.this, FoodActivity.class);\n startActivity(i);\n }\n else {\n Toast.makeText(MainActivity.this, \"Login Failed!\", Toast.LENGTH_SHORT).show();\n\n }\n }\n });\n }\n }", "private void attemptLogin() {\n if (mAuthTask != null) {\n return;\n }\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.kkkkkkkkl[]/\\]\n\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true);\n mAuthTask = new UserLoginTask(email, password);\n mAuthTask.execute((Void) null);\n\n // Intent signInActivityIntent= new Intent(this,UserProfileActivity.class);\n // startActivity(signInActivityIntent);\n }\n }", "public void attemptLogin() {\n if (mAuthTask != null) {\n return;\n }\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_user));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n\n // save data in local shared preferences\n if (savePassword.isChecked()) {\n saveLoginDetails(email, password);\n }\n\n\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true);\n mAuthTask = new UserLoginTask(email, password);\n mAuthTask.execute((Void) null);\n }\n }", "private void attemptLogin() {\n if (mAuthTask != null) {\n return;\n }\n\n // Reset errors.\n mNameView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String name = mNameView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid user name.\n if (TextUtils.isEmpty(name)) {\n mNameView.setError(getString(R.string.error_field_required));\n focusView = mNameView;\n cancel = true;\n } else if (!isNameValid(name)) {\n mNameView.setError(getString(R.string.error_invalid_name));\n focusView = mNameView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true);\n mAuthTask = new UserLoginTask(name, password);\n mAuthTask.execute(mUrl);\n }\n }", "private void attemptSignUp() {\n // Reset errors.\n mEmailView.setError(null);\n mPasswordViewOne.setError(null);\n mPasswordViewTwo.setError(null);\n\n // Store values at the time of the login attempt.\n final String email = mEmailView.getText().toString();\n final String password = mPasswordViewOne.getText().toString();\n final String passwordTwo = mPasswordViewTwo.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (TextUtils.isEmpty(password)) {\n mPasswordViewOne.setError(getString(R.string.error_field_required));\n focusView = mPasswordViewOne;\n cancel = true;\n } else if (!isPasswordValid(password)) {\n mPasswordViewOne.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordViewOne;\n cancel = true;\n }\n\n // Check for matching password\n if (!password.equals(passwordTwo)) {\n mPasswordViewOne.setError(\"Passwords do not match\");\n mPasswordViewTwo.setError(\"Passwords do not match\");\n focusView = mPasswordViewOne;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true);\n\n mAuth.createUserWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n Log.d(\"FirebaseSignUp\", \"createUserWithEmail:Success\");\n FirebaseUser user = mAuth.getCurrentUser();\n String uid = user == null ? \"null\" : user.getUid();\n\n // TODO: if successful, check if User should be an admin and add\n // them to list of admins in Firebase database\n if (mSpinner.getSelectedItem().equals(AccountType.ADMIN)) {\n mDatabase.child(\"admins\").child(uid)\n .setValue(email.split(\"@\")[0]);\n }\n\n Intent i = new Intent(getApplicationContext(), App.class);\n finish();\n startActivity(i);\n } else {\n // Probably means the email was taken\n mEmailView.setError(getString(R.string.error_email_already_registered));\n mEmailView.requestFocus();\n showProgress(false);\n }\n }\n });\n }\n }", "private void attemptLogin() {\r\n if (mAuthTask != null) {\r\n return;\r\n }\r\n\r\n // Reset errors.\r\n mPhoneView.setError(null);\r\n mPasswordView.setError(null);\r\n\r\n // Store values at the time of the login attempt.\r\n String phone = mPhoneView.getText().toString();\r\n String password = mPasswordView.getText().toString();\r\n\r\n boolean cancel = false;\r\n View focusView = null;\r\n\r\n // Check for a valid password, if the user entered one.\r\n if (TextUtils.isEmpty(password)) {\r\n mPasswordView.setError(getString(R.string.error_field_required));\r\n focusView = mPasswordView;\r\n cancel = true;\r\n }\r\n\r\n // Check for a valid phone address.\r\n if (TextUtils.isEmpty(phone)) {\r\n mPhoneView.setError(getString(R.string.error_field_required));\r\n focusView = mPhoneView;\r\n cancel = true;\r\n } else if (!isPhoneValid(phone)) {\r\n mPhoneView.setError(getString(R.string.error_invalid_phone));\r\n focusView = mPhoneView;\r\n cancel = true;\r\n }\r\n\r\n if (cancel) {\r\n // There was an error; don't attempt login and focus the first\r\n // form field with an error.\r\n focusView.requestFocus();\r\n } else {\r\n // Show a progress spinner, and kick off a background task to\r\n // perform the user login attempt.\r\n showProgress(true);\r\n mAuthTask = new UserLoginTask(phone, password);\r\n mAuthTask.execute((Void) null);\r\n }\r\n }", "public void attemptLogin() {\n\t\tif (mAuthTask != null) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Reset errors.\n\t\tmEmailView.setError(null);\n\t\tmPasswordView.setError(null);\n\n\t\t// Store values at the time of the login attempt.\n\t\tmEmail = mEmailView.getText().toString();\n\t\tmPassword = mPasswordView.getText().toString();\n\n\t\tboolean cancel = false;\n\t\tView focusView = null;\n\n\t\t/*\n\t\t * // Check for a valid password. if (TextUtils.isEmpty(mPassword)) {\n\t\t * mPasswordView.setError(getString(R.string.error_field_required));\n\t\t * focusView = mPasswordView; cancel = true; } else if\n\t\t * (mPassword.length() < 4) {\n\t\t * mPasswordView.setError(getString(R.string.error_invalid_password));\n\t\t * focusView = mPasswordView; cancel = true; }\n\t\t * \n\t\t * // Check for a valid email address. if (TextUtils.isEmpty(mEmail)) {\n\t\t * mEmailView.setError(getString(R.string.error_field_required));\n\t\t * focusView = mEmailView; cancel = true; } else if\n\t\t * (!mEmail.contains(\"@\")) {\n\t\t * mEmailView.setError(getString(R.string.error_invalid_email));\n\t\t * focusView = mEmailView; cancel = true; }\n\t\t */\n\t\tif (cancel) {\n\t\t\t// There was an error; don't attempt login and focus the first\n\t\t\t// form field with an error.\n\t\t\tfocusView.requestFocus();\n\t\t} else {\n\t\t\t// Show a progress spinner, and kick off a background task to\n\t\t\t// perform the user login attempt.\n\t\t\tshowProgress(true);\n\t\t\tmAuthTask = new UserLoginTask();\n\t\t\tmAuthTask.execute((Void) null);\n\t\t}\n\t}", "private void attemptLogin() {\n if (isLoggingIn) {\n return;\n }\n\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!Utils.isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (TextUtils.isEmpty(password)) {\n mPasswordView.setError(getString(R.string.error_field_required));\n focusView = mPasswordView;\n cancel = true;\n } else if (!Utils.isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n if (!HttpUtils.isNetworkAvailable(this.getApplicationContext())) {\n Toast.makeText(this.getApplicationContext(), \"No internet\", Toast.LENGTH_SHORT).show();\n cancel = true;\n }\n\n if (cancel) {\n focusView.requestFocus();\n } else {\n InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(mPasswordView.getWindowToken(), 0);\n\n LoginApi.executeLogin(this, email, password);\n }\n }", "private void attemptLogin() {\n String email = text_email.getText().toString();\n String password = text_password.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (TextUtils.isEmpty(password)) {\n text_password.setError(getString(R.string.error_field_required));\n focusView = text_password;\n cancel = true;\n }\n if (!isPasswordValid(password)) {\n text_password.setError(getString(R.string.error_invalid_password));\n focusView = text_password;\n cancel = true;\n }\n\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n text_email.setError(getString(R.string.error_field_required));\n focusView = text_email;\n cancel = true;\n } else if (!isEmailValid(email)) {\n text_email.setError(getString(R.string.error_invalid_email));\n focusView = text_email;\n cancel = true;\n }\n\n if (cancel) {\n focusView.requestFocus();\n } else {\n //showProgress(true);\n login(USER_NORMAL);\n }\n }", "public void attemptLogin() {\n\n\n if (mAuthTask != null) {\n return;\n }\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n mEmail = mEmailView.getText().toString();\n mPassword = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password.\n if (TextUtils.isEmpty(mPassword)) {\n mPasswordView.setError(getString(R.string.error_field_required));\n focusView = mPasswordView;\n cancel = true;\n } else if (mPassword.length() < 4) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(mEmail)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!mEmail.contains(\"@\")) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n mLoginStatusMessageView.setText(R.string.login_progress_signing_in);\n showProgress(true);\n mAuthTask = new UserLoginTask();\n mAuthTask.execute((Void) null);\n }\n }", "private void login() {\n Log.d(Constants.TAG_LOGIN_ACTIVITY, \"login: \");\n\n // Store values at the time of the login attempt.\n mEmail = mEditTextSignInEmail.getText().toString();\n mPassword = mEditTextSignInPassword.getText().toString();\n mFocusView = null;\n\n // Check for a valid password\n if (TextUtils.isEmpty(mPassword) || !mPresenter.isPasswordValid(mPassword)) {\n mEditTextSignInPassword.setError(getString(R.string.error_invalid_password));\n mFocusView = mEditTextSignInPassword;\n isProcessCancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(mEmail)) {\n mEditTextSignInEmail.setError(getString(R.string.error_field_required));\n mFocusView = mEditTextSignInEmail;\n isProcessCancel = true;\n } else if (!mPresenter.isEmailValid(mEmail)) {\n mEditTextSignInEmail.setError(getString(R.string.error_invalid_email));\n mFocusView = mEditTextSignInEmail;\n isProcessCancel = true;\n }\n\n if (isProcessCancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n mFocusView.requestFocus();\n\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true, mLinearlayoutSignIn);\n mPresenter.loginTask(this, mAuth, mEmail, mPassword, new SignInCallback() {\n @Override\n public void onCompleted() {\n showProgress(false, mLinearlayoutSignIn);\n showUserInfoLog();\n transToShareBookActivity();\n }\n\n @Override\n public void onError(String errorMessage) {\n Log.d(Constants.TAG_LOGIN_ACTIVITY, \"onError: \" + errorMessage);\n\n showProgress(false, mLinearlayoutSignIn);\n mEditTextSignInEmail.setError(getString(R.string.error_login_fail));\n mFocusView = mEditTextSignInEmail;\n isProcessCancel = true;\n }\n });\n }\n }", "private void attemptLogin() {\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !Utility_Helper.isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!Utility_Helper.isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n focusView.requestFocus();\n } else {\n // if user flow not cancelled execute Simulate_Login_Task asyncronous task\n // to simulate login\n Simulate_Login_Task task = new Simulate_Login_Task(this, dummyList, email, password);\n task.setOnResultListener(asynResult);\n task.execute();\n }\n }", "public void attemptLogin() {\r\n\t\tif (mAuthTask != null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Reset errors.\r\n\t\tthis.activity.getmEmailView().setError(null);\r\n\t\tthis.activity.getmPasswordView().setError(null);\r\n\r\n\t\t// Store values at the time of the login attempt.\r\n\t\tmEmail = this.activity.getmEmailView().getText().toString();\r\n\t\tmPassword = this.activity.getmPasswordView().getText().toString();\r\n\r\n\t\tboolean cancel = false;\r\n\t\tView focusView = null;\r\n\r\n\t\t// Check for a valid password.\r\n\t\tif (TextUtils.isEmpty(mPassword)) {\r\n\t\t\tthis.activity.getmPasswordView().setError(this.activity.getString(R.string.error_field_required));\r\n\t\t\tfocusView = this.activity.getmPasswordView();\r\n\t\t\tcancel = true;\r\n\t\t} else if (mPassword.length() < 4) {\r\n\t\t\tthis.activity.getmPasswordView().setError(this.activity.getString(R.string.error_invalid_password));\r\n\t\t\tfocusView = this.activity.getmPasswordView();\r\n\t\t\tcancel = true;\r\n\t\t}\r\n\r\n\t\t// Check for a valid email address.\r\n\t\tif (TextUtils.isEmpty(mEmail)) {\r\n\t\t\tthis.activity.getmEmailView().setError(this.activity.getString(R.string.error_field_required));\r\n\t\t\tfocusView = this.activity.getmEmailView();\r\n\t\t\tcancel = true;\r\n\t\t} else if (!mEmail.contains(\"@\")) {\r\n\t\t\tthis.activity.getmEmailView().setError(this.activity.getString(R.string.error_invalid_email));\r\n\t\t\tfocusView = this.activity.getmEmailView();\r\n\t\t\tcancel = true;\r\n\t\t}\r\n\r\n\t\tif (cancel) {\r\n\t\t\t// There was an error; don't attempt login and focus the first\r\n\t\t\t// form field with an error.\r\n\t\t\tfocusView.requestFocus();\r\n\t\t} else {\r\n\t\t\t// Show a progress spinner, and kick off a background task to\r\n\t\t\t// perform the user login attempt.\r\n\t\t\tthis.activity.getmLoginStatusMessageView().setText(R.string.login_progress_signing_in);\r\n\t\t\tthis.activity.showProgress(true);\r\n\t\t\tmAuthTask = new UserLoginTask();\r\n\t\t\tmAuthTask.execute((Void) null);\r\n\t\t}\r\n\t}", "private void attemptLogin() {\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n final String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true);\n\n if(isOnline()){\n try {\n ApiRequests.POST(\"login/\", new Callback() {\n @Override\n public void onFailure(Call call, final IOException e) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Log.e(\"error:\", \"burda\");\n }\n });\n }\n\n @Override\n public void onResponse(Call call, final Response response) throws IOException {\n\n try {\n processTheResponse(response.body().string());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n }\n }, email, password);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n else {\n InternetConnectionError();\n }\n }\n }", "private void attemptUsernamePasswordLogin()\n {\n if (mAuthTask != null)\n {\n return;\n }\n\n if(mLogInButton.getText().equals(getResources().getString(R.string.logout)))\n {\n mAuthTask = new RestCallerPostLoginTask(this,mStoredToken,MagazzinoService.getAuthenticationHeader(this),true);\n mAuthTask.execute(MagazzinoService.getLogoutService(this));\n return;\n }\n // Reset errors.\n mUsernameView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mUsernameView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password))\n {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email))\n {\n mUsernameView.setError(getString(R.string.error_field_required));\n focusView = mUsernameView;\n cancel = true;\n }\n else if (!isUsernameOrEmailValid(email))\n {\n mUsernameView.setError(getString(R.string.error_invalid_email));\n focusView = mUsernameView;\n cancel = true;\n }\n\n if (cancel)\n {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n return;\n }\n\n mAuthTask = new RestCallerPostLoginTask(this,email, password);\n mAuthTask.execute(MagazzinoService.getLoginService(this));\n\n }", "private void attemptLogin() {\n if (authTask != null) {\n return;\n }\n\n // Reset errors.\n usernameView.setError(null);\n passwordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = usernameView.getText().toString();\n String password = passwordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n passwordView.setError(getString(R.string.error_invalid_password));\n focusView = passwordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n usernameView.setError(getString(R.string.error_field_required));\n focusView = usernameView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n usernameView.setError(getString(R.string.error_invalid_email));\n focusView = usernameView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true);\n\n //set loginID for session\n session.setID(email);\n\n startDashboard();\n /*authTask = new UserLoginTask(email, password);\n authTask.execute((Void) null);*/\n }\n }", "public void attemptLogin() {\r\n\t\tif (mAuthTask != null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t// Reset errors.\r\n\t\tmUserView.setError(null);\r\n\t\tmPasswordView.setError(null);\r\n\t\t// Store values at the time of the login attempt.\r\n\t\tmUser = mUserView.getText().toString();\r\n\t\tmPassword = mPasswordView.getText().toString();\r\n\t\tboolean cancel = false;\r\n\t\tView focusView = null;\r\n\t\t// Check for a valid password.\r\n\t\tif (TextUtils.isEmpty(mPassword)) {\r\n\t\t\tmPasswordView.setError(getString(R.string.error_field_required));\r\n\t\t\tfocusView = mPasswordView;\r\n\t\t\tcancel = true;\r\n\t\t} else if (mPassword.length() < 3) {\r\n\t\t\tmPasswordView.setError(getString(R.string.error_invalid_password));\r\n\t\t\tfocusView = mPasswordView;\r\n\t\t\tcancel = true;\r\n\t\t}\r\n\t\t// Check for a valid username address.\r\n\t\tif (TextUtils.isEmpty(mUser)) {\r\n\t\t\tmUserView.setError(getString(R.string.error_field_required));\r\n\t\t\tfocusView = mUserView;\r\n\t\t\tcancel = true;\r\n\t\t}\r\n\t\tif (cancel) {\r\n\t\t\t// There was an error; don't attempt login and focus the first\r\n\t\t\t// form field with an error.\r\n\t\t\tfocusView.requestFocus();\r\n\t\t} else {\r\n\t\t\t// Show a progress spinner, and kick off a background task to\r\n\t\t\t// perform the user login attempt.\r\n\t\t\tmLoginStatusMessageView.setText(R.string.login_progress_signing_in);\r\n\t\t\tmAuthTask = new UserLoginTask(this);\r\n\t\t\tmAuthTask.execute((Void) null);\r\n\t\t}\r\n\t}", "public void attemptSignUp() {\n\tif (mAuthTask != null) {\n\t return;\n\t}\n\n\t// Reset errors.\n\tmUsernameView.setError(null);\n\tmNameView.setError(null);\n\tmEmailView.setError(null);\n\tmPasswordView.setError(null);\n\n\t// Store values at the time of the login attempt.\n\tmUsername = mUsernameView.getText().toString().trim();\n\tmName = mNameView.getText().toString();\n\tmEmail = mEmailView.getText().toString();\n\tmPassword = mPasswordView.getText().toString();\n\n\tboolean cancel = false;\n\tView focusView = null;\n\n\t// Check for a valid username\n\tif (TextUtils.isEmpty(mUsername)) {\n\t mUsernameView.setError(getString(R.string.error_field_required));\n\t focusView = mUsernameView;\n\t cancel = true;\n\t} else if (TextUtils.split(mUsername, \" \").length > 1) {\n\t mUsernameView.setError(\"Username can not have spaces\");\n\t}\n\n\t// Check for a valid name\n\tif (TextUtils.isEmpty(mName)) {\n\t mNameView.setError(getString(R.string.error_field_required));\n\t focusView = mNameView;\n\t cancel = true;\n\t}\n\n\t// Check for a valid password.\n\tif (TextUtils.isEmpty(mPassword)) {\n\t mPasswordView.setError(getString(R.string.error_field_required));\n\t focusView = mPasswordView;\n\t cancel = true;\n\t} else if (mPassword.length() != 4 || !TextUtils.isDigitsOnly(mPassword)) {\n\t mPasswordView.setError(getString(R.string.error_invalid_password));\n\t focusView = mPasswordView;\n\t cancel = true;\n\t}\n\n\t// Check for a valid email address.\n\tif (TextUtils.isEmpty(mEmail)) {\n\t mEmailView.setError(getString(R.string.error_field_required));\n\t focusView = mEmailView;\n\t cancel = true;\n\t} else if (!mEmail.contains(\"@\")) {\n\t mEmailView.setError(getString(R.string.error_invalid_email));\n\t focusView = mEmailView;\n\t cancel = true;\n\t}\n\n\tif (cancel) {\n\t // There was an error; don't attempt login and focus the first\n\t // form field with an error.\n\t focusView.requestFocus();\n\t} else {\n\t // Show a progress spinner, and kick off a background task to\n\t // perform the user login attempt.\n\t mLoginStatusMessageView.setText(R.string.login_progress_signing_in);\n\t showProgress(true);\n\t mAuthTask = new UserSignUpTask();\n\t mAuthTask.execute((Void) null);\n\t}\n }", "private void attemptLogin() {\n if (mAuthTask != null) {\n return;\n }\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n boolean newUser = false;\n\n // Check for a valid password, if the user entered one.\n if (TextUtils.isEmpty(password) || !isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n } else {\n user = mDatabaseHelper.getUser(email);\n if (user.getPassword() != null) {\n if (!PasswordHash.checkHashEquality(user.getPassword(), password)) {\n mPasswordView.setError(getString(R.string.error_incorrect_password));\n focusView = mPasswordView;\n cancel = true;\n }\n } else {\n newUser = true;\n }\n }\n\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true);\n mAuthTask = new UserLoginTask(email, password);\n mAuthTask.execute((Void) null);\n user = mDatabaseHelper.getUser(email);\n if (newUser) {\n Toast.makeText(this, \"New Account Created!\", Toast.LENGTH_SHORT).show();\n }\n Intent intent = new Intent(LoginActivity.this, ListActivity.class);\n intent.putExtra(\"User\", user);\n intent.putExtra(\"Target\", \"Locked\");\n startActivityForResult(intent, 0);\n }\n }", "void attemptLogin(AlertDialog loginAlertDialog) {\n if (mAuthTask != null) {\n return;\n }\n\n // Reset errors.\n mUsernameView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n mEmail = mUsernameView.getText().toString();\n mPassword = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password.\n if (TextUtils.isEmpty(mPassword)) {\n mPasswordView.setError(getString(R.string.error_field_required));\n focusView = mPasswordView;\n cancel = true;\n } else if (mPassword.length() < 4) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(mEmail)) {\n mUsernameView.setError(getString(R.string.error_field_required));\n focusView = mUsernameView;\n cancel = true;\n }\n//\t\telse if (!mEmail.contains(\"@\")) {\n// mUsernameView.setError(getString(R.string.error_invalid_email));\n//\t\t\tfocusView = mUsernameView;\n//\t\t\tcancel = true;\n//\t\t}\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n mLoginStatusMessageView.setText(R.string.login_progress_signing_in);\n showLoginProgress(true);\n mAuthTask = new UserLoginTask();\n mAuthTask.execute(loginAlertDialog);\n }\n\n }", "private void attemptLogin(){\n //reset error\n et_email.setError(null);\n et_password.setError(null);\n\n // Store values at the time of the login attempt.\n final String email = et_email.getText().toString();\n final String password = et_password.getText().toString();\n final boolean finish = false;\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n et_password.setError(getString(R.string.error_invalid_password));\n focusView = et_password;\n cancel = true;\n }else if (!isEmailValid(email)) {\n et_email.setError(getString(R.string.error_invalid_email));\n focusView = et_email;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n JSONObject json = new JSONObject();\n\n try {\n json.put(\"ctrl\", \"login\");\n json.put(\"email\", email);\n json.put(\"password\", password);\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n String requete = json.toString();\n Log.v(\"req\", requete);\n HttpQuery login = new HttpQuery(requete, this);\n login.execute();\n }\n\n\n }", "private void attemptLogin() {\n // Reset errors.\n edtID.setError(null);\n edtPassword.setError(null);\n\n // Store values at the time of the login attempt.\n String userId = edtID.getText().toString();\n String password = edtPassword.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (TextUtils.isEmpty(password)) {\n edtPassword.setError(\"Password is empty\");\n focusView = edtPassword;\n cancel = true;\n } else if(!isPasswordValid(password)) {\n edtPassword.setError(getString(R.string.error_invalid_password));\n focusView = edtPassword;\n cancel = true;\n }\n\n // Check for a valid user id.\n if (TextUtils.isEmpty(userId)) {\n edtID.setError(getString(R.string.error_field_required));\n focusView = edtID;\n cancel = true;\n } else if (!isUserIdValid(userId)) {\n edtID.setError(getString(R.string.error_invalid_id));\n focusView = edtID;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true);\n\n JSONObject json = new JSONObject();\n try {\n json.put(\"user_id\", userId);\n json.put(\"password\", password);\n } catch (Exception e) {\n e.printStackTrace();\n }\n reqUserID = userId;\n reqUserPW = password;\n loginConnector.request(json);\n }\n }", "private void loginAccount() {\n\t\taccountManager.loginAccount(etEmail.getText().toString(), etPassword.getText().toString());\n\n\t}", "public int checkLogin(Account formAccount) {\n Account account = getAccountByAccountNo(formAccount.getAccountNo());\n //return 1 if account not found\n if (account == null) {\n return 1;\n } else if (account.getLocked() == 1) {\n return 3; // return 3 if account is locked\n } else if (account.getPin() != formAccount.getPin()) {\n if (account.getIncorrectAttempts() < 2) {\n account.setIncorrectAttempts(account.getIncorrectAttempts() + 1);\n saveOrUpdate(account);\n return 2; //return 2 if incorrect pin but account is not locked yet\n } else {\n account.setIncorrectAttempts(account.getIncorrectAttempts() + 1);\n account.setLocked(1);\n saveOrUpdate(account);\n return 3; //lock account on 3rd incorrect attempt and return 3\n }\n\n } else {\n return 0; // return 0 if login successful\n }\n\n }", "private void attemptLogin() {\n if (mAuthTask != null) {\n return;\n }\n\n // Reset errors.\n mUserNameView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String userName = mUserNameView.getText().toString();\n String password = mPasswordView.getText().toString();\n UserDetail user = new UserDetail(userName, password);\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n user = null;\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(userName)) {\n mUserNameView.setError(getString(R.string.error_field_required));\n focusView = mUserNameView;\n\n\n }\n else if(user!=null && isNetworkConnected()) {\n getPermissiontoAccessInternet();\n mAuthTask = new UserLoginTask(user);\n mAuthTask.execute((Void) null);\n\n }\n// } else if (!isUserNameValid(userName)) {\n// mUserNameView.setError(getString(R.string.error_invalid_email));\n// focusView = mUserNameView;\n// cancel = true;\n// }\n\n// if (cancel) {\n// // There was an error; don't attempt login and focus the first\n// // form field with an error.\n// focusView.requestFocus();\n// } else {\n// // Show a progress spinner, and kick off a background task to\n// // perform the user login attempt.\n//\n// }\n }", "void loginAttempt(String email, String password);", "private void attemptSignUp() {\n // Reset errors.\n mName.setError(null);\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (TextUtils.isEmpty(mName.getText().toString())) {\n mName.setError(getString(R.string.error_field_required));\n focusView = mName;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n SQLiteDatabase database = DBHelper.getInstance(this).getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(DBHelper.U_NAME, mName.getText().toString());\n values.put(DBHelper.U_EMAIL, email);\n values.put(DBHelper.U_IMAGE, profileImage);\n values.put(DBHelper.U_PASSWORD, password);\n database.insert(DBHelper.TUSER, null, values);\n database.close();\n\n UserModel userData = new UserModel();\n userData.setId(0);\n userData.setName(mName.getText().toString());\n userData.setImage(profileImage);\n userData.setEmail(email);\n userData.setPassword(password);\n userData.setRememberMe(rememberMe);\n String userDataStr = new Gson().toJson(userData);\n Common.saveStrPref(this, Common.PREF_USER, userDataStr);\n\n startActivity(new Intent(this, HomeActivity.class));\n }\n }", "private void attemptRegister() {\n progressGenerator = new ProgressGenerator();\n\n // Reset errors.\n inputEmail.setError(null);\n inputPasswd.setError(null);\n\n // Store values at the time of the login attempt.\n String email = inputEmail.getText().toString();\n String password = inputPasswd.getText().toString();\n String confirmPassword = inputConfirmPasswd.getText().toString();\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n inputEmail.setError(getString(R.string.error_field_required));\n inputEmail.requestFocus();\n shake();\n return;\n } else if (!isEmailValid(email)) {\n inputEmail.setError(getString(R.string.error_invalid_email));\n inputEmail.requestFocus();\n shake();\n return;\n }\n\n // Check for a valid password, if the user entered one.\n if (TextUtils.isEmpty(password) || !isPasswordValid(password)) {\n inputPasswd.setError(getString(R.string.error_invalid_password));\n inputPasswd.requestFocus();\n shake();\n return;\n }\n\n // Check if passwords match\n if (!confirmPassword.equals(password)) {\n inputConfirmPasswd.setError(getString(R.string.error_password_does_not_match));\n inputConfirmPasswd.requestFocus();\n shake();\n return;\n }\n\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n isRegistering = true;\n btnRegister.requestFocus();\n\n progressGenerator.start(btnRegister);\n btnRegister.setEnabled(false);\n inputEmail.setEnabled(false);\n inputPasswd.setEnabled(false);\n inputConfirmPasswd.setEnabled(false);\n\n LoginAgent.getInstance().registerInBackground(email, password);\n }", "public void attemptLogin()\n {\n if ( mAuthTask != null )\n {\n return;\n }\n\n // Reset errors.\n mIPView_.setError( null );\n mPortView_.setError( null );\n\n // Store values at the time of the login attempt.\n mIP_ = mIPView_.getText().toString();\n mPort_ = mPortView_.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password.\n if ( TextUtils.isEmpty( mPort_ ) )\n {\n mPortView_\n .setError( getString( R.string.error_field_required ) );\n focusView = mPortView_;\n cancel = true;\n }\n // The port should be four digits long\n else if ( mPort_.length() != 4 )\n {\n mPortView_\n .setError( getString( R.string.error_invalid_server ) );\n focusView = mPortView_;\n cancel = true;\n }\n\n // Check for a valid email address.\n if ( TextUtils.isEmpty( mIP_ ) )\n {\n mIPView_.setError( getString( R.string.error_field_required ) );\n focusView = mIPView_;\n cancel = true;\n }\n\n if ( cancel )\n {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n }\n else\n {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n mLoginStatusMessageView\n .setText( R.string.login_progress_signing_in );\n showProgress( true );\n\n // Start the asynchronous thread to connect and post to the server\n mAuthTask = new UserLoginTask();\n mAuthTask.execute( (Void) null );\n }\n }", "private void attemptLogin() {\n\n String username = mEmailView.getText().toString().trim();\n String idNumber = mIdNumber.getText().toString().trim();\n String password = mPasswordView.getText().toString().trim();\n\n if (TextUtils.isEmpty(username)) {\n// usernameView.setError(errorMessageUsernameRequired);\n// errorView = usernameView;\n }\n\n if (TextUtils.isEmpty(password)) {\n// password.setError(errorMessagePasswordRequired);\n// if (errorView == null) {\n// errorView = passwordView;\n// }\n }\n\n final User user = new User();\n ((DealerManager)getApplication()).setUser(user);\n navigateTo(R.id.nav_home);\n }", "private void signUp() {\n if (mAuthTask != null) {\n return;\n }\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true);\n mAuthTask = new UserLoginTask(email, password, true);\n mAuthTask.execute((Void) null);\n }\n }", "private void accountLogin() {\n String emailAddress = editTextEmailAddress.getText().toString().trim();\n String password = editTextPassword.getText().toString().trim();\n\n //validation for logging in.\n if(emailAddress.isEmpty()) {\n editTextEmailAddress.setError((\"No Email inputted \"));\n editTextEmailAddress.requestFocus();\n return;\n }\n if(!Patterns.EMAIL_ADDRESS.matcher(emailAddress).matches()) {\n editTextEmailAddress.setError(\"You must use a valid Email\");\n editTextEmailAddress.requestFocus();\n return;\n }\n if(password.isEmpty()) {\n editTextPassword.setError(\"You must enter your password!\");\n editTextPassword.requestFocus();\n return;\n }\n if(password.length() < 5) {\n editTextPassword.setError(\"Password length is a minimum of 5 characters\");\n editTextPassword.requestFocus();\n return;\n }\n progressBar.setVisibility((View.VISIBLE));\n mAuth.signInWithEmailAndPassword(emailAddress, password).addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if(task.isSuccessful()) {\n //User is therefore redirected to the Identity page\n startActivity(new Intent(MainActivity.this, IdentityActivity.class));\n }else{\n Toast.makeText(MainActivity.this, \"Failed to login to account check credentials and try again...\", Toast.LENGTH_LONG).show();\n }\n }\n });\n\n }", "private boolean attemptRegistration() {\n\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String name = mFullName.getText().toString();\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n String confPassword = mPasswordConf.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n if(!TextUtils.isEmpty(confPassword) && !password.equals(confPassword)){\n mPasswordConf.setError(\"The passwords do not match\");\n focusView = mPasswordConf;\n cancel = true;\n }\n\n if(TextUtils.isEmpty(name)){\n mFullName.setError(getString(R.string.error_field_required));\n focusView = mFullName;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n return !cancel;\n }", "public void Login()\r\n\t{\r\n\t\t\r\n\t\tString firstName = CommonDriver.getProperties(\"FirstName\");\r\n\t\tString lastName = CommonDriver.getProperties(\"LastName\");\r\n\t\tString mobileNumber = CommonDriver.getProperties(\"MobileNumber\");\r\n\t\tString email = CommonDriver.getProperties(\"Email\");\r\n\t\tString Fpassword = CommonDriver.getProperties(\"Password\");\r\n\t\tString confirmPassword = CommonDriver.getProperties(\"ConfirmPassword\");\r\n\t\tString userName = CommonDriver.getProperties(\"UserName\");\r\n\t\tString logPassword = CommonDriver.getProperties(\"LogPassword\");\r\n\t\t\r\n\t\tUserName.sendKeys(userName);\r\n\t\t\r\n\t\tLogPassword.sendKeys(logPassword);\r\n\t\t\t\t\r\n\t\tLogin.click();\r\n\t\t\r\n\t\t/**\r\n\t\t * Since the application forgets the login credentials in sometime, hence, checking the error msg and signing up again \r\n\t\t * \r\n\t\t */\r\n\t\r\n\t\tboolean present;\r\n\t\ttry {\r\n\t\t driver.findElement(By.xpath(\"//*[@id='loginfrm']/div[1]/div[2]/div\"));\r\n\t\t present = true;\r\n\t\t System.out.println(\"Need to signup first\");\r\n\t\t\t\r\n\t\t\tSignUp.click();\r\n\t\t\t\r\n\t\t\tFirstName.sendKeys(firstName);\r\n\t\t\t\r\n\t\t\tLastName.sendKeys(lastName);\r\n\t\t\t\t\t\r\n\t\t\tMobileNumber.sendKeys(mobileNumber);\r\n\t\t\t\t\t\r\n\t\t\tEmail.sendKeys(email);\r\n\t\t\t\t\t\r\n\t\t\tPassword.sendKeys(Fpassword);\r\n\t\t\t\t\t\r\n\t\t\tConfirmPassword.sendKeys(confirmPassword);\r\n\t\t\t\t\t\r\n\t\t\tSignUpF.click();\r\n\t\t \r\n\t\t} catch (NoSuchElementException e) {\r\n\t\t present = false;\r\n\t\t \r\n\t\t\tSystem.out.println(\"Loggedin Successfully\");\r\n\t\t}\r\n\t}", "private void attemptRegister() {\n if (mRegisterTask != null) {\n return;\n }\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n mRePasswordView.setError(null);\n mNameView.setError(null);\n mSurnameView.setError(null);\n mUsernameView.setError(null);\n\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n String rePassword = mRePasswordView.getText().toString();\n String name = mNameView.getText().toString();\n String surname = mSurnameView.getText().toString();\n String username = mUsernameView.getText().toString();\n\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) &&!isPasswordValid(password, rePassword)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n } else if (!TextUtils.isEmpty(rePassword) &&!isPasswordMatch(password, rePassword)) {\n mRePasswordView.setError(getString(R.string.error_incorrect_password));\n focusView = mRePasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (TextUtils.isEmpty(name)) {\n mNameView.setError(getString(R.string.error_field_required));\n focusView = mNameView;\n cancel = true;\n }\n\n if (TextUtils.isEmpty(surname)) {\n mSurnameView.setError(getString(R.string.error_field_required));\n focusView = mSurnameView;\n cancel = true;\n }\n\n if (TextUtils.isEmpty(username)) {\n mUsernameView.setError(getString(R.string.error_field_required));\n focusView = mUsernameView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true);\n\n String deviceId = Settings.Secure.getString(getApplicationContext().getContentResolver(),\n Settings.Secure.ANDROID_ID);\n\n if(deviceId == null)\n deviceId = \"oddDevice\";\n Log.d(\"Custom\" , deviceId);\n String gender = (String)mGender.getSelectedItem();\n String device = deviceId;\n mRegisterTask = new RegisterTask(email, password, name, surname, username, gender, device );\n\n mRegisterTask.execute((Void) null);\n }\n }", "private void attemptLogin() {\n\n char ch;\n boolean hasUppercase = false;\n boolean hasLowercase = false;\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String firstname = mFirstNameView.getText().toString();\n String lastname = mLastNameView.getText().toString();\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n String passwordconfirm = mPasswordConfirmView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid first name.\n if (TextUtils.isEmpty(firstname)) {\n mFirstNameView.setError(getString(R.string.error_field_required));\n focusView = mFirstNameView;\n cancel = true;\n }\n\n // Check for a valid last name.\n if (TextUtils.isEmpty(lastname)) {\n mLastNameView.setError(getString(R.string.error_field_required));\n focusView = mLastNameView;\n cancel = true;\n }\n\n // Check if password field is empty.\n if (TextUtils.isEmpty(password)) {\n mPasswordView.setError(getString(R.string.error_field_required));\n focusView = mPasswordView;\n cancel = true;\n }\n\n //Check if the second input password is empty\n if (TextUtils.isEmpty(passwordconfirm)) {\n mPasswordConfirmView.setError(\"This field is required!\");\n focusView = mPasswordConfirmView;\n cancel = true;\n }\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && password.length() < 7) {\n mPasswordView.setError(getString(R.string.error_short_password));\n focusView = mPasswordView;\n cancel = true;\n }\n if (!isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check if both of the entered passwords are equal\n if (!Objects.equals(password, passwordconfirm)) {\n mPasswordConfirmView.setError(\"Your Passwords do not match\");\n focusView = mPasswordConfirmView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n if (isNetworkAvailable()) {\n View view = this.getCurrentFocus();\n InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(view.getWindowToken(), 0);\n Bundle args = new Bundle();\n args.putString(IHC_FIRSTNAME_KEY, firstname);\n args.putString(IHC_LASTNAME_KEY, lastname);\n args.putString(IHC_EMAIL_KEY, email);\n args.putString(IHC_PASSWORD_KEY, password);\n getSupportLoaderManager().initLoader(IHC_NONSTUDENT_SIGNUP_LOADER_ID, args, this);\n //new SignupAuthProcess(this).execute(firstname, lastname, email, password);\n }\n else {\n showNoInternetConnectionMsg();\n }\n }\n }", "private void attemptLogin() {\r\n if (mAuthTask != null) {\r\n return;\r\n }\r\n\r\n // Reset errors.\r\n mIPView.setError(null);\r\n mPortView.setError(null);\r\n mUsernameView.setError(null);\r\n mPasswordView.setError(null);\r\n\r\n // Store values at the time of the login attempt.\r\n String ip = mIPView.getText().toString();\r\n int port = 0;\r\n try {\r\n port = Integer.parseInt(mPortView.getText().toString());\r\n }catch (Exception e){\r\n\r\n }\r\n String username = mUsernameView.getText().toString();\r\n String password = mPasswordView.getText().toString();\r\n\r\n boolean cancel = false;\r\n View focusView = null;\r\n\r\n // Check for a valid ip address.\r\n if (TextUtils.isEmpty(ip)) {\r\n mIPView.setError(getString(R.string.error_field_required));\r\n focusView = mIPView;\r\n cancel = true;\r\n } else if (!isIPValid(ip)) {\r\n mIPView.setError(getString(R.string.error_invalid_ip));\r\n focusView = mIPView;\r\n cancel = true;\r\n }\r\n\r\n // Check for a valid port.\r\n if (TextUtils.isEmpty(\"\"+port)) {\r\n mPortView.setError(getString(R.string.error_field_required));\r\n focusView = mPortView;\r\n cancel = true;\r\n }else if(port != (int)port){\r\n mPortView.setError(getString(R.string.error_invalid_port));\r\n focusView = mPortView;\r\n cancel = true;\r\n }\r\n\r\n // Check for a valid username.\r\n if (TextUtils.isEmpty(username)) {\r\n mUsernameView.setError(getString(R.string.error_field_required));\r\n focusView = mUsernameView;\r\n cancel = true;\r\n }\r\n\r\n // Check for a valid password, if the user entered one.\r\n if (TextUtils.isEmpty(password)) {\r\n mPasswordView.setError(getString(R.string.error_field_required));\r\n focusView = mPasswordView;\r\n cancel = true;\r\n }\r\n\r\n if (cancel) {\r\n // There was an error; don't attempt login and focus the first\r\n // form field with an error.\r\n focusView.requestFocus();\r\n } else {\r\n // Show a progress spinner, and kick off a background task to\r\n // perform the user login attempt.\r\n showProgress(true);\r\n mAuthTask = new UserLoginTask(ip, port, username, password);\r\n mAuthTask.execute((Void) null);\r\n }\r\n }", "@Test(priority = 0)\n public void correctLogin() {\n Login login = new Login(driver, wait);\n login.LoginMethod(login);\n login.typeCredentials(login.emailLabel, correctMail);\n login.typeCredentials(login.passwordLabel, correctPassword);\n login.click(login.submitBtn);\n login.checkElementDisplayed(login.loginContainer);\n }", "public void login() {\n if (!areFull()) {\n return;\n }\n\n // Get the user login info\n loginInfo = getDBQuery(nameField.getText());\n if (loginInfo.equals(\"\")) {\n return;\n }\n\n // Get password and check if the entered password is true\n infoArray = loginInfo.split(\" \");\n String password = infoArray[1];\n if (!passField.getText().equals(password)) {\n errorLabel.setText(\"Wrong Password!\");\n return;\n }\n\n continueToNextPage();\n }", "private void login(){\n\t\tprogress.toggleProgress(true, R.string.pagetext_signing_in);\n\t\tParseUser.logInInBackground(email.split(\"@\")[0], password, new LogInCallback() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void done(ParseUser user, ParseException e) {\n\t\t\t\tif (e == null) {\n\t\t\t\t\tprogress.toggleProgress(false);\n\t\t\t\t\tIntent intent = new Intent(context, MainActivity.class);\n\t\t\t\t\tstartActivity(intent);\n\t\t\t\t} else {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t// else, incorrect password\n\t\t\t\t\tToast.makeText(context, \n\t\t\t\t\t\t\t\t getString(R.string.parse_login_fail, email), \n\t\t\t\t\t\t\t\t Toast.LENGTH_LONG).show();\t\t\t\t\t\n\t\t\t\t\tLog.e(\"Error Logging into Parse\", \"Details: \" + e.getMessage());\n\t\t\t\t}\n\t\t\t}\t\t\t\t\t\t\t\n\t\t});\n\t}", "private void attemptLogin() {\n if (mAuth == null) {\n return;\n }\n showIndicator();\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n mEmailView.requestFocus();\n hideIndicator();\n return;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n mEmailView.requestFocus();\n hideIndicator();\n return;\n }\n\n // Check for nonempty password\n if (TextUtils.isEmpty(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n mPasswordView.requestFocus();\n hideIndicator();\n return;\n }\n\n // TODO is it a good idea to move this to function? will it show in memory?????\n mAuth.signInWithEmailAndPassword(email, password)\n .addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n hideIndicator();\n Intent intent = new Intent(LoginActivity.this, ItemListActivity.class);\n startActivity(intent);\n } else {\n hideIndicator();\n // show error\n Toast.makeText(LoginActivity.this, task.getException().getMessage(), Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "public void doLogin()\r\n {\r\n this.executeLoginAttemp(this.loginForForm, this.passwordForForm);\r\n String navigateResult = this.navigateAfterLoginAttemp();\r\n if (!navigateResult.equals(\"/\")) redirectSession(navigateResult);\r\n }", "public F.Promise<Result> handleSignIn() {\n final Form<LogIn> filledForm = logInForm.bindFromRequest();\n if (customerService().isLoggedIn()) {\n return asPromise(redirect(controllers.routes.HomeController.home()));\n } else if (filledForm.hasErrors()) {\n flash(\"error\", \"Login form contains missing or invalid data.\");\n return asPromise(badRequest(loginView.render(data().build(), filledForm)));\n } else {\n return handleSignInWithValidForm(filledForm);\n }\n }", "private void attemptLogin() {\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n mEMSIpview.setError(null);\n // Store values at the time of the login attempt.\n final String emsIP = mEMSIpview.getText().toString();\n final String email = mEmailView.getText().toString();\n final String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n if (TextUtils.isEmpty(emsIP)) {\n mEMSIpview.setError(\"Please enter an ems ip\");\n focusView = mEMSIpview;\n cancel = true;\n }\n // Check for a valid password, if the user entered one.\n if (TextUtils.isEmpty(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n performNetworkOperations.doLogin(emsIP, email, password);\n// Toast.makeText(this,token,Toast.LENGTH_SHORT).show();\n// List<String> nodeData = performNetworkOperations.getNodesList(emsIP,token);\n\n }\n }", "private void attemptLogin() {\n if (mAuthTask != null) {\n return;\n }\n\n mUsrView.setError(null);\n mPasswordView.setError(null);\n\n String usr = mUsrView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n Tuple<String, String> creds = /*getCredentials()*/ SERVER_CREDENTIALS;\n\n boolean cancel = false;\n View focusView = null;\n\n if (!TextUtils.isEmpty(password)) {\n if (!mPasswordView.getText().toString().equals(creds.y)) {\n if (Util.D) Log.i(\"attemptLogin\", \"pwd was \" + mPasswordView.getText().toString());\n mPasswordView.setError(getString(R.string.error_incorrect_creds));\n cancel = true;\n }\n focusView = mPasswordView;\n }\n\n if (TextUtils.isEmpty(usr)) {\n mUsrView.setError(getString(R.string.error_field_required));\n focusView = mUsrView;\n cancel = true;\n } else if (!usr.equals(creds.x)) {\n mUsrView.setError(getString(R.string.error_incorrect_creds));\n focusView = mUsrView;\n cancel = true;\n }\n\n if (cancel) {\n focusView.requestFocus();\n } else {\n if (prefs != null)\n prefs.edit().putBoolean(getString(R.string.settingAuthorized), true);\n showProgress(true);\n mAuthTask = new UserLoginTask(usr, password);\n mAuthTask.execute((Void) null);\n }\n }", "private void attemptLogin() {\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel)\n {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n }\n else\n {\n\n // checks to see if the login was successful or not\n try\n {\n // server connection class will handle initiating the connection to the remote server\n ServerConnection loginConn = new ServerConnection(\"http://cop4331groupeight.com/androidlogin.php\");\n String resultString = loginConn.initialLogin(email, password);\n\n JSONArray resultJSON = new JSONArray(resultString);\n JSONObject jsonObj = resultJSON.getJSONObject(0);\n\n int userID = jsonObj.getInt(\"userID\");\n String userEmail = jsonObj.getString(\"email\");\n String pass = jsonObj.getString(\"pass\");\n String error = jsonObj.getString(\"error\");\n String profileLocation = jsonObj.getString(\"profileLocation\");\n String firstName = jsonObj.getString(\"firstName\");\n String lastName = jsonObj.getString(\"lastName\");\n boolean inChat = jsonObj.getBoolean(\"inChat\");\n String preference = jsonObj.getString(\"preference\");\n String about = jsonObj.getString(\"about\");\n\n // login attempt was successful and we should proceed to the next activity\n if(error.equals(\"None\"))\n {\n\n session.createLoginSession(userID, userEmail, pass, profileLocation, firstName, lastName, inChat, true, preference, about);\n\n // Staring MainActivity\n Intent i = new Intent(getApplicationContext(), MatchActivity.class);\n startActivity(i);\n finish();\n }\n else\n {\n Log.v(\"Error\", \"Unexpected error occurred when parsing data.\");\n }\n }\n // failed login attempt\n catch(JSONException | NullPointerException e)\n {\n // if the user isn't currently connected to the internet, this exception will be thrown\n if (e instanceof NullPointerException)\n {\n Toast.makeText(LoginActivity.this, \"Error Connecting to Internet. Check your connection settings.\", Toast.LENGTH_SHORT).show();\n }\n // otherwise, the user's credentials were invalid and they need to try again\n else\n {\n Toast.makeText(LoginActivity.this, \"Login failed\", Toast.LENGTH_SHORT).show();\n mPasswordView.setError(getString(R.string.error_incorrect_password));\n mPasswordView.requestFocus();\n }\n\n }\n }\n }", "public void attemptLogin(View v) {\n if (mAuthTask != null) {\n return;\n }\n\n // Reset errors.\n mUsernamelView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String username = mUsernamelView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (TextUtils.isEmpty(password)) {\n mPasswordView.setError(getString(R.string.error_field_required));\n focusView = mPasswordView;\n cancel = true;\n } else if(password.length() < 4) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check if username is empty.\n if (TextUtils.isEmpty(username)) {\n mUsernamelView.setError(getString(R.string.error_field_required));\n focusView = mUsernamelView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true);\n mAuthTask = new UserLoginTask(username, password);\n mAuthTask.execute((Void) null);\n }\n }", "void login(String email, String password) throws InvalidCredentialsException, IOException;", "private void submitForm() {\n this.setDisable(true);\n clearErrorMessage();\n if(validateForm()) {\n CharSequence chars = passwordField.getCharacters();\n String username = usernameField.getText();\n this.controller.validateLoginCredentials(username, chars);\n }\n this.setDisable(false);\n }", "private void attemptConnect() {\r\n if (mConnectTask != null) {\r\n return;\r\n }\r\n\r\n // Reset errors.\r\n mNameView.setError(null);\r\n mKeyView.setError(null);\r\n\r\n // Store values at the time of the login attempt.\r\n String name = mNameView.getText().toString();\r\n String key = mKeyView.getText().toString();\r\n\r\n boolean cancel = false;\r\n View focusView = null;\r\n\r\n // Check for a valid name, if the user entered one.\r\n if (TextUtils.isEmpty(name)) {\r\n mNameView.setError(getString(R.string.error_invalid_password));\r\n focusView = mNameView;\r\n cancel = true;\r\n }\r\n\r\n // Check for a valid email address.\r\n if (TextUtils.isEmpty(key)) {\r\n mKeyView.setError(getString(R.string.error_field_required));\r\n focusView = mKeyView;\r\n cancel = true;\r\n }\r\n\r\n if (cancel) {\r\n // There was an error; don't attempt login and focus the first\r\n // form field with an error.\r\n focusView.requestFocus();\r\n } else {\r\n // Show a progress spinner, and kick off a background task to\r\n // perform the user login attempt.\r\n mConnectTask = new ConnectTask(this, name, key);\r\n mConnectTask.execute((Void) null);\r\n }\r\n }", "private void userLogin() {\n String email = et_login_email.getText().toString().trim();\n String password = et_login_password.getText().toString().trim();\n\n if (email.isEmpty()) {\n et_login_email.setError(\"Please enter an email.\");\n et_login_email.requestFocus();\n return;\n }\n if (!Patterns.EMAIL_ADDRESS.matcher(email).matches()) {\n et_login_email.setError(\"Please provide a valid e-mail address.\");\n et_login_email.requestFocus();\n return;\n }\n\n if (password.isEmpty()) {\n et_login_password.setError(\"Please enter a password.\");\n et_login_password.requestFocus();\n return;\n }\n if (password.length() < 6) {\n et_login_password.setError(\"Password should be at least 6 characters.\");\n et_login_password.requestFocus();\n }\n\n // Sign in with Email and Password function for Firebase.\n mAuth.signInWithEmailAndPassword(email, password).addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull @NotNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n Toast.makeText(LoginActivity.this, \"Logged in\", Toast.LENGTH_LONG).show();\n startActivity(new Intent(LoginActivity.this, HomeMainActivity.class));\n } else {\n Toast.makeText(LoginActivity.this, \"Failed to login. Please re-check your login credentials.\", Toast.LENGTH_LONG).show();\n progressBar.setVisibility(View.GONE);\n }\n }\n });\n }", "private static void attemptToLogin() {\n\t\tString id = null;\n\t\tString password = null;\n\t\tString role = null;\n\t\tint chances = 3;\n\t\t//User will get 3 chances to login into the system.\n\t\twhile(chances-->0){\n\t\t\tlog.info(\"Email Id:\");\n\t\t\tid = sc.next();\n\t\t\tlog.info(\"Password:\");\n\t\t\tpassword = sc.next();\n\t\t\trole = LogInAuthentication.authenticate(id, password);\n\t\t\t//If correct credentials are entered then role of user will be fetch from the database. \n\t\t\tif(role == null) {\n\t\t\t\t//If role is not fetched, error and left chances will be shown.\n\t\t\t\tlog.error(\"Invalid EmailId or password\");\n\t\t\t\tlog.info(\"Chances left: \"+chances);\n\t\t\t}\n\t\t\telse\n\t\t\t\tbreak;\n\t\t}\n\t\t//After verifying credentials User will be on-board to its portal depending upon the role.\n\t\tonboard(id,role);\n\t}", "private void attemptLogin() {\n if (mAuthTask != null) {\n return;\n }\n\n // Reset errors.\n mPasswordView.setError(null);\n usernameView.setError(null);\n\n // Store values at the time of the login attempt.\n String username = usernameView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n/*\nTODO: Move this to register area to see if email is a valid email address\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n */\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n //showProgress(true);\n HashMap<String, String> map = new HashMap<>();\n map.put(\"username\", username);\n map.put(\"pass\", password);\n mAuthTask = new httpUrlConn(map, \"http://hive.sewanee.edu/evansdb0/android1/scripts/hotPartyLogin.php\");\n\n mAuthTask.execute();\n\n try {\n if(mAuthTask.get().contains(\"true\")) {\n String r = mAuthTask.get().replace(\"true // \",\"\");\n Log.i(\"response\", r.toString());\n Toast.makeText(getApplicationContext(),r,Toast.LENGTH_SHORT).show();\n Intent i = new Intent(this, chooseEvent.class);\n i.putExtra(\"username\", username);\n startActivity(i);\n\n }\n else {\n String[] resp = response.split(\",\");\n // for(String i: resp)\n //Toast.makeText(getApplicationContext(),i,Toast.LENGTH_SHORT).show();\n }\n } catch (InterruptedException e) {\n e.printStackTrace();\n } catch (ExecutionException e) {\n e.printStackTrace();\n }\n\n if (mAuthTask == null || mAuthTask.getStatus().equals(AsyncTask.Status.FINISHED)) {\n mAuthTask = null;\n }\n }\n }", "@PostMapping(\"signup\")\n public String login(@ModelAttribute(\"loginFormData\") @Valid LoginFormDTO form, BindingResult bindingResult, HttpSession session) {\n if (bindingResult.hasErrors()) {\n return \"user/signup\";\n }\n User validCredentials = loginService.login(form.getUsername(), form.getPassword());\n if (validCredentials == null) {\n bindingResult.rejectValue(\"username\", \"\", \"login or password incorrect\");\n return \"user/signup\";\n }\n\n // correct login\n session.setAttribute(LOGGED_USER_KEY, validCredentials);\n return \"redirect:/dd\";\n }", "public void login () {\n\t\tGPPSignIn.sharedInstance().authenticate();\n\t}", "public void attemptRegister() throws IOException, ClassNotFoundException {\n\t\t// Reset errors.\n\t\t//mEmailView.setError(null);\n\t\t//mPasswordView.setError(null);\n\n\t\t// Reset errors.\n\t\tmFullNameView.setError(null);\t\t\n\t\tmEmailView.setError(null);\n\t\tmPasswordView.setError(null);\n\t\tLog.d(\"Rafa\",\"En el register .... \");\n\t\t\n\t\t// Store values at the time of the login attempt.\n\t\tmFullName = mFullNameView.getText().toString();\n\t\tmEmail = mEmailView.getText().toString();\n\t\tmPassword = mPasswordView.getText().toString();\n\n\t\tboolean cancel = false;\n\t\tView focusView = null;\n\n\t\tLog.d(\"Rafa\",\"En el register ... FullName \");\t\t\n\t\t// Check for a valid password.\n\t\tif (TextUtils.isEmpty(mFullName)) {\n\t\t\tmFullNameView.setError(getString(R.string.error_field_required));\n\t\t\tfocusView = mFullNameView;\n\t\t\tcancel = true;\n\t\t} else if (mFullName.length() < 4) {\n\t\t\tmFullNameView.setError(getString(R.string.error_invalid_password));\n\t\t\tfocusView = mFullNameView;\n\t\t\tcancel = true;\n\t\t}\n\n\t\tLog.d(\"Rafa\",\"En el register ... Email \");\t\t\n\t\t// Check for a valid email address.\n\t\tif (TextUtils.isEmpty(mEmail)) {\n\t\t\tmEmailView.setError(getString(R.string.error_field_required));\n\t\t\tfocusView = mEmailView;\n\t\t\tcancel = true;\n/*\t\t} else if (!mEmail.contains(\"preventa\")) {\n\t\t\tmEmailView.setError(getString(R.string.error_invalid_email));\n\t\t\tfocusView = mEmailView;\n\t\t\tcancel = true;\n*/\t\t\t\n\t\t}\t\t\n\t\t\n\t\tLog.d(\"Rafa\",\"En el register ... Password \");\n\t\t// Check for a valid password.\n\t\tif (TextUtils.isEmpty(mPassword)) {\n\t\t\tmPasswordView.setError(getString(R.string.error_field_required));\n\t\t\tfocusView = mPasswordView;\n\t\t\tcancel = true;\n\t\t} else if (mPassword.length() < 4) {\n\t\t\tmPasswordView.setError(getString(R.string.error_invalid_password));\n\t\t\tfocusView = mPasswordView;\n\t\t\tcancel = true;\n\t\t}\n\n\t\t\n\t\tLog.d(\"Rafa\",\"pasa x aquí ... \" + mFullName + \"-\" + mEmail + \"-\" + mPassword);\n\t\t\n\t\tClass.forName(\"org.postgresql.Driver\");\n\t\tString url;\n\t\turl = \"jdbc:postgresql://192.168.4.20:5432/\" +\n\t\t\t\t\"curso\" +\n\t\t\t\t\"?sslfactory=org.postgresql.ssl.NonValidatingFactory\"; // +\n\t\t\t\t//\"&ssl=true\";\n\t\t\n\t\tConnection conn;\n\t\ttry {\n\t\t\tconn = DriverManager.getConnection(url,\"postgres\",\"\");\n\t\t\tPreparedStatement is = conn.prepareStatement(\n\t\t\t\t\t\"INSERT INTO registro (nombre_completo, ecorreo, password) VALUES (?, ?, ?);\");\n\t\t\t\n\t\t\tis.setString(1,mFullName);\n\t\t\tis.setString(2,mEmail);\n\t\t\tis.setString(3,mPassword);\n\t\t\t\n\t\t\tint rows = is.executeUpdate();\n\t\t\tis.close();\n\t\t\t\n\t\t\tLog.d(\"Rafa\",\"rows <\" + rows + \">\");\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\tLog.d(\"Rafa\",\"SQLException \" + e.getErrorCode() + \"-\" + e.getCause() + \"-\" + e.getLocalizedMessage() + \"-\" + e.getMessage() );\t\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t\n\t\t\n\t\tif (cancel) {\n\t\t\t// There was an error; don't attempt login and focus the first\n\t\t\t// form field with an error.\n\t\t\tfocusView.requestFocus();\n\t\t} else {\n\t\t\t// Show a progress spinner, and kick off a background task to\n\t\t\t// perform the user login attempt.\n\t\t\t//mLoginStatusMessageView.setText(R.string.login_progress_signing_in);\n\t\t\tToast.makeText(getApplicationContext(), \"Registrando:\" + mFullName + \"-\" + mEmail + \"-\" + mPassword , Toast.LENGTH_LONG).show();\t\t\t\n\t\t}\n\t}", "private void attemptLogin() {\n\n final String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n if (email.isEmpty())\n if (email.equals(\"\") || password.equals(\"\")) return;\n Toast.makeText(this, \"Login in progress...\", Toast.LENGTH_SHORT).show();\n\n\n mAuth.signInWithEmailAndPassword(email, password).addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n\n //Log.d(\"Memorization Game\", \"signInWithEmail() onComplete: \" + task.isSuccessful());\n\n if (!task.isSuccessful()) {\n //Log.d(\"Memorization Game\", \"Problem signing in: \" + task.getException());\n showErrorDialog(\"There was a problem signing in\");\n } else {\n //SharedPreferences mpreference = getSharedPreferences(\"user_email\", Context.MODE_PRIVATE);\n //mpreference.edit().putString(\"email\",email).apply();\n Intent intent = new Intent(Activity_login.this, Home.class);\n finish();\n startActivity(intent);\n }\n\n }\n });\n\n\n }", "public void Login()throws Exception{\r\n if(eMailField.getText().equals(\"user\") && PasswordField.getText().equals(\"pass\")){\r\n displayMainMenu();\r\n }\r\n else{\r\n System.out.println(\"Username or Password Does not match\");\r\n }\r\n }", "private void onClickSignIn(){\n if(checkValidation()){\n //if Validation is ok\n submitForm();\n }\n else{\n //Something went wrong...\n Toast.makeText(LauncherActivity.this, \"Form contains error!\", Toast.LENGTH_LONG).show();\n }\n }", "User login(String email, String password) throws AuthenticationException;", "public HomePage loginValidCredentials (String email, String password){\n\n insertCredentials(email, password);\n submitInformation();\n\n return new HomePage(driver);\n }", "public LoginPage submitLoginExpectingFailure() {\n // This is the only place that submits the login form and expects the\n // destination to be the login page due to login failure.\n driver.findElement(signInButton).submit();\n\n // Return a new page object representing the destination. Should the user ever\n // be navigated to the home page after submiting a login with credentials\n // expected to fail login, the script will fail when it attempts to instantiate\n // the LoginPage PageObject.\n return new LoginPage(driver);\n }", "public void login() {\n\n String username = usernameEditText.getText().toString();\n String password = passwordEditText.getText().toString();\n regPresenter.setHost(hostEditText.getText().toString());\n regPresenter.login(username, password);\n }", "public static void loginForm(final LinearLayout login_form, final Context context) {\n TextView registration_link = (TextView) login_form.findViewById(R.id.registration);\n registration_link.setPaintFlags(registration_link.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG);\n registration_link.setOnClickListener(new View.OnClickListener() {\n\n @Override\n public void onClick(View v) {\n Intent intent = new Intent(Config.context, CreateAccountActivity.class);\n Config.context.startActivity(intent);\n }\n });\n\n /* reset password link handler */\n TextView reset_link = (TextView) login_form.findViewById(R.id.reset_password);\n reset_link.setPaintFlags(reset_link.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG);\n reset_link.setOnClickListener(new View.OnClickListener() {\n\n @Override\n public void onClick(View v) {\n Intent intent = new Intent(Config.context, ResetPasswordActivity.class);\n Config.context.startActivity(intent);\n }\n });\n\n /* fix the password field font */\n final EditText password = (EditText) login_form.findViewById(R.id.password);\n password.setTypeface(Typeface.DEFAULT);\n\n if (Utils.getCacheConfig(\"account_login_mode\").equals(\"email\")) {\n EditText username = (EditText) login_form.findViewById(R.id.username);\n username.setHint(Lang.get(\"android_hint_email\"));\n }\n\n /* login button handler */\n Button login_button = (Button) login_form.findViewById(R.id.login);\n login_button.setOnClickListener(new View.OnClickListener() {\n\n @Override\n public void onClick(View v) {\n boolean error = false;\n\n /* validate fields */\n EditText username = (EditText) login_form.findViewById(R.id.username);\n if (username.getText().toString().isEmpty()) {\n username.setError(Lang.get(\"no_field_value\"));\n error = true;\n }\n\n if (password.getText().toString().isEmpty()) {\n password.setError(Lang.get(\"no_field_value\"));\n error = true;\n }\n\n if (!error) {\n final String passwordHash = password.getText().toString();\n\n /* show progressbar */\n final ProgressDialog login_progress = ProgressDialog.show(Config.context, null, Lang.get(\"loading\"));\n\n /* build request url */\n HashMap<String, String> params = new HashMap<String, String>();\n params.put(\"username\", username.getText().toString());\n params.put(\"password\", passwordHash);\n final String url = Utils.buildRequestUrl(\"loginAttempt\", params, null);\n\n /* do request */\n AsyncHttpClient client = new AsyncHttpClient();\n client.get(url, new AsyncHttpResponseHandler() {\n\n @Override\n public void onSuccess(int statusCode, Header[] headers, byte[] server_response) {\n // called when response HTTP status is \"200 OK\"\n try {\n String response = String.valueOf(new String(server_response, \"UTF-8\"));\n login_progress.dismiss();\n /* parse xml response */\n XMLParser parser = new XMLParser();\n Document doc = parser.getDomElement(response, url);\n\n if (doc == null) {\n Dialog.simpleWarning(Lang.get(\"returned_xml_failed\"), context);\n } else {\n NodeList accountNode = doc.getElementsByTagName(\"account\");\n Element element = (Element) accountNode.item(0);\n\n /* list of status to offer \"Contact Us\" page */\n String status = Utils.getNodeByName(element, \"status\");\n String[] tmp_status = {\"approval\", \"pending\", \"trash\"};\n List<String> contact_status = Utils.string2list(tmp_status);\n\n /* error */\n if (status.equals(\"error\")) {\n Dialog.simpleWarning(Lang.get(\"dialog_login_error\"), context);\n password.setText(\"\");\n } else if (status.equals(\"incomplete\")) {\n Dialog.simpleWarning(Lang.get(\"dialog_login_\" + status + \"_info\"), context);\n }\n /* status matched contact us message logic */\n else if (contact_status.indexOf(status) >= 0) {\n DialogInterface.OnClickListener listener = new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n Intent intent = new Intent(Config.context, SendFeedbackActivity.class);\n intent.putExtra(\"selection\", \"contact_us\");\n Config.context.startActivity(intent);\n }\n };\n\n Dialog.CustomDialog(Lang.get(\"dialog_login_\" + status), Lang.get(\"dialog_login_\" + status + \"_info\"), context, listener);\n }\n\n /* do login if account */\n if (!Utils.getNodeByName(element, \"id\").isEmpty()) {\n /* hide keyboard */\n Utils.hideKeyboard(login_form.findFocus());\n\n confirmLogin(accountNode);\n }\n }\n\n } catch (UnsupportedEncodingException e1) {\n\n }\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, byte[] errorResponse, Throwable e) {\n // called when response HTTP status is \"4XX\" (eg. 401, 403, 404)\n }\n });\n }\n }\n });\n\n /* fb button handler */\n String facebook_id = Config.context.getString(R.string.app_id);\n if (Utils.getCacheConfig(\"facebookConnect_plugin\").equals(\"1\") && !facebook_id.isEmpty()) {\n LoginButton fbLogin = (LoginButton) login_form.findViewById(R.id.fbLogin);\n fbLogin.setCompoundDrawablesWithIntrinsicBounds(null, null, null, null);\n\n /* set related items visible */\n fbLogin.setVisibility(View.VISIBLE);\n login_form.findViewWithTag(\"fbview\").setVisibility(View.VISIBLE);\n\n callbackManager = CallbackManager.Factory.create();\n\n fbLogin.setReadPermissions(Arrays.asList(\"public_profile\", \"email\"));\n fbLogin.registerCallback(callbackManager, new FacebookCallback<LoginResult>() {\n\n @Override\n public void onSuccess(LoginResult loginResult) {\n GraphRequest request = GraphRequest.newMeRequest(loginResult.getAccessToken(),\n new GraphRequest.GraphJSONObjectCallback() {\n\n @Override\n public void onCompleted(JSONObject object, GraphResponse response) {\n // Application code\n\t\t\t\t\t\t\t\t\t/*Boolean ver = Boolean.parseBoolean(object.optString(\"verified\"));\n\t\t\t\t\t\t\t\t\tif ( !ver ) {\n\t\t\t\t\t\t\t\t\t\tDialog.simpleWarning(Lang.get(\"facebook_not_verified\"), context);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse */\n if (object != null) {\n final HashMap<String, String> formData = new HashMap<String, String>();\n formData.put(\"username\", object.optString(\"name\"));\n formData.put(\"password\", \"will-be-generated\");\n formData.put(\"email\", object.optString(\"email\"));\n formData.put(\"account_type\", \"will-be-set\");\n formData.put(\"fb_id\", object.optString(\"id\"));\n formData.put(\"first_name\", object.optString(\"first_name\"));\n formData.put(\"last_name\", object.optString(\"last_name\"));\n\n /* show progressbar */\n final ProgressDialog progress = ProgressDialog.show(Config.context, null, Lang.get(\"loading\"));\n\n /* do request */\n AsyncHttpClient client = new AsyncHttpClient();\n client.setTimeout(30000); // set 30 seconds for this task\n\n final String url = Utils.buildRequestUrl(\"createAccount\");\n client.post(url, Utils.toParams(formData), new AsyncHttpResponseHandler() {\n\n @Override\n public void onSuccess(int statusCode, Header[] headers, byte[] server_response) {\n // called when response HTTP status is \"200 OK\"\n try {\n String response = String.valueOf(new String(server_response, \"UTF-8\"));\n /* hide progressbar */\n progress.dismiss();\n\n /* parse xml response */\n XMLParser parser = new XMLParser();\n Document doc = parser.getDomElement(response, url);\n\n if (doc == null) {\n Dialog.simpleWarning(Lang.get(\"returned_xml_failed\"), context);\n } else {\n NodeList errorsNode = doc.getElementsByTagName(\"errors\");\n\n /* handle errors */\n if (errorsNode.getLength() > 0) {\n Element element = (Element) errorsNode.item(0);\n NodeList errors = element.getChildNodes();\n\n if (errors.getLength() > 0) {\n Element error = (Element) errors.item(0);\n String key_error = error.getTextContent();\n if (key_error.equals(\"fb_email_exists\")) {\n checkFbPassword(formData, context);\n } else {\n Dialog.simpleWarning(Lang.get(key_error), context);\n }\n LoginManager.getInstance().logOut();\n }\n }\n /* process login */\n else {\n NodeList accountNode = doc.getElementsByTagName(\"account\");\n confirmLogin(accountNode);\n }\n }\n\n } catch (UnsupportedEncodingException e1) {\n\n }\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, byte[] errorResponse, Throwable e) {\n // called when response HTTP status is \"4XX\" (eg. 401, 403, 404)\n }\n });\n } else {\n Log.d(\"FD\", \"FB connect no user\");\n }\n }\n });\n Bundle parameters = new Bundle();\n parameters.putString(\"fields\", \"id,name,email,gender,first_name,last_name,verified,birthday\");\n request.setParameters(parameters);\n request.executeAsync();\n\n }\n\n @Override\n public void onCancel() {\n\n }\n\n @Override\n public void onError(FacebookException e) {\n\n }\n });\n }\n }", "private void attemptLogin() {\r\n if (mAuthTask != null) {\r\n return;\r\n }\r\n\r\n // Reset errors.\r\n mEmailView.setError(null);\r\n mPasswordView.setError(null);\r\n\r\n // Store values at the time of the login attempt.\r\n String email = mEmailView.getText().toString();\r\n String password = mPasswordView.getText().toString();\r\n\r\n boolean cancel = false;\r\n View focusView = null;\r\n\r\n //检测密码\r\n if (TextUtils.isEmpty(password)) {\r\n mPasswordView.setError(\"请输入密码\");\r\n focusView = mPasswordView;\r\n cancel = true;\r\n }\r\n\r\n // Check for a valid password, if the user entered one.\r\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\r\n mPasswordView.setError(getString(R.string.error_invalid_password));\r\n focusView = mPasswordView;\r\n cancel = true;\r\n }\r\n\r\n // Check for a valid email address.\r\n if (TextUtils.isEmpty(email)) {\r\n mEmailView.setError(getString(R.string.error_field_required));\r\n focusView = mEmailView;\r\n cancel = true;\r\n } else if (!isEmailValid(email)) {\r\n mEmailView.setError(getString(R.string.error_invalid_email));\r\n focusView = mEmailView;\r\n cancel = true;\r\n }\r\n\r\n SqlEngine sqlEngine = SqlEngine.getInstance(this);\r\n ArrayList<UserBean> list = sqlEngine.queryInfo();\r\n if (list.size() <= 0) {\r\n Toast.makeText(this, \"没有这个账户\", Toast.LENGTH_SHORT).show();\r\n return;\r\n }\r\n for (int i = 0; i < list.size(); i++) {\r\n UserBean bean = list.get(i);\r\n Log.i(TAG, \"attemptLogin: 执行到此\");\r\n if (!bean.getUser().equals(email)) {\r\n Toast.makeText(this, \"没有这个账户\", Toast.LENGTH_SHORT).show();\r\n return;\r\n }\r\n if (!bean.getPwd().equals(password)) {\r\n Toast.makeText(this, \"密码不正确\", Toast.LENGTH_SHORT).show();\r\n return;\r\n }\r\n }\r\n\r\n String ip = (String) SpUtils.getValues(MyApplication.getContext(), Https.IP_ADDRESS, \"\");\r\n String port = (String) SpUtils.getValues(MyApplication.getContext(), Https.PORT, \"\");\r\n if (TextUtils.isEmpty(ip) || TextUtils.isEmpty(port)) {\r\n Toast.makeText(this, \"请先设置网络!\", Toast.LENGTH_SHORT).show();\r\n return;\r\n }\r\n\r\n if (cancel) {\r\n // There was an error; don't attempt login and focus the first\r\n // form field with an error.\r\n focusView.requestFocus();\r\n } else {\r\n // 显示一个进度微调,并启动一个后台任务\r\n // 执行用户登录尝试。\r\n showProgress(true);\r\n //判断是否勾选\r\n isCheckBox(email, password);\r\n mAuthTask = new UserLoginTask(email, password);\r\n mAuthTask.execute((Void) null);\r\n startActivity(new Intent(this, MainActivity.class));\r\n\r\n }\r\n }", "public String login() {\r\n FacesContext context = FacesContext.getCurrentInstance();\r\n HttpServletRequest request = (HttpServletRequest) context.getExternalContext().getRequest();\r\n System.out.println(\"Username: \" + email);\r\n System.out.println(\"Password: \" + password);\r\n try {\r\n //this method will actually check in the realm for the provided credentials\r\n request.login(this.email, this.password);\r\n\r\n } catch (ServletException e) {\r\n context.addMessage(null, new FacesMessage(\"Login failed.\"));\r\n return \"error\";\r\n }\r\n return \"/faces/users/index.xhtml\";\r\n }", "private void signInWithEmailAndPassword(String email, String password) {\n if (!validateForm()) {\n return;\n }\n\n mAuth.signInWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (!task.isSuccessful()) {\n Toast.makeText(MainActivity.this, \"Unable to login\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "private void attemptRegister() {\n\n // Reinicia los errores de los EditText\n mEditEmail.setError(null);\n mEditFirstName.setError(null);\n mEditLastName.setError(null);\n mEditPassword.setError(null);\n mEditPasswordConfirm.setError(null);\n\n // Obtiene los valores ingresados por el usuario\n String email = Utils.checkEditTextForEmpty(getContext(),mEditEmail);\n String firstName = Utils.checkEditTextForEmpty(getContext(),mEditFirstName);\n String lastName = Utils.checkEditTextForEmpty(getContext(),mEditLastName);\n String password = Utils.checkEditTextForEmpty(getContext(),mEditPassword);\n String passwordConfirm = Utils.checkEditTextForEmpty(getContext(),mEditPasswordConfirm);\n\n //Revisa si hay valor vacío\n if (email == null || firstName == null || lastName == null || password == null || passwordConfirm == null) {\n return;\n }\n\n // Valida el correo\n if (!email.contains(\"@\")) {\n mEditEmail.setError(getString(R.string.error_invalid_email));\n mEditEmail.requestFocus();\n return;\n }\n\n // Valida la contraseña\n if (password.length() < 3) {\n mEditPassword.setError(getString(R.string.error_invalid_password));\n mEditPassword.requestFocus();\n return;\n }\n\n //Valida que las contraseñas hagan match\n if (!password.equals(passwordConfirm)) {\n mEditPasswordConfirm.setError(getString(R.string.error_invalid_password_confirmation));\n mEditPasswordConfirm.requestFocus();\n return;\n }\n\n // Intenta crear la cuenta\n Toast.makeText(getContext(), \"Bienvenido\", Toast.LENGTH_LONG).show();\n }", "protected void login() {\n\t\tdriver.get(getProperty(\"baseUrl\"));\n\n\t\t// 2. Enter valid credentials in the Username and Password fields.\n\t\tLoginPageObjects.usernameTextField(driver).sendKeys(getProperty(\"validUsername\"));\n\t\tLoginPageObjects.passwordTextField(driver).sendKeys(getProperty(\"validPassword\"));\n\n\t\t// 3. Click on the Login button\n\t\tLoginPageObjects.loginButton(driver).click();\n\t\t// waiting.waitForLoad(driver);\n\t}", "public abstract boolean login(String email, String passwaord) throws CouponSystemException;", "static void acceptLogin() throws IOException\n\t{\n\t\tboolean validLogin = false, loginAccepted=false, emptyInput=false;;\n\t\tint dialogButton, attempts = 0,option;\n\t\tString info, title = \"Registration\";\n\t\tdialogButton = JOptionPane.showConfirmDialog (null, \"Are you an existing user?\",\"Login\", JOptionPane.YES_NO_OPTION);\n \n JTextField email = new JTextField(); //A text field is a basic text control that enables the user to type a small amount of text.\n JTextField password = new JPasswordField();\n JTextField confirmEmail = new JTextField(); //A text field is a basic text control that enables the user to type a small amount of text.\n JTextField confirmPassword = new JPasswordField();\n \n if(dialogButton == JOptionPane.YES_OPTION)//Executes only if the user is already an existing user\n\t\t{\n\t\t\tSystem.out.println(\"User selected yes..\");\n //Creates an object that accepts both username and password using JTextField\n \n Object[]message = {\"Username:\", username,\"Password:\", password};\n String attempted=\"***\";\n System.out.println(attempted);\n //Loop will keep running until three attempts are made or a valid input is entered\n\t\t\twhile(attempts<3 && !validLogin && !emptyInput)\n\t\t\t{\n\n\t\t\t\toption = JOptionPane.showConfirmDialog(null, message, \"Login\", JOptionPane.OK_CANCEL_OPTION);\n System.out.println(username.getText()+\"\\n\"+password.getText());\n\n //if user presses Cancel button the program loops through acceptLogin Method\n if(option == JOptionPane.CANCEL_OPTION)\n {\n acceptLogin();\n validLogin = true;\n }\n\n else \n\t\t\t\t{\n\t\t\t\t validLogin = validLoginEntered(username.getText(), password.getText());\n\t\t\t\t if(!validLogin)\n {\n\t\t\t\t JOptionPane.showMessageDialog(null, \"User Could Not Be Found!\\nAttempt \"+(attempts+1)+\" of 3\", title, 2);\n\t\t\t\t attempts++;\t\n\t\t\t\t if (attempts==3) \n\t\t\t\t {\n\t\t\t\t \tSystem.out.println(\"Login Failed\");\n\t\t\t\t \tdialogButton= JOptionPane.showConfirmDialog (null, \"Do you want to Login Again?\",\"Login Failed\", JOptionPane.YES_NO_OPTION);\n\t\t\t\t \t if(dialogButton==JOptionPane.YES_OPTION)\n\t\t\t\t \t \t{acceptLogin();System.out.println(\"Reseting Login...\");\n\t\t\t\t \t \tvalidLogin=true;}\n\t\t\t\t \t else {\n\t\t\t\t \t \tSystem.out.println(\"Terminating Login...\");\n\t\t\t\t \t \tJOptionPane.showMessageDialog(null,\"Goodbye!!\");\n\t\t\t\t \t }\n\t\t\t\t }\n\t\t\t\t attempted=attempted.substring(0,attempted.length()-1);\n\t\t\t\t System.out.println(attempted);\n\t\t\t\t }\n else\n {\n loggedin = true;\n user(username.getText());\n getUsername(username.getText());\n }\n\t\t\t\t}\n }\n }\n //if user presses NO option then the user is asked to create a new user\n else if(dialogButton == JOptionPane.NO_OPTION)\n\t\t{ \n boolean userExists = false;\n\t\t\tFile fileReader = new File(\"loginDetails.txt\");\n\t\t\tObject[] message= {\"Email:\",email,\"Username:\", username,\"Password:\", password,\"Confirm Password:\", confirmPassword};\n JOptionPane.showMessageDialog(null, message, \"Create user\",1);\n info = username.getText()+\",\"+password.getText()+\",\"+email.getText()+\"\\n\"; \n //this is used to check if the user already exists. If user already exists then the user is asked to try logging in \n if (validpassword(password.getText())==true) {\n \t\n \n if(validemail(email.getText())==true)\n {\n if(loginDetails.get(0).contains(username.getText()) || username.getText().equals(\"\"))\n {\n JOptionPane.showMessageDialog(null,\"Username Taken or Empty Input, Try Again\",\"Registration Error!\",0);\n userExists = true;\n acceptLogin();\n }\n //if user doesn't exist then a new user is created\n if(!userExists&&confirmPassword.getText().matches(password.getText()))\n {\n \tSystem.out.println(\"New user Added to log...\");\n writeToFile(fileReader, info);\n writeUserFile(username.getText()+\".txt\",\"\");\n userDetails(username.getText()+\".txt\");\n loginDetails.get(0).add(username.getText());\n loginDetails.get(1).add(password.getText());\n loginDetails.get(2).add(\"0\");\n userIndex = loginDetails.get(0).indexOf(username.getText());\n validLogin=true;\n loggedin = true;\n }else{JOptionPane.showMessageDialog(null,\"Password does not match, Try again\",\"Password Error\",0);acceptLogin();}\n \t}else \n \t{\n \t\t\n \t\t acceptLogin();\n \t}\n }else\n {\n\n \t\t acceptLogin();\n }\n \n }\n //if the login is not succesfull then the program exists \n\t}", "public void attemptLogin() {\n if (mLoginTask != null) {\n return;\n }\n\n // Reset errors.\n mUserNameView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String mUserName = mUserNameView.getText().toString();\n String mPassword = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password.\n if (TextUtils.isEmpty(mPassword)) {\n mPasswordView.setError(getString(R.string.error_password_required));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(mUserName)) {\n mUserNameView.setError(getString(R.string.error_username_required));\n focusView = mUserNameView;\n cancel = true;\n }\n\n if (cancel) {\n // 出错时,让相应的控件获取焦点\n focusView.requestFocus();\n } else {\n // 进行登录\n mLoginTask = new LoginTask(LoginActivity.this, mUserName, mPassword, new LoginTask.OnLoginFinished() {\n @Override\n public void onFinished(String result) {\n try {\n JSONObject userJsonObject = new JSONObject(result);\n\n Intent intent = new Intent(LoginActivity.this, MainActivity.class);\n intent.putExtra(\"UserId\", userJsonObject.getString(\"UserId\"));\n intent.putExtra(\"Key\", userJsonObject.getString(\"Key\"));\n intent.putExtra(\"UserName\", userJsonObject.getString(\"UserName\"));\n intent.putExtra(\"Orid\", userJsonObject.getString(\"Orid\"));\n if(userJsonObject.has(\"PlateType\"))\n intent.putExtra(\"PlateType\", userJsonObject.getString(\"PlateType\"));\n mLoginTask = null;\n\n rememberUserName(((CheckBox)findViewById(R.id.rememberUserName)).isChecked());\n\n startActivity(intent);\n finish();\n } catch (JSONException e) {\n Log.d(\"DFCarChecker\", \"Json解析错误:\" + e.getMessage());\n }\n }\n\n @Override\n public void onFailed(String error) {\n mLoginTask = null;\n // 登录失败,获取错误信息并显示\n Log.d(AppCommon.TAG, \"登录时出现错误:\" + error);\n\n mPasswordView.setError(error);\n mPasswordView.requestFocus();\n }\n });\n mLoginTask.execute();\n }\n }", "@Override\n public String logIn(){\n String email = getUserEmail();\n String password = getUserPassword();\n \n if (email.isEmpty() || password.isEmpty()){\n setDisplayError(Color.RED, \"Empty Credentials!\");\n }\n else { \n String sql = \"SELECT * FROM registered_user Where email = ? and password = ?\";\n \n try {\n preparedStatement = conn.prepareStatement(sql);\n preparedStatement.setString(1, email);//1 states that the 1st parameter is email\n preparedStatement.setString(2, password);//2 stated that the 2nd parameter is password\n resultSet = preparedStatement.executeQuery();\n \n if (!resultSet.next()) //If the rows doesn't exist\n setDisplayError(Color.RED, \"Incorrect Email or Password\");\n else{\n status = \"Success\";\n setDisplayError(Color.GREEN, \"Successfull login... Redirecting...\");\n } \n } catch (SQLException ex) {\n System.out.println(\"In the LoginController 1st try part \" + ex.getMessage());\n } finally {\n //closing the prepared statement to prevent the SQL injection\n try {\n if (preparedStatement != null ) {\n preparedStatement.close();\n conn.close();\n } \n } catch (SQLException sQLException) {\n System.out.println(sQLException.getMessage());\n status = \"Exception\";\n } \n \n //closing the connection\n try {\n if (conn != null) {\n conn.close();\n }\n } catch (SQLException sQLException) {\n System.out.println(sQLException.getMessage());\n }\n }\n }\n \n return status; \n }", "private void attemptLogin() {\r\n if (mAuthTask != null) {\r\n return;\r\n }\r\n\r\n\r\n // Store values at the time of the login attempt.\r\n String email = mEmailView.getText().toString();\r\n String password = mPasswordView.getText().toString();\r\n\r\n boolean cancel = false;\r\n View focusView = null;\r\n\r\n // Check for a valid password, if the user entered one.\r\n\r\n // Check for a valid email address.\r\n if (TextUtils.isEmpty(email)) {\r\n mEmailView.setError(getString(R.string.error_field_required));\r\n focusView = mEmailView;\r\n cancel = true;\r\n } else if (!isEmailValid(email)) {\r\n mEmailView.setError(getString(R.string.error_invalid_email));\r\n focusView = mEmailView;\r\n cancel = true;\r\n }\r\n mAuthTask = new UserLoginTask(email, password);\r\n try {\r\n Boolean logStatus = mAuthTask.execute(\"http://shubhamgoswami.me/login\").get();\r\n if(logStatus){\r\n SQLiteDatabase db = openOrCreateDatabase(\"adharShila\",MODE_PRIVATE, null);\r\n db.execSQL(\"UPDATE LOGSTATUS SET USERNAME=\\\"\"+mEmailView.getText()+\"\\\", STATUS=1 WHERE ENTRY=1\");\r\n db.close();\r\n Intent i = new Intent(getApplicationContext(), MainActivity.class);\r\n i.putExtra(\"username\", mEmailView.getText());\r\n i.putExtra(\"password\", password);\r\n startActivity(i);\r\n }\r\n } catch (InterruptedException e) {\r\n e.printStackTrace();\r\n } catch (ExecutionException e) {\r\n e.printStackTrace();\r\n }\r\n }", "protected Response login() {\n return login(\"\");\n }", "public void login() throws AccountException {\n System.out.println(\"----------------- Login -----------------\");\n System.out.print(\"Account: \");\n String acc = this.checkEmpty(\"Account\"); // Call method to check input of acc\n System.out.print(\"Password: \");\n String pass = this.checkEmpty(\"Password\"); // Call method to check input of pass\n\n // Check status of login\n boolean isLogin = this.login(acc, pass);\n\n if (isLogin) {\n // Show change password if user login success\n System.out.println(\"------------ Wellcome -----------\");\n System.out.print(\"Hi \" + acc + \", do you want change password now? Y/N: \");\n boolean isContinune = true;\n\n while (isContinune) {\n // Get y or n from user\n String op = scanner.nextLine();\n switch (op.toUpperCase()) {\n case \"Y\": // If y to check password\n this.changPass(acc); // Call method to change password\n isContinune = false; // End loop\n break;\n case \"N\": // Don't change password\n System.out.println(\"Don't change!\");\n isContinune = false; // End loop\n break;\n default: // Print error if not choice y or n\n System.out.println(\"You must choose 'Y' or 'N'!\");\n System.out.print(\"Try again: \"); // Retype\n break;\n }\n }\n } else {\n // Print out error if account or password incorrect\n System.out.println(\"Your account or password incorrect!\");\n }\n }", "private void attemptLogin() {\n final UserManager um = new UserManager();\n final String userName = userText.getText().toString();\n final String userPass = passwordText.getText().toString();\n final User attemptUser = um.login(userName, userPass);\n if (attemptUser != null) {\n SessionState.getInstance().startSession(attemptUser,\n getApplicationContext());\n resetFields();\n switch (attemptUser.getUserStatus()) {\n case USER:\n startBMS();\n break;\n case ADMIN:\n startAdmin();\n break;\n case BANNED:\n Toast.makeText(LoginActivity.this, \"Sorry, this user is \" +\n \"currently banned\", Toast\n .LENGTH_SHORT).show();\n break;\n case LOCKED:\n Toast.makeText(LoginActivity.this, \"Sorry, this user is \" +\n \"currently locked\", Toast\n .LENGTH_SHORT).show();\n break;\n\n }\n } else {\n if (!um.userExists(userName)) {\n userText.setError(\"Invalid Username\");\n } else {\n passwordText.setError(\"Invalid Password\");\n loginAttempts++;\n if (loginAttempts >= LOCK_ATTEMPTS) {\n final User attemptedUser = um.findUserById(userName);\n attemptedUser.setUserStatus(User.UserStatus.LOCKED);\n um.updateUser(attemptedUser);\n Toast.makeText(LoginActivity.this, \"Account locked: \" +\n \"too many attempts\", Toast\n .LENGTH_SHORT).show();\n }\n }\n }\n }", "@Override\n protected Boolean doInBackground(Void... params) {\n\n System.out.println(\"Attempting login\");\n\n ProgressDialogHandler.shared.login(ID_LOGIN_ACTIVITY, LoginActivity.this, mEmail.contains(\"@\") ? \"email\" : \"username\", mEmail, mPassword);\n\n // TODO: register the new account here.\n return true;\n }", "@Override\r\n\tpublic Account login(Account account) {\n\t\treturn accountMapper.login(account);\r\n\t}", "public void tryLogin() {\n\t\tcontroller.setupClient(txtNickname.getText());\n\t\tString cardDesign = comboBoxCardDesign.getSelectionModel()\n\t\t\t\t.getSelectedItem();\n\t\tConfiguration.chooseCardDesign(cardDesign);\n\t\tConfiguration.chooseMeepleDesign(cardDesign);\n\t}", "private int logIn()\r\n\t{\r\n\t\tScanner input = new Scanner(System.in);\r\n\t\tString username;\r\n\t\tString password;\r\n\t\tint index;\r\n\t\t\r\n\t\t//prompt user for username and password\r\n\t\tSystem.out.println(\"Enter your username\");\r\n\t\tusername = input.nextLine();\r\n\t\tSystem.out.println(\"Enter your password\");\r\n\t\tpassword = input.nextLine();\r\n\t\t\r\n\t\tindex = checkUserExists(username);\t\t\t\t\t\t\t\t\t//get the index of the username so we can find the password\r\n\t\tif (index == -1 || !userAccounts[1][index].equals(password))\t\t//username or password is incorrect\r\n\t\t{\r\n\t\t\tSystem.out.println(\"\\nIncorrect Username/Password\");\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tSystem.out.println(\"Login Successful\");\r\n\t\treturn 1;\r\n\t}", "public void authenticate(View view) {\n String email = email_tf.getText().toString();\n String password = password_tf.getText().toString();\n\n // validating if email and password has been entered in the required data fields\n if (!validateInputs(email, password))\n return;\n\n Log.d(TAG, \"loginAccount:\" + email);\n\n // creating instance of prompt for showing prompts to user\n final Prompt prompt = new Prompt(this);\n\n // prompt user for login in\n prompt.showProgress(\"Sign In\", \"Login in...\");\n\n // authenticating email and password\n FirebaseController.getAuthInstance().signInWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n prompt.hideProgress();\n\n // if login was successful\n if (task.isSuccessful()) {\n Log.d(TAG, \"loginWithEmail:success\");\n\n // show short wait prompt for login successful\n prompt.showSuccessMessagePrompt(\"Login successful\");\n SASTools.wait(SASConstants.PROMPT_DISPLAY_WAIT_SHORT, new Runnable() {\n @Override\n public void run() {\n prompt.hidePrompt();\n\n // starting main activity\n startActivity(new Intent(EmailLoginActivity.this, MainActivity.class)\n .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK));\n\n // finishing this email login activity\n EmailLoginActivity.this.finish();\n }\n }\n );\n }\n\n // if login was not successful\n else {\n Log.w(TAG, \"loginWithEmail:failure\", task.getException());\n\n // show long wait prompt to user about login failure and provide the reason\n prompt.showFailureMessagePrompt(\"Login not successful\\n\" + Objects.requireNonNull(task.getException()).getMessage());\n SASTools.wait(SASConstants.PROMPT_DISPLAY_WAIT_LONG, new Runnable() {\n @Override\n public void run() {\n prompt.hidePrompt();\n }\n });\n }\n }\n });\n }", "public void login(View v) {\n if (validateLogin()) {\n attemptLogin();\n }\n }" ]
[ "0.7640498", "0.73639", "0.7295943", "0.72543454", "0.71835667", "0.71796256", "0.7117505", "0.7117505", "0.7116126", "0.7107617", "0.71063006", "0.7105825", "0.7103685", "0.70957756", "0.70830095", "0.7078655", "0.70479286", "0.7044247", "0.70273155", "0.6994478", "0.697292", "0.69671124", "0.69619995", "0.6954469", "0.69464636", "0.6927315", "0.68886614", "0.6871591", "0.6865242", "0.68619746", "0.68193936", "0.68103576", "0.67948854", "0.6775098", "0.67560965", "0.6749282", "0.6743531", "0.6696289", "0.66707534", "0.66083604", "0.6606284", "0.6602484", "0.6561724", "0.65284723", "0.6524808", "0.65235627", "0.6468604", "0.6459861", "0.644497", "0.64414", "0.6432275", "0.6373634", "0.63665736", "0.6343407", "0.6328447", "0.6321778", "0.6309165", "0.63028777", "0.6263158", "0.62523776", "0.62518156", "0.62445533", "0.6239886", "0.62298906", "0.6213176", "0.62018776", "0.6186031", "0.6185031", "0.6155205", "0.6133414", "0.60787386", "0.6074985", "0.60744065", "0.6046422", "0.60417295", "0.6020377", "0.5990083", "0.5977781", "0.59751654", "0.5968853", "0.5968246", "0.59659153", "0.59581125", "0.59510833", "0.59418225", "0.59311616", "0.59268975", "0.59115016", "0.5910406", "0.59040076", "0.5890867", "0.5889822", "0.58752084", "0.58699185", "0.5867583", "0.5866049", "0.5865453", "0.5854462", "0.58350635", "0.5834828" ]
0.68810403
27
Shows the progress UI and hides the login form.
@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2) private void showProgress(final boolean show) { // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow for very easy animations. // If available, use these APIs to fade-in the progress spinner. if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) { int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime); mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE); mLoginFormView.animate().setDuration(shortAnimTime).alpha( show ? 0 : 1).setListener(new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE); } }); mProgressView.setVisibility(show ? View.VISIBLE : View.GONE); mProgressView.animate().setDuration(shortAnimTime).alpha( show ? 1 : 0).setListener(new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { mProgressView.setVisibility(show ? View.VISIBLE : View.GONE); } }); } else { // The ViewPropertyAnimator APIs are not available, so simply show // and hide the relevant UI components. mProgressView.setVisibility(show ? View.VISIBLE : View.GONE); mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override public void showLoginForm() {\n LoginViewState vs = (LoginViewState) viewState;\n vs.setShowLoginForm();\n\n errorView.setVisibility(View.GONE);\n\n setFormEnabled(true);\n //loginButton.setLoading(false);\n }", "private void displayProgressDialog() {\n pDialog.setMessage(\"Logging In.. Please wait...\");\n pDialog.setIndeterminate(false);\n pDialog.setCancelable(false);\n pDialog.show();\n }", "private void displayProgressDialog() {\n pDialog.setMessage(\"Logging in.. Please wait...\");\n pDialog.setIndeterminate(false);\n pDialog.setCancelable(false);\n pDialog.show();\n\n }", "private void showLogin() {\n \t\tLogin.actionHandleLogin(this);\n \t}", "@Override public void showLoading() {\n LoginViewState vs = (LoginViewState) viewState;\n vs.setShowLoading();\n\n errorView.setVisibility(View.GONE);\n setFormEnabled(false);\n }", "private void showLoginScreen()\n {\n logIngEditText.setVisibility(View.VISIBLE);\n passwordEditText.setVisibility(View.VISIBLE);\n loginButton.setVisibility(View.VISIBLE);\n textViewLabel.setVisibility(View.VISIBLE);\n }", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n private void showLoginProgress(final boolean show) {\n // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow\n // for very easy animations. If available, use these APIs to fade-in\n // the progress spinner.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\n int shortAnimTime = getResources().getInteger(\n android.R.integer.config_shortAnimTime);\n\n mLoginStatusView.setBackground(new BitmapDrawable(getResources(),\n ImageUtils.decodeSampledBitmapFromResource(getResources(),\n R.drawable.end_form_1280x768, screenWidth, screenHeight)\n ));\n\n mLoginStatusView.setVisibility(View.VISIBLE);\n mLoginStatusView.animate().setDuration(shortAnimTime)\n .alpha(show ? 1 : 0)\n .setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mLoginStatusView.setVisibility(show ? View.VISIBLE\n : View.GONE);\n }\n });\n\n mFinishGameView.setVisibility(View.VISIBLE);\n mFinishGameView.animate().setDuration(shortAnimTime)\n .alpha(show ? 0 : 1)\n .setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mFinishGameView.setVisibility(show ? View.GONE\n : View.VISIBLE);\n }\n });\n } else {\n // The ViewPropertyAnimator APIs are not available, so simply show\n // and hide the relevant UI components.\n mLoginStatusView.setVisibility(show ? View.VISIBLE : View.GONE);\n mFinishGameView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n }", "public static void HideLoginScreen() {\n Login.window.setVisible(false);\n ControlPanelFrameHandler.bar.setVisible(true);\n }", "private void showProgress(final boolean show) {\n //hide the relevant UI components.\n binding.loginProgress.setVisibility(show ? View.VISIBLE : View.GONE);\n binding.emailLoginForm.setVisibility(show ? View.GONE : View.VISIBLE);\n }", "private void hideLoginScreen()\n {\n logIngEditText.setVisibility(View.INVISIBLE);\n passwordEditText.setVisibility(View.INVISIBLE);\n loginButton.setVisibility(View.INVISIBLE);\n textViewLabel.setVisibility(View.INVISIBLE);\n }", "@TargetApi( Build.VERSION_CODES.HONEYCOMB_MR2 )\n private void showProgress( final boolean show )\n {\n // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow\n // for very easy animations. If available, use these APIs to fade-in\n // the progress spinner.\n if ( Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2 )\n {\n int shortAnimTime =\n getResources().getInteger(\n android.R.integer.config_shortAnimTime );\n\n mLoginStatusView.setVisibility( View.VISIBLE );\n mLoginStatusView.animate()\n .setDuration( shortAnimTime )\n .alpha( show ? 1 : 0 )\n .setListener( new AnimatorListenerAdapter()\n {\n @Override\n public void onAnimationEnd( Animator animation )\n {\n mLoginStatusView.setVisibility( show\n ? View.VISIBLE : View.GONE );\n }\n } );\n\n mLoginFormView.setVisibility( View.VISIBLE );\n mLoginFormView.animate()\n .setDuration( shortAnimTime )\n .alpha( show ? 0 : 1 )\n .setListener( new AnimatorListenerAdapter()\n {\n @Override\n public void onAnimationEnd( Animator animation )\n {\n mLoginFormView.setVisibility( show ? View.GONE\n : View.VISIBLE );\n }\n } );\n }\n else\n {\n // The ViewPropertyAnimator APIs are not available, so simply show\n // and hide the relevant UI components.\n mLoginStatusView.setVisibility( show ? View.VISIBLE : View.GONE );\n mLoginFormView.setVisibility( show ? View.GONE : View.VISIBLE );\n }\n }", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n private void showProgress(final boolean show) {\n // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow\n // for very easy animations. If available, use these APIs to fade-in\n // the progress spinner.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\n\n viewLoginForm.setVisibility(show ? View.GONE : View.VISIBLE);\n viewLoginForm.animate().setDuration(shortAnimTime).alpha(\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n viewLoginForm.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n });\n\n viewLoginProgress.setVisibility(show ? View.VISIBLE : View.GONE);\n viewLoginProgress.animate().setDuration(shortAnimTime).alpha(\n show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n viewLoginProgress.setVisibility(show ? View.VISIBLE : View.GONE);\n }\n });\n } else {\n // The ViewPropertyAnimator APIs are not available, so simply show\n // and hide the relevant UI components.\n viewLoginProgress.setVisibility(show ? View.VISIBLE : View.GONE);\n viewLoginForm.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n }", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n private void showProgress(final boolean show) {\n // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow\n // for very easy animations. If available, use these APIs to fade-in\n // the progress spinner.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\n\n mLoginStatusView.setVisibility(View.VISIBLE);\n mLoginStatusView.animate()\n .setDuration(shortAnimTime)\n .alpha(show ? 1 : 0)\n .setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mLoginStatusView.setVisibility(show ? View.VISIBLE : View.GONE);\n }\n });\n\n mLoginFormView.setVisibility(View.VISIBLE);\n mLoginFormView.animate()\n .setDuration(shortAnimTime)\n .alpha(show ? 0 : 1)\n .setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n });\n } else {\n // The ViewPropertyAnimator APIs are not available, so simply show\n // and hide the relevant UI components.\n mLoginStatusView.setVisibility(show ? View.VISIBLE : View.GONE);\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n }", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n\tprivate void showProgress(final boolean show) {\n\t\t// On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow\n\t\t// for very easy animations. If available, use these APIs to fade-in\n\t\t// the progress spinner.\n\t\tif (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\n\t\t\tint shortAnimTime = getResources().getInteger(\n\t\t\t\t\tandroid.R.integer.config_shortAnimTime);\n\n\t\t\tmLoginStatusView.setVisibility(View.VISIBLE);\n\t\t\tmLoginStatusView.animate().setDuration(shortAnimTime)\n\t\t\t\t\t.alpha(show ? 1 : 0)\n\t\t\t\t\t.setListener(new AnimatorListenerAdapter() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onAnimationEnd(Animator animation) {\n\t\t\t\t\t\t\tmLoginStatusView.setVisibility(show ? View.VISIBLE\n\t\t\t\t\t\t\t\t\t: View.GONE);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\tmLoginFormView.setVisibility(View.VISIBLE);\n\t\t\tmLoginFormView.animate().setDuration(shortAnimTime)\n\t\t\t\t\t.alpha(show ? 0 : 1)\n\t\t\t\t\t.setListener(new AnimatorListenerAdapter() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onAnimationEnd(Animator animation) {\n\t\t\t\t\t\t\tmLoginFormView.setVisibility(show ? View.GONE\n\t\t\t\t\t\t\t\t\t: View.VISIBLE);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t} else {\n\t\t\t// The ViewPropertyAnimator APIs are not available, so simply show\n\t\t\t// and hide the relevant UI components.\n\t\t\tmLoginStatusView.setVisibility(show ? View.VISIBLE : View.GONE);\n\t\t\tmLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n\t\t}\n\t}", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n private void showProgress(final boolean show) {\n // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow\n // for very easy animations. If available, use these APIs to fade-in\n // the progress spinner.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\n\n loginSV.setVisibility(show ? View.GONE : View.VISIBLE);\n loginSV.animate().setDuration(shortAnimTime).alpha(\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n loginSV.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n });\n\n loginPB.setVisibility(show ? View.VISIBLE : View.GONE);\n loginPB.animate().setDuration(shortAnimTime).alpha(\n show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n loginPB.setVisibility(show ? View.VISIBLE : View.GONE);\n }\n });\n } else {\n // The ViewPropertyAnimator APIs are not available, so simply show\n // and hide the relevant UI components.\n loginPB.setVisibility(show ? View.VISIBLE : View.GONE);\n loginSV.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n }", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n private void showProgress(final boolean show) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\n\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n mLoginFormView.animate().setDuration(shortAnimTime).alpha(\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n });\n\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mProgressView.animate().setDuration(shortAnimTime).alpha(\n show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n }\n });\n } else {\n // The ViewPropertyAnimator APIs are not available, so simply show\n // and hide the relevant UI components.\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n }", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\r\n private void showProgress(final boolean show) {\r\n // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow\r\n // for very easy animations. If available, use these APIs to fade-in\r\n // the progress spinner.\r\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\r\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\r\n\r\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\r\n mLoginFormView.animate().setDuration(shortAnimTime).alpha(\r\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\r\n @Override\r\n public void onAnimationEnd(Animator animation) {\r\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\r\n }\r\n });\r\n\r\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\r\n mProgressView.animate().setDuration(shortAnimTime).alpha(\r\n show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\r\n @Override\r\n public void onAnimationEnd(Animator animation) {\r\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\r\n }\r\n });\r\n } else {\r\n // The ViewPropertyAnimator APIs are not available, so simply show\r\n // and hide the relevant UI components.\r\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\r\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\r\n }\r\n }", "@Override\n public void onLoginClicked(String username, String password) {\n loginView.showProgress();\n loginInteractor.authorize(username, password, this);\n }", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\r\n private void showProgress(final boolean show) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\r\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\r\n\r\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\r\n mLoginFormView.animate().setDuration(shortAnimTime).alpha(\r\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\r\n @Override\r\n public void onAnimationEnd(Animator animation) {\r\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\r\n }\r\n });\r\n\r\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\r\n mProgressView.animate().setDuration(shortAnimTime).alpha(\r\n show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\r\n @Override\r\n public void onAnimationEnd(Animator animation) {\r\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\r\n }\r\n });\r\n\r\n tvLoad.setVisibility(show ? View.VISIBLE : View.GONE);\r\n tvLoad.animate().setDuration(shortAnimTime).alpha(\r\n show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\r\n @Override\r\n public void onAnimationEnd(Animator animation) {\r\n tvLoad.setVisibility(show ? View.VISIBLE : View.GONE);\r\n }\r\n });\r\n } else {\r\n // The ViewPropertyAnimator APIs are not available, so simply show\r\n // and hide the relevant UI components.\r\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\r\n tvLoad.setVisibility(show ? View.VISIBLE : View.GONE);\r\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\r\n }\r\n\r\n\r\n\r\n }", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n private void showProgress(final boolean show) {\n // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow\n // for very easy animations. If available, use these APIs to fade-in\n // the progress spinner.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\n\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n mLoginFormView.animate().setDuration(shortAnimTime).alpha(\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n });\n\n /*\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mProgressView.animate().setDuration(shortAnimTime).alpha(\n show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n }\n });\n */\n\n } else {\n // The ViewPropertyAnimator APIs are not available, so simply show\n // and hide the relevant UI components.\n // mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n }", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n private void showProgress(final boolean show) {\n // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow\n // for very easy animations. If available, use these APIs to fade-in\n // the progress spinner.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\n\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n mLoginFormView.animate().setDuration(shortAnimTime).alpha(\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n });\n\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mProgressView.animate().setDuration(shortAnimTime).alpha(\n show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n }\n });\n } else {\n // The ViewPropertyAnimator APIs are not available, so simply show\n // and hide the relevant UI components.\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n }", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n private void showProgress(final boolean show) {\n // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow\n // for very easy animations. If available, use these APIs to fade-in\n // the progress spinner.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\n\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n mLoginFormView.animate().setDuration(shortAnimTime).alpha(\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n });\n\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mProgressView.animate().setDuration(shortAnimTime).alpha(\n show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n }\n });\n } else {\n // The ViewPropertyAnimator APIs are not available, so simply show\n // and hide the relevant UI components.\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n }", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n private void showProgress(final boolean show) {\n // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow\n // for very easy animations. If available, use these APIs to fade-in\n // the progress spinner.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\n\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n mLoginFormView.animate().setDuration(shortAnimTime).alpha(\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n });\n\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mProgressView.animate().setDuration(shortAnimTime).alpha(\n show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n }\n });\n } else {\n // The ViewPropertyAnimator APIs are not available, so simply show\n // and hide the relevant UI components.\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n }", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n private void showProgress(final boolean show) {\n // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow\n // for very easy animations. If available, use these APIs to fade-in\n // the progress spinner.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\n\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n mLoginFormView.animate().setDuration(shortAnimTime).alpha(\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n });\n\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mProgressView.animate().setDuration(shortAnimTime).alpha(\n show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n }\n });\n } else {\n // The ViewPropertyAnimator APIs are not available, so simply show\n // and hide the relevant UI components.\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n }", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n private void showProgress(final boolean show) {\n // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow\n // for very easy animations. If available, use these APIs to fade-in\n // the progress spinner.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\n\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n mLoginFormView.animate().setDuration(shortAnimTime).alpha(\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n });\n\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mProgressView.animate().setDuration(shortAnimTime).alpha(\n show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n }\n });\n } else {\n // The ViewPropertyAnimator APIs are not available, so simply show\n // and hide the relevant UI components.\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n }", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n private void showProgress(final boolean show) {\n // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow\n // for very easy animations. If available, use these APIs to fade-in\n // the progress spinner.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\n\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n mLoginFormView.animate().setDuration(shortAnimTime).alpha(\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n });\n\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mProgressView.animate().setDuration(shortAnimTime).alpha(\n show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n }\n });\n } else {\n // The ViewPropertyAnimator APIs are not available, so simply show\n // and hide the relevant UI components.\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n }", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n private void showProgress(final boolean show) {\n // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow\n // for very easy animations. If available, use these APIs to fade-in\n // the progress spinner.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\n\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n mLoginFormView.animate().setDuration(shortAnimTime).alpha(\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n });\n\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mProgressView.animate().setDuration(shortAnimTime).alpha(\n show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n }\n });\n } else {\n // The ViewPropertyAnimator APIs are not available, so simply show\n // and hide the relevant UI components.\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n }", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n private void showProgress(final boolean show) {\n // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow\n // for very easy animations. If available, use these APIs to fade-in\n // the progress spinner.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\n\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n mLoginFormView.animate().setDuration(shortAnimTime).alpha(\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n });\n\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mProgressView.animate().setDuration(shortAnimTime).alpha(\n show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n }\n });\n } else {\n // The ViewPropertyAnimator APIs are not available, so simply show\n // and hide the relevant UI components.\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n }", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n private void showProgress(final boolean show) {\n // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow\n // for very easy animations. If available, use these APIs to fade-in\n // the progress spinner.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\n\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n mLoginFormView.animate().setDuration(shortAnimTime).alpha(\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n });\n\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mProgressView.animate().setDuration(shortAnimTime).alpha(\n show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n }\n });\n } else {\n // The ViewPropertyAnimator APIs are not available, so simply show\n // and hide the relevant UI components.\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n }", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n private void showProgress(final boolean show) {\n // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow\n // for very easy animations. If available, use these APIs to fade-in\n // the progress spinner.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\n\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n mLoginFormView.animate().setDuration(shortAnimTime).alpha(\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n });\n\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mProgressView.animate().setDuration(shortAnimTime).alpha(\n show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n }\n });\n } else {\n // The ViewPropertyAnimator APIs are not available, so simply show\n // and hide the relevant UI components.\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n }", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n private void showProgress(final boolean show) {\n // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow\n // for very easy animations. If available, use these APIs to fade-in\n // the progress spinner.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\n\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n mLoginFormView.animate().setDuration(shortAnimTime).alpha(\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n });\n\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mProgressView.animate().setDuration(shortAnimTime).alpha(\n show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n }\n });\n } else {\n // The ViewPropertyAnimator APIs are not available, so simply show\n // and hide the relevant UI components.\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n }", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n private void showProgress(final boolean show) {\n // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow\n // for very easy animations. If available, use these APIs to fade-in\n // the progress spinner.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\n\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n mLoginFormView.animate().setDuration(shortAnimTime).alpha(\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n });\n\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mProgressView.animate().setDuration(shortAnimTime).alpha(\n show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n }\n });\n } else {\n // The ViewPropertyAnimator APIs are not available, so simply show\n // and hide the relevant UI components.\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n }", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n private void showProgress(final boolean show) {\n // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow\n // for very easy animations. If available, use these APIs to fade-in\n // the progress spinner.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\n\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n mLoginFormView.animate().setDuration(shortAnimTime).alpha(\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n });\n\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mProgressView.animate().setDuration(shortAnimTime).alpha(\n show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n }\n });\n } else {\n // The ViewPropertyAnimator APIs are not available, so simply show\n // and hide the relevant UI components.\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n }", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n private void showProgress(final boolean show) {\n // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow\n // for very easy animations. If available, use these APIs to fade-in\n // the progress spinner.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\n\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n mLoginFormView.animate().setDuration(shortAnimTime).alpha(\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n });\n\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mProgressView.animate().setDuration(shortAnimTime).alpha(\n show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n }\n });\n } else {\n // The ViewPropertyAnimator APIs are not available, so simply show\n // and hide the relevant UI components.\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n }", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n private void showProgress(final boolean show) {\n // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow\n // for very easy animations. If available, use these APIs to fade-in\n // the progress spinner.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\n\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n mLoginFormView.animate().setDuration(shortAnimTime).alpha(\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n });\n\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mProgressView.animate().setDuration(shortAnimTime).alpha(\n show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n }\n });\n } else {\n // The ViewPropertyAnimator APIs are not available, so simply show\n // and hide the relevant UI components.\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n }", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n private void showProgress(final boolean show) {\n // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow\n // for very easy animations. If available, use these APIs to fade-in\n // the progress spinner.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\n\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n mLoginFormView.animate().setDuration(shortAnimTime).alpha(\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n });\n\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mProgressView.animate().setDuration(shortAnimTime).alpha(\n show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n }\n });\n } else {\n // The ViewPropertyAnimator APIs are not available, so simply show\n // and hide the relevant UI components.\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n }", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n private void showProgress(final boolean show) {\n // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow\n // for very easy animations. If available, use these APIs to fade-in\n // the progress spinner.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\n\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n mLoginFormView.animate().setDuration(shortAnimTime).alpha(\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n });\n\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mProgressView.animate().setDuration(shortAnimTime).alpha(\n show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n }\n });\n } else {\n // The ViewPropertyAnimator APIs are not available, so simply show\n // and hide the relevant UI components.\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n }", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n private void showProgress(final boolean show) {\n // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow\n // for very easy animations. If available, use these APIs to fade-in\n // the progress spinner.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\n\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n mLoginFormView.animate().setDuration(shortAnimTime).alpha(\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n });\n\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mProgressView.animate().setDuration(shortAnimTime).alpha(\n show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n }\n });\n } else {\n // The ViewPropertyAnimator APIs are not available, so simply show\n // and hide the relevant UI components.\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n }", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n private void showProgress(final boolean show) {\n // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow\n // for very easy animations. If available, use these APIs to fade-in\n // the progress spinner.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\n\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n mLoginFormView.animate().setDuration(shortAnimTime).alpha(\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n });\n\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mProgressView.animate().setDuration(shortAnimTime).alpha(\n show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n }\n });\n } else {\n // The ViewPropertyAnimator APIs are not available, so simply show\n // and hide the relevant UI components.\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n }", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n private void showProgress(final boolean show) {\n // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow\n // for very easy animations. If available, use these APIs to fade-in\n // the progress spinner.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\n\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n mLoginFormView.animate().setDuration(shortAnimTime).alpha(\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n });\n\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mProgressView.animate().setDuration(shortAnimTime).alpha(\n show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n }\n });\n } else {\n // The ViewPropertyAnimator APIs are not available, so simply show\n // and hide the relevant UI components.\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n }", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n private void showProgress(final boolean show) {\n // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow\n // for very easy animations. If available, use these APIs to fade-in\n // the progress spinner.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\n\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n mLoginFormView.animate().setDuration(shortAnimTime).alpha(\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n });\n\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mProgressView.animate().setDuration(shortAnimTime).alpha(\n show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n }\n });\n } else {\n // The ViewPropertyAnimator APIs are not available, so simply show\n // and hide the relevant UI components.\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n }", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n private void showProgress(final boolean show) {\n // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow\n // for very easy animations. If available, use these APIs to fade-in\n // the progress spinner.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\n\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n mLoginFormView.animate().setDuration(shortAnimTime).alpha(\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n });\n\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mProgressView.animate().setDuration(shortAnimTime).alpha(\n show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n }\n });\n } else {\n // The ViewPropertyAnimator APIs are not available, so simply show\n // and hide the relevant UI components.\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n }", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n private void showProgress(final boolean show) {\n // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow\n // for very easy animations. If available, use these APIs to fade-in\n // the progress spinner.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\n\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n mLoginFormView.animate().setDuration(shortAnimTime).alpha(\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n });\n\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mProgressView.animate().setDuration(shortAnimTime).alpha(\n show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n }\n });\n } else {\n // The ViewPropertyAnimator APIs are not available, so simply show\n // and hide the relevant UI components.\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n }", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n private void showProgress(final boolean show) {\n // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow\n // for very easy animations. If available, use these APIs to fade-in\n // the progress spinner.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\n\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n mLoginFormView.animate().setDuration(shortAnimTime).alpha(\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n });\n\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mProgressView.animate().setDuration(shortAnimTime).alpha(\n show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n }\n });\n } else {\n // The ViewPropertyAnimator APIs are not available, so simply show\n // and hide the relevant UI components.\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n }", "public Login() {\n initComponents();\n lblstar.setVisible(false); // hide the red star that indicates that the user didnt fill in a form\n lblstar1.setVisible(false);\n }", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\r\n private void showProgress(final boolean show) {\r\n // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow\r\n // for very easy animations. If available, use these APIs to fade-in\r\n // the progress spinner.\r\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\r\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\r\n\r\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\r\n mLoginFormView.animate().setDuration(shortAnimTime).alpha(\r\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\r\n @Override\r\n public void onAnimationEnd(Animator animation) {\r\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\r\n }\r\n });\r\n\r\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\r\n mProgressView.animate().setDuration(shortAnimTime).alpha(\r\n show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\r\n @Override\r\n public void onAnimationEnd(Animator animation) {\r\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\r\n }\r\n });\r\n\r\n tvLoad.setVisibility(show ? View.VISIBLE : View.GONE);\r\n tvLoad.animate().setDuration(shortAnimTime).alpha(\r\n show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\r\n @Override\r\n public void onAnimationEnd(Animator animation) {\r\n tvLoad.setVisibility(show ? View.VISIBLE : View.GONE);\r\n }\r\n });\r\n } else {\r\n // The ViewPropertyAnimator APIs are not available, so simply show\r\n // and hide the relevant UI components.\r\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\r\n tvLoad.setVisibility(show ? View.VISIBLE : View.GONE);\r\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\r\n }\r\n }", "private void showProgress(final boolean show) {\r\n mProgressView.setIndeterminate(true);\r\n mProgressView.setCancelable(false);\r\n mProgressView.setMessage(\"Authenticating...\");\r\n\r\n if (show)\r\n mProgressView.show();\r\n else if (!show && mProgressView.isShowing())\r\n mProgressView.dismiss();\r\n }", "@Override\n public void enableProgressBar() {\n et_log_email.setEnabled(false);\n et_log_password.setEnabled(false);\n acb_login.setVisibility(View.GONE);\n acb_register.setVisibility(View.GONE);\n\n //Enable progressbar\n pb_login.setVisibility(View.VISIBLE);\n }", "public static void showLogin() throws IOException {\n Main.FxmlLoader(LOGINPAGE_PATH);\n }", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n private void showProgress(final boolean show) {\n // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow\n // for very easy animations. If available, use these APIs to fade-in\n // the progress spinner.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\n\n loginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n loginFormView.animate().setDuration(shortAnimTime).alpha(\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n loginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n });\n\n progressView.setVisibility(show ? View.VISIBLE : View.GONE);\n progressView.animate().setDuration(shortAnimTime).alpha(\n show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n progressView.setVisibility(show ? View.VISIBLE : View.GONE);\n }\n });\n } else {\n // The ViewPropertyAnimator APIs are not available, so simply show\n // and hide the relevant UI components.\n progressView.setVisibility(show ? View.VISIBLE : View.GONE);\n loginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n }", "private void showProgress(String taskName,String processString)\n {\n mProgressView = ProgressDialog.show(this, taskName, processString, true);\n mLoginFormView.setVisibility(View.INVISIBLE);\n\n }", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\r\n private void showProgress(final boolean show) {\r\n // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow\r\n // for very easy animations. If available, use these APIs to fade-in\r\n // the progress spinner.\r\n\r\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\r\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\r\n\r\n mRaspberryLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\r\n mRaspberryLoginFormView.animate().setDuration(shortAnimTime).alpha(\r\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\r\n @Override\r\n public void onAnimationEnd(Animator animation) {\r\n mRaspberryLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\r\n }\r\n });\r\n\r\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\r\n mCancelButton.setVisibility(show ? View.VISIBLE : View.GONE);\r\n mProgressView.animate().setDuration(shortAnimTime).alpha(\r\n show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\r\n @Override\r\n public void onAnimationEnd(Animator animation) {\r\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\r\n }\r\n });\r\n } else {\r\n // The ViewPropertyAnimator APIs are not available, so simply show\r\n // and hide the relevant UI components.\r\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\r\n mCancelButton.setVisibility(show ? View.VISIBLE : View.GONE);\r\n mRaspberryLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\r\n }\r\n }", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n private void showProgress(final boolean show) {\n // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow\n // for very easy animations. If available, use these APIs to fade-in\n // the progress spinner.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\n\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n mLoginFormView.animate().setDuration(shortAnimTime).alpha(\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n });\n\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mProgressView.animate().setDuration(shortAnimTime).alpha(\n show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n }\n });\n\n tvLoad.setVisibility(show ? View.VISIBLE : View.GONE);\n tvLoad.animate().setDuration(shortAnimTime).alpha(\n show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n tvLoad.setVisibility(show ? View.VISIBLE : View.GONE);\n }\n });\n } else {\n // The ViewPropertyAnimator APIs are not available, so simply show\n // and hide the relevant UI components.\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n tvLoad.setVisibility(show ? View.VISIBLE : View.GONE);\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n }", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n private void showProgress(final boolean show) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\n\n /*mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n mLoginFormView.animate().setDuration(shortAnimTime).alpha(\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n });*/\n\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mProgressView.animate().setDuration(shortAnimTime).alpha(\n show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n }\n });\n } else {\n // The ViewPropertyAnimator APIs are not available, so simply show\n // and hide the relevant UI components.\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n //mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n }", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n private void showProgress(final boolean show) {\n // Honeycomb APIs allow for easier animations. Used to fade the progress spinner.\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\n\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n mLoginFormView.animate().setDuration(shortAnimTime).alpha(\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n });\n\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mProgressView.animate().setDuration(shortAnimTime).alpha(\n show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n }\n });\n }", "public T01Login() {\n initComponents();\n btnMenu.setVisible(false);\n }", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n private void showProgress(final boolean show) {\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\n\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n mLoginFormView.animate().setDuration(shortAnimTime).alpha(\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n });\n\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mProgressView.animate().setDuration(shortAnimTime).alpha(\n show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n }\n });\n }", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\r\n public void showProgress(final boolean show) {\r\n // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow\r\n // for very easy animations. If available, use these APIs to fade-in\r\n // the progress spinner.\r\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\r\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\r\n\r\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\r\n mLoginFormView.animate().setDuration(shortAnimTime).alpha(\r\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\r\n @Override\r\n public void onAnimationEnd(Animator animation) {\r\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\r\n }\r\n });\r\n\r\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\r\n mProgressView.animate().setDuration(shortAnimTime).alpha(\r\n show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\r\n @Override\r\n public void onAnimationEnd(Animator animation) {\r\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\r\n }\r\n });\r\n } else {\r\n // The ViewPropertyAnimator APIs are not available, so simply show\r\n // and hide the relevant UI components.\r\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\r\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\r\n }\r\n }", "public void switchToLogin() {\r\n\t\tlayout.show(this, \"loginPane\");\r\n\t\tloginPane.resetPassFields();\r\n\t\trevalidate();\r\n\t\trepaint();\r\n\t}", "public Login() {\n initComponents();\n setDefaultCloseOperation(HIDE_ON_CLOSE);\n }", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n\tprivate void showProgress(final boolean show) {\n\t\t// On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow\n\t\t// for very easy animations. If available, use these APIs to fade-in\n\t\t// the progress spinner.\n\n\t\tif (show) {\n\t\t\tLinearLayout loginProgress = (LinearLayout) ((LinearLayout) LayoutInflater\n\t\t\t\t\t.from(getActivity()).inflate(R.layout.login_progress,\n\t\t\t\t\t\t\tnew LinearLayout(getActivity()))).getChildAt(0);\n\t\t\tmLoginStatusView = (ProgressBar) loginProgress.getChildAt(0);\n\t\t\tmLoginStatusMessageView = (TextView) loginProgress.getChildAt(1);\n\t\t\tmLoginStatusMessageView.setText(R.string.login_progress_signing_in);\n\n\t\t\tpopup.setFocusable(true);\n\t\t\tpopup.setContentView((LinearLayout) loginProgress.getParent());\n\t\t\tpopup.showAtLocation(new View(getActivity()), Gravity.CENTER, 0, 0);\n\t\t\tpopup.update(0, 0, 100, 100);\n\t\t}\n\n\t\tif (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\n\t\t\tmLoginStatusView.animate();\n\t\t\tmLoginFormView.animate().alpha(show ? 0.5f : 1);\n\t\t}\n\t}", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n public void showProgress(final boolean show) {\n // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow\n // for very easy animations. If available, use these APIs to fade-in\n // the progress spinner.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\n\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n mLoginFormView.animate().setDuration(shortAnimTime).alpha(\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n });\n\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mProgressView.animate().setDuration(shortAnimTime).alpha(\n show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n }\n });\n } else {\n // The ViewPropertyAnimator APIs are not available, so simply show\n // and hide the relevant UI components.\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n }", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n public void showProgress(final boolean show) {\n // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow\n // for very easy animations. If available, use these APIs to fade-in\n // the progress spinner.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\n\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n mLoginFormView.animate().setDuration(shortAnimTime).alpha(\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n });\n\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mProgressView.animate().setDuration(shortAnimTime).alpha(\n show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n }\n });\n } else {\n // The ViewPropertyAnimator APIs are not available, so simply show\n // and hide the relevant UI components.\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n }", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n public void showProgress(final boolean show) {\n // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow\n // for very easy animations. If available, use these APIs to fade-in\n // the progress spinner.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\n\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n mLoginFormView.animate().setDuration(shortAnimTime).alpha(\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n });\n\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mProgressView.animate().setDuration(shortAnimTime).alpha(\n show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n }\n });\n } else {\n // The ViewPropertyAnimator APIs are not available, so simply show\n // and hide the relevant UI components.\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n }", "public void actionPerformed(ActionEvent action){\n new Login().setVisible(true);\n this.setVisible(false);\n }", "private void showIndicator() {\n mProgressBarHolder.setVisibility(View.VISIBLE);\n mEmailView.setFocusableInTouchMode(false);\n mEmailView.setFocusable(false);\n mEmailView.setEnabled(false);\n mPasswordView.setFocusableInTouchMode(false);\n mPasswordView.setFocusable(false);\n mPasswordView.setEnabled(false);\n mRegister.setEnabled(false);\n mEmailSignInButton.setEnabled(false);\n }", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n private void showProgress(final boolean show) {\n // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow\n // for very easy animations. If available, use these APIs to fade-in\n // the progress spinner.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\n\n// mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n mLoginFormView.animate().setDuration(shortAnimTime).alpha(\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n\n }\n });\n\n// mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n// mProgressView.animate().setDuration(shortAnimTime).alpha(\n// show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\n// @Override\n// public void onAnimationEnd(Animator animation) {\n// mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n// }\n// });\n } else {\n // The ViewPropertyAnimator APIs are not available, so simply show\n // and hide the relevant UI components.\n// mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n// mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n }", "public login() {\n initComponents();\n jLabel4.setIcon(null);\n jLabel4.setText(null);\n jLabel7.setVisible(false);\n setLocationRelativeTo(null);\n this.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);\n }", "@Override\n public void show()\n {\n boolean loginOK; // true if good user info was entered\n // multithreaded code does not execute properly in IDEs; true if IDE run detected\n boolean runningFromIDE = false;\n\n do // continue login process while user chooses to stay in login menu\n {\n loginOK = false;\n while(!loginOK) // do this while no good login info acquired, or user choose to bail.\n {\n System.out.println(splashStrings.LOGIN); // SPLASH WELCOME\n\n String userName = GET.getString(\"Indtast venligst bruger navn:\\n\\t|> \");\n\n char[] password;\n\n if(!runningFromIDE) // getPassword does not work in IDE\n {\n password = PasswordField.getPassword(System.in, \"Indtast venligst password:\\n\\t|> \");\n\n if(password == null)\n {\n // getPassword returns a null array reference, if no chars were captured, thus this.\n runningFromIDE = true;\n\n System.out.println(\"MELDING:\\nDet ser ud til at du kører programmet fra en IDE:\\t\" +\n \"Password masking slås fra.\" +\n \"\\nKør shorttest.jar, for at opnå den fulde bruger-oplevelse.\\n\");\n\n continue;\n }\n\n loginOK = checkCredentials(userName, new String(password));\n\n } else // option is chosen if IDE-execution detected\n {\n String passw = GET.getString(\"Indtast venligst password:\\n\\t|> \");\n loginOK = checkCredentials(userName, passw);\n }\n\n if(!loginOK) // if user input were no good, and ONLY if info were no good\n {\n System.out.println(\"De indtastede informationer fandtes ikke i systemet.\");\n if(GET.getConfirmation(\"Vil du prøve igen?\\n\\tja / nej\\n\\t|> \", \"nej\", \"ja\"))\n {\n System.out.println(\"Du valgte ikke at prøve igen, login afsluttes.\");\n break;\n }\n }\n }\n\n if(loginOK)\n {\n System.out.println(\"Login var en success. Fortsætter til første menu.\\n\");\n menuLoggedInto.show();\n }\n\n // when user returns from main menu, they get to choose if they want to log in again\n } while(GET.getConfirmation(\"Skal en anden logge ind?\\n\\t ja / nej\\n\\t|> \", \"ja\", \"nej\"));\n }", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n private void showProgress(final boolean show) {\n // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow\n // for very easy animations. If available, use these APIs to fade-in\n // the progress spinner.\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\n\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n mLoginFormView.animate().setDuration(shortAnimTime).alpha(\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n });\n\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mProgressView.animate().setDuration(shortAnimTime).alpha(\n show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n }\n });\n }", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n private void showProgress(final boolean show) {\n // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow\n // for very easy animations. If available, use these APIs to fade-in\n // the progress spinner.\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\n\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n mLoginFormView.animate().setDuration(shortAnimTime).alpha(\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n });\n\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mProgressView.animate().setDuration(shortAnimTime).alpha(\n show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n }\n });\n }", "@Override\n\t\t\t\t\tpublic void onLoginSuccess() {\n\t\t\t\t\t\tToast.makeText(TestRolateAnimActivity.this, \"登录成功\",\n\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\tloginBtn.setVisibility(View.GONE);\n\t\t\t\t\t\tlogoutBtn.setVisibility(View.VISIBLE);\n\t\t\t\t\t}", "public Login() {\n initComponents();\n txtAccountStatus.setVisible(false); \n showDate(); // Class para sa Date\n showTime(); // Class para sa Time\n }", "public LoginW() {\n this.setUndecorated(true);\n initComponents();\n origin = pnlBackG.getBackground();\n lblErrorLogin.setVisible(false);\n this.setLocationRelativeTo(null);\n Fondo();\n }", "private void initUIAfterLogin() {\n lnLoggedOutState.setVisibility(View.GONE);\n lnLoggedInState.setVisibility(View.VISIBLE);\n initUserProfileUI();\n }", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n public void showProgress(final boolean show) {\n\n Log.d(TAG, \"Setting: Show Progress\");\n // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow\n // for very easy animations. If available, use these APIs to fade-in\n // the progress spinner.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\n\n loginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n loginFormView.animate().setDuration(shortAnimTime).alpha(\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n loginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n });\n\n progressView.setVisibility(show ? View.VISIBLE : View.GONE);\n progressView.animate().setDuration(shortAnimTime).alpha(\n show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n progressView.setVisibility(show ? View.VISIBLE : View.GONE);\n }\n });\n } else {\n // The ViewPropertyAnimator APIs are not available, so simply show\n // and hide the relevant UI components.\n progressView.setVisibility(show ? View.VISIBLE : View.GONE);\n loginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n }", "public LoginUI() {\n\t\tparentFrame = Main.getMainFrame();\n\t\tparentFrame.setVisible(true);\n\n\t\tsetLayout(new BorderLayout(5, 5));\n\t\tadd(initFields(), BorderLayout.NORTH);\n\t\tadd(initButtons(), BorderLayout.CENTER);\n\t}", "public final void showLoadingIndicator(boolean z) {\n if (z) {\n ProgressBar progressBar = (ProgressBar) _$_findCachedViewById(C2723R.C2726id.pbLogin);\n if (progressBar != null) {\n progressBar.setVisibility(0);\n return;\n }\n return;\n }\n ProgressBar progressBar2 = (ProgressBar) _$_findCachedViewById(C2723R.C2726id.pbLogin);\n if (progressBar2 != null) {\n progressBar2.setVisibility(8);\n }\n }", "private void login(){\n displayPane(loginP);\n }", "@Override\n public void validateCredentials(ObjLogin objLogin, Context mContext) {\n if (loginView != null) {\n loginView.showProgress();\n loginInteractor.login(objLogin, this, mContext);\n }\n }", "private void displayLoader() {\n pDialog = new ProgressDialog(RegisterActivity.this);\n pDialog.setMessage(\"Signing Up.. Please wait...\");\n pDialog.setIndeterminate(false);\n pDialog.setCancelable(false);\n pDialog.show();\n\n }", "public pageLogin() {\n initComponents();\n labelimage.setBorder(new EmptyBorder(0,0,0,0));\n enterButton.setBorder(null);\n enterButton.setContentAreaFilled(false);\n enterButton.setVisible(true);\n usernameTextField.setText(\"Username\");\n usernameTextField.setForeground(new Color(153,153,153));\n passwordTextField.setText(\"Password\");\n passwordTextField.setForeground(new Color(153,153,153));\n usernameAlert.setText(\" \");\n passwordAlert.setText(\" \");\n \n }", "public void showLogin() {\n try {\n\n // Load person overview.\n loginController controller = new loginController(this);\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(MainApp.class.getResource(\"Login.fxml\"));\n loader.setController(controller);\n AnchorPane personOverview = (AnchorPane) loader.load();\n\n // Set person overview into the center of root layout.\n rootLayout.setCenter(personOverview);\n controller.background();\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public loginform() {\n initComponents();\n Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();\n this.setLocation(dim.width/2 - this.getWidth()/2, dim.height/2 - this.getHeight()/2);\n conn = MySql.connectDB();\n timer = new Timer(50, new MyProgressBarManager());\n }", "@Override\n public void disableProgressBar() {\n et_log_email.setEnabled(true);\n et_log_password.setEnabled(true);\n acb_login.setVisibility(View.VISIBLE);\n acb_register.setVisibility(View.VISIBLE);\n\n //Disable progressbar\n pb_login.setVisibility(View.GONE);\n }", "void goToLogin() {\n mainFrame.setPanel(panelFactory.createPanel(PanelFactoryOptions.panelNames.LOGIN));\n }", "private void intLoginPanel(){\n m_loginPanel = new JPanel();\n m_loginPanel.setLayout(new FlowLayout());\n m_userLabel = new JLabel(\"Username: \");\n m_userFeild = new JTextField(10);\n m_passLabel = new JLabel(\"Password: \");\n m_passFeild = new JPasswordField(10);\n m_login = new JButton(\"Login\");\n \n m_login.addActionListener(new ActionListener(){\n \n public void actionPerformed(ActionEvent e){\n String username = m_userFeild.getText();\n String pass = String.valueOf(m_passFeild.getPassword());\n System.out.println(\"Username: \"+username+\"\\nPassword: \"+pass);\n m_sid =CLOUD.login(pass, pass);\n if(m_sid!=null){\n m_data = CLOUD.List(m_sid);\n if(m_data!=null){\n initListPannel(convertList(m_data));\n m_passFeild.setEnabled(false);\n m_userFeild.setEnabled(false);\n m_login.setEnabled(false);\n Thread t = new expand();\n t.start();\n }\n }else{\n JOptionPane.showMessageDialog(null,\n \"Wrong Username and or password\",\n \"Login Failed\",\n JOptionPane.ERROR_MESSAGE);\n context.dispose();\n }\n \n }\n \n });\n m_loginPanel.add(m_userLabel);\n m_loginPanel.add(m_userFeild);\n m_loginPanel.add(m_passLabel);\n m_loginPanel.add(m_passFeild);\n m_loginPanel.add(m_login);\n m_loginPanel.validate();\n m_loginPanel.setOpaque(true);\n this.getContentPane().add(m_loginPanel);\n }", "@Override\n\tpublic void showProgress() {\n\t\twaitDialog(true);\n\t}", "private void showSignInBar() {\n Log.d(TAG, \"Showing sign in bar\");\n findViewById(R.id.sign_in_bar).setVisibility(View.VISIBLE);\n findViewById(R.id.sign_out_bar).setVisibility(View.GONE);\n }", "public login() {\n initComponents();\n setLocationRelativeTo(null);\n this.setDefaultCloseOperation(login.DO_NOTHING_ON_CLOSE);\n }", "void SubmitButton() {\r\n\t\tint checker = Accounts.checkUser(username.getText(), password.getText());\r\n\t\tif(checker == -1) {\r\n\t\t\tsetVisible(false);\r\n\t\t\tdispose();\r\n\t\t\tAdminScreen adminScreen = new AdminScreen();\r\n\t\t}\r\n\t\telse if(checker >= 0) {\r\n\t\t\tsetVisible(false);\r\n\t\t\tdispose();\r\n\t\t\tStudentScreen studentScreen = new StudentScreen(checker);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tJOptionPane.showMessageDialog(null, \"Error: username \"\r\n\t\t\t\t\t+ \"and/or password is incorrect.\");\r\n\t\t\tpassword.setText(\"\");\r\n\t\t\tusername.setText(\"\");\r\n\t\t}\r\n\t\t\r\n\t}", "@Override public void onNewViewStateInstance() {\n showLoginForm();\n }", "public static void login() {\n\t\trender();\n\t}", "@Override\n public void loginScreen() {\n logIn = new GUILogInScreen().getPanel();\n frame.setContentPane(logIn);\n ((JButton) logIn.getComponent(4)).addActionListener(e -> {\n setUsername();\n });\n }", "@Override\n protected void onPreExecute() {\n super.onPreExecute();\n pDialog = new ProgressDialog(loginActivity.this);\n pDialog.setMessage(\"Logging You In..\");\n pDialog.setIndeterminate(false);\n pDialog.setCancelable(true);\n pDialog.show();\n }", "public void swapLoginFX() throws IOException {\r\n hideAllViews();\r\n swapViewFX(\"LogIn\", viewLoginFX);\r\n }", "private void LoginOwner() {\n Transaksi.setEnabled(false);\n Transaksi.setVisible(false);\n }", "private void showDialog() {\n if (!progressDialog.isShowing())\n progressDialog.show();\n }", "@Override\n protected void onPreExecute() {\n super.onPreExecute();\n mProgressDialog = new ProgressDialog(LoginActivity.this);\n mProgressDialog.setMessage(\"Logging in...\");\n mProgressDialog.setIndeterminate(false);\n mProgressDialog.setCancelable(true);\n mProgressDialog.show();\n }", "public loginGUI() {\r\n\r\n\t\tsuper.frame.setTitle(\"Login\");\r\n\t\ttry {\r\n\t\t\tJLabel label = new JLabel(new ImageIcon(ImageIO.read(new File(\"..\\\\images\\\\login-background.png\"))));\r\n\t\t\tframe.setContentPane(label);\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.out.println(\"Image doesn't exist...\");\r\n\t\t}\r\n\r\n\t\tcopyright();\r\n\t\tlabels();\r\n\t\ttextField();\r\n\t\tstartButton();\r\n\t\tsignup();\r\n\r\n\t\tsuper.frame.setVisible(true);\r\n\t}" ]
[ "0.7621026", "0.74284565", "0.73967826", "0.7286585", "0.72790235", "0.72643507", "0.72605824", "0.72436935", "0.7186172", "0.7047085", "0.69236714", "0.6893757", "0.6891113", "0.6866205", "0.68238723", "0.67860216", "0.67708963", "0.6761273", "0.67412", "0.6739837", "0.6713914", "0.6713914", "0.6713914", "0.6713914", "0.6713914", "0.6713914", "0.6713914", "0.6713914", "0.6713914", "0.6713914", "0.6713914", "0.6713914", "0.6713914", "0.6713914", "0.6713914", "0.6713914", "0.6713914", "0.6713914", "0.6713914", "0.6713914", "0.6713914", "0.6713914", "0.6713914", "0.6713914", "0.67104405", "0.6697767", "0.6689414", "0.66514045", "0.6645978", "0.6645713", "0.663923", "0.66367036", "0.6618884", "0.66093326", "0.66055995", "0.65910804", "0.6590136", "0.6586476", "0.65763783", "0.65725404", "0.6572173", "0.65593046", "0.65593046", "0.65593046", "0.65408343", "0.6507999", "0.649134", "0.64890975", "0.64813304", "0.64812773", "0.6478275", "0.6471703", "0.64604294", "0.64463943", "0.64354664", "0.64175886", "0.63773674", "0.63482696", "0.6336269", "0.63290006", "0.6309522", "0.62869275", "0.6283205", "0.6281259", "0.6265271", "0.62646455", "0.62566954", "0.6255552", "0.62513256", "0.6250048", "0.6204188", "0.6201671", "0.6201222", "0.6171013", "0.61647034", "0.615909", "0.6155964", "0.61420023", "0.6138798", "0.60994136" ]
0.6713159
44
Get content type from file name alone
public static String getContentType(String filename) { return getTika().detect(filename); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getContentType(String fileExtension);", "String getFileMimeType();", "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 static String getContentType(String name){\n\t\tString contentType = \"\";\n\t\tif(name.endsWith(\".html\")){\n\t\t\tcontentType = \"text/html\";\n\t\t}else if(name.endsWith(\".txt\")){\n\t\t\tcontentType = \"text/plain\";\n\t\t}else if(name.endsWith(\".gif\")){\n\t\t\tcontentType = \"image/gif\";\n\t\t}else if(name.endsWith(\".jpg\")){\n\t\t\tcontentType = \"image/jpeg\";\n\t\t}else if(name.endsWith(\".png\")){\n\t\t\tcontentType = \"image/png\";\n\t\t}\n\t\treturn contentType;\n\t}", "public static ContentType estimateContentType(String filename) {\r\n\t\tint last = 0;\r\n\t\tlast = filename.lastIndexOf('.');\r\n\r\n\t\tString fileExt = filename.substring(last + 1);\r\n\t\treturn extensionContentType(fileExt);\r\n\t}", "public String getContentTypeFor(String fileName)\r\n {\r\n String ret_val = null;\r\n\r\n if(fileName.toUpperCase().endsWith(\".PNG\"))\r\n ret_val = \"image/png\";\r\n else if(fileName.toUpperCase().endsWith(\".TIF\"))\r\n ret_val = \"image/tiff\";\r\n else if(fileName.toUpperCase().endsWith(\".TIFF\"))\r\n ret_val = \"image/tiff\";\r\n else if(fileName.toUpperCase().endsWith(\".TGA\"))\r\n ret_val = \"image/targa\";\r\n else if(fileName.toUpperCase().endsWith(\".BMP\"))\r\n ret_val = \"image/bmp\";\r\n else if(fileName.toUpperCase().endsWith(\".PPM\"))\r\n ret_val = \"image/x-portable-pixmap\";\r\n else if(fileName.toUpperCase().endsWith(\".PGM\"))\r\n ret_val = \"image/x-portable-graymap\";\r\n\r\n // handle previous filename maps\r\n if(ret_val == null && prevMap != null)\r\n return prevMap.getContentTypeFor(fileName);\r\n\r\n // return null if unsure.\r\n return ret_val;\r\n }", "@Override\n\tpublic String getContentType(String filename) {\n\t\treturn null;\n\t}", "java.lang.String getMimeType();", "java.lang.String getMimeType();", "String getMimeType();", "private static String contentType(String fileName) {\n\t\tif (fileName.endsWith(\".txt\") || fileName.endsWith(\".html\")) {\n\t\t\treturn \"text/html\";\n\t\t}\n\t\tif (fileName.endsWith(\".jpg\") || fileName.endsWith(\".jpeg\")) {\n\t\t\treturn \"image/jpeg\";\n\t\t}\n\t\tif (fileName.endsWith(\".gif\")) {\n\t\t\treturn \"image/gif\";\n\t\t}\n\t\treturn \"application/octet-stream\";\n\t}", "String getContentType();", "String getContentType();", "String getContentType();", "MimeType mediaType();", "String getFileExtensionByFileString(String name);", "private String getMimeType(File file) {\n String fileName = file.getName();\n\n if (fileName.endsWith(\"css\")) {\n return \"text/css; charset=utf-8\";\n } else if (fileName.endsWith(\"html\")) {\n return \"text/html; charset=utf-8\";\n } else if (fileName.endsWith(\"jpg\") || fileName.endsWith(\"jpeg\")) {\n return \"image/jpeg\";\n } else if (fileName.endsWith(\"png\")) {\n return \"image/png\";\n } else if (fileName.endsWith(\"ico\")) {\n return \"image/x-icon\";\n }\n\n return \"text/plain; charset=utf-8\";\n }", "public String getContentType() {\r\n return mFile.getContentType();\r\n }", "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 }", "public static String GetMimeTypeFromFileName(String fileName) {\n\n\t\tif (fileName == null || fileName.length() == 0) {\n\t\t\treturn \"\";\n\t\t}\n\n\t\tint pos = fileName.lastIndexOf(\".\");\n\t\tif (pos == -1) {\n\t\t\treturn \"application/octet-stream\";\n\t\t} else {\n\n\t\t\tString extension = fileName.substring(pos + 1, fileName.length());\n\n\t\t\tif (extension.equalsIgnoreCase(\"gpx\")) {\n\t\t\t\treturn \"application/gpx+xml\";\n\t\t\t} else if (extension.equalsIgnoreCase(\"kml\")) {\n\t\t\t\treturn \"application/vnd.google-earth.kml+xml\";\n\t\t\t} else if (extension.equalsIgnoreCase(\"zip\")) {\n\t\t\t\treturn \"application/zip\";\n\t\t\t}\n\t\t}\n\n\t\t// Unknown mime type\n\t\treturn \"application/octet-stream\";\n\n\t}", "public String getMimeType();", "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 getContentType();", "public String getContentType();", "private FileType getFileType(String name) {\n\t\tif(name==null)\n\t\t\treturn null;\n\t\tfor(FileType fileType: fileTypes){\n\t\t\tif(name.startsWith(fileType.getFileNamePrefix())){\n\t\t\t\treturn fileType;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "private int getFileType(String fileName) {\n\t\tString[] buffer = fileName.split(\"\\\\.\");\n\t\tif (buffer[buffer.length - 1].equals(\"txt\"))\n\t\t\treturn 0;\n\t\telse if (buffer[buffer.length - 1].equals(\"pdf\"))\n\t\t\treturn 1;\n\t\telse if (buffer[buffer.length - 1].equals(\"jpg\")\n\t\t\t\t|| buffer[buffer.length - 1].equals(\"png\"))\n\t\t\treturn 2;\n\t\telse if (buffer[buffer.length - 1].equals(\"mp3\"))\n\t\t\treturn 3;\n\t\telse if (buffer[buffer.length - 1].equals(\"avi\")\n\t\t\t\t|| buffer[buffer.length - 1].equals(\"mp4\"))\n\t\t\treturn 4;\n\t\telse\n\t\t\treturn -1;\n\t}", "private static String getMimeType(String url) {\n\t\tString mimeType = null;\n\t\tString extension = MimeTypeMap.getFileExtensionFromUrl(url);\n\t\tif (extension != null) {\n\t\t\tMimeTypeMap mime = MimeTypeMap.getSingleton();\n\t\t\tmimeType = mime.getMimeTypeFromExtension(extension);\n\t\t}\n\n\t\tSystem.out.println(\"Mime Type: \" + mimeType);\n\n\t\treturn mimeType;\n\t}", "private String getMimeType(String path) {\n String extension = absoluteFileChosen.substring(absoluteFileChosen.lastIndexOf(\".\") + 1);\n return MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension);\n }", "public java.lang.String getFiletype() {\n return filetype;\n }", "private String detectMimeType(XDIMEContextInternal context,String path){\n int lastDot = path.lastIndexOf('.');\n String resultMimeType = null;\n\n if (lastDot != -1) {\n MarinerPageContext pageContext = getPageContext(context);\n EnvironmentContext envContext = pageContext.getEnvironmentContext();\n resultMimeType = envContext.getMimeType(path);\n }\n return resultMimeType;\n }", "private String getMimeType(String aFilename) {\n String extension = aFilename.substring(aFilename.length() - 3, aFilename.length()).toUpperCase();\n\n if (extension.equals(\"AMR\")) {\n return \"audio/AMR\";\n }\n //DuongNT add\n if (extension.equals(\"WAV\")) {\n return \"audio/X-WAV\";\n } else {\n return \"audio/midi\";\n }\n }", "public static String getMimeTypeForFile(String uri) {\n\t\tint dot = uri.lastIndexOf('.');\n\t\tString mime = null;\n\t\tif (dot >= 0) {\n\t\t\tmime = mimeTypes().get(uri.substring(dot + 1).toLowerCase());\n\t\t}\n\t\treturn mime == null ? \"application/octet-stream\" : mime;\n\t}", "private String getFileExtension(String mimeType) {\n mimeType = mimeType.toLowerCase();\n if (mimeType.equals(\"application/msword\")) {\n return \".doc\";\n }\n if (mimeType.equals(\"application/vnd.ms-excel\")) {\n return \".xls\";\n }\n if (mimeType.equals(\"application/pdf\")) {\n return \".pdf\";\n }\n if (mimeType.equals(\"text/plain\")) {\n return \".txt\";\n }\n\n return \"\";\n }", "public String getFileContentType() {\r\n return (String) getAttributeInternal(FILECONTENTTYPE);\r\n }", "public static ContentType extensionContentType(String fileExt) {\r\n\r\n\t\tfileExt = fileExt.toLowerCase();\r\n\r\n\t\tif (\"tiff\".equals(fileExt) || \"tif\".equals(fileExt)) {\r\n\t\t\t// return MIMEConstants.\r\n\t\t} else if (\"zip\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_APPLICATION_ZIP;\r\n\t\t} else if (\"pdf\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_APPLICATION_PDF;\r\n\t\t} else if (\"wmv\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_VIDEO_WMV;\r\n\t\t} else if (\"rar\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_APPLICATION_RAR;\r\n\t\t} else if (\"swf\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_APPLICATION_SWF;\r\n\t\t} else if (\"exe\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_APPLICATION_WINDOWSEXEC;\r\n\t\t} else if (\"avi\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_VIDEO_AVI;\r\n\t\t} else if (\"doc\".equals(fileExt) || \"dot\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_APPLICATION_WORD;\r\n\t\t} else if (\"ico\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_IMAGE_ICO;\r\n\t\t} else if (\"mp2\".equals(fileExt) || \"mp3\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_AUDIO_MPEG;\r\n\t\t} else if (\"rtf\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_TEXT_RTF;\r\n\t\t} else if (\"xls\".equals(fileExt) || \"xla\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_APPLICATION_EXCEL;\r\n\t\t} else if (\"jpg\".equals(fileExt) || \"jpeg\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_IMAGE_JPEG;\r\n\t\t} else if (\"gif\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_IMAGE_GIF;\r\n\t\t} else if (\"svg\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_IMAGE_SVG;\r\n\t\t} else if (\"png\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_IMAGE_PNG;\r\n\t\t} else if (\"csv\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_TEXT_CSV;\r\n\t\t} else if (\"ps\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_APPLICATION_POSTSCRIPT;\r\n\t\t} else if (\"html\".equals(fileExt) || \"htm\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_TEXT_HTML;\r\n\t\t} else if (\"css\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_TEXT_CSS;\r\n\t\t} else if (\"xml\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_TEXT_XML;\r\n\t\t} else if (\"js\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_APPLICATION_JAVASCRIPT;\r\n\t\t} else if (\"wma\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_AUDIO_WMA;\r\n\t\t}\r\n\r\n\t\treturn MIMEConstants.CONTENT_TYPE_TEXT_PLAIN;\r\n\t}", "@Override\n\tpublic String getContentType(File file) {\n\t\treturn null;\n\t}", "@NotNull\n String getMimeType();", "public static String guessMimeType(String filename) {\n requireNonNull(filename, \"filename with extension can not be null.\");\n return MIMETYPES_FILE_TYPE_MAP.getContentType(filename);\n }", "public int lookupReadMimeType(String mimeType);", "String getFileExtension();", "public String getFiletype() {\n return filetype;\n }", "public String getFilecontentContentType() {\n return filecontentContentType;\n }", "public MediaType getContentType()\r\n/* 193: */ {\r\n/* 194:289 */ String value = getFirst(\"Content-Type\");\r\n/* 195:290 */ return value != null ? MediaType.parseMediaType(value) : null;\r\n/* 196: */ }", "public static String getMimeType(Activity context, Uri uri) {\n String extension;\n //Check uri format to avoid null\n if (ContentResolver.SCHEME_CONTENT.equals(uri.getScheme())) {\n //If scheme is a content\n extension = MimeTypeMap.getSingleton().getExtensionFromMimeType(context.getContentResolver().getType(uri));\n if (TextUtils.isEmpty(extension)) {\n extension = MimeTypeMap.getFileExtensionFromUrl(Uri.fromFile(new File(uri.getPath())).toString());\n }\n } else {\n //If scheme is a File\n //This will replace white spaces with %20 and also other special characters. This will avoid returning null values on file\n // name with spaces and special characters.\n extension = MimeTypeMap.getFileExtensionFromUrl(Uri.fromFile(new File(uri.getPath())).toString());\n if (TextUtils.isEmpty(extension)) {\n extension = MimeTypeMap.getSingleton().getExtensionFromMimeType(context.getContentResolver().getType(uri));\n }\n }\n if (TextUtils.isEmpty(extension)) {\n extension = getMimeTypeByFileName(TUriParse.getFileWithUri(uri, context).getName());\n }\n return extension;\n }", "public String getContentType() {\n\t\tString ct = header.getContentType();\n\t\treturn Strings.substringBefore(ct, ';');\n\t}", "int getContentTypeValue();", "public String getFileType(){\n\t\treturn type;\n\t}", "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}", "public String getFileExtension();", "private String getFileEx(Uri uri){\n ContentResolver cr=getContentResolver();\n MimeTypeMap mime=MimeTypeMap.getSingleton();\n return mime.getExtensionFromMimeType(cr.getType(uri));\n }", "private static String typeName(File file) {\r\n String name = file.getName();\r\n int split = name.lastIndexOf('.');\r\n\r\n return (split == -1) ? name : name.substring(0, split);\r\n }", "public String getReadMimeType(int formatIndex);", "private String getFileExtension(Uri uri) {\n ContentResolver contentResolver = getApplicationContext().getContentResolver();\n MimeTypeMap mimeTypeMap = MimeTypeMap.getSingleton();\n return mimeTypeMap.getExtensionFromMimeType(contentResolver.getType(uri));\n }", "private static TYPE getFtlWebfileType(final String path) {\n if (path.indexOf('.') > -1) {\n final String ext = path.substring(path.lastIndexOf('.'));\n if (BINARY_EXTENSIONS.contains(ext)) {\n return BINARY_WEBFILE;\n }\n }\n return WEBFILE;\n }", "public static String getContentType(String format) {\n\t\tif (StringUtils.hasText(format)) {\n\t\t\tif (format.equalsIgnoreCase(XML.name())) {\n\t\t\t\treturn ContentTypes.XML.toString();\n\t\t\t} else if (format.equalsIgnoreCase(JSON.name())) {\n\t\t\t\treturn ContentTypes.JSON.toString();\n\t\t\t} else if (format.equalsIgnoreCase(PDF.name())) {\n return ContentTypes.PDF.toString();\n }\n\t\t}\n\t\treturn null;\n\t}", "public String getMime_type()\r\n {\r\n return getSemanticObject().getProperty(data_mime_type);\r\n }", "public String getFILE_TYPE() {\r\n return FILE_TYPE;\r\n }", "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 }", "private String getFileExtension(Uri uri) {\n ContentResolver cR = getActivity().getApplicationContext().getContentResolver();\n MimeTypeMap mime = MimeTypeMap.getSingleton();\n return mime.getExtensionFromMimeType(cR.getType(uri));\n }", "public String getMimeType() throws VlException\n {\n return MimeTypes.getDefault().getMimeType(this.getPath());\n }", "public static String getMimeType(String url) {\n String type = null;\n String extension = MimeTypeMap.getFileExtensionFromUrl(url);\n if (extension != null) {\n type = MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension);\n }\n return type;\n }", "public String getMIMEType(String format)\n\t{\n\t\treturn engine.getMIMEType(format);\n\t}", "public abstract String getFileExtension();", "private static String getFileTagsBasedOnExt(String fileExt) {\n String fileType = new Tika().detect(fileExt).replaceAll(\"/.*\", \"\");\n return Arrays.asList(EXPECTED_TYPES).contains(fileType) ? fileType : null;\n }", "public String fileExtension() {\r\n return getContent().fileExtension();\r\n }", "public static String getFileType(String fileName) {\n String[] fileNames = fileName.split(\"\\\\.\");\n\n if (\"cs\".equals(fileNames[fileNames.length - 1])) {\n return LanguageManager.LANGUAGE_CSHARP;\n } else if (\"java\".equals(fileNames[fileNames.length - 1])) {\n return LanguageManager.LANGUAGE_JAVA;\n } else if (\"cpp\".equals(fileNames[fileNames.length - 1])) {\n return LanguageManager.LANGUAGE_CPLUS;\n } else if (\"h\".equals(fileNames[fileNames.length - 1])) {\n return LanguageManager.LANGUAGE_CPLUS;\n } else if (\"hpp\".equals(fileNames[fileNames.length - 1])) {\n return LanguageManager.LANGUAGE_CPLUS;\n } else if (\"cc\".equals(fileNames[fileNames.length - 1])) {\n return LanguageManager.LANGUAGE_CPLUS;\n } else {\n return null;\n }\n }", "public static String contentToFileExtension(String mediatype, String subtype) {\r\n\t\tif (StringUtil.equalsIgnoreCase(mediatype, MIMEConstants.MEDIATYPE_IMAGE)) {\r\n\t\t\tif (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_GIF)) {\r\n\t\t\t\treturn \"gif\";\r\n\t\t\t} else if (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_JPEG)) {\r\n\t\t\t\treturn \"jpg\";\r\n\t\t\t} else if (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_PNG)) {\r\n\t\t\t\treturn \"png\";\r\n\t\t\t} else if (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_TIFF)) {\r\n\t\t\t\treturn \"tiff\";\r\n\t\t\t} else if (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_ICON)) {\r\n\t\t\t\treturn \"ico\";\r\n\t\t\t} else if (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_SVG)) {\r\n\t\t\t\treturn \"svg\";\r\n\t\t\t}\r\n\t\t} else if (StringUtil.equalsIgnoreCase(mediatype, MIMEConstants.MEDIATYPE_TEXT)) {\r\n\t\t\tif (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_CSS)) {\r\n\t\t\t\treturn \"css\";\r\n\t\t\t} else if (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_HTML)) {\r\n\t\t\t\treturn \"html\";\r\n\t\t\t} else if (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_JAVASCRIPT)) {\r\n\t\t\t\treturn \"js\";\r\n\t\t\t} else if (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_PLAIN)) {\r\n\t\t\t\treturn \"txt\";\r\n\t\t\t} else if (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_RICHTEXT)) {\r\n\t\t\t\treturn \"rtf\";\r\n\t\t\t} else if (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_SOAPXML)) {\r\n\t\t\t\treturn \"xml\";\r\n\t\t\t} else if (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_CSV)) {\r\n\t\t\t\treturn \"csv\";\r\n\t\t\t}\r\n\r\n\t\t} else if (StringUtil.equalsIgnoreCase(mediatype, MIMEConstants.MEDIATYPE_APPLICATION)) {\r\n\t\t\tif (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_MSEXCEL)) {\r\n\t\t\t\treturn \"xls\";\r\n\t\t\t} else if (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_MSWORD)) {\r\n\t\t\t\treturn \"doc\";\r\n\t\t\t} else if (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_RAR)) {\r\n\t\t\t\treturn \"rar\";\r\n\t\t\t} else if (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_PDF)) {\r\n\t\t\t\treturn \"pdf\";\r\n\t\t\t} else if (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_SHOCKWAVEFLASH)) {\r\n\t\t\t\treturn \"swf\";\r\n\t\t\t} else if (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_WINDOWSEXECUTEABLE)) {\r\n\t\t\t\treturn \"exe\";\r\n\t\t\t} else if (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_ZIP)) {\r\n\t\t\t\treturn \"zip\";\r\n\t\t\t} else if (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_POSTSCRIPT)) {\r\n\t\t\t\treturn \"ps\";\r\n\t\t\t}\r\n\t\t} else if (StringUtil.equalsIgnoreCase(mediatype, MIMEConstants.MEDIATYPE_VIDEO)) {\r\n\t\t\tif (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_WINDOWSMEDIA)) {\r\n\t\t\t\treturn \"wmv\";\r\n\t\t\t} else if (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_AVI)) {\r\n\t\t\t\treturn \"avi\";\r\n\t\t\t} else if (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_MP4)) {\r\n\t\t\t\treturn \"mp4\";\r\n\t\t\t}\r\n\t\t} else if (StringUtil.equalsIgnoreCase(mediatype, MIMEConstants.MEDIATYPE_AUDIO)) {\r\n\t\t\tif (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_MPEG3) || StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_MPEG)) {\r\n\t\t\t\treturn \"mp3\";\r\n\t\t\t} else if (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_WINDOWSAUDIO)) {\r\n\t\t\t\treturn \"wma\";\r\n\t\t\t} else if (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_MP4)) {\r\n\t\t\t\treturn \"mp4\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn null;\r\n\t}", "public int lookupWriteMimeType(String mimeType);", "protected abstract String getFileExtension();", "String[] getFileTypes();", "public static String contentToFileExtension(String mimeType) {\r\n\t\tint slashPos = mimeType.indexOf(MIMEConstants.SEPARATOR);\r\n\t\tif ((slashPos < 1) || (slashPos == (mimeType.length() - 1))) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tString type = mimeType.substring(0, slashPos);\r\n\t\tString subtype;\r\n\t\tint semicolonPos = mimeType.indexOf(\";\", slashPos + 1);\r\n\t\tif (semicolonPos < 0) {\r\n\t\t\tsubtype = mimeType.substring(slashPos + 1).trim();\r\n\t\t} else {\r\n\t\t\tsubtype = mimeType.substring(slashPos + 1, semicolonPos).trim();\r\n\t\t}\r\n\r\n\t\treturn contentToFileExtension(type, subtype);\r\n\t}", "public static String getMimeType(String contentType) {\r\n\t\tString mimeType = null;\r\n\t\tif (contentType != null && !contentType.isEmpty()) {\r\n\t\t\t// FIXME If SemiColon Is Not Present\r\n\t\t\tString[] tokens = contentType.split(SEMI_COLON);\r\n\t\t\tif (tokens.length > 0) {\r\n\t\t\t\tmimeType = tokens[0];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn mimeType;\r\n\t}", "private String getContentType(String sHTTPRequest) {\n String sContentType = \"Content-Type: \";\n\n // update based on file extension or if response starts with HTML/URL\n String sFileExtension = getFileExtension(sHTTPRequest);\n if (sFileExtension.equalsIgnoreCase(\".html\") || sFileExtension.equalsIgnoreCase(\".htm\")) {\n sContentType += \"text/html\";\n } else if (sFileExtension.equalsIgnoreCase(\".txt\")) {\n sContentType += \"text/plain\";\n } else if (sFileExtension.equalsIgnoreCase(\".pdf\")) {\n sContentType += \"application/pdf\";\n } else if (sFileExtension.equalsIgnoreCase(\".png\")) {\n sContentType += \"image/png\";\n } else if (sFileExtension.equalsIgnoreCase(\".jpeg\") || sFileExtension.equalsIgnoreCase(\".jpg\")) {\n sContentType += \"image/jpeg\";\n } else {\n sContentType += \"text/html\"; // default response\n }\n\n // return final content type\n return sContentType;\n }", "@Override\r\n public String getCustomContentType() {\r\n return DirectUtils.getFileMIMEType(new File(this.imagePath));\r\n }", "protected String getContentType(Resource resource, @SuppressWarnings(\"unused\") SlingHttpServletRequest request) {\n String mimeType = JcrBinary.getMimeType(resource);\n if (StringUtils.isEmpty(mimeType)) {\n mimeType = ContentType.OCTET_STREAM;\n }\n return mimeType;\n }", "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}", "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 String GetFileExtension(Uri uri) {\n\n ContentResolver contentResolver = getContentResolver();\n\n MimeTypeMap mimeTypeMap = MimeTypeMap.getSingleton();\n\n // Returning the file Extension.\n return mimeTypeMap.getExtensionFromMimeType(contentResolver.getType(uri)) ;\n\n }", "com.google.protobuf.ByteString getMimeTypeBytes();", "public MimeType mimetype() {\r\n return getContent().mimetype();\r\n }", "public String getFileType() {\n return fileType;\n }", "boolean hasMimeType();", "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}", "com.yoti.api.client.spi.remote.proto.ContentTypeProto.ContentType getContentType();", "public static String getContentType(InputStream is) throws IOException {\n\n String encoding = \"UTF-8\"; //default\n\n\n // cerca se il documento specifica un altro encoding\n if (is != null) {\n StringBuilder sb = new StringBuilder();\n String line;\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(is, \"UTF-8\"));//\"UTF-8\"));\n while ((line = reader.readLine()) != null) { //CRASHA\n sb.append(line).append(\"\\n\");\n if ((sb.toString().contains(\"<?\") && sb.toString().contains(\"?>\")) && sb.toString().contains(\"encoding=\")) {\n\n Pattern p = Pattern.compile(\".*<\\\\?.*encoding=.(.*).\\\\?>.*\", Pattern.DOTALL);\n\n Matcher matcher = p.matcher(sb.toString());\n\n if (matcher.matches()) {\n encoding = matcher.group(1);\n }\n\n break;\n }\n }\n\n }\n\n return encoding;\n }", "@Test\n public void testGetFileType() {\n System.out.println(\"getFileType\");\n String file = \"adriano.pdb\";\n String expResult = \"pdb\";\n String result = Util.getFileType(file);\n assertEquals(expResult, result);\n }", "default String getContentType() {\n return \"application/octet-stream\";\n }", "public static FileTypes getFileType(String fileName) {\n\t\tFile file = new File(fileName);\n\t\tif (file.isDirectory()) {\n\t\t\treturn FileTypes.DIRECTORY;\n\t\t} else {\n\t\t\tif (isJavaSourceFile(fileName)) {\n\t\t\t\treturn FileTypes.JAVA_FILE;\n\t\t\t} else {\n\t\t\t\treturn FileTypes.NON_JAVA_FILE;\n\t\t\t}\n\t\t}\n\t}", "@Override\n public String getType(Uri uri) {\n List<String> segments = uri.getPathSegments();\n String accountId = segments.get(0);\n String id = segments.get(1);\n String format = segments.get(2);\n if (FORMAT_THUMBNAIL.equals(format)) {\n return \"image/png\";\n } else {\n uri = ContentUris.withAppendedId(Attachment.CONTENT_URI, Long.parseLong(id));\n Cursor c = getContext().getContentResolver().query(uri, MIME_TYPE_PROJECTION,\n null, null, null);\n try {\n if (c.moveToFirst()) {\n String mimeType = c.getString(MIME_TYPE_COLUMN_MIME_TYPE);\n String fileName = c.getString(MIME_TYPE_COLUMN_FILENAME);\n mimeType = inferMimeType(fileName, mimeType);\n return mimeType;\n }\n } finally {\n c.close();\n }\n return null;\n }\n }", "public String getContentType(String keyName)\n {\n S3Object o = s3.getObject(bucketName, keyName);\n return o.getObjectMetadata().getContentType();\n }", "public String getType()\n {\n return VFS.FILE_TYPE;\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 }", "private String getLanguageType(String fileName)\n {\n if (fileName.endsWith(\".c\"))\n {\n return \"Source Code\";\n }\n else if (fileName.endsWith(\".java\"))\n {\n return \"Source Code\";\n }\n else if (fileName.endsWith(\".cpp\"))\n {\n return \"Source Code\";\n }\n else if (fileName.endsWith(\".class\"))\n {\n return \"Byte Code\";\n }\n if (fileName.endsWith(\".C\"))\n {\n return \"Source Code\";\n }\n else if (fileName.endsWith(\".Java\"))\n {\n return \"Source Code\";\n }\n else if (fileName.endsWith(\".CPP\"))\n {\n return \"Source Code\";\n }\n else if (fileName.endsWith(\".Class\"))\n {\n return \"Byte Code\";\n }\n else if (fileName.endsWith(\".h\"))\n {\n return \"Source Code\";\n }\n else\n {\n return \"??\";\n }\n }", "public String getMimeType(String extension, String def) throws IOException {\n byte[] type = new byte[128];\n byte[] buf = new byte[16];\n byte[] ext = extension.toLowerCase().getBytes(\"ASCII\");\n int state = 1;\n int x = 0;\n int t = 0;\n for (int off = 0; off < this.inLen; off++) {\n byte ch = this.in[off];\n switch (state) {\n case 1:\n if (!(ch == (byte) 32 || ch == (byte) 9)) {\n if (ch == (byte) 35) {\n state = 2;\n break;\n }\n state = 3;\n }\n case 2:\n if (ch != (byte) 10) {\n break;\n }\n x = 0;\n t = 0;\n state = 1;\n break;\n case 3:\n if (ch != (byte) 32 && ch != (byte) 9) {\n int t2 = t + 1;\n type[t] = ch;\n t = t2;\n break;\n }\n state = 4;\n break;\n case 4:\n if (!(ch == (byte) 32 || ch == (byte) 9)) {\n state = 5;\n }\n case 5:\n switch (ch) {\n case (byte) 9:\n case SmbConstants.DEFAULT_MAX_MPX_COUNT /*10*/:\n case (byte) 32:\n case (byte) 35:\n int i = 0;\n while (i < x && x == ext.length && buf[i] == ext[i]) {\n i++;\n }\n if (i != ext.length) {\n if (ch == (byte) 35) {\n state = 2;\n } else if (ch == (byte) 10) {\n x = 0;\n t = 0;\n state = 1;\n }\n x = 0;\n break;\n }\n return new String(type, 0, t, \"ASCII\");\n break;\n default:\n int x2 = x + 1;\n buf[x] = ch;\n x = x2;\n break;\n }\n default:\n break;\n }\n }\n return def;\n }", "public abstract String getFileFormatName();", "public static String getContentType(HttpServletRequest argClientRequest) {\r\n\t\tString mimeType = null;\r\n\t\tif (argClientRequest.getContentType() != null\r\n\t\t\t\t&& argClientRequest.getContentType().length() > 0) {\r\n\t\t\tString contentType = argClientRequest.getContentType();\r\n\t\t\tString[] tokens = contentType.split(SEMI_COLON);\r\n\t\t\tmimeType = tokens[0];\r\n\t\t}\r\n\t\treturn mimeType;\r\n\t}", "public String getFileExtension() {\n return toString().toLowerCase();\n }", "public interface FileType {\n\tString name();\n}", "String getExtension();", "public String getContentType(String arg0) {\n\t\treturn null;\n\t}" ]
[ "0.81802243", "0.7761684", "0.76075655", "0.75817555", "0.7304213", "0.72152656", "0.7204682", "0.71957034", "0.71957034", "0.7177861", "0.7168165", "0.71226054", "0.71226054", "0.71226054", "0.7045974", "0.698749", "0.6985305", "0.6929642", "0.69248646", "0.683194", "0.6809636", "0.67401916", "0.6729167", "0.6729167", "0.67135453", "0.670436", "0.6700591", "0.66956764", "0.6674585", "0.6670364", "0.66684794", "0.66579217", "0.6632179", "0.66248465", "0.6623082", "0.6596978", "0.65856326", "0.65826255", "0.6554239", "0.654242", "0.6532111", "0.6501784", "0.6495434", "0.6481132", "0.6476616", "0.6431834", "0.64122856", "0.64022624", "0.63963586", "0.6387809", "0.63874114", "0.63829774", "0.63581634", "0.63438326", "0.63096935", "0.6297439", "0.6289569", "0.62854534", "0.62538415", "0.62538016", "0.62529707", "0.623852", "0.62279093", "0.6225715", "0.6202827", "0.6202301", "0.6193629", "0.6172441", "0.6171507", "0.6171292", "0.6170412", "0.6143386", "0.6136648", "0.6130605", "0.61078024", "0.61019534", "0.6096791", "0.60957026", "0.6086062", "0.608602", "0.60832584", "0.60826796", "0.6077151", "0.6070924", "0.6055049", "0.605252", "0.60431075", "0.60268134", "0.6022955", "0.60216683", "0.60184044", "0.60081345", "0.6003571", "0.5987697", "0.59853", "0.5978451", "0.5972802", "0.5966931", "0.5964705", "0.59593755" ]
0.76035553
3
The initialize method is called after the constructor by JavaFX
@FXML private void initialize() { firstNameColumn.setCellValueFactory(cell -> cell.getValue().firstNameProperty()); lastNameColumn.setCellValueFactory(cell -> cell.getValue().lastNameProperty()); address1Column.setCellValueFactory(cell -> cell.getValue().address1Property()); address2Column.setCellValueFactory(cell -> cell.getValue().address2Property()); postalCodeColumn.setCellValueFactory(cell -> cell.getValue().postalCodeProperty()); phoneColumn.setCellValueFactory(cell -> cell.getValue().phoneProperty()); cityColumn.setCellValueFactory(cell -> cell.getValue().cityProperty()); countryColumn.setCellValueFactory(cell -> cell.getValue().countryProperty()); customerTable.getSelectionModel().selectedItemProperty().addListener((obs, oldSel, newSel) -> { editButton.setDisable(newSel == null); delButton.setDisable(newSel == null); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@FXML\n private void initialize() {\n }", "@FXML\n private void initialize() {\n }", "@FXML\n\tprivate void initialize() {\n\t\t\n\t}", "@FXML\n\tprivate void initialize() {\n\t\t\n\t}", "@FXML\r\n private void initialize() {\r\n \t\r\n \t\r\n \t\r\n \t\r\n \t\r\n }", "@FXML\n private void initialize() {\n \n }", "@FXML\n\tprivate void initialize() {\n\n\t}", "@FXML\n\tprivate void initialize(){\n\t}", "@FXML\n\tpublic void initialize()\n\t{\n\t}", "@FXML protected void initialize() {\n\t\tinitConfigVar();\n\t\tapplyStyle();\n\t}", "@FXML\n void initialize() {\n setupAppState();\n\n try {\n setupTreeViewButtons();\n } catch (IOException e) {\n Helpers.alertErrorExit(\"Couldn't load a TreeView button image!\");\n }\n\n setupEditor();\n setupNoteTree();\n }", "@FXML\n public void initialize() {\n initArray();\n }", "@FXML\r\n private void initialize() {\r\n addButton.setOnAction(new EventHandler<ActionEvent>() {\r\n @Override\r\n public void handle(ActionEvent event) {\r\n handleOk();\r\n }\r\n });\r\n\r\n cancelButton.setOnAction(new EventHandler<ActionEvent>() {\r\n @Override\r\n public void handle(ActionEvent event) {\r\n handleCancel();\r\n }\r\n });\r\n }", "@FXML private void initialize(){\n\n\t\t//Attach Event Handlers\n\t\tbtnLoadLog.setOnAction(new EventHandler<ActionEvent>(){\n\t\t\tpublic void handle(ActionEvent e){\n\t\t\t\tonLoadLogClicked();\n\t\t\t}\n\t\t});\n\n\t\tbtnClearLog.setOnAction(new EventHandler<ActionEvent>(){\n\t\t\tpublic void handle(ActionEvent e){\n\t\t\t\tonClearClicked();\n\t\t\t}\n\t\t});\n\n\t\tbtnSaveLog.setOnAction(new EventHandler<ActionEvent>(){\n\t\t\tpublic void handle(ActionEvent e){\n\t\t\t\tonSaveClicked();\n\t\t\t}\n\t\t});\n\n\t}", "@FXML\n\tprivate void initialize() {\n\t\tgeneratorService = new GeneratorService();\n\t}", "private void initialize() {\n\t\troot = new Group();\n\t\tgetProperties();\n\t\tsetScene();\n\t\tsetStage();\n\t\tsetGUIComponents();\n\t}", "@FXML\n\tpublic void initialize() {\n\t\t\n\t\tcbCores.getItems().add(\"Azul\");\n\t\tcbCores.getItems().add(\"Vermelho\");\n\t\tcbCores.getItems().add(\"Verde\");\n\t\t\n\t\tcbCores1.getItems().add(\"Azul\");\n\t\tcbCores1.getItems().add(\"Vermelho\");\n\t\tcbCores1.getItems().add(\"Verde\");\n\t\t\n\t\t//cbCores.setItems(FXCollections.observableArrayList(cbCores));\n\t}", "public void initialize(){\n\t\tDrawingBotV3.logger.entering(\"FX Controller\", \"initialize\");\n\n initToolbar();\n initViewport();\n initPlottingControls();\n initProgressBar();\n initDrawingAreaPane();\n initPreProcessingPane();\n\t\tinitConnectionPortPane();\n initPFMControls();\n initPenSettingsPane();\n\n\n viewportStackPane.setOnMousePressed(DrawingBotV3.INSTANCE::mousePressedJavaFX);\n viewportStackPane.setOnMouseDragged(DrawingBotV3.INSTANCE::mouseDraggedJavaFX);\n\n viewportScrollPane.setHvalue(0.5);\n viewportScrollPane.setVvalue(0.5);\n\n initSeparateStages();\n\n DrawingBotV3.INSTANCE.currentFilters.addListener((ListChangeListener<ObservableImageFilter>) c -> DrawingBotV3.INSTANCE.onImageFiltersChanged());\n DrawingBotV3.logger.exiting(\"FX Controller\", \"initialize\");\n }", "@FXML\n\tprivate void initialize() {\n\t\t\n\t\t//-- failedStackPane\n\t\tfailedStackPane.setVisible(false);\n\t\t\n\t\t//-- tryAgainButton\n\t\ttryAgainButton.setOnAction(a -> {\n\t\t\tMain.restartApplication(\"XR3PlayerUpdater\");\n\t\t\ttryAgainButton.setDisable(true);\n\t\t});\n\t\t\n\t\t//== Download Manually\n\t\tdownloadManually.setOnAction(a -> ActionTool.openWebSite(\"https://sourceforge.net/projects/xr3player/\"));\n\t\t\n\t}", "public void initialize() {\n // TODO\n }", "public void initialize() {\n }", "public void initialize () {\n }", "public void init(){\n \n }", "public void init() {\n \n }", "public void initialize() {\n }", "public void initialize() {\r\n }", "@FXML // This method is called by the FXMLLoader when initialization is complete\n\tvoid initialize() {\n\t\tassert btnOK != null : \"fx:id=\\\"btnOK\\\" was not injected: check your FXML file 'Layout1.fxml'.\";\n\t\tassert imgInsper != null : \"fx:id=\\\"imgInsper\\\" was not injected: check your FXML file 'Layout1.fxml'.\";\n\n\t\tfh = new FileHandler();\n\t\ttrigger = new Trigger();\n\t\ttgrHandler = new TriggerHandler();\n\n\t}", "public void initialize () {\n\n }", "@FXML\n void initialize() {\n m_uiManager = UIManager.getInstance();\n m_imagePath = User.DEFAULT_PICTURE;\n }", "private void initialize() {\n }", "public void initialize() {\n Platform.runLater(() -> {\n initializeDisplayText();\n buildComboBoxes();\n countryComboBoxListener();\n setCharLimitOnFields();\n if (action.equals(Constants.UPDATE)) {\n fillExistingCustomer();\n }\n });\n }", "@Override\n public void initialize() {\n \n }", "@FXML\n\tprivate void initialize() {\n\n\t\t\n\n\t\tchooseLangCombo.getItems().setAll(\"English\", \"Vietnamese\");\n\t\tchooseLangCombo.setValue(\"English\");\n\t\t;\n\n\t\tspeechCalculator.setInfoArea(infoArea);\n\n\t\t// start\n\t\tstart.setOnAction(a -> {\n\t\t\tSystem.out.println(\"choose:\" + chooseLangCombo.getSelectionModel().getSelectedItem());\n\t\t\tspeechCalculator.setChooseLang(chooseLangCombo.getSelectionModel().getSelectedItem());\n\t\t\tstatusLabel.setText(\"Status : [Running]\");\n\t\t\tinfoArea.appendText(\"Starting Speech Recognizer\\n\");\n\t\t\tspeechCalculator.startSpeechThread();\n\t\t});\n\n\t\t// stop\n\t\tstop.setOnAction(a -> {\n\t\t\tstatusLabel.setText(\"Status : [Stopped]\");\n\t\t\tinfoArea.appendText(\"Stopping Speech Recognizer\\n\");\n\t\t\tspeechCalculator.stopSpeechThread();\n\t\t\tchooseLangCombo.setValue(\"English\");\n\t\t\t;\n\t\t});\n\n\t\t// restart\n\t\trestart.setDisable(true);\n\n\t\treportBtn.setOnAction((ActionEvent event) -> {\n System.out.println(\"report button\");\n infoArea.appendText(\"You've just export report to excel. Please check file path:\" + ReportResult.REPORT_FILE_PATH + \"\\n\");\n ReportResult.createExcelFile();\n });\n\t\tcreateRadioGroup();\n\t}", "@FXML\r\n void initialize() {\r\n \tApplicationMethods.Years(year);\r\n \tjavafx.scene.image.Image i = new javafx.scene.image.Image(\"file:resources/qublogo.png\");\r\n \tImage.setImage(i);\r\n }", "public void initialize()\n {\n }", "public void initialize() {\n // empty for now\n }", "@FXML\n\tprivate void initialize() {\n\t\t// make field displaying flesch score read-only\n\t\tfleschField.setEditable(false);\n\n\t\t// launch = new LaunchClass();\n\n\t\t// instantiate and add custom text area\n\t\tspelling.Dictionary dic = LaunchClass.getDictionary();\n\t\ttextBox = new AutoSpellingTextArea(LaunchClass.getAutoComplete(), LaunchClass.getSpellingSuggest(dic), dic);\n\t\ttextBox.setPrefSize(570, 492);\n\t\ttextBox.setStyle(\"-fx-font-size: 14px\");\n\t\ttextBox.setWrapText(true);\n\n\t\t// add text area as first child of left VBox\n\t\tObservableList<Node> nodeList = lowPane.getChildren();\n\t\tNode firstChild = nodeList.get(0);\n\t\tnodeList.set(0, textBox);\n\t\tnodeList.add(firstChild);\n\n\t\tVBox.setVgrow(textBox, Priority.ALWAYS);\n\t}", "public void initialize() {\n sceneSwitch = SceneSwitch.getInstance();\n addTypes();\n }", "@FXML\r\n\tpublic void initialize() {\r\n\t\tmaps= new GoogleMaps();\r\n\t\t\r\n\t\tmaps.setHeight(427.0);\r\n\t\tmaps.setWidth(510.0);\r\n\t\tmaps.setMapCenter(39.1761, -86.5131);\r\n////\t\t//\r\n//\t\t\r\n\t//\tmaps.setMarkerPosition(42.8781, -90.6298,\"1\");\r\n\t//\tmaps.setMarkerPosition(41.8781, -87.6298,\"2\");\r\n\t//\tmaps.setMarkerPosition(40.7128, -74.0060,\"2\");\r\n\t\t\r\n\t\tmainPane.getChildren().add(maps);\r\n\t\tec = new EarthquakeCollection();\r\n\t\tec.setData(ec.loadData(\"all_month.csv\"));\r\n\t\tquakes = ec.createQuakes();\r\n\t\tec.sortByDate(quakes);\r\n\t}", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@FXML private void initialize() {\r\n \t\tc = Utilities.leggiCliente(Main.idCliente);\r\n \t\tac = new acquisto.AcquistoController(c);\r\n \t\tgetProdotti();\r\n \t\tgetSconti();\r\n \t\tinitSelezionati();\r\n \t\tpunti.setText(\"\" + ac.getSaldoPunti());\r\n \t\tpunti.setEditable(false);\r\n \t\ttotale.setEditable(false);\r\n \t\tconferma.setDisable(true);\r\n \t}", "@Override\n public void initialize() {\n\n }", "@Override\n public void initialize() {\n\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 }", "public void init(){\n \n }", "public void initialize() {\n\t}", "public void initialize() {\n\t}", "@FXML\n public void initialize() {\n staticController = this;\n mainPress(null);\n scrollPane.widthProperty().addListener((obs, oldVal, newVal) -> {\n onWindowSizeChange();\n });\n onWindowSizeChange();\n }", "private void initialize() {\n\t}", "@FXML\n private void initialize() {\n \tuictrlLength.setValueFactory(\n \t\t\tnew SpinnerValueFactory.IntegerSpinnerValueFactory(\n \t\t\t\t\tNYAPSEncoder.MIN_LENGTH, NYAPSEncoder.MAX_LENGTH, NYAPSEncoder.DEFAULT_LENGTH, 1));\n \tuictrlIssue.setValueFactory(\n \t\t\tnew SpinnerValueFactory.IntegerSpinnerValueFactory(\n \t\t\t\t\tNYAPSEncoder.MIN_ISSUE, NYAPSEncoder.MAX_ISSUE, 1, 1));\n }", "@FXML\n\tprivate void initialize()\n\t{\n\t\t//Array with English month names.\n\t\tString[] months = DateFormatSymbols.getInstance(Locale.ENGLISH).getMonths();\n\t\t//Convert to list and add it to observable list of months.\n\t\tmonthNames.addAll(Arrays.asList(months));\n\t\t\n\t\t//Assign month names as categories for the horizontal axis.\n\t\txAxis.setCategories(monthNames);\n\t}", "public static void initialize() {\n\n GUIResources.addResourcesFromClasspath();\n _initialize();\n\n }", "private void initialize() {\n\t\tthis.setSize(329, 270);\n\t\tthis.setContentPane(getJContentPane());\n\t}", "public static void initialize()\n\t{\n\t\tSfx.initialize();\n\t}", "@FXML\n protected void initialize() {\n super.initialize();\n nearRed = new PseudoClassProperty(nearPlatform, \"red\");\n nearBlue = new PseudoClassProperty(nearPlatform, \"blue\");\n farRed = new PseudoClassProperty(farPlatform, \"red\");\n farBlue = new PseudoClassProperty(farPlatform, \"blue\");\n\n nearRed.bind(EasyBind.monadic(alliance).map(Alliance.RED::equals));\n nearBlue.bind(EasyBind.monadic(alliance).map(Alliance.BLUE::equals));\n farRed.bind(nearBlue);\n farBlue.bind(nearRed);\n\n root.getProperties().put(\"fx:controller\", this);\n }", "public void initialize(){\n\t\t//TODO: put initialization code here\n\t\tsuper.initialize();\n\t\t\n\t}", "@Override\n protected void initialize() \n {\n \n }", "@FXML\n private void initialize() {\n\n setUpPlayerTable();\n }", "protected void initialize() {\r\n }", "protected void initialize() {\r\n }", "@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}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "@Override\r\n public void initialize()\r\n {\n }", "private void initialize() {\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 }", "@FXML\n\tpublic void initialize() {\n\t pausePane.setVisible(false);\n\t timerBox.getChildren().clear();\n timers = new TimerCollection(timerBox.getChildren(), resources);\n\n initDungeon();\n\n\t\tinventoryItems.setItems(inventoryList);\n\t\tinventoryItems.setCellFactory(this::inventoryListViewCellFactory);\n\n\t}", "public void initialize() {\n //TODO: Initialization steps\n\n initialized = true;\n }", "protected void initialize()\r\n {\n }", "private void initialize() {\n this.setSize(495, 276);\n this.setTitle(\"Translate Frost\");\n this.setContentPane(getJContentPane());\n }", "public final void init() {\n onInit();\n }", "public void init() {\n }" ]
[ "0.8352678", "0.8352678", "0.832463", "0.832463", "0.8315902", "0.8279097", "0.82415074", "0.81593835", "0.811882", "0.79105264", "0.79028976", "0.77808356", "0.7722536", "0.7664532", "0.7619935", "0.75723314", "0.7537433", "0.75085646", "0.74788845", "0.7459452", "0.7449009", "0.7447722", "0.74428403", "0.7433703", "0.74336964", "0.74326575", "0.7426258", "0.7401498", "0.7384384", "0.7375945", "0.7372037", "0.7328886", "0.73251075", "0.7299433", "0.7263863", "0.7262374", "0.72527164", "0.72415864", "0.7240903", "0.7240242", "0.7240242", "0.7240242", "0.72266036", "0.7222463", "0.7222463", "0.7216431", "0.7216431", "0.7216431", "0.7216431", "0.7216431", "0.7216431", "0.7216431", "0.7216431", "0.7216431", "0.7216431", "0.72127634", "0.7207159", "0.7207159", "0.72024995", "0.7183638", "0.71827835", "0.7181076", "0.71633", "0.71505344", "0.7140407", "0.7134689", "0.7124991", "0.7116287", "0.7114011", "0.7111519", "0.7111519", "0.71064186", "0.70946646", "0.70946646", "0.70946646", "0.7094641", "0.7084226", "0.70813775", "0.70813775", "0.70813775", "0.70813775", "0.70813775", "0.70813775", "0.70813775", "0.70813775", "0.70813775", "0.70813775", "0.70813775", "0.70813775", "0.70813775", "0.70813775", "0.70813775", "0.70813775", "0.70813775", "0.70813775", "0.70798206", "0.7079652", "0.7078239", "0.7075904", "0.70658636", "0.70644647" ]
0.0
-1
Set up the customer view window with a reference to this controller's stage
public void setupDialog(Stage stage) { this.stage = stage; customers = C195Application.getAllCustomers(); customerTable.setItems(customers); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@FXML\n void OnActionShowAddCustomerScreen(ActionEvent event) throws IOException {\n stage = (Stage)((Button)event.getSource()).getScene().getWindow();\n scene = FXMLLoader.load(getClass().getResource(\"/View/AddCustomer.fxml\"));\n stage.setTitle(\"Add Customer\");\n stage.setScene(new Scene(scene));\n stage.show();\n }", "public void onShowMain(ActionEvent event) {\n try {\n Stage stage = (Stage) ((Button) event.getSource()).getScene().getWindow();\n Parent scene = FXMLLoader.load(getClass().getResource(\"/App/View/MainScreenView.fxml\"));\n stage.setTitle(\"Customer Schedule\");\n stage.setScene(new Scene(scene));\n stage.show();\n }\n catch (Exception e){\n System.out.println(e.getMessage());\n }\n }", "private void initStage() {\n stage = new Stage();\n stage.setTitle(\"Attentions\");\n stage.setScene(new Scene(root));\n stage.sizeToScene();\n }", "private void setStage() {\n\t\tstage = new Stage();\n\t\tstage.setScene(myScene);\n\t\tstage.setTitle(title);\n\t\tstage.show();\n\t\tstage.setResizable(false);\n//\t\tstage.setOnCloseRequest(e -> {\n//\t\t\te.consume();\n//\t\t});\n\t}", "public void start(Stage stage) {\n Layout layout = new Layout();\n Scene scene = new Scene(layout, 400, 400); \n stage.setScene(scene);\n layout.bindToScene(scene);\n new AppController(layout);\n stage.show();\n showInstructions();\n }", "@FXML\n void OnActionShowUpdateCustomerScreen(ActionEvent event) throws IOException {\n stage = (Stage)((Button)event.getSource()).getScene().getWindow();\n scene = FXMLLoader.load(getClass().getResource(\"/View/ModifyCustomer.fxml\"));\n stage.setTitle(\"Modify Customer\");\n stage.setScene(new Scene(scene));\n stage.show();\n }", "@FXML\r\n void onActionAddCustomer(ActionEvent event) throws IOException {\r\n\r\n stage = (Stage)((Button)event.getSource()).getScene().getWindow();\r\n scene = FXMLLoader.load(getClass().getResource(\"/view/AddCustomer.fxml\"));\r\n stage.setScene(new Scene(scene));\r\n stage.show();\r\n\r\n\r\n }", "@FXML\r\n void onActionCustomerReport(ActionEvent event) throws IOException {\r\n stage = (Stage)((Button)event.getSource()).getScene().getWindow();\r\n scene = FXMLLoader.load(getClass().getResource(\"/view/CustomerReport.fxml\"));\r\n stage.setScene(new Scene(scene));\r\n stage.show();\r\n }", "public CustomerViewDetails() {\n initComponents();\n Toolkit tk = Toolkit.getDefaultToolkit();\n int x = (int) tk.getScreenSize().getWidth();\n int y = (int) tk.getScreenSize().getHeight();\n this.setSize(x, y);\n }", "@Override\r\n\tpublic void setStageController(StageController stageController) {\n\t\tmyController = stageController;\r\n\t}", "public DifferentVehicleOwnerWindow() {\n stage = new Stage();\n person = null;\n\n birthNoLabel = new Label(\"Fødselsnummer:\");\n firstNameLabel = new Label(\"Fornavn:\");\n lastNameLabel = new Label(\"Etternavn:\");\n telephoneNoLabel = new Label(\"Telefonnummer:\");\n emailLabel = new Label(\"Email:\");\n zipCodeLabel = new Label(\"Postnummer:\");\n streetAddressLabel = new Label(\"Adresse:\");\n\n birthNoField = new TextField();\n firstNameField = new TextField();\n lastNameField = new TextField();\n telephoneNoField = new TextField();\n emailField = new TextField();\n zipCodeField = new TextField();\n streetAddressField = new TextField();\n\n registerOwnerButton = new Button(\"Registrer eier\");\n\n container = new GridPane();\n container.addColumn(0, birthNoLabel, firstNameLabel, lastNameLabel,\n telephoneNoLabel, emailLabel, zipCodeLabel,\n streetAddressLabel);\n container.addColumn(1, birthNoField, firstNameField, lastNameField,\n telephoneNoField, emailField, zipCodeField, streetAddressField,\n registerOwnerButton);\n container.backgroundProperty().setValue(\n new Background(new BackgroundFill(Color.web(\"D7EBE6\"),\n CornerRadii.EMPTY, Insets.EMPTY)));\n scene = new Scene(container);\n\n stage.setScene(scene);\n }", "@FXML\n void addNewCustomer(ActionEvent event) throws IOException {\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(getClass().getResource(\"/view/AddCustomer.fxml\"));\n loader.load();\n\n stage = (Stage)((Button)event.getSource()).getScene().getWindow();\n Parent scene = loader.getRoot();\n stage.setScene(new Scene(scene));\n stage.show();\n }", "@Override // Override the start method in the Application class\r\n /**\r\n * Start method for layout building\r\n */\r\n public void start(Stage primaryStage)\r\n {\n Scene scene = new Scene(pane, 370, 200);\r\n primaryStage.setTitle(\"Sales Conversion\"); // Set the stage title\r\n primaryStage.setScene(scene); // Place the scene in the stage\r\n primaryStage.show(); // Display the stage\r\n }", "public void showAddCustomerDialog() {\n\t\ttry {\n\t\t\tFXMLLoader loader = new FXMLLoader();\n\t\t\tloader.setLocation(MainApplication.class.getResource(\"view/AddCustomerDialog.fxml\"));\n\t\t\tAnchorPane page = (AnchorPane) loader.load();\n\t\t\tStage dialogStage = new Stage();\n\t\t\tdialogStage.setTitle(\"Add Customer\");\n\t\t\tdialogStage.initModality(Modality.WINDOW_MODAL);\n\t\t\tdialogStage.initOwner(primaryStage);\n\t\t\tScene scene = new Scene(page);\n\t\t\tdialogStage.setScene(scene);\n\t\t\tAddCustomerDialogController controller = loader.getController();\n\t\t\tcontroller.setDialogStage(dialogStage);\n\t\t\tdialogStage.showAndWait();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\t}\n\t}", "@Override\n public void show(final Stage primaryStage) {\n this.stage = primaryStage;\n\n view = viewProvider.get();\n\n nations = game\n .getHumanPlayer()\n .getNations()\n .stream()\n .sorted()\n .collect(Collectors.toList());\n\n deploymentViewModel.init();\n\n getAndBindViewModel();\n\n deploymentViewModel.setModel();\n\n view.show(stage, game.getScenario());\n\n markAllAirfields();\n\n registerCallbacks();\n registerTabChange();\n selectFirstTab();\n\n view.finish();\n\n view.getContinueButton().setOnAction(event -> continueButton());\n view.getBackButton().setOnAction(event -> backButton());\n }", "public void start(Stage stage) {\r\n // Setting our primaryStage variable to the stage given to us by init()\r\n primaryStage = stage;\r\n // Retrieving the primary scene (the first thing we want the user to see)\r\n Scene primaryScene = getPrimaryScene();\r\n // Setting the title of the stage, basically what the window says on the top left\r\n primaryStage.setTitle(\"SeinfeldMemeCycler\");\r\n // Setting the scene\r\n primaryStage.setScene(primaryScene);\r\n // Displaying the stage\r\n primaryStage.show();\r\n }", "@Override\n public void start( Stage window ) throws Exception\n {\n FXMLLoader loader = new FXMLLoader( Scrabble.class.getResource( \"/openingWindow.fxml\" ) );\n // Creating an instance of the controller of openingWindow.fxml to pass the object references\n OpeningWindowController OWController = new OpeningWindowController( Board, Pool, PlayerOne, PlayerTwo );\n loader.setController( OWController ); // setting the controller for openingWindow.fxml\n Parent root = (Parent) loader.load();\n window.setTitle( \"Scrabble\" );\n window.setScene( new Scene( root, 1028, 500 ) );\n window.setResizable( false ); // making the window fixed in size and not-resizable\n window.show();\n }", "public SetInfoWindow() {\n super(BasicWindow.curWindow,\"Stage Info\", true);\n //setTitle(\"Inventory Manager\");\n proj_class=(project)project.oClass;\n \n addComponents();\n populateComponents();\n setBounds(10,50, iScreenHeight,iScreenWidth);\n //setSize(500,500);\n setResizable(true);\n setVisible(true);\n }", "@Override\n public void init() // set up GUI\n {\n setLayout(new FlowLayout());\n\n customerView = new CustomerView(); // initialize customerView\n \n add(customerView); // add customerView to the GUI\n }", "public HomeView(Stage stage) {\n\n root = new GridPane();\n this.applicationScene = new Scene(root);\n stage.setScene(this.applicationScene);\n\n initializeGrid();\n stage.setWidth(1280.0);\n stage.setHeight(720.0);\n\n stage.setOnCloseRequest(e -> {\n // This function will shutdown simulation importer for warnings controller as well.\n GraphController.getInstance().shutdown();\n });\n // stage.setMaximized(true);\n\n stage.show();\n // Set minimum dimensions to 720p - Doesn't support below this\n stage.setMinHeight(720);\n stage.setMinWidth(1280);\n\n }", "public void start(Stage myStage) {\n myStage.setTitle(\"Character Recognizer\");\r\n\r\n // Create the HBox\r\n HBox rootNode = new HBox(10);\r\n rootNode.setPadding(new Insets(10, 10, 10, 10));\r\n\r\n //Initialize the Grid Canvas\r\n GridCanvas grid = new GridCanvas();\r\n\r\n //Initialize the Recognizer Controller\r\n RecognizerController controller = new RecognizerController(grid);\r\n\r\n // Create a scene.\r\n Scene myScene = new Scene(rootNode);\r\n rootNode.getChildren().addAll(controller, grid);\r\n\r\n // Set the scene on the stage\r\n myStage.setScene(myScene);\r\n\r\n // Parametrize and show the stage and its scene\r\n myStage.sizeToScene();\r\n myStage.setResizable(false);\r\n myStage.show();\r\n }", "@FXML\n void onActionAddCustomer(ActionEvent event) throws IOException {\n stage = (Stage) ((Button) event.getSource()).getScene().getWindow();\n scene = FXMLLoader.load(Objects.requireNonNull(getClass().getResource(\"/Views/AddCustomer.fxml\")));\n stage.setScene(new Scene(scene));\n stage.show();\n }", "@Override\n public void start(Stage primaryStage) {\n try {\n stage = primaryStage;\n stage.setTitle(\"Indie Airways\");\n stage.setMinWidth(WINDOW_WIDTH);\n stage.setMinHeight(WINDOW_HEIGHT);\n gotoLogin();\n //gotoMenu();\n primaryStage.show(); \n } catch (Exception ex) {\n Logger.getLogger(IndieAirwaysClient.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n }", "public MainScreen(GproToolController controller) {\n this.baseController = controller;\n \n initComponents();\n centerFrame();\n }", "@FXML\r\n\tpublic void viewTest( ) {\r\n\t\ttry {\r\n\t\t\tParent root2 = FXMLLoader.load(getClass().getResource(\"../view/TestView.fxml\"));\r\n\t\t\tMain.stage.setScene(new Scene (root2, 700, 500));\r\n\t\t\tMain.stage.show();\r\n\t\t} catch (Exception exception) {\r\n\t\t\texception.printStackTrace();\r\n\t\t}\r\n\t}", "@Override\n public void start(Stage stage) throws IOException {\n try {\n FXMLLoader fxmlLoader = new FXMLLoader(MainScreen.class.getResource(\"MainScreen.fxml\"));\n\n\n Parent root = fxmlLoader.load();\n MainScreen mainScreen = fxmlLoader.getController();\n Scene scene = new Scene(root);\n\n stage.setTitle(\"Inventory Management System\");\n stage.setScene(scene);\n stage.show();\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n }", "@FXML\r\n void visitationReport(ActionEvent event) {\r\n \tParent root ;\r\n try {\r\n \t root = FXMLLoader.load(getClass().getResource(ClientConstants.Screens.DEPARTMENT_VISITATION_REPORT.toString()));\r\n Stage stage = new Stage();\r\n stage.setTitle(\"department manager visitation report\");\r\n stage.setScene(new Scene(root,707, 893));\r\n stage.show();\r\n\t} catch(Exception e) {\r\n\t\te.printStackTrace();\r\n\t}\r\n }", "@Override\n public void start(Stage stage) {\n\n ModelImpl model = new ModelImpl(PuzzleLibrary.create());\n ControllerImpl controller = new ControllerImpl(model);\n Clues clues = model.GetClues();\n PuzzelView puzzle = new PuzzelView(controller, model, stage);\n model.addObserver(puzzle);\n stage.setScene(puzzle.getScene());\n stage.show();\n\n // GridPane g = new GridPane();\n // Scene scene = new Scene(g, 1000, 1000);\n // scene.getStylesheets().add(\"style/stylesheet.css\");\n // stage.setScene(scene);\n\n }", "public void initAndShowStage(Parent root) {\n Scene scene = new Scene(root);\n Stage stage = new Stage();\n stage.initModality(Modality.APPLICATION_MODAL);\n stage.setScene(scene);\n stage.setTitle(\"Ayuda para la Gestion de Usuarios\");\n stage.setResizable(false);\n stage.setMinWidth(800);\n stage.setMinHeight(600);\n stage.setOnShowing(this::handleWindowShowing);\n stage.show();\n }", "protected void setupViewControllers() {\r\n\t\tViewControlsLayer viewControlsLayer = new ViewControlsLayer();\r\n\t\t@SuppressWarnings(\"unused\")\r\n\t\tToolTipController toolTipController = new ToolTipController(getWWD(),\r\n\t\t\t\tAVKey.DISPLAY_NAME, null);\r\n\t\t@SuppressWarnings(\"unused\")\r\n\t\tHighlightController highlightController = new HighlightController(getWWD(),\r\n\t\t\t\tSelectEvent.ROLLOVER);\r\n\r\n\t\tinsertBeforeCompass(viewControlsLayer);\r\n\t\tgetWWD().addSelectListener(new ViewControlsSelectListener(getWWD(),\r\n\t\t\t\tviewControlsLayer));\r\n\t}", "public DraftKit_GUI(Stage initPrimaryStage) {\n primaryStage = initPrimaryStage;\n }", "public void initStage(Parent root){\r\n LOGGER.info(\"Initializing GUI009 stage\");\r\n Scene scene = new Scene(root);\r\n stage.setScene(scene);\r\n if(edit){\r\n txtFName.setText(th.getLocality());\r\n txtFEmail.setText(th.getEmail());\r\n txtFPhone.setText(th.getTelephoneNumber());\r\n }\r\n stage.setOnShowing(this::OnShowingHandlerTownHall);\r\n btnAccept.setOnAction((event) -> handleAccept(event));\r\n btnCancel.setOnAction((event) -> handleCancel(event));\r\n txtFName.textProperty().addListener(this::textChanged);\r\n txtFEmail.textProperty().addListener(this::textChanged);\r\n txtFPhone.textProperty().addListener(this::textChanged);\r\n \r\n }", "public void setStage(Stage stage) {\r\n this.stage = stage;\r\n }", "default void apriStageController(String fxml, FXController controller, Account account) throws IOException, SQLException {\n FXMLLoader loader = new FXMLLoader(getClass().getResource(fxml));\n Stage stage = new Stage();\n stage.getIcons().add(new Image(getClass().getResourceAsStream(\"resources/logo.png\")));\n stage.setScene(new Scene(loader.load()));\n controller = loader.getController();\n controller.initData(account);\n stage.setTitle(\"C3\");\n stage.showAndWait();\n }", "@Override\n\tpublic void start(Stage primaryStage) throws Exception {\n\t FXMLLoader loader = new FXMLLoader(getClass().getResource(\"/sample.fxml\"));\n Parent root = loader.load();\n primaryStage.setTitle(\"Tower Defence\");\n s = new Scene(root, 600, 480);\n primaryStage.setScene(s);\n primaryStage.show();\n MyController appController = (MyController)loader.getController();\n appController.createArena(); \t\t\n\t}", "@FXML\n public void OACustomers(ActionEvent event) throws IOException {\n stage = (Stage)((Button)event.getSource()).getScene().getWindow();\n scene = FXMLLoader.load(getClass().getResource(\"/View/Customers.fxml\"));\n stage.setScene(new Scene(scene));\n stage.show();\n\n }", "public void view() {\n\t\t\t\n\t\t\tSystem.out.println(\"Poping up window to show each order of customer @ AdminSaleController\");\n\t\t\tCustomerOrderMain vo = new CustomerOrderMain();\n\t\t vo.start(ps);\n\t\t\t\n\t\t}", "public WindowLoader(Stage primaryStage) {\n\t\tw = primaryStage;\n\t}", "@Override\n public void start(Stage primaryStage) throws Exception{\n Parent root = FXMLLoader.load(getClass().getResource(\"MainForm.fxml\"));\n primaryStage.setTitle(\"Inventory Management System\");\n primaryStage.setMinHeight(500);\n primaryStage.setMinWidth(800);\n primaryStage.setScene(new Scene(root, 1280, 720));\n primaryStage.show();\n\n\n }", "public void showSearchCustomerDialog() {\n\t\ttry {\n\t\t\tFXMLLoader loader = new FXMLLoader();\n\t\t\tloader.setLocation(MainApplication.class.getResource(\"view/SearchCustomerDialog.fxml\"));\n\t\t\tAnchorPane page = (AnchorPane) loader.load();\n\t\t\tStage searchCustomerDialogStage = new Stage();\n\t\t\tthis.searchCustomerDialogStage = searchCustomerDialogStage;\n\t\t\tsearchCustomerDialogStage.setTitle(\"Search Customer\");\n\t\t\tsearchCustomerDialogStage.initModality(Modality.WINDOW_MODAL);\n\t\t\tsearchCustomerDialogStage.initOwner(primaryStage);\n\t\t\tScene scene = new Scene(page);\n\t\t\tsearchCustomerDialogStage.setScene(scene);\n\t\t\tSearchCustomerDialogController searchCustomerDialogController = loader.getController();\n\t\t\tsearchCustomerDialogController.setDialogStage(searchCustomerDialogStage);\n\t\t\tsearchCustomerDialogController.setMainApp(this);\n\t\t\tsetSearchCustomerController(searchCustomerDialogController);\n\t\t\tsearchCustomerDialogStage.showAndWait();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t }\n\t}", "@Override\r\n\tpublic void start(Stage primaryStage) {\r\n\t\tthis.primaryStage=primaryStage;\r\n\t\tthis.primaryStage.setTitle(\"AmwayWinston\");\r\n\t\t\r\n\t\tinitRootLayout();\r\n\t\t\r\n\t\tshowPersonOverview();\r\n\t\t\r\n\t}", "public void showVendorsScreen(){\n try{\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(Game.class.getResource(\"view/VendorsScreen.fxml\"));\n mainScreenController.getSecondaryScreen().getChildren().clear();\n mainScreenController.getSecondaryScreen().getChildren().add((AnchorPane) loader.load());\n \n VendorsScreenController controller = loader.getController();\n controller.setGame(this);\n }catch(IOException e){\n }\n }", "public void setStage(Stage stage) {\n this.stage = stage;\n }", "public void setStage(Stage stage) {\n this.stage = stage;\n }", "public FinancialTrackerHelpWindow() {\n this(new Stage());\n }", "public void GetReportView()\n {\n try\n {\n FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource(\"/app/UI/JavaFX/Views/ReportView.fxml\"));\n Parent root = null;\n\n root = (Parent) fxmlLoader.load();\n ReportController reportController = fxmlLoader.getController();\n reportController.Initialize(this.reportTitle, this.reportContent);\n\n Stage stage = new Stage();\n stage.initModality(Modality.APPLICATION_MODAL);\n stage.initStyle(StageStyle.DECORATED);\n stage.setTitle(this.reportTitle);\n stage.setScene(new Scene(root));\n stage.show();\n }\n catch (Exception ex)\n {\n ex.printStackTrace();\n }\n }", "@Override\r\n public void start(Stage stage) throws Exception {\r\n \r\n FXMLLoader loader = new FXMLLoader(getClass().getResource(\"FXMLDocument.fxml\"));\r\n Parent root = loader.load();\r\n FXMLDocumentController controller = loader.getController();\r\n controller.injectBusiness(business);\r\n \r\n Scene scene = new Scene(root);\r\n \r\n stage.setScene(scene);\r\n stage.show();\r\n }", "private void buildWindow(){\r\n\t\tthis.setSize(new Dimension(600, 400));\r\n\t\tFunctions.setDebug(true);\r\n\t\tbackendConnector = new BackendConnector(this);\r\n\t\tguiManager = new GUIManager(this);\r\n\t\tmainCanvas = new MainCanvas(this);\r\n\t\tadd(mainCanvas);\r\n\t}", "public void openNewWindow(boolean setResizable, String stageName, String fxmlName) throws IOException {\r\n Stage stage = new Stage();\r\n // create a new window using FirstLaw gui\r\n try {\r\n Parent root = FXMLLoader.load(getClass().getResource(fxmlName));\r\n Scene scene = new Scene(root);\r\n stage.setScene(scene);\r\n // temp fixed min size of the stage\r\n stage.setMinWidth((1276 * 500)/ 716);\r\n stage.setMinHeight(500);\r\n //stage.setMaximized(true);\r\n stage.setResizable(setResizable);\r\n stage.initModality(Modality.APPLICATION_MODAL); // prevent from using the main windows\r\n stage.setTitle(stageName);\r\n stage.show();\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }", "@Override protected void startup() {\n BlaiseGraphicsTestFrameView view = new BlaiseGraphicsTestFrameView(this);\n canvas1 = view.canvas1;\n root1 = view.canvas1.getGraphicRoot();\n canvas1.setSelectionEnabled(true);\n show(view);\n }", "@Override\n public void start(Stage primaryStage) throws IOException {\n Main.primaryStage = primaryStage;\n Main.primaryStage.setTitle(\"American Travel Bucketlist\");\n\n //Call the extension of the FXMLLoader for the MainView.\n showMainView();\n }", "@Override\r\n\tpublic void start(Stage s) throws Exception {\n\t\tc=new Container();\r\n\t\tthis.st=s;\r\n\t\tc.setFs(new FirstScreen(st,c));\r\n\t\tthis.sc=new Scene(c.getFs(), 800,600);\r\n\t\tst.setScene(sc);\r\n\t\tst.setTitle(\"Main Window\");\r\n\t\tst.show();\r\n\t}", "@Override\r\n public void initialize(URL location, ResourceBundle resources) {\n adminLogOutButton.setOnAction(new EventHandler<ActionEvent>() {\r\n @Override\r\n public void handle(ActionEvent event) {\r\n Stage logoutStage = (Stage) adminLogOutButton.getScene().getWindow();\r\n logoutStage.close();\r\n FXMLLoader loader = new FXMLLoader();\r\n loader.setLocation(getClass().getResource(\"/sample/view/login.fxml\"));\r\n try {\r\n loader.load();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n Stage dashboardStage = new Stage();\r\n Parent root = loader.getRoot();\r\n dashboardStage.setTitle(\"Admin\");\r\n dashboardStage.setScene(new Scene(root));\r\n dashboardStage.show();\r\n //dashboardStage.setResizable(false);\r\n }\r\n });\r\n\r\n\r\n // clickable image view to More Info Window\r\n adminListImage.setOnMouseClicked(new EventHandler<MouseEvent>() {\r\n @Override\r\n public void handle(MouseEvent event) {\r\n moreInfo();\r\n }\r\n\r\n private void moreInfo() {\r\n adminListView.getScene().getWindow().hide();\r\n FXMLLoader loader = new FXMLLoader();\r\n loader.setLocation(getClass().getResource(\"/sample/view/studentInfo.fxml\"));\r\n try {\r\n loader.load();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n Stage studentInfo = new Stage();\r\n Parent root = loader.getRoot();\r\n studentInfo.setTitle(\"More Information\");\r\n studentInfo.setScene(new Scene(root));\r\n studentInfo.show();\r\n //studentInfo.setResizable(false);\r\n }\r\n });\r\n\r\n\r\n\r\n // button to open history window\r\n adminHistoryButton.setOnMouseClicked(new EventHandler<MouseEvent>() {\r\n @Override\r\n public void handle(MouseEvent event) {\r\n fullHistory();\r\n }\r\n\r\n private void fullHistory() {\r\n adminListView.getScene().getWindow().hide();\r\n FXMLLoader loader = new FXMLLoader();\r\n loader.setLocation(getClass().getResource(\"/sample/view/history.fxml\"));\r\n try {\r\n loader.load();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n Stage historyStage = new Stage();\r\n Parent root = loader.getRoot();\r\n historyStage.setTitle(\"History\");\r\n historyStage.setScene(new Scene(root));\r\n historyStage.show();\r\n //historyStage.setResizable(false);\r\n }\r\n });\r\n\r\n }", "public VisualizerView(VisualizerController vc) {\n\t\tsuper();\n\t\tcurrentDesign = 0;\n\n\t\tthis.setSize(FRAME_WIDTH, FRAME_HEIGHT);\n\t\tthis.setLayout(new BorderLayout());\n\t\tvisualizerPanel = new TitleCard();\n\t\tvisualizerPanel.setPreferredSize(new Dimension(FRAME_WIDTH, FRAME_HEIGHT));\n\t\tthis.add(visualizerPanel);\n\n\t\tJPanel buttonPanel = new JPanel();\n\t\tbuttonPanel.setLayout(new FlowLayout());\n\t\tthis.add(buttonPanel, BorderLayout.SOUTH);\n\n\t\tchooser = new JFileChooser();\n\t\tfileButton = new JButton(\"Choose File\");\n\t\tfileButton.setActionCommand(\"FILE CHOSEN\");\n\t\tfileButton.addActionListener(vc);\n\t\tbuttonPanel.add(fileButton);\n\n\t\tplayButton = new JButton(\"►\");\n\t\tplayButton.setActionCommand(\"PLAY/PAUSE\");\n\t\tplayButton.addActionListener(vc);\n\t\tbuttonPanel.add(playButton);\n\n\t\tJComboBox<String> designChooser = new JComboBox<>(DESIGN_OPTIONS);\n\t\tdesignChooser.setActionCommand(\"DESIGN CHANGE\");\n\t\tdesignChooser.addActionListener(vc);\n\t\tbuttonPanel.add(designChooser);\n\t}", "@Override\n public void start(Stage stage) {\n try {\n // Initialize GUI\n FXMLLoader fxmlLoader = new FXMLLoader(DukeGui.class.getResource(\"/view/MainWindow.fxml\"));\n AnchorPane ap = fxmlLoader.load();\n\n // Initialize Duke with output set to GUI\n this.duke = new Duke(new OutputHandlerForGui(fxmlLoader.<MainWindow>getController()));\n\n // Display GUI\n Scene scene = new Scene(ap);\n stage.setScene(scene);\n stage.setTitle(\"Duke\");\n fxmlLoader.<MainWindow>getController().setDukeGui(this);\n stage.show();\n\n this.duke.initialize();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void appointmentsButtonAction(ActionEvent event) {\r\n\t\t\ttry {\r\n\t\t\t\tParent root;\r\n\t\t\t\tStage stage = (Stage) appointmentsButton.getScene().getWindow();\r\n\t\t\t\troot = FXMLLoader.load(getClass().getResource(\"/views/AppointmentScreen.fxml\"));\r\n\t\t\t\tScene scene = new Scene(root);\r\n\t\t\t\tstage.setScene(scene);\r\n\t\t\t\tstage.setResizable(false);\r\n\t\t\t\tstage.show();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}", "private void loadMainUserScene(javafx.event.ActionEvent event, Customer customer) throws Exception {\n stageManager.switchScene(FxmlView.USER, customer);\n }", "public void launchProcWindow() {\n\t\t\n\t\ttry {\n\t\t\tdbProcRoot = new ProcController(this);\n\t\t\tScene scene = new Scene(dbProcRoot.getRootView(), 640, 480);\n\t\t\tmainStage.setScene(scene);\n\t\t} catch(IOException e ) {\n\t\t\tsendConnectionError(e.toString(), true);\n\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 public void start(Stage stage) throws Exception {\n \tBeanContext.getStage(\"a\").show();\n }", "@Override\n public void start(Stage stage) throws Exception \n {\n \n FXMLLoader appMainLoader = new FXMLLoader(getClass().getResource(Resources.app_main));\n\n Parent root = (Parent)appMainLoader.load();\n root.prefHeight(600);\n root.prefWidth(1100);\n\n AppMainController appMainController = appMainLoader.getController();\n appMainController.setAppLauncher(this);\n\n// stage.initStyle(StageStyle.UNDECORATED);\n stage.setResizable(false);\n stage.setMaxHeight(600);\n stage.setMaxWidth(1000);\n\n Scene scene = new Scene(root, Color.TRANSPARENT);\n scene.getStylesheets().add(Resources.app_css);\n \n stage.setTitle(\"Hims-Lab Equipment Interface\");\n stage.setScene(scene);\n stage.show();\n //init();\n }", "public void showConsumableVendorScreen(){\n try{\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(Game.class.getResource(\"view/VendorSelectedScreen.fxml\"));\n mainScreenController.getSecondaryScreen().getChildren().clear();\n mainScreenController.getSecondaryScreen().getChildren().add((AnchorPane) loader.load());\n \n VendorSelectedScreenController controller = loader.getController();\n controller.setGame(this, gameData.getConsumableVendor());\n }catch(IOException e){\n }\n }", "public HudTopController(Stage stage) {\n root = CompositionRoot.getInstance();\n HudBuildController hudBuildController = new HudBuildController(stage);\n HudCarsController hudCarsController = new HudCarsController(stage);\n HudSettingsController hudSettingsController = new HudSettingsController(stage);\n\n view = new HudTopView(stage);\n\n // LEFT\n view.pauseButton.addListener((ClickListener) (event, actor) -> root.simulationController.togglePaused());\n view.saveButton.addListener((ClickListener) (event, actor) -> {\n root.floorsController.toJson();\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"dd.MMM.yyyy HH.mm\");\n String savePath = dateFormat.format(new Date(System.currentTimeMillis())) + \".parkingsimulatortycoon\";\n Dialogs.showOKDialog(stage, \"Save Complete\", savePath);\n });\n view.speedSlider.addListener(event -> {\n root.simulationController.setUpdatesPerSecond((int)(view.speedSlider.getValue()));\n return true;\n });\n view.floorUp.addListener((ClickListener) (event, actor) -> root.floorsController.moveUpOneFloor());\n view.floorDown.addListener((ClickListener) (event, actor) -> root.floorsController.moveDownOneFloor());\n\n // RIGHT\n view.deletedButton.addListener((ClickListener) (event, actor) -> root.bluePrintsController.toggleDemolishMode() );\n view.buildButton.addListener((ClickListener) (event, actor) -> hudBuildController.show(stage));\n view.carsButton.addListener((ClickListener) (event, actor) -> hudCarsController.show(stage));\n view.settings.addListener((ClickListener) (event, actor) -> hudSettingsController.show(stage));\n }", "private void initWindow(String windowTitle) {\n // SET THE WINDOW TITLE\n primaryStage.setTitle(windowTitle);\n\n // GET THE SIZE OF THE SCREEN\n Screen screen = Screen.getPrimary();\n Rectangle2D bounds = screen.getVisualBounds();\n\n // AND USE IT TO SIZE THE WINDOW\n primaryStage.setX(bounds.getMinX());\n primaryStage.setY(bounds.getMinY());\n primaryStage.setWidth(bounds.getWidth());\n primaryStage.setHeight(bounds.getHeight());\n\n // ADD THE TOOLBAR ONLY, NOTE THAT THE WORKSPACE\n // HAS BEEN CONSTRUCTED, BUT WON'T BE ADDED UNTIL\n // THE USER STARTS EDITING A COURSE\n draftPane = new BorderPane();\n draftPane.setTop(fileToolbarPane);\n primaryScene = new Scene(draftPane);\n\n // NOW TIE THE SCENE TO THE WINDOW, SELECT THE STYLESHEET\n // WE'LL USE TO STYLIZE OUR GUI CONTROLS, AND OPEN THE WINDOW\n primaryScene.getStylesheets().add(PRIMARY_STYLE_SHEET);\n primaryStage.setScene(primaryScene);\n primaryStage.show();\n }", "@Override\n public void start (Stage stage) throws IOException {\n init.start(stage);\n myScene = view.makeScene(50,50);\n stage.setScene(myScene);\n stage.show();\n }", "public ControlView (SimulationController sc){\n myProperties = ResourceBundle.getBundle(\"english\");\n myStartBoolean = false;\n mySimulationController = sc;\n myRoot = new HBox();\n myPropertiesList = sc.getMyPropertiesList();\n setView();\n\n }", "@FXML\r\n public void customerLogin(MouseEvent event) throws IOException {\r\n System.out.println(\"Customer Login Button Clicked.\");\r\n Parent root2 = FXMLLoader.load(getClass().getResource(\"Customer.fxml\"));\r\n Scene customerView = new Scene(root2, 700, 500);\r\n Stage appStage = (Stage) ((Node) event.getSource()).getScene().getWindow();\r\n appStage.setScene(customerView);\r\n customerView.getStylesheets().add\r\n (getClass().getResource(\"Customer.css\").toExternalForm());\r\n appStage.show();\r\n }", "public void start(Stage myStage) { \n \n System.out.println(\"Inside the start() method.\"); \n \n // Give the stage a title. \n myStage.setTitle(\"JavaFX Skeleton.\"); \n \n // Create a root node. In this case, a flow layout \n // is used, but several alternatives exist. \n FlowPane rootNode = new FlowPane(); \n \n // Create a scene. \n Scene myScene = new Scene(rootNode, 300, 200); \n \n // Set the scene on the stage. \n myStage.setScene(myScene); \n \n // Show the stage and its scene. \n myStage.show(); \n }", "private void StageAdjustment() {\n addFoodPane.getChildren().addAll(fiberLabel, caloriesLabel, fatLabel, carbohydrateLabel,\n proteinLabel, name, nameLabel, fiber, calories, fat, carbohydrate, protein, confirm, cancel,\n id, idLabel);\n // create a new scene with the size 300x350 based on addFoodPane\n this.addFoodScene = new Scene(addFoodPane, 300, 350);\n this.setScene(addFoodScene);\n this.setTitle(\"Add Food\");// set the title of the stage\n this.setResizable(false);// fix the size of the stage\n // protects user from accidentally click other session\n this.initModality(Modality.APPLICATION_MODAL);\n }", "@Override\n public void start(Stage stage) throws Exception {\n StackPane rootMain = new StackPane();\n FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource(\"HotelView.fxml\"));\n Parent rootHotelView = fxmlLoader.load();\n rootMain.getChildren().add(rootHotelView);\n \n // Cargamos la base de datos y la guardamos en la variable 'em'\n emf = Persistence.createEntityManagerFactory(\"AppHotelPU\");\n em = emf.createEntityManager();\n \n // Cargamos el hotelView y le pasamos el entityManager\n HotelViewController hotelView = (HotelViewController)fxmlLoader.getController();\n hotelView.setEntityManager(em);\n \n Scene scene = new Scene(rootMain);\n stage.setTitle(\"Nehalem Hotel\");\n stage.setScene(scene);\n stage.show();\n }", "@Override\r\n public void start(Stage primaryStage) {\n VFlow flow = FlowFactory.newFlow();\r\n\r\n // make it visible\r\n flow.setVisible(true);\r\n\r\n // create two nodes:\r\n // one leaf node and one subflow which is returned by createNodes\r\n createFlow(flow, 3, 6);\r\n\r\n // show the main stage/window\r\n showFlow(flow, primaryStage, \"VWorkflows Tutorial 05: View 1\");\r\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}", "@Override protected void startup() {\n show(new FrontView());\n //show(new RestaurantManagementView(this));\n }", "DialogTicketController(GameLogic gl, JavaFXGUI gui, boolean taxi, boolean bus, boolean underground, boolean black, int taxiTicketNumber, int busTicketNumber, int undergroundTicketNumber, int blackTicketNumber) {\n\n this.gl = gl;\n thisStage = new Stage();\n\n // Load the FXML file\n try {\n FXMLLoader loader = new FXMLLoader(getClass().getResource(\"/gui/DialogTicket.fxml\"));\n loader.setController(this);\n thisStage.setScene(new Scene(loader.load()));\n thisStage.setTitle(\"Ticket für die nächste Station wählen\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n // Checks What Button/Label to show and what to hide (depending on current Ticket Numbers)\n if (bus) {\n this.busLabel.setText(String.valueOf(busTicketNumber) + \"x\");\n } else {\n this.busLabel.setVisible(false);\n this.busButton.setVisible(false);\n }\n\n if (taxi) {\n this.taxiLabel.setText(String.valueOf(taxiTicketNumber) + \"x\");\n } else {\n this.taxiLabel.setVisible(false);\n this.taxiButton.setVisible(false);\n }\n\n if (underground) {\n this.undergroundLabel.setText(String.valueOf(undergroundTicketNumber) + \"x\");\n } else {\n this.undergroundLabel.setVisible(false);\n this.undergroundButton.setVisible(false);\n }\n\n if (black) {\n this.blackLabel.setText(String.valueOf(blackTicketNumber) + \"x\");\n } else {\n this.blackLabel.setVisible(false);\n this.blackButton.setVisible(false);\n }\n\n thisStage.show();\n }", "public void createAndShowGUI() {\n\t\tcontroller = new ControllerClass(); \r\n\r\n\t\t// Create and set up the window\r\n\t\twindowLookAndFeel();\r\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tsetTitle(\"Media Works - Add Screen\");\r\n\t\tsetResizable(false);\r\n\t\tadd(componentSetup());\r\n\t\tpack();\r\n\t\tsetSize(720,540);\r\n\t\tsetLocationRelativeTo(null);\r\n\t\tsetVisible(true);\r\n\t}", "@FXML\r\n void onActionContactReport(ActionEvent event) throws IOException {\r\n stage = (Stage)((Button)event.getSource()).getScene().getWindow();\r\n scene = FXMLLoader.load(getClass().getResource(\"/view/Reports.fxml\"));\r\n stage.setScene(new Scene(scene));\r\n stage.show();\r\n }", "@Override\r\n\tpublic void start(Stage stage) throws Exception {\r\n\t\t\r\n\t\tthis.stage = stage;\r\n\t\t\r\n\t\tstage.setTitle(windowName);\r\n\r\n\t\tPlatform.setImplicitExit(false);\r\n\r\n\t\tFXMLLoader loader = new FXMLLoader();\r\n\r\n\t\tloader.setClassLoader(this.getClass().getClassLoader());\r\n\t\t\r\n\t\tParent box = loader.load(new ByteArrayInputStream(fxml.getBytes()));\r\n\t\t\r\n\t\tcontroller = loader.getController();\r\n\t\t\r\n\t\tcontroller.setGUI(this);\r\n\r\n\t\tscene = new Scene(box);\r\n\t\t\r\n\t\tscene.setFill(Color.TRANSPARENT);\r\n\r\n\t\tif (this.customTitleBar)\r\n\t\t\tstage.initStyle(StageStyle.UNDECORATED);\r\n\t\t\r\n\t\tif (this.css != null)\r\n\t\t\tscene.getStylesheets().add(this.css.toExternalForm());\r\n\t\tstage.setScene(scene);\r\n\t\t\r\n\t\tstage.setResizable(false);\r\n\r\n\t\tstage.setOnCloseRequest(new EventHandler<WindowEvent>() {\r\n\r\n\t @Override\r\n\t public void handle(WindowEvent event) {\r\n\t Platform.runLater(new Runnable() {\r\n\r\n\t @Override\r\n\t public void run() {\r\n\t endScript();\r\n\t }\r\n\t });\r\n\t }\r\n\t });\r\n\t\t\r\n\t}", "@FXML\n private void handleManageClients(ActionEvent event) {\n try {\n LOGGER.log(Level.INFO, \"Redirecting to ClientManagement window.\");\n FXMLLoader loader = new FXMLLoader(getClass()\n .getResource(\"/reto2desktopclient/view/ClientManagement.fxml\"));\n Parent root = (Parent) loader.load();\n //Getting window controller.\n ClientManagementController controller = (loader.getController());\n controller.setStage(stage);\n //Initializing stage.\n controller.initStage(root);\n } catch (IOException ex) {\n LOGGER.log(Level.SEVERE, \"Could not switch to ClientManagement window: {0}\", ex.getMessage());\n showErroAlert(\"Could not switch to Client Management window due to an\"\n + \" unexpected error, please try later.\");\n }\n }", "@Override\n public void start(Stage stage) throws Exception {\n Parent root = FXMLLoader.load(getClass().getResource(\"calories.fxml\"));\n stage.setTitle(\"Calories\");\n stage.setScene(new Scene(root,400,700));\n stage.getScene().getStylesheets().add(getClass().getResource(\"styles.css\").toExternalForm());\n stage.show();\n }", "public void setStage(String title, String resource) throws IOException, ClassNotFoundException {\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(getClass().getResource(resource));\n root = (AnchorPane)loader.load();\n //figure out which controller to show\n switch (resource){\n case \"../view/admin.fxml\":\n adminController = loader.getController();\n adminController.start(window);\n break;\n case \"../view/nonadmin.fxml\":\n nonAdminController = loader.getController();\n nonAdminController.start(window);\n break;\n case \"../view/login.fxml\":\n controller = loader.getController();\n controller.start(window);\n break;\n case \"../view/openAlbum.fxml\":\n openAlbumController = loader.getController();\n openAlbumController.start(window);\n break;\n case \"../view/searchPhotos.fxml\":\n searchPhotosController = loader.getController();\n searchPhotosController.start(window);\n break;\n case \"../view/slideshow.fxml\":\n slideShowController = loader.getController();\n slideShowController.start(window);\n break;\n default:\n throw new ClassNotFoundException();\n }\n Scene scene = new Scene(root, 714.0, 440.0);\n window.setScene(scene);\n window.setTitle(title);\n window.setResizable(false);\n window.show();\n }", "private void showCreateNewPlayer(){\n try{\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(Game.class.getResource(\"view/CreateNewPlayer.fxml\"));\n AnchorPane janela = (AnchorPane) loader.load();\n \n Stage createNewPlayerStage = new Stage();\n createNewPlayerStage.setTitle(\"Create new player\");\n createNewPlayerStage.initModality(Modality.WINDOW_MODAL);\n createNewPlayerStage.initOwner(primaryStage);\n Scene scene = new Scene(janela);\n createNewPlayerStage.setScene(scene);\n \n CreateNewPlayerController controller = loader.getController();\n controller.setGame(this);\n controller.setCreateNewPlayerStage(createNewPlayerStage); \n \n createNewPlayerStage.showAndWait();\n }catch(IOException e){\n }\n }", "public CreateUAV(){\n createStage = new Stage();\n createStage.setTitle(\"UAV Setup\");\n createStage.initModality(Modality.APPLICATION_MODAL);\n setupOverwriteDialog();\n }", "public CustomerAddInterFrm() {\r\n\t\tinitComponents();\r\n\t\tthis.setLocation(200, 100);\r\n\t}", "@Override\r\n\tpublic void start(Stage primaryStage) throws IOException {\n\t Parent root = FXMLLoader.load(getClass().getResource(\"WeatherView.fxml\"));\r\n\t \r\n\t //setting the title of the stage\r\n\t primaryStage.setTitle(\"Weather Forecast\");\r\n\t \r\n\t //Setting the scene in the stage\r\n\t primaryStage.setScene(new Scene(root));\r\n\t \r\n\t //this method shows the stage\r\n\t primaryStage.show();\r\n\t \r\n\t \r\n\t \r\n\t \r\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(100, 100, 453, 301);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\tJLabel lblEditTitle = new JLabel(\"EDIT CUSTOMER\");\n\t\tlblEditTitle.setBounds(0, 0, 437, 27);\n\t\tlblEditTitle.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlblEditTitle.setFont(new Font(\"Tahoma\", Font.PLAIN, 22));\n\t\tframe.getContentPane().add(lblEditTitle);\n\t\t\n\t\tJLabel lblNewLabel = new JLabel(\"Customer CPF to edit:\");\n\t\tlblNewLabel.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblNewLabel.setBounds(20, 116, 138, 14);\n\t\tframe.getContentPane().add(lblNewLabel);\n\t\t\n\t\ttextFieldCpfToEdit = new JTextField();\n\t\ttextFieldCpfToEdit.setBounds(178, 115, 219, 20);\n\t\tframe.getContentPane().add(textFieldCpfToEdit);\n\t\ttextFieldCpfToEdit.setColumns(10);\n\t\t\n\t\tJButton btnEdit = new JButton(\"edit\");\n\t\tbtnEdit.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tbtnEdit.setBounds(163, 206, 89, 23);\n\t\tframe.getContentPane().add(btnEdit);\n\t\tbtnEdit.addActionListener(new ActionListener() {\n\t\t\t\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tEditCustomerMenuView.main(null);\n\t\t\t\tframe.dispose();\n\t\t\t}\n\t\t});\n\t}", "public void Scene() {\n Scene scene = new Scene(this.root);\n this.stage.setScene(scene);\n this.stage.show();\n }", "@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 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 }", "private void showDebugWindow(Scene scene, Injector injector) {\n ViewLoader viewLoader = injector.getInstance(ViewLoader.class);\n View debugView = viewLoader.load(DebugView.class);\n Parent parent = (Parent) debugView.getRoot();\n Stage stage = new Stage();\n stage.setScene(new Scene(parent));\n stage.setTitle(\"Debug window\"); // Don't translate, just for dev\n stage.initModality(Modality.NONE);\n stage.initStyle(StageStyle.UTILITY);\n stage.initOwner(scene.getWindow());\n stage.setX(primaryStage.getX() + primaryStage.getWidth() + 10);\n stage.setY(primaryStage.getY());\n stage.show();\n }", "public void displayMainScreen(ActionEvent event) throws IOException {\n Parent parent = FXMLLoader.load(getClass().getResource(\"/View_Controller/MainScreen.fxml\"));\n Scene targetScene = new Scene(parent);\n\n Stage window = (Stage) ((Button) event.getSource()).getScene().getWindow();\n window.setScene(targetScene);\n window.show();\n }", "private void setUpVC() {\n\t\tinitializePackageModel();\n\t\tinitializeRootLayout();\n\t\tinitializeStepCountView();\n\t\tinitializeButtonToScanForBluetoothDevices();\n\t\tinitializeButtonToSendCommands();\n\t\taddAllViewsToRootLayout();\n\t\tinitializeUARTControlFragmentInterface();\n\t\tsetListenerOnLaunchScanForBluetoothDevices();\n\t\tsetListenerOnButtonToSendCommands();\n\t}", "public void setupScene() {\n\t\tplayScene = new Scene(new Group());\n\t\tupdateScene(playScene);\n\t\twindow.setScene(playScene);\n\t\twindow.show();\n\t}", "@Override\n public void start (Stage primaryStage) {\n Group root = new Group();\n Scene scene = new Scene(root, AppConstants.STAGE_WIDTH, AppConstants.STAGE_HEIGHT);\n ModulePopulator = new ModuleCreationHelper(root, scene, primaryStage);\n view = new View();\n scene.setFill(AppConstants.BACKGROUND_COLOR);\n // scene.getStylesheets().add(getClass().getResource(\"application.css\").toExternalForm());\n view.init(root, ModulePopulator);\n ModulePopulator.setView(view);\n ModulePopulator.createMainPageModules();\n view.initRunner(root, ModulePopulator);\n primaryStage.setTitle(\"SLogo!\");\n primaryStage.setScene(scene);\n primaryStage.show();\n\n System.out.println(\"App Has Started!\");\n }", "public void loadGameCanvasView()\n\t{\n\t\ttry {\n\t\t\tprimaryStage.setTitle(\"Onitama\");\n\t\t\tGridPane root = new GridPane();\n\t\t\tFXMLLoader loader = new FXMLLoader(getClass().getResource(\"/view/GameCanvas.fxml\"));\n\t\t\troot = loader.load();\n\t\t\tGameCanvasViewController viewController = (GameCanvasViewController) loader.getController();\n\t\t\tviewController.setOnitamaController(onitamaController);\n\t\t\tviewController.init();\n\n\t\t\tScene scene = new Scene(root);\n\t \t// this fixes java bug when change scnene after dialog\n\t\t\t// javafx bug https://bugs.openjdk.java.net/browse/JDK-8140491\n\t\t\tPlatform.runLater(() -> { \n\t\t\t\tLoadViewController.primaryStage.setScene(scene);\n\t\t\t});\n\t\t\t//LoadViewController.primaryStage.setScene(scene);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n\tpublic void start(Stage stage) throws Exception {\n\t\tSideMenu sidemenu = new SideMenu(canvas);\n\t\tgridpane.add(sidemenu, 0, 0);\n\t\tgridpane.add(canvas, 1, 0);\n\t\t\n\t\tScene scene = new Scene(gridpane);\n\t\t\n\t\tstage.setScene(scene);\n\t\tstage.sizeToScene();\n\t\t\n\t\tstage.setTitle(\"Make your own Dot Drawing - By Joeri\");\n\t\tstage.show();\n\t\t\n\t\tstage.setMinWidth(stage.getWidth());\n\t\tstage.setMinHeight(stage.getHeight());\n\t}", "public void start(Stage stage){\n //set the class fields for the stage and app controller\n this.stage = stage;\n this.appController = AppController.getInstance();\n appController.setStage(stage);\n //load FXML\n //each screen requires the following\n //a \"Parent screenNameRoot\" object to hold the controller for each screen\n //a \"ScreenName screenName\" object of the ScreenName class for each screen that exists\n //a \"FXMLLoader screenNameLoader = new FXMLLoader(this.getClass().getResource(\"fxml/fxmlFileName.fxml\"));\" object to load the controller from FXML\n //an entry in the try/catch block that does the following (should catch IOException)\n //sets the screenNameRoot object to screenNameLoader.load()\n //sets the screenName object to screenNameLoader.getController()\n Parent whoAmIScreenRoot = null;\n FXMLLoader whoAmIScreenLoader = new FXMLLoader(this.getClass().getResource(\"fxml/whoAreYouScene.fxml\"));\n WhoAmIScreen whoAmIScreen = null;\n\n try{ \n whoAmIScreenRoot = whoAmIScreenLoader.load();\n whoAmIScreen = whoAmIScreenLoader.getController();\n }\n catch(IOException e){\n System.out.println(e.getMessage());\n System.out.println(\"Failed to load FXML\");\n System.exit(1);\n }\n\n //set the title for the window (not super important since this application would be embedded in a web page where this wouldn't be visible, but done anyway for posterity)\n stage.setTitle(\"Potluck Main Menu\");\n\n //create scenes for each screen\n Scene whoAmIScreenScene = new Scene(whoAmIScreenRoot);\n\n\n //give AppController references to scenes and objects\n appController.setWhoAmIScreen(whoAmIScreen);\n appController.setWhoAmIScreenScene(whoAmIScreenScene);\n\n //set stage's current scene to the WhoAmIScreenScene cause that's the default\n stage.setScene(whoAmIScreenScene);\n\n //must be final call in the function, tells JavaFX to start the app\n stage.show();\n }", "public ShowView() {\n\t\tsuper(null);\n\t\tcreateActions();\n\t\taddToolBar(SWT.FLAT | SWT.WRAP);\n\t\taddMenuBar();\n\t\taddStatusLine();\n\t}", "void createStage(Stage stage){\n\t\tstage.setHeight(background.getHeight()+25);//displays full image (1)\r\n\t\tstage.setWidth(background.getWidth());\r\n\t\tshowBackground.setFitWidth(stage.getWidth());\r\n\t\tshowBackground.setFitHeight(stage.getHeight()-23);//displays full image (1)\r\n\t\r\n\t\tstage.setAlwaysOnTop(true);\r\n\t\tstage.setResizable(false);\r\n\t\t\r\n\t\t//launches first window in center of screen. \r\n\t\tstage.centerOnScreen();\r\n\t\tstage.setScene(mainScene);\r\n\t\tstage.setTitle(\"Don't Play Games in Class\");\r\n\t\t//supposed to prevent window from being moved\r\n\t\t\r\n\t\t//removes minimize, maximize and close buttons\r\n\t\t//unused because replacing the \r\n\t\t//stage.initStyle(StageStyle.UNDECORATED);\r\n\t\t\r\n\t\t//removes minimize and maximize button\r\n\t\tstage.initStyle(StageStyle.UTILITY);\r\n\t\t\r\n\t\t//replaces the closed window in the center of the screen.\r\n\t\tRespawn launch = new Respawn();\r\n\t\tstage.setOnCloseRequest(launch);\r\n\t}", "@Override\n public void start(Stage primaryStage) {\n\n pStage = primaryStage;\n\n try {\n\n\n Parent root = FXMLLoader.load(getClass().getResource(\"/GUI.fxml\"));\n\n Scene scene = new Scene(root, 600, 400);\n\n primaryStage.setTitle(\"Shopper 5000 Ultimate\");\n\n primaryStage.setResizable(false);\n primaryStage.setScene(scene);\n primaryStage.show();\n\n } catch(Exception e) {\n e.printStackTrace();\n }\n }", "@Override\n public void start(Stage primaryStage) {\n\n // Creates the scene and displays it to the main window\n Scene withDrawPaneSetup = new Scene(withDrawPaneSetup(primaryStage), 1024, 768);\n primaryStage.setScene(withDrawPaneSetup);\n }" ]
[ "0.69327533", "0.68800807", "0.68695855", "0.68144906", "0.67787087", "0.67380816", "0.66480017", "0.6635878", "0.6526109", "0.6490422", "0.6490247", "0.6463484", "0.6442915", "0.64304906", "0.6419746", "0.64007217", "0.63560474", "0.6343474", "0.6326281", "0.6322384", "0.631461", "0.63000214", "0.6293288", "0.62886816", "0.6281904", "0.62728405", "0.6266536", "0.6251522", "0.62424755", "0.62250274", "0.62183374", "0.62169814", "0.62112385", "0.6202992", "0.6199444", "0.6192037", "0.61817175", "0.61795145", "0.6160026", "0.6152492", "0.61068237", "0.6105084", "0.60991365", "0.60991365", "0.60968804", "0.6092674", "0.6079044", "0.6066743", "0.6065242", "0.6059172", "0.6051277", "0.6049507", "0.60482407", "0.6034357", "0.60332614", "0.60302854", "0.6027427", "0.6021698", "0.601673", "0.6016456", "0.60133445", "0.6008817", "0.6008289", "0.59983134", "0.5998021", "0.5984523", "0.59787554", "0.5978137", "0.5976055", "0.5971985", "0.5966763", "0.59633327", "0.5955734", "0.59554917", "0.59542304", "0.5951876", "0.5945319", "0.5943888", "0.59436643", "0.5942473", "0.59418464", "0.59409153", "0.59400713", "0.5937421", "0.59372836", "0.5934891", "0.59340143", "0.5931824", "0.5928693", "0.59284806", "0.5926132", "0.5922048", "0.5921444", "0.5914132", "0.5911549", "0.590563", "0.5901171", "0.59001106", "0.58991516", "0.5896446" ]
0.6694757
6
Set the customer information dialog appropriately based on one (or no) selection
private void showCustomerInfoDialog(Customer customer) { try { // set up the root for the customer information dialog FXMLLoader loader = new FXMLLoader(); loader.setLocation(C195Application.class.getResource("view/AddCustomer.fxml")); loader.setResources(lang); AnchorPane customerInfoRoot = (AnchorPane) loader.load(); // set up the stage for the customer information dialog Stage customerInfoStage = new Stage(); customerInfoStage.setTitle(""); customerInfoStage.initModality(Modality.WINDOW_MODAL); customerInfoStage.initOwner(stage); // add a new scene with the root to the stage Scene scene = new Scene(customerInfoRoot); customerInfoStage.setScene(scene); // get the controller for the dialog and pass a reference // the customer info dialog stage, and a customer, if one was selected AddCustomerController controller = loader.getController(); controller.setupDialog(customerInfoStage, customer); // show the customer information dialog customerInfoStage.showAndWait(); // refresh the customer list after an update Customer newCustomer = controller.getNewCustomer(); if (newCustomer == null) return; if(customer == null) { customers.add(newCustomer); } else { customers.set(customers.indexOf(customer), newCustomer); } } catch (IOException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@FXML\n\tprivate void handleEdit() {\n\t\tCustomer customer = customerTable.getSelectionModel().getSelectedItem();\n\t\tshowCustomerInfoDialog(customer);\n\t}", "public static void viewCustomerInfo() {\n\t\tSystem.out.println(\"Please enter customer name\");\n\t\tString firstName=scan.nextLine();\n\t\tCustomer c=Bank.findCustomerByName(firstName);\n\t\tFind find=new Find();\n\t\tfind.viewCustomerDetails(c);\n\n\t\tSystem.out.println(\"Customer: \" + c.getFirstName() + \" \" + c.getLastName() + \" \"+ c.getUserName() + \" \"+ c.getPassword() \n\t\t+ \" \" + c.getDriverLicense() + \" \" + c.getAccountType() + \" \"+ c.getInitialDeposit() + \" \" + \"was viewed\");\n\t\tLogThis.LogIt(\"info\", c.getFirstName() + \" \" + c.getLastName()+ \" was viewed!\");\n\n\t\tSystem.out.println(\"Would you like to find another customer?\");\n\n\t\tSystem.out.println(\"\\t[y]es\");\n\t\tSystem.out.println(\"\\t[n]o\");\n\t\tSystem.out.println(\"\\t[l]og Out\");\n\n\n\t\tString option = scan.nextLine();\n\t\tswitch(option.toLowerCase()) {\n\t\tcase \"y\":\n\t\t\tviewCustomerInfo();\n\t\t\tbreak;\n\t\tcase \"n\":\n\t\t\tstartMenu();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tSystem.out.println(\"Invalid input. Redirecting to main menu\");\n\t\t\tstartMenu();\n\n\t\t}\n\t}", "private void fillExistingCustomer() {\n idField.setText(String.valueOf(existingCustomer.getCustomerID()));\n nameField.setText(existingCustomer.getCustomerName());\n String[] splitAddress = existingCustomer.getAddress().split(\", \");\n addressField.setText(splitAddress[0]);\n if ( splitAddress.length > 1 ) {\n cityField.setText(splitAddress[1]);\n }\n postalField.setText(existingCustomer.getPostalCode());\n phoneField.setText(existingCustomer.getPhone());\n\n FirstLevelDivision division = getDivisionByID(existingCustomer.getDivisionID());\n divisionComboBox.getSelectionModel().select(division);\n countryComboBox.getSelectionModel().select(getCountryByID(division.getCountryID()));\n }", "public void setCustomer(Customer customer) {\r\n \r\n this.customer = customer;\r\n \r\n if (customer != null) {\r\n // Fill the labels with info from the Customer object\r\n custIdTextField.setText(Integer.toString(customer.getCustomerId()));\r\n custFirstNameTextField.setText(customer.getCustFirstName());\r\n custLastNameTextField.setText(customer.getCustLastName());\r\n custAddressTextField.setText(customer.getCustAddress());\r\n custCityTextField.setText(customer.getCustCity());\r\n custProvinceTextField.setText(customer.getCustProv());\r\n custPostalCodeTextField.setText(customer.getCustPostal());\r\n custCountryTextField.setText(customer.getCustCountry());\r\n custHomePhoneTextField.setText(customer.getCustHomePhone());\r\n custBusinessPhoneTextField.setText(customer.getCustBusPhone());\r\n custEmailTextField.setText(customer.getCustEmail());\r\n if (cboAgentId.getItems().contains(customer.getAgentId())){\r\n cboAgentId.setValue(customer.getAgentId());\r\n }\r\n else{\r\n cboAgentId.getSelectionModel().selectFirst();\r\n }\r\n } else {\r\n custIdTextField.setText(\"\");\r\n custFirstNameTextField.setText(\"\");\r\n custLastNameTextField.setText(\"\");\r\n custAddressTextField.setText(\"\");\r\n custCityTextField.setText(\"\");\r\n custProvinceTextField.setText(\"\");\r\n custPostalCodeTextField.setText(\"\");\r\n custCountryTextField.setText(\"\");\r\n custHomePhoneTextField.setText(\"\");\r\n custBusinessPhoneTextField.setText(\"\");\r\n custEmailTextField.setText(\"\");\r\n cboAgentId.getSelectionModel().selectFirst();\r\n } \r\n }", "public void editCustomer() {\n int id = this.id;\n PersonInfo personInfo = dbHendler.getCustInfo(id);\n String name = personInfo.getName().toString().trim();\n String no = personInfo.getPhoneNumber().toString().trim();\n float custNo = personInfo.get_rootNo();\n String cUSTnO = String.valueOf(custNo);\n int fees = personInfo.get_fees();\n String fEES = Integer.toString(fees);\n int balance = personInfo.get_balance();\n String bALANCE = Integer.toString(balance);\n String nName = personInfo.get_nName().toString().trim();\n String startdate = personInfo.get_startdate();\n int areaID = personInfo.get_area();\n String area = dbHendler.getAreaName(areaID);\n person_name.setText(name);\n contact_no.setText(no);\n rootNo.setText(cUSTnO);\n monthly_fees.setText(fEES);\n balance_.setText(bALANCE);\n nickName.setText(nName);\n this.startdate.setText(startdate);\n // retrieving the index of element u\n int retval = items.indexOf(area);\n\n spinner.setSelection(retval);\n }", "@FXML\n\tprivate void handleAdd() {\n\t\tshowCustomerInfoDialog(null);\t\n\t}", "public void showEditCustomerDialog(Customer customer) {\n \t\n \ttry {\n\t\t\tFXMLLoader loader = new FXMLLoader();\n\t\t\tloader.setLocation(MainApplication.class.getResource(\"view/CustomerEditDialog.fxml\"));\n\t\t\tAnchorPane page = (AnchorPane) loader.load();\n\t\t\tStage editCustomerDialogStage = new Stage(); \n\t\t\teditCustomerDialogStage.setTitle(\"Edit Person\");\n\t\t\teditCustomerDialogStage.initModality(Modality.WINDOW_MODAL);\n\t\t\teditCustomerDialogStage.initOwner(searchCustomerDialogStage);\n\t\t\tScene scene = new Scene(page);\n\t\t\teditCustomerDialogStage.setScene(scene);\n\t\t\tCustomerEditDialogController customerEditDialogController = loader.getController();\n\t\t\tcustomerEditDialogController.setDialogStage(editCustomerDialogStage);\n\t\t\tcustomerEditDialogController.setCustomer(customer);\n\t\t\tcustomerEditDialogController.setSearchCustomerController(this.searchCustomerDialogController);\n\t\t\teditCustomerDialogStage.showAndWait();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t }\n }", "@Override\r\n public void actionPerformed(ActionEvent e) {\r\n switch (e.getActionCommand()) {\r\n case \"Mas Customer Chosen\":\r\n if (editing) {\r\n event.setCustomer(cc.getCustomer());\r\n } else {\r\n customer = cc.getCustomer();\r\n jTPhone.setText(customer.getPhone());\r\n jTName.setText(customer.getName());\r\n }\r\n break;\r\n case \"BBQ Customer Chosen\":\r\n if (editing) {\r\n } else {\r\n customer = cc.getCustomer();\r\n jTBBQName.setText(customer.getName());\r\n jTBBQPhone.setText(customer.getPhone());\r\n jTBBQCusAddress.setText(customer.getAddress());\r\n jTBBQCusEmail.setText(customer.getEmail());\r\n }\r\n break;\r\n case \"Category Meat\":\r\n showCategoryItem(\"Meat\");\r\n break;\r\n case \"Category Accompaniment\":\r\n showCategoryItem(\"Accompaniment\");\r\n break;\r\n case \"Category Salad\":\r\n showCategoryItem(\"Salad\");\r\n break;\r\n case \"Category Grill\":\r\n showCategoryItem(\"Grill\");\r\n break;\r\n case \"added to basket\":\r\n addToBasket();\r\n jTBBQTotalPrice.setText(bbqControl.getBuilder().getTotalPrice() + \"\");\r\n break;\r\n }\r\n }", "public void showAddCustomerDialog() {\n\t\ttry {\n\t\t\tFXMLLoader loader = new FXMLLoader();\n\t\t\tloader.setLocation(MainApplication.class.getResource(\"view/AddCustomerDialog.fxml\"));\n\t\t\tAnchorPane page = (AnchorPane) loader.load();\n\t\t\tStage dialogStage = new Stage();\n\t\t\tdialogStage.setTitle(\"Add Customer\");\n\t\t\tdialogStage.initModality(Modality.WINDOW_MODAL);\n\t\t\tdialogStage.initOwner(primaryStage);\n\t\t\tScene scene = new Scene(page);\n\t\t\tdialogStage.setScene(scene);\n\t\t\tAddCustomerDialogController controller = loader.getController();\n\t\t\tcontroller.setDialogStage(dialogStage);\n\t\t\tdialogStage.showAndWait();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\t}\n\t}", "private void displayCusInterface() {\n\t\t// Display menu options\n\t\tSystem.out.println(\n\t\t\t\"\\nAVAILABLE CUSTOMER COMMANDS:\" +\n\t\t\t\"\\n1: Add customer\" +\n\t\t\t\"\\n2: Show customer info, given customer name\" +\n\t\t\t\"\\n3: Find price for flights between two cities\" +\n\t\t\t\"\\n4: Find all routes between two cities\" +\n\t\t\t\"\\n5: Find all routes between two cities of a given airline\" +\n\t\t\t\"\\n6: Find all routes with available seats between two cities on given day\" +\n\t\t\t\"\\n7: For a given airline, find all routes with available seats between two cities on given day\" +\n\t\t\t\"\\n8: Add reservation\" +\n\t\t\t\"\\n9: Show reservation info, given reservation number\" +\n\t\t\t\"\\n10: Buy ticket from existing reservation\" +\n\t\t\t\"\\n11: Quit\\n\");\n\n\t\t// Get user input\n\t\tSystem.out.print(\"Enter command number: \");\n\t\tinputString = scan.nextLine();\n\t\t// Convert input to integer, if not convertable, set to 0 (invalid)\n\t\ttry { choice = Integer.parseInt(inputString);\n\t\t} catch(NumberFormatException e) {choice = 0;}\n\n\t\t// Handle user choices\n\t\tif(choice == 1) {\n\t\t\tSystem.out.print(\"Please enter Salutation (Mr/Mrs/Ms): \");\n\t\t\tString salutation = scan.nextLine();\n\t\t\tSystem.out.print(\"Please enter First Name: \");\n\t\t\tString first = scan.nextLine();\n\t\t\tSystem.out.print(\"Please enter Last Name: \");\n\t\t\tString last = scan.nextLine();\n\t\t\ttry { // Check if customer already exists\n\t\t\t\tquery = \"select * from CUSTOMER where first_name = ? and last_name = ?\";\n\t\t\t\tPreparedStatement updateStatement = connection.prepareStatement(query);\n\t\t\t\tupdateStatement.setString(1,first);\n\t\t\t\tupdateStatement.setString(2,last);\n\t\t\t\tupdateStatement.executeUpdate();\n\t\t\t\tresultSet = updateStatement.executeQuery(query);\n\t\t\t\t// If name doesn't exist, continue and get additional user input\n\t\t\t\tif(!resultSet.next()) {\n\t\t\t\t\tSystem.out.print(\"Please enter Street Address: \");\n\t\t\t\t\tString street = scan.nextLine();\n\t\t\t\t\tSystem.out.print(\"Please enter City: \");\n\t\t\t\t\tString city = scan.nextLine();\n\t\t\t\t\tSystem.out.print(\"Please enter State (2 letter): \");\n\t\t\t\t\tString state = scan.nextLine();\n\t\t\t\t\tSystem.out.print(\"Please enter Phone Number: \");\n\t\t\t\t\tString phone = scan.nextLine();\n\t\t\t\t\tSystem.out.print(\"Please enter Email address: \");\n\t\t\t\t\tString email = scan.nextLine();\n\t\t\t\t\tSystem.out.print(\"Please enter Credit Card Number: \");\n\t\t\t\t\tString cardNum = scan.nextLine();\n\t\t\t\t\tSystem.out.print(\"Please enter Credit Card Expiration Date (MM/YYYY): \");\n\t\t\t\t\tString expire = scan.nextLine();\n\t\t\t\t\tcus1(salutation, first, last, street, city, state, phone, email, cardNum, expire);\n\t\t\t\t} else System.out.println(\"ERROR: Customer already exists!\");\n\t\t\t} catch(SQLException Ex) {System.out.println(\"Error running the sample queries. Machine Error: \" + Ex.toString());}\n\t\t}\n\t\telse if(choice == 2) {\n\t\t\tSystem.out.print(\"Please enter Customer First Name: \");\n\t\t\tString first = scan.nextLine();\n\t\t\tSystem.out.print(\"Please enter Last Name: \");\n\t\t\tString last = scan.nextLine();\n\t\t\tcus2(first, last);\n\t\t}\n\t\telse if(choice == 3) {\n\t\t\tSystem.out.print(\"Please enter City One (3 letter): \");\n\t\t\tString one = scan.nextLine();\n\t\t\tSystem.out.print(\"Please enter City Two (3 letter): \");\n\t\t\tString two = scan.nextLine();\n\t\t\tcus3(one, two);\n\t\t}\n\t\telse if(choice == 4) {\n\t\t\tSystem.out.print(\"Please enter Departure City (3 letter): \");\n\t\t\tString depart = scan.nextLine();\n\t\t\tSystem.out.print(\"Please enter Arrival City (3 letter): \");\n\t\t\tString arrive = scan.nextLine();\n\t\t\tcus4(depart, arrive);\n\t\t}\n\t\telse if(choice == 5) {\n\t\t\tSystem.out.print(\"Please enter Departure City (3 letter): \");\n\t\t\tString depart = scan.nextLine();\n\t\t\tSystem.out.print(\"Please enter Arrival City (3 letter): \");\n\t\t\tString arrive = scan.nextLine();\n\t\t\tSystem.out.print(\"Please enter Airline name (full name): \");\n\t\t\tString airline = scan.nextLine();\n\t\t\tcus5(depart, arrive, airline);\n\t\t}\n\t\telse if(choice == 6) {\n\t\t\tSystem.out.print(\"Please enter Departure City (3 letter): \");\n\t\t\tString depart = scan.nextLine();\n\t\t\tSystem.out.print(\"Please enter Arrival City (3 letter): \");\n\t\t\tString arrive = scan.nextLine();\n\t\t\tSystem.out.print(\"Please enter Date (MM/DD/YYYY): \");\n\t\t\tString date = scan.nextLine();\n\t\t\tcus6(depart, arrive, date);\n\t\t}\n\t\telse if(choice == 7) {\n\t\t\tSystem.out.print(\"Please enter Departure City (3 letter): \");\n\t\t\tString depart = scan.nextLine();\n\t\t\tSystem.out.print(\"Please enter Arrival City (3 letter): \");\n\t\t\tString arrive = scan.nextLine();\n\t\t\tSystem.out.print(\"Please enter Date (MM/DD/YYYY): \");\n\t\t\tString date = scan.nextLine();\n\t\t\tSystem.out.print(\"Please enter Airline name (full name): \");\n\t\t\tString airline = scan.nextLine();\n\t\t\tcus7(depart, arrive, date, airline);\n\t\t}\n\t\telse if(choice == 8) {\n\t\t\t// Flight numbers\n\t\t\tString flight1 = null, flight2 = null, flight3 = null, flight4 = null;\n\t\t\t// Flight dates\n\t\t\tString dateN1 = null, dateN2 = null, dateN3 = null, dateN4 = null;\n\t\t\t// Booleans for if flight is available or wasn't entered\n\t\t\tboolean flight1A = false, flight2A = false, flight3A = false, flight4A = false;\n\t\t\tSystem.out.println(\"ADDING RESERVATION:\\nAdd first flight:\");\n\t\t\t// Get first leg (required)\n\t\t\tSystem.out.print(\" Flight Number: \");\n\t\t\tflight1 = scan.nextLine();\n\t\t\tSystem.out.print(\" Departure Date (MM/DD/YYYY): \");\n\t\t\tdateN1 = scan.nextLine();\n\t\t\t// Get second leg (optional)\n\t\t\tSystem.out.print(\"Add another leg in this direction? (Y/N): \");\n\t\t\tinputString = scan.nextLine();\n\t\t\tif(inputString.equals(\"Y\") || inputString.equals(\"y\")) {\n\t\t\t\tSystem.out.print(\" Flight Number: \");\n\t\t\t\tflight2 = scan.nextLine();\n\t\t\t\tSystem.out.print(\" Departure Date (MM/DD/YYYY): \");\n\t\t\t\tdateN2 = scan.nextLine();\n\t\t\t}\n\t\t\t// Get return trip first leg (optional)\n\t\t\tSystem.out.print(\"Add return trip? (Y/N): \");\n\t\t\tinputString = scan.nextLine();\n\t\t\tif(inputString.equals(\"Y\") || inputString.equals(\"y\")) {\n\t\t\t\tSystem.out.print(\" Flight Number: \");\n\t\t\t\tflight3 = scan.nextLine();\n\t\t\t\tSystem.out.print(\" Departure Date (MM/DD/YYYY): \");\n\t\t\t\tdateN3 = scan.nextLine();\n\t\t\t\t// Get return trip second leg (optional, requires return trip first leg)\n\t\t\t\tSystem.out.print(\"Add another leg in this direction? (Y/N): \");\n\t\t\t\tinputString = scan.nextLine();\n\t\t\t\tif(inputString.equals(\"Y\") || inputString.equals(\"y\")) {\n\t\t\t\t\tSystem.out.print(\" Flight Number: \");\n\t\t\t\t\tflight4 = scan.nextLine();\n\t\t\t\t\tSystem.out.print(\" Departure Date (MM/DD/YYYY): \");\n\t\t\t\t\tdateN4 = scan.nextLine();\n\t\t\t\t}\n\t\t\t}\n\t\t\ttry { // Check if seats are available in non-null flights\n\t\t\t\tPreparedStatement updateStatement;\n\t\t\t\tif(flight2 != null && !flight1.isEmpty()) { // Check if flight1 seat is available\n\t\t\t\t\tquery = \"select flight_number from flight f1, plane where f1.flight_number = ? AND plane.plane_capacity > (select count(D.flight_number) from DETAIL D where D.flight_number = ?)\";\n\t\t\t\t\tupdateStatement = connection.prepareStatement(query);\n\t\t\t\t\tupdateStatement.setString(1,flight1);\n\t\t\t\t\tupdateStatement.setString(2,flight1);\n\t\t\t\t\tupdateStatement.executeUpdate();\n\t\t\t\t\tresultSet = updateStatement.executeQuery(query);\n\t\t\t\t\tif(resultSet.next())\n\t\t\t\t\t\tflight1A = true;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tflight1A = true;\n\t\t\t\tif(flight2 != null && !flight2.isEmpty()) { // Check if flight2 seat is available\n\t\t\t\t\tquery = \"select flight_number from flight f1, plane where f1.flight_number = ? AND plane.plane_capacity > (select count(D.flight_number) from DETAIL D where D.flight_number = ?)\";\n\t\t\t\t\tupdateStatement = connection.prepareStatement(query);\n\t\t\t\t\tupdateStatement.setString(1,flight2);\n\t\t\t\t\tupdateStatement.setString(2,flight2);\n\t\t\t\t\tupdateStatement.executeUpdate();\n\t\t\t\t\tresultSet = updateStatement.executeQuery(query);\n\t\t\t\t\tif(resultSet.next())\n\t\t\t\t\t\tflight2A = true;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tflight2A = true;\n\t\t\t\tif(flight3 != null && !flight3.isEmpty()) { // Check if flight3 seat is available\n\t\t\t\t\tquery = \"select flight_number from flight f1, plane where f1.flight_number = ? AND plane.plane_capacity > (select count(D.flight_number) from DETAIL D where D.flight_number = ?)\";\n\t\t\t\t\tupdateStatement = connection.prepareStatement(query);\n\t\t\t\t\tupdateStatement.setString(1,flight3);\n\t\t\t\t\tupdateStatement.setString(2,flight3);\n\t\t\t\t\tupdateStatement.executeUpdate();\n\t\t\t\t\tresultSet = updateStatement.executeQuery(query);\n\t\t\t\t\tif(resultSet.next())\n\t\t\t\t\t\tflight3A = true;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tflight3A = true;\n\t\t\t\tif(flight4 != null && !flight4.isEmpty()) { // Check if flight4 seat is available\n\t\t\t\t\tquery = \"select flight_number from flight f1, plane where f1.flight_number = ? AND plane.plane_capacity > (select count(D.flight_number) from DETAIL D where D.flight_number = ?)\";\n\t\t\t\t\tupdateStatement = connection.prepareStatement(query);\n\t\t\t\t\tupdateStatement.setString(1,flight4);\n\t\t\t\t\tupdateStatement.setString(2,flight4);\n\t\t\t\t\tupdateStatement.executeUpdate();\n\t\t\t\t\tresultSet = updateStatement.executeQuery(query);\n\t\t\t\t\tif(resultSet.next())\n\t\t\t\t\t\tflight4A = true;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tflight4A = true;\n\t\t\t\t// If all non-null flights are available, get cid and call cus8 to gather data and make reservation\n\t\t\t\tif(flight1A && flight2A && flight3A && flight4A) {\n\t\t\t\t\t// Get customer CID\n\t\t\t\t\tSystem.out.print(\"Seating available!\\n Please enter CID: \");\n\t\t\t\t\tString cid = scan.nextLine();\n\t\t\t\t\tcus8(flight1, flight2, flight3, flight4, dateN1, dateN2, dateN3, dateN4, cid);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tSystem.out.println(\"SEATING UNAVAILABLE ON ONE OR MORE FLIGHTS\");\n\t\t\t} catch(SQLException Ex) {System.out.println(\"Error running the sample queries. Machine Error: \" + Ex.toString());}\n\t\t}\n\t\telse if(choice == 9) {\n\t\t\tSystem.out.print(\"Please enter reservation number: \");\n\t\t\tString num = scan.nextLine();\n\t\t\tcus9(num);\n\t\t}\n\t\telse if(choice == 10) {\n\t\t\tSystem.out.print(\"Please enter reservation number: \");\n\t\t\tString num = scan.nextLine();\n\t\t\tcus10(num);\n\t\t}\n\t\telse if(choice == 11) exit = true;\n\t\telse System.out.println(\"INVALID CHOICE\");\n\n\t\tif(!exit) { // Exiting will ignore loop and drop to main to exit properly\n\t\t\t// Repeat menu after user controlled pause\n\t\t\tSystem.out.print(\"Press Enter to Continue... \");\n\t\t\tscan.nextLine();\n\t\t\tdisplayCusInterface();\n\t\t}\n\t}", "public void actionPerformed(ActionEvent e){\n\t\t\t\tif(editCustIdCombo.getSelectedIndex() != 0){\n\t\t\t\t\tif(editCustName.getText().isEmpty() || editCustAddress.getText().isEmpty()){\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Required Fields: \\n Customer Name \\n Customer Address\");\t\n\t\t\t\t\t}else{\n\t\t\t\t\t\tfor(Customer customer: customers){\n\t\t\t\t\t\t\tif(customer.getCustId() == Integer.parseInt(editCustIdCombo.getSelectedItem().toString())){\n\t\t\t\t\t\t\t\tcustomer.setCustName(editCustName.getText());\n\t\t\t\t\t\t\t\tcustomer.setCustAddress(editCustAddress.getText());\n\t\t\t\t\t\t\t\tcustomer.setCustEmail(editCustEmail.getText());\n\t\t\t\t\t\t\t\tcustomer.setCustTelephone(Integer.parseInt(editCustPhone.getText()));\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Customer Updated.\");\n\t\t\t\t\t\t\t\teditCustIdCombo.setSelectedIndex(0);\n\t\t\t\t\t\t\t\teditCustName.setText(\"\");\n\t\t\t\t\t\t\t\teditCustAddress.setText(\"\");\n\t\t\t\t\t\t\t\teditCustEmail.setText(\"\");\n\t\t\t\t\t\t\t\teditCustPhone.setText(\"\");\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please Select a Valid Customer.\");\n\t\t\t\t}\n\t\t\t}", "@Override\n\tpublic void selecciona() {\n\t\tClienteProxy bean = grid.getSelectionModel().getSelectedObject();\n\t\tif(bean!=null){\t\t\t\t\n\t\tuiHomePrestamo.getHeader().getLblTitulo().setText(\"Devolpay\");\n\t\tuiHomePrestamo.getHeader().setVisibleBtnMenu(true);\t\t\n\t\tuiHomePrestamo.getUIMantPrestamoImpl().setBeanCliente(bean);\n\t\tuiHomePrestamo.getContainer().showWidget(1);\t\t\n\t\t}else{\n\t\t\t//Dialogs.alert(constants.alerta(), constants.seleccioneCliente(), null);\n\t\t\t//Window.alert(constants.seleccioneCliente());\n\t\t\tNotification not=new Notification(Notification.ALERT,constants.seleccioneCliente());\n\t\t\tnot.showPopup();\n\t\t}\n\t}", "public void initData(Customer customer) {\n selectedCustomer = customer;\n\n idTextbox.setText(Integer.toString(selectedCustomer.getID()));\n nameTextbox.setText(selectedCustomer.getName());\n addressTextbox.setText(selectedCustomer.getAddress());\n divisionDropdown.getSelectionModel().select(selectedCustomer.getDivision());\n countryDropdown.getSelectionModel().select(selectedCustomer.getCountry());\n phoneTextbox.setText(selectedCustomer.getPhone());\n postalCodeTextbox.setText(selectedCustomer.getPostalCode());\n\n countryDropdown.setItems(getCountries());\n divisionDropdown.setItems(getDivisions(selectedCustomer.getCountry()));\n }", "public static void noCustomerSelected(){\r\n\t\tAlert alert = new Alert(AlertType.ERROR);\r\n\t\talert.setTitle(\"Error!\");\r\n\t\talert.setHeaderText(\"\");\r\n\t\talert.setContentText(\"Bitte wählen Sie einen Kunden aus!\");\r\n\t\talert.showAndWait();\r\n\t}", "public void showSearchCustomerDialog() {\n\t\ttry {\n\t\t\tFXMLLoader loader = new FXMLLoader();\n\t\t\tloader.setLocation(MainApplication.class.getResource(\"view/SearchCustomerDialog.fxml\"));\n\t\t\tAnchorPane page = (AnchorPane) loader.load();\n\t\t\tStage searchCustomerDialogStage = new Stage();\n\t\t\tthis.searchCustomerDialogStage = searchCustomerDialogStage;\n\t\t\tsearchCustomerDialogStage.setTitle(\"Search Customer\");\n\t\t\tsearchCustomerDialogStage.initModality(Modality.WINDOW_MODAL);\n\t\t\tsearchCustomerDialogStage.initOwner(primaryStage);\n\t\t\tScene scene = new Scene(page);\n\t\t\tsearchCustomerDialogStage.setScene(scene);\n\t\t\tSearchCustomerDialogController searchCustomerDialogController = loader.getController();\n\t\t\tsearchCustomerDialogController.setDialogStage(searchCustomerDialogStage);\n\t\t\tsearchCustomerDialogController.setMainApp(this);\n\t\t\tsetSearchCustomerController(searchCustomerDialogController);\n\t\t\tsearchCustomerDialogStage.showAndWait();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t }\n\t}", "public void actionPerformed(ActionEvent e){\n\t\t\tif(customers.size() >= 1){\n\t\t\t\t\ttry{\n\t\t\t\t\t\tfor(Customer customer: customers){\n\t\t\t\t\t\tif(customer.getCustId() == Integer.parseInt(custIdCombo.getSelectedItem().toString())){\n\t\t\t\t\t\t\tcustJTextArea.setText(\" Customer Id: \"+customer.getCustId()\n\t\t\t\t\t\t\t\t\t+\"\\n Name: \"+customer.getCustName()\n\t\t\t\t\t\t\t\t\t+\"\\n Address: \"+customer.getCustAddress()\n\t\t\t\t\t\t\t\t\t+\"\\n Email: \"+customer.getCustEmail()\n\t\t\t\t\t\t\t\t\t+\"\\n Phone: \"+customer.getCustTelephone());\n\t\t\t\t\t\t\tcustIdCombo.setSelectedIndex(0);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}catch(NumberFormatException nfe){\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please Select a Valid Customer.\");\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"No Customers Found\");\n\t\t\t\t}\n\t\t\t}", "@FXML\n private void editSelected() {\n if (selectedAccount == null) {\n // Warn user if no account was selected.\n noAccountSelectedAlert(\"Edit DonorReceiver\");\n } else {\n EditPaneController.setAccount(selectedAccount);\n PageNav.loadNewPage(PageNav.EDIT);\n }\n }", "@Override\n\t\tpublic void formSuggestionSelectionChange(UiSuggestBox uiSuggestBox) {\n\t\t\tif (uiSuggestBox == customerSuggestBox) {\n\t\t\t\t// Llenar moneda del cliente\n\t\t\t\tBmoCustomer bmoCustomer = new BmoCustomer();\n\t\t\t\tbmoCustomer = (BmoCustomer)customerSuggestBox.getSelectedBmObject();\n\t\t\t\tif (bmoCustomer != null) {\n\t\t\t\t\t// Permitir elegir direccion del cliente\n\t\t\t\t\t//populateCustomerAddress(customerSuggestBox.getSelectedId());\n\t\t\t\t\tformFlexTable.showField(bmoProject.getCustomerAddressId());\n\t\t\t\t\t//customerAddressListBox.setEnabled(true);\n\t\t\t\t\t\n\t\t\t\t\tif (bmoCustomer.getMarketId().toInteger() > 0) {\n\t\t\t\t\t\tmarketListBox.setSelectedId(\"\" + bmoCustomer.getMarketId().toInteger());\n\t\t\t\t\t} else marketListBox.setSelectedId(\"0\");\n\t\t\t\t} else \n\t\t\t\t\tmarketListBox.setSelectedId(\"0\");\n\t\t\t\t\n\t\t\t} else if (uiSuggestBox == venueSuggestBox) {\n\t\t\t\t// Activar campo si esta marcado el Salon como casa particular\n\t\t\t\tBmoVenue bmoVenue = (BmoVenue)venueSuggestBox.getSelectedBmObject();\n\t\t\t\tif (bmoVenue != null) {\n\t\t\t\t\tif (bmoVenue.getHomeAddress().toBoolean() && bmoVenue.getId() > 0) {\n\t\t\t\t\t\tformFlexTable.showField(bmoProject.getHomeAddress());\n\t\t\t\t\t\thomeAddressTextBox.setText(\"\");\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\thomeAddressTextBox.setText(\"\");\n\t\t\t\t\tformFlexTable.hideField(bmoProject.getHomeAddress());\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tstatusEffect();\n\t\t}", "public void setDetailsOfOwner(String ownerUserID, String status, boolean occasional, int membersAmount, int amountInoccasional) {// in status i want to know if\n\t\tArrayList<String> tempArrayList = new ArrayList<String>(); // the user owner is a\n\t\t// member user or guide\n\t\tm_ownerUserID = ownerUserID;\n\t\tm_status = status;\n\t\tm_occasional = occasional;\n\t\tm_amountOfPeople = membersAmount;\n\t\tif (m_occasional) {\n\t\t\ttxtCrumViaHomePage.setVisible(true);\n\t\t\ttempArrayList.add(m_parkName);\n\t\t\tsetParkCombo(tempArrayList);\n\t\t\tparkNameCombo.setValue(m_parkName);\n\t\t\tpickDatePicker.setValue(LocalDate.now());\n\t\t\tsetHourCombo(null, null);\n\n\t\t\tsetNumberOfVistors(amountInoccasional);\n\t\t\tpickDatePicker.setValue(LocalDate.now());\n\t\t\tpickDatePicker.setDayCellFactory(new Callback<DatePicker, DateCell>() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic DateCell call(DatePicker param) {\n\t\t\t\t\treturn new DateCell() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void updateItem(LocalDate item, boolean empty) {\n\t\t\t\t\t\t\tsuper.updateItem(item, empty);\n\t\t\t\t\t\t\tLocalDate today = LocalDate.now();\n\t\t\t\t\t\t\tsetDisable(item.compareTo(today) != 0);\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\tif (status.equals(\"member\")) {\n\t\t\t\tMemberOrderlab.setVisible(true);\n\t\t\t}\n\n//\t\t\t setNumberOfVistors(\"free place\");//for occasional visit i need to set the number of visitors to the one i get from the previous page\n\n\t\t} else {\n\t\t\ttxtCrum.setVisible(true);\n\t\t\tsetHourCombo(new Time(8, 0, 0), new Time(16, 29, 0));//the time coustumer can enter to the patk\n\t\t\ttempArrayList.add(\"Carmel Park\");\n\t\t\ttempArrayList.add(\"Tal Park\");\n\t\t\ttempArrayList.add(\"Jordan Park\");\n\t\t\tsetParkCombo(tempArrayList);\n\t\t\tpickDatePicker.setDayCellFactory(new Callback<DatePicker, DateCell>() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic DateCell call(DatePicker param) {\n\t\t\t\t\treturn new DateCell() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void updateItem(LocalDate item, boolean empty) {\n\t\t\t\t\t\t\tsuper.updateItem(item, empty);\n\t\t\t\t\t\t\tLocalDate today = LocalDate.now();\n\t\t\t\t\t\t\tLocalDate tommorow = today.minusDays(-2);\n\t\t\t\t\t\t\tsetDisable(item.compareTo(tommorow) < 0);\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\tif (status.equals(\"member\")) {\n\t\t\t\tsetNumberOfVistors(membersAmount);\n\t\t\t\tMemberOrderlab.setVisible(true);\n\t\t\t} else {\n\t\t\t\tsetNumberOfVistors(15);\n\t\t\t}\n\t\t}\n\t\tif (m_status.equals(\"guide\")) {\n\t\t\tguideWelcomeText.setVisible(true);\n\t\t\tif (occasional == false) {\n\t\t\t\tpayTimeCheckBox.setVisible(true);\n\t\t\t}\n\t\t}\n\t\tif(m_status.equals(Role.Member.toString().toLowerCase())) {\n\t\t\tsetNumberOfVistors(m_amountOfPeople);\n\t\t}\n\t}", "public void actionPerformed(ActionEvent e) {\r\n JTextField ownerTf;\r\n String mes;\r\n\r\n String record[] = getRecordOnPan();\r\n\r\n try {\r\n int match[] = data.find(record);\r\n \r\n if (match.length > 1) {\r\n updateStatus(\"More than one match record.\");\r\n return;\r\n } else if (match.length == 0) {\r\n updateStatus(\"Record not found.\");\r\n return;\r\n }\r\n \r\n ownerTf = new JTextField();\r\n ownerTf.setText(record[5]);\r\n mes = \"Enter customer id\";\r\n \r\n int result = JOptionPane.showOptionDialog(\r\n frame, new Object[] {mes, ownerTf},\r\n \"Booking\", JOptionPane.OK_CANCEL_OPTION,\r\n JOptionPane.PLAIN_MESSAGE,\r\n null, null, null);\r\n\r\n if (result == JOptionPane.OK_OPTION) {\r\n record[5] = ownerTf.getText();\r\n bc.handleUpdateGesture(match[0], record);\r\n updateStatus(\"Subcontractor booked.\");\r\n }\r\n } catch (Exception ex) {\r\n updateStatus(ex.getMessage());\r\n }\r\n }", "private void select(ActionEvent e){\r\n // Mark this client as an existing client since they are in the list\r\n existingClient = true;\r\n // To bring data to Management Screen we will modify the text fields\r\n NAME_FIELD.setText(client.getName());\r\n ADDRESS_1_FIELD.setText(client.getAddress1());\r\n ADDRESS_2_FIELD.setText(client.getAddress2());\r\n CITY_FIELD.setText(client.getCity());\r\n ZIP_FIELD.setText(client.getZip());\r\n COUNTRY_FIELD.setText(client.getCountry());\r\n PHONE_FIELD.setText(client.getPhone());\r\n // client.setAddressID();\r\n client.setClientID(Client.getClientID(client.getName(), client.getAddressID()));\r\n // Pass client information to Client Management Screen\r\n currClient = client;\r\n back(e);\r\n }", "@Override\n public void onPrepareOptionsMenu(Menu menu) {\n\n MenuItem item = menu.findItem(R.id.action_add);\n if(add_order_flag){\n item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener (){\n @Override\n public boolean onMenuItemClick(MenuItem item) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getContext());\n LayoutInflater inflater = getLayoutInflater();\n final View mView = inflater.inflate(R.layout.dialog_new_order, null);\n /* Spinner. */\n final Spinner customer_spinner = mView.findViewById(R.id.customer_spinner);\n database_helper db = new database_helper(getActivity());\n Cursor c = db.get_customers(user_id);\n final ArrayList<customer> customers = new ArrayList<>();\n ArrayList<String> list = new ArrayList<>();\n list.add(\"\");\n while(c.moveToNext()){\n list.add(c.getString(c.getColumnIndex(\"FIRST_NAME\")) + \" \"\n + c.getString(c.getColumnIndex(\"LAST_NAME\")) + \" - \"\n + c.getString(c.getColumnIndex(\"EMAIL_ADDRESS\")));\n\n customers.add(new customer(\n c.getString(c.getColumnIndex(\"CUSTOMER_ID\")),\n c.getString(c.getColumnIndex(\"FIRST_NAME\")),\n c.getString(c.getColumnIndex(\"LAST_NAME\")),\n c.getString(c.getColumnIndex(\"EMAIL_ADDRESS\")),\n c.getString(c.getColumnIndex(\"MOBILE_NUMBER\"))));\n\n }\n c.close();\n ArrayAdapter<String> adapter = new ArrayAdapter<String>(getActivity(), layout.simple_spinner_dropdown_item, list);\n customer_spinner.setAdapter(adapter);\n /* Due date. */\n final DatePicker simpleDatePicker = mView.findViewById(R.id.simpleDatePicker); // initiate a date picker\n simpleDatePicker.setMinDate(System.currentTimeMillis() - 1000);\n builder.setView(mView)\n .setPositiveButton(\"Save\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n int p = customer_spinner.getSelectedItemPosition();\n if(p == 0){\n Toast.makeText(getContext(),\"Please select a customer\",Toast.LENGTH_SHORT).show();\n } else {\n customer selected = customers.get(p - 1);\n int customer_id = Integer.parseInt(selected.id);\n int year = simpleDatePicker.getYear();\n int month = simpleDatePicker.getMonth() + 1;\n int day = simpleDatePicker.getDayOfMonth();\n String due_date = Integer.toString(day) + \"-\" + Integer.toString(month) + \"-\" + Integer.toString(year);\n database_helper db = new database_helper(getActivity());\n if(db.create_order(user_id, customer_id, due_date, 0.0, false, selected.first_name + \" \" + selected.last_name, false) == 0){\n Toast.makeText(getContext(),\"Order created successfully.\", Toast.LENGTH_SHORT).show();\n Fragment fragment = new OrdersFragment();\n Bundle bundle = new Bundle();\n bundle.putString(\"USER_ID\", user_id);\n fragment.setArguments(bundle);\n getFragmentManager().beginTransaction().replace(R.id.fragment_container,\n fragment).commit();\n } else {\n Toast.makeText(getContext(),\"Something went wrong.\", Toast.LENGTH_SHORT).show();\n }\n }\n }\n })\n .setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n //Toast.makeText(getContext(),\"Cancel clicked\",Toast.LENGTH_SHORT).show();\n }\n })\n .setTitle(\"Add Order\");\n AlertDialog dialog = builder.create();\n dialog.show();\n\n return true;\n }\n });\n\n }\n\n if(add_room_flag){\n item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener (){\n @Override\n public boolean onMenuItemClick(MenuItem item) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getContext());\n LayoutInflater inflater = getLayoutInflater();\n final View mView = inflater.inflate(R.layout.dialog_new_room, null);\n /* Spinner. */\n final Spinner floor_spinner = mView.findViewById(R.id.floor_spinner);\n database_helper db = new database_helper(getActivity());\n Cursor c = db.get_floors(user_id);\n final ArrayList<floor> floors = new ArrayList<>();\n ArrayList<String> list = new ArrayList<>();\n list.add(\"\");\n while(c.moveToNext()){\n list.add(c.getString(c.getColumnIndex(\"FLOOR_NAME\")));\n floors.add(new floor(\n c.getString(c.getColumnIndex(\"FLOOR_ID\")),\n c.getString(c.getColumnIndex(\"FLOOR_NAME\")),\n c.getDouble(c.getColumnIndex(\"FLOOR_COST\"))));\n }\n c.close();\n ArrayAdapter<String> adapter = new ArrayAdapter<String>(getActivity(), layout.simple_spinner_dropdown_item, list);\n floor_spinner.setAdapter(adapter);\n builder.setView(mView)\n .setPositiveButton(\"Save\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n EditText size_input = mView.findViewById(R.id.room_size);\n String size = size_input.getText().toString();\n int p = floor_spinner.getSelectedItemPosition();\n if(p == 0) {\n Toast.makeText(getContext(), \"Please select a floor\", Toast.LENGTH_SHORT).show();\n } else if(size.isEmpty()){\n Toast.makeText(getContext(), \"Please fill out all input fields.\", Toast.LENGTH_SHORT).show();\n } else {\n database_helper db = new database_helper(getActivity());\n for (order order : orders) {\n if(order.selected){\n Double room_cost = Double.parseDouble(size) * floors.get(p - 1).cost * 1.2;\n if(db.create_room(user_id, Integer.parseInt(order.id), Integer.parseInt(floors.get(p - 1).id), Double.parseDouble(size), room_cost, false) == 0){\n Toast.makeText(getContext(),\"Room created successfully.\", Toast.LENGTH_SHORT).show();\n Fragment fragment = new OrdersFragment();\n Bundle bundle = new Bundle();\n bundle.putString(\"USER_ID\", user_id);\n fragment.setArguments(bundle);\n getFragmentManager().beginTransaction().replace(R.id.fragment_container,\n fragment).commit();\n } else {\n Toast.makeText(getContext(),\"Something went wrong.\", Toast.LENGTH_SHORT).show();\n }\n }\n }\n }\n }\n })\n .setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) { }\n })\n .setTitle(\"Add Room\");\n AlertDialog dialog = builder.create();\n dialog.show();\n\n return true;\n }\n });\n\n }\n\n\n if(add_order_flag || add_room_flag) item.setVisible(true);\n else item.setVisible(false);\n\n item = menu.findItem(R.id.action_edit);\n\n if(edit_order_flag){\n item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener (){\n @Override\n public boolean onMenuItemClick(MenuItem item) {\n\n AlertDialog.Builder builder = new AlertDialog.Builder(getContext());\n LayoutInflater inflater = getLayoutInflater();\n final View mView = inflater.inflate(R.layout.dialog_new_order, null);\n\n /* Spinner. */\n final Spinner customer_spinner = mView.findViewById(R.id.customer_spinner);\n database_helper db = new database_helper(getActivity());\n Cursor c = db.get_customers(user_id);\n final ArrayList<customer> customers = new ArrayList<>();\n ArrayList<String> list = new ArrayList<>();\n list.add(\"\");\n while(c.moveToNext()){\n list.add(c.getString(c.getColumnIndex(\"FIRST_NAME\")) + \" \"\n + c.getString(c.getColumnIndex(\"LAST_NAME\")) + \" - \"\n + c.getString(c.getColumnIndex(\"EMAIL_ADDRESS\")));\n\n customers.add(new customer(\n c.getString(c.getColumnIndex(\"CUSTOMER_ID\")),\n c.getString(c.getColumnIndex(\"FIRST_NAME\")),\n c.getString(c.getColumnIndex(\"LAST_NAME\")),\n c.getString(c.getColumnIndex(\"EMAIL_ADDRESS\")),\n c.getString(c.getColumnIndex(\"MOBILE_NUMBER\"))));\n }\n c.close();\n ArrayAdapter<String> adapter = new ArrayAdapter<String>(getActivity(), layout.simple_spinner_dropdown_item, list);\n customer_spinner.setAdapter(adapter);\n\n final DatePicker simpleDatePicker = mView.findViewById(R.id.simpleDatePicker); // initiate a date picker\n\n builder.setView(mView)\n .setPositiveButton(\"Save\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n\n int p = customer_spinner.getSelectedItemPosition();\n\n if(p == 0){\n Toast.makeText(getContext(),\"Please select a customer\",Toast.LENGTH_SHORT).show();\n } else {\n\n customer selected = customers.get(p - 1);\n int customer_id = Integer.parseInt(selected.id);\n\n int year = simpleDatePicker.getYear();\n int month = simpleDatePicker.getMonth() + 1;\n int day = simpleDatePicker.getDayOfMonth();\n String due_date = Integer.toString(day) + \"-\" + Integer.toString(month) + \"-\" + Integer.toString(year);\n\n database_helper db = new database_helper(getActivity());\n\n for (final order order : orders) {\n if (order.selected) {\n\n if(db.update_order(order.id, customer_id, due_date,selected.first_name + \" \" + selected.last_name) == 1){\n Toast.makeText(getContext(),\"Order updated successfully.\", Toast.LENGTH_SHORT).show();\n\n Fragment fragment = new OrdersFragment();\n Bundle bundle = new Bundle();\n bundle.putString(\"USER_ID\", user_id);\n fragment.setArguments(bundle);\n getFragmentManager().beginTransaction().replace(R.id.fragment_container,\n fragment).commit();\n } else {\n Toast.makeText(getContext(),\"Something went wrong.\", Toast.LENGTH_SHORT).show();\n }\n\n }\n }\n }\n }\n })\n .setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n //Toast.makeText(getContext(),\"cancel clicked\",Toast.LENGTH_SHORT).show();\n }\n })\n .setTitle(\"Edit Order\");\n AlertDialog dialog = builder.create();\n dialog.show();\n return true;\n }\n });\n }\n\n\n if(edit_room_flag){\n\n item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener (){\n @Override\n public boolean onMenuItemClick(MenuItem item) {\n\n AlertDialog.Builder builder = new AlertDialog.Builder(getContext());\n LayoutInflater inflater = getLayoutInflater();\n final View mView = inflater.inflate(R.layout.dialog_new_room, null);\n\n /* Spinner. */\n final Spinner floor_spinner = mView.findViewById(R.id.floor_spinner);\n database_helper db = new database_helper(getActivity());\n Cursor c = db.get_floors(user_id);\n final ArrayList<floor> floors = new ArrayList<>();\n ArrayList<String> list = new ArrayList<>();\n list.add(\"\");\n while(c.moveToNext()){\n list.add(c.getString(c.getColumnIndex(\"FLOOR_NAME\")));\n floors.add(new floor(\n c.getString(c.getColumnIndex(\"FLOOR_ID\")),\n c.getString(c.getColumnIndex(\"FLOOR_NAME\")),\n c.getDouble(c.getColumnIndex(\"FLOOR_COST\"))));\n }\n c.close();\n ArrayAdapter<String> adapter = new ArrayAdapter<String>(getActivity(), layout.simple_spinner_dropdown_item, list);\n floor_spinner.setAdapter(adapter);\n\n builder.setView(mView)\n .setPositiveButton(\"Save\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n\n final database_helper db = new database_helper(getContext());\n EditText size_input = mView.findViewById(R.id.room_size);\n String size = size_input.getText().toString();\n int p = floor_spinner.getSelectedItemPosition();\n if(p == 0) {\n Toast.makeText(getContext(), \"Please select a floor\", Toast.LENGTH_SHORT).show();\n } else if(size.isEmpty()){\n Toast.makeText(getContext(), \"Please fill out all input fields.\", Toast.LENGTH_SHORT).show();\n } else {\n for (order order : orders) {\n if(order.selected){\n for(room room : order.rooms){\n if(room.selected){\n\n Double room_cost = Double.parseDouble(size) * floors.get(p - 1).cost * 1.2;\n if(db.update_room(room.id, Integer.parseInt(floors.get(p - 1).id), Double.parseDouble(size), room_cost) == 1){\n Toast.makeText(getContext(),\"Room updated successfully.\", Toast.LENGTH_SHORT).show();\n Fragment fragment = new OrdersFragment();\n Bundle bundle = new Bundle();\n bundle.putString(\"USER_ID\", user_id);\n fragment.setArguments(bundle);\n getFragmentManager().beginTransaction().replace(R.id.fragment_container,\n fragment).commit();\n } else {\n Toast.makeText(getContext(),\"Something went wrong.\", Toast.LENGTH_SHORT).show();\n }\n\n }\n }\n }\n }\n }\n }\n })\n .setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) { }\n })\n .setTitle(\"Edit Room\");\n AlertDialog dialog = builder.create();\n dialog.show();\n\n return true;\n }\n });\n\n }\n\n if(edit_order_flag || edit_room_flag) item.setVisible(true);\n else item.setVisible(false);\n\n item = menu.findItem(R.id.action_delete);\n item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener (){\n @Override\n public boolean onMenuItemClick(MenuItem item) {\n\n DialogInterface.OnClickListener dialogClickListener = new DialogInterface.OnClickListener() {\n @TargetApi(Build.VERSION_CODES.N)\n @RequiresApi(api = Build.VERSION_CODES.N)\n @Override\n public void onClick(DialogInterface dialog, int which) {\n switch (which){\n case DialogInterface.BUTTON_POSITIVE:\n\n Boolean fail_flag = false;\n final database_helper my_db = new database_helper(getContext());\n for (order order : orders) {\n boolean selected_room_flag = false;\n if(order.selected){\n for(room room : order.rooms){\n if(room.selected){\n selected_room_flag = true;\n if(my_db.delete_room(room.id) < 1) {\n fail_flag = true;\n //break;\n }\n }\n }\n if(selected_room_flag == false){\n if(my_db.delete_order(order.id) < 1) {\n fail_flag = true;\n break;\n }\n }\n }\n }\n if(fail_flag) {\n Toast.makeText(getContext(),\"Something went wrong.\",Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(getContext(),\"Delete successful\",Toast.LENGTH_SHORT).show();\n\n Fragment fragment = new OrdersFragment();\n Bundle bundle = new Bundle();\n bundle.putString(\"USER_ID\", user_id);\n fragment.setArguments(bundle);\n getFragmentManager().beginTransaction().replace(R.id.fragment_container,\n fragment).commit();\n }\n\n break;\n\n case DialogInterface.BUTTON_NEGATIVE:\n\n break;\n }\n }\n };\n\n AlertDialog.Builder builder = new AlertDialog.Builder(getContext());\n builder.setMessage(\"Are you sure?\").setPositiveButton(\"Yes\", dialogClickListener)\n .setNegativeButton(\"No\", dialogClickListener).setTitle(\"Delete selected\").show();\n\n return true;\n }\n });\n if(delete_order_flag) item.setVisible(true);\n else item.setVisible(false);\n\n super.onPrepareOptionsMenu(menu);\n }", "public void actionPerformed(ActionEvent e){\n\t\t\tif(customers.size() >= 1){\n\t\t\t\tif(custNameCombo.getSelectedIndex() != 0){\n\t\t\t\t\tfor(Customer customer: customers){\n\t\t\t\t\t\tif(customer.getCustName() == custNameCombo.getSelectedItem()){\n\t\t\t\t\t\t\tcustJTextArea.setText(\" Customer Id: \"+customer.getCustId()\n\t\t\t\t\t\t\t\t\t+\"\\n Name: \"+customer.getCustName()\n\t\t\t\t\t\t\t\t\t+\"\\n Address: \"+customer.getCustAddress()\n\t\t\t\t\t\t\t\t\t+\"\\n Email: \"+customer.getCustEmail()\n\t\t\t\t\t\t\t\t\t+\"\\n Phone: \"+customer.getCustTelephone());\n\t\t\t\t\t\t\tcustNameCombo.setSelectedIndex(0);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please Select a Valid Customer\");\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tJOptionPane.showMessageDialog(null, \"No Customers Found\");\n\t\t\t}\n\t\t\t}", "private void handleOptionOne() {\n\n ClientData clientData = view.askForClientPersonalDataAndCreateClientData(); // zwracamy stworzonego w widoku clienta z wrpowadoznych scanerem danych\n clientModel.save(clientData); // zapisujemy clienta do bazy danych\n view.showClientInformation(clientData); // wyswietlamy info o jego pinie itp.\n\n }", "public void verificaAlteracao() {\r\n if (produto != null) {\r\n dialog.getTfNome().setText(produto.getNome());\r\n dialog.getTfCodigoBarra().setText(produto.getCodigoBarra());\r\n dialog.getTfPrecoCompra().setText(produto.getPrecoCompra().toString());\r\n dialog.getTfPrecoVenda().setText(produto.getPrecoVenda().toString());\r\n dialog.getCbCategoria().setSelectedItem(produto.getCategoriaId());\r\n dialog.getCbFornecedor().setSelectedItem(produto.getFornecedorId());\r\n }\r\n }", "public CustomerDetailsView displayDetailsView(char mode, Customer customer) { \r\n\r\n\t\tif(customerDetailsView == null) {\r\n\t\t\tcustomerDetailsView = new CustomerDetailsView() {\r\n\t\t\t\tpublic void cancelAction() {\r\n\t\t\t\t\tif(validateScreenBeforeClose()) {\r\n\t\t\t\t\t\tdisposeDetailsView();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\t\tApplicationMaster.addScreen(customerDetailsView);\r\n\t\t}\r\n\r\n\t\tcustomerDetailsView.setTitle(getValue(\"TTLscrxxxxx001CustomerDetailsScreen\"));\r\n\t\tcustomerDetailsView.setScreenMode(mode);\r\n\t\tcustomerDetailsView.setController(this);\r\n\r\n\t\tif(mode != CustomerDetailsView.ADD && customer != null) {\r\n\t\t\tcustomerDetailsView.populateScreen(customer);\r\n\t\t}\r\n\r\n\t\tif(customerSearchView != null && customerSearchView.isVisible()) {\r\n\t\t\tcustomerSearchView.setVisible(false);\r\n\t\t}\r\n\r\n\t\tcustomerDetailsView.setVisible(true);\r\n\t\treturn customerDetailsView;\r\n\t}", "public void customerInfo(){\n customerPhone.setLayoutX(305);\n customerPhone.setLayoutY(100);\n customerPhone.setPrefWidth(480);\n customerPhone.setPrefHeight(50);\n customerPhone.setStyle(\"-fx-focus-color: -fx-control-inner-background ; -fx-faint-focus-color: -fx-control-inner-background ; -fx-background-color: #eaebff; -fx-prompt-text-fill: gray\");\n customerPhone.setPromptText(\"Enter customer phone number\");\n customerPhone.setFocusTraversable(false);\n customerPhone.setTooltip(new Tooltip(\"Enter customer phone number\"));\n customerPhone.setAlignment(Pos.CENTER);\n\n\n customerPhone.textProperty().addListener(new ChangeListener<String>() {\n @Override\n public void changed(ObservableValue<? extends String> observable, String oldValue,\n String newValue) {\n if (!newValue.matches(\"\\\\d*\")) {\n customerPhone.setText(newValue.replaceAll(\"[^\\\\d]\", \"\"));\n }\n }\n });\n\n newCustomer = new RadioButton(\"New Customer\");\n newCustomer.setToggleGroup(radiobuttonGroup);\n newCustomer.setSelected(true);\n newCustomer.setLayoutX(810);\n newCustomer.setLayoutY(100);\n existingCustomer = new RadioButton(\"Existing Customer\");\n existingCustomer.setToggleGroup(radiobuttonGroup);\n existingCustomer.setLayoutX(810);\n existingCustomer.setLayoutY(125);\n\n customerName = new TextField();\n customerName.setLayoutX(305);\n customerName.setLayoutY(640);\n customerName.setPrefWidth(480);\n customerName.setPrefHeight(50);\n customerName.setStyle(\"-fx-focus-color: -fx-control-inner-background ; -fx-faint-focus-color: -fx-control-inner-background ; -fx-background-color: #eaebff; -fx-prompt-text-fill: gray\");\n customerName.setPromptText(\"Enter customer name\");\n customerName.setFocusTraversable(false);\n customerName.setTooltip(new Tooltip(\"Enter customer name\"));\n customerName.setAlignment(Pos.CENTER);\n\n\n root.getChildren().addAll(customerPhone, newCustomer, existingCustomer, customerName);\n }", "private void getUserCoownerChoice() {\n int checkedChipId = mBinding.chipGroupCoowner.getCheckedChipId();\n if (checkedChipId == R.id.chip_yes) {\n mChipCoownerInput = 1;\n } else if (checkedChipId == R.id.chip_no) {\n mChipCoownerInput = 0;\n } else {\n mChipCoownerInput = 10;\n }\n }", "private void basicInfoDialogPrompt() {\n if(!prefBool){\n BasicInfoDialog dialog = new BasicInfoDialog();\n dialog.show(getFragmentManager(), \"info_dialog_prompt\");\n }\n }", "private void updateScreenCustomerDetails(Customer c) {\n // - update main title with customers full name\n tvCustomerMainTitle.setText(customer.toString());\n\n // - update screen with customer ID\n textViewID.setText(customer.getCustomerID());\n\n // - update screen with customer email\n tvCustomerEmail.setText(customer.getEmail());\n\n // - update screen with customer VIP status\n tvCustomerVipStatus.setText(customer.vipStatusToString());\n\n // - update avctive game and lane fields\n }", "public InputCustomers() {\n initComponents();\n setLocationRelativeTo(null);\n setAsObserver();\n txtSearch.setText(\"-Select a option to search-\");\n libUpdate.setEnabled(false);\n libRemove.setEnabled(false);\n newCustomermessage.setVisible(false);\n newSectionmessage.setVisible(false);\n newjobrolemessage.setVisible(false);\n loadCustomers();\n loadSections();\n loadJobRoles();\n }", "public void setCustomer(String Cus){\n\n this.customer = Cus;\n }", "public void CampoObligatorioClass(String strCustomerName) {\n\n this.clickNewCustomer();\n this.setCustomerName(strCustomerName);\n this.clickGender();\n }", "protected boolean okData() {\n \t\tString name2 = name.getText().trim();\n \t\tString phone2 = phone.getText().trim();\n \t\tString adress2 = adress.getText().trim();\n \t\tboolean enterpriseButton = enterpriseCustomer.isSelected();\n \t\tboolean privateButton = privateCustomer.isSelected();\n \t if (name2.equals(\"\") || phone2.equals(\"\") || adress2.equals(\"\") || (!enterpriseButton && !privateButton)) {\n \t \tif (name2.equals(\"\")) {\n \t \t\tshowMessageDialog(CustomerRegistration.this, \"You have to input a customer name!\");\n \t \t\tname.requestFocusInWindow();\n \t \t} else if(phone2.equals(\"\")) {\n \t \t\tshowMessageDialog(CustomerRegistration.this, \"You have to input a phone number!\");\n \t \t\tphone.requestFocusInWindow();\n \t \t} else if(adress2.equals(\"\")) {\n \t \t\tshowMessageDialog(CustomerRegistration.this, \"You have to input an adress!\");\n \t \t\tadress.requestFocusInWindow();\n \t \t} else if(!enterpriseButton && !privateButton) {\n \t \t\tshowMessageDialog(CustomerRegistration.this, \"You have to choose a customer type!\");\n \t \t\tprivateCustomer.requestFocusInWindow();\n \t \t}\n \t \treturn false;\n \t } else {\n \t \treturn true;\n \t }\n \t}", "public void showCustomers() {\r\n List<String> customerList = new ArrayList<>();\r\n for (int i = 0; i < customersTable.getItems().size(); i++) {\r\n Customer customer = customersTable.getItems().get(i);\r\n LocalDate date = LocalDate.parse(customer.getDate());\r\n if (date.plusMonths(1).isBefore(LocalDate.now())) {\r\n customerList.add(customer.getFirstName() + \" \" + customer.getLastName());\r\n }\r\n }\r\n String message = \"\";\r\n for (String customer : customerList) {\r\n message += customer + \"\\n\";\r\n }\r\n if (message.equals(\"\")) {\r\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\r\n alert.setTitle(\"The following customers need to be contacted this week\");\r\n alert.setHeaderText(null);\r\n alert.setContentText(\"No customers to be contacted today\");\r\n alert.showAndWait();\r\n } else {\r\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\r\n alert.setTitle(\"The following customers need to be contacted this week\");\r\n alert.setHeaderText(null);\r\n alert.setContentText(message);\r\n alert.showAndWait();\r\n }\r\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t//String input = (String)comboBoxInvoice.getSelectedItem();\n\t\t\t\tString input = (String)comboBoxCustomer.getSelectedItem();\n\t\t\t\tif(input.trim().equals(\"\") || input.matches(\".*\\\\D.*\")){ //regEx\n\t\t\t\t\ttextarea.setText(\"Please enter a valid number\");\n\t\t\t\t\ttextarea.setCaretPosition(0);\n\t\t\t\t\tlistOfCustomers.setSelectedItem(\"select\");\n\t\t\t\t\tlistOfInvoices.setSelectedItem(\"select\");\n\t\t\t\t}else{\n\t\t\t\t\tint num = Integer.parseInt(input);\n\t\t\t\t\ttextarea.setText(invoice.viewInvoiceByCustomer(num, invoices));\t//viewInvoiceByCustomer() is in the Invoice class\n\t\t\t\t\ttextarea.setCaretPosition(0);\n\t\t\t\t\tlistOfInvoices.setSelectedItem(\"select\");\n\t\t\t\t\n\t\t\t\t}\n\t\t\t}", "public void handleSelectionEvent(@Observes @EntitySelectionEvent SalesOrder selectedEntity)\n\t{\n\t\tPropertyReader.copy(selectedEntity, displayedEntity);\n\t\tdisplayView.getClient().setValue(selectedEntity.getCustomer());\n\t\tCustomer customer = new Customer();\n\t\tPropertyReader.copy(displayedEntity.getCustomer(), customer);\n\t\tdisplayView.getAmountHT().setNumber(displayedEntity.getAmountAfterTax());\n\t\tgetCustomerInsurance(customer);\n\t\tsetDiscountt(selectedEntity);\n\t\tresetNetTopay(selectedEntity);\n\t\tdisplayView.getNumBon().setText(null);\n\t}", "private void Confirm(Stage stage){\n //Set the customer information as the text inputted\n int length = MainGui.obBookingsLedger.getCustomerList().size();\n obCustomer.setCustomerID(length++);\n obCustomer.setName(txtName.getText());\n obCustomer.setLast(txtLast.getText());\n obCustomer.setAddress(txtAddress.getText());\n obCustomer.setCity(txtCity.getText());\n obCustomer.setProvince(txtProvince.getText());\n obCustomer.setCountry(txtCountry.getText());\n obCustomer.setPostal(txtPostal.getText());\n obCustomer.setEmail(txtEmail.getText());\n\n //Concatenates the phone boxes into one string each.\n String sPhone = txtPhone.getText() + txtPhone2.getText() + txtPhone3.getText();\n String sSecPhone = txtSecPhone.getText() + txtSecPhone2.getText() + txtSecPhone3.getText();\n String sFax = txtFax.getText() + txtFax2.getText() + txtFax3.getText();\n //Having the fax or secondary phone fields blank will cause errors, so they're set to 0 if they don't exist.\n if (sFax.equals(\"\")) {\n sFax = \"0\";\n }\n if (sSecPhone.equals(\"\"))\n {\n sSecPhone = \"0\";\n }\n String sVal = \"\";\n\n //Try/catch block to prevent non-numbers from being entered in phone/fax fields.\n try {\n sVal = obCustomer.updateCustomer(obCustomer.getName(), obCustomer.getLast(), obCustomer.getAddress(),\n obCustomer.getProvince(), obCustomer.getCity(), obCustomer.getPostal(), obCustomer.getCountry(),\n obCustomer.getEmail(), Long.parseLong(sPhone), Long.parseLong(sFax), Long.parseLong(sSecPhone), 1);\n }\n catch (NumberFormatException exp){\n sVal = \"Please enter only numbers in phone and fax fields.\";\n }\n\n //An alert will pop up denoting success or failure. The error contents come from Customer's UpdateCustomer method.\n //If successful, all fields will revert to being non-editable.\n if (sVal.equals(\"Successfully added\")){\n MainGui.obBookingsLedger.getCustomerList().add(obCustomer);\n\n /* Save Data */\n PersistentDataManager.saveAll(obBookingsLedger);\n\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\n alert.setTitle(\"Success!\");\n alert.setHeaderText(null);\n alert.setContentText(\"Customer successfully added\");\n alert.showAndWait();\n stage.setScene(MainGui.mainScene);\n }\n else {\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setTitle(\"Error Detected\");\n alert.setHeaderText(\"Not all fields were correctly entered.\");\n alert.setContentText(sVal);\n alert.showAndWait();\n }\n\n }", "@FXML\n private void handleEditPerson() {\n Shops selectedShops = personTable.getSelectionModel().getSelectedItem();\n if (selectedShops != null) {\n boolean okClicked = mainApp.showPersonEditDialog(selectedShops);\n if (okClicked) {\n showPersonDetails(selectedShops);\n }\n\n } else {\n // Nothing selected.\n Alert alert = new Alert(AlertType.WARNING);\n alert.initOwner(mainApp.getPrimaryStage());\n alert.setTitle(\"No Selection\");\n alert.setHeaderText(\"No Shops Selected\");\n alert.setContentText(\"Please select a person in the table.\");\n \n alert.showAndWait();\n }\n }", "public Customer_Edit() {\n initComponents();\n getMenu_Catagory();\n getMenu();\n showmenu_table();\n getPromotion();\n getPromotion_Menu();\n showpromotion_table();\n getIngredient();\n getStock();\n if(c.getmaintenance()==true){\n t.setid(\"01\");\n }else{\n }\n getorder();\n getorder_menu();\n table_number_txt.setText(t.getid());\n showorder_table();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n txtCustomerID = new javax.swing.JTextField();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n btnBack = new javax.swing.JButton();\n jLabel4 = new javax.swing.JLabel();\n btnCreate = new javax.swing.JButton();\n txtCustomerName = new javax.swing.JTextField();\n txtAddress = new javax.swing.JTextField();\n jLabel5 = new javax.swing.JLabel();\n txtContact = new javax.swing.JTextField();\n comboMarket = new javax.swing.JComboBox();\n jLabel6 = new javax.swing.JLabel();\n\n txtCustomerID.setEnabled(false);\n txtCustomerID.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtCustomerIDActionPerformed(evt);\n }\n });\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n jLabel1.setText(\"Customer Name:\");\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n jLabel2.setText(\"Customer ID:\");\n\n jLabel3.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n jLabel3.setText(\"Address:\");\n\n btnBack.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n btnBack.setText(\"<< Back\");\n btnBack.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnBackActionPerformed(evt);\n }\n });\n\n jLabel4.setFont(new java.awt.Font(\"Tahoma\", 1, 24)); // NOI18N\n jLabel4.setText(\"Create New Customer\");\n\n btnCreate.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n btnCreate.setText(\"Create\");\n btnCreate.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnCreateActionPerformed(evt);\n }\n });\n\n jLabel5.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n jLabel5.setText(\"Contact:\");\n\n txtContact.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n txtContactKeyTyped(evt);\n }\n });\n\n comboMarket.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Higher Education Market\", \"Finance Service Market\" }));\n\n jLabel6.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n jLabel6.setText(\"Market:\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(95, 95, 95)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(btnCreate)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(btnBack)\n .addGap(149, 149, 149)\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 267, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(192, 192, 192)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel1)\n .addComponent(jLabel2)\n .addComponent(jLabel6)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel5)\n .addComponent(jLabel3)))\n .addGap(23, 23, 23)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(txtCustomerID)\n .addComponent(txtCustomerName)\n .addComponent(txtAddress, javax.swing.GroupLayout.DEFAULT_SIZE, 204, Short.MAX_VALUE)\n .addComponent(txtContact, javax.swing.GroupLayout.Alignment.TRAILING))))\n .addComponent(comboMarket, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(241, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(47, 47, 47)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnBack))\n .addGap(48, 48, 48)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtCustomerID, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2))\n .addGap(38, 38, 38)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtCustomerName, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel1))\n .addGap(30, 30, 30)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(txtAddress, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(31, 31, 31)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(txtContact, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(39, 39, 39)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(comboMarket, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel6))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 69, Short.MAX_VALUE)\n .addComponent(btnCreate, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(34, 34, 34))\n );\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tString input = (String)comboBoxProductTitle.getSelectedItem();\n\t\t\t\t//String input = productTitleTextField.getText();\n\t\t\t\t\n\t\t\t\tif(input.trim().equals(\"Select\")){ \n\t\t\t\t\tproductTextArea.setText(\"\");\n\t\t\t\t\tproductTextArea.setCaretPosition(0);\n\t\t\t\t\tlistOfProdIds.setSelectedItem(\"Select\");\n\t\t\t\t\tlistOfProductAuthor.setSelectedItem(\"Select\");\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please Select Product Title From Drop Down Menu\");\n\t\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\t\n\t\t\t\t\tproductTextArea.setText(product.viewProductByTitle(input, products));\t//viewInvoiceByCustomer() is in the Invoice class\n\t\t\t\t\tproductTextArea.setCaretPosition(0);\n\t\t\t\t\tlistOfProdIds.setSelectedItem(\"Select\");\n\t\t\t\t\tlistofProductTitle.setSelectedItem(\"Select\");\n\t\t\t\t\tlistOfProductAuthor.setSelectedItem(\"Select\");\n\t\t\t\t\tpriceRange.clearSelection();\n\t\t\t\t\tquantity.clearSelection();\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}", "public void onYesButtonClicked() {\n changeAfterClientPick();\n }", "public void updateCustomerInfo(){\n nameLabel.setText(customer.getName());\n productWantedLabel.setText(customer.getWantedItem());\n serviceManager.getTotalPrice().updateNode();\n }", "public void setCustomerName(String name) {\r\n this.name.setText(name);\r\n }", "public void setupDialog(Stage stage) {\n\t\tthis.stage = stage;\n\n\t\tcustomers = C195Application.getAllCustomers();\n\n\t\tcustomerTable.setItems(customers);\n\t}", "public static void enterCustomer(Employee employee) {\n\t\tCustomer.setCustomerQuantity();\n\t\tString name;\n\t\tdo {\n\t\t\tname= JOptionPane.showInputDialog(\"Please enter a name of the customer.\");\n\t\t\tif (!employee.getVehicle().getCustomer().setName(name)) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Error, Invalid\");\n\t\t\t}\n\t\t} while (!employee.getVehicle().getCustomer().setName(name));\n\t\t\n\t\tString phone;\n\t\tdo {\n\t\t\tphone = JOptionPane.showInputDialog(\"Please enter a phone number \"\n\t\t\t\t\t+ \"\\nFormat: 0001112222\");\n\t\t\tif (!employee.getVehicle().getCustomer().setPhone(phone)) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Error, Invalid\");\n\t\t\t}\n\t\t} while (!employee.getVehicle().getCustomer().setPhone(phone));\n\t\tString paymentInfo;\n\t\tdo {\n\t\t\tpaymentInfo = JOptionPane.showInputDialog(\"Please enter a payment information (Credit, Debit, or Cash)\");\n\t\t\tif (!employee.getVehicle().getCustomer().setPaymentInfo(paymentInfo)) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Error, Invalid\");\n\t\t\t}\n\t\t} while (!employee.getVehicle().getCustomer().setPaymentInfo(paymentInfo));\n\t\tString address;\n\t\tdo {\n\t\t\taddress = JOptionPane.showInputDialog(\"Please enter a full address.\");\n\t\t\tif (!employee.getVehicle().getCustomer().setAddress(address)) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Error, Invalid\");\n\t\t\t}\n\t\t}while (!employee.getVehicle().getCustomer().setAddress(address));\n\t\tString insuranceNumber;\n\t\tdo {\n\t\t\tinsuranceNumber = JOptionPane.showInputDialog(\"Please enter an insurance number.\");\n\t\t\tif (!employee.getVehicle().getCustomer().setInsuranceNumber(insuranceNumber)) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Error, Invalid\");\n\t\t\t}\n\t\t} while (!employee.getVehicle().getCustomer().setInsuranceNumber(insuranceNumber));\n\t\tJOptionPane.showMessageDialog(null, employee.getVehicle().getCustomer().toString());\n\t}", "@FXML\r\n private void handleOk() {\r\n if (isInputValid()) {\r\n customer.setCustFirstName(custFirstNameTextField.getText());\r\n customer.setCustLastName(custLastNameTextField.getText());\r\n customer.setCustAddress(custAddressTextField.getText());\r\n customer.setCustCity(custCityTextField.getText());\r\n customer.setCustProv(custProvinceTextField.getText());\r\n customer.setCustPostal(custPostalCodeTextField.getText());\r\n customer.setCustCountry(custCountryTextField.getText());\r\n customer.setCustHomePhone(custHomePhoneTextField.getText());\r\n customer.setCustBusPhone(custBusinessPhoneTextField.getText());\r\n customer.setCustEmail(custEmailTextField.getText());\r\n customer.setAgentId((int)cboAgentId.getValue());\r\n \r\n try {\r\n if (oldCustomer == null) {\r\n CustomerDB.addNewCustomer(customer);\r\n } else {\r\n CustomerDB.editCustomer(customer, oldCustomer);\r\n }\r\n } catch (Exception e) {\r\n System.out.println(\"Adding customer to DB in handleOk failed\");\r\n e.printStackTrace();\r\n }\r\n try {\r\n main.showCustomerScene();\r\n } catch (Exception e) {\r\n System.out.println(\"Show customer scene failed\");\r\n e.printStackTrace();\r\n }\r\n }\r\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n lblCustPurchase = new javax.swing.JLabel();\n btnGetId = new javax.swing.JButton();\n lblCustNum = new javax.swing.JLabel();\n btnGetTot = new javax.swing.JButton();\n btnBack = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n jButton1 = new javax.swing.JButton();\n jComboBox1 = new javax.swing.JComboBox();\n jLabel3 = new javax.swing.JLabel();\n jComboBox2 = new javax.swing.JComboBox();\n jButton2 = new javax.swing.JButton();\n jLabel2 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n lblCustPurchase.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n lblCustPurchase.setForeground(new java.awt.Color(0, 153, 153));\n lblCustPurchase.setText(\"Details of a particular customer:\");\n getContentPane().add(lblCustPurchase, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 220, 310, 30));\n\n btnGetId.setBackground(new java.awt.Color(0, 102, 102));\n btnGetId.setFont(new java.awt.Font(\"Tahoma\", 1, 13)); // NOI18N\n btnGetId.setText(\"Get Information\");\n btnGetId.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnGetIdActionPerformed(evt);\n }\n });\n getContentPane().add(btnGetId, new org.netbeans.lib.awtextra.AbsoluteConstraints(610, 220, 140, 38));\n\n lblCustNum.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n lblCustNum.setForeground(new java.awt.Color(0, 153, 153));\n lblCustNum.setText(\"Total number of customers till date: \");\n getContentPane().add(lblCustNum, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 330, -1, -1));\n\n btnGetTot.setBackground(new java.awt.Color(0, 102, 102));\n btnGetTot.setFont(new java.awt.Font(\"Tahoma\", 1, 13)); // NOI18N\n btnGetTot.setText(\"Get Total\");\n btnGetTot.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnGetTotActionPerformed(evt);\n }\n });\n getContentPane().add(btnGetTot, new org.netbeans.lib.awtextra.AbsoluteConstraints(480, 330, 140, 30));\n\n btnBack.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/inventorymanagementsystem/back.png\"))); // NOI18N\n btnBack.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnBackActionPerformed(evt);\n }\n });\n getContentPane().add(btnBack, new org.netbeans.lib.awtextra.AbsoluteConstraints(750, 440, 120, 30));\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n jLabel1.setForeground(new java.awt.Color(0, 153, 153));\n jLabel1.setText(\"Details of all the customers:\");\n getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 170, -1, -1));\n\n jButton1.setBackground(new java.awt.Color(0, 102, 102));\n jButton1.setFont(new java.awt.Font(\"Tahoma\", 1, 13)); // NOI18N\n jButton1.setText(\"Get Information\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(410, 170, 140, 30));\n\n jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(db.Combo(new String(\"customerId\"),new String(\"customer\"))));\n jComboBox1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jComboBox1ActionPerformed(evt);\n }\n });\n getContentPane().add(jComboBox1, new org.netbeans.lib.awtextra.AbsoluteConstraints(460, 220, 140, 30));\n\n jLabel3.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n jLabel3.setForeground(new java.awt.Color(0, 153, 153));\n jLabel3.setText(\"Payment information of a particular customer:\");\n getContentPane().add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 270, 450, 40));\n\n jComboBox2.setModel(new javax.swing.DefaultComboBoxModel(db.Combo(new String(\"customerId\"),new String(\"customer\"))));\n jComboBox2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jComboBox2ActionPerformed(evt);\n }\n });\n getContentPane().add(jComboBox2, new org.netbeans.lib.awtextra.AbsoluteConstraints(580, 280, 100, 30));\n\n jButton2.setBackground(new java.awt.Color(0, 102, 102));\n jButton2.setFont(new java.awt.Font(\"Tahoma\", 1, 13)); // NOI18N\n jButton2.setText(\"Get Information\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton2, new org.netbeans.lib.awtextra.AbsoluteConstraints(690, 280, 150, 30));\n\n jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/inventorymanagementsystem/query bg.jpg\"))); // NOI18N\n getContentPane().add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, -1, -1));\n\n pack();\n }", "public AddCustomer() {\n initComponents();\n loadAllToTable();\n\n tblCustomers.getSelectionModel().addListSelectionListener(new ListSelectionListener() {\n\n @Override\n public void valueChanged(ListSelectionEvent e) {\n if (tblCustomers.getSelectedRow() == -1) {\n return;\n }\n\n String cusId = tblCustomers.getValueAt(tblCustomers.getSelectedRow(), 0).toString();\n\n String cusName = tblCustomers.getValueAt(tblCustomers.getSelectedRow(), 1).toString();\n String contact = tblCustomers.getValueAt(tblCustomers.getSelectedRow(), 2).toString();\n String creditLimi = tblCustomers.getValueAt(tblCustomers.getSelectedRow(), 3).toString();\n String credidays = tblCustomers.getValueAt(tblCustomers.getSelectedRow(), 4).toString();\n\n txtCustId.setText(cusId);\n txtCustomerN.setText(cusName);\n\n txtContact.setText(contact);\n txtCreditLimit.setText(creditLimi);\n txtCreditDays.setText(credidays);\n\n }\n });\n }", "public void showPurchase(String value) {\n cateringCustomerObservable.firePropertyChange(\"cateringCustomer\", this.toBeObserved, value);\n this.toBeObserved = value;\n }", "public void abrirDialogoCustodio(){\n\t\tif(aut_empleado.getValor()!=null){\n\t\t\ttab_tarspaso_Custodio.limpiar();\n\t\t\ttab_tarspaso_Custodio.insertar();\n\t\t\t//tab_direccion.limpiar();\n\t\t//\ttab_direccion.insertar();\n\t\t\tdia_traspaso_custodio.dibujar();\n\t\t}\n\t\telse{\n\t\t\tutilitario.agregarMensaje(\"Inserte un Custodio\", \"\");\n\t\t}\n\n\t}", "@Override\n public void onDelectChoise(ServResrouce info)\n {\n DelectChoiseTrafficDialog dialog =\n new DelectChoiseTrafficDialog(ConfirmOrderActivity.this, new OperationListener()\n {\n @Override\n public void onDelectFlightInfo(ServResrouce info)\n {\n // TODO Auto-generated method stub\n info.setChecked(false);\n mAirListViewAdapter.notifyDataSetChanged();\n }\n \n @Override\n public void onDelectComfireInfo(ServResrouce info)\n {\n // TODO Auto-generated method stub\n }\n });\n dialog.setFlightInfo(info);\n dialog.show();\n }", "@Then(\"^user enters customer details$\")\n\tpublic void user_enters_customer_details(DataTable customer) {\n\t\tfor(Map<String, String> data :customer.asMaps())\n\t\t{\n\t\t\t \tdriver.findElement(By.name(\"name\")).sendKeys(data.get(\"customer\"));\n\t\t\t driver.findElement(By.xpath(\"//input[@type='radio'][@value='m']\")).click();\n\t\t\t driver.findElement(By.xpath(\"//input[@type='date']\")).sendKeys(data.get(\"DOB\"));\n//\t\t\t driver.findElement(By.name(\"addr\")).sendKeys(data.get(\"add\"));\n\t\t\t driver.findElement(By.name(\"city\")).sendKeys(data.get(\"city\"));\n\t\t\t driver.findElement(By.name(\"state\")).sendKeys(data.get(\"state\"));\n\t\t\t driver.findElement(By.name(\"pinno\")).sendKeys(data.get(\"pin\"));\n\t\t\t driver.findElement(By.name(\"telephoneno\")).sendKeys(data.get(\"mobile\"));\n\t\t\t driver.findElement(By.name(\"emailid\")).sendKeys(data.get(\"emailid\"));\n\t\t\t driver.findElement(By.name(\"password\")).sendKeys(data.get(\"password\"));\n\t\t\t \n\t\t}\n\t \n\t \n\t}", "@FXML\n private void viewSelected() {\n if (selectedAccount == null) {\n // Warn user if no account was selected.\n noAccountSelectedAlert(\"View DonorReceiver\");\n } else {\n ViewProfilePaneController.setAccount(selectedAccount);\n PageNav.loadNewPage(PageNav.VIEW);\n }\n }", "public static void selectedContactDialog(final String vCard, final Context context){\n NotifyDialog dialog = NotifyDialog.startConfirm(context, \"Add to contact\", \"Do You want to add this contact to Your address book?\");\n dialog.setButtonsText(context.getString(R.string.NO_CAPITAL), context.getString(R.string.YES_CAPITAL));\n dialog.setTwoButtonListener(new NotifyDialog.TwoButtonDialogListener() {\n @Override\n public void onOkClicked(NotifyDialog dialog) {\n String vCardTempPath = Tools.getTempFolderPath() + \"/\" + System.currentTimeMillis() + \"_vCard.vcf\";\n File vCardTempFile = new File(vCardTempPath);\n Tools.saveStringToFile(vCard, vCardTempPath);\n Uri uri = Uri.fromFile(vCardTempFile);\n Intent intent = new Intent(Intent.ACTION_VIEW);\n intent.setDataAndType(uri, \"text/x-vcard\");\n context.startActivity(intent);\n dialog.dismiss();\n }\n\n @Override\n public void onCancelClicked(NotifyDialog dialog) {\n dialog.dismiss();\n }\n });\n }", "public void showEditCustomerScene(Customer customer) throws IOException {\n this.showEditCustomerScene(customer,null);\r\n }", "private void initData() {\n ContractList conl = new ContractList();\n String iCard = txtindentify.getText().trim();\n if (conl.getacc(iCard) == 0) {\n txtAcc.setText(\"NEW CUSTOMER\");\n\n } else {\n Customer cus = new Customer();\n CustomerList cl = new CustomerList();\n cus = cl.getcus(iCard);\n txtAcc.setText(Integer.toString(cus.acc));\n\n }\n }", "public void display()\r\n {\r\n System.out.println(\"Description: \" +description);\r\n if(!customersName.equals(\"\")) {\r\n System.out.println(\"Customer Name: \" +customersName);\r\n }\r\n }", "private void setUserDetailsToView() {\n\t\tdetailDisplay.getFirstName().setValue(currentDetails.getFirstName());\n\t\tdetailDisplay.getLastName().setValue(currentDetails.getLastName());\n\t\tdetailDisplay.getMiddleInitial().setValue(currentDetails.getMiddleInitial());\n\t\tdetailDisplay.getLoginId().setText(currentDetails.getLoginId());\n\t\tdetailDisplay.getTitle().setValue(currentDetails.getTitle());\n\t\tdetailDisplay.getEmailAddress().setValue(currentDetails.getEmailAddress());\n\t\tdetailDisplay.getPhoneNumber().setValue(currentDetails.getPhoneNumber());\n\t\tdetailDisplay.getOrganizationListBox().setValue(currentDetails.getOrganizationId());\n\t\tdetailDisplay.getIsActive().setValue(currentDetails.isActive());\n\t\tif (!currentDetails.isActive()) {\n\t\t\tdetailDisplay.getIsRevoked().setValue(true);\n\t\t} else { // added else to fix default Revoked radio check in Mozilla (User Story 755)\n\t\t\tdetailDisplay.getIsRevoked().setValue(false);\n\t\t}\n\t\t\n\t\tdetailDisplay.setUserLocked(currentDetails.isLocked());\n\t\tif (currentDetails.isExistingUser()) {\n\t\t\tdetailDisplay.setShowRevokedStatus(currentDetails.isCurrentUserCanChangeAccountStatus());\n\t\t\t// detailDisplay.setUserIsDeletable(currentDetails.isCurrentUserCanChangeAccountStatus());\n\t\t} else {\n\t\t\tdetailDisplay.setShowRevokedStatus(false);\n\t\t\t//detailDisplay.setUserIsDeletable(false);\n\t\t}\n\t\tdetailDisplay.setUserIsActiveEditable(currentDetails.isCurrentUserCanChangeAccountStatus());\n\t\tdetailDisplay.setShowUnlockOption(currentDetails.isCurrentUserCanUnlock() && currentDetails.isActive());\n\t\tdetailDisplay.getRole().setValue(currentDetails.getRole());\n\t\tdetailDisplay.getOid().setValue(currentDetails.getOid());\n\t\tdetailDisplay.getOid().setTitle(currentDetails.getOid());\n\t\t//detailDisplay.getRootOid().setValue(currentDetails.getRootOid());\n\t}", "public void displayCitylist(){\n final CharSequence[] items = {\" Banglore \", \" Hyderabad \", \" Chennai \", \" Delhi \", \" Mumbai \", \" Kolkata \", \"Ahmedabad\"};\n\n // Creating and Building the Dialog\n AlertDialog.Builder builder = new AlertDialog.Builder(context);\n builder.setTitle(\"Select Your City\");\n //final AlertDialog finalLevelDialog = levelDialog;\n //final AlertDialog finalLevelDialog = levelDialog;\n builder.setSingleChoiceItems(items, -1, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int item) {\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(getActivity());\n SharedPreferences.Editor editor1 = preferences.edit();\n\n switch (item) {\n case 0: {\n editor1.putInt(\"Current_city\", preferences.getInt(\"BLR\", 25));\n editor1.putFloat(\"nightfare\", 0.5f);\n editor1.putInt(\"min_distance\", 2000);\n editor1.putInt(\"perkm\", 11);\n editor1.apply();\n Log.d(\"Banglore\", \"\" + preferences.getInt(\"BLR\", 25));\n Log.d(\"Cur\", \"\" + preferences.getInt(\"Current_city\", 25));\n citySelected.setText(\"City: Bangalore\");\n break;\n }\n case 1: {\n editor1.putInt(\"Current_city\", preferences.getInt(\"HYD\", 20));\n editor1.putFloat(\"nightfare\", 0.5f);\n editor1.putInt(\"min_distance\", 1600);\n editor1.putInt(\"perkm\", 11);\n editor1.apply();\n Log.d(\"HYD\", \"\" + preferences.getInt(\"HYD\", 20));\n Log.d(\"Cur\", \"\" + preferences.getInt(\"Current_city\", 20));\n citySelected.setText(\"City: Hyderabad\");\n break;\n }\n case 2: {\n editor1.putInt(\"Current_city\", preferences.getInt(\"CHE\", 25));\n editor1.putFloat(\"nightfare\", 0.5f);\n editor1.putInt(\"min_distance\", 1800);\n editor1.putInt(\"perkm\", 12);\n editor1.apply();\n Log.d(\"CHE\", \"\" + preferences.getInt(\"CHE\", 25));\n Log.d(\"Cur\", \"\" + preferences.getInt(\"Current_city\", 25));\n citySelected.setText(\"City: Chennai\");\n break;\n }\n case 3: {\n editor1.putInt(\"Current_city\", preferences.getInt(\"DEL\", 25));\n editor1.putFloat(\"nightfare\", 0.25f);\n editor1.putInt(\"min_distance\", 2000);\n editor1.putInt(\"perkm\", 8);\n editor1.apply();\n citySelected.setText(\"City: Delhi\");\n break;\n }\n case 4: {\n editor1.putInt(\"Current_city\", preferences.getInt(\"MUM\", 18));\n editor1.putFloat(\"nightfare\", 0.25f);\n editor1.putInt(\"min_distance\", 1500);\n editor1.putInt(\"perkm\", 11);\n editor1.apply();\n Log.d(\"MUM\", \"\" + preferences.getInt(\"MUM\", 25));\n Log.d(\"Cur\", \"\" + preferences.getInt(\"Current_city\", 25));\n citySelected.setText(\"City: Mumbai\");\n break;\n }\n case 5: {\n editor1.putInt(\"Current_city\", preferences.getInt(\"KOL\", 25));\n editor1.putFloat(\"nightfare\", 0.0f);\n editor1.putInt(\"min_distance\", 2000);\n editor1.putInt(\"perkm\", 12);\n editor1.apply();\n Log.d(\"KOL\", \"\" + preferences.getInt(\"KOL\", 25));\n Log.d(\"Cur\", \"\" + preferences.getInt(\"Current_city\", 25));\n citySelected.setText(\"City: Kolkata\");\n break;\n }\n case 6: {\n editor1.putInt(\"Current_city\", preferences.getInt(\"AMD\", 11));\n editor1.putFloat(\"nightfare\", 0.25f);\n editor1.putInt(\"min_distance\", 1400);\n editor1.putInt(\"perkm\", 8);\n editor1.apply();\n Log.d(\"AMD\", \"\" + preferences.getInt(\"AMD\", 11));\n Log.d(\"Cur\", \"\" + preferences.getInt(\"Current_city\", 11));\n citySelected.setText(\"City: Ahmedabad\");\n break;\n }\n default:\n editor1.putInt(\"Current_city\", preferences.getInt(\"BLR\", 25));\n editor1.putInt(\"min_distance\", 2000);\n editor1.putFloat(\"nightfare\", 0.5f);\n editor1.putInt(\"perkm\", 11);\n editor1.apply();\n citySelected.setText(\"City: Bangalore\");\n }\n levelDialog.dismiss();\n }\n });\n levelDialog = builder.create();\n levelDialog.show();\n }", "private void ActionChooseCountry() {\n final AlertDialog.Builder dialog = new AlertDialog.Builder(getContext());\n dialog.setTitle(getString(R.string.dialog_title_choose_country));\n\n final List<String> countryNames = Arrays.asList(getResources().getStringArray(R.array.countries_names));\n final List<String> countryArgs = Arrays.asList(getResources().getStringArray(R.array.countries_arg));\n\n final ArrayAdapter<String> arrayAdapter = new ArrayAdapter<>(getContext(), android.R.layout.simple_list_item_1);\n arrayAdapter.addAll(countryNames);\n\n dialog.setNegativeButton(getString(R.string.dialog_btn_cancel), new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n dialogInterface.dismiss();\n }\n });\n\n dialog.setAdapter(arrayAdapter, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n CoutryArg = countryArgs.get(i);\n\n tvChooseCountry.setText(countryNames.get(i));\n if (SourceId != null) {\n SourceId = null;\n tvChooseSource.setText(R.string.tv_pick_sourse);\n currentPage = 1;\n }\n }\n });\n dialog.show();\n }", "public void TipoCliente() {\n\tint cambio=1;\n\tString tipoCliente=\"\";\n\tdo {\n\t\ttry {\n\t\t\ttipoCliente = (JOptionPane.showInputDialog(null, \"Selecciona el tipo de cliente\", null, JOptionPane.PLAIN_MESSAGE,null, new Object[]\n\t\t\t\t\t{ \"Selecciona\",\"Docente\", \"Administrativo\"}, \"Selecciona\")).toString() ;\n\t\t\t\n\t\t\tif(tipoCliente.equalsIgnoreCase(\"Docente\")) {\n\t\t\t\tingresaDocente();\n\t\t\t\tsetTipoCliente(\"Docente\");\n\t\t\t\t\n\t\t\t}else if(tipoCliente.equalsIgnoreCase(\"Administrativo\")) {\n\t\t\t\tingresaAdministrativo();\n\t\t\t\tsetTipoCliente(\"Administrativo\");\n\t\t\t}else{\n\t\t\t\t\n\t\t\t\tJOptionPane.showMessageDialog(null,\"Escoge una de las dos opciones\");\n\t\t\t}\n\t} catch (Exception e) {\n\t\tJOptionPane.showMessageDialog(null, \"Debes escoger una opcion\");\n\t\tcambio=0;\n\t}\n\t} while (tipoCliente==\"Selecciona\"||tipoCliente==null||cambio==0);\t\n}", "public void editDetails(String name) {\n if(isContactExist(name) == true) {\n Contacts contact = getContact(name);\n boolean isExit = false;\n while(!isExit) {\n System.out.println(\"Select option:\" + \"\\n\" + \"1.first name\" + \"\\n\" + \"2.last name\" +\n \"\\n\" + \"3.address\" + \"\\n\" + \"4.city\" + \"\\n\" +\n \"5.state\" + \"\\n\" + \"6.email\" + \"\\n\" + \"7.zip\" +\n \"\\n\" + \"8.phone number\" + \"\\n\" + \"9.exit\");\n switch(scannerForAddressBook.scannerProvider().nextInt()) {\n case 1:\n System.out.println(\"Enter new first name to change: \");\n contact.setFirstName(scannerForAddressBook.scannerProvider().nextLine());\n break;\n case 2:\n System.out.println(\"Enter new last name to change: \");\n contact.setLastName(scannerForAddressBook.scannerProvider().nextLine());\n break;\n case 3:\n System.out.println(\"Enter new address to change: \");\n contact.setAddress(scannerForAddressBook.scannerProvider().nextLine());\n break;\n case 4:\n System.out.println(\"Enter new city to change: \");\n contact.setCity(scannerForAddressBook.scannerProvider().nextLine());\n break;\n case 5:\n System.out.println(\"Enter new state to change: \");\n contact.setState(scannerForAddressBook.scannerProvider().nextLine());\n break;\n case 6:\n System.out.println(\"Enter new email to change: \");\n contact.setEmail(scannerForAddressBook.scannerProvider().nextLine());\n break;\n case 7:\n System.out.println(\"Enter new zip to change: \");\n contact.setZip(scannerForAddressBook.scannerProvider().nextInt());\n break;\n case 8:\n System.out.println(\"Enter new phone number to change: \");\n contact.setPhoneNumber(scannerForAddressBook.scannerProvider().nextLine());\n break;\n default:\n System.out.println(\"Thank you!\");\n isExit = true;\n }\n }\n } else {\n System.out.println(\"Contact does not exists!\");\n }\n }", "public void setCustomer(String customer) {\n this.customer = customer;\n }", "public void initData(Customer customer) throws SQLException{\n this.selectedCustomer = customer ;\n this.fullnameLabel.setText(selectedCustomer.getFullname());\n this.username.setText(selectedCustomer.getUsername());\n this.phone.setText(selectedCustomer.getPhone());\n this.email.setText(selectedCustomer.getEmail());\n this.address.setText(selectedCustomer.getAddress());\n this.customer_id.setText(Integer.toString(selectedCustomer.getCustomer_id()));\n this.tableView.setItems(getOrders());\n }", "public void Loadata(){ // fill the choice box\n stats.removeAll(stats);\n String seller = \"Seller\";\n String customer = \"Customer\";\n stats.addAll(seller,customer);\n Status.getItems().addAll(stats);\n }", "private void showFinalInfoDialogue(boolean NEGATIVE_DUE, double dueAmnt, final SalesReturnReviewItem printList) {\n\n paymentDialog.dismiss();\n final Dialog lastDialog = new Dialog(this);\n\n lastDialog.setContentView(R.layout.pop_up_for_sale_and_payment_success);\n\n\n //SETTING SCREEN WIDTH\n lastDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));\n Window window = lastDialog.getWindow();\n window.setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);\n //*************\n\n lastDialog.setOnDismissListener(new DialogInterface.OnDismissListener() {\n @Override\n public void onDismiss(DialogInterface dialog) {\n finish();\n }\n });\n\n Button okayButton = lastDialog.findViewById(R.id.pop_up_for_payment_okay);\n okayButton.setText(\"Done\");\n okayButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n lastDialog.dismiss();\n }\n });\n\n Button printBtn = lastDialog.findViewById(R.id.pop_up_for_payment_add_pay);\n printBtn.setText(\"Print\");\n printBtn.setVisibility(View.VISIBLE);\n printBtn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n if (btsocket == null) {\n Intent BTIntent = new Intent(getApplicationContext(), DeviceList.class);\n startActivityForResult(BTIntent, DeviceList.REQUEST_CONNECT_BT);\n } else {\n BPrinter printer = new BPrinter(btsocket, SalesReviewDetail.this);\n FabizProvider provider = new FabizProvider(SalesReviewDetail.this, false);\n Cursor cursor = provider.query(FabizContract.Customer.TABLE_NAME, new String[]{FabizContract.Customer.COLUMN_SHOP_NAME,\n FabizContract.Customer.COLUMN_VAT_NO,\n FabizContract.Customer.COLUMN_ADDRESS_AREA,\n FabizContract.Customer.COLUMN_ADDRESS_ROAD,\n FabizContract.Customer.COLUMN_ADDRESS_BLOCK,\n FabizContract.Customer.COLUMN_ADDRESS_SHOP_NUM\n },\n FabizContract.Customer._ID + \"=?\", new String[]{custId}, null);\n if (cursor.moveToNext()) {\n String addressForInvoice = cursor.getString(cursor.getColumnIndex(FabizContract.Customer.COLUMN_ADDRESS_AREA));\n if (!cursor.getString(cursor.getColumnIndex(FabizContract.Customer.COLUMN_ADDRESS_ROAD)).matches(\"NA\")) {\n addressForInvoice += \", \" + cursor.getString(cursor.getColumnIndex(FabizContract.Customer.COLUMN_ADDRESS_ROAD));\n }\n if (!cursor.getString(cursor.getColumnIndex(FabizContract.Customer.COLUMN_ADDRESS_BLOCK)).matches(\"NA\")) {\n addressForInvoice += \", \" + cursor.getString(cursor.getColumnIndex(FabizContract.Customer.COLUMN_ADDRESS_BLOCK));\n }\n if (!cursor.getString(cursor.getColumnIndex(FabizContract.Customer.COLUMN_ADDRESS_SHOP_NUM)).matches(\"NA\")) {\n addressForInvoice += \", \" + cursor.getString(cursor.getColumnIndex(FabizContract.Customer.COLUMN_ADDRESS_SHOP_NUM));\n }\n\n printer.printSalesReturnReciept(printList, cdue + \"\",\n cursor.getString(cursor.getColumnIndex(FabizContract.Customer.COLUMN_SHOP_NAME)), addressForInvoice,\n cursor.getString(cursor.getColumnIndex(FabizContract.Customer.COLUMN_VAT_NO)));\n } else {\n showToast(\"Something went wrong, can't print right now\");\n }\n }\n }\n });\n\n final TextView dateV = lastDialog.findViewById(R.id.pop_up_for_payment_date);\n\n final TextView returnedAmntLabel = lastDialog.findViewById(R.id.pop_up_for_payment_label_ent_amt);\n returnedAmntLabel.setText(\"Returned Amount\");\n\n final TextView returnedAmntV = lastDialog.findViewById(R.id.pop_up_for_payment_ent_amt);\n\n final TextView dueAmtV = lastDialog.findViewById(R.id.pop_up_for_payment_due);\n\n TextView dueLabelText = lastDialog.findViewById(R.id.pop_up_for_payment_due_label);\n dueLabelText.setText(\"Bill Due Amount\");\n\n dateV.setText(\": \" + DcurrentTime);\n returnedAmntV.setText(\": \" + TruncateDecimal(printList.getTotal() + \"\"));\n\n dueAmtV.setText(\": \" + TruncateDecimal(dueAmnt + \"\"));\n\n lastDialog.show();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n salesTypeDialog = new javax.swing.JDialog();\n selectPurchaseButton = new javax.swing.JButton();\n selectServiceButton = new javax.swing.JButton();\n cancelButton = new javax.swing.JButton();\n receiptInfoLabel1 = new javax.swing.JLabel();\n receiptInfoLabel2 = new javax.swing.JLabel();\n receiptNumberInput = new javax.swing.JTextField();\n jPanel1 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n jButton2 = new javax.swing.JButton();\n\n salesTypeDialog.setTitle(\"Choose Transaction Type\");\n salesTypeDialog.setBounds(new java.awt.Rectangle(0, 0, 500, 200));\n salesTypeDialog.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n salesTypeDialog.setModalityType(java.awt.Dialog.ModalityType.APPLICATION_MODAL);\n salesTypeDialog.setLocationRelativeTo(null);\n\n selectPurchaseButton.setText(\"Purchase\");\n selectPurchaseButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n selectPurchaseButtonActionPerformed(evt);\n }\n });\n\n selectServiceButton.setText(\"Service\");\n selectServiceButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n selectServiceButtonActionPerformed(evt);\n }\n });\n\n cancelButton.setText(\"Cancel\");\n cancelButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cancelButtonActionPerformed(evt);\n }\n });\n\n receiptInfoLabel1.setText(\"The system has detected an item with warranty among the products in the cart.\");\n receiptInfoLabel1.setVisible(false);\n\n receiptInfoLabel2.setText(\"Please enter the Receipt Number:\");\n receiptInfoLabel2.setVisible(false);\n\n receiptNumberInput.setVisible(false);\n\n javax.swing.GroupLayout salesTypeDialogLayout = new javax.swing.GroupLayout(salesTypeDialog.getContentPane());\n salesTypeDialog.getContentPane().setLayout(salesTypeDialogLayout);\n salesTypeDialogLayout.setHorizontalGroup(\n salesTypeDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(salesTypeDialogLayout.createSequentialGroup()\n .addGap(56, 56, 56)\n .addComponent(selectPurchaseButton, javax.swing.GroupLayout.PREFERRED_SIZE, 103, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(selectServiceButton, javax.swing.GroupLayout.PREFERRED_SIZE, 111, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(57, 57, 57))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, salesTypeDialogLayout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(cancelButton)\n .addContainerGap())\n .addGroup(salesTypeDialogLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(salesTypeDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(salesTypeDialogLayout.createSequentialGroup()\n .addComponent(receiptInfoLabel1)\n .addGap(0, 73, Short.MAX_VALUE))\n .addGroup(salesTypeDialogLayout.createSequentialGroup()\n .addComponent(receiptInfoLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(receiptNumberInput)))\n .addContainerGap())\n );\n salesTypeDialogLayout.setVerticalGroup(\n salesTypeDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, salesTypeDialogLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(receiptInfoLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(salesTypeDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(receiptInfoLabel2)\n .addComponent(receiptNumberInput, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(salesTypeDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(selectServiceButton, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(selectPurchaseButton, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(cancelButton)\n .addContainerGap())\n );\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setAlwaysOnTop(true);\n\n jPanel1.setBackground(new java.awt.Color(250, 238, 161));\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n jLabel1.setText(\"Product List\");\n\n jButton2.setText(\"Clear List\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap(48, Short.MAX_VALUE)\n .addComponent(jButton2)\n .addGap(573, 573, 573))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(312, 312, 312)\n .addComponent(jLabel1)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 222, Short.MAX_VALUE)\n .addComponent(jButton2)\n .addContainerGap())\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n }", "@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tMessageDialog.openInformation(parent.getShell(), \"info\", ((ToolItem)e.getSource()).getText());\n\t\t\t}", "@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tMessageDialog.openInformation(parent.getShell(), \"info\", ((ToolItem)e.getSource()).getText());\n\t\t\t}", "public void setSales( String showInputDialog )\n\t{\n\n\t}", "public void selecionarCliente() {\n int cod = tabCliente.getSelectionModel().getSelectedItem().getCodigo();\n cli = cli.buscar(cod);\n\n cxCPF.setText(cli.getCpf());\n cxNome.setText(cli.getNome());\n cxRua.setText(cli.getRua());\n cxNumero.setText(Integer.toString(cli.getNumero()));\n cxBairro.setText(cli.getBairro());\n cxComplemento.setText(cli.getComplemento());\n cxTelefone1.setText(cli.getTelefone1());\n cxTelefone2.setText(cli.getTelefone2());\n cxEmail.setText(cli.getEmail());\n btnSalvar.setText(\"Novo\");\n bloquear(false);\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tint ID = 0;\n\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tID = Integer.parseInt(txtCustomerID.getText());\n\t\t\t\t}\n\t\t\t\tcatch(NumberFormatException e1) // ensures ID is integer\n\t\t\t\t{\n\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\"ID must consist of only numbers\", \"Error\",\n\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE, null);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Gather user input\n\t\t\t\tString first = txtFirstName.getText();\n\t\t\t\tString last = txtLastName.getText();\n\t\t\t\tString phone = txtPhoneNumber.getText();\n\t\t\t\tString address = txtAddress.getText();\n\t\t\t\tString email = txtEmail.getText();\n\n\t\t\t\tif(first.isEmpty())\n\t\t\t\t{\n\t\t\t\t\tfirst = \"N/A\";\n\t\t\t\t}\n\t\t\t\tif(last.isEmpty())\n\t\t\t\t{\n\t\t\t\t\tlast = \"N/A\";\n\t\t\t\t}\n\t\t\t\tif(phone.isEmpty())\n\t\t\t\t{\n\t\t\t\t\tphone = \"N/A\";\n\t\t\t\t}\n\t\t\t\tif(address.isEmpty())\n\t\t\t\t{\n\t\t\t\t\taddress = \"N/A\";\n\t\t\t\t}\n\t\t\t\tif(email.isEmpty())\n\t\t\t\t{\n\t\t\t\t\temail = \"N/A\";\n\t\t\t\t}\n\n\t\t\t\tchar returnCustomer;\n\n\t\t\t\tif(rdbtnYes.isSelected())\n\t\t\t\t\treturnCustomer = 'Y';\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturnCustomer = 'N';\n\t\t\t\t}\n\n\t\t\t\t// confirmation dialog\n\t\t\t\tint choice = JOptionPane.showConfirmDialog(null,\n\t\t\t\t\t\t\"Is The Following Information Correct?\" + \"\\nID: \" + ID\n\t\t\t\t\t\t\t\t+ \"\\nFirst Name: \" + first + \"\\nLast Name: \"\n\t\t\t\t\t\t\t\t+ last + \"\\nPhone Number: \" + phone\n\t\t\t\t\t\t\t\t+ \"\\nAddress: \" + address + \"\\nEmail: \" + email\n\t\t\t\t\t\t\t\t+ \"\\nReturn Customer: \" + returnCustomer,\n\t\t\t\t\t\t\"Confirmation\", JOptionPane.YES_NO_OPTION);\n\n\t\t\t\t// if information confirmed, commits data to database.\n\t\t\t\tif(choice == 0)\n\t\t\t\t{\n\n\t\t\t\t\t// creates customer object\n\t\t\t\t\tCustomer create = new Customer(ID, first, last, phone,\n\t\t\t\t\t\t\taddress, email, returnCustomer);\n\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tOracleJDBC.writeCustomer(create); // passes to method that writes customer to database\n\t\t\t\t\t}\n\t\t\t\t\tcatch(SQLException e1)\n\t\t\t\t\t{\n\n\t\t\t\t\t\tif(e1.getErrorCode() == 12899)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tString message = e1.getMessage();\n\n\t\t\t\t\t\t\tif(message.contains(\n\t\t\t\t\t\t\t\t\t\"ORA-12899: value too large for column \\\"DYLAN\\\".\\\"CUSTOMER\\\".\\\"FIRSTNAME\\\"\"))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\t\t\t\"First name is too Long, Max Length = 12\",\n\t\t\t\t\t\t\t\t\t\t\"Error\", JOptionPane.ERROR_MESSAGE,\n\t\t\t\t\t\t\t\t\t\tnull); // sql error that email is too long\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if(message.contains(\n\t\t\t\t\t\t\t\t\t\"ORA-12899: value too large for column \\\"DYLAN\\\".\\\"CUSTOMER\\\".\\\"LASTNAME\\\"\"))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\t\t\t\"Last name is too Long, Max Length = 50\",\n\t\t\t\t\t\t\t\t\t\t\"Error\", JOptionPane.ERROR_MESSAGE,\n\t\t\t\t\t\t\t\t\t\tnull); // sql error that email is too long\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if(message.contains(\n\t\t\t\t\t\t\t\t\t\"ORA-12899: value too large for column \\\"DYLAN\\\".\\\"CUSTOMER\\\".\\\"PHONE\\\"\"))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\t\t\t\"Phone number is too Long, Max Length = 14\",\n\t\t\t\t\t\t\t\t\t\t\"Error\", JOptionPane.ERROR_MESSAGE,\n\t\t\t\t\t\t\t\t\t\tnull); // sql error that email is too long\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if(message.contains(\n\t\t\t\t\t\t\t\t\t\"ORA-12899: value too large for column \\\"DYLAN\\\".\\\"CUSTOMER\\\".\\\"ADDRESS\\\"\"))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\t\t\t\"Address is too Long, Max Length = 50\",\n\t\t\t\t\t\t\t\t\t\t\"Error\", JOptionPane.ERROR_MESSAGE,\n\t\t\t\t\t\t\t\t\t\tnull); // sql error that email is too long\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if(message.contains(\n\t\t\t\t\t\t\t\t\t\"ORA-12899: value too large for column \\\"DYLAN\\\".\\\"CUSTOMER\\\".\\\"EMAIL\\\"\"))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\t\t\t\"EMAIL is too Long, Max Length = 50\",\n\t\t\t\t\t\t\t\t\t\t\"Error\", JOptionPane.ERROR_MESSAGE,\n\t\t\t\t\t\t\t\t\t\tnull); // sql error that email is too long\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\telse if(e1.getErrorCode() == 00001) // sql error for PK constraint violation\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\t\t\"Customer ID already in use\", \"Error\",\n\t\t\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE, null);\n\t\t\t\t\t\telse if(e1.getErrorCode() == 1438) // sql error for customer ID too long\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\t\t\"Customer ID to long, must be 5 digits or less\",\n\t\t\t\t\t\t\t\t\t\"Error\", JOptionPane.ERROR_MESSAGE, null);\n\t\t\t\t\t\telse // unaccounted for error (should not happen)\n\t\t\t\t\t\t\te1.printStackTrace();\n\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Customer Created\",\n\t\t\t\t\t\t\t\"Success\", JOptionPane.INFORMATION_MESSAGE, null);\n\n\t\t\t\t\t// clears form\n\t\t\t\t\tclearForm();\n\t\t\t\t\trdbtnNo.isSelected();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\treturn;\n\n\t\t\t}", "private void addCustomer() {\n try {\n FixCustomerController fixCustomerController = ServerConnector.getServerConnector().getFixCustomerController();\n\n FixCustomer fixCustomer = new FixCustomer(txtCustomerName.getText(), txtCustomerNIC.getText(), String.valueOf(comJobrole.getSelectedItem()), String.valueOf(comSection.getSelectedItem()), txtCustomerTele.getText());\n\n boolean addFixCustomer = fixCustomerController.addFixCustomer(fixCustomer);\n\n if (addFixCustomer) {\n JOptionPane.showMessageDialog(null, \"Customer Added Success !!\");\n } else {\n JOptionPane.showMessageDialog(null, \"Customer Added Fail !!\");\n }\n\n } catch (NotBoundException | MalformedURLException | RemoteException ex) {\n new ServerNull().setVisible(true);\n } catch (ClassNotFoundException | IOException ex) {\n Logger.getLogger(InputCustomers.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "private void ShowCardActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ShowCardActionPerformed\n alert.setText(\"\");\n int selectedRow = Table.getSelectedRow();\n if (selectedRow == -1)\n RowItem.setText(\"Please select an item first\");\n else {\n jTextField1.setText(\"Enter search query\");\n alert.setText(\"\");\n RowItem.setText(\"\");\n displayMgr.CU.cardDetails(id, name, price, discount);\n displayMgr.showCard();\n }\n }", "public void onRequestSelected(CustomerRequest request);", "@Override\r\n\tprotected Control createDialogArea(Composite parent) {\r\n\t\tsetTitle(Messages.DLG_CUSTOMER_TITLE);\r\n\t\tComposite area = (Composite) super.createDialogArea(parent);\r\n\t\tComposite container = new Composite(area, SWT.NONE);\r\n\t\tcontainer.setLayout(new GridLayout(2, false));\r\n\t\tcontainer.setLayoutData(new GridData(GridData.FILL_BOTH));\r\n\t\t\r\n\t\tLabel label = new Label(container, SWT.NONE);\r\n\t\tlabel.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));\r\n\t\tlabel.setText(Messages.CustomerDialog_label_text);\r\n\t\t\r\n\t\ttxtShort = new Text(container, SWT.BORDER);\r\n\t\ttxtShort.setText(\"\");\r\n\t\ttxtShort.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\r\n\t\t\r\n\t\tLabel label_1 = new Label(container, SWT.NONE);\r\n\t\tlabel_1.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));\r\n\t\tlabel_1.setText(Messages.CustomerDialog_label_1_text);\r\n\t\t\r\n\t\ttxtLong = new Text(container, SWT.BORDER);\r\n\t\ttxtLong.setText(\"\");\r\n\t\ttxtLong.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\r\n\r\n\t\treturn area;\r\n\t}", "public void read() {\r\n\t\tJTextField txtCustomerNo = new JTextField();\r\n\t\ttxtCustomerNo.setText(\"\" + this.getCustomerNo());\r\n\t\tJTextField txtTitle = new JTextField();\r\n\t\ttxtTitle.requestFocus();\r\n\t\tJTextField txtFirstName = new JTextField();\r\n\t\tJTextField txtSurname = new JTextField();\r\n\t\tJTextField txtAddress = new JTextField();\r\n\t\tJTextField txtPhoneNo = new JTextField();\r\n\t\tJTextField txtEmail = new JTextField();\r\n\r\n\t\t\r\n\t\tObject[] message = { \"Customer Number:\", txtCustomerNo, \"Title:\", txtTitle, \"First Name:\", txtFirstName,\r\n\t\t\t\t\"Surname:\", txtSurname, \"Address:\", txtAddress, \"Phone Number:\", txtPhoneNo, \"Email:\", txtEmail, };\r\n\t\t\r\n\r\n\t\tint option = JOptionPane.showConfirmDialog(null, message, \"Enter customer details\",\r\n\t\t\t\tJOptionPane.OK_CANCEL_OPTION);\r\n\t\t\r\n\t\tName txtName = new Name(txtTitle.getText(), txtFirstName.getText(), txtSurname.getText());\r\n\r\n\t\tif (option == JOptionPane.OK_OPTION) {\r\n\t\t\tthis.name = txtName;\r\n\t\t\tthis.address = txtAddress.getText();\r\n\t\t\tthis.phoneNo = txtPhoneNo.getText();\r\n\t\t\tthis.emailAddress = txtEmail.getText();\r\n\t\t}\r\n\t}", "private void fillContactDetails(int aSelectedRow) throws SQLException {\n \n switch (this.pStatus) {\n case New:\n //Empty all the fields for the new entry.\n txtFirstName.setText(\"\");\n txtMiddleName.setText(\"\");\n txtLastName.setText(\"\");\n dtpBirthday.setDate(null);\n rdoUndefined.setSelected(true);\n txtStreet.setText(\"\");\n txtPostcode.setText(\"\");\n txtCity.setText(\"\");\n txtCountry.setText(\"\");\n txtAvailability.setText(\"\");\n txtComment.setText(\"\");\n lblDateCreatedVal.setText(\"\");\n lblDateModifiedVal.setText(\"\");\n // TODO: Empty the availabilities.\n break;\n \n case View:\n //Get access to the table data.\n clsContactsTableModel mModel = (clsContactsTableModel) tblContacts.getModel();\n //Get the entire contact details.\n clsContactsDetails mContactsDetails = mModel.getContactDetails(aSelectedRow);\n //Set the values into the fields.\n txtFirstName.setText(mContactsDetails.getFirstName());\n txtMiddleName.setText(mContactsDetails.getMiddleName());\n txtLastName.setText(mContactsDetails.getLastName());\n dtpBirthday.setDate(mContactsDetails.getBirthday());\n switch (mContactsDetails.getGender()) {\n case \"m\":\n rdoMale.setSelected(true);\n break;\n case \"f\":\n rdoFemale.setSelected(true);\n break;\n default:\n rdoUndefined.setSelected(true);\n break;\n }\n txtStreet.setText(mContactsDetails.getStreet());\n txtPostcode.setText(mContactsDetails.getPostcode());\n txtCity.setText(mContactsDetails.getCity());\n txtCountry.setText(mContactsDetails.getCountry());\n txtAvailability.setText(mContactsDetails.getAvailability());\n txtComment.setText(mContactsDetails.getComment());\n //Convert Date to readable format.\n SimpleDateFormat mDateConversion = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n lblDateCreatedVal.setText(mDateConversion.format(mContactsDetails.getDateCreated()));\n lblDateModifiedVal.setText(mDateConversion.format(mContactsDetails.getDateModified()));\n break;\n \n }\n }", "@FXML\n\tprivate void handleEditTaxi() {\n\t\tTaxi selectedTaxi = TaxiTable.getSelectionModel().getSelectedItem();\n\t\tif (selectedTaxi != null) {\n\t\t\tboolean okClicked = mainApp.showTaxiEditDialog(selectedTaxi);\n\t\t\tif (okClicked) {\n\t\t\t\tshowTaxiDetails(selectedTaxi);\n\t\t\t}\n\n\t\t} else {\n\t\t\t// Nothing selected.\n//\t\t\tDialogs.create()\n//\t\t\t\t.title(\"No Selection\")\n//\t\t\t\t.masthead(\"No Taxi Selected\")\n//\t\t\t\t.message(\"Please select a Taxi in the table.\")\n//\t\t\t\t.showWarning();\n\t\t}\n\t}", "public void onSelect(IClientContext context, IComboBox emitter) throws Exception\n {\n String comboState =emitter.getValue();\n\t\tISingleDataGuiElement field = (ISingleDataGuiElement)context.getGroup().findByName(\"requestOwner\");\n \tfield.setRequired(!\"New\".equals(comboState));\n }", "@Override\n\tpublic void showConfirmation(Customer customer, List<Item> items, double totalPrice, int loyaltyPointsEarned) {\n\t}", "@Override\n public void onNothingSelected(AdapterView<?> arg0) {\n\n Toast.makeText(SignUpOrganisationActivity.this, \"Please Select Province\", Toast.LENGTH_SHORT).show();\n }", "public static void editCustomer(Customer c) throws IOException\r\n\t{\r\n\t\t// Stores the menu selection for the customer editor\r\n\t\tString editMenuSelection = new String();\r\n\t\t\r\n\t\t// display the customer editor screen until the user enters \"q\"\r\n\t\twhile(!editMenuSelection.equalsIgnoreCase(\"q\"))\r\n\t\t{\r\n\t\t\tclearScreen();\r\n\t\t\t\r\n\t\t\t// display the menu\r\n\t\t\tSystem.out.println(\"[CUSTOMER EDITOR]\\n\");\r\n\t\t\tSystem.out.println(\"a. Name: \" + c.getName());\r\n\t\t\tSystem.out.println(\" CustomerID: \" + c.getCustomerID());\r\n\t\t\tSystem.out.println(\"b. Email: \" + c.getEmail());\r\n\t\t\tSystem.out.println(\"c. Phone Number: \" + c.getPhoneNumber());\r\n\t\t\tSystem.out.println(\"d. Ship Address: \" + c.getShippingAddress());\r\n\t\t\tSystem.out.println(\"e. Ship State: \" + c.getShippingState());\r\n\t\t\tSystem.out.println(\"f. Ship City: \" + c.getShippingCity());\r\n\t\t\tSystem.out.println(\"g. Ship Zip: \" + c.getShippingZip());\r\n\t\t\tSystem.out.println(\"h. Bill Address: \" + c.getBillingAddress());\r\n\t\t\tSystem.out.println(\"i. Bill State: \" + c.getBillingState());\r\n\t\t\tSystem.out.println(\"j. Bill City: \" + c.getBillingCity());\r\n\t\t\tSystem.out.println(\"k. Bill Zip: \" + c.getBillingZip());\r\n\t\t\tSystem.out.println(\"l. Comment: \" + c.getComment());\r\n\t\t\tSystem.out.println(\"r. remove customer\");\r\n\t\t\tSystem.out.println(\"\\nEnter the letter for the field you would like to edit\\nType q to quit the editor\");\r\n\t\t\t\r\n\t\t\t// gets user menu input\r\n\t\t\teditMenuSelection = inputString(true);\r\n\t\t\t\r\n\t\t\t// Edit name\r\n\t\t\tif(editMenuSelection.equalsIgnoreCase(\"a\"))\r\n\t\t\t{\r\n\t\t\t\tclearScreen();\r\n\t\t\t\tSystem.out.println(\"[NAME EDITOR]\\n\");\r\n\t\t\t\tSystem.out.println(\"[CUSTOMER: \" + c.getName() + \"] [ID: \" + c.getCustomerID() + \"]\");\r\n\t\t\t\tSystem.out.println(\"Current name: \" + c.getName());\r\n\t\t\t\tSystem.out.println(\"Enter a new name.\");\r\n\t\t\t\tString newName = new String(inputString(true));\r\n\t\t\t\tclearScreen();\r\n\t\t\t\tSystem.out.println(\"Old name \" + c.getName() + \" replaced with \" + newName + \".\");\r\n\t\t\t\tc.setName(newName);\r\n\t\t\t\tSystem.out.println(\"[PRESS ENTER TO CONTINUE]\");\r\n\t\t\t\t// Get a garbage user input before showing the next screen\r\n\t\t\t\tnewName = inputString(true);\r\n\t\t\t}\r\n\t\t\t// Edit Email\r\n\t\t\telse if(editMenuSelection.equalsIgnoreCase(\"b\"))\r\n\t\t\t{\r\n\t\t\t\tclearScreen();\r\n\t\t\t\tSystem.out.println(\"[EMAIL EDITOR]\\n\");\r\n\t\t\t\tSystem.out.println(\"[CUSTOMER: \" + c.getName() + \"] [ID: \" + c.getCustomerID() + \"]\");\r\n\t\t\t\tSystem.out.println(\"Current email: \" + c.getEmail());\r\n\t\t\t\tSystem.out.println(\"Enter a new email.\");\r\n\t\t\t\tString newEmail = new String(inputString(true));\r\n\t\t\t\tclearScreen();\r\n\t\t\t\tSystem.out.println(\"Old email \" + c.getEmail() + \" replaced with \" + newEmail + \".\");\r\n\t\t\t\tc.setEmail(newEmail);\r\n\t\t\t\tSystem.out.println(\"[PRESS ENTER TO CONTINUE]\");\r\n\t\t\t\t// Get a garbage user input before showing the next screen\r\n\t\t\t\tnewEmail = inputString(true);\r\n\t\t\t}\r\n\t\t\t// Edit Phone Number\r\n\t\t\telse if(editMenuSelection.equalsIgnoreCase(\"c\"))\r\n\t\t\t{\r\n\t\t\t\tclearScreen();\r\n\t\t\t\tSystem.out.println(\"[PHONE NUMBER EDITOR]\\n\");\r\n\t\t\t\tSystem.out.println(\"[CUSTOMER: \" + c.getName() + \"] [ID: \" + c.getCustomerID() + \"]\");\r\n\t\t\t\tSystem.out.println(\"Current phone number: \" + c.getPhoneNumber());\r\n\t\t\t\tSystem.out.println(\"Enter a new phone number.\");\r\n\t\t\t\tString newPhone = new String(inputString(true));\r\n\t\t\t\tclearScreen();\r\n\t\t\t\tSystem.out.println(\"Old phone number \" + c.getPhoneNumber() + \" replaced with \" + newPhone + \".\");\r\n\t\t\t\tc.setPhoneNumber(newPhone);\r\n\t\t\t\tSystem.out.println(\"[PRESS ENTER TO CONTINUE]\");\r\n\t\t\t\t// Get a garbage user input before showing the next screen\r\n\t\t\t\tnewPhone = inputString(true);\r\n\t\t\t}\r\n\t\t\t// Edit shipping address\r\n\t\t\telse if(editMenuSelection.equalsIgnoreCase(\"d\"))\r\n\t\t\t{\r\n\t\t\t\tclearScreen();\r\n\t\t\t\tSystem.out.println(\"[SHIPPING ADDRESS EDITOR]\\n\");\r\n\t\t\t\tSystem.out.println(\"[CUSTOMER: \" + c.getName() + \"] [ID: \" + c.getCustomerID() + \"]\");\r\n\t\t\t\tSystem.out.println(\"Current shipping address: \" + c.getShippingAddress());\r\n\t\t\t\tSystem.out.println(\"Enter a new shipping address.\");\r\n\t\t\t\tString newAddress = new String(inputString(true));\r\n\t\t\t\tclearScreen();\r\n\t\t\t\tSystem.out.println(\"Old shipping address \" + c.getShippingAddress() + \" replaced with \" + newAddress + \".\");\r\n\t\t\t\tc.setShippingAddress(newAddress);\r\n\t\t\t\tSystem.out.println(\"[PRESS ENTER TO CONTINUE]\");\r\n\t\t\t\t// Get a garbage user input before showing the next screen\r\n\t\t\t\tnewAddress = inputString(true);\r\n\t\t\t}\r\n\t\t\t// Edit shipping State\r\n\t\t\telse if(editMenuSelection.equalsIgnoreCase(\"e\"))\r\n\t\t\t{\r\n\t\t\t\tclearScreen();\r\n\t\t\t\tSystem.out.println(\"[SHIPPING STATE EDITOR]\\n\");\r\n\t\t\t\tSystem.out.println(\"[CUSTOMER: \" + c.getName() + \"] [ID: \" + c.getCustomerID() + \"]\");\r\n\t\t\t\tSystem.out.println(\"Current shipping state: \" + c.getShippingState());\r\n\t\t\t\tSystem.out.println(\"Enter a new shipping state.\");\r\n\t\t\t\tString newState = new String(inputString(true));\r\n\t\t\t\tclearScreen();\r\n\t\t\t\tSystem.out.println(\"Old shipping state \" + c.getShippingState() + \" replaced with \" + newState + \".\");\r\n\t\t\t\tc.setShippingState(newState);\r\n\t\t\t\tSystem.out.println(\"[PRESS ENTER TO CONTINUE]\");\r\n\t\t\t\t// Get a garbage user input before showing the next screen\r\n\t\t\t\tnewState = inputString(true);\r\n\t\t\t}\r\n\t\t\t// Edit shipping city\r\n\t\t\telse if(editMenuSelection.equalsIgnoreCase(\"f\"))\r\n\t\t\t{\r\n\t\t\t\tclearScreen();\r\n\t\t\t\tSystem.out.println(\"[SHIPPING CITY EDITOR]\\n\");\r\n\t\t\t\tSystem.out.println(\"[CUSTOMER: \" + c.getName() + \"] [ID: \" + c.getCustomerID() + \"]\");\r\n\t\t\t\tSystem.out.println(\"Current Shipping City: \" + c.getShippingCity());\r\n\t\t\t\tSystem.out.println(\"Enter a new shipping city.\");\r\n\t\t\t\tString newCity = new String(inputString(true));\r\n\t\t\t\tclearScreen();\r\n\t\t\t\tSystem.out.println(\"Old shipping city \" + c.getShippingCity() + \" replaced with \" + newCity + \".\");\r\n\t\t\t\tc.setShippingCity(newCity);\r\n\t\t\t\tSystem.out.println(\"[PRESS ENTER TO CONTINUE]\");\r\n\t\t\t\t// Get a garbage user input before showing the next screen\r\n\t\t\t\tnewCity = inputString(true);\r\n\t\t\t}\r\n\t\t\t// Edit shipping zip\r\n\t\t\telse if(editMenuSelection.equalsIgnoreCase(\"g\"))\r\n\t\t\t{\r\n\t\t\t\tclearScreen();\r\n\t\t\t\tSystem.out.println(\"[SHIPPING ZIP CODE EDITOR]\\n\");\r\n\t\t\t\tSystem.out.println(\"[CUSTOMER: \" + c.getName() + \"] [ID: \" + c.getCustomerID() + \"]\");\r\n\t\t\t\tSystem.out.println(\"Current shipping zip: \" + c.getShippingZip());\r\n\t\t\t\tSystem.out.println(\"Enter a new shipping zip code.\");\r\n\t\t\t\tString newZip = new String(inputString(false));\r\n\t\t\t\tclearScreen();\r\n\t\t\t\tSystem.out.println(\"Old shipping zip \" + c.getShippingZip() + \" replaced with \" + newZip + \".\");\r\n\t\t\t\tc.setShippingZip(newZip);\r\n\t\t\t\tSystem.out.println(\"[PRESS ENTER TO CONTINUE]\");\r\n\t\t\t\t// Get a garbage user input before showing the next screen\r\n\t\t\t\tnewZip = inputString(true);\r\n\t\t\t}\r\n\t\t\t// Edit billing address\r\n\t\t\telse if(editMenuSelection.equalsIgnoreCase(\"h\"))\r\n\t\t\t{\r\n\t\t\t\tclearScreen();\r\n\t\t\t\tSystem.out.println(\"[BILLING ADDRESS EDITOR]\\n\");\r\n\t\t\t\tSystem.out.println(\"[CUSTOMER: \" + c.getName() + \"] [ID: \" + c.getCustomerID() + \"]\");\r\n\t\t\t\tSystem.out.println(\"Current billing address: \" + c.getBillingAddress());\r\n\t\t\t\tSystem.out.println(\"Enter a new billing address\");\r\n\t\t\t\tString newAddress = new String(inputString(true));\r\n\t\t\t\tclearScreen();\r\n\t\t\t\tSystem.out.println(\"Old billing address \" + c.getBillingAddress() + \" replaced with \" + newAddress + \".\");\r\n\t\t\t\tc.setBillingAddress(newAddress);\r\n\t\t\t\tSystem.out.println(\"[PRESS ENTER TO CONTINUE]\");\r\n\t\t\t\t// Get a garbage user input before showing the next screen\r\n\t\t\t\tnewAddress = inputString(true);\r\n\t\t\t}\r\n\t\t\t// Edit billing state if requested\r\n\t\t\telse if(editMenuSelection.equalsIgnoreCase(\"i\"))\r\n\t\t\t{\r\n\t\t\t\tclearScreen();\r\n\t\t\t\tSystem.out.println(\"[BILLING STATE EDITOR]\\n\");\r\n\t\t\t\tSystem.out.println(\"[CUSTOMER: \" + c.getName() + \"] [ID: \" + c.getCustomerID() + \"]\");\r\n\t\t\t\tSystem.out.println(\"Current billing state: \" + c.getBillingState());\r\n\t\t\t\tSystem.out.println(\"Enter a new billing state\");\r\n\t\t\t\tString newState = new String(inputString(true));\r\n\t\t\t\tclearScreen();\r\n\t\t\t\tSystem.out.println(\"Old billing state \" + c.getBillingState() + \" replaced with \" + newState + \".\");\r\n\t\t\t\tc.setBillingState(newState);\r\n\t\t\t\tSystem.out.println(\"[PRESS ENTER TO CONTINUE]\");\r\n\t\t\t\t// Get a garbage user input before showing the next screen\r\n\t\t\t\tnewState = inputString(true);\r\n\t\t\t}\r\n\t\t\t// Edit billing city if requested\r\n\t\t\telse if(editMenuSelection.equalsIgnoreCase(\"j\"))\r\n\t\t\t{\r\n\t\t\t\tclearScreen();\r\n\t\t\t\tSystem.out.println(\"[BILLING CITY EDITOR]\\n\");\r\n\t\t\t\tSystem.out.println(\"[CUSTOMER: \" + c.getName() + \"] [ID: \" + c.getCustomerID() + \"]\");\r\n\t\t\t\tSystem.out.println(\"Current billing city: \" + c.getBillingCity());\r\n\t\t\t\tSystem.out.println(\"Enter a new billing city.\");\r\n\t\t\t\tString newCity = new String(inputString(true));\r\n\t\t\t\tclearScreen();\r\n\t\t\t\tSystem.out.println(\"Old billing city \" + c.getBillingCity() + \" replaced with \" + newCity + \".\");\r\n\t\t\t\tc.setBillingCity(newCity);\r\n\t\t\t\tSystem.out.println(\"[PRESS ENTER TO CONTINUE]\");\r\n\t\t\t\t// Get a garbage user input before showing the next screen\r\n\t\t\t\tnewCity = inputString(true);\r\n\t\t\t}\r\n\t\t\t// Edit billing zip if requested\r\n\t\t\telse if(editMenuSelection.equalsIgnoreCase(\"k\"))\r\n\t\t\t{\r\n\t\t\t\tclearScreen();\r\n\t\t\t\tSystem.out.println(\"[BILLING ZIP CODE EDITOR]\\n\");\r\n\t\t\t\tSystem.out.println(\"[CUSTOMER: \" + c.getName() + \"] [ID: \" + c.getCustomerID() + \"]\");\r\n\t\t\t\tSystem.out.println(\"Current billing zip: \" + c.getBillingZip());\r\n\t\t\t\tSystem.out.println(\"Enter a new billing zip code.\");\r\n\t\t\t\tString newZip = new String(inputString(true));\r\n\t\t\t\tclearScreen();\r\n\t\t\t\tSystem.out.println(\"Old billing zip \" + c.getBillingZip() + \" replaced with \" + newZip + \".\");\r\n\t\t\t\tc.setBillingZip(newZip);\r\n\t\t\t\tSystem.out.println(\"[PRESS ENTER TO CONTINUE]\");\r\n\t\t\t\t// Get a garbage user input before showing the next screen\r\n\t\t\t\tnewZip = inputString(true);\r\n\t\t\t}\r\n\t\t\t// Edit comment if requested\r\n\t\t\telse if(editMenuSelection.equalsIgnoreCase(\"l\"))\r\n\t\t\t{\r\n\t\t\t\tclearScreen();\r\n\t\t\t\tSystem.out.println(\"[COMMENT EDITOR]\\n\");\r\n\t\t\t\tSystem.out.println(\"[CUSTOMER: \" + c.getName() + \"] [ID: \" + c.getCustomerID() + \"]\");\r\n\t\t\t\tSystem.out.println(\"Current comment: \" + c.getComment());\r\n\t\t\t\tSystem.out.println(\"Enter a new comment.\");\r\n\t\t\t\tString newComment = new String(inputString(true));\r\n\t\t\t\tclearScreen();\r\n\t\t\t\tSystem.out.println(\"Old comment \" + c.getComment() + \" replaced with \" + newComment + \".\");\r\n\t\t\t\tc.setComment(newComment);\r\n\t\t\t\tSystem.out.println(\"[PRESS ENTER TO CONTINUE]\");\r\n\t\t\t\t// Get a garbage user input before showing the next screen\r\n\t\t\t\tnewComment = inputString(true);\r\n\t\t\t}\r\n\t\t\t// Remove this customer\r\n\t\t\telse if(editMenuSelection.equalsIgnoreCase(\"r\"))\r\n\t\t\t{\r\n\t\t\t\tclearScreen();\r\n\t\t\t\tSystem.out.println(\"[CUSTOMER REMOVER]\\n\");\r\n\t\t\t\tSystem.out.println(\"[CUSTOMER: \" + c.getName() + \"] [ID: \" + c.getCustomerID() + \"]\");\r\n\t\t\t\tSystem.out.println(\"Are you sure you would like to remove this customer?\");\r\n\t\t\t\tSystem.out.println(\"(yes: remove)(anything else: keep customer)\");\r\n\t\t\t\tif(inputString(true).equalsIgnoreCase(\"yes\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tclearScreen();\r\n\t\t\t\t\tcustomers.remove(customers.indexOf(c));\r\n\t\t\t\t\tSystem.out.println(\"[CUSTOMER REMOVER]\\n\");\r\n\t\t\t\t\tSystem.out.println(\"[Customer \" + c.getName() + \" ID: \" + c.getCustomerID() + \" removed.]\");\r\n\t\t\t\t\tSystem.out.println(\"[PRESS ENTER TO CONTINUE]\");\r\n\t\t\t\t\t// Get a garbage user input before showing the next screen\r\n\t\t\t\t\tString trash = new String(inputString(true));\r\n\t\t\t\t\teditMenuSelection = \"q\";\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tclearScreen();\r\n\t\t\t\t\tSystem.out.println(\"[CUSTOMER REMOVER]\\n\");\r\n\t\t\t\t\tSystem.out.println(\"[Customer \" + c.getName() + \" ID: \" + c.getCustomerID() + \" kept.]\");\r\n\t\t\t\t\tSystem.out.println(\"[PRESS ENTER TO CONTINUE]\");\r\n\t\t\t\t\t// Get a garbage user input before showing the next screen\r\n\t\t\t\t\tString trash = new String(inputString(true));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n public void onDelectChoise(ServResrouce info)\n {\n DelectChoiseTrafficDialog dialog =\n new DelectChoiseTrafficDialog(ConfirmOrderActivity.this, new OperationListener()\n {\n @Override\n public void onDelectComfireInfo(ServResrouce info)\n {\n // TODO Auto-generated method stub\n info.setChecked(false);\n removeResourceIdPrice(info.getServId());\n mNoAirAdapter.notifyDataSetChanged();\n }\n \n @Override\n public void onDelectFlightInfo(ServResrouce info)\n {\n // TODO Auto-generated method stub\n }\n });\n dialog.setComfireInfo(info);\n dialog.show();\n }", "public void flavorChosen()\n {\n changeSubtotalTextField();\n }", "private void notifySelectedUser() {\n\t\tfinal GHAGridRecord<SSOUser> selectedRecord = grid.getSelectedRecord();\n\t\tif (selectedRecord == null) {\n\t\t\tGHAErrorMessageProcessor.alert(\"record-not-selected\");\n\t\t\treturn;\n\t\t}\n\t\tnotifyUser(selectedRecord.toEntity());\n\t\thide();\n\t}", "private void seatCustomer(MyCustomer customer) {\n\t//Notice how we print \"customer\" directly. It's toString method will do it.\n\tDo(\"Seating \" + customer.cmr + \" at table \" + (customer.tableNum+1));\n\t//move to customer first.\n\tCustomer guiCustomer = customer.cmr.getGuiCustomer();\n\tguiMoveFromCurrentPostionTo(new Position(guiCustomer.getX()+1,guiCustomer.getY()));\n\twaiter.pickUpCustomer(guiCustomer);\n\tPosition tablePos = new Position(tables[customer.tableNum].getX()-1,\n\t\t\t\t\t tables[customer.tableNum].getY()+1);\n\tguiMoveFromCurrentPostionTo(tablePos);\n\twaiter.seatCustomer(tables[customer.tableNum]);\n\tcustomer.state = CustomerState.NO_ACTION;\n\tcustomer.cmr.msgFollowMeToTable(this, new Menu());\n\tstateChanged();\n }", "public void actionPerformed(ActionEvent e){\n\t\t\t\tcustJTextArea.setText(null);\n\t\t\t\t\tif(customers.size() >= 1){\n\t\t\t\t\t\tfor(Customer customer: customers){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcustJTextArea.append(\"\\n Customer Id: \"+customer.getCustId()\n\t\t\t\t\t\t\t\t\t\t+\"\\n Name: \"+customer.getCustName()\n\t\t\t\t\t\t\t\t\t\t+\"\\n Address: \"+customer.getCustAddress()\n\t\t\t\t\t\t\t\t\t\t+\"\\n Email: \"+customer.getCustEmail()\n\t\t\t\t\t\t\t\t\t\t+\"\\n Phone: \"+customer.getCustTelephone()\n\t\t\t\t\t\t\t\t\t\t+\"\\n\");\n\t\t\t\t\t\t\tcustJTextArea.setCaretPosition(0);\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"No Customers Found\");\n\t\t\t\t\t}\n\t\t\t}", "@Override\n public void onDelectChoise(ServResrouce info)\n {\n DelectChoiseTrafficDialog dialog =\n new DelectChoiseTrafficDialog(ConfirmOrderActivity.this, new OperationListener()\n {\n @Override\n public void onDelectComfireInfo(ServResrouce info)\n {\n // TODO Auto-generated method stub\n info.setChecked(false);\n removeResourceIdPrice(info.getServId());\n mHotelAdapter.notifyDataSetChanged();\n }\n \n @Override\n public void onDelectFlightInfo(ServResrouce info)\n {\n // TODO Auto-generated method stub\n }\n });\n dialog.setComfireInfo(info);\n dialog.show();\n }", "@Override\n public void onNothingSelected(AdapterView<?> parent) {\n mSupplier = BookEntry.SUPPLIER_UNKNOWN;\n }", "public void createOrderInDB() {\n if (newCustomer.isSelected()) {\n\n if(customerPhone.getText().isEmpty() ) {\n customerPhone.setStyle(\"-fx-focus-color: RED\");\n customerPhone.requestFocus();\n } else if(customerName.getText().isEmpty()) {\n customerName.setStyle(\"-fx-focus-color: RED\");\n customerName.requestFocus();\n } else {\n ControllerPartner controller = new ControllerPartner();\n controller.createOrderNewCustomer(customerPhone.getText(), customerName.getText(), totalPrice.getText());\n Label successMessage = new Label(\"Order is created, an sms with invoice is sent to the customer\");\n successMessage.setLayoutX(305);\n successMessage.setLayoutY(800);\n successMessage.setTextFill(Color.CORAL);\n root.getChildren().add(successMessage);\n content();\n\n customerName.clear();\n customerPhone.clear();\n\n }\n\n\n\n\n } else if (existingCustomer.isSelected()) {\n }\n }", "public static void setCustomerData()\n\t{\n\t\tString sURL = PropertyManager.getInstance().getProperty(\"REST_PATH\") + \"measurements?state=WAIT_FOR_CONFIG\";\n\t\tmCollect = new MeasurementCollection();\n\t\tmCollect.setList(sURL);\n\n\t\tfor (int i = 0; i < mCollect.getList().size(); i++)\n\t\t{\n\t\t\tmObject = mCollect.getList().get(i);\n\t\t\tString mID = mObject.getId();\n\t\t\taData = new AddressData(mID);\n\t\t\tif (mObject.getPriority().equals(\"HIGH\"))\n\t\t\t{\n\t\t\t\tcustomerList.add(\"+ \" + aData.guiAddressData());\n\t\t\t}\n\t\t\telse if (mObject.getPriority().equals(\"MEDIUM\"))\n\t\t\t{\n\t\t\t\tcustomerList.add(\"- \" + aData.guiAddressData());\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcustomerList.add(\"o \" + aData.guiAddressData());\n\t\t\t}\n\n\t\t}\n\t\tcustomerText.setText(aData.getCustomerData());\n\t\tmeasureText.setText(mObject.getMeasurementData());\n\n\t}", "@Override\n\tpublic void notifyCustomer() {\n\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\"Customer Credit has been Charged more than $400\", \"Warning\",\n\t\t\t\tJOptionPane.WARNING_MESSAGE);\n\t}", "public static void printCustomerInformation(Employee [] employee) {\n\t\tif (Customer.getCustomerQuantity() == 0) {\n\t\t\tJOptionPane.showMessageDialog(null, \"There is no customer!\");\n\t\t} else {\n\t\t\tfor (int i = 0; i < Customer.getCustomerQuantity(); i++) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"-------List of Customers-------\\n\"\n\t\t\t\t\t\t+ (i+1) + \": \"+ employee[i+1].getVehicle().getCustomer().getName() + \"\\n\");\n\t\t\t\tbreak;\n\t\t\t}\t\t\t\n\t\t}\n\t}", "public CustomerGUI() {\n\t initComponents();\n\t }", "public static int showInformationDialog(Object[] options, String title, String message) {\n\t\treturn 0;\n\t}", "public InputCVEmployeeCertificationView() {\n initComponents();\n setDefaultCondition();\n getRidTheBar();\n }", "@FXML\n void onActionModifyCustomer(ActionEvent event) throws IOException, SQLException {\n\n modifiedCustomer = CustomerTableview.getSelectionModel().getSelectedItem();\n\n if (CustomerTableview.getSelectionModel().getSelectedItem() == null) {\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setTitle(\"No item selected.\");\n alert.setContentText(\"Don't forget to select a customer to modify!\");\n alert.show();\n }\n\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(getClass().getResource(\"/Views/ModifyCustomer.fxml\"));\n scene = loader.load();\n\n ModifyCustomer MCController = loader.getController();\n MCController.sendCustomer(modifiedCustomer);\n\n stage = (Stage)((Button)event.getSource()).getScene().getWindow();\n stage.setScene(new Scene(scene));\n stage.show();\n }" ]
[ "0.6588489", "0.64199233", "0.64124537", "0.63033545", "0.62700033", "0.6268479", "0.6209029", "0.61032295", "0.6035299", "0.60093135", "0.5936027", "0.5927405", "0.5915402", "0.58847636", "0.5884035", "0.5880076", "0.5878843", "0.5857856", "0.5849105", "0.58257604", "0.5825574", "0.5819317", "0.5795536", "0.57802826", "0.57701135", "0.5745928", "0.5724156", "0.56988907", "0.5693697", "0.5681419", "0.56569976", "0.56144214", "0.5611402", "0.55840725", "0.558123", "0.5577461", "0.5537955", "0.55353004", "0.55301994", "0.5526085", "0.551887", "0.5518172", "0.55157214", "0.550269", "0.54947543", "0.5488376", "0.5488102", "0.54876447", "0.54760635", "0.54700965", "0.5467023", "0.5460281", "0.54596716", "0.54576224", "0.54548097", "0.54209244", "0.54194677", "0.5412792", "0.54022294", "0.54011124", "0.53987294", "0.5398019", "0.53954035", "0.53953624", "0.538828", "0.53796756", "0.5360432", "0.5359638", "0.5350807", "0.5345506", "0.5345506", "0.5343891", "0.5335547", "0.532629", "0.5325744", "0.5324972", "0.53120786", "0.53056854", "0.53044474", "0.53028023", "0.530002", "0.5299315", "0.52980125", "0.52974033", "0.5290417", "0.5288259", "0.5282969", "0.52817434", "0.5273491", "0.52687263", "0.5258774", "0.5257732", "0.5256719", "0.5256691", "0.52538997", "0.5249597", "0.5245041", "0.5244894", "0.52434826", "0.5242979" ]
0.7211438
0
Delete a customer. I've made the assumption that you never wish to completely delete information. So, deleting a customer from the database will set the active field to zero effectively removing it while retaining data.
public void deleteCustomer(Customer customer) { customers.remove(customer); String sql = "UPDATE customer SET active = 0 WHERE customerId = ?"; try ( Connection conn = DriverManager.getConnection(URL, USER_NAME, PASSWORD); PreparedStatement prepstmt = conn.prepareStatement(sql); ) { int customerId = Customer.getCustomerId(customer); prepstmt.setInt(1, customerId); prepstmt.executeUpdate(); } catch (SQLException e){ System.out.println("SQLException: " + e.getMessage()); System.out.println("SQLState: " + e.getSQLState()); System.out.println("VendorError: " + e.getErrorCode()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean deleteCustomer(String custId);", "public boolean deleteCustomer() {\n\t\treturn false;\r\n\t}", "void deleteCustomerById(Long id);", "void deleteCustomerById(int customerId);", "public void deletecustomer(long id) {\n\t\t customerdb.deleteById(id);\n\t }", "@Override\r\n\tpublic boolean deleteCustomer(int customerID) {\n\t\treturn false;\r\n\t}", "@Override\n\tpublic void delete() {\n\t\tSystem.out.println(\"Mobile Customer delete()\");\n\t}", "@Override\n\tpublic void delete(Customer customer) {\n\t\t\n\t}", "@Override\n\tpublic void delete(Customer customer) {\n\t\t\n\t}", "@Override\n\tpublic boolean deleteCustomer(int customerId) {\n\t\treturn false;\n\t}", "void delete(Customer customer);", "@Override\n\t@Transactional\n\tpublic void deleteCustomer(Customer customer) {\n\t\thibernateTemplate.delete(customer);\n\n\t\tSystem.out.println(customer + \"is deleted\");\n\t}", "@Override\n\tpublic void deleteOne(Customer c) {\n\t\tthis.getHibernateTemplate().delete(c);\n\t}", "@Override\n\tpublic void deleteCustomer(int theId) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\t\t\n\t\t// delete object with primary key\n\t\tQuery theQuery = \n\t\t\t\tcurrentSession.createQuery(\"delete from Customer where id=:customerId\");\n\t\ttheQuery.setParameter(\"customerId\", theId);\n\t\t\n\t\ttheQuery.executeUpdate();\t\t\n\t}", "@Override\n\tpublic void delete(Customer o) {\n\n\t\tif (o.getId() == null) {\n\t\t\treturn;\n\t\t}\n\n\t\tString deleteQuery = \"DELETE FROM TB_customer WHERE \" + COLUMN_NAME_ID + \"=\" + o.getId();\n\n\t\ttry (Statement deleteStatement = dbCon.createStatement()) {\n\t\t\tdeleteStatement.execute(deleteQuery);\n\t\t} catch (SQLException s) {\n\t\t\tSystem.out.println(\"Delete of customer \" + o.getId() + \" falied : \" + s.getMessage());\n\t\t}\n\t}", "boolean delete(CustomerOrder customerOrder);", "public void deleteCustomer(Customer customer){\n _db.delete(\"Customer\", \"customer_name = ?\", new String[]{customer.getName()});\n }", "@Override\n\tpublic void deleteCustomer(int theId) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\t\t\n\t\t// delete the object with the primary key\n\t\tQuery theQuery = currentSession.createQuery(\"delete from Customer where id=:customerId\");\n\t\ttheQuery.setParameter(\"customerId\", theId);\n\t\t\n\t\ttheQuery.executeUpdate();\n\t}", "@Override\n\tpublic void deleteCustomer(Long custId) {\n\t\tcustomerRepository.deleteById(custId);\n\t\t\n\t}", "@Override\n\tpublic void deleteCustomer(int theId) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n\t\t// delete object with primary key\n\t\tQuery theQuery = currentSession.createQuery(\"delete from Customer where id=:customerId\");\n\t\ttheQuery.setParameter(\"customerId\", theId);\n\n\t\ttheQuery.executeUpdate();\n\t}", "@Override\n public void deleteCustomer(UUID id) {\n log.debug(\"Customer has been deleted: \"+id);\n }", "public void delete(Customer c){\n Connection conn = ConnectionFactory.getConnection();\n PreparedStatement ppst = null;\n try {\n ppst = conn.prepareCall(\"DELETE FROM customer WHERE customer_key = ?\");\n ppst.setInt(1, c.getCustomerKey());\n ppst.executeUpdate();\n System.out.println(\"Successfully deleted.\");\n } catch (SQLException e) {\n throw new RuntimeException(\"Delete error: \", e);\n } finally {\n ConnectionFactory.closeConnection(conn, ppst);\n }\n }", "@Override\n\tpublic boolean deleteCustomer(int customerId) {\n Session session =sessionFactory.getCurrentSession();\n Customer customer= getCustomer(customerId);\n session.delete(customer);\n\t\treturn true;\n\t}", "public static void deleteCustomer(int customerID) throws SQLException{\r\n\r\n //connection and prepared statement set up\r\n Connection conn = DBConnection.getConnection();\r\n String deleteStatement = \"DELETE from customers WHERE Customer_ID = ?;\";\r\n DBQuery.setPreparedStatement(conn, deleteStatement);\r\n PreparedStatement ps = DBQuery.getPreparedStatement();\r\n ps.setInt(1,customerID);\r\n ps.execute();\r\n\r\n if (ps.getUpdateCount() > 0) {\r\n System.out.println(ps.getUpdateCount() + \" row(s) effected\");\r\n } else {\r\n System.out.println(\"no change\");\r\n }\r\n }", "public void DeleteCust(String id);", "@Test\n\tpublic void deleteCustomer() {\n\n\t\t// Given\n\t\tString name = \"Leo\";\n\t\tString address = \"Auckland\";\n\t\tString telephoneNumber = \"021123728381\";\n\t\tICustomer customer = customerController.create(name, address, telephoneNumber);\n\t\tlong id = customer.getId();\n\t\tint originalLength = customerController.read().size();\n\n\t\t// When\n\t\tICustomer cus = customerController.delete(id);\n\n\t\t// Then\n\t\tint expected = originalLength - 1;\n\t\tint actual = customerController.read().size();\n\t\tAssert.assertEquals(expected, actual);\n\t\tAssert.assertNotNull(cus);\n\t}", "public void delete(Customer customer) {\n\t\tcustRepo.delete(customer);\n\t}", "@Test\n\t// @Disabled\n\tvoid testDeleteCustomer() {\n\t\tCustomer customer = new Customer(1, \"tommy\", \"cruise\", \"951771122\", \"tom@gmail.com\");\n\t\tMockito.when(custRep.findById(1)).thenReturn(Optional.of(customer));\n\t\tcustRep.deleteById(1);\n\t\tCustomer persistedCust = custService.deleteCustomerbyId(1);\n\t\tassertEquals(1, persistedCust.getCustomerId());\n\t\tassertEquals(\"tommy\", persistedCust.getFirstName());\n\n\t}", "void deleteCustomerDDPayById(int id);", "@Override\n\t@Transactional\n\tpublic void deleteCustomer(int theId) {\n\t\tcustomerDAO.deleteCustomer(theId);\n\t}", "public void delete(String custNo) {\n\t\tcstCustomerDao.update(custNo);\n\t\t\n\t}", "public void deleteCustomer(Integer id) {\n\t\t//get current session\n\t\tSession currentSession = entityManager.unwrap(Session.class);\n\t\t//query for deleting the account\n\t\tQuery<Customer> query = currentSession.createQuery(\n\t\t\t\t\t\t\t\t\t\"delete from Customer where customerId=:id\",Customer.class);\n\t\tquery.setParameter(id, id);\n\t\tquery.executeUpdate();\n\t}", "@Override\n\tpublic void deleteCoustomer(Customer customer) throws Exception {\n\t\tgetHibernateTemplate().delete(customer);\n\t}", "@Atomic\n public void deleteAdhocCustomer(AdhocCustomer adhocCustomer) {\n }", "@DeleteMapping()\n public Customer deleteCustomer(@RequestBody Customer customer ) {\n customerRepository.delete(customer);\n return customerRepository.findById(customer.getId()).isPresent() ? customer : null;\n }", "@Test\n public void testDeleteCustomer() {\n System.out.println(\"deleteCustomer\");\n String name = \"Gert Hansen\";\n String address = \"Grønnegade 12\";\n String phone = \"98352010\";\n CustomerCtr instance = new CustomerCtr();\n int customerID = instance.createCustomer(name, address, phone);\n instance.deleteCustomer(customerID);\n Customer result = instance.getCustomer(customerID);\n assertNull(result);\n // TODO review the generated test code and remove the default call to fail.\n// fail(\"The test case is a prototype.\");\n }", "@Override\n\t@Transactional\n\tpublic void delete(Long id) {\n\t\tcustomerDAO.deleteById(id);\n\t}", "@Override\n\tpublic int deleteCustomerReprieve(Integer id) {\n\t\treturn customerDao.deleteCustomerReprieve(id);\n\t}", "@Override\n\tpublic void deleteCustomer(int theId) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n\t\t//now delete the customer using parameter theId i.e., Customer id (primary key)\n\t\t//HQL query\n\t\tQuery theQuery = currentSession.createQuery(\"delete from Customer where id=:customerId\");\n\n\t\t//prev parameter theId is assigned to customerId\n\t\ttheQuery.setParameter(\"customerId\",theId);\n\n\t\t//this works with update, delete , so on ...\n\t\ttheQuery.executeUpdate();\n\n\t}", "@GET\n\t@Path(\"DeleteCustomer\")\n\tpublic Reply deleteCustomer(@QueryParam(\"id\") int id) {\n\t\treturn ManagerHelper.getCustomerManager().deleteCustomer(id);\n\t}", "public void delete(Customer customer) {\r\n EntityManagerHelper.beginTransaction();\r\n CUSTOMERDAO.delete(customer);\r\n EntityManagerHelper.commit();\r\n renderManager.getOnDemandRenderer(customer.getCustomernumber().toString()).requestRender();\r\n //renderManager.removeRenderer(renderManager.getOnDemandRenderer(customer.getCustomernumber().toString()));\r\n }", "public boolean deleteCustomer(int id, int customerID)\n throws RemoteException, DeadlockException;", "public void deleteCustomer(Connection connection, int CID) throws SQLException {\n\n Scanner scan = new Scanner(System.in);\n\n DatabaseMetaData dmd = connection.getMetaData();\n ResultSet rs = dmd.getTables(null, null, \"CUSTOMER\", null);\n\n if (rs.next()){\n\n String sql = \"DELETE FROM Customer WHERE c_ID = ?\";\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n setCID(CID);\n pStmt.setInt(1, getCID());\n\n try { pStmt.executeUpdate(); }\n catch (SQLException e) { throw e; }\n finally {\n pStmt.close();\n rs.close();\n }\n }\n else {\n System.out.println(\"ERROR: Error loading CUSTOMER Table.\");\n }\n }", "@GetMapping(\"/delete\")\r\n\tpublic String deleteCustomer(@RequestParam(\"customerId\") int id){\n\t\tcustomerService.deleteCustomer(id);\r\n\t\t\r\n\t\t//send over to our form\r\n\t\treturn \"redirect:/customer/list\";\r\n\t}", "public static boolean deleteCustomer(int id)\n {\n try {\n Statement statement = DBConnection.getConnection().createStatement();\n String deleteQuery = \"DELETE FROM customers WHERE Customer_ID=\" + id;\n statement.execute(deleteQuery);\n if(statement.getUpdateCount() > 0)\n System.out.println(statement.getUpdateCount() + \" row(s) affected.\");\n else\n System.out.println(\"No changes were made.\");\n } catch (SQLException e) {\n System.out.println(\"SQLException: \" + e.getMessage());\n }\n return false;\n }", "@DeleteMapping(\"/{id}\")\n public Boolean deleteCustomer(@PathVariable(\"id\") Long customerId) {\n return true;\n }", "@Override\n\tpublic Uni<Boolean> deleteCustomerById(Long cid) {\n\t\treturn repo.deleteById(cid).chain(repo::flush).onItem().transform(ignore ->true);\n\t}", "public static int deleteCustomer(long custID) throws CouponSystemException {\n\t\tConnection con = null;\n\t\ttry {\n\t\t\tcon = pool.getConnection();\n\t\t\tStatement stmt = con.createStatement();\n\t\t\treturn stmt.executeUpdate(\"DELETE FROM customersCoupons WHERE customerID=\" + custID);\n\t\t} catch (Exception e) {\n\t\t\tthrow new CouponSystemException(\"Customer Not Deleted\");\n\t\t} finally {\n\t\t\tpool.returnConnection(con);\n\t\t}\n\t}", "@Override\r\n\tpublic void delete(String cust_ID) {\n\t\tConnection con = null;\r\n\t\tPreparedStatement pstmt = null;\r\n\r\n\t\ttry {\r\n\t\t\tcon = ds.getConnection();\r\n\t\t\tpstmt = con.prepareStatement(DELETE);\r\n\r\n\t\t\tpstmt.setString(1, cust_ID);\r\n\r\n\t\t\tpstmt.executeUpdate();\r\n\t\t} catch (SQLException se) {\r\n\t\t\tthrow new RuntimeException(\"A database error occured.\" + se.getMessage());\r\n\t\t} finally {\r\n\t\t\tif (pstmt != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tpstmt.close();\r\n\t\t\t\t} catch (SQLException se) {\r\n\t\t\t\t\tse.printStackTrace(System.err);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (con != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tcon.close();\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace(System.err);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "public void deleteCustomer(String id) {\n\t\tConnection connection = DBConnect.getDatabaseConnection();\n\t\ttry {\n\t\t\tStatement deleteStatement = connection.createStatement();\n\t\t\t\n\t\t\tString deleteQuery = \"DELETE FROM Customer WHERE CustomerID='\"+id+\"')\";\n\t\t\tdeleteStatement.executeUpdate(deleteQuery);\t\n\t\t\t\n\t\t\t//TODO delete all DB table entries related to this entry:\n\t\t\t//address\n\t\t\t//credit card\n\t\t\t//All the orders?\n\t\t\t\n\t\t}catch(SQLException se) {\n\t\t\tse.printStackTrace();\n\t\t}finally {\n\t\t\tif(connection != null) {\n\t\t\t\ttry {\n\t\t\t\t\tconnection.close();\n\t\t\t\t} catch (SQLException e) {}\n\t\t\t}\n\t\t}\n\t\n\t}", "@Test\n public void deleteCustomer() {\n Customer customer = new Customer();\n customer.setFirstName(\"Dominick\");\n customer.setLastName(\"DeChristofaro\");\n customer.setEmail(\"dominick.dechristofaro@gmail.com\");\n customer.setCompany(\"Omni\");\n customer.setPhone(\"999-999-9999\");\n customer = service.saveCustomer(customer);\n\n // Delete the Customer from the database\n service.removeCustomer(customer.getCustomerId());\n\n // Test the deleteCustomer() method\n verify(customerDao, times(1)).deleteCustomer(integerArgumentCaptor.getValue());\n assertEquals(customer.getCustomerId(), integerArgumentCaptor.getValue().intValue());\n }", "@Override\r\n\tpublic void removeCustomer() {\n\t\t\r\n\t}", "public void deleteCustomerbyId(int i) {\n\t\tObjectSet result = db.queryByExample(new Customer(i, null, null, null, null, null));\n\n\t\twhile (result.hasNext()) {\n\t\t\tdb.delete(result.next());\n\t\t}\n\t\tSystem.out.println(\"\\nEsborrat el customer \" + i);\n\t}", "public void Delete(int id) {\n\t\tString sql4 = \"DELETE FROM customers where customer_id= \" + id;\n\t\ttry {\n\t\t\tstmt.executeUpdate(sql4);\n\t\t\tSystem.out.println(\"Deleted\");\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}", "@ApiOperation(value = \"Delete a customer\", notes = \"\")\n @DeleteMapping(value = {\"/{customerId}\"}, produces = MediaType.APPLICATION_JSON_VALUE)\n @ResponseStatus(HttpStatus.OK)\n public void deleteCustomer(@PathVariable Long customerId) {\n\n customerService.deleteCustomerById(customerId);\n\n }", "@DELETE\n\t@Path(\"/delete\")\n\t@Consumes(MediaType.APPLICATION_JSON)\n\tpublic void delCustomer(String id)\n\t\t\tthrows MalformedURLException, RemoteException, NotBoundException, ClassNotFoundException, SQLException {\n\n\t\t// Connect to RMI and setup crud interface\n\t\tDatabaseOption db = (DatabaseOption) Naming.lookup(\"rmi://\" + address + service);\n\n\t\t// Connect to database\n\t\tdb.Connect();\n\n\t\t// Delete the customers table\n\t\tdb.Delete(\"DELETE FROM CUSTOMERS WHERE id='\" + id + \"'\");\n\n\t\t// Delete the bookings table\n\t\tdb.Delete(\"DELETE FROM BOOKINGS WHERE CUSTOMERID='\" + id + \"'\");\n\n\t\t// Disconnect to database\n\t\tdb.Close();\n\t}", "public abstract void delete(CustomerOrder customerOrder);", "private void deleteCustomerById(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n int idCustomer = Integer.parseInt(request.getParameter(\"id\"));\n CustomerDao.deleteCustomer(idCustomer);\n response.sendRedirect(\"/\");\n }", "@DeleteMapping(\"/customer/{id}\")\n\tpublic ResponseEntity<Map<String, Boolean>> deleteCustomer(@PathVariable Long id) {\n\t\tCustomer customer = customerRepository.findById(id)\n\t\t\t\t.orElseThrow(() -> new ResourceNotFoundException(\"Customer not exist with id :\" + id));\n\n\t\tcustomerRepository.delete(customer);\n\t\tMap<String, Boolean> response = new HashMap<>();\n\t\tresponse.put(\"deleted\", Boolean.TRUE);\n\t\treturn ResponseEntity.ok(response);\n\t}", "@DeleteMapping(\"/customers/{customerId}\")\n public String deleteCustomer(@PathVariable int customerId) {\n CustomerHibernate customerHibernate = customerService.findById(customerId);\n\n if (customerHibernate == null) {\n throw new RuntimeException(\"Customer id not found - \" + customerId);\n }\n customerService.deleteById(customerId);\n\n return String.format(\"Deleted customer id - %s \", customerId);\n }", "BrainTreeCustomerResult removeCustomer(BrainTreeCustomerRequest request);", "@RequestMapping(method = RequestMethod.DELETE, value = \"/{id}\")\n\t public ResponseEntity<?> deleteCustomer(@PathVariable(\"id\") Long id, @RequestBody Customer customer) {\n\t \treturn service.deleteCustomer(id, customer);\n\t }", "@DeleteMapping(\"/customer/id/{id}\")\r\n\tpublic Customer deleteCustomerbyId(@PathVariable(\"id\") int customerId) {\r\n\tif(custService.deleteCustomerbyId(customerId)==null) {\r\n\t\t\tthrow new CustomerNotFoundException(\"Customer not found with this id\" +customerId);\r\n\t\t}\r\n\t\treturn custService.deleteCustomerbyId(customerId);\r\n\t}", "@Override\n\tpublic Item delete() {\n\t\treadAll();\n\t\tLOGGER.info(\"\\n\");\n\t\t//user can select either to delete a customer from system with either their id or name\n\t\tLOGGER.info(\"Do you want to delete record by Item ID\");\n\t\tlong id = util.getLong();\n\t\titemDAO.deleteById(id);\n\t\t\t\t\n\t\t\t\t\n\t\treturn null;\n\t}", "private void deletePurchase(CustomerService customerService) throws DBOperationException\n\t{\n\t\tSystem.out.println(\"To delete coupon purchase enter coupon ID\");\n\t\tString idStr = scanner.nextLine();\n\t\tint id;\n\t\ttry\n\t\t{\n\t\t\tid=Integer.parseInt(idStr);\n\t\t}\n\t\tcatch(NumberFormatException e)\n\t\t{\n\t\t\tSystem.out.println(\"Invalid id\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// retrieve all coupons of this customer\n\t\tList<Coupon> coupons = customerService.getCustomerCoupons();\n\t\tCoupon coupon = null;\n\t\t\n\t\t// find coupon whose purchase to be deleted\n\t\tfor(Coupon tempCoupon : coupons)\n\t\t\tif(tempCoupon.getId() == id)\n\t\t\t{\n\t\t\t\tcoupon = tempCoupon;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\n\t\t// delete purchase of the coupon\n\t\tif(coupon != null)\n\t\t{\n\t\t\tcustomerService.deletePurchase(coupon);\n\t\t\tSystem.out.println(customerService.getClientMsg());\n\t\t}\n\t\telse\n\t\t\tSystem.out.println(\"Customer dors not have coupon with this id\");\n\t}", "void removeCustomer(Customer customer);", "public void removeCustomer(){\n String message = \"Choose one of the Customer to remove it\";\n if (printData.checkAndPrintCustomer(message)){\n subChoice = GetChoiceFromUser.getSubChoice(data.numberOfCustomer());\n if (subChoice!=0){\n data.removeCustomer(data.getCustomer(subChoice-1),data.getBranch(data.getBranchEmployee(ID).getBranchID()));\n System.out.println(\"Customer has removed Successfully!\");\n }\n }\n }", "@Transactional\r\n\tpublic void delete(int billingid) {\n\t\t\r\n\t}", "@PreAuthorize(\"#oauth2.hasAnyScope('write','read-write')\")\n\t@RequestMapping(method = DELETE, value = \"/{id}\")\n\tpublic Mono<ResponseEntity<?>> deleteCustomer(@PathVariable @NotNull ObjectId id) {\n\n\t\tfinal Mono<ResponseEntity<?>> noContent = Mono.just(noContent().build());\n\n\t\treturn repo.existsById(id)\n\t\t\t.filter(Boolean::valueOf) // Delete only if customer exists\n\t\t\t.flatMap(exists -> repo.deleteById(id).then(noContent))\n\t\t\t.switchIfEmpty(noContent);\n\t}", "@RequestMapping(value = \"/customer/{id}\",method=RequestMethod.DELETE)\n @ResponseStatus(HttpStatus.NO_CONTENT)\n public void removeCustomer(@PathVariable(\"id\") int id){\n //simply remove the customer using the id. If it does not exist, nothing will happen anyways\n service.removeCustomer(id);\n }", "@Override\n\tpublic boolean deleteRecord(Customer record) {\n\t\tfinal int res = JOptionPane.showConfirmDialog(null,\n\t\t\t\t\"Are you sure you want to delete the selected customer?\", \"Delete Record\",\n\t\t\t\tJOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);\n\t\tif (res == JOptionPane.YES_OPTION) {\n\t\t\t// Remove customer from model\n\t\t\tsynchronized (model.customers) {\n\t\t\t\tmodel.customers.remove(record.getLogin());\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "@Nullable\n public DelegatedAdminCustomer delete() throws ClientException {\n return send(HttpMethod.DELETE, null);\n }", "public int removeCustomer(long id) {\n return model.deleteCustomer(id);\n }", "public int deleteUser(int id) {\n\t\t\t String deleteQuery=\"delete from registration_customer_data where id='\"+id+\"' \";\n\t\t\t return template.update(deleteQuery); \n\t\t\n\t\t}", "@DeleteMapping(\"/api/customer/{id}\")\n\tpublic ResponseEntity<?> deleteCustomerDetails(@PathVariable(\"id\") long id) {\n\t\tcustomerService.deleteCustomerDetails(id);\n\t\treturn ResponseEntity.ok().body(\"Customer Details is deleted\");\n\n\t}", "public void delete(int cID) {\n\t\tacmapper.delete(cID);\n\t}", "public Response<Boolean> deleteCustomer(CustomerDeleteReqDto requestDto) {\n\t\tResponse<Boolean> responseDto = new Response<>();\n\n\t\tList<Customer> customer = customerRepo.findByCustomerIdIn(requestDto.getCustomerId());\n\t\tif (!customer.isEmpty()) {\n\t\t\tfor (Customer customerDetail : customer) {\n\t\t\t\tcustomerDetail.setActive(false);\n\t\t\t\tcustomerDetail.setModifiedDate(new Date());\n\t\t\t}\n\t\t\tcustomerRepo.save(customer);\n\t\t\tList<User> user = userRepo.findByCustomerIn(customer);\n\t\t\tif (!user.isEmpty()) {\n\t\t\t\tfor (User userDetail : user) {\n\t\t\t\t\tuserDetail.setIsActive(false);\n\t\t\t\t\tuserDetail.setModifiedDate(new Date());\n\t\t\t\t}\n\t\t\t\tuserRepo.save(user);\n\t\t\t}\n\t\t\tresponseDto.setMessage(CustomerConstants.CUSTOMER_DELETED_SUCCESSFULLY);\n\t\t\tresponseDto.setStatus(HttpServletResponse.SC_OK);\n\t\t\tresponseDto.setError(false);\n\n\t\t} else {\n\t\t\tresponseDto.setStatus(HttpServletResponse.SC_NO_CONTENT);\n\t\t\tresponseDto.setError(true);\n\t\t\tresponseDto.setMessage(CustomerConstants.CUSTOMER_NOT_FOUND);\n\t\t}\n\t\treturn responseDto;\n\n\t}", "@Override\r\n\tpublic boolean deletePostPaidAccount(int customerID, long mobileNo) {\n\t\treturn false;\r\n\t}", "@Then(\"^user deletes customer \\\"([^\\\"]*)\\\"$\")\r\n\tpublic void user_deletes_customer(String arg1) throws Throwable {\n\t DeleteCustomer delete=new DeleteCustomer();\r\n\t StripeCustomer.response=delete.deleteCustomer(new PropertFileReader().getTempData(arg1));\r\n\t}", "@DeleteMapping(\"/customers/{customer_id}\")\n\tpublic String deletecustomer(@PathVariable(\"customer_id\") int customerid ) {\n\t\t\n\t\t//first check if there is a customer with that id, if not there then throw our exception to be handled by @ControllerAdvice\n\t\tCustomer thecustomer=thecustomerService.getCustomer(customerid);\n\t\tif(thecustomer==null) {\n\t\t\tthrow new CustomerNotFoundException(\"Customer with id : \"+customerid+\" not found\");\n\t\t}\n\t\t//if it is happy path(customer found) then go ahead and delete the customer\n\t\tthecustomerService.deleteCustomer(customerid);\n\t\treturn \"Deleted Customer with id: \"+customerid;\n\t}", "public void remove(Customer c) {\n customers.remove(c);\n\n fireTableDataChanged();\n }", "@RequestMapping(value = \"/customer-addres/{id}\",\n method = RequestMethod.DELETE,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<Void> deleteCustomerAddres(@PathVariable Long id) {\n log.debug(\"REST request to delete CustomerAddres : {}\", id);\n customerAddresRepository.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(\"customerAddres\", id.toString())).build();\n }", "@Test\n public void testCustomerFactoryRemove() {\n CustomerController customerController = customerFactory.getCustomerController();\n customerController.addCustomer(CUSTOMER_NAME, CUSTOMER_CONTACT, false);\n customerController.removeCustomer(CUSTOMER_NAME,1);\n assertEquals(0, customerController.getCustomerList().size());\n }", "@Override\r\n\tpublic int deleteByExample(FarmerCreditExample example) {\n\t\treturn farmerCreditDao.deleteByExample(example);\r\n\t}", "public boolean removeCustomer(int deleteId) {\n\t\tCallableStatement stmt = null;\n\t\tboolean flag = true;\n\t\tCustomer ck= findCustomer(deleteId);\n\t\tif(ck==null){\n\t\t\tSystem.out.println(\"Cutomer ID not present in inventory.\");\n\t\t\treturn false;\n\t\t}\n\t\t\t\n\t\telse\n\t\t{\n\t\t\tString query = \"{call deleteCustomer(?)}\";\n\t\t\ttry {\n\t\t\t\tstmt = con.prepareCall(query);\n\t\t\t\tstmt.setInt(1, deleteId);\n\t\t\t\tflag=stmt.execute();\n\t\t\t\t//System.out.println(flag);\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\tSystem.out.println(\"Error in database operation. Try agian!!\");\n\t\t\t\t//e.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\treturn flag;\n\t\t\t\n\t\t}\n\t\t\n\t}", "@Override\n\tpublic boolean deleteCustomer(Integer id) {\n\n\t\tboolean isDeleted = false;\n\n\t\tfor (Customer customer : customers) {\n\t\t\tif (customer.getId() == id) {\n\t\t\t\tcustomers.remove(customer);\n\t\t\t\tlogger.info(\"Customer @id\" + id + \" is deleted from the list\");\n\t\t\t\tisDeleted = true;\n\t\t\t}\n\t\t}\n\t\tlogger.info(\"Delete done : deleteCustomer.isDeleted = \" + isDeleted);\n\t\treturn isDeleted;\n\t}", "public void deleteSalerCustomer(int uid) {\n\t\tthis.salerCustomerMapper.deleteSalerCustomer(uid);\n\t}", "public void delete()\n\t{\n\t\t_Status = DBRowStatus.Deleted;\n\t}", "private void endCustomer(MyCustomer customer){ \n\tDo(\"Table \" + customer.tableNum + \" is cleared!\");\n\thost.msgTableIsFree(customer.tableNum);\n\tcustomers.remove(customer);\n\tstateChanged();\n }", "void deleteAccountByCustomer(String customerId, String accountNumber) throws AccountException, CustomerException;", "public Boolean removeCustomer() {\r\n boolean ok = false;\r\n\t\t//Input customer phone.\r\n\t\tString phone = readString(\"Input the customer phone: \");\r\n\t\tCustomer f = my.findByPhone(phone);\r\n\t\tif (f != null) {\r\n ok = my.remove(f);\r\n\t\t\t\r\n\t\t}\r\n\t\telse alert(\"Customer not found\\n\");\t\r\n return ok;\r\n\t}", "@Override\n\tpublic void delete(Long ID) {\n\t\tCustRepo.delete(ID);\n\t}", "public void removeUser(Customer user) {}", "@Override\n\tpublic void removeCustomer(Customer customer) throws Exception {\n\t\tConnection con = pool.getConnection();\n\t\t\n\t\tCustomer custCheck = getCustomer(customer.getId());\n\t\tif(custCheck.getCustName() == null)\n\t\t\tthrow new Exception(\"No Such customer Exists.\");\n\t\t\n\t\tif(custCheck.getCustName().equalsIgnoreCase(customer.getCustName()) && customer.getId() == custCheck.getId()) {\n\t\t\ttry {\n\t\t\t\t\tStatement st = con.createStatement();\n\t\t\t\t\tString remove = String.format(\"delete from customer where id in('%d')\", \n\t\t\t\t\t\tcustomer.getId());\n\t\t\t\t\tst.executeUpdate(remove);\n\t\t\t\t\tSystem.out.println(\"Customer removed successfully\");\n\t\t\t} catch (SQLException e) {\n\t\t\t\tSystem.out.println(e.getMessage() + \" Could not retrieve data from DB\");\n\t\t\t}finally {\n\t\t\t\ttry {\n\t\t\t\t\tConnectionPool.getInstance().returnConnection(con);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@RequestMapping(value = \"/customerOrders/{id}\",\n method = RequestMethod.DELETE,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<Void> deleteCustomerOrder(@PathVariable Long id) {\n log.debug(\"REST request to delete CustomerOrder : {}\", id);\n customerOrderRepository.delete(id);\n customerOrderSearchRepository.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(\"customerOrder\", id.toString())).build();\n }", "@Override\n\tpublic void removeCustomer(Session session){\n\t\ttry{\n\t\t\tSystem.out.print(\"*--------------Remove Customers here--------------*\\n\");\n\t\t\t//scanner class allows the admin to enter his/her input\n\t\t\tScanner scanner = new Scanner(System.in);\n\t\t\t//read input customer id\n\t\t\tSystem.out.print(\"Enter Customer Id to delete the customer: \");\n\t\t\tint customerId = scanner.nextInt();\n\n\t\t\t//pass these input items to client controller\n\t\t\tsamp=mvc.removeCustomer(session,customerId);\n\t\t\tSystem.out.println(samp);\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(\"Online Market App- Remove Customer Exception: \" +e.getMessage());\n\t\t}\n\t}", "public void delete() {\r\n\t\tCampLeaseDAO leaseDao = (CampLeaseDAO) getApplicationContext().getBean(\"leaseDaoBean\", CampLeaseDAO.class);\r\n\t\tleaseDao.delete(this);\r\n\t}", "void deleteCustomerOrderBroadbandASIDById(int id);", "@Override\n\tpublic int deleteById(int id) {\n\t\treturn customerBrowseMapper.deleteById(id);\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}" ]
[ "0.73916894", "0.72837305", "0.7226561", "0.72115636", "0.7205906", "0.71810347", "0.7047933", "0.70254356", "0.70254356", "0.702388", "0.70213187", "0.6966791", "0.68921596", "0.68608093", "0.6838133", "0.6834833", "0.68290496", "0.6823768", "0.68136054", "0.68072903", "0.67930686", "0.6784501", "0.67632425", "0.6760181", "0.67476904", "0.67370445", "0.672072", "0.66731507", "0.6672043", "0.666287", "0.6649833", "0.6646571", "0.6607285", "0.6582315", "0.6557141", "0.6554366", "0.6525786", "0.6500157", "0.6484147", "0.64832294", "0.64664686", "0.643984", "0.64385986", "0.6430608", "0.6428034", "0.64234805", "0.6398778", "0.6398548", "0.6388474", "0.6376771", "0.63690025", "0.6366091", "0.63426375", "0.63416106", "0.63403857", "0.63236517", "0.6275978", "0.62645316", "0.626206", "0.6258506", "0.62579215", "0.6246972", "0.623569", "0.6201954", "0.61946535", "0.6172531", "0.6170925", "0.6136485", "0.6136143", "0.61069965", "0.6102754", "0.61026436", "0.60797507", "0.6061323", "0.6036067", "0.60162807", "0.60129714", "0.598358", "0.59733707", "0.59534895", "0.59401757", "0.5930064", "0.59265417", "0.589285", "0.58572173", "0.58553165", "0.5852053", "0.58462423", "0.5836513", "0.5826833", "0.5821539", "0.58213997", "0.5811194", "0.57894725", "0.57726204", "0.57677656", "0.57653034", "0.57647055", "0.57445335", "0.57285994" ]
0.7685224
0
Show the customer information window with all text fields initially empty
@FXML private void handleAdd() { showCustomerInfoDialog(null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void emptyTextFields() {\n clientFirstNameTextField.setText(\"\");\n clientLastNameTextField.setText(\"\");\n clientBSNTextField.setText(\"\");\n clientAddressTextField.setText(\"\");\n clientPostCodeTextField.setText(\"\");\n clientCityTextField.setText(\"\");\n clientTelTextField.setText(\"\");\n clientEmailTextField.setText(\"\");\n clientIBANTextField.setText(\"\");\n }", "public void display()\r\n {\r\n System.out.println(\"Description: \" +description);\r\n if(!customersName.equals(\"\")) {\r\n System.out.println(\"Customer Name: \" +customersName);\r\n }\r\n }", "private void blank() {\r\n txt_name.requestFocus();\r\n txt_id.setText(null);\r\n txt_name.setText(null);\r\n txt_bagian.setText(null);\r\n txt_telp.setText(null);\r\n txt_address.setText(null);\r\n\r\n }", "public InputCustomers() {\n initComponents();\n setLocationRelativeTo(null);\n setAsObserver();\n txtSearch.setText(\"-Select a option to search-\");\n libUpdate.setEnabled(false);\n libRemove.setEnabled(false);\n newCustomermessage.setVisible(false);\n newSectionmessage.setVisible(false);\n newjobrolemessage.setVisible(false);\n loadCustomers();\n loadSections();\n loadJobRoles();\n }", "public void emptyTextField(){\n spelerIDField.setText(\"\");\n typeField.setText(\"\");\n codeField.setText(\"\");\n heeftBetaaldField.setText(\"\");\n }", "public void clear()\n\t\t{\n\t\t\ttxtCustomerName.setText(\"\");\n\t\t\ttxtAddress.setText(\"\");\n\t\t\ttxtContact.setText(\"\");\n\t\t\ttxtProduct.setText(\"\");\n\t\t\ttxtSerialNo.setText(\"\");\n\t\t\ttxtModuleNo.setText(\"\");\n\t\t\ttxtComplaintNo.setText(\"\");\n\t\t\tCategorycomboBox.setSelectedItem(\"Sent\");\n\t\t}", "private void fillExistingCustomer() {\n idField.setText(String.valueOf(existingCustomer.getCustomerID()));\n nameField.setText(existingCustomer.getCustomerName());\n String[] splitAddress = existingCustomer.getAddress().split(\", \");\n addressField.setText(splitAddress[0]);\n if ( splitAddress.length > 1 ) {\n cityField.setText(splitAddress[1]);\n }\n postalField.setText(existingCustomer.getPostalCode());\n phoneField.setText(existingCustomer.getPhone());\n\n FirstLevelDivision division = getDivisionByID(existingCustomer.getDivisionID());\n divisionComboBox.getSelectionModel().select(division);\n countryComboBox.getSelectionModel().select(getCountryByID(division.getCountryID()));\n }", "public void read() {\r\n\t\tJTextField txtCustomerNo = new JTextField();\r\n\t\ttxtCustomerNo.setText(\"\" + this.getCustomerNo());\r\n\t\tJTextField txtTitle = new JTextField();\r\n\t\ttxtTitle.requestFocus();\r\n\t\tJTextField txtFirstName = new JTextField();\r\n\t\tJTextField txtSurname = new JTextField();\r\n\t\tJTextField txtAddress = new JTextField();\r\n\t\tJTextField txtPhoneNo = new JTextField();\r\n\t\tJTextField txtEmail = new JTextField();\r\n\r\n\t\t\r\n\t\tObject[] message = { \"Customer Number:\", txtCustomerNo, \"Title:\", txtTitle, \"First Name:\", txtFirstName,\r\n\t\t\t\t\"Surname:\", txtSurname, \"Address:\", txtAddress, \"Phone Number:\", txtPhoneNo, \"Email:\", txtEmail, };\r\n\t\t\r\n\r\n\t\tint option = JOptionPane.showConfirmDialog(null, message, \"Enter customer details\",\r\n\t\t\t\tJOptionPane.OK_CANCEL_OPTION);\r\n\t\t\r\n\t\tName txtName = new Name(txtTitle.getText(), txtFirstName.getText(), txtSurname.getText());\r\n\r\n\t\tif (option == JOptionPane.OK_OPTION) {\r\n\t\t\tthis.name = txtName;\r\n\t\t\tthis.address = txtAddress.getText();\r\n\t\t\tthis.phoneNo = txtPhoneNo.getText();\r\n\t\t\tthis.emailAddress = txtEmail.getText();\r\n\t\t}\r\n\t}", "private void ClearForm() {\n supplierName.setText(\"\");\n supplierDiscription.setText(\"\");\n }", "public Customer_Form() {\n initComponents();\n setSize(890,740);\n \n \n }", "private void clearForm() {\n mViewerSalutation.setText(getString(R.string.viewer_info_salutation) + \" \" + Integer.toString(mViewers.size() + 1) + \",\");\n mNameEditText.setText(null);\n mEmailEditText.setText(null);\n mNameEditText.requestFocus();\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n txtNameC.setText(\"\");\n txtNumC.setText(\"\");\n txtTelC.setText(\"\");\n txtEmailC.setText(\"\");\n txtRueC.setText(\"\");\n txtVilleC.setText(\"\");\n txtCPC.setText(\"\");\n txtPwdC.setText(\"\");\n txtRePwdC.setText(\"\");\n txtCB.setText(\"\");\n //Définir l'étiquette d'information sur vide\n lbIMsgC.setText(\"\");\n\n }", "public void actionPerformed(ActionEvent e){\n\t\t\t\tcustJTextArea.setText(null);\n\t\t\t\t\tif(customers.size() >= 1){\n\t\t\t\t\t\tfor(Customer customer: customers){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcustJTextArea.append(\"\\n Customer Id: \"+customer.getCustId()\n\t\t\t\t\t\t\t\t\t\t+\"\\n Name: \"+customer.getCustName()\n\t\t\t\t\t\t\t\t\t\t+\"\\n Address: \"+customer.getCustAddress()\n\t\t\t\t\t\t\t\t\t\t+\"\\n Email: \"+customer.getCustEmail()\n\t\t\t\t\t\t\t\t\t\t+\"\\n Phone: \"+customer.getCustTelephone()\n\t\t\t\t\t\t\t\t\t\t+\"\\n\");\n\t\t\t\t\t\t\tcustJTextArea.setCaretPosition(0);\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"No Customers Found\");\n\t\t\t\t\t}\n\t\t\t}", "public customerentry() {\n initComponents();\n }", "private void clearAll(){\n ImplLogger.enterMethod(); \n pharmaNameTextField.setText(ImplConst.EMPTY);\n userNameTextField.setText(ImplConst.EMPTY);\n passwordField.setText(ImplConst.EMPTY);\n confirmPasswordField.setText(ImplConst.EMPTY);\n addressLine1TextField.setText(ImplConst.EMPTY);\n addressLine2TextField.setText(ImplConst.EMPTY);\n regionComboBox.setSelectedIndex(0);\n emailTextField.setText(ImplConst.EMPTY);\n contactTextField.setText(ImplConst.EMPTY);\n zipCodeTextField.setText(ImplConst.EMPTY);\n ImplLogger.exitMethod();\n }", "public PnNewCustomer() {\n initComponents();\n }", "private void showSponsorInfo(){\r\n if (txtSponsorCode.getText().equals(\"\") ){\r\n showSponsorSearch();\r\n }else {\r\n SponsorMaintenanceForm frmSponsor = new SponsorMaintenanceForm('D',\r\n txtSponsorCode.getText().toString().trim());\r\n frmSponsor.showForm(mdiForm,DISPLAY_TITLE,true);\r\n \r\n }\r\n isSponsorSearchRequired =false;\r\n }", "public pnlCustomer() {\n initComponents();\n }", "public CustomerListForm() {\n initComponents();\n findAllData();\n }", "public CustomerGUI() {\n\t initComponents();\n\t }", "public void displayCustomerDetails(){\n\t\tStringBuffer fullname = new StringBuffer();//Creates new string buffer\n\t\tStringBuffer fulladdress = new StringBuffer();//Creates new string buffer\n\t\tfullname.append(\"Full Name: \" + fname + \" \" + lname);\n\t\tfulladdress.append(\"Full Address: \" + address1 + \", \" + address2 + \", \" + postcode);\n\t\tSystem.out.println(fullname);\n\t\tSystem.out.println(fulladdress);\n\t\tSystem.out.println(\"Account No: \" + linkedacc);\n\t\tSystem.out.println(\"Customer Ref: \" + custref);\n\t}", "private void clearTextFields() {\r\n\r\n\t\ttxfLoginEmail.clear();\r\n\t\ttxfLoginEmail.setPromptText(\"bartsimpson@lyit.ie\");\r\n\t\tpwfLoginPassword.clear();\r\n\t\ttxfFName.clear();\r\n\t\ttxfFName.setPromptText(\"Enter First Name\");\r\n\t\ttxfSName.clear();\r\n\t\ttxfSName.setPromptText(\"Enter Surname\");\r\n\t\ttxfEmail.clear();\r\n\t\ttxfEmail.setPromptText(\"Enter Email Address\");\r\n\t\ttxfPassword.clear();\r\n\t\ttxfPassword.setPromptText(\"Enter Password\");\r\n\t}", "public void showCustomers() {\r\n List<String> customerList = new ArrayList<>();\r\n for (int i = 0; i < customersTable.getItems().size(); i++) {\r\n Customer customer = customersTable.getItems().get(i);\r\n LocalDate date = LocalDate.parse(customer.getDate());\r\n if (date.plusMonths(1).isBefore(LocalDate.now())) {\r\n customerList.add(customer.getFirstName() + \" \" + customer.getLastName());\r\n }\r\n }\r\n String message = \"\";\r\n for (String customer : customerList) {\r\n message += customer + \"\\n\";\r\n }\r\n if (message.equals(\"\")) {\r\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\r\n alert.setTitle(\"The following customers need to be contacted this week\");\r\n alert.setHeaderText(null);\r\n alert.setContentText(\"No customers to be contacted today\");\r\n alert.showAndWait();\r\n } else {\r\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\r\n alert.setTitle(\"The following customers need to be contacted this week\");\r\n alert.setHeaderText(null);\r\n alert.setContentText(message);\r\n alert.showAndWait();\r\n }\r\n }", "public void limpaTextFields() {\n tfMatricula.setText(\"\");\n tfNome.setText(\"\");\n tfDataNascimento.setText(\"\");\n tfTelefone.setText(\"\");\n tfSalario.setText(\"\");\n }", "private void showCustomerInfoDialog(Customer customer) {\n\t\ttry {\n\t\t\t// set up the root for the customer information dialog\n\t\t\tFXMLLoader loader = new FXMLLoader();\n\t\t\tloader.setLocation(C195Application.class.getResource(\"view/AddCustomer.fxml\"));\n\t\t\tloader.setResources(lang);\n\t\t\tAnchorPane customerInfoRoot = (AnchorPane) loader.load();\n\n\t\t\t// set up the stage for the customer information dialog\n\t\t\tStage customerInfoStage = new Stage();\n\t\t\tcustomerInfoStage.setTitle(\"\");\n\t\t\tcustomerInfoStage.initModality(Modality.WINDOW_MODAL);\n\t\t\tcustomerInfoStage.initOwner(stage);\n\n\t\t\t// add a new scene with the root to the stage\n\t\t\tScene scene = new Scene(customerInfoRoot);\n\t\t\tcustomerInfoStage.setScene(scene);\n\n\t\t\t// get the controller for the dialog and pass a reference \n\t\t\t// the customer info dialog stage, and a customer, if one was selected\n\t\t\tAddCustomerController controller = loader.getController();\n\t\t\tcontroller.setupDialog(customerInfoStage, customer);\n\n\t\t\t// show the customer information dialog\n\t\t\tcustomerInfoStage.showAndWait();\n\n\t\t\t// refresh the customer list after an update\n\t\t\tCustomer newCustomer = controller.getNewCustomer();\n\t\t\tif (newCustomer == null) return;\n\n\t\t\tif(customer == null) {\n\t\t\t\tcustomers.add(newCustomer);\n\t\t\t} else {\n\t\t\t\tcustomers.set(customers.indexOf(customer), newCustomer);\n\t\t\t}\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n public void display(JPasswordField passFirstnameTextField,\n JTextField userFirstnameTextField,\n JTextField userLastnameTextField,\n JTextField DoBTextField,\n JTextField contactNumberTextField,\n JTextField emailTextField,\n JTextField salaryTextField,\n JTextField positionStatusTextField,\n JTextField nameTextField,\n JTextField buildingNameTextField,\n JTextField streetTextField,\n JTextField buildingNoTextField,\n JTextField areaTextField,\n JTextField cityTextField,\n JTextField countryTextField,\n JTextField postcodeTextField){\n\n\n\n passFirstnameTextField.setText(getPassword());\n userFirstnameTextField.setText(getFirstname());\n userLastnameTextField.setText(getLastname());\n DoBTextField.setText(DMY.format(getDoB()));\n contactNumberTextField.setText(getContactNumber());\n emailTextField.setText(getEmail());\n salaryTextField.setText(String.valueOf(getSalary()));\n positionStatusTextField.setText(getPositionStatus());\n homeAddress.display(nameTextField,buildingNameTextField,streetTextField,\n buildingNoTextField,areaTextField,cityTextField,\n countryTextField,postcodeTextField);\n }", "private void initialize() {\r\n\t\tframe = new JFrame();\r\n\t\tframe.setBounds(100, 100, 413, 255);\r\n\t\tframe.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\r\n\t\tframe.getContentPane().setLayout(null);\r\n\t\tframe.setVisible(true);\r\n\t\t\r\n\t\tJLabel lblCustomerName = new JLabel(\"customer name\");\r\n\t\tlblCustomerName.setBounds(10, 11, 97, 21);\r\n\t\tframe.getContentPane().add(lblCustomerName);\r\n\t\t\r\n\t\tJLabel lblCompanyName = new JLabel(\"Company name\");\r\n\t\tlblCompanyName.setBounds(10, 43, 97, 21);\r\n\t\tframe.getContentPane().add(lblCompanyName);\r\n\t\t\r\n\t\tJLabel lblPhoneNo = new JLabel(\"Phone No\");\r\n\t\tlblPhoneNo.setBounds(10, 75, 97, 21);\r\n\t\tframe.getContentPane().add(lblPhoneNo);\r\n\t\t\r\n\t\tJLabel lblPhoneNo_1 = new JLabel(\"Phone No2\");\r\n\t\tlblPhoneNo_1.setBounds(10, 107, 97, 21);\r\n\t\tframe.getContentPane().add(lblPhoneNo_1);\r\n\t\t\r\n\t\tJLabel lblAddress = new JLabel(\"address\");\r\n\t\tlblAddress.setBounds(10, 139, 97, 21);\r\n\t\tframe.getContentPane().add(lblAddress);\r\n\t\t\r\n\t\ttextfield_customer_name = new JTextField();\r\n\t\ttextfield_customer_name.setBounds(117, 11, 280, 21);\r\n\t\tframe.getContentPane().add(textfield_customer_name);\r\n\t\ttextfield_customer_name.setColumns(10);\r\n\t\t\r\n\t\ttextField_company = new JTextField();\r\n\t\ttextField_company.setColumns(10);\r\n\t\ttextField_company.setBounds(117, 43, 280, 21);\r\n\t\tframe.getContentPane().add(textField_company);\r\n\t\t\r\n\t\ttextfield_phone1 = new JTextField();\r\n\t\ttextfield_phone1.setColumns(10);\r\n\t\ttextfield_phone1.setBounds(117, 75, 280, 21);\r\n\t\tframe.getContentPane().add(textfield_phone1);\r\n\t\t\r\n\t\ttextfield_phone2 = new JTextField();\r\n\t\ttextfield_phone2.setColumns(10);\r\n\t\ttextfield_phone2.setBounds(117, 107, 280, 21);\r\n\t\tframe.getContentPane().add(textfield_phone2);\r\n\t\t\r\n\t\ttextField_address = new JTextField();\r\n\t\ttextField_address.setColumns(10);\r\n\t\ttextField_address.setBounds(117, 139, 280, 21);\r\n\t\tframe.getContentPane().add(textField_address);\r\n\t\t\r\n\t\tif (mode==\"edit\"){\r\n\t\t\ttextfield_customer_name.setText(customer.getName());\r\n\t\t\ttextField_company.setText(customer.getAddress());\r\n\t\t\ttextfield_phone1.setText(customer.getPhone1());\r\n\t\t\ttextfield_phone2.setText(customer.getPhone2());\r\n\t\t\ttextField_address.setText(customer.getAddress());\r\n\t\t}\r\n\t\tJButton btnAdd = new JButton(\"Add\");\r\n\t\tbtnAdd.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tif(textfield_customer_name.getText().isEmpty()&& textField_company.getText().isEmpty())\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Both Names can't be empty !!\");\r\n\t\t\t\telse if (mode==\"add\" || mode==null){ // to add a new customer to the DB\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\tString name = textfield_customer_name.getText();\r\n\t\t\t\t\tString companyName=textField_company.getText();\r\n\t\t\t\t\tString phoneNo1=textfield_phone1.getText();\r\n\t\t\t\t\tString phoneNo2=textfield_phone2.getText();\r\n\t\t\t\t String addresss=textField_address.getText();\r\n\t\t\t\t long time= new Date().getTime();\r\n\t\t\t\t \r\n\t\t\t\t String query=String.format(\"insert into customers (%s,%s,%s,%s,%s,%s) values (?,?,?,?,?,?)\"\r\n\t\t\t\t \t\t,\"cname\",\"company_name\",\"phone\",\"phone2\",\"address\",\"date_added\");\r\n\t\t\t\t System.out.println(query);\r\n\t\t\t\t \r\n\t\t\t\t\t\tpst=con.prepareStatement(query);\r\n\t\t\t\t\t\tpst.setString(1, name);\r\n\t\t\t\t\t\tpst.setString(2, companyName);\r\n\t\t\t\t\t\tpst.setString(3, phoneNo1);\r\n\t\t\t\t\t\tpst.setString(4, phoneNo2);\r\n\t\t\t\t\t\tpst.setString(5, addresss);\r\n\t\t\t\t\t\tpst.setLong(6, time);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tpst.execute();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t parent.UpdateCustomerslist();\r\n\t\t\t\t\t\t\tframe.dispose();\r\n\t\t\t\t\t}catch(NumberFormatException nfe){\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"please insert the info correctly\");\r\n\t\t\t\t\t} catch (SQLException 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\t}\r\n\t\t\t\telse if (mode==\"edit\"){\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\tint id = customer.getId();\r\n\t\t\t\t\tString name = textfield_customer_name.getText();\r\n\t\t\t\t\tString companyName=textField_company.getText();\r\n\t\t\t\t\tString phoneNo1=textfield_phone1.getText();\r\n\t\t\t\t\tString phoneNo2=textfield_phone2.getText();\r\n\t\t\t\t String addresss=textField_address.getText();\r\n\t\t\t\t long time= new Date().getTime();\r\n\t\t\t\t String query=\"UPDATE customers set cname=?,company_name=?\"\r\n\t\t\t\t \t\t+ \",phone=?,phone2=?,address=? where cus_id = ? \" ;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t System.out.println(query);\r\n\t\t\t\t \r\n\t\t\t\t\t\tpst=con.prepareStatement(query);\r\n\t\t\t\t\t\tpst.setString(1, name);\r\n\t\t\t\t\t\tpst.setString(2, companyName);\r\n\t\t\t\t\t\tpst.setString(3, phoneNo1);\r\n\t\t\t\t\t\tpst.setString(4, phoneNo2);\r\n\t\t\t\t\t\tpst.setString(5, addresss);\r\n\t\t\t\t\t\tpst.setInt(6,id);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tpst.executeUpdate();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t parent.UpdateCustomerslist();\r\n\t\t\t\t\t\t frame.dispose();\r\n\t\t\t\t\t}catch(NumberFormatException nfe){\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"please insert the info correctly\");\r\n\t\t\t\t\t} catch (SQLException 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\t}\r\n\t\t\t \r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnAdd.setBounds(298, 171, 89, 23);\r\n\t\tframe.getContentPane().add(btnAdd);\r\n\t}", "public static void resetGuiData()\n\t{\n\t\tpriorityCombo.select(0);\n\t\telectrodeCombo.select(0);\n\t\tcustomerList.removeAll();\n\t\tcustomerText.setText(\"\");\n\t\tcommentText.setText(\"\");\n\t\tsensorText.setText(\"\");\n\t\tmeasureText.setText(\"\");\n\t\tmeasurTaskText.setText(\"\");\n\t\tsensorTaskText.setText(\"\");\n\n\t}", "private void blank() {\n tgl_pengobatanField.setText(null);\n waktu_pengobatanField.setText(null);\n keluhan_pasienField.setText(null);\n hasil_diagnosaField.setText(null);\n biayaField.setText(null);\n }", "public void clear() {\n\t\tdestName.setText(\"\");\n\t\tedtTextZip.setText(\"\");\n\t\tedtTextMemos.setText(\"\");\n\t\tedtTextStreetAdress.setText(\"\");\n\t\tedtTextCity.setText(\"\");\n\t}", "private void displayContactDetails() {\n bindTextViews();\n populateTextViews();\n }", "public CustomerScreen() {\n initComponents();\n \n accNumField.addKeyListener(new KeyAdapter() {\n public void keyPressed(KeyEvent ke) {\n String value = accNumField.getText();\n int l = value.length();\n continueBtn.setEnabled(true);\n if (ke.getKeyChar() >= '0' && ke.getKeyChar() <= '9') {\n accNumField.setEditable(true);\n label.setText(\"\");\n } else {\n accNumField.setEditable(true);\n label.setText(\"* Enter only numeric digits (0-9) !\");\n continueBtn.setEnabled(false);\n }\n }\n });\n \n \n \n }", "private void clearFields() {\r\n\t\tmCardNoValue1.setText(\"\");\r\n\t\tmCardNoValue1.setHint(\"-\");\r\n\t\tmCardNoValue2.setText(\"\");\r\n\t\tmCardNoValue2.setHint(\"-\");\r\n\t\tmCardNoValue3.setText(\"\");\r\n\t\tmCardNoValue3.setHint(\"-\");\r\n\t\tmCardNoValue4.setText(\"\");\r\n\t\tmCardNoValue4.setHint(\"-\");\r\n\t\tmZipCodeValue.setText(\"\");\r\n\t\tmZipCodeValue.setHint(\"Zipcode\");\r\n\t\tmCVVNoValue.setText(\"\");\r\n\t\tmCVVNoValue.setHint(\"CVV\");\r\n\t}", "public void text_clear()\n {\n C_ID.setText(\"\");\n C_Name.setText(\"\");\n C_NIC.setText(\"\");\n C_P_Id.setText(\"\");\n C_P_Name.setText(\"\");\n C_Address.setText(\"\");\n C_TelNo.setText(\"\");\n C_Age.setText(\"\");\n }", "public void clearFields()\r\n {\r\n\t txtID.setText(\"\");\r\n\t txtName.setText(\"\");\r\n\t txtYear.setText(\"\");\r\n\t txtMonth.setText(\"\");\r\n\t txtPDate.setText(\"\");\r\n txtFees.setText(\"0\");\r\n }", "public void limpiarCampos()\n {\n jtfNumero.setText(\"\");\n jtfNombre.setText(\"\");\n jtfSaldo.setText(\"\");\n this.jbEliminar.setEnabled(false);\n }", "public void clearFields()\n {\n txtDate.setText(\"\");\n txtIC.setText(\"\");\n txtBrand.setText(\"\");\n txtSerial.setText(\"\");\n txtCPT.setText(\"\");\n txtRMB.setText(\"\");\n txtRTYP.setText(\"\");\n txtCap.setText(\"\");\n txtSpeed.setText(\"\");\n txtWar.setText(\"\");\n txtRemarks.setText(\"\");\n }", "private void setFieldsEmpty(){\n nameInput.setText(\"\");\n frontTrackInput.setText(\"\");\n cornerWeightFLInput.setText(\"\");\n cornerWeightRLInput.setText(\"\");\n rearTrackInput.setText(\"\");\n cornerWeightRRInput.setText(\"\");\n cornerWeightFRInput.setText(\"\");\n cogInput.setText(\"\");\n frontRollDistInput.setText(\"\");\n wheelBaseInput.setText(\"\");\n }", "public NewCustomerGUI() {\n initComponents();\n }", "private void clearFields() {\r\n jTextFieldID.setText(\"\");\r\n jTextFieldNome.setText(\"\");\r\n jTextFieldPreco.setText(\"\");\r\n jTextFieldDescricao.setText(\"\");\r\n }", "private void empty_field() {\n tf_id_kategori.setText(null);\n tf_nama_kategori.setText(null);\n tf_keterangan.setText(null);\n pencarian.setText(null);\n }", "public void clearTextFields()\n\t{\n\t\tfirstNameTextField.setText(\"\");\n\t\tlastNameTextField.setText(\"\");\n\t\troomNoTextField.setText(\"\");\n\t\tphoneTextField.setText(\"\");\n\t\tstudentIDTextField.setText(\"\");\n\t\tcreatePasswordTextField.setText(\"\");\n\t\tconfirmPasswordTextField.setText(\"\");\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jLabel2 = new javax.swing.JLabel();\n t2 = new javax.swing.JTextField();\n jLabel3 = new javax.swing.JLabel();\n jScrollPane1 = new javax.swing.JScrollPane();\n t3 = new javax.swing.JTextArea();\n jLabel4 = new javax.swing.JLabel();\n t4 = new javax.swing.JTextField();\n jLabel5 = new javax.swing.JLabel();\n t5 = new javax.swing.JTextField();\n btninsert = new javax.swing.JButton();\n btnclear = new javax.swing.JButton();\n jButton1 = new javax.swing.JButton();\n\n setResizable(true);\n\n jPanel1.setBackground(new java.awt.Color(192, 192, 192));\n jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, \"CUSTOMER DETAILS\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Aharoni\", 1, 18), new java.awt.Color(51, 0, 204))); // NOI18N\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jLabel2.setText(\"Customer Name\");\n\n jLabel3.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jLabel3.setText(\"Address\");\n\n t3.setColumns(20);\n t3.setRows(5);\n jScrollPane1.setViewportView(t3);\n\n jLabel4.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jLabel4.setText(\"Contact Number\");\n\n jLabel5.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jLabel5.setText(\"Email Id\");\n\n btninsert.setText(\"Submit\");\n btninsert.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btninsertActionPerformed(evt);\n }\n });\n\n btnclear.setText(\"Clear\");\n btnclear.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnclearActionPerformed(evt);\n }\n });\n\n jButton1.setText(\"Back\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(25, 25, 25)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(btninsert)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2)\n .addComponent(jLabel3)\n .addComponent(jLabel4)\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 103, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(20, 20, 20)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(t2)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 219, Short.MAX_VALUE)\n .addComponent(t4)\n .addComponent(t5)))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(99, 99, 99)\n .addComponent(btnclear)))))\n .addContainerGap(46, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jButton1)\n .addGap(71, 71, 71)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(t2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(18, 18, 18)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(47, 47, 47)\n .addComponent(jLabel3)))\n .addGap(40, 40, 40)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(t4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(43, 43, 43)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(t5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(35, 35, 35)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btninsert)\n .addComponent(btnclear))\n .addContainerGap(101, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 20, Short.MAX_VALUE))\n );\n\n pack();\n }", "public CustomerViewDetails() {\n initComponents();\n Toolkit tk = Toolkit.getDefaultToolkit();\n int x = (int) tk.getScreenSize().getWidth();\n int y = (int) tk.getScreenSize().getHeight();\n this.setSize(x, y);\n }", "private void hideMe() {\n\t\tthis.setVisible(false);\n\t\ttxtName.setText(\"\");\n\t\ttxtEmail.setText(\"\");\n\t\ttxtPhone.setText(\"\");\n\t}", "public customer_table() {\n initComponents();\n getContentPane().setBackground(Color.pink);\n Toolkit tk=Toolkit.getDefaultToolkit();\n int w=(int)tk.getScreenSize().getWidth();\n int h=(int)tk.getScreenSize().getHeight();\n this.setSize(w, h);\n String ss=\"SELECT *FROM `customer`\";\n Showtable(ss);\n a.setText(\"\"+Autoid());\n d.setText(\"@gmail.com\");\n e.setText(\"+880 \");\n \n }", "private void clearTextField() {\n txtOrder.setText(\"\");\n txtName.setText(\"\");\n txtWeight.setText(\"\");\n txtGallon.setText(\"\");\n txtPersent.setText(\"\");\n txtPrice.setText(\"\");\n \n }", "public void clearUpdateFields() {\n\tupdateCityTextField.setText(\"\");\n\tupdatePhoneTextField.setText(\"\");\n\tupdateStreetAddressTextField.setText(\"\");\n\tupdateAptTextField.setText(\"\");\n\tupdateStateTextField.setText(\"\");\n\tupdateCountryTextField.setText(\"\");\n\tupdatePostalCodeTextField.setText(\"\");\n\tupdateTerritorytextField.setText(\"\");\n\tofficeConsoleTextArea.append(\"*cleared text fields for update employee. \\n\");\n}", "private void initialize()\r\n\t{\r\n\t\tframe = new JFrame();\r\n\t\tframe.getContentPane().setFont(new Font(\"Tahoma\", Font.PLAIN, 18));\r\n\t\tframe.setBounds(100, 100, 1200, 733);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\r\n\t\tJLabel Enter = new JLabel(\"Enter the User Details\");\r\n\t\tEnter.setForeground(Color.WHITE);\r\n\t\tEnter.setBounds(398, 32, 392, 72);\r\n\t\tEnter.setFont(new Font(\"Bodoni MT Black\", Font.PLAIN, 32));\r\n\r\n\t\tJLabel lblName = new JLabel(\"First Name :\");\r\n\t\tlblName.setForeground(Color.WHITE);\r\n\t\tlblName.setFont(new Font(\"Tahoma\", Font.PLAIN, 20));\r\n\t\tlblName.setBounds(184, 179, 124, 25);\r\n\r\n\t\ttextField = new JTextField();\r\n\t\ttextField.setFont(new Font(\"Tahoma\", Font.PLAIN, 18));\r\n\t\ttextField.setBounds(347, 178, 171, 35);\r\n\t\ttextField.setColumns(10);\r\n\r\n\t\tJLabel lblAadharNo = new JLabel(\"Aadhar No :\");\r\n\t\tlblAadharNo.setForeground(Color.WHITE);\r\n\t\tlblAadharNo.setFont(new Font(\"Tahoma\", Font.PLAIN, 20));\r\n\t\tlblAadharNo.setBounds(604, 179, 116, 25);\r\n\r\n\t\ttextField_1 = new JTextField();\r\n\t\ttextField_1.setFont(new Font(\"Tahoma\", Font.PLAIN, 18));\r\n\t\ttextField_1.setBounds(740, 178, 296, 35);\r\n\t\ttextField_1.setColumns(10);\r\n\r\n\t\tJLabel lblAddress = new JLabel(\"Address :\");\r\n\t\tlblAddress.setForeground(Color.WHITE);\r\n\t\tlblAddress.setFont(new Font(\"Tahoma\", Font.PLAIN, 20));\r\n\t\tlblAddress.setBounds(604, 242, 94, 25);\r\n\r\n\t\ttextField_2 = new JTextField();\r\n\t\ttextField_2.setFont(new Font(\"Tahoma\", Font.PLAIN, 18));\r\n\t\ttextField_2.setBounds(740, 242, 296, 35);\r\n\t\ttextField_2.setColumns(10);\r\n\r\n\t\ttextField_3 = new JTextField();\r\n\t\ttextField_3.setFont(new Font(\"Tahoma\", Font.PLAIN, 18));\r\n\t\ttextField_3.setBounds(740, 304, 171, 35);\r\n\t\ttextField_3.setColumns(10);\r\n\r\n\t\tJLabel lblPhoneNo = new JLabel(\"Phone No:\");\r\n\t\tlblPhoneNo.setForeground(Color.WHITE);\r\n\t\tlblPhoneNo.setFont(new Font(\"Tahoma\", Font.PLAIN, 20));\r\n\t\tlblPhoneNo.setBounds(604, 309, 99, 25);\r\n\r\n\t\tJLabel label = new JLabel(\"\");\r\n\t\tlabel.setFont(new Font(\"Tahoma\", Font.PLAIN, 20));\r\n\t\tlabel.setBounds(398, 636, 392, 42);\r\n\t\tframe.getContentPane().add(label);\r\n\r\n\t\t\r\n\r\n\t\t\r\n\t\tJButton btnPrev = new JButton(\"prev\");\r\n\t\tbtnPrev.setBackground(new Color(255, 255, 102));\r\n\t\tbtnPrev.setIcon(null);\r\n\t\tbtnPrev.setFont(new Font(\"Tahoma\", Font.PLAIN, 20));\r\n\t\tbtnPrev.setBounds(0, 643, 106, 43);\r\n\t\tbtnPrev.addActionListener(new ActionListener()\r\n\t\t{\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) \r\n\t\t\t{\r\n\t\t\t\tUsers u=new Users();\r\n\t\t\t\tframe.setVisible(false);\r\n\t\t\t\tu.frame.setVisible(true);\r\n\t\t\t}\r\n\t\t});\r\n\t\tframe.getContentPane().setLayout(null);\r\n\t\tframe.getContentPane().add(Enter);\r\n\t\tframe.getContentPane().add(lblName);\r\n\t\tframe.getContentPane().add(textField);\r\n\t\tframe.getContentPane().add(lblAadharNo);\r\n\t\tframe.getContentPane().add(textField_1);\r\n\t\tframe.getContentPane().add(lblAddress);\r\n\t\tframe.getContentPane().add(textField_2);\r\n\t\tframe.getContentPane().add(textField_3);\r\n\t\tframe.getContentPane().add(lblPhoneNo);\r\n\r\n\t\tframe.getContentPane().add(btnPrev);\r\n\r\n\t\ttextField_4 = new JTextField();\r\n\t\ttextField_4.setFont(new Font(\"Tahoma\", Font.PLAIN, 18));\r\n\t\ttextField_4.setBounds(347, 241, 171, 35);\r\n\t\tframe.getContentPane().add(textField_4);\r\n\t\ttextField_4.setColumns(10);\r\n\r\n\t\tJLabel lblMiddleName = new JLabel(\"Middle Name:\");\r\n\t\tlblMiddleName.setForeground(Color.WHITE);\r\n\t\tlblMiddleName.setFont(new Font(\"Tahoma\", Font.PLAIN, 20));\r\n\t\tlblMiddleName.setBounds(184, 241, 129, 26);\r\n\t\tframe.getContentPane().add(lblMiddleName);\r\n\r\n\t\ttextField_5 = new JTextField();\r\n\t\ttextField_5.setFont(new Font(\"Tahoma\", Font.PLAIN, 18));\r\n\t\ttextField_5.setColumns(10);\r\n\t\ttextField_5.setBounds(347, 308, 171, 35);\r\n\t\tframe.getContentPane().add(textField_5);\r\n\t\t\r\n\t\tJLabel lblTestResult = new JLabel(\"Test Result :\");\r\n\t\tlblTestResult.setFont(new Font(\"Tahoma\", Font.PLAIN, 20));\r\n\t\tlblTestResult.setForeground(Color.WHITE);\r\n\t\tlblTestResult.setBounds(184, 376, 124, 35);\r\n\t\tframe.getContentPane().add(lblTestResult);\r\n\t\t\r\n\t\ttextField_6 = new JTextField();\r\n\t\ttextField_6.setFont(new Font(\"Tahoma\", Font.PLAIN, 18));\r\n\t\ttextField_6.setBounds(347, 376, 171, 35);\r\n\t\tframe.getContentPane().add(textField_6);\r\n\t\ttextField_6.setColumns(10);\r\n\r\n\t\tJLabel lblLastName = new JLabel(\"Last Name:\");\r\n\t\tlblLastName.setForeground(Color.WHITE);\r\n\t\tlblLastName.setFont(new Font(\"Tahoma\", Font.PLAIN, 20));\r\n\t\tlblLastName.setBounds(184, 308, 116, 26);\r\n\t\tframe.getContentPane().add(lblLastName);\r\n\t\t\r\n\t\tJButton btnSubmit = new JButton(\"Submit\");\r\n\t\tbtnSubmit.addActionListener(new ActionListener()\r\n\t\t{\r\n\t\t\tpublic void actionPerformed(ActionEvent e)\r\n\t\t\t{\r\n\r\n\t\t\t\tif (e.getSource() == btnSubmit)\r\n\t\t\t\t{\r\n\t\t\t\t\ttry\r\n\t\t\t { \r\n\t\t\t\t\t\t Class.forName(\"com.mysql.jdbc.Driver\"); \r\n\t\t\t\t Connection conn = null;\r\n\t\t\t\t conn = DriverManager.getConnection(\"jdbc:mysql://localhost/rto\",\"root\", \"\"); \r\n\t\t\t\t System.out.print(\"Database is connected !\");\r\n\t\t\t\t Statement stmt = conn.createStatement();\r\n\r\n\t\t\t\t String q1 = \"insert into users(FName,MName,LName,aadhar,address,phno) values('\" +textField.getText() + \r\n\t\t\t\t \"','\" + textField_4.getText()+ \"','\"+textField_5.getText()+\r\n\t\t\t\t \"',\"+textField_1.getText()+\",'\"+textField_2.getText()+\"',\"+textField_3.getText()+\")\";\r\n\t\t\t\t int a=stmt.executeUpdate(q1);\r\n\t\t\t\t label.setText(\"User Successfully Inserted.\");\r\n\t\t\t\t conn.close(); \r\n\t\t\t } \r\n\t\t\t catch(Exception ex) \r\n\t\t\t { \r\n\t\t\t System.out.println(ex); \r\n\t\t\t }\r\n\t\t\t }\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnSubmit.setFont(new Font(\"Tahoma\", Font.PLAIN, 20));\r\n\t\tbtnSubmit.setBounds(460, 480, 129, 42);\r\n\r\n\t\tframe.getContentPane().add(btnSubmit);\r\n\t\t\r\n\t\tJButton btnUpdate = new JButton(\"Update\");\r\n\t\tbtnUpdate.addActionListener(new ActionListener()\r\n\t\t{\r\n\t\t\tpublic void actionPerformed(ActionEvent e)\r\n\t\t\t{\r\n\r\n\t\t\t\tif (e.getSource() == btnUpdate)\r\n\t\t\t\t{\r\n\t\t\t\t\ttry\r\n\t\t\t { \r\n\t\t\t\t\t\t Class.forName(\"com.mysql.jdbc.Driver\"); \r\n\t\t\t\t Connection conn = null;\r\n\t\t\t\t conn = DriverManager.getConnection(\"jdbc:mysql://localhost/rto\",\"root\", \"\"); \r\n\t\t\t\t System.out.print(\"Database is connected !\");\r\n\t\t\t\t Statement stmt = conn.createStatement();\r\n\r\n\t\t\t\t String q1 = \"update users set D_Test='\" +textField_6.getText() + \"' where aadhar=\"+textField_1.getText();\r\n\t\t\t\t int a=stmt.executeUpdate(q1);\r\n\t\t\t\t label.setText(\"User Successfully Inserted.\");\r\n\t\t\t\t conn.close(); \r\n\t\t\t } \r\n\t\t\t catch(Exception ex) \r\n\t\t\t { \r\n\t\t\t System.out.println(ex); \r\n\t\t\t }\r\n\t\t\t }\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnUpdate.setFont(new Font(\"Tahoma\", Font.PLAIN, 20));\r\n\t\tbtnUpdate.setBounds(613, 480, 129, 42);\r\n\r\n\t\tframe.getContentPane().add(btnUpdate);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tJLabel lblNewLabel = new JLabel(\"New label\");\r\n\t\tlblNewLabel.setFont(new Font(\"Tahoma\", Font.BOLD, 11));\r\n\t\tlblNewLabel.setIcon(new ImageIcon(\"C:\\\\Users\\\\LC\\\\eclipse-workspace\\\\RTOproject\\\\images\\\\pic8alter - Copy.png\"));\r\n\t\tlblNewLabel.setBounds(0, 11, 1182, 686);\r\n\t\tframe.getContentPane().add(lblNewLabel);\r\n\t\t\r\n\t\t\r\n\r\n\r\n\t}", "private void clear() {\n\t\tmRegister.setText(\"\");\n\t\tmName.setText(\"\");\n\t\tmUsername.setText(\"\");\n\t\tmPassword.setText(\"\");\n\t\tmPhone.setText(\"\");\n\t\tmEmail.setText(\"\");\n\t}", "private void initialize() {\r\n\t\tfrmClient = new JFrame();\r\n\t\tfrmClient.addWindowListener(new WindowAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void windowOpened(WindowEvent arg0) {\r\n\t\t\t\tautoFillInUsername();\r\n\t\t\t}\r\n\t\t\t@Override\r\n\t\t\tpublic void windowClosing(WindowEvent arg0) {\r\n\t\t\t\thReq.close();\r\n\t\t\t}\r\n\t\t});\r\n\t\tfrmClient.setResizable(false);\r\n\t\tfrmClient.setForeground(SystemColor.window);\r\n\t\tfrmClient.setTitle(\"Client\");\r\n\t\tfrmClient.setBackground(SystemColor.window);\r\n\t\tfrmClient.setBounds(100, 100, 528, 364);\r\n\t\tfrmClient.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\t\r\n\t\tpanel = new JPanel();\r\n\t\tpanel.setBackground(SystemColor.window);\r\n\t\tfrmClient.getContentPane().add(panel, BorderLayout.CENTER);\r\n\t\tpanel.setLayout(null);\r\n\t\t\r\n\t\tgNameTextField = new JTextField();\r\n\t\tgNameTextField.setEditable(false);\r\n\t\tgNameTextField.setBounds(154, 11, 261, 20);\r\n\t\tpanel.add(gNameTextField);\r\n\t\tgNameTextField.setColumns(10);\r\n\t\t\r\n\t\tlblGivenname = new JLabel(\"Givenname\");\r\n\t\tlblGivenname.setBounds(36, 14, 67, 14);\r\n\t\tpanel.add(lblGivenname);\r\n\t\t\r\n\t\tlblSurname = new JLabel(\"Surname\");\r\n\t\tlblSurname.setBounds(36, 45, 67, 14);\r\n\t\tpanel.add(lblSurname);\r\n\t\t\r\n\t\tsNameTextField = new JTextField();\r\n\t\tsNameTextField.setEditable(false);\r\n\t\tsNameTextField.setBounds(154, 42, 261, 20);\r\n\t\tpanel.add(sNameTextField);\r\n\t\tsNameTextField.setColumns(10);\r\n\t\t\r\n\t\tuserInfos = new JTextArea();\r\n\t\tuserInfos.setFont(new Font(\"Monospaced\", Font.PLAIN, 10));\r\n\t\tuserInfos.setText(\"############# Infos will be displayed here ################\");\r\n\t\tuserInfos.setForeground(Color.WHITE);\r\n\t\tuserInfos.setToolTipText(\"\");\r\n\t\tuserInfos.setBackground(SystemColor.desktop);\r\n\t\tuserInfos.setEditable(false);\r\n\t\tuserInfos.setLineWrap(true);\t\t\r\n\t\tJScrollPane scroll = new JScrollPane (userInfos);\r\n\t\tscroll.setBounds(10, 212, 500, 112);\r\n\t\tpanel.add(scroll);\r\n\t\t\r\n\t\tlabel = new JLabel(\"E-Mail-Address\");\r\n\t\tlabel.setBounds(36, 76, 119, 14);\r\n\t\tpanel.add(label);\r\n\t\t\r\n\t\teMailTextField = new JTextField();\r\n\t\teMailTextField.setColumns(10);\r\n\t\teMailTextField.setBounds(154, 73, 261, 20);\r\n\t\tpanel.add(eMailTextField);\r\n\t\t\r\n\t\tbtnSubmitCertificateSigning = new JButton(\"Submit Certificate Signing Request\");\r\n\t\tbtnSubmitCertificateSigning.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\r\n\t\t\t\tcreateCertificateSigningRequest();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnSubmitCertificateSigning.setBackground(Color.WHITE);\r\n\t\tbtnSubmitCertificateSigning.setBounds(154, 101, 261, 23);\r\n\t\tpanel.add(btnSubmitCertificateSigning);\r\n\t\t\r\n\t\tlblTokenFromMail = new JLabel(\"Token from Mail\");\r\n\t\tlblTokenFromMail.setBounds(36, 153, 119, 14);\r\n\t\tpanel.add(lblTokenFromMail);\r\n\t\t\r\n\t\ttokenTextField = new JTextField();\r\n\t\ttokenTextField.setEditable(false);\r\n\t\ttokenTextField.setToolTipText(\"Format = XXXX-XXXX-XXXX-XXXX\");\r\n\t\ttokenTextField.setColumns(10);\r\n\t\ttokenTextField.setBounds(154, 150, 261, 20);\r\n\t\tpanel.add(tokenTextField);\r\n\t\t\r\n\t\tbtnSubmitToken = new JButton(\"Submit Token\");\r\n\t\tbtnSubmitToken.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\r\n\t\t\t\tsendTokenToService();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnSubmitToken.setEnabled(false);\r\n\t\tbtnSubmitToken.setBackground(Color.WHITE);\r\n\t\tbtnSubmitToken.setBounds(154, 178, 261, 23);\r\n\t\tpanel.add(btnSubmitToken);\r\n\t\t\r\n\t}", "public Customer_Edit() {\n initComponents();\n getMenu_Catagory();\n getMenu();\n showmenu_table();\n getPromotion();\n getPromotion_Menu();\n showpromotion_table();\n getIngredient();\n getStock();\n if(c.getmaintenance()==true){\n t.setid(\"01\");\n }else{\n }\n getorder();\n getorder_menu();\n table_number_txt.setText(t.getid());\n showorder_table();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n txtCustomerID = new javax.swing.JTextField();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n btnBack = new javax.swing.JButton();\n jLabel4 = new javax.swing.JLabel();\n btnCreate = new javax.swing.JButton();\n txtCustomerName = new javax.swing.JTextField();\n txtAddress = new javax.swing.JTextField();\n jLabel5 = new javax.swing.JLabel();\n txtContact = new javax.swing.JTextField();\n comboMarket = new javax.swing.JComboBox();\n jLabel6 = new javax.swing.JLabel();\n\n txtCustomerID.setEnabled(false);\n txtCustomerID.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtCustomerIDActionPerformed(evt);\n }\n });\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n jLabel1.setText(\"Customer Name:\");\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n jLabel2.setText(\"Customer ID:\");\n\n jLabel3.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n jLabel3.setText(\"Address:\");\n\n btnBack.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n btnBack.setText(\"<< Back\");\n btnBack.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnBackActionPerformed(evt);\n }\n });\n\n jLabel4.setFont(new java.awt.Font(\"Tahoma\", 1, 24)); // NOI18N\n jLabel4.setText(\"Create New Customer\");\n\n btnCreate.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n btnCreate.setText(\"Create\");\n btnCreate.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnCreateActionPerformed(evt);\n }\n });\n\n jLabel5.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n jLabel5.setText(\"Contact:\");\n\n txtContact.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n txtContactKeyTyped(evt);\n }\n });\n\n comboMarket.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Higher Education Market\", \"Finance Service Market\" }));\n\n jLabel6.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n jLabel6.setText(\"Market:\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(95, 95, 95)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(btnCreate)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(btnBack)\n .addGap(149, 149, 149)\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 267, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(192, 192, 192)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel1)\n .addComponent(jLabel2)\n .addComponent(jLabel6)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel5)\n .addComponent(jLabel3)))\n .addGap(23, 23, 23)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(txtCustomerID)\n .addComponent(txtCustomerName)\n .addComponent(txtAddress, javax.swing.GroupLayout.DEFAULT_SIZE, 204, Short.MAX_VALUE)\n .addComponent(txtContact, javax.swing.GroupLayout.Alignment.TRAILING))))\n .addComponent(comboMarket, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(241, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(47, 47, 47)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnBack))\n .addGap(48, 48, 48)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtCustomerID, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2))\n .addGap(38, 38, 38)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtCustomerName, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel1))\n .addGap(30, 30, 30)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(txtAddress, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(31, 31, 31)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(txtContact, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(39, 39, 39)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(comboMarket, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel6))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 69, Short.MAX_VALUE)\n .addComponent(btnCreate, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(34, 34, 34))\n );\n }", "@Override\n\tpublic void clearForm() {\n\n\t\ttxtStockCenterName.setText(\"\");\n\t\trdBtnPreferredNo.setSelection(true);\n\t\trdBtnPreferredYes.setSelection(false);\n\n\t\t// clear the text fields\n\t\ttxtPharmacyName.setText(\"\");\n\t\ttxtStreetAdd.setText(\"\");\n\t\ttxtCity.setText(\"\");\n\t\ttxtTel.setText(\"\");\n\t\ttxtPharmacistName1.setText(\"\");\n\t\ttxtPharmacyAssistant.setText(\"\");\n\t\tlblCanvasPharmName.setText(\"Facility Name\");\n\t\tlblCanvasPharmacist.setText(\"Pharmacist\");\n\t\tlblCanvasAddress.setText(\"Physical Address\");\n\n\t\tfieldsChanged = false;\n\t\tenableFields();\n\n\t}", "public CustomerSummary() {\n initComponents();\n }", "void txtClear () {\r\n\r\n\t\ttxtNo.setText (\"\");\r\n\t\ttxtName.setText (\"\");\r\n\t\ttxtDeposit.setText (\"\");\r\n\t\ttxtNo.requestFocus ();\r\n\r\n\t}", "public AddCustomer() {\n initComponents();\n loadAllToTable();\n\n tblCustomers.getSelectionModel().addListSelectionListener(new ListSelectionListener() {\n\n @Override\n public void valueChanged(ListSelectionEvent e) {\n if (tblCustomers.getSelectedRow() == -1) {\n return;\n }\n\n String cusId = tblCustomers.getValueAt(tblCustomers.getSelectedRow(), 0).toString();\n\n String cusName = tblCustomers.getValueAt(tblCustomers.getSelectedRow(), 1).toString();\n String contact = tblCustomers.getValueAt(tblCustomers.getSelectedRow(), 2).toString();\n String creditLimi = tblCustomers.getValueAt(tblCustomers.getSelectedRow(), 3).toString();\n String credidays = tblCustomers.getValueAt(tblCustomers.getSelectedRow(), 4).toString();\n\n txtCustId.setText(cusId);\n txtCustomerN.setText(cusName);\n\n txtContact.setText(contact);\n txtCreditLimit.setText(creditLimi);\n txtCreditDays.setText(credidays);\n\n }\n });\n }", "private void clearFields() {\n orderNo.clear();\n orderNo.setPromptText(\"9XXXXXX\");\n if (rbProductType.isEmpty()) {\n rbListAddElement();\n }\n for (int i = 0; i < rbProductType.size(); i++) {\n rbProductType.get(i).setSelected(false);\n }\n if (cbWorker.isEmpty()) {\n cbListAddElement();\n }\n for (int i = 0; i < cbWorker.size(); i++) {\n cbWorker.get(i).setSelected(false);\n }\n UserDAO userDAO = new UserDAO();\n User user = userDAO.getUser(logname.getText());\n for (int i = 0; i < cbWorker.size(); i++) {\n if(cbWorker.get(i).getText().equals(user.getNameSurname())) {\n cbWorker.get(i).setSelected(true);\n } else {\n cbWorker.get(i).setSelected(false);\n }\n }\n plannedTime.clear();\n actualTime.clear();\n comboStatus.valueProperty().set(null);\n }", "public void customerInfo(){\n customerPhone.setLayoutX(305);\n customerPhone.setLayoutY(100);\n customerPhone.setPrefWidth(480);\n customerPhone.setPrefHeight(50);\n customerPhone.setStyle(\"-fx-focus-color: -fx-control-inner-background ; -fx-faint-focus-color: -fx-control-inner-background ; -fx-background-color: #eaebff; -fx-prompt-text-fill: gray\");\n customerPhone.setPromptText(\"Enter customer phone number\");\n customerPhone.setFocusTraversable(false);\n customerPhone.setTooltip(new Tooltip(\"Enter customer phone number\"));\n customerPhone.setAlignment(Pos.CENTER);\n\n\n customerPhone.textProperty().addListener(new ChangeListener<String>() {\n @Override\n public void changed(ObservableValue<? extends String> observable, String oldValue,\n String newValue) {\n if (!newValue.matches(\"\\\\d*\")) {\n customerPhone.setText(newValue.replaceAll(\"[^\\\\d]\", \"\"));\n }\n }\n });\n\n newCustomer = new RadioButton(\"New Customer\");\n newCustomer.setToggleGroup(radiobuttonGroup);\n newCustomer.setSelected(true);\n newCustomer.setLayoutX(810);\n newCustomer.setLayoutY(100);\n existingCustomer = new RadioButton(\"Existing Customer\");\n existingCustomer.setToggleGroup(radiobuttonGroup);\n existingCustomer.setLayoutX(810);\n existingCustomer.setLayoutY(125);\n\n customerName = new TextField();\n customerName.setLayoutX(305);\n customerName.setLayoutY(640);\n customerName.setPrefWidth(480);\n customerName.setPrefHeight(50);\n customerName.setStyle(\"-fx-focus-color: -fx-control-inner-background ; -fx-faint-focus-color: -fx-control-inner-background ; -fx-background-color: #eaebff; -fx-prompt-text-fill: gray\");\n customerName.setPromptText(\"Enter customer name\");\n customerName.setFocusTraversable(false);\n customerName.setTooltip(new Tooltip(\"Enter customer name\"));\n customerName.setAlignment(Pos.CENTER);\n\n\n root.getChildren().addAll(customerPhone, newCustomer, existingCustomer, customerName);\n }", "protected void init() {\n\t\tview.userName.setText(\"\");\n\t\tview.password.setText(\"\");\n\n\t}", "private void emptySearchFields() {\n view.setMinPrice(-1);\n view.setMaxPrice(-1);\n view.setMinSQM(-1);\n view.setMaxSQM(-1);\n view.setBedrooms(-1);\n view.setBathrooms(-1);\n view.setFloor(-1);\n view.setHeating(false); //Is supposed to be a checkbox so even unchecked it is false not empty\n view.setLocation(\"Athens\"); //Is supposed to get a string from a dropdown so it wil never be empty\n }", "public void showCustomerOrders() {\n\t\ttextArea.setText(\"\");\n\t\tfor (int i = 0; i < driver.getOrderDB().getCustomerOrderList().size(); i++) {\n\t\t\tOrder order = (driver.getOrderDB().getCustomerOrderList().get(i));\n\t\t\ttextArea.append(\"Order \" + order.getId() + \" was created by \"\n\t\t\t\t\t+ order.getCurrentlyLoggedInStaff().getName() + \"\\nCustomer ID : \"\n\t\t\t\t\t+ ((Customer) order.getPerson()).getId() + \"\\nItems in this order :\");\n\t\t\tfor (int j = 0; j < order.getOrderEntryList().size(); j++) {\n\t\t\t\tStockItem stockItem = order.getOrderEntryList().get(j);\n\t\t\t\ttextArea.append(\"\\n \" + stockItem.getQuantity() + \" \"\n\t\t\t\t\t\t+ stockItem.getProduct().getProductName() + \" \"\n\t\t\t\t\t\t+ (stockItem.getProduct().getRetailPrice() * stockItem.getQuantity()));\n\t\t\t}\n\t\t\ttextArea.append(\"\\nThe total order value is \" + order.getGrandTotalOfOrder() + \"\\n\\n\\n\");\n\t\t}\n\t}", "public void LimpiarCampos() {\n\n txtIdAsignarPer.setText(\"\");\n txtNombreusu.setText(\"\");\n pswConfCont.setText(\"\");\n combPerf.setSelectedItem(\"\");\n pswContra.setText(\"\");\n txtDocumento.setText(\"\");\n }", "private void limpaCampos() {\n txtNome.setText(\"\");\n txtRG.setText(\"\");\n txtFCpf.setText(\"\");\n txtFNascimento.setText(\"\");\n txtEmail.setText(\"\");\n txtFCelular.setText(\"\");\n txtFTelefone.setText(\"\");\n txtRua.setText(\"\");\n txtComplemento.setText(\"\");\n txtFCep.setText(\"\");\n txtBairro.setText(\"\");\n txtCidade.setText(\"\");\n }", "@SuppressWarnings(\"unchecked\")\n /**\n * Method: clearAll\n * Clear and set JTextFields visible\n * @parem void\n * @return void\n * pre-condition: JTextFields with certain information\n * post-condition: empty JTextFields\n */ \n private void clearAll()\n {\n //Clear and set JTextFields visible\n listModel.clear();\n employeeJComboBox.setSelectedIndex(0);\n enablePrint(false);\n }", "private void initialize()\n\t{\n\n\t\tfrmCustomers = new JFrame();\n\t\tfrmCustomers.setResizable(false);\n\t\tfrmCustomers.setTitle(\"Guitar Builder - Customers\");\n\t\tfrmCustomers.setBounds(100, 100, 499, 354);\n\t\tfrmCustomers.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tfrmCustomers.getContentPane().setLayout(new GridLayout(0, 1, 0, 0));\n\t\tDimension dim = Toolkit.getDefaultToolkit().getScreenSize();\n\t\tfrmCustomers.setLocation(\n\t\t\t\tdim.width / 2 - frmCustomers.getSize().width / 2,\n\t\t\t\tdim.height / 2 - frmCustomers.getSize().height / 2); // launches window in center of the screen.\n\n\t\tJTabbedPane tabbedPane = new JTabbedPane(SwingConstants.TOP); // creates a tabbed pane\n\t\tfrmCustomers.getContentPane().add(tabbedPane);\n\n\t\t// -----------------------------------------------------------------------------------\n\t\t// ---------------------------------CREATE CUSTOMER-----------------------------------\n\t\t// -----------------------------------------------------------------------------------\n\n\t\tJPanel pnlCreateCustomer = new JPanel();\n\t\ttabbedPane.addTab(\"Create Customer\", null, pnlCreateCustomer, null);\n\t\tpnlCreateCustomer.setLayout(null);\n\n\t\t// labels on create customer tab\n\t\tJLabel lblCustomerID = new JLabel(\"Enter Customer ID:\");\n\t\tlblCustomerID.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblCustomerID.setBounds(10, 11, 126, 14);\n\t\tpnlCreateCustomer.add(lblCustomerID);\n\n\t\tJLabel lblFirstName = new JLabel(\"First Name:\");\n\t\tlblFirstName.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblFirstName.setBounds(10, 36, 126, 14);\n\t\tpnlCreateCustomer.add(lblFirstName);\n\n\t\tJLabel lblLastName = new JLabel(\"Last Name:\");\n\t\tlblLastName.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblLastName.setBounds(10, 62, 126, 14);\n\t\tpnlCreateCustomer.add(lblLastName);\n\n\t\tJLabel lblPhoneNumber = new JLabel(\"Phone Number:\");\n\t\tlblPhoneNumber.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblPhoneNumber.setBounds(10, 87, 126, 14);\n\t\tpnlCreateCustomer.add(lblPhoneNumber);\n\n\t\tJLabel lblEmail = new JLabel(\"Email:\");\n\t\tlblEmail.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblEmail.setBounds(10, 112, 126, 14);\n\t\tpnlCreateCustomer.add(lblEmail);\n\n\t\tJLabel lblAddress = new JLabel(\"Address:\");\n\t\tlblAddress.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblAddress.setBounds(10, 137, 126, 14);\n\t\tpnlCreateCustomer.add(lblAddress);\n\n\t\tJLabel lblReturnCustomer = new JLabel(\"Return Customer:\");\n\t\tlblReturnCustomer.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblReturnCustomer.setBounds(10, 162, 126, 14);\n\t\tpnlCreateCustomer.add(lblReturnCustomer);\n\n\t\t// input objects on create customer tab\n\t\ttxtCustomerID = new JTextField(\"\");\n\t\ttxtCustomerID.setToolTipText(\n\t\t\t\t\"Enter a customer ID that is 5 digits or less.\");\n\t\ttxtCustomerID.setBounds(146, 10, 332, 20);\n\t\tpnlCreateCustomer.add(txtCustomerID);\n\t\ttxtCustomerID.setColumns(10);\n\n\t\ttxtFirstName = new JTextField(\"\");\n\t\ttxtFirstName.setToolTipText(\"Enter a First Name\");\n\t\ttxtFirstName.setBounds(146, 35, 332, 20);\n\t\tpnlCreateCustomer.add(txtFirstName);\n\t\ttxtFirstName.setColumns(10);\n\n\t\ttxtLastName = new JTextField(\"\");\n\t\ttxtLastName.setToolTipText(\"Enter a Last Name\");\n\t\ttxtLastName.setColumns(10);\n\t\ttxtLastName.setBounds(146, 61, 332, 20);\n\t\tpnlCreateCustomer.add(txtLastName);\n\n\t\ttxtPhoneNumber = new JTextField(\"\");\n\t\ttxtPhoneNumber.setToolTipText(\"Enter a Phone Number\");\n\t\ttxtPhoneNumber.setColumns(10);\n\t\ttxtPhoneNumber.setBounds(146, 86, 332, 20);\n\t\tpnlCreateCustomer.add(txtPhoneNumber);\n\n\t\ttxtEmail = new JTextField(\"\");\n\t\ttxtEmail.setToolTipText(\"Enter an Email Address\");\n\t\ttxtEmail.setColumns(10);\n\t\ttxtEmail.setBounds(146, 111, 332, 20);\n\t\tpnlCreateCustomer.add(txtEmail);\n\n\t\ttxtAddress = new JTextField(\"\");\n\t\ttxtAddress.setToolTipText(\"Enter an Adress\");\n\t\ttxtAddress.setColumns(10);\n\t\ttxtAddress.setBounds(146, 136, 332, 20);\n\t\tpnlCreateCustomer.add(txtAddress);\n\n\t\tJRadioButton rdbtnNo = new JRadioButton(\"No\");\n\t\treturnCustomerButtonGroup.add(rdbtnNo);\n\t\trdbtnNo.setSelected(true);\n\t\trdbtnNo.setBounds(146, 160, 45, 23);\n\t\tpnlCreateCustomer.add(rdbtnNo);\n\n\t\tJRadioButton rdbtnYes = new JRadioButton(\"Yes\");\n\t\treturnCustomerButtonGroup.add(rdbtnYes);\n\t\trdbtnYes.setBounds(193, 160, 53, 23);\n\t\tpnlCreateCustomer.add(rdbtnYes);\n\n\t\t// stores information in database\n\t\tJButton btnCreateCustomer = new JButton(\"Create Customer\");\n\t\tbtnCreateCustomer.addActionListener(new ActionListener()\n\t\t{\n\t\t\t// event handler for create customer button\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tint ID = 0;\n\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tID = Integer.parseInt(txtCustomerID.getText());\n\t\t\t\t}\n\t\t\t\tcatch(NumberFormatException e1) // ensures ID is integer\n\t\t\t\t{\n\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\"ID must consist of only numbers\", \"Error\",\n\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE, null);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Gather user input\n\t\t\t\tString first = txtFirstName.getText();\n\t\t\t\tString last = txtLastName.getText();\n\t\t\t\tString phone = txtPhoneNumber.getText();\n\t\t\t\tString address = txtAddress.getText();\n\t\t\t\tString email = txtEmail.getText();\n\n\t\t\t\tif(first.isEmpty())\n\t\t\t\t{\n\t\t\t\t\tfirst = \"N/A\";\n\t\t\t\t}\n\t\t\t\tif(last.isEmpty())\n\t\t\t\t{\n\t\t\t\t\tlast = \"N/A\";\n\t\t\t\t}\n\t\t\t\tif(phone.isEmpty())\n\t\t\t\t{\n\t\t\t\t\tphone = \"N/A\";\n\t\t\t\t}\n\t\t\t\tif(address.isEmpty())\n\t\t\t\t{\n\t\t\t\t\taddress = \"N/A\";\n\t\t\t\t}\n\t\t\t\tif(email.isEmpty())\n\t\t\t\t{\n\t\t\t\t\temail = \"N/A\";\n\t\t\t\t}\n\n\t\t\t\tchar returnCustomer;\n\n\t\t\t\tif(rdbtnYes.isSelected())\n\t\t\t\t\treturnCustomer = 'Y';\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturnCustomer = 'N';\n\t\t\t\t}\n\n\t\t\t\t// confirmation dialog\n\t\t\t\tint choice = JOptionPane.showConfirmDialog(null,\n\t\t\t\t\t\t\"Is The Following Information Correct?\" + \"\\nID: \" + ID\n\t\t\t\t\t\t\t\t+ \"\\nFirst Name: \" + first + \"\\nLast Name: \"\n\t\t\t\t\t\t\t\t+ last + \"\\nPhone Number: \" + phone\n\t\t\t\t\t\t\t\t+ \"\\nAddress: \" + address + \"\\nEmail: \" + email\n\t\t\t\t\t\t\t\t+ \"\\nReturn Customer: \" + returnCustomer,\n\t\t\t\t\t\t\"Confirmation\", JOptionPane.YES_NO_OPTION);\n\n\t\t\t\t// if information confirmed, commits data to database.\n\t\t\t\tif(choice == 0)\n\t\t\t\t{\n\n\t\t\t\t\t// creates customer object\n\t\t\t\t\tCustomer create = new Customer(ID, first, last, phone,\n\t\t\t\t\t\t\taddress, email, returnCustomer);\n\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tOracleJDBC.writeCustomer(create); // passes to method that writes customer to database\n\t\t\t\t\t}\n\t\t\t\t\tcatch(SQLException e1)\n\t\t\t\t\t{\n\n\t\t\t\t\t\tif(e1.getErrorCode() == 12899)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tString message = e1.getMessage();\n\n\t\t\t\t\t\t\tif(message.contains(\n\t\t\t\t\t\t\t\t\t\"ORA-12899: value too large for column \\\"DYLAN\\\".\\\"CUSTOMER\\\".\\\"FIRSTNAME\\\"\"))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\t\t\t\"First name is too Long, Max Length = 12\",\n\t\t\t\t\t\t\t\t\t\t\"Error\", JOptionPane.ERROR_MESSAGE,\n\t\t\t\t\t\t\t\t\t\tnull); // sql error that email is too long\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if(message.contains(\n\t\t\t\t\t\t\t\t\t\"ORA-12899: value too large for column \\\"DYLAN\\\".\\\"CUSTOMER\\\".\\\"LASTNAME\\\"\"))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\t\t\t\"Last name is too Long, Max Length = 50\",\n\t\t\t\t\t\t\t\t\t\t\"Error\", JOptionPane.ERROR_MESSAGE,\n\t\t\t\t\t\t\t\t\t\tnull); // sql error that email is too long\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if(message.contains(\n\t\t\t\t\t\t\t\t\t\"ORA-12899: value too large for column \\\"DYLAN\\\".\\\"CUSTOMER\\\".\\\"PHONE\\\"\"))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\t\t\t\"Phone number is too Long, Max Length = 14\",\n\t\t\t\t\t\t\t\t\t\t\"Error\", JOptionPane.ERROR_MESSAGE,\n\t\t\t\t\t\t\t\t\t\tnull); // sql error that email is too long\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if(message.contains(\n\t\t\t\t\t\t\t\t\t\"ORA-12899: value too large for column \\\"DYLAN\\\".\\\"CUSTOMER\\\".\\\"ADDRESS\\\"\"))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\t\t\t\"Address is too Long, Max Length = 50\",\n\t\t\t\t\t\t\t\t\t\t\"Error\", JOptionPane.ERROR_MESSAGE,\n\t\t\t\t\t\t\t\t\t\tnull); // sql error that email is too long\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if(message.contains(\n\t\t\t\t\t\t\t\t\t\"ORA-12899: value too large for column \\\"DYLAN\\\".\\\"CUSTOMER\\\".\\\"EMAIL\\\"\"))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\t\t\t\"EMAIL is too Long, Max Length = 50\",\n\t\t\t\t\t\t\t\t\t\t\"Error\", JOptionPane.ERROR_MESSAGE,\n\t\t\t\t\t\t\t\t\t\tnull); // sql error that email is too long\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\telse if(e1.getErrorCode() == 00001) // sql error for PK constraint violation\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\t\t\"Customer ID already in use\", \"Error\",\n\t\t\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE, null);\n\t\t\t\t\t\telse if(e1.getErrorCode() == 1438) // sql error for customer ID too long\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\t\t\"Customer ID to long, must be 5 digits or less\",\n\t\t\t\t\t\t\t\t\t\"Error\", JOptionPane.ERROR_MESSAGE, null);\n\t\t\t\t\t\telse // unaccounted for error (should not happen)\n\t\t\t\t\t\t\te1.printStackTrace();\n\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Customer Created\",\n\t\t\t\t\t\t\t\"Success\", JOptionPane.INFORMATION_MESSAGE, null);\n\n\t\t\t\t\t// clears form\n\t\t\t\t\tclearForm();\n\t\t\t\t\trdbtnNo.isSelected();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\treturn;\n\n\t\t\t}\n\t\t});\n\t\tbtnCreateCustomer.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\n\t\tbtnCreateCustomer.setBounds(10, 199, 226, 86);\n\t\tpnlCreateCustomer.add(btnCreateCustomer);\n\n\t\t// main menu button\n\t\tJButton btnMainMenu = new JButton(\"Main Menu\");\n\t\tbtnMainMenu.addActionListener(new ActionListener()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tGuitarBuilderMainMenu.createMainMenu(); // opens main menu screen\n\t\t\t\tfrmCustomers.dispose(); // closes current screen without exiting application\n\t\t\t}\n\t\t});\n\t\tbtnMainMenu.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\n\t\tbtnMainMenu.setBounds(252, 199, 226, 86);\n\t\tpnlCreateCustomer.add(btnMainMenu);\n\n\t\t// --------------------------------------------------------------------------------------------------\n\t\t// ---------------------------------------UPDATE CUSTOMER--------------------------------------------\n\t\t// --------------------------------------------------------------------------------------------------\n\n\t\tJPanel pnlUpdateCustomer = new JPanel();\n\t\ttabbedPane.addTab(\"Update Customer\", null, pnlUpdateCustomer, null);\n\t\tpnlUpdateCustomer.setLayout(null);\n\n\t\t// main menu button\n\t\tJButton btnUpdateMainMenu = new JButton(\"Main Menu\");\n\t\tbtnUpdateMainMenu.addActionListener(new ActionListener()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tGuitarBuilderMainMenu.createMainMenu(); // opens main menu screen\n\t\t\t\tfrmCustomers.dispose(); // closes current screen without exiting application\n\t\t\t}\n\t\t});\n\t\tbtnUpdateMainMenu.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\n\t\tbtnUpdateMainMenu.setBounds(252, 199, 226, 86);\n\t\tpnlUpdateCustomer.add(btnUpdateMainMenu);\n\n\t\tJRadioButton radUpdateNo = new JRadioButton(\"No\");\n\t\tradUpdateNo.setSelected(true);\n\t\tupdateReturnCustomerButtonGroup.add(radUpdateNo);\n\t\tradUpdateNo.setBounds(146, 160, 45, 23);\n\t\tpnlUpdateCustomer.add(radUpdateNo);\n\n\t\tJRadioButton radUpdateYes = new JRadioButton(\"Yes\");\n\t\tupdateReturnCustomerButtonGroup.add(radUpdateYes);\n\t\tradUpdateYes.setBounds(193, 160, 57, 23);\n\t\tpnlUpdateCustomer.add(radUpdateYes);\n\n\t\t// update customer button\n\t\tJButton btnUpdateCustomer = new JButton(\"Update Customer\");\n\t\tbtnUpdateCustomer.setEnabled(false);\n\t\tbtnUpdateCustomer.addActionListener(new ActionListener()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\n\t\t\t\t// Gather user input\n\t\t\t\tint ID = Integer.parseInt(txtUpdateID.getText());\n\t\t\t\tString first = txtUpdateFirstName.getText();\n\t\t\t\tString last = txtUpdateLastName.getText();\n\t\t\t\tString phone = txtUpdatePhoneNumber.getText();\n\t\t\t\tString address = txtUpdateAddress.getText();\n\t\t\t\tString email = txtUpdateEmail.getText();\n\t\t\t\tchar returnCustomer;\n\n\t\t\t\tif(first.isEmpty())\n\t\t\t\t{\n\t\t\t\t\tfirst = \"N/A\";\n\t\t\t\t}\n\t\t\t\tif(last.isEmpty())\n\t\t\t\t{\n\t\t\t\t\tlast = \"N/A\";\n\t\t\t\t}\n\t\t\t\tif(phone.isEmpty())\n\t\t\t\t{\n\t\t\t\t\tphone = \"N/A\";\n\t\t\t\t}\n\t\t\t\tif(address.isEmpty())\n\t\t\t\t{\n\t\t\t\t\taddress = \"N/A\";\n\t\t\t\t}\n\t\t\t\tif(email.isEmpty())\n\t\t\t\t{\n\t\t\t\t\temail = \"N/A\";\n\t\t\t\t}\n\n\t\t\t\tif(radUpdateYes.isSelected())\n\t\t\t\t\treturnCustomer = 'Y';\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturnCustomer = 'N';\n\t\t\t\t}\n\n\t\t\t\t// confirms information\n\t\t\t\tint choice = JOptionPane.showConfirmDialog(null,\n\t\t\t\t\t\t\"Is The Following Information Correct?\" + \"\\nID: \" + ID\n\t\t\t\t\t\t\t\t+ \"\\nFirst Name: \" + first + \"\\nLast Name: \"\n\t\t\t\t\t\t\t\t+ last + \"\\nPhone Number: \" + phone\n\t\t\t\t\t\t\t\t+ \"\\nAddress: \" + address + \"\\nEmail: \" + email\n\t\t\t\t\t\t\t\t+ \"\\nReturn Customer: \" + returnCustomer,\n\t\t\t\t\t\t\"Confirmation\", JOptionPane.YES_NO_OPTION);\n\t\t\t\tif(choice == 0)\n\t\t\t\t{\n\n\t\t\t\t\tCustomer update = new Customer(ID, first, last, phone,\n\t\t\t\t\t\t\taddress, email, returnCustomer);\n\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tOracleJDBC.updateCustomer(update);\n\t\t\t\t\t}\n\t\t\t\t\tcatch(SQLException e1)\n\t\t\t\t\t{\n\n\t\t\t\t\t\te1.printStackTrace();\n\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Customer Updated\",\n\t\t\t\t\t\t\t\"Success\", JOptionPane.INFORMATION_MESSAGE, null);\n\n\t\t\t\t\t// clears form\n\t\t\t\t\tclearForm();\n\t\t\t\t\trdbtnNo.isSelected();\n\t\t\t\t\tbtnUpdateCustomer.setEnabled(false);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\treturn;\n\t\t\t}\n\t\t});\n\t\tbtnUpdateCustomer.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\n\t\tbtnUpdateCustomer.setBounds(10, 199, 226, 86);\n\t\tpnlUpdateCustomer.add(btnUpdateCustomer);\n\n\t\t// update tab labels\n\t\tJLabel lblUpdateReturnCustomer = new JLabel(\"Return Customer:\");\n\t\tlblUpdateReturnCustomer.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblUpdateReturnCustomer.setBounds(10, 162, 126, 14);\n\t\tpnlUpdateCustomer.add(lblUpdateReturnCustomer);\n\n\t\tJLabel lblUpdateAddress = new JLabel(\"Address:\");\n\t\tlblUpdateAddress.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblUpdateAddress.setBounds(10, 137, 126, 14);\n\t\tpnlUpdateCustomer.add(lblUpdateAddress);\n\n\t\tJLabel lblUpdateEmail = new JLabel(\"Email:\");\n\t\tlblUpdateEmail.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblUpdateEmail.setBounds(10, 112, 126, 14);\n\t\tpnlUpdateCustomer.add(lblUpdateEmail);\n\n\t\tJLabel lblUpdatePhoneNumber = new JLabel(\"Phone Number:\");\n\t\tlblUpdatePhoneNumber.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblUpdatePhoneNumber.setBounds(10, 87, 126, 14);\n\t\tpnlUpdateCustomer.add(lblUpdatePhoneNumber);\n\n\t\tJLabel lblUpdateLastName = new JLabel(\"Last Name:\");\n\t\tlblUpdateLastName.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblUpdateLastName.setBounds(10, 62, 126, 14);\n\t\tpnlUpdateCustomer.add(lblUpdateLastName);\n\n\t\tJLabel lblUpdateFirstName = new JLabel(\"First Name:\");\n\t\tlblUpdateFirstName.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblUpdateFirstName.setBounds(10, 36, 126, 14);\n\t\tpnlUpdateCustomer.add(lblUpdateFirstName);\n\n\t\tJLabel lblEnterCustomerId = new JLabel(\"Enter Customer ID For Update:\");\n\t\tlblEnterCustomerId.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblEnterCustomerId.setBounds(10, 11, 204, 14);\n\t\tpnlUpdateCustomer.add(lblEnterCustomerId);\n\n\t\t// input objects for update\n\t\ttxtUpdateAddress = new JTextField();\n\t\ttxtUpdateAddress.setColumns(10);\n\t\ttxtUpdateAddress.setBounds(146, 136, 332, 20);\n\t\tpnlUpdateCustomer.add(txtUpdateAddress);\n\t\ttxtUpdateEmail = new JTextField();\n\t\ttxtUpdateEmail.setColumns(10);\n\t\ttxtUpdateEmail.setBounds(146, 111, 332, 20);\n\t\tpnlUpdateCustomer.add(txtUpdateEmail);\n\t\ttxtUpdatePhoneNumber = new JTextField();\n\t\ttxtUpdatePhoneNumber.setColumns(10);\n\t\ttxtUpdatePhoneNumber.setBounds(146, 86, 332, 20);\n\t\tpnlUpdateCustomer.add(txtUpdatePhoneNumber);\n\t\ttxtUpdateLastName = new JTextField();\n\t\ttxtUpdateLastName.setColumns(10);\n\t\ttxtUpdateLastName.setBounds(146, 61, 332, 20);\n\t\tpnlUpdateCustomer.add(txtUpdateLastName);\n\t\ttxtUpdateFirstName = new JTextField();\n\t\ttxtUpdateFirstName.setColumns(10);\n\t\ttxtUpdateFirstName.setBounds(146, 35, 332, 20);\n\t\tpnlUpdateCustomer.add(txtUpdateFirstName);\n\t\ttxtUpdateID = new JTextField();\n\t\ttxtUpdateID.setColumns(10);\n\t\ttxtUpdateID.setBounds(224, 10, 180, 20);\n\t\tpnlUpdateCustomer.add(txtUpdateID);\n\n\t\t// Brings current info into text fields for editing, and enables the update button\n\t\tJButton btnUpdateEnterID = new JButton(\"Enter\");\n\t\tbtnUpdateEnterID.addActionListener(new ActionListener()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tint ID = Integer.parseInt(txtUpdateID.getText());\n\t\t\t\tint returnID = 0;\n\t\t\t\tString first = null;\n\t\t\t\tString last = null;\n\t\t\t\tString phone = null;\n\t\t\t\tString address = null;\n\t\t\t\tString email = null;\n\t\t\t\tString returnCustomer = null;\n\n\t\t\t\t// gets current info\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\treturnID = OracleJDBC.readCustomerID(ID);\n\t\t\t\t\tfirst = OracleJDBC.readCustomerFirstName(ID);\n\t\t\t\t\tlast = OracleJDBC.readCustomerLastName(ID);\n\t\t\t\t\tphone = OracleJDBC.readCustomerPhoneNumber(ID);\n\t\t\t\t\taddress = OracleJDBC.readCustomerAddress(ID);\n\t\t\t\t\temail = OracleJDBC.readCustomerEmail(ID);\n\t\t\t\t\treturnCustomer = OracleJDBC.readReturnCustomer(ID);\n\n\t\t\t\t}\n\t\t\t\tcatch(SQLException e1)\n\t\t\t\t{\n\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\"Could Not Retrieve Customer Info\", \"Error\",\n\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE, null);\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\n\t\t\t\tif(returnID != 0) // checks if customer exists\n\t\t\t\t{\n\n\t\t\t\t\ttxtUpdateFirstName.setText(first);\n\t\t\t\t\ttxtUpdateLastName.setText(last);\n\t\t\t\t\ttxtUpdatePhoneNumber.setText(phone);\n\t\t\t\t\ttxtUpdateAddress.setText(address);\n\t\t\t\t\ttxtUpdateEmail.setText(email);\n\n\t\t\t\t\tif(returnCustomer.equals(\"Y\"))\n\t\t\t\t\t{\n\t\t\t\t\t\tradUpdateYes.setSelected(true);\n\t\t\t\t\t}\n\n\t\t\t\t\tbtnUpdateCustomer.setEnabled(true);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\"Could Not Retrieve Customer Info, Customer ID \"\n\t\t\t\t\t\t\t\t\t+ ID + \" does not exist\",\n\t\t\t\t\t\t\t\"Error\", JOptionPane.ERROR_MESSAGE, null);\n\n\t\t\t\t\tclearForm();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t}\n\t\t});\n\t\tbtnUpdateEnterID.setBounds(414, 9, 64, 21);\n\t\tpnlUpdateCustomer.add(btnUpdateEnterID);\n\n\t\t// -------------------------------------------------------------------------------------\n\t\t// -------------------------------------REVIEW CUSTOMER---------------------------------\n\t\t// -------------------------------------------------------------------------------------\n\n\t\tJPanel pnlReviewCustomer = new JPanel();\n\t\ttabbedPane.addTab(\"Review Customer\", null, pnlReviewCustomer, null);\n\t\tpnlReviewCustomer.setLayout(null);\n\n\t\t// Customer Review Labels\n\t\tJLabel lblReviewCustomerID = new JLabel(\n\t\t\t\t\"Enter Customer ID To Review Information\");\n\t\tlblReviewCustomerID.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlblReviewCustomerID.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblReviewCustomerID.setBounds(10, 12, 468, 19);\n\t\tpnlReviewCustomer.add(lblReviewCustomerID);\n\n\t\ttxtReviewCustomerID = new JTextField();\n\t\ttxtReviewCustomerID.setHorizontalAlignment(SwingConstants.CENTER);\n\t\ttxtReviewCustomerID.setColumns(10);\n\t\ttxtReviewCustomerID.setBounds(10, 34, 468, 20);\n\t\tpnlReviewCustomer.add(txtReviewCustomerID);\n\n\t\tJLabel lblReviewFirstName = new JLabel(\"First Name:\");\n\t\tlblReviewFirstName.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblReviewFirstName.setBounds(10, 130, 74, 14);\n\t\tpnlReviewCustomer.add(lblReviewFirstName);\n\n\t\tJLabel lblReviewLastName = new JLabel(\"Last Name:\");\n\t\tlblReviewLastName.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblReviewLastName.setBounds(10, 156, 74, 14);\n\t\tpnlReviewCustomer.add(lblReviewLastName);\n\n\t\tJLabel lblReviewPhoneNumber = new JLabel(\"Phone Number:\");\n\t\tlblReviewPhoneNumber.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblReviewPhoneNumber.setBounds(10, 181, 97, 14);\n\t\tpnlReviewCustomer.add(lblReviewPhoneNumber);\n\n\t\tJLabel lblReviewEmail = new JLabel(\"Email:\");\n\t\tlblReviewEmail.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblReviewEmail.setBounds(10, 206, 44, 14);\n\t\tpnlReviewCustomer.add(lblReviewEmail);\n\n\t\tJLabel lblReviewAddress = new JLabel(\"Address:\");\n\t\tlblReviewAddress.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblReviewAddress.setBounds(10, 231, 74, 14);\n\t\tpnlReviewCustomer.add(lblReviewAddress);\n\n\t\tJLabel lblReviewReturnCustomer = new JLabel(\"Return Customer:\");\n\t\tlblReviewReturnCustomer.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblReviewReturnCustomer.setBounds(10, 256, 117, 14);\n\t\tpnlReviewCustomer.add(lblReviewReturnCustomer);\n\n\t\t// Labels to display information\n\t\tJLabel lblShowFirstName = new JLabel(\"\");\n\t\tlblShowFirstName.setBackground(Color.WHITE);\n\t\tlblShowFirstName.setBounds(94, 130, 356, 14);\n\t\tpnlReviewCustomer.add(lblShowFirstName);\n\n\t\tJLabel lblShowLastName = new JLabel(\"\");\n\t\tlblShowLastName.setBackground(Color.WHITE);\n\t\tlblShowLastName.setBounds(94, 158, 356, 14);\n\t\tpnlReviewCustomer.add(lblShowLastName);\n\n\t\tJLabel lblShowPhoneNumber = new JLabel(\"\");\n\t\tlblShowPhoneNumber.setBackground(Color.WHITE);\n\t\tlblShowPhoneNumber.setBounds(117, 183, 333, 14);\n\t\tpnlReviewCustomer.add(lblShowPhoneNumber);\n\n\t\tJLabel lblShowEmail = new JLabel(\"\");\n\t\tlblShowEmail.setBackground(Color.WHITE);\n\t\tlblShowEmail.setBounds(64, 206, 386, 14);\n\t\tpnlReviewCustomer.add(lblShowEmail);\n\n\t\tJLabel lblShowAddress = new JLabel(\"\");\n\t\tlblShowAddress.setBackground(Color.WHITE);\n\t\tlblShowAddress.setBounds(74, 233, 376, 14);\n\t\tpnlReviewCustomer.add(lblShowAddress);\n\n\t\tJLabel lblShowReturnCustomer = new JLabel(\"\");\n\t\tlblShowReturnCustomer.setBackground(Color.WHITE);\n\t\tlblShowReturnCustomer.setBounds(123, 258, 327, 14);\n\t\tpnlReviewCustomer.add(lblShowReturnCustomer);\n\n\t\t// gets data from database\n\t\tJButton btnReviewCustomer = new JButton(\"Review Customer\");\n\t\tbtnReviewCustomer.addActionListener(new ActionListener()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tint ID = Integer.parseInt(txtReviewCustomerID.getText());\n\t\t\t\tint returnID = 0;\n\t\t\t\tString first = null;\n\t\t\t\tString last = null;\n\t\t\t\tString phone = null;\n\t\t\t\tString address = null;\n\t\t\t\tString email = null;\n\t\t\t\tString returnCustomer = null;\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\t// Store data to values\n\t\t\t\t\treturnID = OracleJDBC.readCustomerID(ID);\n\t\t\t\t\tfirst = OracleJDBC.readCustomerFirstName(ID);\n\t\t\t\t\tlast = OracleJDBC.readCustomerLastName(ID);\n\t\t\t\t\tphone = OracleJDBC.readCustomerPhoneNumber(ID);\n\t\t\t\t\taddress = OracleJDBC.readCustomerAddress(ID);\n\t\t\t\t\temail = OracleJDBC.readCustomerEmail(ID);\n\t\t\t\t\treturnCustomer = OracleJDBC.readReturnCustomer(ID);\n\n\t\t\t\t}\n\t\t\t\tcatch(SQLException e1)\n\t\t\t\t{\n\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\"Could Not Retrieve Customer First Name\", \"Error\",\n\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE, null);\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\n\t\t\t\tif(returnID != 0) // checks if customer exists\n\t\t\t\t{\n\t\t\t\t\t// Displays data\n\t\t\t\t\tlblShowFirstName.setText(first);\n\t\t\t\t\tlblShowLastName.setText(last);\n\t\t\t\t\tlblShowPhoneNumber.setText(phone);\n\t\t\t\t\tlblShowAddress.setText(address);\n\t\t\t\t\tlblShowEmail.setText(email);\n\t\t\t\t\tif(returnCustomer.equals(\"N\"))\n\t\t\t\t\t{\n\t\t\t\t\t\tlblShowReturnCustomer.setText(\"No\");\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tlblShowReturnCustomer.setText(\"Yes\");\n\t\t\t\t\t}\n\t\t\t\t\t;\n\t\t\t\t}\n\t\t\t\telse // customer does not exist\n\t\t\t\t{\n\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\"Customer with ID \" + ID + \" does not exist\",\n\t\t\t\t\t\t\t\"Error\", JOptionPane.ERROR_MESSAGE, null);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnReviewCustomer.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\n\t\tbtnReviewCustomer.setBounds(10, 65, 227, 54);\n\t\tpnlReviewCustomer.add(btnReviewCustomer);\n\n\t\tJButton btnReviewMainMenu = new JButton(\"Main Menu\");\n\t\tbtnReviewMainMenu.addActionListener(new ActionListener()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tGuitarBuilderMainMenu.createMainMenu();\n\t\t\t\tfrmCustomers.dispose();\n\t\t\t}\n\t\t});\n\t\tbtnReviewMainMenu.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\n\t\tbtnReviewMainMenu.setBounds(251, 65, 227, 54);\n\t\tpnlReviewCustomer.add(btnReviewMainMenu);\n\n\t\t// -------------------------------------------------------------------------------\n\t\t// ------------------------------DELETE CUSTOMER----------------------------------\n\t\t// -------------------------------------------------------------------------------\n\t\tJPanel pnlDeleteCustomer = new JPanel();\n\t\ttabbedPane.addTab(\"Delete Customer\", null, pnlDeleteCustomer, null);\n\t\tpnlDeleteCustomer.setLayout(null);\n\n\t\t// Labels for the customer deletion window\n\t\tJLabel lblDeleteCustomerID = new JLabel(\"Enter Customer ID To Delete\");\n\t\tlblDeleteCustomerID.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlblDeleteCustomerID.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblDeleteCustomerID.setBounds(10, 11, 468, 19);\n\t\tpnlDeleteCustomer.add(lblDeleteCustomerID);\n\n\t\ttxtDeleteCustomerID = new JTextField();\n\t\ttxtDeleteCustomerID.setHorizontalAlignment(SwingConstants.CENTER);\n\t\ttxtDeleteCustomerID.setColumns(10);\n\t\ttxtDeleteCustomerID.setBounds(10, 33, 468, 20);\n\t\tpnlDeleteCustomer.add(txtDeleteCustomerID);\n\n\t\tJButton btnDeleteCustomer = new JButton(\"Delete Customer\");\n\t\tbtnDeleteCustomer.addActionListener(new ActionListener()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\n\t\t\t\tint ID = Integer.parseInt(txtDeleteCustomerID.getText());\n\t\t\t\tint returnID = 0;\n\t\t\t\tString first = null;\n\t\t\t\tString last = null;\n\t\t\t\tString phone = null;\n\t\t\t\tString address = null;\n\t\t\t\tString email = null;\n\t\t\t\tString returnCustomer = null;\n\t\t\t\ttry\n\t\t\t\t{\n\n\t\t\t\t\t// Gathers data from database\n\t\t\t\t\treturnID = OracleJDBC.readCustomerID(ID);\n\t\t\t\t\tfirst = OracleJDBC.readCustomerFirstName(ID);\n\t\t\t\t\tlast = OracleJDBC.readCustomerLastName(ID);\n\t\t\t\t\tphone = OracleJDBC.readCustomerPhoneNumber(ID);\n\t\t\t\t\taddress = OracleJDBC.readCustomerAddress(ID);\n\t\t\t\t\temail = OracleJDBC.readCustomerEmail(ID);\n\t\t\t\t\treturnCustomer = OracleJDBC.readReturnCustomer(ID);\n\n\t\t\t\t}\n\t\t\t\tcatch(SQLException e1)\n\t\t\t\t{\n\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\"Could Not Delete Customer\", \"Error\",\n\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE, null);\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\n\t\t\t\tif(returnID == 0)\n\t\t\t\t{\n\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\"Customer with ID \" + ID + \" does not exist!\",\n\t\t\t\t\t\t\t\"Error\", JOptionPane.ERROR_MESSAGE, null);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tint choice = JOptionPane.showConfirmDialog(null,\n\t\t\t\t\t\t\t\"Are you sure you want to delete the following customer?\"\n\t\t\t\t\t\t\t\t\t+ \"\\nID: \" + returnID + \"\\nFirst Name: \"\n\t\t\t\t\t\t\t\t\t+ first + \"\\nLast Name: \" + last\n\t\t\t\t\t\t\t\t\t+ \"\\nPhone Number: \" + phone + \"\\nAddress: \"\n\t\t\t\t\t\t\t\t\t+ address + \"\\nEmail: \" + email\n\t\t\t\t\t\t\t\t\t+ \"\\nReturn Customer: \" + returnCustomer,\n\t\t\t\t\t\t\t\"Confirmation\", JOptionPane.YES_NO_OPTION);\n\n\t\t\t\t\tif(choice == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\ttry\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tOracleJDBC.deleteCustomer(ID);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch(SQLException e1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\t\t\"Couldn't Delete Customer\", \"Error\",\n\t\t\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE, null);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Customer Deleted\",\n\t\t\t\t\t\t\t\t\"Sucess\", JOptionPane.INFORMATION_MESSAGE,\n\t\t\t\t\t\t\t\tnull);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t});\n\t\tbtnDeleteCustomer\n\t\t\t\t.setBackground(UIManager.getColor(\"Button.background\"));\n\t\tbtnDeleteCustomer.setForeground(Color.RED);\n\t\tbtnDeleteCustomer.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\n\t\tbtnDeleteCustomer.setBounds(10, 64, 226, 73);\n\t\tpnlDeleteCustomer.add(btnDeleteCustomer);\n\n\t\tJButton btnDeleteMainMenu = new JButton(\"Main Menu\");\n\t\tbtnDeleteMainMenu.addActionListener(new ActionListener()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tGuitarBuilderMainMenu.createMainMenu();\n\t\t\t\tfrmCustomers.dispose();\n\t\t\t}\n\t\t});\n\t\tbtnDeleteMainMenu.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\n\t\tbtnDeleteMainMenu.setBounds(252, 64, 226, 73);\n\t\tpnlDeleteCustomer.add(btnDeleteMainMenu);\n\t}", "private void populateFields() {\n\t\ttypeNameTF.setText(\"\");\n\t\tunitsTF.setText(\"\");\n\t\tunitMeasureTF.setText(\"\");\n\t\tvalidityDaysTF.setText(\"\");\n\t\treorderPointTF.setText(\"\");\n\t\tnotesTF.setText(\"\");\n\t\tstatusCB.getItems().addAll(\"Active\", \"Inactive\");\n\t\tstatusCB.setValue(\"Active\");\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jButton3 = new javax.swing.JButton();\n jTextField4 = new javax.swing.JTextField();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jScrollPane1 = new javax.swing.JScrollPane();\n jTextArea1 = new javax.swing.JTextArea();\n jButton4 = new javax.swing.JButton();\n jButton1 = new javax.swing.JButton();\n jButton5 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jButton6 = new javax.swing.JButton();\n jButton7 = new javax.swing.JButton();\n jTextField1 = new javax.swing.JTextField();\n jTextField2 = new javax.swing.JTextField();\n jTextField3 = new javax.swing.JTextField();\n jTextField5 = new javax.swing.JTextField();\n jButton8 = new javax.swing.JButton();\n jLabel8 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n\n jButton3.setText(\"jButton1\");\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);\n setBounds(new java.awt.Rectangle(0, 0, 0, 0));\n setUndecorated(true);\n getContentPane().setLayout(null);\n\n jLabel1.setFont(new java.awt.Font(\"Arial\", 1, 36)); // NOI18N\n jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel1.setText(\"CUSTOMER INFORMATION\");\n getContentPane().add(jLabel1);\n jLabel1.setBounds(790, 170, 480, 43);\n\n jLabel2.setFont(new java.awt.Font(\"Arial\", 1, 18)); // NOI18N\n jLabel2.setForeground(new java.awt.Color(255, 255, 255));\n jLabel2.setText(\"CUSTOMER ID\");\n getContentPane().add(jLabel2);\n jLabel2.setBounds(640, 400, 200, 32);\n\n jLabel3.setFont(new java.awt.Font(\"Arial\", 1, 18)); // NOI18N\n jLabel3.setForeground(new java.awt.Color(255, 255, 255));\n jLabel3.setText(\"CUSTOMER NAME\");\n getContentPane().add(jLabel3);\n jLabel3.setBounds(640, 450, 200, 34);\n\n jLabel4.setFont(new java.awt.Font(\"Arial\", 1, 18)); // NOI18N\n jLabel4.setForeground(new java.awt.Color(255, 255, 255));\n jLabel4.setText(\"AADHAR NUMBER\");\n jLabel4.setToolTipText(\"\");\n getContentPane().add(jLabel4);\n jLabel4.setBounds(640, 510, 200, 32);\n\n jLabel5.setFont(new java.awt.Font(\"Arial\", 1, 18)); // NOI18N\n jLabel5.setForeground(new java.awt.Color(255, 255, 255));\n jLabel5.setText(\"PHONE NUMBER\");\n getContentPane().add(jLabel5);\n jLabel5.setBounds(640, 670, 200, 37);\n\n jLabel6.setFont(new java.awt.Font(\"Arial\", 1, 18)); // NOI18N\n jLabel6.setForeground(new java.awt.Color(255, 255, 255));\n jLabel6.setText(\"ADDRESS\");\n getContentPane().add(jLabel6);\n jLabel6.setBounds(640, 560, 192, 36);\n\n jScrollPane1.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);\n\n jTextArea1.setColumns(20);\n jTextArea1.setFont(new java.awt.Font(\"Arial\", 1, 18)); // NOI18N\n jTextArea1.setLineWrap(true);\n jTextArea1.setRows(5);\n jScrollPane1.setViewportView(jTextArea1);\n\n getContentPane().add(jScrollPane1);\n jScrollPane1.setBounds(840, 560, 572, 100);\n\n jButton4.setFont(new java.awt.Font(\"Arial\", 1, 18)); // NOI18N\n jButton4.setText(\"ADD\");\n jButton4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton4ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton4);\n jButton4.setBounds(640, 770, 120, 40);\n\n jButton1.setFont(new java.awt.Font(\"Arial\", 1, 18)); // NOI18N\n jButton1.setText(\"UPDATE\");\n jButton1.setToolTipText(\"\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton1);\n jButton1.setBounds(780, 770, 107, 40);\n\n jButton5.setFont(new java.awt.Font(\"Arial\", 1, 18)); // NOI18N\n jButton5.setText(\"DELETE\");\n jButton5.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton5ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton5);\n jButton5.setBounds(900, 770, 103, 40);\n\n jButton2.setFont(new java.awt.Font(\"Arial\", 1, 18)); // NOI18N\n jButton2.setText(\"DISPLAY\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton2);\n jButton2.setBounds(1020, 770, 111, 40);\n\n jButton6.setFont(new java.awt.Font(\"Arial\", 1, 18)); // NOI18N\n jButton6.setText(\"RESET\");\n jButton6.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton6ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton6);\n jButton6.setBounds(1150, 770, 113, 40);\n\n jButton7.setFont(new java.awt.Font(\"Arial\", 1, 18)); // NOI18N\n jButton7.setText(\"BACK\");\n jButton7.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton7ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton7);\n jButton7.setBounds(1280, 770, 138, 40);\n\n jTextField1.setEditable(false);\n jTextField1.setFont(new java.awt.Font(\"Arial\", 1, 18)); // NOI18N\n getContentPane().add(jTextField1);\n jTextField1.setBounds(840, 400, 571, 32);\n\n jTextField2.setFont(new java.awt.Font(\"Arial\", 1, 18)); // NOI18N\n jTextField2.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyReleased(java.awt.event.KeyEvent evt) {\n jTextField2KeyReleased(evt);\n }\n });\n getContentPane().add(jTextField2);\n jTextField2.setBounds(840, 670, 421, 37);\n\n jTextField3.setFont(new java.awt.Font(\"Arial\", 1, 18)); // NOI18N\n jTextField3.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyReleased(java.awt.event.KeyEvent evt) {\n jTextField3KeyReleased(evt);\n }\n });\n getContentPane().add(jTextField3);\n jTextField3.setBounds(840, 450, 571, 32);\n\n jTextField5.setFont(new java.awt.Font(\"Arial\", 1, 18)); // NOI18N\n jTextField5.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField5ActionPerformed(evt);\n }\n });\n jTextField5.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyReleased(java.awt.event.KeyEvent evt) {\n jTextField5KeyReleased(evt);\n }\n });\n getContentPane().add(jTextField5);\n jTextField5.setBounds(840, 510, 571, 32);\n\n jButton8.setFont(new java.awt.Font(\"Arial\", 1, 18)); // NOI18N\n jButton8.setText(\"SAVE\");\n jButton8.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton8ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton8);\n jButton8.setBounds(1280, 670, 138, 37);\n\n jLabel8.setFont(new java.awt.Font(\"Arial\", 1, 48)); // NOI18N\n jLabel8.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel8.setText(\"HOTEL MANAGEMENT SYSTEM\");\n getContentPane().add(jLabel8);\n jLabel8.setBounds(640, 70, 760, 56);\n\n jLabel7.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel7.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/hotel_management/apartment-architectural-design-architecture-323780.jpg\"))); // NOI18N\n getContentPane().add(jLabel7);\n jLabel7.setBounds(0, -10, 1930, 1110);\n\n pack();\n }", "public payment() {\n initComponents();\n \n jLabel4.setVisible(false);\n \n \n jTextField3.setVisible(false);\n jTextField4.setVisible(false);\n //jTextField5.setVisible(false);\n // jTextField7.setVisible(false);\n //jTextField8.setVisible(false);\n \n jCheckBox1.setVisible(false);\n jCheckBox4.setVisible(false);\n //jCheckBox5.setVisible(false);\n //jCheckBox6.setVisible(false);\n //jCheckBox7.setVisible(false);\n }", "private void clearCreditCardFields() {\r\n\t\tmCardNoValue1.setText(\"\");\r\n\t\tmCardNoValue1.setHint(\"-\");\r\n\t\tmCardNoValue2.setText(\"\");\r\n\t\tmCardNoValue2.setHint(\"-\");\r\n\t\tmCardNoValue3.setText(\"\");\r\n\t\tmCardNoValue3.setHint(\"-\");\r\n\t\tmCardNoValue4.setText(\"\");\r\n\t\tmCardNoValue4.setHint(\"-\");\r\n\t\tmCardNoValue1.requestFocus();\r\n\t}", "public void limpiar() {\r\n\t\t\t\tid.setText(\"\");\r\n\t\t\t\ttitulo.setText(\"\");\r\n\t\t\t\tdirector.setText(\"\");\r\n\t\t\t\tidCliente.setText(\"\");\r\n\t\t\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jSeparator1 = new javax.swing.JSeparator();\n jLabel1 = new javax.swing.JLabel();\n jScrollPane1 = new javax.swing.JScrollPane();\n jTable1 = new javax.swing.JTable();\n jLabel2 = new javax.swing.JLabel();\n jTextField1 = new javax.swing.JTextField();\n jButton3 = new javax.swing.JButton();\n jButton4 = new javax.swing.JButton();\n jButton5 = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabel1.setFont(new java.awt.Font(\"Bernard MT Condensed\", 0, 48)); // NOI18N\n jLabel1.setText(\"SEE AN ACCOUNT\");\n\n jTable1.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n \"Customer Type\", \"Name of Holder\", \"Gender\", \"Name of Father\", \"Name of Mother\", \"Date of Birth\", \"Marital Status\", \"lNationality\", \"Local Address\", \"Permanent Address\", \"Phone No.\", \"Mobile No.\", \"Account No.\"\n }\n ));\n jTable1.setEditingColumn(0);\n jTable1.setEditingRow(0);\n jScrollPane1.setViewportView(jTable1);\n\n jLabel2.setFont(new java.awt.Font(\"Lucida Fax\", 1, 18)); // NOI18N\n jLabel2.setText(\"Enter Your Account Number\");\n\n jTextField1.setFont(new java.awt.Font(\"Levenim MT\", 0, 18)); // NOI18N\n jTextField1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField1ActionPerformed(evt);\n }\n });\n\n jButton3.setFont(new java.awt.Font(\"Engravers MT\", 0, 18)); // NOI18N\n jButton3.setText(\"EMPTY TABLE\");\n jButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton3ActionPerformed(evt);\n }\n });\n\n jButton4.setFont(new java.awt.Font(\"Engravers MT\", 0, 18)); // NOI18N\n jButton4.setText(\"EXIT\");\n jButton4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton4ActionPerformed(evt);\n }\n });\n\n jButton5.setFont(new java.awt.Font(\"Engravers MT\", 0, 18)); // NOI18N\n jButton5.setText(\"SEE\");\n jButton5.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton5ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 218, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(83, 83, 83)\n .addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 203, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(731, 731, 731))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(313, 313, 313)\n .addComponent(jLabel2)\n .addGap(37, 37, 37)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 357, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(29, 29, 29)\n .addComponent(jButton5, javax.swing.GroupLayout.PREFERRED_SIZE, 144, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 1646, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 1336, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(560, 560, 560)\n .addComponent(jLabel1)))\n .addContainerGap())\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(4, 4, 4)\n .addComponent(jLabel1)\n .addGap(25, 25, 25)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2)\n .addComponent(jButton5, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 32, Short.MAX_VALUE)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 192, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(55, 55, 55)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(47, 47, 47))\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(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 1361, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(23, 23, 23))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(27, 27, 27)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n );\n\n pack();\n }", "private void eraseFieldsContent() {\r\n\t\ttxPassword.setText(\"\");\r\n\t\ttxUsuario.setText(\"\");\r\n\t\tcheckAdmin.setIndeterminate(true);\r\n\t\tcheckTPV.setIndeterminate(true);\r\n\t}", "private void LimpiarCampos(){\n \n txtClave.setText(null);\n txtNombre.setText(null);\n txtPaterno.setText(null);\n txtMaterno.setText(null);\n txtTelefono.setText(null);\n txtCorreo.setText(null);\n cbxGenero.setSelectedIndex(0);\n cbxRol.setSelectedIndex(0);\n }", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tuserIdfield.setText(\"\");\n\t\tactTypeField.setText(\"\");\n\t\tloginNamField.setText(\"\");\n\t\tloginpwdField.setText(\"\");\n\t\tnamefield.setText(\"\");\n\t\tsexIdfield.setText(\"\");\n\t\thomephonefield.setText(\"\");\n\t\tcallphonefield.setText(\"\");\n\t\tofcphonefield.setText(\"\");\n\t\tshortphonefield.setText(\"\");\n\t\totherphonefield.setText(\"\");\n\t\tfaxfield.setText(\"\");\n\t\temailfield.setText(\"\");\n\t\taddrfield.setText(\"\");\n\t\ttitlefield.setText(\"\");\n\t\tdeptIdfield.setText(\"\");\n\t\tuserLevelfield.setText(\"\");\n\t\troleIdfield.setText(\"\");\n\t\tactIdfield.setText(\"\");\n\t\toldPwdField.setText(\"\");\n\t\tnewPwdField.setText(\"\");\t\t\n\t\totherphone2field.setText(\"\");\n\t\tzipfield.setText(\"\");\n\t\tstaffNumfield.setText(\"\");\n\t\tforeignfield.setText(\"\");\n\t\tuserstatefield.setText(\"\");\n\t\tnotesmailfield.setText(\"\");\n\t\tbirthdayfield.setText(\"\");\n\t\tdesfield.setText(\"\");\n\t\twebsitefield.setText(\"\");\n\t\tqPinyinfield.setText(\"\");\n\t\tjPinyinfield.setText(\"\");\n\n\t}", "@FXML\n void displayPH() {\n generalTextArea.clear();\n clearEverything();\n String employeeListPH = company.printByDate();\n generalTextArea.appendText(employeeListPH);\n\n }", "private void clearAllTextField() {\n ManufactureTxt.setText(\"\");\n ManuYearTxt.setText(\"\");\n SeatNumTxt.setText(\"\");\n SerialNumTxt.setText(\"\");\n ModelTxt.setText(\"\");\n UpdateDateTxt.setText(\"\");\n ExpDateTxt.setText(\"\");\n //AvailableCheckBox.setText(\"\");\n LatitudeTxt.setText(\"\");\n LongitudeTxt.setText(\"\");\n CityTxt.setText(\"\");\n//To change body of generated methods, choose Tools | Templates.\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 jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n jLabel9 = new javax.swing.JLabel();\n firstTxt = new javax.swing.JTextField();\n lastTxt = new javax.swing.JTextField();\n streetTxt = new javax.swing.JTextField();\n cityTxt = new javax.swing.JTextField();\n stateTxt = new javax.swing.JTextField();\n zipTxt = new javax.swing.JTextField();\n phoneTxt = new javax.swing.JTextField();\n emailTxt = new javax.swing.JTextField();\n addCustomerBtn = new javax.swing.JButton();\n jlblStatus = new javax.swing.JLabel();\n mainGUIBtn = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabel1.setText(\"New Customer\");\n\n jLabel2.setText(\"First Name:\");\n\n jLabel3.setText(\"Last Name:\");\n\n jLabel4.setText(\"Street:\");\n\n jLabel5.setText(\"City:\");\n\n jLabel6.setText(\"State:\");\n\n jLabel7.setText(\"Zip:\");\n\n jLabel8.setText(\"Phone:\");\n\n jLabel9.setText(\"Email:\");\n\n firstTxt.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n firstTxtActionPerformed(evt);\n }\n });\n\n lastTxt.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n lastTxtActionPerformed(evt);\n }\n });\n\n phoneTxt.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n phoneTxtActionPerformed(evt);\n }\n });\n\n emailTxt.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n emailTxtActionPerformed(evt);\n }\n });\n\n addCustomerBtn.setText(\"Add New Customer\");\n addCustomerBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n addCustomerBtnActionPerformed(evt);\n }\n });\n\n jlblStatus.setText(\" \");\n\n mainGUIBtn.setText(\"Main Screen Page\");\n mainGUIBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n mainGUIBtnActionPerformed(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.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jlblStatus, javax.swing.GroupLayout.PREFERRED_SIZE, 152, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel4, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel5, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel6, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel7, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel8, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel9, javax.swing.GroupLayout.Alignment.TRAILING))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(phoneTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(emailTxt, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(zipTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(stateTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(cityTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(streetTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(lastTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(firstTxt, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(addCustomerBtn))\n .addGroup(layout.createSequentialGroup()\n .addGap(294, 294, 294)\n .addComponent(jLabel1))))\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(mainGUIBtn)))\n .addContainerGap(302, Short.MAX_VALUE))\n );\n\n layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {cityTxt, emailTxt, firstTxt, lastTxt, phoneTxt, stateTxt, streetTxt, zipTxt});\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 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(firstTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(19, 19, 19)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(lastTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(streetTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(cityTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel6)\n .addComponent(stateTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel7)\n .addComponent(zipTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel8)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel9)\n .addComponent(emailTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addComponent(phoneTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(21, 21, 21)\n .addComponent(jlblStatus)\n .addGap(12, 12, 12)\n .addComponent(addCustomerBtn)\n .addGap(50, 50, 50)\n .addComponent(mainGUIBtn)\n .addContainerGap(76, Short.MAX_VALUE))\n );\n\n pack();\n }", "private void ClearFields() {\n txtGRNNO.setText(null);\n dccGRNDate.setCalendar(null);\n\n txtGRNNO.requestFocus();\n }", "private void buildCheckout() {\n\t\t\n\t\t//clears the New Customer JFrame components\n\t\tgetContentPane().removeAll();\n\t\t\n\t\t//creates panel objects for Checkout window\n\t\tpanel1 = new JPanel();\n\t\tpanel2 = new JPanel();\n\t\tpanel3 = new JPanel();\n\t\tpanel4 = new JPanel();\n\t\tpanel5 = new JPanel();\n\t\tpanel6 = new JPanel();\n\t\tpanel7 = new JPanel();\n\t\tpanel8 = new JPanel();\n\t\tpanel9 = new JPanel();\n\t\tpanel10 = new JPanel();\n\t\tpanel11 = new JPanel();\n\t\tpanel12 = new JPanel();\n\t\t\n\t\t//creates main panel object for Checkout window\n\t\tmainPanel = new JPanel();\n\t\t\n\t\t//button to open New Customer window\n\t\taddNewCustomerButton = new JButton(\"Add New Customer\");\n\t\t\n\t\t//button to pay for presented transaction amount\n\t\tpayButton = new JButton(\"Pay\");\n\t\t\n\t\t//combo box for Checkout window, attains value from namesArray, initialized to unselected, sets dimension manually\n\t\tnameBox = new JComboBox(namesArray.toArray());\n\t\tnameBox.setSelectedIndex(-1);\n\t\tnameBox.setPreferredSize(new Dimension(115, 25));\n\t\t\n\t\t//creates descriptive labels for Checkout window\n\t\tcustomerLabel = \t\tnew JLabel(\"Customer \");\n\t\tcurrentSpentLabel = \tnew JLabel(\"Current Spent \");\n\t\tcurrentDiscountLabel = \tnew JLabel(\"Current Discount \");\n\t\ttransactionAmountLabel =new JLabel(\"Transaction Amount \");\n\t\tamountDiscountedLabel =\tnew JLabel(\"Discounted \");\n\t\tpendingPaymentLabel = \tnew JLabel(\"Pending Payment \");\n\t\t\n\t\t//creates error labels for Checkout window\n\t\ttransactionAmountLabelError = \tnew JLabel(\"\");\n\t\tcheckoutWindowError = \t\tnew JLabel(\"\");\n\t\tcheckoutWindowError.setPreferredSize(new Dimension(180, 25));\n\t\t\n\t\t//sets color for error labels\n\t\ttransactionAmountLabelError.setForeground(Color.RED);\n\t\tcheckoutWindowError.setForeground(Color.RED);\n\t\t\n\t\t//creates text fields for Checkout window\n\t\tcurrentSpentField = \tnew JTextField(10);\n\t\tcurrentDiscountField = \tnew JTextField(10);\n\t\ttransactionAmountField =new JTextField(10);\n\t\tamountDiscountedField =\tnew JTextField(10);\n\t\tpendingPaymentField = \tnew JTextField(10);\n\t\t\n\t\t//changes specific text fields as unEditable\n\t\tcurrentSpentField.setEditable(false);\n\t\tcurrentDiscountField.setEditable(false);\n\t\tamountDiscountedField.setEditable(false);\n\t\tpendingPaymentField.setEditable(false);\n\t\t\n\t\t//creates listeners for buttons, ComboBox, and text fields\n\t\taddNewCustomerButton.addActionListener(new addNewCusButtonListener());\n\t\tnameBox.addActionListener(new nameComboBoxListener());\n\t\ttransactionAmountField.addActionListener(new transactionAmountFieldListener());\n\t\tpayButton.addActionListener(new payButtonListener());\n\t\t\n\t\t//adds Add New Customer button component to the top panel\n\t\tpanel1.add(addNewCustomerButton);\n\t\t\n\t\t//adds components to the main panel set\n\t\tpanel2.add(customerLabel);\n\t\tpanel2.add(nameBox);\n\t\t\n\t\tpanel3.add(currentSpentLabel);\n\t\tpanel3.add(currentSpentField);\n\t\t\n\t\tpanel4.add(currentDiscountLabel);\n\t\tpanel4.add(currentDiscountField);\n\t\t\n\t\tpanel5.add(transactionAmountLabel);\n\t\tpanel5.add(transactionAmountLabelError);\n\t\tpanel5.add(transactionAmountField);\n\t\t\n\t\tpanel6.add(amountDiscountedLabel);\n\t\tpanel6.add(amountDiscountedField);\n\t\t\n\t\tpanel7.add(pendingPaymentLabel);\n\t\tpanel7.add(pendingPaymentField);\n\t\t\n\t\tpanel8.add(checkoutWindowError);\n\n\t\t//adds Pay button component to the bottom panel\n\t\tpanel9.add(payButton);\n\t\t\n\t\t//adds the main panel set to the main panel\n\t\tmainPanel.add(panel2);\n\t\tmainPanel.add(panel3);\n\t\tmainPanel.add(panel4);\n\t\tmainPanel.add(panel5);\n\t\tmainPanel.add(panel6);\n\t\tmainPanel.add(panel7);\n\t\tmainPanel.add(panel8);\n\t\t\n\t\t//sets the main panel's flow characteristics\n\t\tmainPanel.setLayout(new FlowLayout(FlowLayout.RIGHT));\n\t\tmainPanel.setPreferredSize(new Dimension(260, 250));\n\t\t\n\t\t//adds the first panel directly to the top of the Checkout JFrame\n\t\tadd(panel1);\n\t\t\n\t\t//adds the main panel in the middle of the Checkout JFrame \n\t\tadd(mainPanel);\n\t\t\n\t\t//adds the last panel directly to the bottom of the Checkout JFrame \n\t\tadd(panel9);\n\t\t\n\t\t//redisplays the Checkout JFrame over the New Customer JFrame\n\t\trevalidate();\n\t\trepaint();\n\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tTableWindow customersWindow = new TableWindow(dbHandler.getArrayOfCustomers(),Customer.getTitles());\r\n\t\t\t customersWindow.setVisible(true);\r\n\t\t\t}", "public void showInputs() {\n\t\tCIVLTable tbl_inputTable = (CIVLTable) getComponentByName(\"tbl_inputTable\");\n\t\tDefaultTableModel inputModel = (DefaultTableModel) tbl_inputTable\n\t\t\t\t.getModel();\n\n\t\tif (inputModel.getRowCount() != 0) {\n\t\t\tinputModel.setRowCount(0);\n\t\t\ttbl_inputTable.clearSelection();\n\t\t}\n\n\t\t// GMCSection gmcs = currConfig.getGmcConfig().getAnonymousSection();\n\t\tArrayList<CIVL_Input> inputList = currConfig.getInputs();\n\t\tfor (int i = 0; i < inputList.size(); i++) {\n\t\t\tCIVL_Input input = inputList.get(i);\n\t\t\tinputModel.addRow(new Object[] { input.getName(), input.getType(),\n\t\t\t\t\tinput.getValue(), input.getInitializer() });\n\t\t}\n\n\t}", "private void initData() {\n ContractList conl = new ContractList();\n String iCard = txtindentify.getText().trim();\n if (conl.getacc(iCard) == 0) {\n txtAcc.setText(\"NEW CUSTOMER\");\n\n } else {\n Customer cus = new Customer();\n CustomerList cl = new CustomerList();\n cus = cl.getcus(iCard);\n txtAcc.setText(Integer.toString(cus.acc));\n\n }\n }", "private void limpiarCampos(){\n\ntxtId.setText(\"\");\ntxtCosto.setText(\"\");\ntxtDestino.setText(\"\");\ntxtKilom.setText(\"\");\ntxtMatricula.setText(\"\");\n\n\n\n}", "private void limpiarCampos() {\n campoNombre.setText(\"\");\n campoNumLibro.setText(\"\");\n campoNumPagina.setText(\"\");\n }", "private void DefaultValues(){\n txtCategoryNo.setText(\"\");\n txtCategoryName.setText(\"\");\n }", "private void loadBlankPersonPage() {\n name.setText(\"\");\n phone.setText(\"\");\n address.setText(\"\");\n email.setText(\"\");\n groups.getChildren().clear();\n preferences.getChildren().clear();\n initBlankIcons();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n LogoutButton = new javax.swing.JButton();\n jPanel5 = new javax.swing.JPanel();\n VerticalLabel2 = new javax.swing.JLabel();\n jSeparator3 = new javax.swing.JSeparator();\n NameLabel = new javax.swing.JLabel();\n PhoneLabel = new javax.swing.JLabel();\n AddressLabel = new javax.swing.JLabel();\n CompanyLabel = new javax.swing.JLabel();\n EmailLabel = new javax.swing.JLabel();\n CustomerNameField = new javax.swing.JTextField();\n CustomerEmailField = new javax.swing.JTextField();\n CustomerCompanyField = new javax.swing.JTextField();\n CustomerAddressField = new javax.swing.JTextField();\n CustomerPhoneField = new javax.swing.JTextField();\n jPanel6 = new javax.swing.JPanel();\n SearchCustomerButton = new javax.swing.JButton();\n CancelButton = new javax.swing.JButton();\n NavigationLabel = new javax.swing.JLabel();\n\n setBackground(new java.awt.Color(255, 255, 255));\n\n LogoutButton.setText(\"Logout\");\n\n jPanel5.setBackground(new java.awt.Color(255, 255, 204));\n jPanel5.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n\n VerticalLabel2.setFont(new java.awt.Font(\"Lucida Grande\", 1, 24)); // NOI18N\n VerticalLabel2.setText(\"Create Customer\");\n\n NameLabel.setText(\"Name:\");\n\n PhoneLabel.setText(\"Phone:\");\n\n AddressLabel.setText(\"Address:\");\n\n CompanyLabel.setText(\"Company:\");\n\n EmailLabel.setText(\"Email:\");\n\n CustomerNameField.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n CustomerNameFieldActionPerformed(evt);\n }\n });\n\n CustomerEmailField.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n CustomerEmailFieldActionPerformed(evt);\n }\n });\n\n CustomerCompanyField.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n CustomerCompanyFieldActionPerformed(evt);\n }\n });\n\n CustomerAddressField.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n CustomerAddressFieldActionPerformed(evt);\n }\n });\n\n CustomerPhoneField.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n CustomerPhoneFieldActionPerformed(evt);\n }\n });\n\n org.jdesktop.layout.GroupLayout jPanel5Layout = new org.jdesktop.layout.GroupLayout(jPanel5);\n jPanel5.setLayout(jPanel5Layout);\n jPanel5Layout.setHorizontalGroup(\n jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(jPanel5Layout.createSequentialGroup()\n .add(88, 88, 88)\n .add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(AddressLabel)\n .add(CompanyLabel)\n .add(EmailLabel)\n .add(PhoneLabel)\n .add(NameLabel))\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(CustomerNameField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 219, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(CustomerPhoneField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 219, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(CustomerEmailField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 219, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(CustomerCompanyField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 219, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(CustomerAddressField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 219, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(101, Short.MAX_VALUE))\n .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel5Layout.createSequentialGroup()\n .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.CENTER)\n .add(jSeparator3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 268, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(VerticalLabel2))\n .add(94, 94, 94))\n );\n jPanel5Layout.setVerticalGroup(\n jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(jPanel5Layout.createSequentialGroup()\n .addContainerGap()\n .add(VerticalLabel2)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(jSeparator3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)\n .add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(NameLabel)\n .add(CustomerNameField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\n .add(18, 18, 18)\n .add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(PhoneLabel)\n .add(CustomerPhoneField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\n .add(18, 18, 18)\n .add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(AddressLabel)\n .add(CustomerAddressField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\n .add(18, 18, 18)\n .add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(CompanyLabel)\n .add(CustomerCompanyField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\n .add(18, 18, 18)\n .add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(EmailLabel)\n .add(CustomerEmailField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(56, Short.MAX_VALUE))\n );\n\n jPanel6.setBackground(new java.awt.Color(255, 255, 204));\n\n SearchCustomerButton.setFont(new java.awt.Font(\"Lucida Grande\", 1, 13)); // NOI18N\n SearchCustomerButton.setText(\"Accept\");\n\n CancelButton.setFont(new java.awt.Font(\"Lucida Grande\", 1, 13)); // NOI18N\n CancelButton.setText(\"Cancel\");\n\n org.jdesktop.layout.GroupLayout jPanel6Layout = new org.jdesktop.layout.GroupLayout(jPanel6);\n jPanel6.setLayout(jPanel6Layout);\n jPanel6Layout.setHorizontalGroup(\n jPanel6Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(jPanel6Layout.createSequentialGroup()\n .addContainerGap(511, Short.MAX_VALUE)\n .add(SearchCustomerButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 100, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(CancelButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 100, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n jPanel6Layout.setVerticalGroup(\n jPanel6Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(jPanel6Layout.createSequentialGroup()\n .addContainerGap()\n .add(jPanel6Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(SearchCustomerButton, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE)\n .add(CancelButton, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addContainerGap())\n );\n\n NavigationLabel.setFont(new java.awt.Font(\"Lucida Grande\", 0, 10)); // NOI18N\n NavigationLabel.setText(\"Home > Customer > Create Customer\");\n\n org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()\n .addContainerGap()\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(layout.createSequentialGroup()\n .add(jPanel6, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n .add(layout.createSequentialGroup()\n .add(NavigationLabel)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .add(LogoutButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 75, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))))\n .add(layout.createSequentialGroup()\n .add(126, 126, 126)\n .add(jPanel5, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(0, 0, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(layout.createSequentialGroup()\n .add(0, 0, Short.MAX_VALUE)\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(NavigationLabel)\n .add(LogoutButton))\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(jPanel5, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)\n .add(jPanel6, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n }", "public static void viewCustomerInfo() {\n\t\tSystem.out.println(\"Please enter customer name\");\n\t\tString firstName=scan.nextLine();\n\t\tCustomer c=Bank.findCustomerByName(firstName);\n\t\tFind find=new Find();\n\t\tfind.viewCustomerDetails(c);\n\n\t\tSystem.out.println(\"Customer: \" + c.getFirstName() + \" \" + c.getLastName() + \" \"+ c.getUserName() + \" \"+ c.getPassword() \n\t\t+ \" \" + c.getDriverLicense() + \" \" + c.getAccountType() + \" \"+ c.getInitialDeposit() + \" \" + \"was viewed\");\n\t\tLogThis.LogIt(\"info\", c.getFirstName() + \" \" + c.getLastName()+ \" was viewed!\");\n\n\t\tSystem.out.println(\"Would you like to find another customer?\");\n\n\t\tSystem.out.println(\"\\t[y]es\");\n\t\tSystem.out.println(\"\\t[n]o\");\n\t\tSystem.out.println(\"\\t[l]og Out\");\n\n\n\t\tString option = scan.nextLine();\n\t\tswitch(option.toLowerCase()) {\n\t\tcase \"y\":\n\t\t\tviewCustomerInfo();\n\t\t\tbreak;\n\t\tcase \"n\":\n\t\t\tstartMenu();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tSystem.out.println(\"Invalid input. Redirecting to main menu\");\n\t\t\tstartMenu();\n\n\t\t}\n\t}", "private void clearPCIDFields() {\n jTextField1.setText(\"\");\n jTextField2.setText(\"\");\n jTextField3.setText(\"\");\n jTextField4.setText(\"\");\n }", "public AddCustomer() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n accountInfoPanel = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n uIdTextField = new javax.swing.JTextField();\n eNameTextField = new javax.swing.JTextField();\n jSeparator1 = new javax.swing.JSeparator();\n eAddressTextField = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n eShowButton = new javax.swing.JButton();\n backButton = new javax.swing.JButton();\n eDesignationTextField = new javax.swing.JTextField();\n jLabel4 = new javax.swing.JLabel();\n eContactTextField = new javax.swing.JTextField();\n jLabel6 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n eEmailTextField = new javax.swing.JTextField();\n eEditButton1 = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"Account Info\");\n\n accountInfoPanel.setBackground(new java.awt.Color(255, 255, 255));\n accountInfoPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createTitledBorder(\"\"), \"Account Information\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Segoe Print\", 1, 24), new java.awt.Color(255, 0, 51))); // NOI18N\n accountInfoPanel.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jLabel1.setFont(new java.awt.Font(\"Segoe Print\", 1, 18));\n jLabel1.setText(\"User Id:\");\n accountInfoPanel.add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 60, 130, -1));\n\n jLabel3.setFont(new java.awt.Font(\"Segoe Print\", 1, 18));\n jLabel3.setText(\"Employee name:\");\n accountInfoPanel.add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 110, -1, -1));\n\n uIdTextField.setEditable(false);\n accountInfoPanel.add(uIdTextField, new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 60, 200, -1));\n\n eNameTextField.setEditable(false);\n accountInfoPanel.add(eNameTextField, new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 110, 200, -1));\n accountInfoPanel.add(jSeparator1, new org.netbeans.lib.awtextra.AbsoluteConstraints(110, 410, 290, 40));\n\n eAddressTextField.setEditable(false);\n accountInfoPanel.add(eAddressTextField, new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 260, 200, -1));\n\n jLabel2.setFont(new java.awt.Font(\"Segoe Print\", 1, 18));\n jLabel2.setText(\"Address\");\n accountInfoPanel.add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 260, 130, -1));\n\n eShowButton.setBackground(new java.awt.Color(102, 153, 255));\n eShowButton.setFont(new java.awt.Font(\"Tempus Sans ITC\", 1, 14));\n eShowButton.setText(\"Show\");\n eShowButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n eShowButtonActionPerformed(evt);\n }\n });\n accountInfoPanel.add(eShowButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(210, 340, -1, -1));\n\n backButton.setBackground(new java.awt.Color(102, 153, 255));\n backButton.setFont(new java.awt.Font(\"Tempus Sans ITC\", 1, 14));\n backButton.setText(\"Back\");\n backButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n backButtonActionPerformed(evt);\n }\n });\n accountInfoPanel.add(backButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(390, 340, -1, -1));\n\n eDesignationTextField.setEditable(false);\n accountInfoPanel.add(eDesignationTextField, new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 160, 200, -1));\n\n jLabel4.setFont(new java.awt.Font(\"Segoe Print\", 1, 18));\n jLabel4.setText(\"Designation\");\n accountInfoPanel.add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 160, -1, -1));\n\n eContactTextField.setEditable(false);\n accountInfoPanel.add(eContactTextField, new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 210, 200, -1));\n\n jLabel6.setFont(new java.awt.Font(\"Segoe Print\", 1, 18));\n jLabel6.setText(\"Contact:\");\n accountInfoPanel.add(jLabel6, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 210, -1, -1));\n\n jLabel5.setFont(new java.awt.Font(\"Segoe Print\", 1, 18));\n jLabel5.setText(\"E-mail\");\n accountInfoPanel.add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 300, 130, -1));\n\n eEmailTextField.setEditable(false);\n accountInfoPanel.add(eEmailTextField, new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 300, 200, -1));\n\n eEditButton1.setBackground(new java.awt.Color(102, 153, 255));\n eEditButton1.setFont(new java.awt.Font(\"Tempus Sans ITC\", 1, 14));\n eEditButton1.setText(\"Edit\");\n eEditButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n eEditButton1ActionPerformed(evt);\n }\n });\n accountInfoPanel.add(eEditButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(300, 340, -1, -1));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(397, 397, 397)\n .addComponent(accountInfoPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 509, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(434, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(108, 108, 108)\n .addComponent(accountInfoPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 440, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(122, Short.MAX_VALUE))\n );\n\n pack();\n }", "@FXML\n void displayPD() {\n generalTextArea.clear();\n clearEverything();\n String employeeListPD = company.printByDepartment();\n generalTextArea.appendText(employeeListPD);\n }", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(100, 100, 453, 301);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\tJLabel lblEditTitle = new JLabel(\"EDIT CUSTOMER\");\n\t\tlblEditTitle.setBounds(0, 0, 437, 27);\n\t\tlblEditTitle.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlblEditTitle.setFont(new Font(\"Tahoma\", Font.PLAIN, 22));\n\t\tframe.getContentPane().add(lblEditTitle);\n\t\t\n\t\tJLabel lblNewLabel = new JLabel(\"Customer CPF to edit:\");\n\t\tlblNewLabel.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblNewLabel.setBounds(20, 116, 138, 14);\n\t\tframe.getContentPane().add(lblNewLabel);\n\t\t\n\t\ttextFieldCpfToEdit = new JTextField();\n\t\ttextFieldCpfToEdit.setBounds(178, 115, 219, 20);\n\t\tframe.getContentPane().add(textFieldCpfToEdit);\n\t\ttextFieldCpfToEdit.setColumns(10);\n\t\t\n\t\tJButton btnEdit = new JButton(\"edit\");\n\t\tbtnEdit.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tbtnEdit.setBounds(163, 206, 89, 23);\n\t\tframe.getContentPane().add(btnEdit);\n\t\tbtnEdit.addActionListener(new ActionListener() {\n\t\t\t\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tEditCustomerMenuView.main(null);\n\t\t\t\tframe.dispose();\n\t\t\t}\n\t\t});\n\t}", "private void clearFields() {\n this.subjectField.setText(\"\");\n this.descrField.setText(\"\");\n this.nameField.setText(\"\");\n }", "@SuppressWarnings(\"unchecked\")\r\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\r\n private void initComponents() {\r\n\r\n jDesktopPane1 = new javax.swing.JDesktopPane();\r\n jPanel1 = new javax.swing.JPanel();\r\n cname = new javax.swing.JTextField();\r\n cid = new javax.swing.JTextField();\r\n cadd = new javax.swing.JTextField();\r\n ctel = new javax.swing.JTextField();\r\n jLabel2 = new javax.swing.JLabel();\r\n jLabel3 = new javax.swing.JLabel();\r\n jLabel4 = new javax.swing.JLabel();\r\n jLabel5 = new javax.swing.JLabel();\r\n addbtn = new javax.swing.JLabel();\r\n updatebttn = new javax.swing.JLabel();\r\n CId = new javax.swing.JTextField();\r\n searchbtn = new javax.swing.JLabel();\r\n jScrollPane1 = new javax.swing.JScrollPane();\r\n custable = new javax.swing.JTable();\r\n txtname = new javax.swing.JTextField();\r\n search = new javax.swing.JLabel();\r\n view = new javax.swing.JLabel();\r\n jLabel6 = new javax.swing.JLabel();\r\n backbtn = new javax.swing.JLabel();\r\n jLabel1 = new javax.swing.JLabel();\r\n jLabel7 = new javax.swing.JLabel();\r\n\r\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\r\n\r\n jDesktopPane1.setBackground(new java.awt.Color(189, 195, 199));\r\n jDesktopPane1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\r\n\r\n jPanel1.setBackground(new java.awt.Color(255, 255, 255));\r\n\r\n cname.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n cnameActionPerformed(evt);\r\n }\r\n });\r\n\r\n jLabel2.setText(\"Customer Name\");\r\n\r\n jLabel3.setText(\"Customer Id\");\r\n\r\n jLabel4.setText(\"Address\");\r\n\r\n jLabel5.setText(\"Contact Number\");\r\n\r\n addbtn.setBackground(new java.awt.Color(231, 76, 60));\r\n addbtn.setFont(new java.awt.Font(\"Lato Light\", 0, 14)); // NOI18N\r\n addbtn.setForeground(new java.awt.Color(255, 255, 255));\r\n addbtn.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\r\n addbtn.setText(\"Add\");\r\n addbtn.setOpaque(true);\r\n addbtn.addMouseListener(new java.awt.event.MouseAdapter() {\r\n public void mouseClicked(java.awt.event.MouseEvent evt) {\r\n addbtnbtnMouseClicked(evt);\r\n }\r\n });\r\n\r\n updatebttn.setBackground(new java.awt.Color(231, 76, 60));\r\n updatebttn.setFont(new java.awt.Font(\"Lato Light\", 0, 14)); // NOI18N\r\n updatebttn.setForeground(new java.awt.Color(255, 255, 255));\r\n updatebttn.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\r\n updatebttn.setText(\"Update\");\r\n updatebttn.setOpaque(true);\r\n updatebttn.addMouseListener(new java.awt.event.MouseAdapter() {\r\n public void mouseClicked(java.awt.event.MouseEvent evt) {\r\n updatebttnMouseClicked(evt);\r\n }\r\n });\r\n\r\n CId.setForeground(new java.awt.Color(204, 204, 204));\r\n CId.setText(\"Search by Customer Id..\");\r\n CId.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n CIdActionPerformed(evt);\r\n }\r\n });\r\n\r\n searchbtn.setBackground(new java.awt.Color(231, 76, 60));\r\n searchbtn.setFont(new java.awt.Font(\"Lato Light\", 0, 14)); // NOI18N\r\n searchbtn.setForeground(new java.awt.Color(255, 255, 255));\r\n searchbtn.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\r\n searchbtn.setText(\"Search\");\r\n searchbtn.setOpaque(true);\r\n searchbtn.addMouseListener(new java.awt.event.MouseAdapter() {\r\n public void mouseClicked(java.awt.event.MouseEvent evt) {\r\n searchbtnMouseClicked(evt);\r\n }\r\n });\r\n\r\n custable.setModel(new javax.swing.table.DefaultTableModel(\r\n new Object [][] {\r\n {null, null, null, null, null},\r\n {null, null, null, null, null},\r\n {null, null, null, null, null},\r\n {null, null, null, null, null}\r\n },\r\n new String [] {\r\n \"Name\", \"Id\", \"Address\", \"Phone\", \"Reg:Date\"\r\n }\r\n ) {\r\n boolean[] canEdit = new boolean [] {\r\n true, true, true, false, true\r\n };\r\n\r\n public boolean isCellEditable(int rowIndex, int columnIndex) {\r\n return canEdit [columnIndex];\r\n }\r\n });\r\n jScrollPane1.setViewportView(custable);\r\n\r\n txtname.setForeground(new java.awt.Color(204, 204, 204));\r\n txtname.setText(\"Search by name..\");\r\n txtname.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n txtnameActionPerformed(evt);\r\n }\r\n });\r\n\r\n search.setBackground(new java.awt.Color(231, 76, 60));\r\n search.setFont(new java.awt.Font(\"Lato Light\", 0, 14)); // NOI18N\r\n search.setForeground(new java.awt.Color(255, 255, 255));\r\n search.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\r\n search.setText(\"Search\");\r\n search.setOpaque(true);\r\n search.addMouseListener(new java.awt.event.MouseAdapter() {\r\n public void mouseClicked(java.awt.event.MouseEvent evt) {\r\n searchMouseClicked(evt);\r\n }\r\n });\r\n\r\n view.setBackground(new java.awt.Color(231, 76, 60));\r\n view.setFont(new java.awt.Font(\"Lato Light\", 0, 14)); // NOI18N\r\n view.setForeground(new java.awt.Color(255, 255, 255));\r\n view.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\r\n view.setText(\"View Customer\");\r\n view.setOpaque(true);\r\n view.addMouseListener(new java.awt.event.MouseAdapter() {\r\n public void mouseClicked(java.awt.event.MouseEvent evt) {\r\n viewMouseClicked(evt);\r\n }\r\n });\r\n\r\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\r\n jPanel1.setLayout(jPanel1Layout);\r\n jPanel1Layout.setHorizontalGroup(\r\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel1Layout.createSequentialGroup()\r\n .addContainerGap()\r\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\r\n .addGroup(jPanel1Layout.createSequentialGroup()\r\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(jLabel4)\r\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(jLabel5, javax.swing.GroupLayout.Alignment.TRAILING)\r\n .addComponent(jLabel3)))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\r\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel1Layout.createSequentialGroup()\r\n .addComponent(addbtn, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(updatebttn, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addComponent(cadd, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(ctel, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(cid, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE)))\r\n .addGroup(jPanel1Layout.createSequentialGroup()\r\n .addComponent(jLabel2)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\r\n .addComponent(cname, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGroup(jPanel1Layout.createSequentialGroup()\r\n .addComponent(CId, javax.swing.GroupLayout.PREFERRED_SIZE, 173, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(searchbtn, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))\r\n .addGap(18, 18, 18)\r\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\r\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()\r\n .addComponent(txtname, javax.swing.GroupLayout.PREFERRED_SIZE, 339, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(search, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\r\n .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 514, Short.MAX_VALUE)\r\n .addGroup(jPanel1Layout.createSequentialGroup()\r\n .addGap(0, 0, Short.MAX_VALUE)\r\n .addComponent(view, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)))\r\n .addContainerGap())\r\n );\r\n jPanel1Layout.setVerticalGroup(\r\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel1Layout.createSequentialGroup()\r\n .addGap(22, 22, 22)\r\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\r\n .addComponent(txtname, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(search, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGap(18, 18, 18)\r\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel1Layout.createSequentialGroup()\r\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel1Layout.createSequentialGroup()\r\n .addGap(10, 10, 10)\r\n .addComponent(jLabel2))\r\n .addComponent(cname, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\r\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(cid, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(jLabel3))\r\n .addGap(18, 18, 18)\r\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(cadd, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(jLabel4))\r\n .addGap(18, 18, 18)\r\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(jLabel5)\r\n .addComponent(ctel, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGap(41, 41, 41)\r\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(addbtn, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(updatebttn, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)))\r\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 251, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGap(12, 12, 12)\r\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(CId, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(searchbtn, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(view, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGap(23, 23, 23))\r\n );\r\n\r\n jDesktopPane1.add(jPanel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 90, 820, 390));\r\n\r\n jLabel6.setBackground(new java.awt.Color(255, 255, 255));\r\n jLabel6.setFont(new java.awt.Font(\"Lato Black\", 1, 36)); // NOI18N\r\n jLabel6.setForeground(new java.awt.Color(255, 255, 255));\r\n jLabel6.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\r\n jLabel6.setText(\"Customer\");\r\n jDesktopPane1.add(jLabel6, new org.netbeans.lib.awtextra.AbsoluteConstraints(260, 20, 280, 40));\r\n\r\n backbtn.setBackground(new java.awt.Color(231, 76, 60));\r\n backbtn.setFont(new java.awt.Font(\"Lato Light\", 0, 14)); // NOI18N\r\n backbtn.setForeground(new java.awt.Color(255, 255, 255));\r\n backbtn.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\r\n backbtn.setText(\"Back\");\r\n backbtn.setOpaque(true);\r\n backbtn.addMouseListener(new java.awt.event.MouseAdapter() {\r\n public void mouseClicked(java.awt.event.MouseEvent evt) {\r\n backbtnMouseClicked(evt);\r\n }\r\n });\r\n jDesktopPane1.add(backbtn, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 30, 90, 30));\r\n\r\n jLabel1.setBackground(new java.awt.Color(46, 204, 113));\r\n jLabel1.setOpaque(true);\r\n jDesktopPane1.add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 860, 160));\r\n\r\n jLabel7.setBackground(new java.awt.Color(189, 195, 199));\r\n jLabel7.setOpaque(true);\r\n jDesktopPane1.add(jLabel7, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 120, 860, 390));\r\n\r\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\r\n getContentPane().setLayout(layout);\r\n layout.setHorizontalGroup(\r\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(jDesktopPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n );\r\n layout.setVerticalGroup(\r\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(jDesktopPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 504, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n );\r\n\r\n pack();\r\n }", "public CustomerInformation() {\n try{\n //this.setResizable(false);\n this.setExtendedState(JFrame.MAXIMIZED_BOTH);\n this.setTitle(\"Hotel Management System\");\n this.add(new JLabel(new ImageIcon(\"\")));\n //jLabel7.setLayout(new FlowLayout());\n \n initComponents();\n Class.forName(\"com.mysql.cj.jdbc.Driver\");\n cn = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/hotel\",\"root\",\"root\");\n stat=cn.createStatement();\n rs=stat.executeQuery(\"select c_id from customer order by c_id desc\");\n int id=0;\n if(rs.first())\n {\n id=rs.getInt(1);\n id++;\n jTextField1.setText(\"\"+id);\n }\n else\n {\n jTextField1.setText(\"1\");\n }\n }catch(Exception e){}\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n firstNameTextField = new javax.swing.JTextField();\n lastNameTextField = new javax.swing.JTextField();\n emailTextField = new javax.swing.JTextField();\n phoneNumberTextField = new javax.swing.JTextField();\n jScrollPane1 = new javax.swing.JScrollPane();\n addressTextArea = new javax.swing.JTextArea();\n jLabel7 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n jLabel9 = new javax.swing.JLabel();\n jLabel10 = new javax.swing.JLabel();\n jLabel11 = new javax.swing.JLabel();\n totalCostTextField = new javax.swing.JTextField();\n numOfSensorTextField = new javax.swing.JTextField();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabel1.setFont(new java.awt.Font(\"Lucida Grande\", 0, 24)); // NOI18N\n jLabel1.setText(\"User and Billing Information\");\n\n jLabel2.setFont(new java.awt.Font(\"Lucida Grande\", 0, 14)); // NOI18N\n jLabel2.setText(\"First Name\");\n\n jLabel3.setFont(new java.awt.Font(\"Lucida Grande\", 0, 14)); // NOI18N\n jLabel3.setText(\"Last Name\");\n\n jLabel4.setFont(new java.awt.Font(\"Lucida Grande\", 0, 14)); // NOI18N\n jLabel4.setText(\"Email\");\n\n jLabel5.setFont(new java.awt.Font(\"Lucida Grande\", 0, 14)); // NOI18N\n jLabel5.setText(\"Address\");\n\n jLabel6.setFont(new java.awt.Font(\"Lucida Grande\", 0, 14)); // NOI18N\n jLabel6.setText(\"Phone Number\");\n\n firstNameTextField.setText(\"First Name\");\n lastNameTextField.setText(\"Last Name\");\n emailTextField.setText(\"Email\");\n phoneNumberTextField.setText(\"Phone Number\");\n\n addressTextArea.setColumns(20);\n addressTextArea.setRows(5);\n jScrollPane1.setViewportView(addressTextArea);\n\n jLabel7.setFont(new java.awt.Font(\"Lucida Grande\", 0, 14)); // NOI18N\n jLabel7.setText(\"Installation Fee 200\");\n\n jLabel8.setFont(new java.awt.Font(\"Lucida Grande\", 0, 14)); // NOI18N\n jLabel8.setText(\"Motion Sensor Fee 5.25\");\n\n jLabel9.setFont(new java.awt.Font(\"Lucida Grande\", 0, 14)); // NOI18N\n jLabel9.setText(\"Temperature Sensor 3.85\");\n\n jLabel10.setFont(new java.awt.Font(\"Lucida Grande\", 0, 14)); // NOI18N\n jLabel10.setText(\"Number of Sensors\");\n\n jLabel11.setFont(new java.awt.Font(\"Lucida Grande\", 0, 16)); // NOI18N\n jLabel11.setText(\"Total Cost\");\n\n totalCostTextField.setFont(new java.awt.Font(\"Lucida Grande\", 0, 16)); // NOI18N\n totalCostTextField.setText(\"0\");\n numOfSensorTextField.setText(\"0\");\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(173, 173, 173)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 253, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 264, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 379, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel6)\n .addComponent(jLabel5)\n .addComponent(jLabel4)\n .addComponent(jLabel3)\n .addComponent(jLabel2))\n .addGap(101, 101, 101)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(firstNameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(phoneNumberTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(emailTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(lastNameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 292, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, 86, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, 146, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(totalCostTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 83, Short.MAX_VALUE)\n .addComponent(numOfSensorTextField)))))\n .addContainerGap(158, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(29, 29, 29)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(41, 41, 41)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(firstNameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(lastNameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(emailTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel6)\n .addGap(18, 18, 18)\n .addComponent(jLabel5))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(phoneNumberTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(45, 45, 45)\n .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(numOfSensorTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(31, 31, 31)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(totalCostTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(49, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n }", "public void showClientsDetails(Client client) {\n \n if (client != null) {\n \n //System.out.println(\"Dans Show Client details de addclientcontroller\");\n //System.out.println(client.toString());\n // Fill the labels with info from the client object.\n idField.setText(Integer.toString(client.getId()));\n nomField.setText(client.getNom());\n prenomField.setText(client.getPrenom());\n adresse1Field.setText(client.getAdresse1());\n adresse2Field.setText(client.getAdresse2());\n NPAField.setText(client.getNPA());\n villeField.setText(client.getVille());\n telephone1Field.setText(client.getTelephone1());\n telephone2Field.setText(client.getTelephone2());\n emailField.setText(client.getEmail());\n commentaireField.setText(client.getCommentaire());\n entrepriseField.setText(client.getEntreprise());\n\n } else {\n // Person is null, remove all the text.\n idField.setText(\"\");\n nomField.setText(\"\");\n prenomField.setText(\"\");\n adresse1Field.setText(\"\");\n adresse2Field.setText(\"\");\n NPAField.setText(\"\");\n villeField.setText(\"\");\n telephone1Field.setText(\"\");\n telephone2Field.setText(\"\");\n emailField.setText(\"\");\n commentaireField.setText(\"\");\n entrepriseField.setText(\"\");\n\n }\n }", "public CreateCustomer() {\n initComponents();\n }" ]
[ "0.67744637", "0.67140263", "0.6651133", "0.6650947", "0.65596443", "0.6471673", "0.64561707", "0.64226156", "0.6396042", "0.6376011", "0.6347258", "0.6340239", "0.63313586", "0.6323767", "0.6272314", "0.6259352", "0.625244", "0.62433404", "0.62428623", "0.6231475", "0.6231333", "0.6198158", "0.6196813", "0.61930525", "0.61806315", "0.61729014", "0.6166074", "0.61448807", "0.6141974", "0.6140383", "0.6129895", "0.61278725", "0.61265653", "0.61215067", "0.61181074", "0.6106503", "0.60839325", "0.607465", "0.6067901", "0.6056559", "0.6052307", "0.6033752", "0.6033238", "0.603162", "0.6028705", "0.60256314", "0.6011876", "0.60064304", "0.5980981", "0.59781015", "0.5972706", "0.5971264", "0.59604555", "0.59600335", "0.59550095", "0.59514457", "0.59490615", "0.59336275", "0.59300166", "0.5925696", "0.5908304", "0.59080756", "0.58994526", "0.5889762", "0.5886642", "0.5886173", "0.58835167", "0.586346", "0.5863333", "0.5859637", "0.5857785", "0.584968", "0.5848685", "0.5844997", "0.58411455", "0.58340836", "0.5830163", "0.5827531", "0.5827009", "0.5814273", "0.5810757", "0.58068234", "0.58021325", "0.5789457", "0.5788599", "0.57804817", "0.5779701", "0.5773883", "0.5773262", "0.57704306", "0.57703245", "0.576709", "0.57589185", "0.5750226", "0.57441807", "0.5726976", "0.5726822", "0.57234156", "0.571173", "0.5709563" ]
0.57943976
83
Show the customer information window with all text fields set to a selected customer
@FXML private void handleEdit() { Customer customer = customerTable.getSelectionModel().getSelectedItem(); showCustomerInfoDialog(customer); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void showCustomerInfoDialog(Customer customer) {\n\t\ttry {\n\t\t\t// set up the root for the customer information dialog\n\t\t\tFXMLLoader loader = new FXMLLoader();\n\t\t\tloader.setLocation(C195Application.class.getResource(\"view/AddCustomer.fxml\"));\n\t\t\tloader.setResources(lang);\n\t\t\tAnchorPane customerInfoRoot = (AnchorPane) loader.load();\n\n\t\t\t// set up the stage for the customer information dialog\n\t\t\tStage customerInfoStage = new Stage();\n\t\t\tcustomerInfoStage.setTitle(\"\");\n\t\t\tcustomerInfoStage.initModality(Modality.WINDOW_MODAL);\n\t\t\tcustomerInfoStage.initOwner(stage);\n\n\t\t\t// add a new scene with the root to the stage\n\t\t\tScene scene = new Scene(customerInfoRoot);\n\t\t\tcustomerInfoStage.setScene(scene);\n\n\t\t\t// get the controller for the dialog and pass a reference \n\t\t\t// the customer info dialog stage, and a customer, if one was selected\n\t\t\tAddCustomerController controller = loader.getController();\n\t\t\tcontroller.setupDialog(customerInfoStage, customer);\n\n\t\t\t// show the customer information dialog\n\t\t\tcustomerInfoStage.showAndWait();\n\n\t\t\t// refresh the customer list after an update\n\t\t\tCustomer newCustomer = controller.getNewCustomer();\n\t\t\tif (newCustomer == null) return;\n\n\t\t\tif(customer == null) {\n\t\t\t\tcustomers.add(newCustomer);\n\t\t\t} else {\n\t\t\t\tcustomers.set(customers.indexOf(customer), newCustomer);\n\t\t\t}\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void viewCustomerInfo() {\n\t\tSystem.out.println(\"Please enter customer name\");\n\t\tString firstName=scan.nextLine();\n\t\tCustomer c=Bank.findCustomerByName(firstName);\n\t\tFind find=new Find();\n\t\tfind.viewCustomerDetails(c);\n\n\t\tSystem.out.println(\"Customer: \" + c.getFirstName() + \" \" + c.getLastName() + \" \"+ c.getUserName() + \" \"+ c.getPassword() \n\t\t+ \" \" + c.getDriverLicense() + \" \" + c.getAccountType() + \" \"+ c.getInitialDeposit() + \" \" + \"was viewed\");\n\t\tLogThis.LogIt(\"info\", c.getFirstName() + \" \" + c.getLastName()+ \" was viewed!\");\n\n\t\tSystem.out.println(\"Would you like to find another customer?\");\n\n\t\tSystem.out.println(\"\\t[y]es\");\n\t\tSystem.out.println(\"\\t[n]o\");\n\t\tSystem.out.println(\"\\t[l]og Out\");\n\n\n\t\tString option = scan.nextLine();\n\t\tswitch(option.toLowerCase()) {\n\t\tcase \"y\":\n\t\t\tviewCustomerInfo();\n\t\t\tbreak;\n\t\tcase \"n\":\n\t\t\tstartMenu();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tSystem.out.println(\"Invalid input. Redirecting to main menu\");\n\t\t\tstartMenu();\n\n\t\t}\n\t}", "private void fillExistingCustomer() {\n idField.setText(String.valueOf(existingCustomer.getCustomerID()));\n nameField.setText(existingCustomer.getCustomerName());\n String[] splitAddress = existingCustomer.getAddress().split(\", \");\n addressField.setText(splitAddress[0]);\n if ( splitAddress.length > 1 ) {\n cityField.setText(splitAddress[1]);\n }\n postalField.setText(existingCustomer.getPostalCode());\n phoneField.setText(existingCustomer.getPhone());\n\n FirstLevelDivision division = getDivisionByID(existingCustomer.getDivisionID());\n divisionComboBox.getSelectionModel().select(division);\n countryComboBox.getSelectionModel().select(getCountryByID(division.getCountryID()));\n }", "public AddCustomer() {\n initComponents();\n loadAllToTable();\n\n tblCustomers.getSelectionModel().addListSelectionListener(new ListSelectionListener() {\n\n @Override\n public void valueChanged(ListSelectionEvent e) {\n if (tblCustomers.getSelectedRow() == -1) {\n return;\n }\n\n String cusId = tblCustomers.getValueAt(tblCustomers.getSelectedRow(), 0).toString();\n\n String cusName = tblCustomers.getValueAt(tblCustomers.getSelectedRow(), 1).toString();\n String contact = tblCustomers.getValueAt(tblCustomers.getSelectedRow(), 2).toString();\n String creditLimi = tblCustomers.getValueAt(tblCustomers.getSelectedRow(), 3).toString();\n String credidays = tblCustomers.getValueAt(tblCustomers.getSelectedRow(), 4).toString();\n\n txtCustId.setText(cusId);\n txtCustomerN.setText(cusName);\n\n txtContact.setText(contact);\n txtCreditLimit.setText(creditLimi);\n txtCreditDays.setText(credidays);\n\n }\n });\n }", "public void setCustomer(Customer customer) {\r\n \r\n this.customer = customer;\r\n \r\n if (customer != null) {\r\n // Fill the labels with info from the Customer object\r\n custIdTextField.setText(Integer.toString(customer.getCustomerId()));\r\n custFirstNameTextField.setText(customer.getCustFirstName());\r\n custLastNameTextField.setText(customer.getCustLastName());\r\n custAddressTextField.setText(customer.getCustAddress());\r\n custCityTextField.setText(customer.getCustCity());\r\n custProvinceTextField.setText(customer.getCustProv());\r\n custPostalCodeTextField.setText(customer.getCustPostal());\r\n custCountryTextField.setText(customer.getCustCountry());\r\n custHomePhoneTextField.setText(customer.getCustHomePhone());\r\n custBusinessPhoneTextField.setText(customer.getCustBusPhone());\r\n custEmailTextField.setText(customer.getCustEmail());\r\n if (cboAgentId.getItems().contains(customer.getAgentId())){\r\n cboAgentId.setValue(customer.getAgentId());\r\n }\r\n else{\r\n cboAgentId.getSelectionModel().selectFirst();\r\n }\r\n } else {\r\n custIdTextField.setText(\"\");\r\n custFirstNameTextField.setText(\"\");\r\n custLastNameTextField.setText(\"\");\r\n custAddressTextField.setText(\"\");\r\n custCityTextField.setText(\"\");\r\n custProvinceTextField.setText(\"\");\r\n custPostalCodeTextField.setText(\"\");\r\n custCountryTextField.setText(\"\");\r\n custHomePhoneTextField.setText(\"\");\r\n custBusinessPhoneTextField.setText(\"\");\r\n custEmailTextField.setText(\"\");\r\n cboAgentId.getSelectionModel().selectFirst();\r\n } \r\n }", "public void displayCustomerDetails(){\n\t\tStringBuffer fullname = new StringBuffer();//Creates new string buffer\n\t\tStringBuffer fulladdress = new StringBuffer();//Creates new string buffer\n\t\tfullname.append(\"Full Name: \" + fname + \" \" + lname);\n\t\tfulladdress.append(\"Full Address: \" + address1 + \", \" + address2 + \", \" + postcode);\n\t\tSystem.out.println(fullname);\n\t\tSystem.out.println(fulladdress);\n\t\tSystem.out.println(\"Account No: \" + linkedacc);\n\t\tSystem.out.println(\"Customer Ref: \" + custref);\n\t}", "public void showEditCustomerDialog(Customer customer) {\n \t\n \ttry {\n\t\t\tFXMLLoader loader = new FXMLLoader();\n\t\t\tloader.setLocation(MainApplication.class.getResource(\"view/CustomerEditDialog.fxml\"));\n\t\t\tAnchorPane page = (AnchorPane) loader.load();\n\t\t\tStage editCustomerDialogStage = new Stage(); \n\t\t\teditCustomerDialogStage.setTitle(\"Edit Person\");\n\t\t\teditCustomerDialogStage.initModality(Modality.WINDOW_MODAL);\n\t\t\teditCustomerDialogStage.initOwner(searchCustomerDialogStage);\n\t\t\tScene scene = new Scene(page);\n\t\t\teditCustomerDialogStage.setScene(scene);\n\t\t\tCustomerEditDialogController customerEditDialogController = loader.getController();\n\t\t\tcustomerEditDialogController.setDialogStage(editCustomerDialogStage);\n\t\t\tcustomerEditDialogController.setCustomer(customer);\n\t\t\tcustomerEditDialogController.setSearchCustomerController(this.searchCustomerDialogController);\n\t\t\teditCustomerDialogStage.showAndWait();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t }\n }", "public void showCustomers() {\r\n List<String> customerList = new ArrayList<>();\r\n for (int i = 0; i < customersTable.getItems().size(); i++) {\r\n Customer customer = customersTable.getItems().get(i);\r\n LocalDate date = LocalDate.parse(customer.getDate());\r\n if (date.plusMonths(1).isBefore(LocalDate.now())) {\r\n customerList.add(customer.getFirstName() + \" \" + customer.getLastName());\r\n }\r\n }\r\n String message = \"\";\r\n for (String customer : customerList) {\r\n message += customer + \"\\n\";\r\n }\r\n if (message.equals(\"\")) {\r\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\r\n alert.setTitle(\"The following customers need to be contacted this week\");\r\n alert.setHeaderText(null);\r\n alert.setContentText(\"No customers to be contacted today\");\r\n alert.showAndWait();\r\n } else {\r\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\r\n alert.setTitle(\"The following customers need to be contacted this week\");\r\n alert.setHeaderText(null);\r\n alert.setContentText(message);\r\n alert.showAndWait();\r\n }\r\n }", "public void updateCustomerInfo(){\n nameLabel.setText(customer.getName());\n productWantedLabel.setText(customer.getWantedItem());\n serviceManager.getTotalPrice().updateNode();\n }", "public InputCustomers() {\n initComponents();\n setLocationRelativeTo(null);\n setAsObserver();\n txtSearch.setText(\"-Select a option to search-\");\n libUpdate.setEnabled(false);\n libRemove.setEnabled(false);\n newCustomermessage.setVisible(false);\n newSectionmessage.setVisible(false);\n newjobrolemessage.setVisible(false);\n loadCustomers();\n loadSections();\n loadJobRoles();\n }", "public void showSearchCustomerDialog() {\n\t\ttry {\n\t\t\tFXMLLoader loader = new FXMLLoader();\n\t\t\tloader.setLocation(MainApplication.class.getResource(\"view/SearchCustomerDialog.fxml\"));\n\t\t\tAnchorPane page = (AnchorPane) loader.load();\n\t\t\tStage searchCustomerDialogStage = new Stage();\n\t\t\tthis.searchCustomerDialogStage = searchCustomerDialogStage;\n\t\t\tsearchCustomerDialogStage.setTitle(\"Search Customer\");\n\t\t\tsearchCustomerDialogStage.initModality(Modality.WINDOW_MODAL);\n\t\t\tsearchCustomerDialogStage.initOwner(primaryStage);\n\t\t\tScene scene = new Scene(page);\n\t\t\tsearchCustomerDialogStage.setScene(scene);\n\t\t\tSearchCustomerDialogController searchCustomerDialogController = loader.getController();\n\t\t\tsearchCustomerDialogController.setDialogStage(searchCustomerDialogStage);\n\t\t\tsearchCustomerDialogController.setMainApp(this);\n\t\t\tsetSearchCustomerController(searchCustomerDialogController);\n\t\t\tsearchCustomerDialogStage.showAndWait();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t }\n\t}", "private void updateScreenCustomerDetails(Customer c) {\n // - update main title with customers full name\n tvCustomerMainTitle.setText(customer.toString());\n\n // - update screen with customer ID\n textViewID.setText(customer.getCustomerID());\n\n // - update screen with customer email\n tvCustomerEmail.setText(customer.getEmail());\n\n // - update screen with customer VIP status\n tvCustomerVipStatus.setText(customer.vipStatusToString());\n\n // - update avctive game and lane fields\n }", "public void editCustomer() {\n int id = this.id;\n PersonInfo personInfo = dbHendler.getCustInfo(id);\n String name = personInfo.getName().toString().trim();\n String no = personInfo.getPhoneNumber().toString().trim();\n float custNo = personInfo.get_rootNo();\n String cUSTnO = String.valueOf(custNo);\n int fees = personInfo.get_fees();\n String fEES = Integer.toString(fees);\n int balance = personInfo.get_balance();\n String bALANCE = Integer.toString(balance);\n String nName = personInfo.get_nName().toString().trim();\n String startdate = personInfo.get_startdate();\n int areaID = personInfo.get_area();\n String area = dbHendler.getAreaName(areaID);\n person_name.setText(name);\n contact_no.setText(no);\n rootNo.setText(cUSTnO);\n monthly_fees.setText(fEES);\n balance_.setText(bALANCE);\n nickName.setText(nName);\n this.startdate.setText(startdate);\n // retrieving the index of element u\n int retval = items.indexOf(area);\n\n spinner.setSelection(retval);\n }", "public void showAddCustomerDialog() {\n\t\ttry {\n\t\t\tFXMLLoader loader = new FXMLLoader();\n\t\t\tloader.setLocation(MainApplication.class.getResource(\"view/AddCustomerDialog.fxml\"));\n\t\t\tAnchorPane page = (AnchorPane) loader.load();\n\t\t\tStage dialogStage = new Stage();\n\t\t\tdialogStage.setTitle(\"Add Customer\");\n\t\t\tdialogStage.initModality(Modality.WINDOW_MODAL);\n\t\t\tdialogStage.initOwner(primaryStage);\n\t\t\tScene scene = new Scene(page);\n\t\t\tdialogStage.setScene(scene);\n\t\t\tAddCustomerDialogController controller = loader.getController();\n\t\t\tcontroller.setDialogStage(dialogStage);\n\t\t\tdialogStage.showAndWait();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\t}\n\t}", "public void customerInfo(){\n customerPhone.setLayoutX(305);\n customerPhone.setLayoutY(100);\n customerPhone.setPrefWidth(480);\n customerPhone.setPrefHeight(50);\n customerPhone.setStyle(\"-fx-focus-color: -fx-control-inner-background ; -fx-faint-focus-color: -fx-control-inner-background ; -fx-background-color: #eaebff; -fx-prompt-text-fill: gray\");\n customerPhone.setPromptText(\"Enter customer phone number\");\n customerPhone.setFocusTraversable(false);\n customerPhone.setTooltip(new Tooltip(\"Enter customer phone number\"));\n customerPhone.setAlignment(Pos.CENTER);\n\n\n customerPhone.textProperty().addListener(new ChangeListener<String>() {\n @Override\n public void changed(ObservableValue<? extends String> observable, String oldValue,\n String newValue) {\n if (!newValue.matches(\"\\\\d*\")) {\n customerPhone.setText(newValue.replaceAll(\"[^\\\\d]\", \"\"));\n }\n }\n });\n\n newCustomer = new RadioButton(\"New Customer\");\n newCustomer.setToggleGroup(radiobuttonGroup);\n newCustomer.setSelected(true);\n newCustomer.setLayoutX(810);\n newCustomer.setLayoutY(100);\n existingCustomer = new RadioButton(\"Existing Customer\");\n existingCustomer.setToggleGroup(radiobuttonGroup);\n existingCustomer.setLayoutX(810);\n existingCustomer.setLayoutY(125);\n\n customerName = new TextField();\n customerName.setLayoutX(305);\n customerName.setLayoutY(640);\n customerName.setPrefWidth(480);\n customerName.setPrefHeight(50);\n customerName.setStyle(\"-fx-focus-color: -fx-control-inner-background ; -fx-faint-focus-color: -fx-control-inner-background ; -fx-background-color: #eaebff; -fx-prompt-text-fill: gray\");\n customerName.setPromptText(\"Enter customer name\");\n customerName.setFocusTraversable(false);\n customerName.setTooltip(new Tooltip(\"Enter customer name\"));\n customerName.setAlignment(Pos.CENTER);\n\n\n root.getChildren().addAll(customerPhone, newCustomer, existingCustomer, customerName);\n }", "public void display()\r\n {\r\n System.out.println(\"Description: \" +description);\r\n if(!customersName.equals(\"\")) {\r\n System.out.println(\"Customer Name: \" +customersName);\r\n }\r\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n txtCustomerID = new javax.swing.JTextField();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n btnBack = new javax.swing.JButton();\n jLabel4 = new javax.swing.JLabel();\n btnCreate = new javax.swing.JButton();\n txtCustomerName = new javax.swing.JTextField();\n txtAddress = new javax.swing.JTextField();\n jLabel5 = new javax.swing.JLabel();\n txtContact = new javax.swing.JTextField();\n comboMarket = new javax.swing.JComboBox();\n jLabel6 = new javax.swing.JLabel();\n\n txtCustomerID.setEnabled(false);\n txtCustomerID.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtCustomerIDActionPerformed(evt);\n }\n });\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n jLabel1.setText(\"Customer Name:\");\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n jLabel2.setText(\"Customer ID:\");\n\n jLabel3.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n jLabel3.setText(\"Address:\");\n\n btnBack.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n btnBack.setText(\"<< Back\");\n btnBack.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnBackActionPerformed(evt);\n }\n });\n\n jLabel4.setFont(new java.awt.Font(\"Tahoma\", 1, 24)); // NOI18N\n jLabel4.setText(\"Create New Customer\");\n\n btnCreate.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n btnCreate.setText(\"Create\");\n btnCreate.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnCreateActionPerformed(evt);\n }\n });\n\n jLabel5.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n jLabel5.setText(\"Contact:\");\n\n txtContact.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n txtContactKeyTyped(evt);\n }\n });\n\n comboMarket.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Higher Education Market\", \"Finance Service Market\" }));\n\n jLabel6.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n jLabel6.setText(\"Market:\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(95, 95, 95)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(btnCreate)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(btnBack)\n .addGap(149, 149, 149)\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 267, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(192, 192, 192)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel1)\n .addComponent(jLabel2)\n .addComponent(jLabel6)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel5)\n .addComponent(jLabel3)))\n .addGap(23, 23, 23)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(txtCustomerID)\n .addComponent(txtCustomerName)\n .addComponent(txtAddress, javax.swing.GroupLayout.DEFAULT_SIZE, 204, Short.MAX_VALUE)\n .addComponent(txtContact, javax.swing.GroupLayout.Alignment.TRAILING))))\n .addComponent(comboMarket, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(241, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(47, 47, 47)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnBack))\n .addGap(48, 48, 48)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtCustomerID, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2))\n .addGap(38, 38, 38)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtCustomerName, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel1))\n .addGap(30, 30, 30)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(txtAddress, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(31, 31, 31)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(txtContact, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(39, 39, 39)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(comboMarket, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel6))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 69, Short.MAX_VALUE)\n .addComponent(btnCreate, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(34, 34, 34))\n );\n }", "public void showCustomerOrders() {\n\t\ttextArea.setText(\"\");\n\t\tfor (int i = 0; i < driver.getOrderDB().getCustomerOrderList().size(); i++) {\n\t\t\tOrder order = (driver.getOrderDB().getCustomerOrderList().get(i));\n\t\t\ttextArea.append(\"Order \" + order.getId() + \" was created by \"\n\t\t\t\t\t+ order.getCurrentlyLoggedInStaff().getName() + \"\\nCustomer ID : \"\n\t\t\t\t\t+ ((Customer) order.getPerson()).getId() + \"\\nItems in this order :\");\n\t\t\tfor (int j = 0; j < order.getOrderEntryList().size(); j++) {\n\t\t\t\tStockItem stockItem = order.getOrderEntryList().get(j);\n\t\t\t\ttextArea.append(\"\\n \" + stockItem.getQuantity() + \" \"\n\t\t\t\t\t\t+ stockItem.getProduct().getProductName() + \" \"\n\t\t\t\t\t\t+ (stockItem.getProduct().getRetailPrice() * stockItem.getQuantity()));\n\t\t\t}\n\t\t\ttextArea.append(\"\\nThe total order value is \" + order.getGrandTotalOfOrder() + \"\\n\\n\\n\");\n\t\t}\n\t}", "public void read() {\r\n\t\tJTextField txtCustomerNo = new JTextField();\r\n\t\ttxtCustomerNo.setText(\"\" + this.getCustomerNo());\r\n\t\tJTextField txtTitle = new JTextField();\r\n\t\ttxtTitle.requestFocus();\r\n\t\tJTextField txtFirstName = new JTextField();\r\n\t\tJTextField txtSurname = new JTextField();\r\n\t\tJTextField txtAddress = new JTextField();\r\n\t\tJTextField txtPhoneNo = new JTextField();\r\n\t\tJTextField txtEmail = new JTextField();\r\n\r\n\t\t\r\n\t\tObject[] message = { \"Customer Number:\", txtCustomerNo, \"Title:\", txtTitle, \"First Name:\", txtFirstName,\r\n\t\t\t\t\"Surname:\", txtSurname, \"Address:\", txtAddress, \"Phone Number:\", txtPhoneNo, \"Email:\", txtEmail, };\r\n\t\t\r\n\r\n\t\tint option = JOptionPane.showConfirmDialog(null, message, \"Enter customer details\",\r\n\t\t\t\tJOptionPane.OK_CANCEL_OPTION);\r\n\t\t\r\n\t\tName txtName = new Name(txtTitle.getText(), txtFirstName.getText(), txtSurname.getText());\r\n\r\n\t\tif (option == JOptionPane.OK_OPTION) {\r\n\t\t\tthis.name = txtName;\r\n\t\t\tthis.address = txtAddress.getText();\r\n\t\t\tthis.phoneNo = txtPhoneNo.getText();\r\n\t\t\tthis.emailAddress = txtEmail.getText();\r\n\t\t}\r\n\t}", "public void actionPerformed(ActionEvent e){\n\t\t\t\tcustJTextArea.setText(null);\n\t\t\t\t\tif(customers.size() >= 1){\n\t\t\t\t\t\tfor(Customer customer: customers){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcustJTextArea.append(\"\\n Customer Id: \"+customer.getCustId()\n\t\t\t\t\t\t\t\t\t\t+\"\\n Name: \"+customer.getCustName()\n\t\t\t\t\t\t\t\t\t\t+\"\\n Address: \"+customer.getCustAddress()\n\t\t\t\t\t\t\t\t\t\t+\"\\n Email: \"+customer.getCustEmail()\n\t\t\t\t\t\t\t\t\t\t+\"\\n Phone: \"+customer.getCustTelephone()\n\t\t\t\t\t\t\t\t\t\t+\"\\n\");\n\t\t\t\t\t\t\tcustJTextArea.setCaretPosition(0);\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"No Customers Found\");\n\t\t\t\t\t}\n\t\t\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tTableWindow customersWindow = new TableWindow(dbHandler.getArrayOfCustomers(),Customer.getTitles());\r\n\t\t\t customersWindow.setVisible(true);\r\n\t\t\t}", "public void showEditCustomerScene(Customer customer) throws IOException {\n this.showEditCustomerScene(customer,null);\r\n }", "public void actionPerformed(ActionEvent e){\n\t\t\tif(customers.size() >= 1){\n\t\t\t\t\ttry{\n\t\t\t\t\t\tfor(Customer customer: customers){\n\t\t\t\t\t\tif(customer.getCustId() == Integer.parseInt(custIdCombo.getSelectedItem().toString())){\n\t\t\t\t\t\t\tcustJTextArea.setText(\" Customer Id: \"+customer.getCustId()\n\t\t\t\t\t\t\t\t\t+\"\\n Name: \"+customer.getCustName()\n\t\t\t\t\t\t\t\t\t+\"\\n Address: \"+customer.getCustAddress()\n\t\t\t\t\t\t\t\t\t+\"\\n Email: \"+customer.getCustEmail()\n\t\t\t\t\t\t\t\t\t+\"\\n Phone: \"+customer.getCustTelephone());\n\t\t\t\t\t\t\tcustIdCombo.setSelectedIndex(0);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}catch(NumberFormatException nfe){\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please Select a Valid Customer.\");\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"No Customers Found\");\n\t\t\t\t}\n\t\t\t}", "@Then(\"^user enters customer details$\")\n\tpublic void user_enters_customer_details(DataTable customer) {\n\t\tfor(Map<String, String> data :customer.asMaps())\n\t\t{\n\t\t\t \tdriver.findElement(By.name(\"name\")).sendKeys(data.get(\"customer\"));\n\t\t\t driver.findElement(By.xpath(\"//input[@type='radio'][@value='m']\")).click();\n\t\t\t driver.findElement(By.xpath(\"//input[@type='date']\")).sendKeys(data.get(\"DOB\"));\n//\t\t\t driver.findElement(By.name(\"addr\")).sendKeys(data.get(\"add\"));\n\t\t\t driver.findElement(By.name(\"city\")).sendKeys(data.get(\"city\"));\n\t\t\t driver.findElement(By.name(\"state\")).sendKeys(data.get(\"state\"));\n\t\t\t driver.findElement(By.name(\"pinno\")).sendKeys(data.get(\"pin\"));\n\t\t\t driver.findElement(By.name(\"telephoneno\")).sendKeys(data.get(\"mobile\"));\n\t\t\t driver.findElement(By.name(\"emailid\")).sendKeys(data.get(\"emailid\"));\n\t\t\t driver.findElement(By.name(\"password\")).sendKeys(data.get(\"password\"));\n\t\t\t \n\t\t}\n\t \n\t \n\t}", "public void actionPerformed(ActionEvent e){\n\t\t\tif(customers.size() >= 1){\n\t\t\t\tif(custNameCombo.getSelectedIndex() != 0){\n\t\t\t\t\tfor(Customer customer: customers){\n\t\t\t\t\t\tif(customer.getCustName() == custNameCombo.getSelectedItem()){\n\t\t\t\t\t\t\tcustJTextArea.setText(\" Customer Id: \"+customer.getCustId()\n\t\t\t\t\t\t\t\t\t+\"\\n Name: \"+customer.getCustName()\n\t\t\t\t\t\t\t\t\t+\"\\n Address: \"+customer.getCustAddress()\n\t\t\t\t\t\t\t\t\t+\"\\n Email: \"+customer.getCustEmail()\n\t\t\t\t\t\t\t\t\t+\"\\n Phone: \"+customer.getCustTelephone());\n\t\t\t\t\t\t\tcustNameCombo.setSelectedIndex(0);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please Select a Valid Customer\");\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tJOptionPane.showMessageDialog(null, \"No Customers Found\");\n\t\t\t}\n\t\t\t}", "private void displayCusInterface() {\n\t\t// Display menu options\n\t\tSystem.out.println(\n\t\t\t\"\\nAVAILABLE CUSTOMER COMMANDS:\" +\n\t\t\t\"\\n1: Add customer\" +\n\t\t\t\"\\n2: Show customer info, given customer name\" +\n\t\t\t\"\\n3: Find price for flights between two cities\" +\n\t\t\t\"\\n4: Find all routes between two cities\" +\n\t\t\t\"\\n5: Find all routes between two cities of a given airline\" +\n\t\t\t\"\\n6: Find all routes with available seats between two cities on given day\" +\n\t\t\t\"\\n7: For a given airline, find all routes with available seats between two cities on given day\" +\n\t\t\t\"\\n8: Add reservation\" +\n\t\t\t\"\\n9: Show reservation info, given reservation number\" +\n\t\t\t\"\\n10: Buy ticket from existing reservation\" +\n\t\t\t\"\\n11: Quit\\n\");\n\n\t\t// Get user input\n\t\tSystem.out.print(\"Enter command number: \");\n\t\tinputString = scan.nextLine();\n\t\t// Convert input to integer, if not convertable, set to 0 (invalid)\n\t\ttry { choice = Integer.parseInt(inputString);\n\t\t} catch(NumberFormatException e) {choice = 0;}\n\n\t\t// Handle user choices\n\t\tif(choice == 1) {\n\t\t\tSystem.out.print(\"Please enter Salutation (Mr/Mrs/Ms): \");\n\t\t\tString salutation = scan.nextLine();\n\t\t\tSystem.out.print(\"Please enter First Name: \");\n\t\t\tString first = scan.nextLine();\n\t\t\tSystem.out.print(\"Please enter Last Name: \");\n\t\t\tString last = scan.nextLine();\n\t\t\ttry { // Check if customer already exists\n\t\t\t\tquery = \"select * from CUSTOMER where first_name = ? and last_name = ?\";\n\t\t\t\tPreparedStatement updateStatement = connection.prepareStatement(query);\n\t\t\t\tupdateStatement.setString(1,first);\n\t\t\t\tupdateStatement.setString(2,last);\n\t\t\t\tupdateStatement.executeUpdate();\n\t\t\t\tresultSet = updateStatement.executeQuery(query);\n\t\t\t\t// If name doesn't exist, continue and get additional user input\n\t\t\t\tif(!resultSet.next()) {\n\t\t\t\t\tSystem.out.print(\"Please enter Street Address: \");\n\t\t\t\t\tString street = scan.nextLine();\n\t\t\t\t\tSystem.out.print(\"Please enter City: \");\n\t\t\t\t\tString city = scan.nextLine();\n\t\t\t\t\tSystem.out.print(\"Please enter State (2 letter): \");\n\t\t\t\t\tString state = scan.nextLine();\n\t\t\t\t\tSystem.out.print(\"Please enter Phone Number: \");\n\t\t\t\t\tString phone = scan.nextLine();\n\t\t\t\t\tSystem.out.print(\"Please enter Email address: \");\n\t\t\t\t\tString email = scan.nextLine();\n\t\t\t\t\tSystem.out.print(\"Please enter Credit Card Number: \");\n\t\t\t\t\tString cardNum = scan.nextLine();\n\t\t\t\t\tSystem.out.print(\"Please enter Credit Card Expiration Date (MM/YYYY): \");\n\t\t\t\t\tString expire = scan.nextLine();\n\t\t\t\t\tcus1(salutation, first, last, street, city, state, phone, email, cardNum, expire);\n\t\t\t\t} else System.out.println(\"ERROR: Customer already exists!\");\n\t\t\t} catch(SQLException Ex) {System.out.println(\"Error running the sample queries. Machine Error: \" + Ex.toString());}\n\t\t}\n\t\telse if(choice == 2) {\n\t\t\tSystem.out.print(\"Please enter Customer First Name: \");\n\t\t\tString first = scan.nextLine();\n\t\t\tSystem.out.print(\"Please enter Last Name: \");\n\t\t\tString last = scan.nextLine();\n\t\t\tcus2(first, last);\n\t\t}\n\t\telse if(choice == 3) {\n\t\t\tSystem.out.print(\"Please enter City One (3 letter): \");\n\t\t\tString one = scan.nextLine();\n\t\t\tSystem.out.print(\"Please enter City Two (3 letter): \");\n\t\t\tString two = scan.nextLine();\n\t\t\tcus3(one, two);\n\t\t}\n\t\telse if(choice == 4) {\n\t\t\tSystem.out.print(\"Please enter Departure City (3 letter): \");\n\t\t\tString depart = scan.nextLine();\n\t\t\tSystem.out.print(\"Please enter Arrival City (3 letter): \");\n\t\t\tString arrive = scan.nextLine();\n\t\t\tcus4(depart, arrive);\n\t\t}\n\t\telse if(choice == 5) {\n\t\t\tSystem.out.print(\"Please enter Departure City (3 letter): \");\n\t\t\tString depart = scan.nextLine();\n\t\t\tSystem.out.print(\"Please enter Arrival City (3 letter): \");\n\t\t\tString arrive = scan.nextLine();\n\t\t\tSystem.out.print(\"Please enter Airline name (full name): \");\n\t\t\tString airline = scan.nextLine();\n\t\t\tcus5(depart, arrive, airline);\n\t\t}\n\t\telse if(choice == 6) {\n\t\t\tSystem.out.print(\"Please enter Departure City (3 letter): \");\n\t\t\tString depart = scan.nextLine();\n\t\t\tSystem.out.print(\"Please enter Arrival City (3 letter): \");\n\t\t\tString arrive = scan.nextLine();\n\t\t\tSystem.out.print(\"Please enter Date (MM/DD/YYYY): \");\n\t\t\tString date = scan.nextLine();\n\t\t\tcus6(depart, arrive, date);\n\t\t}\n\t\telse if(choice == 7) {\n\t\t\tSystem.out.print(\"Please enter Departure City (3 letter): \");\n\t\t\tString depart = scan.nextLine();\n\t\t\tSystem.out.print(\"Please enter Arrival City (3 letter): \");\n\t\t\tString arrive = scan.nextLine();\n\t\t\tSystem.out.print(\"Please enter Date (MM/DD/YYYY): \");\n\t\t\tString date = scan.nextLine();\n\t\t\tSystem.out.print(\"Please enter Airline name (full name): \");\n\t\t\tString airline = scan.nextLine();\n\t\t\tcus7(depart, arrive, date, airline);\n\t\t}\n\t\telse if(choice == 8) {\n\t\t\t// Flight numbers\n\t\t\tString flight1 = null, flight2 = null, flight3 = null, flight4 = null;\n\t\t\t// Flight dates\n\t\t\tString dateN1 = null, dateN2 = null, dateN3 = null, dateN4 = null;\n\t\t\t// Booleans for if flight is available or wasn't entered\n\t\t\tboolean flight1A = false, flight2A = false, flight3A = false, flight4A = false;\n\t\t\tSystem.out.println(\"ADDING RESERVATION:\\nAdd first flight:\");\n\t\t\t// Get first leg (required)\n\t\t\tSystem.out.print(\" Flight Number: \");\n\t\t\tflight1 = scan.nextLine();\n\t\t\tSystem.out.print(\" Departure Date (MM/DD/YYYY): \");\n\t\t\tdateN1 = scan.nextLine();\n\t\t\t// Get second leg (optional)\n\t\t\tSystem.out.print(\"Add another leg in this direction? (Y/N): \");\n\t\t\tinputString = scan.nextLine();\n\t\t\tif(inputString.equals(\"Y\") || inputString.equals(\"y\")) {\n\t\t\t\tSystem.out.print(\" Flight Number: \");\n\t\t\t\tflight2 = scan.nextLine();\n\t\t\t\tSystem.out.print(\" Departure Date (MM/DD/YYYY): \");\n\t\t\t\tdateN2 = scan.nextLine();\n\t\t\t}\n\t\t\t// Get return trip first leg (optional)\n\t\t\tSystem.out.print(\"Add return trip? (Y/N): \");\n\t\t\tinputString = scan.nextLine();\n\t\t\tif(inputString.equals(\"Y\") || inputString.equals(\"y\")) {\n\t\t\t\tSystem.out.print(\" Flight Number: \");\n\t\t\t\tflight3 = scan.nextLine();\n\t\t\t\tSystem.out.print(\" Departure Date (MM/DD/YYYY): \");\n\t\t\t\tdateN3 = scan.nextLine();\n\t\t\t\t// Get return trip second leg (optional, requires return trip first leg)\n\t\t\t\tSystem.out.print(\"Add another leg in this direction? (Y/N): \");\n\t\t\t\tinputString = scan.nextLine();\n\t\t\t\tif(inputString.equals(\"Y\") || inputString.equals(\"y\")) {\n\t\t\t\t\tSystem.out.print(\" Flight Number: \");\n\t\t\t\t\tflight4 = scan.nextLine();\n\t\t\t\t\tSystem.out.print(\" Departure Date (MM/DD/YYYY): \");\n\t\t\t\t\tdateN4 = scan.nextLine();\n\t\t\t\t}\n\t\t\t}\n\t\t\ttry { // Check if seats are available in non-null flights\n\t\t\t\tPreparedStatement updateStatement;\n\t\t\t\tif(flight2 != null && !flight1.isEmpty()) { // Check if flight1 seat is available\n\t\t\t\t\tquery = \"select flight_number from flight f1, plane where f1.flight_number = ? AND plane.plane_capacity > (select count(D.flight_number) from DETAIL D where D.flight_number = ?)\";\n\t\t\t\t\tupdateStatement = connection.prepareStatement(query);\n\t\t\t\t\tupdateStatement.setString(1,flight1);\n\t\t\t\t\tupdateStatement.setString(2,flight1);\n\t\t\t\t\tupdateStatement.executeUpdate();\n\t\t\t\t\tresultSet = updateStatement.executeQuery(query);\n\t\t\t\t\tif(resultSet.next())\n\t\t\t\t\t\tflight1A = true;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tflight1A = true;\n\t\t\t\tif(flight2 != null && !flight2.isEmpty()) { // Check if flight2 seat is available\n\t\t\t\t\tquery = \"select flight_number from flight f1, plane where f1.flight_number = ? AND plane.plane_capacity > (select count(D.flight_number) from DETAIL D where D.flight_number = ?)\";\n\t\t\t\t\tupdateStatement = connection.prepareStatement(query);\n\t\t\t\t\tupdateStatement.setString(1,flight2);\n\t\t\t\t\tupdateStatement.setString(2,flight2);\n\t\t\t\t\tupdateStatement.executeUpdate();\n\t\t\t\t\tresultSet = updateStatement.executeQuery(query);\n\t\t\t\t\tif(resultSet.next())\n\t\t\t\t\t\tflight2A = true;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tflight2A = true;\n\t\t\t\tif(flight3 != null && !flight3.isEmpty()) { // Check if flight3 seat is available\n\t\t\t\t\tquery = \"select flight_number from flight f1, plane where f1.flight_number = ? AND plane.plane_capacity > (select count(D.flight_number) from DETAIL D where D.flight_number = ?)\";\n\t\t\t\t\tupdateStatement = connection.prepareStatement(query);\n\t\t\t\t\tupdateStatement.setString(1,flight3);\n\t\t\t\t\tupdateStatement.setString(2,flight3);\n\t\t\t\t\tupdateStatement.executeUpdate();\n\t\t\t\t\tresultSet = updateStatement.executeQuery(query);\n\t\t\t\t\tif(resultSet.next())\n\t\t\t\t\t\tflight3A = true;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tflight3A = true;\n\t\t\t\tif(flight4 != null && !flight4.isEmpty()) { // Check if flight4 seat is available\n\t\t\t\t\tquery = \"select flight_number from flight f1, plane where f1.flight_number = ? AND plane.plane_capacity > (select count(D.flight_number) from DETAIL D where D.flight_number = ?)\";\n\t\t\t\t\tupdateStatement = connection.prepareStatement(query);\n\t\t\t\t\tupdateStatement.setString(1,flight4);\n\t\t\t\t\tupdateStatement.setString(2,flight4);\n\t\t\t\t\tupdateStatement.executeUpdate();\n\t\t\t\t\tresultSet = updateStatement.executeQuery(query);\n\t\t\t\t\tif(resultSet.next())\n\t\t\t\t\t\tflight4A = true;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tflight4A = true;\n\t\t\t\t// If all non-null flights are available, get cid and call cus8 to gather data and make reservation\n\t\t\t\tif(flight1A && flight2A && flight3A && flight4A) {\n\t\t\t\t\t// Get customer CID\n\t\t\t\t\tSystem.out.print(\"Seating available!\\n Please enter CID: \");\n\t\t\t\t\tString cid = scan.nextLine();\n\t\t\t\t\tcus8(flight1, flight2, flight3, flight4, dateN1, dateN2, dateN3, dateN4, cid);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tSystem.out.println(\"SEATING UNAVAILABLE ON ONE OR MORE FLIGHTS\");\n\t\t\t} catch(SQLException Ex) {System.out.println(\"Error running the sample queries. Machine Error: \" + Ex.toString());}\n\t\t}\n\t\telse if(choice == 9) {\n\t\t\tSystem.out.print(\"Please enter reservation number: \");\n\t\t\tString num = scan.nextLine();\n\t\t\tcus9(num);\n\t\t}\n\t\telse if(choice == 10) {\n\t\t\tSystem.out.print(\"Please enter reservation number: \");\n\t\t\tString num = scan.nextLine();\n\t\t\tcus10(num);\n\t\t}\n\t\telse if(choice == 11) exit = true;\n\t\telse System.out.println(\"INVALID CHOICE\");\n\n\t\tif(!exit) { // Exiting will ignore loop and drop to main to exit properly\n\t\t\t// Repeat menu after user controlled pause\n\t\t\tSystem.out.print(\"Press Enter to Continue... \");\n\t\t\tscan.nextLine();\n\t\t\tdisplayCusInterface();\n\t\t}\n\t}", "public CustomerDetailsView displayDetailsView(char mode, Customer customer) { \r\n\r\n\t\tif(customerDetailsView == null) {\r\n\t\t\tcustomerDetailsView = new CustomerDetailsView() {\r\n\t\t\t\tpublic void cancelAction() {\r\n\t\t\t\t\tif(validateScreenBeforeClose()) {\r\n\t\t\t\t\t\tdisposeDetailsView();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\t\tApplicationMaster.addScreen(customerDetailsView);\r\n\t\t}\r\n\r\n\t\tcustomerDetailsView.setTitle(getValue(\"TTLscrxxxxx001CustomerDetailsScreen\"));\r\n\t\tcustomerDetailsView.setScreenMode(mode);\r\n\t\tcustomerDetailsView.setController(this);\r\n\r\n\t\tif(mode != CustomerDetailsView.ADD && customer != null) {\r\n\t\t\tcustomerDetailsView.populateScreen(customer);\r\n\t\t}\r\n\r\n\t\tif(customerSearchView != null && customerSearchView.isVisible()) {\r\n\t\t\tcustomerSearchView.setVisible(false);\r\n\t\t}\r\n\r\n\t\tcustomerDetailsView.setVisible(true);\r\n\t\treturn customerDetailsView;\r\n\t}", "public PnNewCustomer() {\n initComponents();\n }", "public Customer_Edit() {\n initComponents();\n getMenu_Catagory();\n getMenu();\n showmenu_table();\n getPromotion();\n getPromotion_Menu();\n showpromotion_table();\n getIngredient();\n getStock();\n if(c.getmaintenance()==true){\n t.setid(\"01\");\n }else{\n }\n getorder();\n getorder_menu();\n table_number_txt.setText(t.getid());\n showorder_table();\n }", "public void actionPerformed(ActionEvent e){\n\t\t\t\tif(editCustIdCombo.getSelectedIndex() != 0){\n\t\t\t\t\tif(editCustName.getText().isEmpty() || editCustAddress.getText().isEmpty()){\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Required Fields: \\n Customer Name \\n Customer Address\");\t\n\t\t\t\t\t}else{\n\t\t\t\t\t\tfor(Customer customer: customers){\n\t\t\t\t\t\t\tif(customer.getCustId() == Integer.parseInt(editCustIdCombo.getSelectedItem().toString())){\n\t\t\t\t\t\t\t\tcustomer.setCustName(editCustName.getText());\n\t\t\t\t\t\t\t\tcustomer.setCustAddress(editCustAddress.getText());\n\t\t\t\t\t\t\t\tcustomer.setCustEmail(editCustEmail.getText());\n\t\t\t\t\t\t\t\tcustomer.setCustTelephone(Integer.parseInt(editCustPhone.getText()));\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Customer Updated.\");\n\t\t\t\t\t\t\t\teditCustIdCombo.setSelectedIndex(0);\n\t\t\t\t\t\t\t\teditCustName.setText(\"\");\n\t\t\t\t\t\t\t\teditCustAddress.setText(\"\");\n\t\t\t\t\t\t\t\teditCustEmail.setText(\"\");\n\t\t\t\t\t\t\t\teditCustPhone.setText(\"\");\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please Select a Valid Customer.\");\n\t\t\t\t}\n\t\t\t}", "public void printCustomerDetails()\r\n {\r\n System.out.println(title + \" \" + firstName + \" \" \r\n + lastName + \"\\n\" +getAddress() \r\n + \"\\nCard Number: \" + cardNumber \r\n + \"\\nPoints available: \" + points);\r\n }", "public void setCustomer(String Cus){\n\n this.customer = Cus;\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n lblCustPurchase = new javax.swing.JLabel();\n btnGetId = new javax.swing.JButton();\n lblCustNum = new javax.swing.JLabel();\n btnGetTot = new javax.swing.JButton();\n btnBack = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n jButton1 = new javax.swing.JButton();\n jComboBox1 = new javax.swing.JComboBox();\n jLabel3 = new javax.swing.JLabel();\n jComboBox2 = new javax.swing.JComboBox();\n jButton2 = new javax.swing.JButton();\n jLabel2 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n lblCustPurchase.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n lblCustPurchase.setForeground(new java.awt.Color(0, 153, 153));\n lblCustPurchase.setText(\"Details of a particular customer:\");\n getContentPane().add(lblCustPurchase, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 220, 310, 30));\n\n btnGetId.setBackground(new java.awt.Color(0, 102, 102));\n btnGetId.setFont(new java.awt.Font(\"Tahoma\", 1, 13)); // NOI18N\n btnGetId.setText(\"Get Information\");\n btnGetId.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnGetIdActionPerformed(evt);\n }\n });\n getContentPane().add(btnGetId, new org.netbeans.lib.awtextra.AbsoluteConstraints(610, 220, 140, 38));\n\n lblCustNum.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n lblCustNum.setForeground(new java.awt.Color(0, 153, 153));\n lblCustNum.setText(\"Total number of customers till date: \");\n getContentPane().add(lblCustNum, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 330, -1, -1));\n\n btnGetTot.setBackground(new java.awt.Color(0, 102, 102));\n btnGetTot.setFont(new java.awt.Font(\"Tahoma\", 1, 13)); // NOI18N\n btnGetTot.setText(\"Get Total\");\n btnGetTot.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnGetTotActionPerformed(evt);\n }\n });\n getContentPane().add(btnGetTot, new org.netbeans.lib.awtextra.AbsoluteConstraints(480, 330, 140, 30));\n\n btnBack.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/inventorymanagementsystem/back.png\"))); // NOI18N\n btnBack.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnBackActionPerformed(evt);\n }\n });\n getContentPane().add(btnBack, new org.netbeans.lib.awtextra.AbsoluteConstraints(750, 440, 120, 30));\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n jLabel1.setForeground(new java.awt.Color(0, 153, 153));\n jLabel1.setText(\"Details of all the customers:\");\n getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 170, -1, -1));\n\n jButton1.setBackground(new java.awt.Color(0, 102, 102));\n jButton1.setFont(new java.awt.Font(\"Tahoma\", 1, 13)); // NOI18N\n jButton1.setText(\"Get Information\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(410, 170, 140, 30));\n\n jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(db.Combo(new String(\"customerId\"),new String(\"customer\"))));\n jComboBox1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jComboBox1ActionPerformed(evt);\n }\n });\n getContentPane().add(jComboBox1, new org.netbeans.lib.awtextra.AbsoluteConstraints(460, 220, 140, 30));\n\n jLabel3.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n jLabel3.setForeground(new java.awt.Color(0, 153, 153));\n jLabel3.setText(\"Payment information of a particular customer:\");\n getContentPane().add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 270, 450, 40));\n\n jComboBox2.setModel(new javax.swing.DefaultComboBoxModel(db.Combo(new String(\"customerId\"),new String(\"customer\"))));\n jComboBox2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jComboBox2ActionPerformed(evt);\n }\n });\n getContentPane().add(jComboBox2, new org.netbeans.lib.awtextra.AbsoluteConstraints(580, 280, 100, 30));\n\n jButton2.setBackground(new java.awt.Color(0, 102, 102));\n jButton2.setFont(new java.awt.Font(\"Tahoma\", 1, 13)); // NOI18N\n jButton2.setText(\"Get Information\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton2, new org.netbeans.lib.awtextra.AbsoluteConstraints(690, 280, 150, 30));\n\n jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/inventorymanagementsystem/query bg.jpg\"))); // NOI18N\n getContentPane().add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, -1, -1));\n\n pack();\n }", "public pnlCustomer() {\n initComponents();\n }", "@Override\r\n public void actionPerformed(ActionEvent e) {\r\n switch (e.getActionCommand()) {\r\n case \"Mas Customer Chosen\":\r\n if (editing) {\r\n event.setCustomer(cc.getCustomer());\r\n } else {\r\n customer = cc.getCustomer();\r\n jTPhone.setText(customer.getPhone());\r\n jTName.setText(customer.getName());\r\n }\r\n break;\r\n case \"BBQ Customer Chosen\":\r\n if (editing) {\r\n } else {\r\n customer = cc.getCustomer();\r\n jTBBQName.setText(customer.getName());\r\n jTBBQPhone.setText(customer.getPhone());\r\n jTBBQCusAddress.setText(customer.getAddress());\r\n jTBBQCusEmail.setText(customer.getEmail());\r\n }\r\n break;\r\n case \"Category Meat\":\r\n showCategoryItem(\"Meat\");\r\n break;\r\n case \"Category Accompaniment\":\r\n showCategoryItem(\"Accompaniment\");\r\n break;\r\n case \"Category Salad\":\r\n showCategoryItem(\"Salad\");\r\n break;\r\n case \"Category Grill\":\r\n showCategoryItem(\"Grill\");\r\n break;\r\n case \"added to basket\":\r\n addToBasket();\r\n jTBBQTotalPrice.setText(bbqControl.getBuilder().getTotalPrice() + \"\");\r\n break;\r\n }\r\n }", "@RequestMapping(\"/showForm\")\n\tpublic String showForm(Model theModel) {\n\t\tCustomer customer = new Customer();\n\n\t\t// add Customer object to the model\n\t\ttheModel.addAttribute(\"customer\", customer);\n\t\t\n\t\treturn \"customer-form\";\n\t}", "public static void editCustomers(ArrayList<Customer> customerList) throws IOException\r\n\t{\r\n\t\tclearScreen();\r\n\t\t\r\n\t\t//Stores the user input\r\n\t\tString input = new String();\r\n\t\t// Stores the first customer on the upcoming screen to print\r\n\t\tint customerCount = 0;\r\n\t\t// Stores the number of customers printed on the last screen\r\n\t\tint screenCount = 0;\r\n\t\t// Stores the integer value of input, if it exists. Otherwise, stores -1\r\n\t\tint inputNum;\r\n\t\t// Whether or not it is the last screen\r\n\t\tboolean lastScreen;\r\n\t\t// Whether or not it is the first screen\r\n\t\tboolean firstScreen;\r\n\t\t\r\n\t\t// quits when user enters \"q\"\r\n\t\twhile(!(input.equalsIgnoreCase(\"q\")))\r\n\t\t{\r\n\t\t\tSystem.out.println(\"[CUSTOMER EDITOR SELECTION]\\n\");\r\n\t\t\t\r\n\t\t\t// Stores the index of the last customer to print to the screen, assuming it doesn't exceed the array size\r\n\t\t\tint maxPrint = customerCount + 19;\r\n\t\t\t// Resets the number of lines printed to this screen\r\n\t\t\tscreenCount = 0;\r\n\t\t\t\r\n\t\t\t// Print customers until 18 are displayed or the customers ArrayList end is reached.\r\n\t\t\tfor(int i = customerCount; i < maxPrint; i++)\r\n\t\t\t{\r\n\t\t\t\tif(!(i == customerList.size()))\r\n\t\t\t\t{\r\n\t\t\t\t\t// Prints customer info\r\n\t\t\t\t\tSystem.out.println(customerList.get(customerCount).getCustomerID() + \". \" + customerList.get(customerCount).getName());\r\n\t\t\t\t\tscreenCount ++;\r\n\t\t\t\t\t// Ensures customerCount always stores the first customer to print on the upcoming screen\r\n\t\t\t\t\tcustomerCount = i+1;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t// Ends the loop if the array size is exceeded\r\n\t\t\t\t\ti = maxPrint;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Sets lastscreen & firstscreen to the correct values based on which screen was displayed\r\n\t\t\tif(customerCount == customerList.size())\r\n\t\t\t\tlastScreen = true;\r\n\t\t\telse\r\n\t\t\t\tlastScreen = false;\r\n\t\t\tif(customerCount <= 19)\r\n\t\t\t\tfirstScreen = true;\r\n\t\t\telse\r\n\t\t\t\tfirstScreen = false;\r\n\t\t\t\t\r\n\t\t\t// Notifies the user if the customers ArrayList is empty\r\n\t\t\tif(customerList.size() == 0)\r\n\t\t\t\tSystem.out.println(\"[No customers found.]\");\r\n\t\t\t\r\n\t\t\t// Prints the controls based on which screen was displayed\r\n\t\t\tSystem.out.print(\"\\n[CONTROLS] (#: edit customer) \");\r\n\t\t\tif(!(lastScreen))\r\n\t\t\t\tSystem.out.print(\"(n: next screen) \");\r\n\t\t\tif(!(firstScreen))\r\n\t\t\t\tSystem.out.print(\"(p: previous screen) \");\r\n\t\t\tSystem.out.println(\"(q: quit)\");\r\n\t\t\t\r\n\t\t\t// Gets a valid user input based on which screen was displayed\r\n\t\t\tinput = \"\";\r\n\t\t\t// Resets customerID input\r\n\t\t\tinputNum = -1;\r\n\t\t\twhile(!((input.equalsIgnoreCase(\"n\") &&!(lastScreen)) || (input.equalsIgnoreCase(\"p\") && !(firstScreen)) || input.equalsIgnoreCase(\"q\") || isCustomer(inputNum)))\r\n\t\t\t{\r\n\t\t\t\tinput = inputString(false);\r\n\t\t\t\t// Attempt to convert the user input to an integer\r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\tinputNum = Integer.parseInt(input);\r\n\t\t\t\t}\r\n\t\t\t\tcatch(NumberFormatException e)\r\n\t\t\t\t{\r\n\t\t\t\t\tinputNum = -1;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Edits the customer if the user entered a valid CustomerID\r\n\t\t\tif(isCustomer(inputNum))\r\n\t\t\t{\r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\t// Edit details for the selected customer\r\n\t\t\t\t\teditCustomer(findCustomer(inputNum));\r\n\t\t\t\t\t// Quit customer editor\r\n\t\t\t\t\tinput = \"q\";\r\n\t\t\t\t}\r\n\t\t\t\tcatch(CustomerNotFoundException e)\r\n\t\t\t\t{\r\n\t\t\t\t\t// This should never happen. If it does, this is indicative of a bug somewhere in editCustomers()\r\n\t\t\t\t\tSystem.out.println(\"Not a real customer\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Displays the previous screen if requested (otherwise show the next screen or quit);\r\n\t\t\telse if(input.equalsIgnoreCase(\"p\"))\r\n\t\t\t{\r\n\t\t\t\tcustomerCount -= screenCount + 19;\r\n\t\t\t\tif(customerCount < 0)\r\n\t\t\t\t\tcustomerCount = 0;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tclearScreen();\r\n\t\t}\r\n\t}", "public Customer displayCustomer(int cid);", "public customerentry() {\n initComponents();\n }", "public CustomerListForm() {\n initComponents();\n findAllData();\n }", "public CustomerViewDetails() {\n initComponents();\n Toolkit tk = Toolkit.getDefaultToolkit();\n int x = (int) tk.getScreenSize().getWidth();\n int y = (int) tk.getScreenSize().getHeight();\n this.setSize(x, y);\n }", "private void addCustomer() {\n try {\n FixCustomerController fixCustomerController = ServerConnector.getServerConnector().getFixCustomerController();\n\n FixCustomer fixCustomer = new FixCustomer(txtCustomerName.getText(), txtCustomerNIC.getText(), String.valueOf(comJobrole.getSelectedItem()), String.valueOf(comSection.getSelectedItem()), txtCustomerTele.getText());\n\n boolean addFixCustomer = fixCustomerController.addFixCustomer(fixCustomer);\n\n if (addFixCustomer) {\n JOptionPane.showMessageDialog(null, \"Customer Added Success !!\");\n } else {\n JOptionPane.showMessageDialog(null, \"Customer Added Fail !!\");\n }\n\n } catch (NotBoundException | MalformedURLException | RemoteException ex) {\n new ServerNull().setVisible(true);\n } catch (ClassNotFoundException | IOException ex) {\n Logger.getLogger(InputCustomers.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public CustomerGUI() {\n\t initComponents();\n\t }", "public customer_table() {\n initComponents();\n getContentPane().setBackground(Color.pink);\n Toolkit tk=Toolkit.getDefaultToolkit();\n int w=(int)tk.getScreenSize().getWidth();\n int h=(int)tk.getScreenSize().getHeight();\n this.setSize(w, h);\n String ss=\"SELECT *FROM `customer`\";\n Showtable(ss);\n a.setText(\"\"+Autoid());\n d.setText(\"@gmail.com\");\n e.setText(\"+880 \");\n \n }", "public Customer_Form() {\n initComponents();\n setSize(890,740);\n \n \n }", "private void showSponsorInfo(){\r\n if (txtSponsorCode.getText().equals(\"\") ){\r\n showSponsorSearch();\r\n }else {\r\n SponsorMaintenanceForm frmSponsor = new SponsorMaintenanceForm('D',\r\n txtSponsorCode.getText().toString().trim());\r\n frmSponsor.showForm(mdiForm,DISPLAY_TITLE,true);\r\n \r\n }\r\n isSponsorSearchRequired =false;\r\n }", "public void showCustomerInvoices()\n\t{\n\t\ttry {\n\t\t\tcon=DriverManager.getConnection(\"jdbc:mysql://localhost:3306/MundheElectronics1\",\"root\",\"vishakha\");\n\t\t\tString sql=\"select * from CustomerData order by Customer_Name asc\";\n\t\t\tps=con.prepareStatement(sql);\n\t\t\trs=ps.executeQuery();\n\t\t\ttblCustomer.setModel(DbUtils.resultSetToTableModel(rs));\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@FXML\n private void addCustomerButton(ActionEvent event)\n {\n bankLogic.addCustomer(textFieldName.getText(),Long.parseLong(textFieldPnr.getText()));\n for (int i = 0; i < bankLogic.getCustomers().size(); i++)\n {\n System.out.println(bankLogic.getCustomers().get(i).toString());\n }\n \n }", "@Override\n\tpublic void viewCustomers(Session session){\n\t\ttry{\n\t\t\tSystem.out.print(\"*----*****-------List of Customers-------*****----*\\n\");\n\t\t\t\n\t\t\t//pass these input items to client controller\n\t\t\tviewCustomers=mvc.viewCustomers(session);\n\n\t\t\tSystem.out.println(\"CustomerId\"+\" \"+\"UserName\");\n\t\t\tfor(int i = 0; i < viewCustomers.size(); i++) {\n\t System.out.println(viewCustomers.get(i)+\"\\t\"+\"\\t\");\n\t }\n\t System.out.println(\"<------------------------------------------------>\");\n\t\t\t//System.out.println(viewCustomers);\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(\"Online Market App- Remove Customer Exception: \" +e.getMessage());\n\t\t}\n\t}", "public void view() {\n\t\t\t\n\t\t\tSystem.out.println(\"Poping up window to show each order of customer @ AdminSaleController\");\n\t\t\tCustomerOrderMain vo = new CustomerOrderMain();\n\t\t vo.start(ps);\n\t\t\t\n\t\t}", "public void setCustomerName(String name) {\r\n this.name.setText(name);\r\n }", "public void initData(Customer customer) {\n selectedCustomer = customer;\n\n idTextbox.setText(Integer.toString(selectedCustomer.getID()));\n nameTextbox.setText(selectedCustomer.getName());\n addressTextbox.setText(selectedCustomer.getAddress());\n divisionDropdown.getSelectionModel().select(selectedCustomer.getDivision());\n countryDropdown.getSelectionModel().select(selectedCustomer.getCountry());\n phoneTextbox.setText(selectedCustomer.getPhone());\n postalCodeTextbox.setText(selectedCustomer.getPostalCode());\n\n countryDropdown.setItems(getCountries());\n divisionDropdown.setItems(getDivisions(selectedCustomer.getCountry()));\n }", "@SuppressWarnings(\"unchecked\")\r\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\r\n private void initComponents() {\r\n\r\n jDesktopPane1 = new javax.swing.JDesktopPane();\r\n jPanel1 = new javax.swing.JPanel();\r\n cname = new javax.swing.JTextField();\r\n cid = new javax.swing.JTextField();\r\n cadd = new javax.swing.JTextField();\r\n ctel = new javax.swing.JTextField();\r\n jLabel2 = new javax.swing.JLabel();\r\n jLabel3 = new javax.swing.JLabel();\r\n jLabel4 = new javax.swing.JLabel();\r\n jLabel5 = new javax.swing.JLabel();\r\n addbtn = new javax.swing.JLabel();\r\n updatebttn = new javax.swing.JLabel();\r\n CId = new javax.swing.JTextField();\r\n searchbtn = new javax.swing.JLabel();\r\n jScrollPane1 = new javax.swing.JScrollPane();\r\n custable = new javax.swing.JTable();\r\n txtname = new javax.swing.JTextField();\r\n search = new javax.swing.JLabel();\r\n view = new javax.swing.JLabel();\r\n jLabel6 = new javax.swing.JLabel();\r\n backbtn = new javax.swing.JLabel();\r\n jLabel1 = new javax.swing.JLabel();\r\n jLabel7 = new javax.swing.JLabel();\r\n\r\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\r\n\r\n jDesktopPane1.setBackground(new java.awt.Color(189, 195, 199));\r\n jDesktopPane1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\r\n\r\n jPanel1.setBackground(new java.awt.Color(255, 255, 255));\r\n\r\n cname.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n cnameActionPerformed(evt);\r\n }\r\n });\r\n\r\n jLabel2.setText(\"Customer Name\");\r\n\r\n jLabel3.setText(\"Customer Id\");\r\n\r\n jLabel4.setText(\"Address\");\r\n\r\n jLabel5.setText(\"Contact Number\");\r\n\r\n addbtn.setBackground(new java.awt.Color(231, 76, 60));\r\n addbtn.setFont(new java.awt.Font(\"Lato Light\", 0, 14)); // NOI18N\r\n addbtn.setForeground(new java.awt.Color(255, 255, 255));\r\n addbtn.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\r\n addbtn.setText(\"Add\");\r\n addbtn.setOpaque(true);\r\n addbtn.addMouseListener(new java.awt.event.MouseAdapter() {\r\n public void mouseClicked(java.awt.event.MouseEvent evt) {\r\n addbtnbtnMouseClicked(evt);\r\n }\r\n });\r\n\r\n updatebttn.setBackground(new java.awt.Color(231, 76, 60));\r\n updatebttn.setFont(new java.awt.Font(\"Lato Light\", 0, 14)); // NOI18N\r\n updatebttn.setForeground(new java.awt.Color(255, 255, 255));\r\n updatebttn.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\r\n updatebttn.setText(\"Update\");\r\n updatebttn.setOpaque(true);\r\n updatebttn.addMouseListener(new java.awt.event.MouseAdapter() {\r\n public void mouseClicked(java.awt.event.MouseEvent evt) {\r\n updatebttnMouseClicked(evt);\r\n }\r\n });\r\n\r\n CId.setForeground(new java.awt.Color(204, 204, 204));\r\n CId.setText(\"Search by Customer Id..\");\r\n CId.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n CIdActionPerformed(evt);\r\n }\r\n });\r\n\r\n searchbtn.setBackground(new java.awt.Color(231, 76, 60));\r\n searchbtn.setFont(new java.awt.Font(\"Lato Light\", 0, 14)); // NOI18N\r\n searchbtn.setForeground(new java.awt.Color(255, 255, 255));\r\n searchbtn.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\r\n searchbtn.setText(\"Search\");\r\n searchbtn.setOpaque(true);\r\n searchbtn.addMouseListener(new java.awt.event.MouseAdapter() {\r\n public void mouseClicked(java.awt.event.MouseEvent evt) {\r\n searchbtnMouseClicked(evt);\r\n }\r\n });\r\n\r\n custable.setModel(new javax.swing.table.DefaultTableModel(\r\n new Object [][] {\r\n {null, null, null, null, null},\r\n {null, null, null, null, null},\r\n {null, null, null, null, null},\r\n {null, null, null, null, null}\r\n },\r\n new String [] {\r\n \"Name\", \"Id\", \"Address\", \"Phone\", \"Reg:Date\"\r\n }\r\n ) {\r\n boolean[] canEdit = new boolean [] {\r\n true, true, true, false, true\r\n };\r\n\r\n public boolean isCellEditable(int rowIndex, int columnIndex) {\r\n return canEdit [columnIndex];\r\n }\r\n });\r\n jScrollPane1.setViewportView(custable);\r\n\r\n txtname.setForeground(new java.awt.Color(204, 204, 204));\r\n txtname.setText(\"Search by name..\");\r\n txtname.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n txtnameActionPerformed(evt);\r\n }\r\n });\r\n\r\n search.setBackground(new java.awt.Color(231, 76, 60));\r\n search.setFont(new java.awt.Font(\"Lato Light\", 0, 14)); // NOI18N\r\n search.setForeground(new java.awt.Color(255, 255, 255));\r\n search.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\r\n search.setText(\"Search\");\r\n search.setOpaque(true);\r\n search.addMouseListener(new java.awt.event.MouseAdapter() {\r\n public void mouseClicked(java.awt.event.MouseEvent evt) {\r\n searchMouseClicked(evt);\r\n }\r\n });\r\n\r\n view.setBackground(new java.awt.Color(231, 76, 60));\r\n view.setFont(new java.awt.Font(\"Lato Light\", 0, 14)); // NOI18N\r\n view.setForeground(new java.awt.Color(255, 255, 255));\r\n view.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\r\n view.setText(\"View Customer\");\r\n view.setOpaque(true);\r\n view.addMouseListener(new java.awt.event.MouseAdapter() {\r\n public void mouseClicked(java.awt.event.MouseEvent evt) {\r\n viewMouseClicked(evt);\r\n }\r\n });\r\n\r\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\r\n jPanel1.setLayout(jPanel1Layout);\r\n jPanel1Layout.setHorizontalGroup(\r\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel1Layout.createSequentialGroup()\r\n .addContainerGap()\r\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\r\n .addGroup(jPanel1Layout.createSequentialGroup()\r\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(jLabel4)\r\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(jLabel5, javax.swing.GroupLayout.Alignment.TRAILING)\r\n .addComponent(jLabel3)))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\r\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel1Layout.createSequentialGroup()\r\n .addComponent(addbtn, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(updatebttn, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addComponent(cadd, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(ctel, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(cid, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE)))\r\n .addGroup(jPanel1Layout.createSequentialGroup()\r\n .addComponent(jLabel2)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\r\n .addComponent(cname, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGroup(jPanel1Layout.createSequentialGroup()\r\n .addComponent(CId, javax.swing.GroupLayout.PREFERRED_SIZE, 173, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(searchbtn, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))\r\n .addGap(18, 18, 18)\r\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\r\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()\r\n .addComponent(txtname, javax.swing.GroupLayout.PREFERRED_SIZE, 339, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(search, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\r\n .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 514, Short.MAX_VALUE)\r\n .addGroup(jPanel1Layout.createSequentialGroup()\r\n .addGap(0, 0, Short.MAX_VALUE)\r\n .addComponent(view, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)))\r\n .addContainerGap())\r\n );\r\n jPanel1Layout.setVerticalGroup(\r\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel1Layout.createSequentialGroup()\r\n .addGap(22, 22, 22)\r\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\r\n .addComponent(txtname, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(search, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGap(18, 18, 18)\r\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel1Layout.createSequentialGroup()\r\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel1Layout.createSequentialGroup()\r\n .addGap(10, 10, 10)\r\n .addComponent(jLabel2))\r\n .addComponent(cname, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\r\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(cid, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(jLabel3))\r\n .addGap(18, 18, 18)\r\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(cadd, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(jLabel4))\r\n .addGap(18, 18, 18)\r\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(jLabel5)\r\n .addComponent(ctel, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGap(41, 41, 41)\r\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(addbtn, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(updatebttn, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)))\r\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 251, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGap(12, 12, 12)\r\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(CId, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(searchbtn, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(view, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGap(23, 23, 23))\r\n );\r\n\r\n jDesktopPane1.add(jPanel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 90, 820, 390));\r\n\r\n jLabel6.setBackground(new java.awt.Color(255, 255, 255));\r\n jLabel6.setFont(new java.awt.Font(\"Lato Black\", 1, 36)); // NOI18N\r\n jLabel6.setForeground(new java.awt.Color(255, 255, 255));\r\n jLabel6.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\r\n jLabel6.setText(\"Customer\");\r\n jDesktopPane1.add(jLabel6, new org.netbeans.lib.awtextra.AbsoluteConstraints(260, 20, 280, 40));\r\n\r\n backbtn.setBackground(new java.awt.Color(231, 76, 60));\r\n backbtn.setFont(new java.awt.Font(\"Lato Light\", 0, 14)); // NOI18N\r\n backbtn.setForeground(new java.awt.Color(255, 255, 255));\r\n backbtn.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\r\n backbtn.setText(\"Back\");\r\n backbtn.setOpaque(true);\r\n backbtn.addMouseListener(new java.awt.event.MouseAdapter() {\r\n public void mouseClicked(java.awt.event.MouseEvent evt) {\r\n backbtnMouseClicked(evt);\r\n }\r\n });\r\n jDesktopPane1.add(backbtn, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 30, 90, 30));\r\n\r\n jLabel1.setBackground(new java.awt.Color(46, 204, 113));\r\n jLabel1.setOpaque(true);\r\n jDesktopPane1.add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 860, 160));\r\n\r\n jLabel7.setBackground(new java.awt.Color(189, 195, 199));\r\n jLabel7.setOpaque(true);\r\n jDesktopPane1.add(jLabel7, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 120, 860, 390));\r\n\r\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\r\n getContentPane().setLayout(layout);\r\n layout.setHorizontalGroup(\r\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(jDesktopPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n );\r\n layout.setVerticalGroup(\r\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(jDesktopPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 504, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n );\r\n\r\n pack();\r\n }", "@Override\n public void showCustomerDetails() {\n System.out.println(customerLoggedIn);\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jScrollPane1 = new javax.swing.JScrollPane();\n tableCekCustomer = new javax.swing.JTable();\n jLabel2 = new javax.swing.JLabel();\n tfSearch = new javax.swing.JTextField();\n jLabel7 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n\n setTitle(\"Daftar Customer\");\n\n jPanel1.setBackground(new java.awt.Color(0, 102, 153));\n jPanel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n\n tableCekCustomer.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n \"ID Transaksi\", \"No. Identitas\", \"Jenis Identitas\", \"Nama Customer\", \"No. Hp\", \"Alamat\"\n }\n ) {\n boolean[] canEdit = new boolean [] {\n false, false, false, false, false, false\n };\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n tableCekCustomer.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n tableCekCustomerMouseClicked(evt);\n }\n });\n jScrollPane1.setViewportView(tableCekCustomer);\n\n jLabel2.setForeground(new java.awt.Color(255, 255, 255));\n jLabel2.setText(\"Search\");\n\n tfSearch.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n tfSearchActionPerformed(evt);\n }\n });\n tfSearch.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyPressed(java.awt.event.KeyEvent evt) {\n tfSearchKeyPressed(evt);\n }\n });\n\n jLabel7.setFont(new java.awt.Font(\"Tahoma\", 1, 24)); // NOI18N\n jLabel7.setForeground(new java.awt.Color(255, 255, 255));\n jLabel7.setText(\"Daftar Customer\");\n\n jLabel6.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/images/img/medium 130.png\"))); // NOI18N\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel6)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 395, Short.MAX_VALUE)\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(tfSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 164, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(9, 9, 9)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 664, Short.MAX_VALUE)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addGap(70, 70, 70)\n .addComponent(jLabel7)\n .addGap(0, 0, Short.MAX_VALUE)))\n .addGap(9, 9, 9)))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel6)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(tfSearch, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2)))\n .addContainerGap(262, Short.MAX_VALUE))\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(40, 40, 40)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 241, Short.MAX_VALUE)\n .addContainerGap()))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel2 = new javax.swing.JPanel();\n jPanel1 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n txtname = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n txtcnic = new javax.swing.JTextField();\n txtemail = new javax.swing.JTextField();\n jLabel6 = new javax.swing.JLabel();\n txtdob = new javax.swing.JTextField();\n cmbgender = new javax.swing.JComboBox();\n jLabel7 = new javax.swing.JLabel();\n txtfname = new javax.swing.JTextField();\n jButton3 = new javax.swing.JButton();\n jLabel4 = new javax.swing.JLabel();\n jButton2 = new javax.swing.JButton();\n jButton1 = new javax.swing.JButton();\n\n setBackground(java.awt.SystemColor.inactiveCaption);\n setBorder(null);\n setClosable(true);\n setTitle(\"Add Customer\");\n setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n setFrameIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/Preppy-icon.png\"))); // NOI18N\n setVisible(false);\n\n jPanel2.setBackground(new java.awt.Color(255, 255, 255));\n\n jPanel1.setBackground(new java.awt.Color(255, 255, 255));\n jPanel1.setForeground(new java.awt.Color(102, 51, 255));\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jLabel1.setText(\"Name\");\n\n jLabel3.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jLabel3.setText(\"Gender\");\n\n txtname.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 1, true));\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jLabel2.setText(\"Email\");\n\n jLabel5.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jLabel5.setText(\"CNIC\");\n\n txtcnic.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 1, true));\n\n txtemail.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 1, true));\n\n jLabel6.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jLabel6.setText(\"Date Of Birth\");\n\n txtdob.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 1, true));\n\n cmbgender.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \" \", \"Male\", \"Female\" }));\n\n jLabel7.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jLabel7.setText(\"Father Name\");\n\n txtfname.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 1, true));\n\n jButton3.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/btncalendar4.png\"))); // NOI18N\n jButton3.setToolTipText(\"Calendar\");\n jButton3.setContentAreaFilled(false);\n jButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton3ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(60, 60, 60)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 148, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 139, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 139, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(txtemail, javax.swing.GroupLayout.PREFERRED_SIZE, 198, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtcnic, javax.swing.GroupLayout.PREFERRED_SIZE, 198, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(txtdob, javax.swing.GroupLayout.PREFERRED_SIZE, 126, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 148, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(60, 60, 60)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jLabel7, javax.swing.GroupLayout.DEFAULT_SIZE, 139, Short.MAX_VALUE)\n .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(9, 9, 9)))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(txtname)\n .addComponent(cmbgender, 0, 198, Short.MAX_VALUE))\n .addComponent(txtfname, javax.swing.GroupLayout.PREFERRED_SIZE, 198, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addContainerGap(73, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtname, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtfname, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, 31, Short.MAX_VALUE)\n .addComponent(cmbgender))\n .addGap(8, 8, 8)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(txtemail)\n .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, 33, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtcnic, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel6)\n .addComponent(txtdob, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(24, Short.MAX_VALUE))\n );\n\n jLabel4.setBackground(new java.awt.Color(255, 255, 255));\n jLabel4.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n jLabel4.setText(\"Add Customer\");\n\n jButton2.setBackground(new java.awt.Color(0, 0, 0));\n jButton2.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jButton2.setForeground(new java.awt.Color(255, 255, 255));\n jButton2.setText(\"Exit\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n jButton1.setBackground(new java.awt.Color(0, 0, 0));\n jButton1.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jButton1.setForeground(new java.awt.Color(255, 255, 255));\n jButton1.setText(\"Submit\");\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 jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(59, 59, 59)\n .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 87, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(132, 132, 132))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(181, 181, 181)\n .addComponent(jLabel4)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(19, 19, 19)\n .addComponent(jLabel4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap())\n );\n\n jPanel1.getAccessibleContext().setAccessibleName(\"\");\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(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n LogoutButton = new javax.swing.JButton();\n jPanel5 = new javax.swing.JPanel();\n VerticalLabel2 = new javax.swing.JLabel();\n jSeparator3 = new javax.swing.JSeparator();\n NameLabel = new javax.swing.JLabel();\n PhoneLabel = new javax.swing.JLabel();\n AddressLabel = new javax.swing.JLabel();\n CompanyLabel = new javax.swing.JLabel();\n EmailLabel = new javax.swing.JLabel();\n CustomerNameField = new javax.swing.JTextField();\n CustomerEmailField = new javax.swing.JTextField();\n CustomerCompanyField = new javax.swing.JTextField();\n CustomerAddressField = new javax.swing.JTextField();\n CustomerPhoneField = new javax.swing.JTextField();\n jPanel6 = new javax.swing.JPanel();\n SearchCustomerButton = new javax.swing.JButton();\n CancelButton = new javax.swing.JButton();\n NavigationLabel = new javax.swing.JLabel();\n\n setBackground(new java.awt.Color(255, 255, 255));\n\n LogoutButton.setText(\"Logout\");\n\n jPanel5.setBackground(new java.awt.Color(255, 255, 204));\n jPanel5.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n\n VerticalLabel2.setFont(new java.awt.Font(\"Lucida Grande\", 1, 24)); // NOI18N\n VerticalLabel2.setText(\"Create Customer\");\n\n NameLabel.setText(\"Name:\");\n\n PhoneLabel.setText(\"Phone:\");\n\n AddressLabel.setText(\"Address:\");\n\n CompanyLabel.setText(\"Company:\");\n\n EmailLabel.setText(\"Email:\");\n\n CustomerNameField.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n CustomerNameFieldActionPerformed(evt);\n }\n });\n\n CustomerEmailField.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n CustomerEmailFieldActionPerformed(evt);\n }\n });\n\n CustomerCompanyField.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n CustomerCompanyFieldActionPerformed(evt);\n }\n });\n\n CustomerAddressField.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n CustomerAddressFieldActionPerformed(evt);\n }\n });\n\n CustomerPhoneField.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n CustomerPhoneFieldActionPerformed(evt);\n }\n });\n\n org.jdesktop.layout.GroupLayout jPanel5Layout = new org.jdesktop.layout.GroupLayout(jPanel5);\n jPanel5.setLayout(jPanel5Layout);\n jPanel5Layout.setHorizontalGroup(\n jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(jPanel5Layout.createSequentialGroup()\n .add(88, 88, 88)\n .add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(AddressLabel)\n .add(CompanyLabel)\n .add(EmailLabel)\n .add(PhoneLabel)\n .add(NameLabel))\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(CustomerNameField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 219, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(CustomerPhoneField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 219, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(CustomerEmailField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 219, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(CustomerCompanyField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 219, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(CustomerAddressField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 219, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(101, Short.MAX_VALUE))\n .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel5Layout.createSequentialGroup()\n .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.CENTER)\n .add(jSeparator3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 268, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(VerticalLabel2))\n .add(94, 94, 94))\n );\n jPanel5Layout.setVerticalGroup(\n jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(jPanel5Layout.createSequentialGroup()\n .addContainerGap()\n .add(VerticalLabel2)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(jSeparator3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)\n .add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(NameLabel)\n .add(CustomerNameField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\n .add(18, 18, 18)\n .add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(PhoneLabel)\n .add(CustomerPhoneField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\n .add(18, 18, 18)\n .add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(AddressLabel)\n .add(CustomerAddressField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\n .add(18, 18, 18)\n .add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(CompanyLabel)\n .add(CustomerCompanyField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\n .add(18, 18, 18)\n .add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(EmailLabel)\n .add(CustomerEmailField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(56, Short.MAX_VALUE))\n );\n\n jPanel6.setBackground(new java.awt.Color(255, 255, 204));\n\n SearchCustomerButton.setFont(new java.awt.Font(\"Lucida Grande\", 1, 13)); // NOI18N\n SearchCustomerButton.setText(\"Accept\");\n\n CancelButton.setFont(new java.awt.Font(\"Lucida Grande\", 1, 13)); // NOI18N\n CancelButton.setText(\"Cancel\");\n\n org.jdesktop.layout.GroupLayout jPanel6Layout = new org.jdesktop.layout.GroupLayout(jPanel6);\n jPanel6.setLayout(jPanel6Layout);\n jPanel6Layout.setHorizontalGroup(\n jPanel6Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(jPanel6Layout.createSequentialGroup()\n .addContainerGap(511, Short.MAX_VALUE)\n .add(SearchCustomerButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 100, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(CancelButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 100, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n jPanel6Layout.setVerticalGroup(\n jPanel6Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(jPanel6Layout.createSequentialGroup()\n .addContainerGap()\n .add(jPanel6Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(SearchCustomerButton, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE)\n .add(CancelButton, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addContainerGap())\n );\n\n NavigationLabel.setFont(new java.awt.Font(\"Lucida Grande\", 0, 10)); // NOI18N\n NavigationLabel.setText(\"Home > Customer > Create Customer\");\n\n org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()\n .addContainerGap()\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(layout.createSequentialGroup()\n .add(jPanel6, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n .add(layout.createSequentialGroup()\n .add(NavigationLabel)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .add(LogoutButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 75, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))))\n .add(layout.createSequentialGroup()\n .add(126, 126, 126)\n .add(jPanel5, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(0, 0, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(layout.createSequentialGroup()\n .add(0, 0, Short.MAX_VALUE)\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(NavigationLabel)\n .add(LogoutButton))\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(jPanel5, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)\n .add(jPanel6, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n }", "CreateCustomer(JFrame master, Connection conn) {\n\t\tsuper(\"Create New Customer\");\n\t\tthis.conn = conn;\n\t\tgetContentPane().setLayout(new FormLayout(new ColumnSpec[] {\n\t\t\t\tFormFactory.RELATED_GAP_COLSPEC,\n\t\t\t\tColumnSpec.decode(\"default:grow\"),\n\t\t\t\tFormFactory.RELATED_GAP_COLSPEC,\n\t\t\t\tColumnSpec.decode(\"default:grow\"),\n\t\t\t\tFormFactory.RELATED_GAP_COLSPEC,\n\t\t\t\tColumnSpec.decode(\"default:grow\"),\n\t\t\t\tFormFactory.RELATED_GAP_COLSPEC,\n\t\t\t\tColumnSpec.decode(\"default:grow\"),},\n\t\t\tnew RowSpec[] {\n\t\t\t\tFormFactory.RELATED_GAP_ROWSPEC,\n\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\n\t\t\t\tFormFactory.RELATED_GAP_ROWSPEC,\n\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\n\t\t\t\tFormFactory.RELATED_GAP_ROWSPEC,\n\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\n\t\t\t\tFormFactory.RELATED_GAP_ROWSPEC,\n\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\n\t\t\t\tFormFactory.RELATED_GAP_ROWSPEC,\n\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\n\t\t\t\tFormFactory.RELATED_GAP_ROWSPEC,\n\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\n\t\t\t\tFormFactory.RELATED_GAP_ROWSPEC,\n\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\n\t\t\t\tFormFactory.RELATED_GAP_ROWSPEC,\n\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\n\t\t\t\tFormFactory.RELATED_GAP_ROWSPEC,\n\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\n\t\t\t\tFormFactory.RELATED_GAP_ROWSPEC,\n\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\n\t\t\t\tFormFactory.RELATED_GAP_ROWSPEC,\n\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\n\t\t\t\tFormFactory.RELATED_GAP_ROWSPEC,\n\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\n\t\t\t\tFormFactory.RELATED_GAP_ROWSPEC,\n\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\n\t\t\t\tFormFactory.RELATED_GAP_ROWSPEC,\n\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\n\t\t\t\tFormFactory.RELATED_GAP_ROWSPEC,\n\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\n\t\t\t\tFormFactory.RELATED_GAP_ROWSPEC,\n\t\t\t\tFormFactory.DEFAULT_ROWSPEC,}));\n\t\t\n\t\tJLabel lblGender = new JLabel(\"Gender\");\n\t\tgetContentPane().add(lblGender, \"2, 2\");\n\t\t\n\t\tJLabel lblTitle = new JLabel(\"Title\");\n\t\tgetContentPane().add(lblTitle, \"4, 2\");\n\t\t\n\t\tgenderBox = new JComboBox(genders);\n\t\tgenderBox.setAutoscrolls(true);\n\t\tgetContentPane().add(genderBox, \"2, 4, fill, default\");\n\t\t\n\t\ttitleBox = new JComboBox(titles);\n\t\tgetContentPane().add(titleBox, \"4, 4\");\n\t\t\n\t\tJLabel lblMi = new JLabel(\"M.I.\");\n\t\tgetContentPane().add(lblMi, \"6, 4, right, default\");\n\t\t\n\t\tfieldMidName = new JTextField();\n\t\tgetContentPane().add(fieldMidName, \"8, 4, left, default\");\n\t\tfieldMidName.setColumns(10);\n\t\t\n\t\tJLabel lblFirstName = new JLabel(\"First Name*\");\n\t\tgetContentPane().add(lblFirstName, \"2, 6, right, default\");\n\t\t\n\t\t\n\t\tfieldFirstName = new JTextField();\n\t\tgetContentPane().add(fieldFirstName, \"4, 6, fill, default\");\n\t\tfieldFirstName.setColumns(10);\n\t\t\n\t\tnew HighlightListener(fieldFirstName);\n\t\t\n\t\tJLabel lblLastName = new JLabel(\"Last Name*\");\n\t\tgetContentPane().add(lblLastName, \"6, 6, right, default\");\n\t\t\n\t\tfieldLastName = new JTextField();\n\t\tgetContentPane().add(fieldLastName, \"8, 6, fill, default\");\n\t\tfieldLastName.setColumns(10);\n\t\tnew HighlightListener(fieldLastName);\n\t\t\n\t\tJLabel lblUserName = new JLabel(\"User Name*\");\n\t\tgetContentPane().add(lblUserName, \"2, 8, right, default\");\n\t\t\n\t\t\n\t\tfieldUsername = new JTextField();\n\t\tgetContentPane().add(fieldUsername, \"4, 8, fill, default\");\n\t\tfieldUsername.setColumns(10);\n\t\tnew HighlightListener(fieldUsername);\n\t\t\n\t\tJLabel lblPassword = new JLabel(\"Password*\");\n\t\tgetContentPane().add(lblPassword, \"6, 8, right, default\");\n\t\t\n\t\tfieldPassword = new JTextField();\n\t\tgetContentPane().add(fieldPassword, \"8, 8, fill, default\");\n\t\tfieldPassword.setColumns(10);\n\t\tnew HighlightListener(fieldPassword);\n\t\t\n\t\tJLabel lblAddress = new JLabel(\"Address\");\n\t\tgetContentPane().add(lblAddress, \"2, 10, right, default\");\n\t\t\n\t\tfieldAddress = new JTextField();\n\t\tgetContentPane().add(fieldAddress, \"4, 10, fill, default\");\n\t\tfieldAddress.setColumns(10);\n\t\t\n\t\tJLabel lblCity = new JLabel(\"City\");\n\t\tgetContentPane().add(lblCity, \"6, 10, right, default\");\n\t\t\n\t\tfieldCity = new JTextField();\n\t\tgetContentPane().add(fieldCity, \"8, 10, fill, default\");\n\t\tfieldCity.setColumns(10);\n\t\t\n\t\tJLabel lblState = new JLabel(\"State\");\n\t\tgetContentPane().add(lblState, \"2, 12, right, default\");\n\t\t\n\t\tfieldState = new JTextField();\n\t\tgetContentPane().add(fieldState, \"4, 12, fill, default\");\n\t\tfieldState.setColumns(10);\n\t\t\n\t\tJLabel lblZipCode = new JLabel(\"Zip Code\");\n\t\tgetContentPane().add(lblZipCode, \"6, 12, right, default\");\n\t\t\n\t\tfieldZipcode = new JTextField();\n\t\tgetContentPane().add(fieldZipcode, \"8, 12, fill, default\");\n\t\tfieldZipcode.setColumns(10);\n\t\t\n\t\tJLabel lblEmail = new JLabel(\"Email\");\n\t\tgetContentPane().add(lblEmail, \"2, 14, right, default\");\n\t\t\n\t\tfieldEmail = new JTextField();\n\t\tgetContentPane().add(fieldEmail, \"4, 14, fill, default\");\n\t\tfieldEmail.setColumns(10);\n\t\t\n\t\tJLabel lblTelephone = new JLabel(\"Telephone\");\n\t\tgetContentPane().add(lblTelephone, \"6, 14, right, default\");\n\t\t\n\t\tfieldTelephone = new JTextField();\n\t\tgetContentPane().add(fieldTelephone, \"8, 14, fill, default\");\n\t\tfieldTelephone.setColumns(10);\n\t\t\n\t\tJLabel lblBirthday = new JLabel(\"Birthday\");\n\t\tgetContentPane().add(lblBirthday, \"2, 16, right, default\");\n\t\t\n\t\tfieldBirthday = new JTextField();\n\t\tgetContentPane().add(fieldBirthday, \"4, 16, fill, default\");\n\t\tfieldBirthday.setColumns(10);\n\t\t\n\t\tJLabel lblMaidenName = new JLabel(\"Maiden Name\");\n\t\tgetContentPane().add(lblMaidenName, \"2, 20, right, default\");\n\t\t\n\t\tfieldMaidenName = new JTextField();\n\t\tgetContentPane().add(fieldMaidenName, \"4, 20, fill, default\");\n\t\tfieldMaidenName.setColumns(10);\n\t\t\n\t\tJLabel lblSocialSecurity = new JLabel(\"Social Security\");\n\t\tgetContentPane().add(lblSocialSecurity, \"6, 20, right, default\");\n\t\t\n\t\tfieldSocialSecurity = new JTextField();\n\t\tgetContentPane().add(fieldSocialSecurity, \"8, 20, fill, default\");\n\t\tfieldSocialSecurity.setColumns(10);\n\t\t\n\t\tJLabel lblCreditCardType = new JLabel(\"Credit Card Type\");\n\t\tgetContentPane().add(lblCreditCardType, \"2, 24, right, default\");\n\t\t\n\t\tcctypeBox = new JComboBox(cctypes);\n\t\tgetContentPane().add(cctypeBox, \"4, 24, fill, default\");\n\t\t\n\t\tJLabel lblCreditCard = new JLabel(\"Credit Card #\");\n\t\tgetContentPane().add(lblCreditCard, \"6, 24, right, default\");\n\t\t\n\t\tfieldCCnumber = new JTextField();\n\t\tgetContentPane().add(fieldCCnumber, \"8, 24, fill, default\");\n\t\tfieldCCnumber.setColumns(10);\n\t\t\n\t\tJLabel lblCcv = new JLabel(\"CCV\");\n\t\tgetContentPane().add(lblCcv, \"2, 26, right, default\");\n\t\t\n\t\tfieldCCV = new JTextField();\n\t\tgetContentPane().add(fieldCCV, \"4, 26, fill, default\");\n\t\tfieldCCV.setColumns(10);\n\t\t\n\t\tJLabel lblExpirDate = new JLabel(\"Expir. Date\");\n\t\tgetContentPane().add(lblExpirDate, \"6, 26, right, default\");\n\t\t\n\t\tfieldExpirDate = new JTextField();\n\t\tgetContentPane().add(fieldExpirDate, \"8, 26, fill, default\");\n\t\tfieldExpirDate.setColumns(10);\n\t\t\n\t\tJButton btnSubmit = new JButton(\"Submit\");\n\t\tgetContentPane().add(btnSubmit, \"4, 32\");\n\t\t\n\t\t\n\t\tbtnSubmit.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent ee) {\n\t\t\t\tif (CreateCustomer.this.fieldFirstName.getText().trim().length() == 0\n\t\t\t\t\t|| CreateCustomer.this.fieldLastName.getText().trim().length() == 0\n\t\t\t\t\t|| CreateCustomer.this.fieldUsername.getText().trim().length() == 0\n\t\t\t\t\t|| CreateCustomer.this.fieldPassword.getText().trim().length() == 0\n\t\t\t\t\t\t) {\n\t\t\t\t\tJOptionPane.showMessageDialog(CreateCustomer.this, \"Please fill highlighted fields.\");\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tinsertCustomer();\n\t\t\t\t\tJOptionPane.showMessageDialog(CreateCustomer.this, \"Created new user '\" + \n\t\t\t\t\t\t\t\tCreateCustomer.this.fieldUsername.getText() + \"'\");\n\t\t\t\t\tCreateCustomer.this.setVisible(false);\n\t\t\t\t\t\n\t\t\t\t\tCreateCustomer.this.dispose();\n\t\t\t\t\tCreateCustomer.this.parent.setVisible(true);\n\t\t\t\t\t//\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t});\n\t\tparent = master;\n\t\tJButton btnCancel = new JButton(\"Cancel\");\n\t\tgetContentPane().add(btnCancel, \"6, 32\");\n\t\tbtnCancel.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent ee) {\n\t\t\t\tCreateCustomer.this.setVisible(false);\n\t\t\t\tCreateCustomer.this.dispose();\n\t\t\t\tCreateCustomer.this.parent.setVisible(true);\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\t\n\t\tthis.setSize(new Dimension (500, 500));\n\t\t\n\t\tthis.addWindowListener(this);\n\t\tthis.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);\t\t\n\t\tthis.pack();\n\t\tthis.setLocationRelativeTo(null);\n\t\tthis.setVisible(true);\n\t}", "private PersonCtr createCustomer()\n {\n\n // String name, String addres, int phone, int customerID\n PersonCtr c = new PersonCtr();\n String name = jTextField3.getText();\n String address = jTextPane1.getText();\n int phone = Integer.parseInt(jTextField2.getText());\n int customerID = phone;\n Customer cu = new Customer();\n cu = c.addCustomer(name, address, phone, customerID);\n JOptionPane.showMessageDialog(null, cu.getName() + \", \" + cu.getAddress()\n + \", tlf.nr.: \" + cu.getPhone() + \" er oprettet med ID nummer: \" + cu.getCustomerID()\n , \"Kunde opretttet\", JOptionPane.INFORMATION_MESSAGE);\n return c;\n\n\n }", "public NewCustomerGUI() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n txtPhone = new javax.swing.JTextField();\n lblPhone = new javax.swing.JLabel();\n txtAddress = new javax.swing.JTextField();\n jLabel3 = new javax.swing.JLabel();\n btnAdd = new javax.swing.JButton();\n btnUpdate = new javax.swing.JButton();\n btnDelete = new javax.swing.JButton();\n spnCustomer = new javax.swing.JScrollPane();\n tblCustomer = new javax.swing.JTable();\n lblName = new javax.swing.JLabel();\n jButton6 = new javax.swing.JButton();\n txtName = new javax.swing.JTextField();\n jButton1 = new javax.swing.JButton();\n\n lblPhone.setText(\"Phone\");\n\n txtAddress.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtAddressActionPerformed(evt);\n }\n });\n\n jLabel3.setText(\"Address\");\n\n btnAdd.setText(\"Add\");\n btnAdd.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnAddActionPerformed(evt);\n }\n });\n\n btnUpdate.setText(\"Update\");\n btnUpdate.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnUpdateActionPerformed(evt);\n }\n });\n\n btnDelete.setText(\"Delete\");\n btnDelete.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnDeleteActionPerformed(evt);\n }\n });\n\n tblCustomer.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null}\n },\n new String [] {\n \"Title 1\", \"Title 2\", \"Title 3\", \"Title 4\"\n }\n ));\n tblCustomer.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n tblCustomerMouseClicked(evt);\n }\n });\n spnCustomer.setViewportView(tblCustomer);\n\n lblName.setText(\"Name\");\n\n jButton6.setText(\"Close\");\n jButton6.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton6ActionPerformed(evt);\n }\n });\n\n jButton1.setText(\"Back\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout 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 .addGroup(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(22, 22, 22)\n .addComponent(spnCustomer, javax.swing.GroupLayout.PREFERRED_SIZE, 375, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(61, 61, 61)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createSequentialGroup()\n .addComponent(lblName, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(txtName))\n .addGroup(layout.createSequentialGroup()\n .addComponent(lblPhone, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(txtPhone))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(txtAddress))\n .addGroup(layout.createSequentialGroup()\n .addGap(100, 100, 100)\n .addComponent(btnAdd, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnUpdate)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnDelete, javax.swing.GroupLayout.DEFAULT_SIZE, 67, Short.MAX_VALUE)))))\n .addGap(0, 0, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(jButton1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton6)))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(spnCustomer, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(lblName)\n .addComponent(txtName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(lblPhone)\n .addComponent(txtPhone, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(txtAddress, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnDelete)\n .addComponent(btnUpdate)\n .addComponent(btnAdd))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 23, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton6)\n .addComponent(jButton1))\n .addContainerGap())\n );\n }", "public void showClientsDetails(Client client) {\n \n if (client != null) {\n \n //System.out.println(\"Dans Show Client details de addclientcontroller\");\n //System.out.println(client.toString());\n // Fill the labels with info from the client object.\n idField.setText(Integer.toString(client.getId()));\n nomField.setText(client.getNom());\n prenomField.setText(client.getPrenom());\n adresse1Field.setText(client.getAdresse1());\n adresse2Field.setText(client.getAdresse2());\n NPAField.setText(client.getNPA());\n villeField.setText(client.getVille());\n telephone1Field.setText(client.getTelephone1());\n telephone2Field.setText(client.getTelephone2());\n emailField.setText(client.getEmail());\n commentaireField.setText(client.getCommentaire());\n entrepriseField.setText(client.getEntreprise());\n\n } else {\n // Person is null, remove all the text.\n idField.setText(\"\");\n nomField.setText(\"\");\n prenomField.setText(\"\");\n adresse1Field.setText(\"\");\n adresse2Field.setText(\"\");\n NPAField.setText(\"\");\n villeField.setText(\"\");\n telephone1Field.setText(\"\");\n telephone2Field.setText(\"\");\n emailField.setText(\"\");\n commentaireField.setText(\"\");\n entrepriseField.setText(\"\");\n\n }\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 jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n jLabel9 = new javax.swing.JLabel();\n firstTxt = new javax.swing.JTextField();\n lastTxt = new javax.swing.JTextField();\n streetTxt = new javax.swing.JTextField();\n cityTxt = new javax.swing.JTextField();\n stateTxt = new javax.swing.JTextField();\n zipTxt = new javax.swing.JTextField();\n phoneTxt = new javax.swing.JTextField();\n emailTxt = new javax.swing.JTextField();\n addCustomerBtn = new javax.swing.JButton();\n jlblStatus = new javax.swing.JLabel();\n mainGUIBtn = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabel1.setText(\"New Customer\");\n\n jLabel2.setText(\"First Name:\");\n\n jLabel3.setText(\"Last Name:\");\n\n jLabel4.setText(\"Street:\");\n\n jLabel5.setText(\"City:\");\n\n jLabel6.setText(\"State:\");\n\n jLabel7.setText(\"Zip:\");\n\n jLabel8.setText(\"Phone:\");\n\n jLabel9.setText(\"Email:\");\n\n firstTxt.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n firstTxtActionPerformed(evt);\n }\n });\n\n lastTxt.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n lastTxtActionPerformed(evt);\n }\n });\n\n phoneTxt.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n phoneTxtActionPerformed(evt);\n }\n });\n\n emailTxt.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n emailTxtActionPerformed(evt);\n }\n });\n\n addCustomerBtn.setText(\"Add New Customer\");\n addCustomerBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n addCustomerBtnActionPerformed(evt);\n }\n });\n\n jlblStatus.setText(\" \");\n\n mainGUIBtn.setText(\"Main Screen Page\");\n mainGUIBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n mainGUIBtnActionPerformed(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.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jlblStatus, javax.swing.GroupLayout.PREFERRED_SIZE, 152, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel4, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel5, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel6, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel7, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel8, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel9, javax.swing.GroupLayout.Alignment.TRAILING))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(phoneTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(emailTxt, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(zipTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(stateTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(cityTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(streetTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(lastTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(firstTxt, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(addCustomerBtn))\n .addGroup(layout.createSequentialGroup()\n .addGap(294, 294, 294)\n .addComponent(jLabel1))))\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(mainGUIBtn)))\n .addContainerGap(302, Short.MAX_VALUE))\n );\n\n layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {cityTxt, emailTxt, firstTxt, lastTxt, phoneTxt, stateTxt, streetTxt, zipTxt});\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 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(firstTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(19, 19, 19)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(lastTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(streetTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(cityTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel6)\n .addComponent(stateTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel7)\n .addComponent(zipTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel8)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel9)\n .addComponent(emailTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addComponent(phoneTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(21, 21, 21)\n .addComponent(jlblStatus)\n .addGap(12, 12, 12)\n .addComponent(addCustomerBtn)\n .addGap(50, 50, 50)\n .addComponent(mainGUIBtn)\n .addContainerGap(76, Short.MAX_VALUE))\n );\n\n pack();\n }", "public CustomerInformation() {\n try{\n //this.setResizable(false);\n this.setExtendedState(JFrame.MAXIMIZED_BOTH);\n this.setTitle(\"Hotel Management System\");\n this.add(new JLabel(new ImageIcon(\"\")));\n //jLabel7.setLayout(new FlowLayout());\n \n initComponents();\n Class.forName(\"com.mysql.cj.jdbc.Driver\");\n cn = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/hotel\",\"root\",\"root\");\n stat=cn.createStatement();\n rs=stat.executeQuery(\"select c_id from customer order by c_id desc\");\n int id=0;\n if(rs.first())\n {\n id=rs.getInt(1);\n id++;\n jTextField1.setText(\"\"+id);\n }\n else\n {\n jTextField1.setText(\"1\");\n }\n }catch(Exception e){}\n }", "private void displayContactDetails() {\n bindTextViews();\n populateTextViews();\n }", "public static void editCustomer(Customer c) throws IOException\r\n\t{\r\n\t\t// Stores the menu selection for the customer editor\r\n\t\tString editMenuSelection = new String();\r\n\t\t\r\n\t\t// display the customer editor screen until the user enters \"q\"\r\n\t\twhile(!editMenuSelection.equalsIgnoreCase(\"q\"))\r\n\t\t{\r\n\t\t\tclearScreen();\r\n\t\t\t\r\n\t\t\t// display the menu\r\n\t\t\tSystem.out.println(\"[CUSTOMER EDITOR]\\n\");\r\n\t\t\tSystem.out.println(\"a. Name: \" + c.getName());\r\n\t\t\tSystem.out.println(\" CustomerID: \" + c.getCustomerID());\r\n\t\t\tSystem.out.println(\"b. Email: \" + c.getEmail());\r\n\t\t\tSystem.out.println(\"c. Phone Number: \" + c.getPhoneNumber());\r\n\t\t\tSystem.out.println(\"d. Ship Address: \" + c.getShippingAddress());\r\n\t\t\tSystem.out.println(\"e. Ship State: \" + c.getShippingState());\r\n\t\t\tSystem.out.println(\"f. Ship City: \" + c.getShippingCity());\r\n\t\t\tSystem.out.println(\"g. Ship Zip: \" + c.getShippingZip());\r\n\t\t\tSystem.out.println(\"h. Bill Address: \" + c.getBillingAddress());\r\n\t\t\tSystem.out.println(\"i. Bill State: \" + c.getBillingState());\r\n\t\t\tSystem.out.println(\"j. Bill City: \" + c.getBillingCity());\r\n\t\t\tSystem.out.println(\"k. Bill Zip: \" + c.getBillingZip());\r\n\t\t\tSystem.out.println(\"l. Comment: \" + c.getComment());\r\n\t\t\tSystem.out.println(\"r. remove customer\");\r\n\t\t\tSystem.out.println(\"\\nEnter the letter for the field you would like to edit\\nType q to quit the editor\");\r\n\t\t\t\r\n\t\t\t// gets user menu input\r\n\t\t\teditMenuSelection = inputString(true);\r\n\t\t\t\r\n\t\t\t// Edit name\r\n\t\t\tif(editMenuSelection.equalsIgnoreCase(\"a\"))\r\n\t\t\t{\r\n\t\t\t\tclearScreen();\r\n\t\t\t\tSystem.out.println(\"[NAME EDITOR]\\n\");\r\n\t\t\t\tSystem.out.println(\"[CUSTOMER: \" + c.getName() + \"] [ID: \" + c.getCustomerID() + \"]\");\r\n\t\t\t\tSystem.out.println(\"Current name: \" + c.getName());\r\n\t\t\t\tSystem.out.println(\"Enter a new name.\");\r\n\t\t\t\tString newName = new String(inputString(true));\r\n\t\t\t\tclearScreen();\r\n\t\t\t\tSystem.out.println(\"Old name \" + c.getName() + \" replaced with \" + newName + \".\");\r\n\t\t\t\tc.setName(newName);\r\n\t\t\t\tSystem.out.println(\"[PRESS ENTER TO CONTINUE]\");\r\n\t\t\t\t// Get a garbage user input before showing the next screen\r\n\t\t\t\tnewName = inputString(true);\r\n\t\t\t}\r\n\t\t\t// Edit Email\r\n\t\t\telse if(editMenuSelection.equalsIgnoreCase(\"b\"))\r\n\t\t\t{\r\n\t\t\t\tclearScreen();\r\n\t\t\t\tSystem.out.println(\"[EMAIL EDITOR]\\n\");\r\n\t\t\t\tSystem.out.println(\"[CUSTOMER: \" + c.getName() + \"] [ID: \" + c.getCustomerID() + \"]\");\r\n\t\t\t\tSystem.out.println(\"Current email: \" + c.getEmail());\r\n\t\t\t\tSystem.out.println(\"Enter a new email.\");\r\n\t\t\t\tString newEmail = new String(inputString(true));\r\n\t\t\t\tclearScreen();\r\n\t\t\t\tSystem.out.println(\"Old email \" + c.getEmail() + \" replaced with \" + newEmail + \".\");\r\n\t\t\t\tc.setEmail(newEmail);\r\n\t\t\t\tSystem.out.println(\"[PRESS ENTER TO CONTINUE]\");\r\n\t\t\t\t// Get a garbage user input before showing the next screen\r\n\t\t\t\tnewEmail = inputString(true);\r\n\t\t\t}\r\n\t\t\t// Edit Phone Number\r\n\t\t\telse if(editMenuSelection.equalsIgnoreCase(\"c\"))\r\n\t\t\t{\r\n\t\t\t\tclearScreen();\r\n\t\t\t\tSystem.out.println(\"[PHONE NUMBER EDITOR]\\n\");\r\n\t\t\t\tSystem.out.println(\"[CUSTOMER: \" + c.getName() + \"] [ID: \" + c.getCustomerID() + \"]\");\r\n\t\t\t\tSystem.out.println(\"Current phone number: \" + c.getPhoneNumber());\r\n\t\t\t\tSystem.out.println(\"Enter a new phone number.\");\r\n\t\t\t\tString newPhone = new String(inputString(true));\r\n\t\t\t\tclearScreen();\r\n\t\t\t\tSystem.out.println(\"Old phone number \" + c.getPhoneNumber() + \" replaced with \" + newPhone + \".\");\r\n\t\t\t\tc.setPhoneNumber(newPhone);\r\n\t\t\t\tSystem.out.println(\"[PRESS ENTER TO CONTINUE]\");\r\n\t\t\t\t// Get a garbage user input before showing the next screen\r\n\t\t\t\tnewPhone = inputString(true);\r\n\t\t\t}\r\n\t\t\t// Edit shipping address\r\n\t\t\telse if(editMenuSelection.equalsIgnoreCase(\"d\"))\r\n\t\t\t{\r\n\t\t\t\tclearScreen();\r\n\t\t\t\tSystem.out.println(\"[SHIPPING ADDRESS EDITOR]\\n\");\r\n\t\t\t\tSystem.out.println(\"[CUSTOMER: \" + c.getName() + \"] [ID: \" + c.getCustomerID() + \"]\");\r\n\t\t\t\tSystem.out.println(\"Current shipping address: \" + c.getShippingAddress());\r\n\t\t\t\tSystem.out.println(\"Enter a new shipping address.\");\r\n\t\t\t\tString newAddress = new String(inputString(true));\r\n\t\t\t\tclearScreen();\r\n\t\t\t\tSystem.out.println(\"Old shipping address \" + c.getShippingAddress() + \" replaced with \" + newAddress + \".\");\r\n\t\t\t\tc.setShippingAddress(newAddress);\r\n\t\t\t\tSystem.out.println(\"[PRESS ENTER TO CONTINUE]\");\r\n\t\t\t\t// Get a garbage user input before showing the next screen\r\n\t\t\t\tnewAddress = inputString(true);\r\n\t\t\t}\r\n\t\t\t// Edit shipping State\r\n\t\t\telse if(editMenuSelection.equalsIgnoreCase(\"e\"))\r\n\t\t\t{\r\n\t\t\t\tclearScreen();\r\n\t\t\t\tSystem.out.println(\"[SHIPPING STATE EDITOR]\\n\");\r\n\t\t\t\tSystem.out.println(\"[CUSTOMER: \" + c.getName() + \"] [ID: \" + c.getCustomerID() + \"]\");\r\n\t\t\t\tSystem.out.println(\"Current shipping state: \" + c.getShippingState());\r\n\t\t\t\tSystem.out.println(\"Enter a new shipping state.\");\r\n\t\t\t\tString newState = new String(inputString(true));\r\n\t\t\t\tclearScreen();\r\n\t\t\t\tSystem.out.println(\"Old shipping state \" + c.getShippingState() + \" replaced with \" + newState + \".\");\r\n\t\t\t\tc.setShippingState(newState);\r\n\t\t\t\tSystem.out.println(\"[PRESS ENTER TO CONTINUE]\");\r\n\t\t\t\t// Get a garbage user input before showing the next screen\r\n\t\t\t\tnewState = inputString(true);\r\n\t\t\t}\r\n\t\t\t// Edit shipping city\r\n\t\t\telse if(editMenuSelection.equalsIgnoreCase(\"f\"))\r\n\t\t\t{\r\n\t\t\t\tclearScreen();\r\n\t\t\t\tSystem.out.println(\"[SHIPPING CITY EDITOR]\\n\");\r\n\t\t\t\tSystem.out.println(\"[CUSTOMER: \" + c.getName() + \"] [ID: \" + c.getCustomerID() + \"]\");\r\n\t\t\t\tSystem.out.println(\"Current Shipping City: \" + c.getShippingCity());\r\n\t\t\t\tSystem.out.println(\"Enter a new shipping city.\");\r\n\t\t\t\tString newCity = new String(inputString(true));\r\n\t\t\t\tclearScreen();\r\n\t\t\t\tSystem.out.println(\"Old shipping city \" + c.getShippingCity() + \" replaced with \" + newCity + \".\");\r\n\t\t\t\tc.setShippingCity(newCity);\r\n\t\t\t\tSystem.out.println(\"[PRESS ENTER TO CONTINUE]\");\r\n\t\t\t\t// Get a garbage user input before showing the next screen\r\n\t\t\t\tnewCity = inputString(true);\r\n\t\t\t}\r\n\t\t\t// Edit shipping zip\r\n\t\t\telse if(editMenuSelection.equalsIgnoreCase(\"g\"))\r\n\t\t\t{\r\n\t\t\t\tclearScreen();\r\n\t\t\t\tSystem.out.println(\"[SHIPPING ZIP CODE EDITOR]\\n\");\r\n\t\t\t\tSystem.out.println(\"[CUSTOMER: \" + c.getName() + \"] [ID: \" + c.getCustomerID() + \"]\");\r\n\t\t\t\tSystem.out.println(\"Current shipping zip: \" + c.getShippingZip());\r\n\t\t\t\tSystem.out.println(\"Enter a new shipping zip code.\");\r\n\t\t\t\tString newZip = new String(inputString(false));\r\n\t\t\t\tclearScreen();\r\n\t\t\t\tSystem.out.println(\"Old shipping zip \" + c.getShippingZip() + \" replaced with \" + newZip + \".\");\r\n\t\t\t\tc.setShippingZip(newZip);\r\n\t\t\t\tSystem.out.println(\"[PRESS ENTER TO CONTINUE]\");\r\n\t\t\t\t// Get a garbage user input before showing the next screen\r\n\t\t\t\tnewZip = inputString(true);\r\n\t\t\t}\r\n\t\t\t// Edit billing address\r\n\t\t\telse if(editMenuSelection.equalsIgnoreCase(\"h\"))\r\n\t\t\t{\r\n\t\t\t\tclearScreen();\r\n\t\t\t\tSystem.out.println(\"[BILLING ADDRESS EDITOR]\\n\");\r\n\t\t\t\tSystem.out.println(\"[CUSTOMER: \" + c.getName() + \"] [ID: \" + c.getCustomerID() + \"]\");\r\n\t\t\t\tSystem.out.println(\"Current billing address: \" + c.getBillingAddress());\r\n\t\t\t\tSystem.out.println(\"Enter a new billing address\");\r\n\t\t\t\tString newAddress = new String(inputString(true));\r\n\t\t\t\tclearScreen();\r\n\t\t\t\tSystem.out.println(\"Old billing address \" + c.getBillingAddress() + \" replaced with \" + newAddress + \".\");\r\n\t\t\t\tc.setBillingAddress(newAddress);\r\n\t\t\t\tSystem.out.println(\"[PRESS ENTER TO CONTINUE]\");\r\n\t\t\t\t// Get a garbage user input before showing the next screen\r\n\t\t\t\tnewAddress = inputString(true);\r\n\t\t\t}\r\n\t\t\t// Edit billing state if requested\r\n\t\t\telse if(editMenuSelection.equalsIgnoreCase(\"i\"))\r\n\t\t\t{\r\n\t\t\t\tclearScreen();\r\n\t\t\t\tSystem.out.println(\"[BILLING STATE EDITOR]\\n\");\r\n\t\t\t\tSystem.out.println(\"[CUSTOMER: \" + c.getName() + \"] [ID: \" + c.getCustomerID() + \"]\");\r\n\t\t\t\tSystem.out.println(\"Current billing state: \" + c.getBillingState());\r\n\t\t\t\tSystem.out.println(\"Enter a new billing state\");\r\n\t\t\t\tString newState = new String(inputString(true));\r\n\t\t\t\tclearScreen();\r\n\t\t\t\tSystem.out.println(\"Old billing state \" + c.getBillingState() + \" replaced with \" + newState + \".\");\r\n\t\t\t\tc.setBillingState(newState);\r\n\t\t\t\tSystem.out.println(\"[PRESS ENTER TO CONTINUE]\");\r\n\t\t\t\t// Get a garbage user input before showing the next screen\r\n\t\t\t\tnewState = inputString(true);\r\n\t\t\t}\r\n\t\t\t// Edit billing city if requested\r\n\t\t\telse if(editMenuSelection.equalsIgnoreCase(\"j\"))\r\n\t\t\t{\r\n\t\t\t\tclearScreen();\r\n\t\t\t\tSystem.out.println(\"[BILLING CITY EDITOR]\\n\");\r\n\t\t\t\tSystem.out.println(\"[CUSTOMER: \" + c.getName() + \"] [ID: \" + c.getCustomerID() + \"]\");\r\n\t\t\t\tSystem.out.println(\"Current billing city: \" + c.getBillingCity());\r\n\t\t\t\tSystem.out.println(\"Enter a new billing city.\");\r\n\t\t\t\tString newCity = new String(inputString(true));\r\n\t\t\t\tclearScreen();\r\n\t\t\t\tSystem.out.println(\"Old billing city \" + c.getBillingCity() + \" replaced with \" + newCity + \".\");\r\n\t\t\t\tc.setBillingCity(newCity);\r\n\t\t\t\tSystem.out.println(\"[PRESS ENTER TO CONTINUE]\");\r\n\t\t\t\t// Get a garbage user input before showing the next screen\r\n\t\t\t\tnewCity = inputString(true);\r\n\t\t\t}\r\n\t\t\t// Edit billing zip if requested\r\n\t\t\telse if(editMenuSelection.equalsIgnoreCase(\"k\"))\r\n\t\t\t{\r\n\t\t\t\tclearScreen();\r\n\t\t\t\tSystem.out.println(\"[BILLING ZIP CODE EDITOR]\\n\");\r\n\t\t\t\tSystem.out.println(\"[CUSTOMER: \" + c.getName() + \"] [ID: \" + c.getCustomerID() + \"]\");\r\n\t\t\t\tSystem.out.println(\"Current billing zip: \" + c.getBillingZip());\r\n\t\t\t\tSystem.out.println(\"Enter a new billing zip code.\");\r\n\t\t\t\tString newZip = new String(inputString(true));\r\n\t\t\t\tclearScreen();\r\n\t\t\t\tSystem.out.println(\"Old billing zip \" + c.getBillingZip() + \" replaced with \" + newZip + \".\");\r\n\t\t\t\tc.setBillingZip(newZip);\r\n\t\t\t\tSystem.out.println(\"[PRESS ENTER TO CONTINUE]\");\r\n\t\t\t\t// Get a garbage user input before showing the next screen\r\n\t\t\t\tnewZip = inputString(true);\r\n\t\t\t}\r\n\t\t\t// Edit comment if requested\r\n\t\t\telse if(editMenuSelection.equalsIgnoreCase(\"l\"))\r\n\t\t\t{\r\n\t\t\t\tclearScreen();\r\n\t\t\t\tSystem.out.println(\"[COMMENT EDITOR]\\n\");\r\n\t\t\t\tSystem.out.println(\"[CUSTOMER: \" + c.getName() + \"] [ID: \" + c.getCustomerID() + \"]\");\r\n\t\t\t\tSystem.out.println(\"Current comment: \" + c.getComment());\r\n\t\t\t\tSystem.out.println(\"Enter a new comment.\");\r\n\t\t\t\tString newComment = new String(inputString(true));\r\n\t\t\t\tclearScreen();\r\n\t\t\t\tSystem.out.println(\"Old comment \" + c.getComment() + \" replaced with \" + newComment + \".\");\r\n\t\t\t\tc.setComment(newComment);\r\n\t\t\t\tSystem.out.println(\"[PRESS ENTER TO CONTINUE]\");\r\n\t\t\t\t// Get a garbage user input before showing the next screen\r\n\t\t\t\tnewComment = inputString(true);\r\n\t\t\t}\r\n\t\t\t// Remove this customer\r\n\t\t\telse if(editMenuSelection.equalsIgnoreCase(\"r\"))\r\n\t\t\t{\r\n\t\t\t\tclearScreen();\r\n\t\t\t\tSystem.out.println(\"[CUSTOMER REMOVER]\\n\");\r\n\t\t\t\tSystem.out.println(\"[CUSTOMER: \" + c.getName() + \"] [ID: \" + c.getCustomerID() + \"]\");\r\n\t\t\t\tSystem.out.println(\"Are you sure you would like to remove this customer?\");\r\n\t\t\t\tSystem.out.println(\"(yes: remove)(anything else: keep customer)\");\r\n\t\t\t\tif(inputString(true).equalsIgnoreCase(\"yes\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tclearScreen();\r\n\t\t\t\t\tcustomers.remove(customers.indexOf(c));\r\n\t\t\t\t\tSystem.out.println(\"[CUSTOMER REMOVER]\\n\");\r\n\t\t\t\t\tSystem.out.println(\"[Customer \" + c.getName() + \" ID: \" + c.getCustomerID() + \" removed.]\");\r\n\t\t\t\t\tSystem.out.println(\"[PRESS ENTER TO CONTINUE]\");\r\n\t\t\t\t\t// Get a garbage user input before showing the next screen\r\n\t\t\t\t\tString trash = new String(inputString(true));\r\n\t\t\t\t\teditMenuSelection = \"q\";\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tclearScreen();\r\n\t\t\t\t\tSystem.out.println(\"[CUSTOMER REMOVER]\\n\");\r\n\t\t\t\t\tSystem.out.println(\"[Customer \" + c.getName() + \" ID: \" + c.getCustomerID() + \" kept.]\");\r\n\t\t\t\t\tSystem.out.println(\"[PRESS ENTER TO CONTINUE]\");\r\n\t\t\t\t\t// Get a garbage user input before showing the next screen\r\n\t\t\t\t\tString trash = new String(inputString(true));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n customer = guiControl.getController().getAccountControl().vecAcc.searchCustomer(Integer.parseInt(textField1.getText()));\n String valued = \"\";\n if (customer.getValued() == 1) {\n valued += \"Valued\";\n } else {\n valued += \"Regular\";\n }\n //Creates the table model so that a table can be dispalyed\n defaultTableModel = new DefaultTableModel();\n table1.setModel(defaultTableModel);\n //Sets the column names\n defaultTableModel.addColumn(\"Account Number\");\n defaultTableModel.addColumn(\"Name\");\n defaultTableModel.addColumn(\"Phone\");\n defaultTableModel.addColumn(\"Customer Type\");\n //Checks to see if a customer name exists or not. If it doeesnt exist then it shows N/A as the\n if (customer.getName().equals(\"\")) {\n defaultTableModel.addRow(new Object[]{\"N/A\", \"N/A\", \"N/A\", \"N/A\"});\n } else {\n //Otherwise gets the values from customer class, and adds them as the rows\n defaultTableModel.addRow(new Object[]{\n customer.getAccountNo(), customer.getName(), customer.getPhone(), valued\n });\n }\n }", "public void CampoObligatorioClass(String strCustomerName) {\n\n this.clickNewCustomer();\n this.setCustomerName(strCustomerName);\n this.clickGender();\n }", "public AddCustomer() {\n initComponents();\n }", "public void viewContact() \n\t{\n\t\tSystem.out.printf(\"%n--[ View Contact ]--%n\");\n\t\tScanner s = new Scanner(System.in);\n\t\tshowContactIndex();\n\t\tSystem.out.printf(\"%n%nClient Number: \");\n\t\tint index = s.nextInt();\n\t\tdisplayAll(index - 1);\n\t}", "@FXML\n\tprivate void handleAdd() {\n\t\tshowCustomerInfoDialog(null);\t\n\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tcustomerFrame cf = new customerFrame(user);\r\n\t\t\t\tcf.setVisible(true);\r\n\t\t\t\tsetVisible(false);\r\n\t\t\t}", "public void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tshowCustomerInvoices();\n\t\t\t\ttry {\n\t\t\t\t\t\n\t\t\t\t\tcon=DriverManager.getConnection(\"jdbc:mysql://localhost:3306/MundheElectronics1\",\"root\",\"vishakha\");\n\t\t\t\t\tString s=\"select *from CustomerData where Customer_Name=?\";\n\t\t\t\t ps=con.prepareStatement(s);\n\t\t\t\t ps.setString(1,txtSearch.getText());\n\t\t\t\t rs=ps.executeQuery();\n\t\t\t\t if(rs.next())\n\t\t\t\t {\n\t\t\t\t \ttblCustomer.setModel(DbUtils.resultSetToTableModel(rs));\n\t\t\t\t }\n\t\t\t\t else\n\t\t\t\t {\n\t\t\t\t \tJOptionPane.showMessageDialog(null,\"Sorry! this Cutomer is not exist.\");\n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t} catch (SQLException e3) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te3.printStackTrace();\n\t\t\t\t}\n\n\t\t\t}", "public static void printCustomerInformation(Employee [] employee) {\n\t\tif (Customer.getCustomerQuantity() == 0) {\n\t\t\tJOptionPane.showMessageDialog(null, \"There is no customer!\");\n\t\t} else {\n\t\t\tfor (int i = 0; i < Customer.getCustomerQuantity(); i++) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"-------List of Customers-------\\n\"\n\t\t\t\t\t\t+ (i+1) + \": \"+ employee[i+1].getVehicle().getCustomer().getName() + \"\\n\");\n\t\t\t\tbreak;\n\t\t\t}\t\t\t\n\t\t}\n\t}", "public void setCustomer(String customer) {\n this.customer = customer;\n }", "private void initialize()\n\t{\n\n\t\tfrmCustomers = new JFrame();\n\t\tfrmCustomers.setResizable(false);\n\t\tfrmCustomers.setTitle(\"Guitar Builder - Customers\");\n\t\tfrmCustomers.setBounds(100, 100, 499, 354);\n\t\tfrmCustomers.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tfrmCustomers.getContentPane().setLayout(new GridLayout(0, 1, 0, 0));\n\t\tDimension dim = Toolkit.getDefaultToolkit().getScreenSize();\n\t\tfrmCustomers.setLocation(\n\t\t\t\tdim.width / 2 - frmCustomers.getSize().width / 2,\n\t\t\t\tdim.height / 2 - frmCustomers.getSize().height / 2); // launches window in center of the screen.\n\n\t\tJTabbedPane tabbedPane = new JTabbedPane(SwingConstants.TOP); // creates a tabbed pane\n\t\tfrmCustomers.getContentPane().add(tabbedPane);\n\n\t\t// -----------------------------------------------------------------------------------\n\t\t// ---------------------------------CREATE CUSTOMER-----------------------------------\n\t\t// -----------------------------------------------------------------------------------\n\n\t\tJPanel pnlCreateCustomer = new JPanel();\n\t\ttabbedPane.addTab(\"Create Customer\", null, pnlCreateCustomer, null);\n\t\tpnlCreateCustomer.setLayout(null);\n\n\t\t// labels on create customer tab\n\t\tJLabel lblCustomerID = new JLabel(\"Enter Customer ID:\");\n\t\tlblCustomerID.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblCustomerID.setBounds(10, 11, 126, 14);\n\t\tpnlCreateCustomer.add(lblCustomerID);\n\n\t\tJLabel lblFirstName = new JLabel(\"First Name:\");\n\t\tlblFirstName.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblFirstName.setBounds(10, 36, 126, 14);\n\t\tpnlCreateCustomer.add(lblFirstName);\n\n\t\tJLabel lblLastName = new JLabel(\"Last Name:\");\n\t\tlblLastName.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblLastName.setBounds(10, 62, 126, 14);\n\t\tpnlCreateCustomer.add(lblLastName);\n\n\t\tJLabel lblPhoneNumber = new JLabel(\"Phone Number:\");\n\t\tlblPhoneNumber.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblPhoneNumber.setBounds(10, 87, 126, 14);\n\t\tpnlCreateCustomer.add(lblPhoneNumber);\n\n\t\tJLabel lblEmail = new JLabel(\"Email:\");\n\t\tlblEmail.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblEmail.setBounds(10, 112, 126, 14);\n\t\tpnlCreateCustomer.add(lblEmail);\n\n\t\tJLabel lblAddress = new JLabel(\"Address:\");\n\t\tlblAddress.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblAddress.setBounds(10, 137, 126, 14);\n\t\tpnlCreateCustomer.add(lblAddress);\n\n\t\tJLabel lblReturnCustomer = new JLabel(\"Return Customer:\");\n\t\tlblReturnCustomer.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblReturnCustomer.setBounds(10, 162, 126, 14);\n\t\tpnlCreateCustomer.add(lblReturnCustomer);\n\n\t\t// input objects on create customer tab\n\t\ttxtCustomerID = new JTextField(\"\");\n\t\ttxtCustomerID.setToolTipText(\n\t\t\t\t\"Enter a customer ID that is 5 digits or less.\");\n\t\ttxtCustomerID.setBounds(146, 10, 332, 20);\n\t\tpnlCreateCustomer.add(txtCustomerID);\n\t\ttxtCustomerID.setColumns(10);\n\n\t\ttxtFirstName = new JTextField(\"\");\n\t\ttxtFirstName.setToolTipText(\"Enter a First Name\");\n\t\ttxtFirstName.setBounds(146, 35, 332, 20);\n\t\tpnlCreateCustomer.add(txtFirstName);\n\t\ttxtFirstName.setColumns(10);\n\n\t\ttxtLastName = new JTextField(\"\");\n\t\ttxtLastName.setToolTipText(\"Enter a Last Name\");\n\t\ttxtLastName.setColumns(10);\n\t\ttxtLastName.setBounds(146, 61, 332, 20);\n\t\tpnlCreateCustomer.add(txtLastName);\n\n\t\ttxtPhoneNumber = new JTextField(\"\");\n\t\ttxtPhoneNumber.setToolTipText(\"Enter a Phone Number\");\n\t\ttxtPhoneNumber.setColumns(10);\n\t\ttxtPhoneNumber.setBounds(146, 86, 332, 20);\n\t\tpnlCreateCustomer.add(txtPhoneNumber);\n\n\t\ttxtEmail = new JTextField(\"\");\n\t\ttxtEmail.setToolTipText(\"Enter an Email Address\");\n\t\ttxtEmail.setColumns(10);\n\t\ttxtEmail.setBounds(146, 111, 332, 20);\n\t\tpnlCreateCustomer.add(txtEmail);\n\n\t\ttxtAddress = new JTextField(\"\");\n\t\ttxtAddress.setToolTipText(\"Enter an Adress\");\n\t\ttxtAddress.setColumns(10);\n\t\ttxtAddress.setBounds(146, 136, 332, 20);\n\t\tpnlCreateCustomer.add(txtAddress);\n\n\t\tJRadioButton rdbtnNo = new JRadioButton(\"No\");\n\t\treturnCustomerButtonGroup.add(rdbtnNo);\n\t\trdbtnNo.setSelected(true);\n\t\trdbtnNo.setBounds(146, 160, 45, 23);\n\t\tpnlCreateCustomer.add(rdbtnNo);\n\n\t\tJRadioButton rdbtnYes = new JRadioButton(\"Yes\");\n\t\treturnCustomerButtonGroup.add(rdbtnYes);\n\t\trdbtnYes.setBounds(193, 160, 53, 23);\n\t\tpnlCreateCustomer.add(rdbtnYes);\n\n\t\t// stores information in database\n\t\tJButton btnCreateCustomer = new JButton(\"Create Customer\");\n\t\tbtnCreateCustomer.addActionListener(new ActionListener()\n\t\t{\n\t\t\t// event handler for create customer button\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tint ID = 0;\n\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tID = Integer.parseInt(txtCustomerID.getText());\n\t\t\t\t}\n\t\t\t\tcatch(NumberFormatException e1) // ensures ID is integer\n\t\t\t\t{\n\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\"ID must consist of only numbers\", \"Error\",\n\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE, null);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Gather user input\n\t\t\t\tString first = txtFirstName.getText();\n\t\t\t\tString last = txtLastName.getText();\n\t\t\t\tString phone = txtPhoneNumber.getText();\n\t\t\t\tString address = txtAddress.getText();\n\t\t\t\tString email = txtEmail.getText();\n\n\t\t\t\tif(first.isEmpty())\n\t\t\t\t{\n\t\t\t\t\tfirst = \"N/A\";\n\t\t\t\t}\n\t\t\t\tif(last.isEmpty())\n\t\t\t\t{\n\t\t\t\t\tlast = \"N/A\";\n\t\t\t\t}\n\t\t\t\tif(phone.isEmpty())\n\t\t\t\t{\n\t\t\t\t\tphone = \"N/A\";\n\t\t\t\t}\n\t\t\t\tif(address.isEmpty())\n\t\t\t\t{\n\t\t\t\t\taddress = \"N/A\";\n\t\t\t\t}\n\t\t\t\tif(email.isEmpty())\n\t\t\t\t{\n\t\t\t\t\temail = \"N/A\";\n\t\t\t\t}\n\n\t\t\t\tchar returnCustomer;\n\n\t\t\t\tif(rdbtnYes.isSelected())\n\t\t\t\t\treturnCustomer = 'Y';\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturnCustomer = 'N';\n\t\t\t\t}\n\n\t\t\t\t// confirmation dialog\n\t\t\t\tint choice = JOptionPane.showConfirmDialog(null,\n\t\t\t\t\t\t\"Is The Following Information Correct?\" + \"\\nID: \" + ID\n\t\t\t\t\t\t\t\t+ \"\\nFirst Name: \" + first + \"\\nLast Name: \"\n\t\t\t\t\t\t\t\t+ last + \"\\nPhone Number: \" + phone\n\t\t\t\t\t\t\t\t+ \"\\nAddress: \" + address + \"\\nEmail: \" + email\n\t\t\t\t\t\t\t\t+ \"\\nReturn Customer: \" + returnCustomer,\n\t\t\t\t\t\t\"Confirmation\", JOptionPane.YES_NO_OPTION);\n\n\t\t\t\t// if information confirmed, commits data to database.\n\t\t\t\tif(choice == 0)\n\t\t\t\t{\n\n\t\t\t\t\t// creates customer object\n\t\t\t\t\tCustomer create = new Customer(ID, first, last, phone,\n\t\t\t\t\t\t\taddress, email, returnCustomer);\n\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tOracleJDBC.writeCustomer(create); // passes to method that writes customer to database\n\t\t\t\t\t}\n\t\t\t\t\tcatch(SQLException e1)\n\t\t\t\t\t{\n\n\t\t\t\t\t\tif(e1.getErrorCode() == 12899)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tString message = e1.getMessage();\n\n\t\t\t\t\t\t\tif(message.contains(\n\t\t\t\t\t\t\t\t\t\"ORA-12899: value too large for column \\\"DYLAN\\\".\\\"CUSTOMER\\\".\\\"FIRSTNAME\\\"\"))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\t\t\t\"First name is too Long, Max Length = 12\",\n\t\t\t\t\t\t\t\t\t\t\"Error\", JOptionPane.ERROR_MESSAGE,\n\t\t\t\t\t\t\t\t\t\tnull); // sql error that email is too long\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if(message.contains(\n\t\t\t\t\t\t\t\t\t\"ORA-12899: value too large for column \\\"DYLAN\\\".\\\"CUSTOMER\\\".\\\"LASTNAME\\\"\"))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\t\t\t\"Last name is too Long, Max Length = 50\",\n\t\t\t\t\t\t\t\t\t\t\"Error\", JOptionPane.ERROR_MESSAGE,\n\t\t\t\t\t\t\t\t\t\tnull); // sql error that email is too long\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if(message.contains(\n\t\t\t\t\t\t\t\t\t\"ORA-12899: value too large for column \\\"DYLAN\\\".\\\"CUSTOMER\\\".\\\"PHONE\\\"\"))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\t\t\t\"Phone number is too Long, Max Length = 14\",\n\t\t\t\t\t\t\t\t\t\t\"Error\", JOptionPane.ERROR_MESSAGE,\n\t\t\t\t\t\t\t\t\t\tnull); // sql error that email is too long\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if(message.contains(\n\t\t\t\t\t\t\t\t\t\"ORA-12899: value too large for column \\\"DYLAN\\\".\\\"CUSTOMER\\\".\\\"ADDRESS\\\"\"))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\t\t\t\"Address is too Long, Max Length = 50\",\n\t\t\t\t\t\t\t\t\t\t\"Error\", JOptionPane.ERROR_MESSAGE,\n\t\t\t\t\t\t\t\t\t\tnull); // sql error that email is too long\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if(message.contains(\n\t\t\t\t\t\t\t\t\t\"ORA-12899: value too large for column \\\"DYLAN\\\".\\\"CUSTOMER\\\".\\\"EMAIL\\\"\"))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\t\t\t\"EMAIL is too Long, Max Length = 50\",\n\t\t\t\t\t\t\t\t\t\t\"Error\", JOptionPane.ERROR_MESSAGE,\n\t\t\t\t\t\t\t\t\t\tnull); // sql error that email is too long\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\telse if(e1.getErrorCode() == 00001) // sql error for PK constraint violation\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\t\t\"Customer ID already in use\", \"Error\",\n\t\t\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE, null);\n\t\t\t\t\t\telse if(e1.getErrorCode() == 1438) // sql error for customer ID too long\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\t\t\"Customer ID to long, must be 5 digits or less\",\n\t\t\t\t\t\t\t\t\t\"Error\", JOptionPane.ERROR_MESSAGE, null);\n\t\t\t\t\t\telse // unaccounted for error (should not happen)\n\t\t\t\t\t\t\te1.printStackTrace();\n\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Customer Created\",\n\t\t\t\t\t\t\t\"Success\", JOptionPane.INFORMATION_MESSAGE, null);\n\n\t\t\t\t\t// clears form\n\t\t\t\t\tclearForm();\n\t\t\t\t\trdbtnNo.isSelected();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\treturn;\n\n\t\t\t}\n\t\t});\n\t\tbtnCreateCustomer.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\n\t\tbtnCreateCustomer.setBounds(10, 199, 226, 86);\n\t\tpnlCreateCustomer.add(btnCreateCustomer);\n\n\t\t// main menu button\n\t\tJButton btnMainMenu = new JButton(\"Main Menu\");\n\t\tbtnMainMenu.addActionListener(new ActionListener()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tGuitarBuilderMainMenu.createMainMenu(); // opens main menu screen\n\t\t\t\tfrmCustomers.dispose(); // closes current screen without exiting application\n\t\t\t}\n\t\t});\n\t\tbtnMainMenu.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\n\t\tbtnMainMenu.setBounds(252, 199, 226, 86);\n\t\tpnlCreateCustomer.add(btnMainMenu);\n\n\t\t// --------------------------------------------------------------------------------------------------\n\t\t// ---------------------------------------UPDATE CUSTOMER--------------------------------------------\n\t\t// --------------------------------------------------------------------------------------------------\n\n\t\tJPanel pnlUpdateCustomer = new JPanel();\n\t\ttabbedPane.addTab(\"Update Customer\", null, pnlUpdateCustomer, null);\n\t\tpnlUpdateCustomer.setLayout(null);\n\n\t\t// main menu button\n\t\tJButton btnUpdateMainMenu = new JButton(\"Main Menu\");\n\t\tbtnUpdateMainMenu.addActionListener(new ActionListener()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tGuitarBuilderMainMenu.createMainMenu(); // opens main menu screen\n\t\t\t\tfrmCustomers.dispose(); // closes current screen without exiting application\n\t\t\t}\n\t\t});\n\t\tbtnUpdateMainMenu.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\n\t\tbtnUpdateMainMenu.setBounds(252, 199, 226, 86);\n\t\tpnlUpdateCustomer.add(btnUpdateMainMenu);\n\n\t\tJRadioButton radUpdateNo = new JRadioButton(\"No\");\n\t\tradUpdateNo.setSelected(true);\n\t\tupdateReturnCustomerButtonGroup.add(radUpdateNo);\n\t\tradUpdateNo.setBounds(146, 160, 45, 23);\n\t\tpnlUpdateCustomer.add(radUpdateNo);\n\n\t\tJRadioButton radUpdateYes = new JRadioButton(\"Yes\");\n\t\tupdateReturnCustomerButtonGroup.add(radUpdateYes);\n\t\tradUpdateYes.setBounds(193, 160, 57, 23);\n\t\tpnlUpdateCustomer.add(radUpdateYes);\n\n\t\t// update customer button\n\t\tJButton btnUpdateCustomer = new JButton(\"Update Customer\");\n\t\tbtnUpdateCustomer.setEnabled(false);\n\t\tbtnUpdateCustomer.addActionListener(new ActionListener()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\n\t\t\t\t// Gather user input\n\t\t\t\tint ID = Integer.parseInt(txtUpdateID.getText());\n\t\t\t\tString first = txtUpdateFirstName.getText();\n\t\t\t\tString last = txtUpdateLastName.getText();\n\t\t\t\tString phone = txtUpdatePhoneNumber.getText();\n\t\t\t\tString address = txtUpdateAddress.getText();\n\t\t\t\tString email = txtUpdateEmail.getText();\n\t\t\t\tchar returnCustomer;\n\n\t\t\t\tif(first.isEmpty())\n\t\t\t\t{\n\t\t\t\t\tfirst = \"N/A\";\n\t\t\t\t}\n\t\t\t\tif(last.isEmpty())\n\t\t\t\t{\n\t\t\t\t\tlast = \"N/A\";\n\t\t\t\t}\n\t\t\t\tif(phone.isEmpty())\n\t\t\t\t{\n\t\t\t\t\tphone = \"N/A\";\n\t\t\t\t}\n\t\t\t\tif(address.isEmpty())\n\t\t\t\t{\n\t\t\t\t\taddress = \"N/A\";\n\t\t\t\t}\n\t\t\t\tif(email.isEmpty())\n\t\t\t\t{\n\t\t\t\t\temail = \"N/A\";\n\t\t\t\t}\n\n\t\t\t\tif(radUpdateYes.isSelected())\n\t\t\t\t\treturnCustomer = 'Y';\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturnCustomer = 'N';\n\t\t\t\t}\n\n\t\t\t\t// confirms information\n\t\t\t\tint choice = JOptionPane.showConfirmDialog(null,\n\t\t\t\t\t\t\"Is The Following Information Correct?\" + \"\\nID: \" + ID\n\t\t\t\t\t\t\t\t+ \"\\nFirst Name: \" + first + \"\\nLast Name: \"\n\t\t\t\t\t\t\t\t+ last + \"\\nPhone Number: \" + phone\n\t\t\t\t\t\t\t\t+ \"\\nAddress: \" + address + \"\\nEmail: \" + email\n\t\t\t\t\t\t\t\t+ \"\\nReturn Customer: \" + returnCustomer,\n\t\t\t\t\t\t\"Confirmation\", JOptionPane.YES_NO_OPTION);\n\t\t\t\tif(choice == 0)\n\t\t\t\t{\n\n\t\t\t\t\tCustomer update = new Customer(ID, first, last, phone,\n\t\t\t\t\t\t\taddress, email, returnCustomer);\n\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tOracleJDBC.updateCustomer(update);\n\t\t\t\t\t}\n\t\t\t\t\tcatch(SQLException e1)\n\t\t\t\t\t{\n\n\t\t\t\t\t\te1.printStackTrace();\n\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Customer Updated\",\n\t\t\t\t\t\t\t\"Success\", JOptionPane.INFORMATION_MESSAGE, null);\n\n\t\t\t\t\t// clears form\n\t\t\t\t\tclearForm();\n\t\t\t\t\trdbtnNo.isSelected();\n\t\t\t\t\tbtnUpdateCustomer.setEnabled(false);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\treturn;\n\t\t\t}\n\t\t});\n\t\tbtnUpdateCustomer.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\n\t\tbtnUpdateCustomer.setBounds(10, 199, 226, 86);\n\t\tpnlUpdateCustomer.add(btnUpdateCustomer);\n\n\t\t// update tab labels\n\t\tJLabel lblUpdateReturnCustomer = new JLabel(\"Return Customer:\");\n\t\tlblUpdateReturnCustomer.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblUpdateReturnCustomer.setBounds(10, 162, 126, 14);\n\t\tpnlUpdateCustomer.add(lblUpdateReturnCustomer);\n\n\t\tJLabel lblUpdateAddress = new JLabel(\"Address:\");\n\t\tlblUpdateAddress.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblUpdateAddress.setBounds(10, 137, 126, 14);\n\t\tpnlUpdateCustomer.add(lblUpdateAddress);\n\n\t\tJLabel lblUpdateEmail = new JLabel(\"Email:\");\n\t\tlblUpdateEmail.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblUpdateEmail.setBounds(10, 112, 126, 14);\n\t\tpnlUpdateCustomer.add(lblUpdateEmail);\n\n\t\tJLabel lblUpdatePhoneNumber = new JLabel(\"Phone Number:\");\n\t\tlblUpdatePhoneNumber.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblUpdatePhoneNumber.setBounds(10, 87, 126, 14);\n\t\tpnlUpdateCustomer.add(lblUpdatePhoneNumber);\n\n\t\tJLabel lblUpdateLastName = new JLabel(\"Last Name:\");\n\t\tlblUpdateLastName.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblUpdateLastName.setBounds(10, 62, 126, 14);\n\t\tpnlUpdateCustomer.add(lblUpdateLastName);\n\n\t\tJLabel lblUpdateFirstName = new JLabel(\"First Name:\");\n\t\tlblUpdateFirstName.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblUpdateFirstName.setBounds(10, 36, 126, 14);\n\t\tpnlUpdateCustomer.add(lblUpdateFirstName);\n\n\t\tJLabel lblEnterCustomerId = new JLabel(\"Enter Customer ID For Update:\");\n\t\tlblEnterCustomerId.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblEnterCustomerId.setBounds(10, 11, 204, 14);\n\t\tpnlUpdateCustomer.add(lblEnterCustomerId);\n\n\t\t// input objects for update\n\t\ttxtUpdateAddress = new JTextField();\n\t\ttxtUpdateAddress.setColumns(10);\n\t\ttxtUpdateAddress.setBounds(146, 136, 332, 20);\n\t\tpnlUpdateCustomer.add(txtUpdateAddress);\n\t\ttxtUpdateEmail = new JTextField();\n\t\ttxtUpdateEmail.setColumns(10);\n\t\ttxtUpdateEmail.setBounds(146, 111, 332, 20);\n\t\tpnlUpdateCustomer.add(txtUpdateEmail);\n\t\ttxtUpdatePhoneNumber = new JTextField();\n\t\ttxtUpdatePhoneNumber.setColumns(10);\n\t\ttxtUpdatePhoneNumber.setBounds(146, 86, 332, 20);\n\t\tpnlUpdateCustomer.add(txtUpdatePhoneNumber);\n\t\ttxtUpdateLastName = new JTextField();\n\t\ttxtUpdateLastName.setColumns(10);\n\t\ttxtUpdateLastName.setBounds(146, 61, 332, 20);\n\t\tpnlUpdateCustomer.add(txtUpdateLastName);\n\t\ttxtUpdateFirstName = new JTextField();\n\t\ttxtUpdateFirstName.setColumns(10);\n\t\ttxtUpdateFirstName.setBounds(146, 35, 332, 20);\n\t\tpnlUpdateCustomer.add(txtUpdateFirstName);\n\t\ttxtUpdateID = new JTextField();\n\t\ttxtUpdateID.setColumns(10);\n\t\ttxtUpdateID.setBounds(224, 10, 180, 20);\n\t\tpnlUpdateCustomer.add(txtUpdateID);\n\n\t\t// Brings current info into text fields for editing, and enables the update button\n\t\tJButton btnUpdateEnterID = new JButton(\"Enter\");\n\t\tbtnUpdateEnterID.addActionListener(new ActionListener()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tint ID = Integer.parseInt(txtUpdateID.getText());\n\t\t\t\tint returnID = 0;\n\t\t\t\tString first = null;\n\t\t\t\tString last = null;\n\t\t\t\tString phone = null;\n\t\t\t\tString address = null;\n\t\t\t\tString email = null;\n\t\t\t\tString returnCustomer = null;\n\n\t\t\t\t// gets current info\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\treturnID = OracleJDBC.readCustomerID(ID);\n\t\t\t\t\tfirst = OracleJDBC.readCustomerFirstName(ID);\n\t\t\t\t\tlast = OracleJDBC.readCustomerLastName(ID);\n\t\t\t\t\tphone = OracleJDBC.readCustomerPhoneNumber(ID);\n\t\t\t\t\taddress = OracleJDBC.readCustomerAddress(ID);\n\t\t\t\t\temail = OracleJDBC.readCustomerEmail(ID);\n\t\t\t\t\treturnCustomer = OracleJDBC.readReturnCustomer(ID);\n\n\t\t\t\t}\n\t\t\t\tcatch(SQLException e1)\n\t\t\t\t{\n\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\"Could Not Retrieve Customer Info\", \"Error\",\n\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE, null);\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\n\t\t\t\tif(returnID != 0) // checks if customer exists\n\t\t\t\t{\n\n\t\t\t\t\ttxtUpdateFirstName.setText(first);\n\t\t\t\t\ttxtUpdateLastName.setText(last);\n\t\t\t\t\ttxtUpdatePhoneNumber.setText(phone);\n\t\t\t\t\ttxtUpdateAddress.setText(address);\n\t\t\t\t\ttxtUpdateEmail.setText(email);\n\n\t\t\t\t\tif(returnCustomer.equals(\"Y\"))\n\t\t\t\t\t{\n\t\t\t\t\t\tradUpdateYes.setSelected(true);\n\t\t\t\t\t}\n\n\t\t\t\t\tbtnUpdateCustomer.setEnabled(true);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\"Could Not Retrieve Customer Info, Customer ID \"\n\t\t\t\t\t\t\t\t\t+ ID + \" does not exist\",\n\t\t\t\t\t\t\t\"Error\", JOptionPane.ERROR_MESSAGE, null);\n\n\t\t\t\t\tclearForm();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t}\n\t\t});\n\t\tbtnUpdateEnterID.setBounds(414, 9, 64, 21);\n\t\tpnlUpdateCustomer.add(btnUpdateEnterID);\n\n\t\t// -------------------------------------------------------------------------------------\n\t\t// -------------------------------------REVIEW CUSTOMER---------------------------------\n\t\t// -------------------------------------------------------------------------------------\n\n\t\tJPanel pnlReviewCustomer = new JPanel();\n\t\ttabbedPane.addTab(\"Review Customer\", null, pnlReviewCustomer, null);\n\t\tpnlReviewCustomer.setLayout(null);\n\n\t\t// Customer Review Labels\n\t\tJLabel lblReviewCustomerID = new JLabel(\n\t\t\t\t\"Enter Customer ID To Review Information\");\n\t\tlblReviewCustomerID.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlblReviewCustomerID.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblReviewCustomerID.setBounds(10, 12, 468, 19);\n\t\tpnlReviewCustomer.add(lblReviewCustomerID);\n\n\t\ttxtReviewCustomerID = new JTextField();\n\t\ttxtReviewCustomerID.setHorizontalAlignment(SwingConstants.CENTER);\n\t\ttxtReviewCustomerID.setColumns(10);\n\t\ttxtReviewCustomerID.setBounds(10, 34, 468, 20);\n\t\tpnlReviewCustomer.add(txtReviewCustomerID);\n\n\t\tJLabel lblReviewFirstName = new JLabel(\"First Name:\");\n\t\tlblReviewFirstName.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblReviewFirstName.setBounds(10, 130, 74, 14);\n\t\tpnlReviewCustomer.add(lblReviewFirstName);\n\n\t\tJLabel lblReviewLastName = new JLabel(\"Last Name:\");\n\t\tlblReviewLastName.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblReviewLastName.setBounds(10, 156, 74, 14);\n\t\tpnlReviewCustomer.add(lblReviewLastName);\n\n\t\tJLabel lblReviewPhoneNumber = new JLabel(\"Phone Number:\");\n\t\tlblReviewPhoneNumber.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblReviewPhoneNumber.setBounds(10, 181, 97, 14);\n\t\tpnlReviewCustomer.add(lblReviewPhoneNumber);\n\n\t\tJLabel lblReviewEmail = new JLabel(\"Email:\");\n\t\tlblReviewEmail.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblReviewEmail.setBounds(10, 206, 44, 14);\n\t\tpnlReviewCustomer.add(lblReviewEmail);\n\n\t\tJLabel lblReviewAddress = new JLabel(\"Address:\");\n\t\tlblReviewAddress.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblReviewAddress.setBounds(10, 231, 74, 14);\n\t\tpnlReviewCustomer.add(lblReviewAddress);\n\n\t\tJLabel lblReviewReturnCustomer = new JLabel(\"Return Customer:\");\n\t\tlblReviewReturnCustomer.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblReviewReturnCustomer.setBounds(10, 256, 117, 14);\n\t\tpnlReviewCustomer.add(lblReviewReturnCustomer);\n\n\t\t// Labels to display information\n\t\tJLabel lblShowFirstName = new JLabel(\"\");\n\t\tlblShowFirstName.setBackground(Color.WHITE);\n\t\tlblShowFirstName.setBounds(94, 130, 356, 14);\n\t\tpnlReviewCustomer.add(lblShowFirstName);\n\n\t\tJLabel lblShowLastName = new JLabel(\"\");\n\t\tlblShowLastName.setBackground(Color.WHITE);\n\t\tlblShowLastName.setBounds(94, 158, 356, 14);\n\t\tpnlReviewCustomer.add(lblShowLastName);\n\n\t\tJLabel lblShowPhoneNumber = new JLabel(\"\");\n\t\tlblShowPhoneNumber.setBackground(Color.WHITE);\n\t\tlblShowPhoneNumber.setBounds(117, 183, 333, 14);\n\t\tpnlReviewCustomer.add(lblShowPhoneNumber);\n\n\t\tJLabel lblShowEmail = new JLabel(\"\");\n\t\tlblShowEmail.setBackground(Color.WHITE);\n\t\tlblShowEmail.setBounds(64, 206, 386, 14);\n\t\tpnlReviewCustomer.add(lblShowEmail);\n\n\t\tJLabel lblShowAddress = new JLabel(\"\");\n\t\tlblShowAddress.setBackground(Color.WHITE);\n\t\tlblShowAddress.setBounds(74, 233, 376, 14);\n\t\tpnlReviewCustomer.add(lblShowAddress);\n\n\t\tJLabel lblShowReturnCustomer = new JLabel(\"\");\n\t\tlblShowReturnCustomer.setBackground(Color.WHITE);\n\t\tlblShowReturnCustomer.setBounds(123, 258, 327, 14);\n\t\tpnlReviewCustomer.add(lblShowReturnCustomer);\n\n\t\t// gets data from database\n\t\tJButton btnReviewCustomer = new JButton(\"Review Customer\");\n\t\tbtnReviewCustomer.addActionListener(new ActionListener()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tint ID = Integer.parseInt(txtReviewCustomerID.getText());\n\t\t\t\tint returnID = 0;\n\t\t\t\tString first = null;\n\t\t\t\tString last = null;\n\t\t\t\tString phone = null;\n\t\t\t\tString address = null;\n\t\t\t\tString email = null;\n\t\t\t\tString returnCustomer = null;\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\t// Store data to values\n\t\t\t\t\treturnID = OracleJDBC.readCustomerID(ID);\n\t\t\t\t\tfirst = OracleJDBC.readCustomerFirstName(ID);\n\t\t\t\t\tlast = OracleJDBC.readCustomerLastName(ID);\n\t\t\t\t\tphone = OracleJDBC.readCustomerPhoneNumber(ID);\n\t\t\t\t\taddress = OracleJDBC.readCustomerAddress(ID);\n\t\t\t\t\temail = OracleJDBC.readCustomerEmail(ID);\n\t\t\t\t\treturnCustomer = OracleJDBC.readReturnCustomer(ID);\n\n\t\t\t\t}\n\t\t\t\tcatch(SQLException e1)\n\t\t\t\t{\n\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\"Could Not Retrieve Customer First Name\", \"Error\",\n\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE, null);\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\n\t\t\t\tif(returnID != 0) // checks if customer exists\n\t\t\t\t{\n\t\t\t\t\t// Displays data\n\t\t\t\t\tlblShowFirstName.setText(first);\n\t\t\t\t\tlblShowLastName.setText(last);\n\t\t\t\t\tlblShowPhoneNumber.setText(phone);\n\t\t\t\t\tlblShowAddress.setText(address);\n\t\t\t\t\tlblShowEmail.setText(email);\n\t\t\t\t\tif(returnCustomer.equals(\"N\"))\n\t\t\t\t\t{\n\t\t\t\t\t\tlblShowReturnCustomer.setText(\"No\");\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tlblShowReturnCustomer.setText(\"Yes\");\n\t\t\t\t\t}\n\t\t\t\t\t;\n\t\t\t\t}\n\t\t\t\telse // customer does not exist\n\t\t\t\t{\n\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\"Customer with ID \" + ID + \" does not exist\",\n\t\t\t\t\t\t\t\"Error\", JOptionPane.ERROR_MESSAGE, null);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnReviewCustomer.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\n\t\tbtnReviewCustomer.setBounds(10, 65, 227, 54);\n\t\tpnlReviewCustomer.add(btnReviewCustomer);\n\n\t\tJButton btnReviewMainMenu = new JButton(\"Main Menu\");\n\t\tbtnReviewMainMenu.addActionListener(new ActionListener()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tGuitarBuilderMainMenu.createMainMenu();\n\t\t\t\tfrmCustomers.dispose();\n\t\t\t}\n\t\t});\n\t\tbtnReviewMainMenu.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\n\t\tbtnReviewMainMenu.setBounds(251, 65, 227, 54);\n\t\tpnlReviewCustomer.add(btnReviewMainMenu);\n\n\t\t// -------------------------------------------------------------------------------\n\t\t// ------------------------------DELETE CUSTOMER----------------------------------\n\t\t// -------------------------------------------------------------------------------\n\t\tJPanel pnlDeleteCustomer = new JPanel();\n\t\ttabbedPane.addTab(\"Delete Customer\", null, pnlDeleteCustomer, null);\n\t\tpnlDeleteCustomer.setLayout(null);\n\n\t\t// Labels for the customer deletion window\n\t\tJLabel lblDeleteCustomerID = new JLabel(\"Enter Customer ID To Delete\");\n\t\tlblDeleteCustomerID.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlblDeleteCustomerID.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblDeleteCustomerID.setBounds(10, 11, 468, 19);\n\t\tpnlDeleteCustomer.add(lblDeleteCustomerID);\n\n\t\ttxtDeleteCustomerID = new JTextField();\n\t\ttxtDeleteCustomerID.setHorizontalAlignment(SwingConstants.CENTER);\n\t\ttxtDeleteCustomerID.setColumns(10);\n\t\ttxtDeleteCustomerID.setBounds(10, 33, 468, 20);\n\t\tpnlDeleteCustomer.add(txtDeleteCustomerID);\n\n\t\tJButton btnDeleteCustomer = new JButton(\"Delete Customer\");\n\t\tbtnDeleteCustomer.addActionListener(new ActionListener()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\n\t\t\t\tint ID = Integer.parseInt(txtDeleteCustomerID.getText());\n\t\t\t\tint returnID = 0;\n\t\t\t\tString first = null;\n\t\t\t\tString last = null;\n\t\t\t\tString phone = null;\n\t\t\t\tString address = null;\n\t\t\t\tString email = null;\n\t\t\t\tString returnCustomer = null;\n\t\t\t\ttry\n\t\t\t\t{\n\n\t\t\t\t\t// Gathers data from database\n\t\t\t\t\treturnID = OracleJDBC.readCustomerID(ID);\n\t\t\t\t\tfirst = OracleJDBC.readCustomerFirstName(ID);\n\t\t\t\t\tlast = OracleJDBC.readCustomerLastName(ID);\n\t\t\t\t\tphone = OracleJDBC.readCustomerPhoneNumber(ID);\n\t\t\t\t\taddress = OracleJDBC.readCustomerAddress(ID);\n\t\t\t\t\temail = OracleJDBC.readCustomerEmail(ID);\n\t\t\t\t\treturnCustomer = OracleJDBC.readReturnCustomer(ID);\n\n\t\t\t\t}\n\t\t\t\tcatch(SQLException e1)\n\t\t\t\t{\n\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\"Could Not Delete Customer\", \"Error\",\n\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE, null);\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\n\t\t\t\tif(returnID == 0)\n\t\t\t\t{\n\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\"Customer with ID \" + ID + \" does not exist!\",\n\t\t\t\t\t\t\t\"Error\", JOptionPane.ERROR_MESSAGE, null);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tint choice = JOptionPane.showConfirmDialog(null,\n\t\t\t\t\t\t\t\"Are you sure you want to delete the following customer?\"\n\t\t\t\t\t\t\t\t\t+ \"\\nID: \" + returnID + \"\\nFirst Name: \"\n\t\t\t\t\t\t\t\t\t+ first + \"\\nLast Name: \" + last\n\t\t\t\t\t\t\t\t\t+ \"\\nPhone Number: \" + phone + \"\\nAddress: \"\n\t\t\t\t\t\t\t\t\t+ address + \"\\nEmail: \" + email\n\t\t\t\t\t\t\t\t\t+ \"\\nReturn Customer: \" + returnCustomer,\n\t\t\t\t\t\t\t\"Confirmation\", JOptionPane.YES_NO_OPTION);\n\n\t\t\t\t\tif(choice == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\ttry\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tOracleJDBC.deleteCustomer(ID);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch(SQLException e1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\t\t\"Couldn't Delete Customer\", \"Error\",\n\t\t\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE, null);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Customer Deleted\",\n\t\t\t\t\t\t\t\t\"Sucess\", JOptionPane.INFORMATION_MESSAGE,\n\t\t\t\t\t\t\t\tnull);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t});\n\t\tbtnDeleteCustomer\n\t\t\t\t.setBackground(UIManager.getColor(\"Button.background\"));\n\t\tbtnDeleteCustomer.setForeground(Color.RED);\n\t\tbtnDeleteCustomer.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\n\t\tbtnDeleteCustomer.setBounds(10, 64, 226, 73);\n\t\tpnlDeleteCustomer.add(btnDeleteCustomer);\n\n\t\tJButton btnDeleteMainMenu = new JButton(\"Main Menu\");\n\t\tbtnDeleteMainMenu.addActionListener(new ActionListener()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tGuitarBuilderMainMenu.createMainMenu();\n\t\t\t\tfrmCustomers.dispose();\n\t\t\t}\n\t\t});\n\t\tbtnDeleteMainMenu.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\n\t\tbtnDeleteMainMenu.setBounds(252, 64, 226, 73);\n\t\tpnlDeleteCustomer.add(btnDeleteMainMenu);\n\t}", "public static void enterCustomer(Employee employee) {\n\t\tCustomer.setCustomerQuantity();\n\t\tString name;\n\t\tdo {\n\t\t\tname= JOptionPane.showInputDialog(\"Please enter a name of the customer.\");\n\t\t\tif (!employee.getVehicle().getCustomer().setName(name)) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Error, Invalid\");\n\t\t\t}\n\t\t} while (!employee.getVehicle().getCustomer().setName(name));\n\t\t\n\t\tString phone;\n\t\tdo {\n\t\t\tphone = JOptionPane.showInputDialog(\"Please enter a phone number \"\n\t\t\t\t\t+ \"\\nFormat: 0001112222\");\n\t\t\tif (!employee.getVehicle().getCustomer().setPhone(phone)) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Error, Invalid\");\n\t\t\t}\n\t\t} while (!employee.getVehicle().getCustomer().setPhone(phone));\n\t\tString paymentInfo;\n\t\tdo {\n\t\t\tpaymentInfo = JOptionPane.showInputDialog(\"Please enter a payment information (Credit, Debit, or Cash)\");\n\t\t\tif (!employee.getVehicle().getCustomer().setPaymentInfo(paymentInfo)) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Error, Invalid\");\n\t\t\t}\n\t\t} while (!employee.getVehicle().getCustomer().setPaymentInfo(paymentInfo));\n\t\tString address;\n\t\tdo {\n\t\t\taddress = JOptionPane.showInputDialog(\"Please enter a full address.\");\n\t\t\tif (!employee.getVehicle().getCustomer().setAddress(address)) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Error, Invalid\");\n\t\t\t}\n\t\t}while (!employee.getVehicle().getCustomer().setAddress(address));\n\t\tString insuranceNumber;\n\t\tdo {\n\t\t\tinsuranceNumber = JOptionPane.showInputDialog(\"Please enter an insurance number.\");\n\t\t\tif (!employee.getVehicle().getCustomer().setInsuranceNumber(insuranceNumber)) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Error, Invalid\");\n\t\t\t}\n\t\t} while (!employee.getVehicle().getCustomer().setInsuranceNumber(insuranceNumber));\n\t\tJOptionPane.showMessageDialog(null, employee.getVehicle().getCustomer().toString());\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n\n private void initComponents() {\n setResizable(false);\n athensPic = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n btnBack = new javax.swing.JButton();\n lbAddCus = new javax.swing.JLabel();\n lbName = new javax.swing.JLabel();\n lbphone = new javax.swing.JLabel();\n lbAddr = new javax.swing.JLabel();\n tfName = new javax.swing.JTextField();\n tfPhone = new javax.swing.JTextField();\n tfAddr = new javax.swing.JTextField();\n\n Action btnAddCusAction = new btnAddCustomerAction(\"Add New Customer\", tfName, tfAddr, tfPhone);\n btnAddCus = new javax.swing.JButton(btnAddCusAction);\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n athensPic.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/athens_stock/res/athens.jpg\"))); // NOI18N\n\n jLabel2.setFont(new java.awt.Font(\"Lucida Grande\", 0, 20)); // NOI18N\n jLabel2.setText(\"Stock Management System\");\n\n btnBack.setText(\"Home\");\n\n lbAddCus.setFont(new java.awt.Font(\"Lucida Grande\", 1, 24)); // NOI18N\n lbAddCus.setText(\"Add Customer\");\n\n lbName.setText(\"Name :\");\n\n lbphone.setText(\"Phone number :\");\n\n btnAddCus.setFont(new java.awt.Font(\"Lucida Grande\", 0, 18)); // NOI18N\n btnAddCus.setText(\"Add new customer\");\n\n lbAddr.setText(\"Address :\");\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(152, 152, 152))\n .addGroup(layout.createSequentialGroup()\n .addGap(151, 151, 151)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createSequentialGroup()\n .addComponent(lbName)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(tfName))\n .addGroup(layout.createSequentialGroup()\n .addComponent(lbphone)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(tfPhone))\n .addComponent(lbAddr)\n .addComponent(tfAddr, javax.swing.GroupLayout.PREFERRED_SIZE, 266, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED))))\n .addGroup(layout.createSequentialGroup()\n .addGap(181, 181, 181)\n .addComponent(btnAddCus))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(25, 25, 25)\n .addComponent(athensPic))\n .addGroup(layout.createSequentialGroup()\n .addGap(52, 52, 52)\n .addComponent(btnBack)))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(18, 18, 18)\n .addComponent(jLabel2))\n .addGroup(layout.createSequentialGroup()\n .addGap(47, 47, 47)\n .addComponent(lbAddCus)))))\n .addContainerGap(157, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(15, 15, 15)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(7, 7, 7)\n .addComponent(jLabel2)\n .addGap(18, 18, 18)\n .addComponent(lbAddCus)\n .addGap(41, 41, 41)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING))\n .addGap(20, 20, 20)\n .addGap(20, 20, 20)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(lbName)\n .addComponent(tfName, 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(lbphone)\n .addComponent(tfPhone, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(20, 20, 20)\n .addComponent(lbAddr)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(tfAddr, javax.swing.GroupLayout.PREFERRED_SIZE, 78, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addGap(18, 18, 18)\n .addComponent(btnAddCus)\n .addContainerGap(145, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(athensPic, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnBack)\n .addGap(0, 0, Short.MAX_VALUE))))\n );\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jPanel2 = new javax.swing.JPanel();\n jLabel5 = new javax.swing.JLabel();\n jPanel3 = new javax.swing.JPanel();\n jCheckBox1 = new javax.swing.JCheckBox();\n jCheckBox2 = new javax.swing.JCheckBox();\n jLabel1 = new javax.swing.JLabel();\n jTextFieldName = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n jTextFieldAddress1 = new javax.swing.JTextField();\n jTextFieldAddress2 = new javax.swing.JTextField();\n jTextFieldAddress3 = new javax.swing.JTextField();\n jLabel3 = new javax.swing.JLabel();\n jTextFieldPhone = new javax.swing.JTextField();\n jLabel4 = new javax.swing.JLabel();\n jComboBoxTablenum = new javax.swing.JComboBox<>();\n Nextbtn = new javax.swing.JButton();\n CancelBtn = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n\n jPanel2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n\n jLabel5.setFont(new java.awt.Font(\"Tahoma\", 1, 24)); // NOI18N\n jLabel5.setText(\" Customer Information\");\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(170, 170, 170)\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 390, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(118, Short.MAX_VALUE))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel5, javax.swing.GroupLayout.DEFAULT_SIZE, 34, Short.MAX_VALUE)\n .addContainerGap())\n );\n\n jPanel3.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n\n jCheckBox1.setText(\"Delivery\");\n jCheckBox1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBox1ActionPerformed(evt);\n }\n });\n\n jCheckBox2.setText(\"Eat-In\");\n jCheckBox2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBox2ActionPerformed(evt);\n }\n });\n\n jLabel1.setText(\"Name\");\n\n jLabel2.setText(\"Address\");\n\n jLabel3.setText(\"Phone no\");\n\n jTextFieldPhone.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n jTextFieldPhoneKeyTyped(evt);\n }\n });\n\n jLabel4.setText(\"Table number\");\n\n jComboBoxTablenum.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"N/A\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\", \"11\", \"12\" }));\n jComboBoxTablenum.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n jComboBoxTablenum.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jComboBoxTablenumActionPerformed(evt);\n }\n });\n\n Nextbtn.setText(\"Next\");\n Nextbtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n NextbtnActionPerformed(evt);\n }\n });\n\n CancelBtn.setText(\"Cancel\");\n CancelBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n CancelBtnActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);\n jPanel3.setLayout(jPanel3Layout);\n jPanel3Layout.setHorizontalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addGap(194, 194, 194)\n .addComponent(jCheckBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(112, 112, 112)\n .addComponent(jCheckBox2, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addGap(107, 107, 107)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, 153, Short.MAX_VALUE)\n .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addGap(161, 161, 161)\n .addComponent(Nextbtn, javax.swing.GroupLayout.PREFERRED_SIZE, 123, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(53, 53, 53)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jTextFieldAddress3)\n .addComponent(jTextFieldAddress2)\n .addComponent(jTextFieldName)\n .addComponent(jTextFieldAddress1)\n .addComponent(jTextFieldPhone)\n .addComponent(jComboBoxTablenum, 0, 228, Short.MAX_VALUE)\n .addComponent(CancelBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 126, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel3Layout.setVerticalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addGap(33, 33, 33)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jCheckBox1)\n .addComponent(jCheckBox2))\n .addGap(30, 30, 30)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(jTextFieldName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(jTextFieldAddress1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jTextFieldAddress2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jTextFieldAddress3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(42, 42, 42)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(jTextFieldPhone, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(42, 42, 42)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel4)\n .addComponent(jComboBoxTablenum, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 67, Short.MAX_VALUE)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(Nextbtn)\n .addComponent(CancelBtn))\n .addGap(41, 41, 41))\n );\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addContainerGap())\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n }", "public void showEditCustomerScene(Customer customer, Customer oldCustomer) throws IOException {\n FXMLLoader loader = new FXMLLoader();\r\n loader.setLocation(MainApp.class.getResource(\"view/customers/EditCustomerOverview.fxml\"));\r\n AnchorPane page = (AnchorPane) loader.load();\r\n\r\n mainLayout.setCenter(page);\r\n // Set the agent into the controller\r\n EditCustomerOverviewController controller = loader.getController();\r\n controller.setMainApp(this);\r\n controller.setCustomer(customer);\r\n controller.setOldCustomer(oldCustomer);\r\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jButton3 = new javax.swing.JButton();\n jTextField4 = new javax.swing.JTextField();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jScrollPane1 = new javax.swing.JScrollPane();\n jTextArea1 = new javax.swing.JTextArea();\n jButton4 = new javax.swing.JButton();\n jButton1 = new javax.swing.JButton();\n jButton5 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jButton6 = new javax.swing.JButton();\n jButton7 = new javax.swing.JButton();\n jTextField1 = new javax.swing.JTextField();\n jTextField2 = new javax.swing.JTextField();\n jTextField3 = new javax.swing.JTextField();\n jTextField5 = new javax.swing.JTextField();\n jButton8 = new javax.swing.JButton();\n jLabel8 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n\n jButton3.setText(\"jButton1\");\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);\n setBounds(new java.awt.Rectangle(0, 0, 0, 0));\n setUndecorated(true);\n getContentPane().setLayout(null);\n\n jLabel1.setFont(new java.awt.Font(\"Arial\", 1, 36)); // NOI18N\n jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel1.setText(\"CUSTOMER INFORMATION\");\n getContentPane().add(jLabel1);\n jLabel1.setBounds(790, 170, 480, 43);\n\n jLabel2.setFont(new java.awt.Font(\"Arial\", 1, 18)); // NOI18N\n jLabel2.setForeground(new java.awt.Color(255, 255, 255));\n jLabel2.setText(\"CUSTOMER ID\");\n getContentPane().add(jLabel2);\n jLabel2.setBounds(640, 400, 200, 32);\n\n jLabel3.setFont(new java.awt.Font(\"Arial\", 1, 18)); // NOI18N\n jLabel3.setForeground(new java.awt.Color(255, 255, 255));\n jLabel3.setText(\"CUSTOMER NAME\");\n getContentPane().add(jLabel3);\n jLabel3.setBounds(640, 450, 200, 34);\n\n jLabel4.setFont(new java.awt.Font(\"Arial\", 1, 18)); // NOI18N\n jLabel4.setForeground(new java.awt.Color(255, 255, 255));\n jLabel4.setText(\"AADHAR NUMBER\");\n jLabel4.setToolTipText(\"\");\n getContentPane().add(jLabel4);\n jLabel4.setBounds(640, 510, 200, 32);\n\n jLabel5.setFont(new java.awt.Font(\"Arial\", 1, 18)); // NOI18N\n jLabel5.setForeground(new java.awt.Color(255, 255, 255));\n jLabel5.setText(\"PHONE NUMBER\");\n getContentPane().add(jLabel5);\n jLabel5.setBounds(640, 670, 200, 37);\n\n jLabel6.setFont(new java.awt.Font(\"Arial\", 1, 18)); // NOI18N\n jLabel6.setForeground(new java.awt.Color(255, 255, 255));\n jLabel6.setText(\"ADDRESS\");\n getContentPane().add(jLabel6);\n jLabel6.setBounds(640, 560, 192, 36);\n\n jScrollPane1.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);\n\n jTextArea1.setColumns(20);\n jTextArea1.setFont(new java.awt.Font(\"Arial\", 1, 18)); // NOI18N\n jTextArea1.setLineWrap(true);\n jTextArea1.setRows(5);\n jScrollPane1.setViewportView(jTextArea1);\n\n getContentPane().add(jScrollPane1);\n jScrollPane1.setBounds(840, 560, 572, 100);\n\n jButton4.setFont(new java.awt.Font(\"Arial\", 1, 18)); // NOI18N\n jButton4.setText(\"ADD\");\n jButton4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton4ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton4);\n jButton4.setBounds(640, 770, 120, 40);\n\n jButton1.setFont(new java.awt.Font(\"Arial\", 1, 18)); // NOI18N\n jButton1.setText(\"UPDATE\");\n jButton1.setToolTipText(\"\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton1);\n jButton1.setBounds(780, 770, 107, 40);\n\n jButton5.setFont(new java.awt.Font(\"Arial\", 1, 18)); // NOI18N\n jButton5.setText(\"DELETE\");\n jButton5.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton5ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton5);\n jButton5.setBounds(900, 770, 103, 40);\n\n jButton2.setFont(new java.awt.Font(\"Arial\", 1, 18)); // NOI18N\n jButton2.setText(\"DISPLAY\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton2);\n jButton2.setBounds(1020, 770, 111, 40);\n\n jButton6.setFont(new java.awt.Font(\"Arial\", 1, 18)); // NOI18N\n jButton6.setText(\"RESET\");\n jButton6.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton6ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton6);\n jButton6.setBounds(1150, 770, 113, 40);\n\n jButton7.setFont(new java.awt.Font(\"Arial\", 1, 18)); // NOI18N\n jButton7.setText(\"BACK\");\n jButton7.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton7ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton7);\n jButton7.setBounds(1280, 770, 138, 40);\n\n jTextField1.setEditable(false);\n jTextField1.setFont(new java.awt.Font(\"Arial\", 1, 18)); // NOI18N\n getContentPane().add(jTextField1);\n jTextField1.setBounds(840, 400, 571, 32);\n\n jTextField2.setFont(new java.awt.Font(\"Arial\", 1, 18)); // NOI18N\n jTextField2.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyReleased(java.awt.event.KeyEvent evt) {\n jTextField2KeyReleased(evt);\n }\n });\n getContentPane().add(jTextField2);\n jTextField2.setBounds(840, 670, 421, 37);\n\n jTextField3.setFont(new java.awt.Font(\"Arial\", 1, 18)); // NOI18N\n jTextField3.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyReleased(java.awt.event.KeyEvent evt) {\n jTextField3KeyReleased(evt);\n }\n });\n getContentPane().add(jTextField3);\n jTextField3.setBounds(840, 450, 571, 32);\n\n jTextField5.setFont(new java.awt.Font(\"Arial\", 1, 18)); // NOI18N\n jTextField5.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField5ActionPerformed(evt);\n }\n });\n jTextField5.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyReleased(java.awt.event.KeyEvent evt) {\n jTextField5KeyReleased(evt);\n }\n });\n getContentPane().add(jTextField5);\n jTextField5.setBounds(840, 510, 571, 32);\n\n jButton8.setFont(new java.awt.Font(\"Arial\", 1, 18)); // NOI18N\n jButton8.setText(\"SAVE\");\n jButton8.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton8ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton8);\n jButton8.setBounds(1280, 670, 138, 37);\n\n jLabel8.setFont(new java.awt.Font(\"Arial\", 1, 48)); // NOI18N\n jLabel8.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel8.setText(\"HOTEL MANAGEMENT SYSTEM\");\n getContentPane().add(jLabel8);\n jLabel8.setBounds(640, 70, 760, 56);\n\n jLabel7.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel7.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/hotel_management/apartment-architectural-design-architecture-323780.jpg\"))); // NOI18N\n getContentPane().add(jLabel7);\n jLabel7.setBounds(0, -10, 1930, 1110);\n\n pack();\n }", "private void select(ActionEvent e){\r\n // Mark this client as an existing client since they are in the list\r\n existingClient = true;\r\n // To bring data to Management Screen we will modify the text fields\r\n NAME_FIELD.setText(client.getName());\r\n ADDRESS_1_FIELD.setText(client.getAddress1());\r\n ADDRESS_2_FIELD.setText(client.getAddress2());\r\n CITY_FIELD.setText(client.getCity());\r\n ZIP_FIELD.setText(client.getZip());\r\n COUNTRY_FIELD.setText(client.getCountry());\r\n PHONE_FIELD.setText(client.getPhone());\r\n // client.setAddressID();\r\n client.setClientID(Client.getClientID(client.getName(), client.getAddressID()));\r\n // Pass client information to Client Management Screen\r\n currClient = client;\r\n back(e);\r\n }", "@FXML\n void UpdateCustomer(ActionEvent event) throws IOException {\n\n customer customer = customerTableView.getSelectionModel().getSelectedItem();\n if(customer == null)\n return;\n \n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(getClass().getResource(\"/view/UpdateCustomer.fxml\"));\n loader.load();\n\n UpdateCustomerController CustomerController = loader.getController();\n CustomerController.retrieveCustomer(customer);\n\n stage = (Stage)((Button)event.getSource()).getScene().getWindow();\n Parent scene = loader.getRoot();\n stage.setScene(new Scene(scene));\n stage.show();\n\n }", "@FXML\n void OnActionShowAddCustomerScreen(ActionEvent event) throws IOException {\n stage = (Stage)((Button)event.getSource()).getScene().getWindow();\n scene = FXMLLoader.load(getClass().getResource(\"/View/AddCustomer.fxml\"));\n stage.setTitle(\"Add Customer\");\n stage.setScene(new Scene(scene));\n stage.show();\n }", "public CreateCustomer() {\n initComponents();\n }", "@FXML\n void OnActionShowUpdateCustomerScreen(ActionEvent event) throws IOException {\n stage = (Stage)((Button)event.getSource()).getScene().getWindow();\n scene = FXMLLoader.load(getClass().getResource(\"/View/ModifyCustomer.fxml\"));\n stage.setTitle(\"Modify Customer\");\n stage.setScene(new Scene(scene));\n stage.show();\n }", "public CustomerAddInterFrm() {\r\n\t\tinitComponents();\r\n\t\tthis.setLocation(200, 100);\r\n\t}", "public void setCustomerName(String customerName) \n {\n this.customerName = customerName;\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jPanel4 = new javax.swing.JPanel();\n jLabel2 = new javax.swing.JLabel();\n jSeparator3 = new javax.swing.JSeparator();\n jLabel15 = new javax.swing.JLabel();\n jSeparator4 = new javax.swing.JSeparator();\n jPanel2 = new javax.swing.JPanel();\n jLabel11 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel42 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n jLabel40 = new javax.swing.JLabel();\n jLabel18 = new javax.swing.JLabel();\n jComboTitle = new javax.swing.JComboBox();\n jTextForenames = new javax.swing.JTextField();\n jTextSurname = new javax.swing.JTextField();\n jComboGender = new javax.swing.JComboBox();\n jTextDOB = new javax.swing.JTextField();\n jTextTelephone = new javax.swing.JTextField();\n jTextFax = new javax.swing.JTextField();\n jTextEmail = new javax.swing.JTextField();\n jTextNIN = new javax.swing.JTextField();\n jTextAccountNumber = new javax.swing.JTextField();\n jLabel9 = new javax.swing.JLabel();\n jPanel3 = new javax.swing.JPanel();\n jLabel10 = new javax.swing.JLabel();\n jLabel12 = new javax.swing.JLabel();\n jLabel19 = new javax.swing.JLabel();\n jTextCustomerPropertyName = new javax.swing.JTextField();\n jTextCustomerStreetName = new javax.swing.JTextField();\n jTextCustomerTownName = new javax.swing.JTextField();\n jLabel13 = new javax.swing.JLabel();\n jLabel16 = new javax.swing.JLabel();\n jTextCustomerCountry = new javax.swing.JTextField();\n jTextCustomerPostCode = new javax.swing.JTextField();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jButton3 = new javax.swing.JButton();\n jLabel20 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\"Add Customer\");\n setBackground(new java.awt.Color(255, 255, 255));\n\n jPanel1.setBackground(new java.awt.Color(255, 255, 255));\n\n jPanel4.setBackground(new java.awt.Color(255, 255, 255));\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n jLabel2.setText(\"Add Customer\");\n\n jLabel15.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/uk/co/exahertz/friendlysociety/gui/images/friendlysocietywatermarkmini.jpg\"))); // NOI18N\n\n jPanel2.setBackground(new java.awt.Color(255, 255, 255));\n\n jLabel11.setText(\"Title:\");\n\n jLabel4.setText(\"Forenames:\");\n\n jLabel3.setText(\"Surname:\");\n\n jLabel42.setText(\"Gender:\");\n\n jLabel8.setText(\"D.O.B (dd/mm/yyyy):\");\n\n jLabel5.setText(\"Telephone Number:\");\n\n jLabel6.setText(\"Fax Number:\");\n\n jLabel7.setText(\"Email:\");\n\n jLabel40.setText(\"N.I.N:.\");\n\n jLabel18.setText(\"Savings Account Number:\");\n\n jComboTitle.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Mr\", \"Mrs\", \"Miss\", \"Ms\", \"Dr\" }));\n\n jComboGender.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Male\", \"Female\", \"Transexual\", \"Dog\", \"Hippo\" }));\n\n jLabel9.setFont(new java.awt.Font(\"Tahoma\", 1, 12));\n jLabel9.setText(\"Personal\");\n\n jPanel3.setBackground(new java.awt.Color(255, 255, 255));\n\n jLabel10.setText(\"Name/Number:\");\n\n jLabel12.setText(\"Street:\");\n\n jLabel19.setText(\"Town:\");\n\n jLabel13.setText(\"Country:\");\n\n jLabel16.setText(\"Post Code:\");\n\n jButton1.setBackground(new java.awt.Color(255, 255, 255));\n jButton1.setText(\"Add\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jButton2.setBackground(new java.awt.Color(255, 255, 255));\n jButton2.setText(\"Refresh\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n jButton3.setBackground(new java.awt.Color(255, 255, 255));\n jButton3.setText(\"Back\");\n jButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton3ActionPerformed(evt);\n }\n });\n\n jLabel20.setFont(new java.awt.Font(\"Tahoma\", 1, 12));\n jLabel20.setText(\"Address\");\n\n javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);\n jPanel3.setLayout(jPanel3Layout);\n jPanel3Layout.setHorizontalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addGap(35, 35, 35)\n .addComponent(jLabel20))\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addGap(54, 54, 54)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel10)\n .addComponent(jLabel19)\n .addComponent(jLabel12)\n .addComponent(jLabel16)\n .addComponent(jLabel13))\n .addGap(63, 63, 63)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTextCustomerCountry, javax.swing.GroupLayout.DEFAULT_SIZE, 213, Short.MAX_VALUE)\n .addComponent(jTextCustomerPostCode, javax.swing.GroupLayout.DEFAULT_SIZE, 213, Short.MAX_VALUE)\n .addComponent(jTextCustomerTownName, javax.swing.GroupLayout.DEFAULT_SIZE, 213, Short.MAX_VALUE)\n .addComponent(jTextCustomerStreetName, javax.swing.GroupLayout.DEFAULT_SIZE, 213, Short.MAX_VALUE)\n .addComponent(jTextCustomerPropertyName, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 213, Short.MAX_VALUE)))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()\n .addContainerGap(155, Short.MAX_VALUE)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jButton2)\n .addGap(18, 18, 18)\n .addComponent(jButton3)))\n .addContainerGap())\n );\n jPanel3Layout.setVerticalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel20)\n .addGap(32, 32, 32)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel10)\n .addComponent(jTextCustomerPropertyName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel12)\n .addComponent(jTextCustomerStreetName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel19)\n .addComponent(jTextCustomerTownName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(11, 11, 11)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jTextCustomerCountry, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel13))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jTextCustomerPostCode, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel16))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 118, Short.MAX_VALUE)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton3))\n .addContainerGap())\n );\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel9)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(34, 34, 34)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(jLabel11)\n .addGap(99, 99, 99))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(jLabel18)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)))\n .addComponent(jLabel4)\n .addComponent(jLabel3)\n .addComponent(jLabel8)\n .addComponent(jLabel5)\n .addComponent(jLabel42)\n .addComponent(jLabel6)\n .addComponent(jLabel7)\n .addComponent(jLabel40))\n .addGap(15, 15, 15)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jComboTitle, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jComboGender, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(jTextSurname, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTextDOB, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTextFax, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTextTelephone, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 248, Short.MAX_VALUE)\n .addComponent(jTextForenames, javax.swing.GroupLayout.Alignment.LEADING))))))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(182, 182, 182)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(jTextEmail, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTextNIN, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTextAccountNumber, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 247, Short.MAX_VALUE))))\n .addGap(18, 18, 18)\n .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(jLabel9)\n .addGap(38, 38, 38)\n .addComponent(jLabel11))\n .addComponent(jComboTitle, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jTextForenames, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel4))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jTextSurname, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel3))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jTextDOB, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel8))\n .addGap(11, 11, 11)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jComboGender, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel42))\n .addGap(10, 10, 10)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jTextTelephone, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel5))\n .addGap(9, 9, 9)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jTextFax, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel6))\n .addGap(11, 11, 11)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jTextEmail, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel7))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(jTextNIN, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jTextAccountNumber, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(jLabel40)\n .addGap(18, 18, 18)\n .addComponent(jLabel18))))\n .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(126, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);\n jPanel4.setLayout(jPanel4Layout);\n jPanel4Layout.setHorizontalGroup(\n jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addContainerGap(251, Short.MAX_VALUE)\n .addComponent(jLabel2)\n .addGap(222, 222, 222))\n .addComponent(jSeparator3, javax.swing.GroupLayout.PREFERRED_SIZE, 585, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel15)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jSeparator4, javax.swing.GroupLayout.PREFERRED_SIZE, 176, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(75, 75, 75)))\n .addContainerGap())\n );\n jPanel4Layout.setVerticalGroup(\n jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jSeparator3, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(jLabel15)\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addGap(38, 38, 38)\n .addComponent(jSeparator4, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, 883, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, 448, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(24, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n setBounds(200, 275, 888, 499);\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jFrame1 = new javax.swing.JFrame();\n jTabbedPane1 = new javax.swing.JTabbedPane();\n custPanel = new javax.swing.JPanel();\n displayCustomerButton = new javax.swing.JButton();\n jCustPane2 = new javax.swing.JScrollPane();\n customersTextArea = new javax.swing.JTextArea();\n custIdTextField = new javax.swing.JTextField();\n custIdTFLabel = new javax.swing.JLabel();\n custNameTextField = new javax.swing.JTextField();\n custNameTFLabel = new javax.swing.JLabel();\n custLoginTextField = new javax.swing.JTextField();\n custLoginTFLabel = new javax.swing.JLabel();\n custPasswordTextField = new javax.swing.JTextField();\n custPasswordTFLabel = new javax.swing.JLabel();\n custUpdateButton = new javax.swing.JButton();\n custCreateButton = new javax.swing.JButton();\n custDeleteButton = new javax.swing.JButton();\n custDeleteTextField = new javax.swing.JTextField();\n custDeleteTFLabel = new javax.swing.JLabel();\n custIDError = new javax.swing.JLabel();\n custNameError = new javax.swing.JLabel();\n custLoginError = new javax.swing.JLabel();\n custPasswordError = new javax.swing.JLabel();\n prodPanel = new javax.swing.JPanel();\n displayProductButton = new javax.swing.JButton();\n jProdScrollPane1 = new javax.swing.JScrollPane();\n productsTextArea = new javax.swing.JTextArea();\n prodIdTextField = new javax.swing.JTextField();\n prodIdTFLabel = new javax.swing.JLabel();\n prodNameTextField = new javax.swing.JTextField();\n prodNameTFLable = new javax.swing.JLabel();\n prodDescriptionTextField = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n prodCostTextField = new javax.swing.JTextField();\n prodCostTFLabel = new javax.swing.JLabel();\n prodUpdateButton = new javax.swing.JButton();\n prodCreateButton = new javax.swing.JButton();\n prodDeleteButton = new javax.swing.JButton();\n prodDeleteTextField = new javax.swing.JTextField();\n prodDeleteTFLabel = new javax.swing.JLabel();\n prodIDError = new javax.swing.JLabel();\n prodNameError = new javax.swing.JLabel();\n prodDescriptionError = new javax.swing.JLabel();\n prodCostError = new javax.swing.JLabel();\n jLabel1 = new javax.swing.JLabel();\n quitButton = new javax.swing.JButton();\n\n jFrame1.setTitle(\"Jim Roebuck IT351 IP3\");\n\n javax.swing.GroupLayout jFrame1Layout = new javax.swing.GroupLayout(jFrame1.getContentPane());\n jFrame1.getContentPane().setLayout(jFrame1Layout);\n jFrame1Layout.setHorizontalGroup(\n jFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n jFrame1Layout.setVerticalGroup(\n jFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"Jim Roebuck IT351 IP3\");\n\n jTabbedPane1.setBackground(new java.awt.Color(102, 102, 102));\n jTabbedPane1.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n\n custPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n\n displayCustomerButton.setText(\"Display Customers\");\n displayCustomerButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n displayCustomerButtonActionPerformed(evt);\n }\n });\n\n customersTextArea.setColumns(20);\n customersTextArea.setRows(5);\n jCustPane2.setViewportView(customersTextArea);\n\n custIdTFLabel.setText(\"Cust ID\");\n\n custNameTFLabel.setText(\"Name\");\n\n custLoginTFLabel.setText(\"Login\");\n\n custPasswordTFLabel.setText(\"Password\");\n\n custUpdateButton.setText(\"Update\");\n custUpdateButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n custUpdateButtonActionPerformed(evt);\n }\n });\n\n custCreateButton.setText(\"Create\");\n custCreateButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n custCreateButtonActionPerformed(evt);\n }\n });\n\n custDeleteButton.setText(\"Delete\");\n custDeleteButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n custDeleteButtonActionPerformed(evt);\n }\n });\n\n custDeleteTFLabel.setText(\"Delete Records for Customer ID:\");\n\n custIDError.setForeground(new java.awt.Color(255, 0, 50));\n custIDError.setText(\"Cust ID Required\");\n\n custNameError.setForeground(new java.awt.Color(255, 0, 50));\n custNameError.setText(\"Name Required\");\n\n custLoginError.setForeground(new java.awt.Color(255, 0, 50));\n custLoginError.setText(\"Login Required\");\n\n custPasswordError.setForeground(new java.awt.Color(255, 0, 50));\n custPasswordError.setText(\"Password Required\");\n\n javax.swing.GroupLayout custPanelLayout = new javax.swing.GroupLayout(custPanel);\n custPanel.setLayout(custPanelLayout);\n custPanelLayout.setHorizontalGroup(\n custPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(custPanelLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(custPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jCustPane2)\n .addGroup(custPanelLayout.createSequentialGroup()\n .addComponent(displayCustomerButton)\n .addGap(0, 0, Short.MAX_VALUE)))\n .addContainerGap())\n .addGroup(custPanelLayout.createSequentialGroup()\n .addGap(59, 59, 59)\n .addGroup(custPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(custIdTFLabel)\n .addComponent(custNameTFLabel)\n .addComponent(custLoginTFLabel)\n .addComponent(custPasswordTFLabel)\n .addComponent(custCreateButton))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(custPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(custPanelLayout.createSequentialGroup()\n .addComponent(custIdTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(custIDError))\n .addComponent(custNameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 222, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(custPanelLayout.createSequentialGroup()\n .addGroup(custPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(custLoginTextField, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(custPasswordTextField, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 98, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(custPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(custLoginError)\n .addComponent(custPasswordError)))\n .addComponent(custUpdateButton, javax.swing.GroupLayout.Alignment.TRAILING))\n .addGroup(custPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(custPanelLayout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 311, Short.MAX_VALUE)\n .addGroup(custPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(custDeleteButton, javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, custPanelLayout.createSequentialGroup()\n .addComponent(custDeleteTFLabel)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(custDeleteTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(43, 43, 43))\n .addGroup(custPanelLayout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(custNameError)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))\n );\n custPanelLayout.setVerticalGroup(\n custPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(custPanelLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(displayCustomerButton)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jCustPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 256, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 69, Short.MAX_VALUE)\n .addGroup(custPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(custIdTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(custIdTFLabel)\n .addComponent(custIDError))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(custPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(custNameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(custNameTFLabel)\n .addComponent(custNameError))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(custPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(custLoginTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(custLoginTFLabel)\n .addComponent(custLoginError))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(custPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(custPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(custDeleteTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(custDeleteTFLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(custPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(custPasswordTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(custPasswordTFLabel)\n .addComponent(custPasswordError)))\n .addGap(18, 18, 18)\n .addGroup(custPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(custCreateButton)\n .addComponent(custDeleteButton)\n .addComponent(custUpdateButton))\n .addGap(52, 52, 52))\n );\n\n jTabbedPane1.addTab(\"Cutomer\", custPanel);\n\n prodPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n\n displayProductButton.setText(\"Display Products\");\n displayProductButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n displayProductButtonActionPerformed(evt);\n }\n });\n\n productsTextArea.setColumns(20);\n productsTextArea.setRows(5);\n jProdScrollPane1.setViewportView(productsTextArea);\n\n prodIdTFLabel.setText(\"Product ID\");\n\n prodNameTFLable.setText(\"Name\");\n\n jLabel2.setText(\"Description\");\n\n prodCostTFLabel.setText(\"Cost\");\n\n prodUpdateButton.setText(\"Update\");\n prodUpdateButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n prodUpdateButtonActionPerformed(evt);\n }\n });\n\n prodCreateButton.setText(\"Create\");\n prodCreateButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n prodCreateButtonActionPerformed(evt);\n }\n });\n\n prodDeleteButton.setText(\"Delete\");\n prodDeleteButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n prodDeleteButtonActionPerformed(evt);\n }\n });\n\n prodDeleteTFLabel.setForeground(new java.awt.Color(255, 0, 0));\n prodDeleteTFLabel.setText(\"Delete Records for Product ID:\");\n\n prodIDError.setForeground(new java.awt.Color(255, 0, 50));\n prodIDError.setText(\"Prod. ID Required\");\n\n prodNameError.setForeground(new java.awt.Color(255, 0, 50));\n prodNameError.setText(\" Name Required\");\n\n prodDescriptionError.setForeground(new java.awt.Color(255, 0, 50));\n prodDescriptionError.setText(\"Description Required\");\n\n prodCostError.setForeground(new java.awt.Color(255, 0, 50));\n prodCostError.setText(\"Product Cost Required\");\n\n javax.swing.GroupLayout prodPanelLayout = new javax.swing.GroupLayout(prodPanel);\n prodPanel.setLayout(prodPanelLayout);\n prodPanelLayout.setHorizontalGroup(\n prodPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(prodPanelLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(prodPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jProdScrollPane1)\n .addGroup(prodPanelLayout.createSequentialGroup()\n .addComponent(displayProductButton)\n .addGap(0, 0, Short.MAX_VALUE)))\n .addContainerGap())\n .addGroup(prodPanelLayout.createSequentialGroup()\n .addGap(78, 78, 78)\n .addGroup(prodPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(prodPanelLayout.createSequentialGroup()\n .addComponent(prodCreateButton)\n .addGap(153, 153, 153)\n .addComponent(prodUpdateButton))\n .addGroup(prodPanelLayout.createSequentialGroup()\n .addGroup(prodPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(prodIdTFLabel)\n .addComponent(prodNameTFLable)\n .addComponent(jLabel2)\n .addComponent(prodCostTFLabel))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(prodPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(prodPanelLayout.createSequentialGroup()\n .addComponent(prodCostTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(prodCostError))\n .addGroup(prodPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(prodPanelLayout.createSequentialGroup()\n .addComponent(prodIdTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(prodIDError))\n .addComponent(prodNameTextField)\n .addComponent(prodDescriptionTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 222, javax.swing.GroupLayout.PREFERRED_SIZE)))))\n .addGroup(prodPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(prodPanelLayout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 270, Short.MAX_VALUE)\n .addGroup(prodPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, prodPanelLayout.createSequentialGroup()\n .addComponent(prodDeleteTFLabel)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(prodDeleteTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(prodDeleteButton, javax.swing.GroupLayout.Alignment.TRAILING))\n .addGap(82, 82, 82))\n .addGroup(prodPanelLayout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(prodPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(prodDescriptionError)\n .addComponent(prodNameError))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))\n );\n prodPanelLayout.setVerticalGroup(\n prodPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(prodPanelLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(displayProductButton)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jProdScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 256, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 69, Short.MAX_VALUE)\n .addGroup(prodPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(prodIdTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(prodIdTFLabel)\n .addComponent(prodIDError))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(prodPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(prodNameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(prodNameTFLable)\n .addComponent(prodNameError))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(prodPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(prodDescriptionTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2)\n .addComponent(prodDescriptionError))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(prodPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(prodPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(prodDeleteTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(prodDeleteTFLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(prodPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(prodCostTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(prodCostTFLabel)\n .addComponent(prodCostError)))\n .addGap(18, 18, 18)\n .addGroup(prodPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(prodCreateButton)\n .addComponent(prodDeleteButton)\n .addComponent(prodUpdateButton))\n .addGap(52, 52, 52))\n );\n\n jTabbedPane1.addTab(\"Product\", prodPanel);\n\n jLabel1.setFont(new java.awt.Font(\"SansSerif\", 3, 24)); // NOI18N\n jLabel1.setText(\"DATABASE MANAGER\");\n\n quitButton.setText(\"Quit\");\n quitButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n quitButtonActionPerformed(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 .addGap(63, 63, 63)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jTabbedPane1, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(quitButton, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(61, 61, 61))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 603, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 592, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 27, Short.MAX_VALUE)\n .addComponent(quitButton, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n\n pack();\n }", "public void addCustomer(){\n Customer customer = new Customer();\n customer.setId(data.numberOfCustomer());\n customer.setFirstName(GetChoiceFromUser.getStringFromUser(\"Enter First Name: \"));\n customer.setLastName(GetChoiceFromUser.getStringFromUser(\"Enter Last Name: \"));\n data.addCustomer(customer,data.getBranch(data.getBranchEmployee(ID).getBranchID()));\n System.out.println(\"Customer has added Successfully!\");\n }", "@Override\n public void handle(Event event) {\n FXMLCustomerController controller = new FXMLCustomerController();\n controller = (FXMLCustomerController) controller.load();\n\n SearchRowItem whichCustomer = searchResultsTable.getSelectionModel().getSelectedItem();\n controller.setCustomerDetails(whichCustomer);\n\n controller.getStage().showAndWait();\n if (controller.isUpdated()) {\n // refresh Customer against server\n // CustomerTO updatedCustomer = SoapHandler.getCustomerByID(whichCustomer.getCustomerId());\n // whichCustomer.setCustomerTO(updatedCustomer);\n // if there's a partner, set the name\n CustomerTO updatedCustomer = controller.getCustomer();\n Integer partnerId = whichCustomer.getPartnerId();\n if (partnerId != null && partnerId != 0) {\n if (whichCustomer.getPartnerProperty() == null) {\n whichCustomer.setPartnerProperty(new SimpleStringProperty());\n }\n SimpleStringProperty partnerName = (SimpleStringProperty) whichCustomer.getPartnerProperty();\n SearchRowItem partner = customerSet.get(partnerId);\n partnerName.setValue(partner.getForename());\n if (partner.getPartnerProperty() != null) {\n partner.getPartnerProperty().setValue(whichCustomer.getForename());\n } else {\n partner.setPartnerProperty(new SimpleStringProperty(whichCustomer.getForename()));\n }\n } else if (whichCustomer.getPartnerProperty() != null) {\n whichCustomer.getPartnerProperty().setValue(\"\");\n }\n whichCustomer.setCustomer(updatedCustomer);\n whichCustomer.refresh(updatedCustomer);\n // SearchRowItem customer = customerSet.get(whichCustomer.getCustomerId());\n // customer.setCustomerTO(whichCustomer);\n\n searchResultsTable.refresh();\n }\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tint ID = 0;\n\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tID = Integer.parseInt(txtCustomerID.getText());\n\t\t\t\t}\n\t\t\t\tcatch(NumberFormatException e1) // ensures ID is integer\n\t\t\t\t{\n\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\"ID must consist of only numbers\", \"Error\",\n\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE, null);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Gather user input\n\t\t\t\tString first = txtFirstName.getText();\n\t\t\t\tString last = txtLastName.getText();\n\t\t\t\tString phone = txtPhoneNumber.getText();\n\t\t\t\tString address = txtAddress.getText();\n\t\t\t\tString email = txtEmail.getText();\n\n\t\t\t\tif(first.isEmpty())\n\t\t\t\t{\n\t\t\t\t\tfirst = \"N/A\";\n\t\t\t\t}\n\t\t\t\tif(last.isEmpty())\n\t\t\t\t{\n\t\t\t\t\tlast = \"N/A\";\n\t\t\t\t}\n\t\t\t\tif(phone.isEmpty())\n\t\t\t\t{\n\t\t\t\t\tphone = \"N/A\";\n\t\t\t\t}\n\t\t\t\tif(address.isEmpty())\n\t\t\t\t{\n\t\t\t\t\taddress = \"N/A\";\n\t\t\t\t}\n\t\t\t\tif(email.isEmpty())\n\t\t\t\t{\n\t\t\t\t\temail = \"N/A\";\n\t\t\t\t}\n\n\t\t\t\tchar returnCustomer;\n\n\t\t\t\tif(rdbtnYes.isSelected())\n\t\t\t\t\treturnCustomer = 'Y';\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturnCustomer = 'N';\n\t\t\t\t}\n\n\t\t\t\t// confirmation dialog\n\t\t\t\tint choice = JOptionPane.showConfirmDialog(null,\n\t\t\t\t\t\t\"Is The Following Information Correct?\" + \"\\nID: \" + ID\n\t\t\t\t\t\t\t\t+ \"\\nFirst Name: \" + first + \"\\nLast Name: \"\n\t\t\t\t\t\t\t\t+ last + \"\\nPhone Number: \" + phone\n\t\t\t\t\t\t\t\t+ \"\\nAddress: \" + address + \"\\nEmail: \" + email\n\t\t\t\t\t\t\t\t+ \"\\nReturn Customer: \" + returnCustomer,\n\t\t\t\t\t\t\"Confirmation\", JOptionPane.YES_NO_OPTION);\n\n\t\t\t\t// if information confirmed, commits data to database.\n\t\t\t\tif(choice == 0)\n\t\t\t\t{\n\n\t\t\t\t\t// creates customer object\n\t\t\t\t\tCustomer create = new Customer(ID, first, last, phone,\n\t\t\t\t\t\t\taddress, email, returnCustomer);\n\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tOracleJDBC.writeCustomer(create); // passes to method that writes customer to database\n\t\t\t\t\t}\n\t\t\t\t\tcatch(SQLException e1)\n\t\t\t\t\t{\n\n\t\t\t\t\t\tif(e1.getErrorCode() == 12899)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tString message = e1.getMessage();\n\n\t\t\t\t\t\t\tif(message.contains(\n\t\t\t\t\t\t\t\t\t\"ORA-12899: value too large for column \\\"DYLAN\\\".\\\"CUSTOMER\\\".\\\"FIRSTNAME\\\"\"))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\t\t\t\"First name is too Long, Max Length = 12\",\n\t\t\t\t\t\t\t\t\t\t\"Error\", JOptionPane.ERROR_MESSAGE,\n\t\t\t\t\t\t\t\t\t\tnull); // sql error that email is too long\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if(message.contains(\n\t\t\t\t\t\t\t\t\t\"ORA-12899: value too large for column \\\"DYLAN\\\".\\\"CUSTOMER\\\".\\\"LASTNAME\\\"\"))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\t\t\t\"Last name is too Long, Max Length = 50\",\n\t\t\t\t\t\t\t\t\t\t\"Error\", JOptionPane.ERROR_MESSAGE,\n\t\t\t\t\t\t\t\t\t\tnull); // sql error that email is too long\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if(message.contains(\n\t\t\t\t\t\t\t\t\t\"ORA-12899: value too large for column \\\"DYLAN\\\".\\\"CUSTOMER\\\".\\\"PHONE\\\"\"))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\t\t\t\"Phone number is too Long, Max Length = 14\",\n\t\t\t\t\t\t\t\t\t\t\"Error\", JOptionPane.ERROR_MESSAGE,\n\t\t\t\t\t\t\t\t\t\tnull); // sql error that email is too long\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if(message.contains(\n\t\t\t\t\t\t\t\t\t\"ORA-12899: value too large for column \\\"DYLAN\\\".\\\"CUSTOMER\\\".\\\"ADDRESS\\\"\"))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\t\t\t\"Address is too Long, Max Length = 50\",\n\t\t\t\t\t\t\t\t\t\t\"Error\", JOptionPane.ERROR_MESSAGE,\n\t\t\t\t\t\t\t\t\t\tnull); // sql error that email is too long\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if(message.contains(\n\t\t\t\t\t\t\t\t\t\"ORA-12899: value too large for column \\\"DYLAN\\\".\\\"CUSTOMER\\\".\\\"EMAIL\\\"\"))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\t\t\t\"EMAIL is too Long, Max Length = 50\",\n\t\t\t\t\t\t\t\t\t\t\"Error\", JOptionPane.ERROR_MESSAGE,\n\t\t\t\t\t\t\t\t\t\tnull); // sql error that email is too long\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\telse if(e1.getErrorCode() == 00001) // sql error for PK constraint violation\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\t\t\"Customer ID already in use\", \"Error\",\n\t\t\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE, null);\n\t\t\t\t\t\telse if(e1.getErrorCode() == 1438) // sql error for customer ID too long\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\t\t\"Customer ID to long, must be 5 digits or less\",\n\t\t\t\t\t\t\t\t\t\"Error\", JOptionPane.ERROR_MESSAGE, null);\n\t\t\t\t\t\telse // unaccounted for error (should not happen)\n\t\t\t\t\t\t\te1.printStackTrace();\n\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Customer Created\",\n\t\t\t\t\t\t\t\"Success\", JOptionPane.INFORMATION_MESSAGE, null);\n\n\t\t\t\t\t// clears form\n\t\t\t\t\tclearForm();\n\t\t\t\t\trdbtnNo.isSelected();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\treturn;\n\n\t\t\t}", "private void custIDTextFieldActionPerformed(java.awt.event.ActionEvent evt) {\n }", "public void sendData(Customer customer){\n\n this.countriesList = CountryDAOImpl.getAllCountries();\n\n\n this.idTB.setText(Integer.toString(customer.getId()));\n this.nameTB.setText(customer.getName());\n this.addressTB.setText(customer.getAddress());\n this.postCodeTB.setText(customer.getPostalCode());\n this.phone.setText(customer.getPhoneNumber());\n this.countryCB.setItems(this.countriesList);\n setCountrySelected(customer.getCountry(), customer.getDivision());\n setCustomer(customer);\n }", "public void initData(Customer customer) throws SQLException{\n this.selectedCustomer = customer ;\n this.fullnameLabel.setText(selectedCustomer.getFullname());\n this.username.setText(selectedCustomer.getUsername());\n this.phone.setText(selectedCustomer.getPhone());\n this.email.setText(selectedCustomer.getEmail());\n this.address.setText(selectedCustomer.getAddress());\n this.customer_id.setText(Integer.toString(selectedCustomer.getCustomer_id()));\n this.tableView.setItems(getOrders());\n }", "private void seatCustomer(MyCustomer customer) {\n\t//Notice how we print \"customer\" directly. It's toString method will do it.\n\tDo(\"Seating \" + customer.cmr + \" at table \" + (customer.tableNum+1));\n\t//move to customer first.\n\tCustomer guiCustomer = customer.cmr.getGuiCustomer();\n\tguiMoveFromCurrentPostionTo(new Position(guiCustomer.getX()+1,guiCustomer.getY()));\n\twaiter.pickUpCustomer(guiCustomer);\n\tPosition tablePos = new Position(tables[customer.tableNum].getX()-1,\n\t\t\t\t\t tables[customer.tableNum].getY()+1);\n\tguiMoveFromCurrentPostionTo(tablePos);\n\twaiter.seatCustomer(tables[customer.tableNum]);\n\tcustomer.state = CustomerState.NO_ACTION;\n\tcustomer.cmr.msgFollowMeToTable(this, new Menu());\n\tstateChanged();\n }", "public void actionPerformed(ActionEvent e){\n\t\t\t\ttry{\n\t\t\t\t\tif(checkCustomerDuplicate(customers, Integer.parseInt(custIdJTextField.getText())) == true){\n\t\t\t\t\t\tif(custNameJTextField.getText().isEmpty() || custAddressJTextField.getText().isEmpty()){\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Required Fields: \\n Customer Id \\n Customer Name \\n Customer Address\");\t\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\tCustomer customer = new Customer(Integer.parseInt(custIdJTextField.getText()),\n\t\t\t\t\t\t\t\t\tcustNameJTextField.getText(),custAddressJTextField.getText(), custEmailJTextField.getText(),\n\t\t\t\t\t\t\t\t\tInteger.parseInt(custPhoneJTextField.getText()));\n\t\t\t\t\t\t\t\tcustomers.add(customer);\n\t\t\t\t\t\t\t\tcustIdCombo.addItem(Integer.toString(customer.getCustId()));\n\t\t\t\t\t\t\t\tcustNameCombo.addItem(customer.getCustName());\n\t\t\t\t\t\t\t\teditCustIdCombo.addItem(Integer.toString(customer.getCustId()));\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"New Customer Added\");\n\t\t\t\t\t\t\t\tlistOfCustomers.addElement(custIdJTextField.getText());\n\t\t\t\t\t\t\t\tlistOfCusIds.addElement(custIdJTextField.getText());\n\t\t\t\t\t\t\t\tcustIdJTextField.setText(\"\");\n\t\t\t\t\t\t\t\tcustNameJTextField.setText(\"\");\n\t\t\t\t\t\t\t\tcustAddressJTextField.setText(\"\");\n\t\t\t\t\t\t\t\tcustEmailJTextField.setText(\"\");\n\t\t\t\t\t\t\t\tcustPhoneJTextField.setText(\"\");\n\t\t\t\t\t\t\t\teditCustIdComboInv.addItem(Integer.toString(customer.getCustId()));\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\telse{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Customer Already Exists\");\n\t\t\t\t\t}\n\t\t\t\t}catch(NumberFormatException nfe){\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Customer Id should be a number.\");\n\t\t\t\t}\n\t\t\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tObject obj=e.getSource();\n\t\tif(obj==addBtn) {\n\t\t\tString Cid=cid.getText().toString();\n\t\t\tString Cname=cname.getText().toString();\n\t\t\tString Caddress=caddress.getText().toString();\n\t\t\tString Citem=citem.getText().toString();\n\t\t\tString Ccost=ccost.getText().toString();\n\t\t\tString Cphone=cphone.getText().toString();\t\t\t\n\t\t\t\n\t\t\tConnection c=PConnection.connect();\n\t\t\tString query = \"insert into customers values (?,?,?,?,?,?)\";\n\t\t\t\n\t\t\ttry {\n\t\t\t\tPreparedStatement ps = c.prepareStatement(query);\n\t\t\t\t\n\t\t\t\tps.setInt(1, Integer.parseInt(Cid));\n\t\t\t\tps.setString(2, Cname);\n\t\t\t\tps.setString(3, Caddress);\n\t\t\t\tps.setString(4, Citem);\n\t\t\t\tps.setInt(5, Integer.parseInt(Ccost));\n\t\t\t\tps.setString(6, Cphone);\n\t\t\t\tps.executeUpdate();\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Customer added\");\n\t\t\t\t//addCust.dispose();\n\t\t\t\tcid.setText(\"\");\n\t\t\t\tcname.setText(\"\");\n\t\t\t\tcaddress.setText(\"\");\n\t\t\t\tcitem.setText(\"\");\n\t\t\t\tccost.setText(\"\");\n\t\t\t\tcphone.setText(\"\");\t\n\t\t\t\t\n\t\t\t}\n\t\t\tcatch (SQLException ex) {\n\t\t\t\t// TODO: handle exception\n\t\t\t\tex.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public void setCustomersName(String customersName)\r\n {\r\n this.customersName = customersName;\r\n }" ]
[ "0.75848013", "0.71207285", "0.6870326", "0.6774441", "0.6767402", "0.67053413", "0.6647464", "0.6633284", "0.65967363", "0.6586893", "0.65607023", "0.65437204", "0.6531959", "0.6529603", "0.65269524", "0.647002", "0.6463044", "0.646124", "0.643108", "0.64039916", "0.6375606", "0.63628614", "0.6352328", "0.63249123", "0.6312279", "0.62886286", "0.6247296", "0.62467116", "0.6241395", "0.6225235", "0.6225128", "0.6204128", "0.6202845", "0.6186377", "0.6179716", "0.61703396", "0.61652637", "0.61639935", "0.6157834", "0.61551243", "0.61302483", "0.61276907", "0.6125217", "0.6118452", "0.61134356", "0.6104675", "0.6103327", "0.60993755", "0.60993415", "0.6061038", "0.60581046", "0.6047635", "0.60313386", "0.60313225", "0.60050756", "0.59982777", "0.5982955", "0.5977389", "0.5973403", "0.5963866", "0.595938", "0.5951387", "0.59510314", "0.59493935", "0.5944315", "0.5943369", "0.59431285", "0.59410524", "0.59234494", "0.59216243", "0.59211594", "0.59188783", "0.5913593", "0.5911911", "0.59103733", "0.5906058", "0.5899031", "0.58941615", "0.58785176", "0.5870636", "0.5860623", "0.58546805", "0.5836787", "0.5835363", "0.58330536", "0.5810272", "0.57953745", "0.57938015", "0.5791114", "0.5770727", "0.5767132", "0.5765063", "0.5762758", "0.5762283", "0.57613134", "0.57582134", "0.5754578", "0.57443947", "0.57209456", "0.57152015" ]
0.64367
18
Delete the selected customer
@FXML private void handleDelete() { Alert alert = new Alert(Alert.AlertType.WARNING); alert.getButtonTypes().clear(); alert.getButtonTypes().addAll(ButtonType.YES, ButtonType.NO); alert.setHeaderText(lang.getString("deleteCustomerMessage")); alert.initOwner(stage); alert.showAndWait() .filter(answer -> answer == ButtonType.YES) .ifPresent(answer -> { Customer customer = customerTable.getSelectionModel().getSelectedItem(); deleteCustomer(customer); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void delete(Customer customer) {\n\t\t\n\t}", "@Override\n\tpublic void delete(Customer customer) {\n\t\t\n\t}", "void deleteCustomerById(int customerId);", "void delete(Customer customer);", "public boolean deleteCustomer(String custId);", "void deleteCustomerById(Long id);", "public void deleteCustomer(Customer customer){\n _db.delete(\"Customer\", \"customer_name = ?\", new String[]{customer.getName()});\n }", "public void DeleteCust(String id);", "public void removeCustomer(){\n String message = \"Choose one of the Customer to remove it\";\n if (printData.checkAndPrintCustomer(message)){\n subChoice = GetChoiceFromUser.getSubChoice(data.numberOfCustomer());\n if (subChoice!=0){\n data.removeCustomer(data.getCustomer(subChoice-1),data.getBranch(data.getBranchEmployee(ID).getBranchID()));\n System.out.println(\"Customer has removed Successfully!\");\n }\n }\n }", "public void deletecustomer(long id) {\n\t\t customerdb.deleteById(id);\n\t }", "@GetMapping(\"/delete\")\r\n\tpublic String deleteCustomer(@RequestParam(\"customerId\") int id){\n\t\tcustomerService.deleteCustomer(id);\r\n\t\t\r\n\t\t//send over to our form\r\n\t\treturn \"redirect:/customer/list\";\r\n\t}", "@Override\n\tpublic void delete(Customer o) {\n\n\t\tif (o.getId() == null) {\n\t\t\treturn;\n\t\t}\n\n\t\tString deleteQuery = \"DELETE FROM TB_customer WHERE \" + COLUMN_NAME_ID + \"=\" + o.getId();\n\n\t\ttry (Statement deleteStatement = dbCon.createStatement()) {\n\t\t\tdeleteStatement.execute(deleteQuery);\n\t\t} catch (SQLException s) {\n\t\t\tSystem.out.println(\"Delete of customer \" + o.getId() + \" falied : \" + s.getMessage());\n\t\t}\n\t}", "void deleteCustomerDDPayById(int id);", "boolean delete(CustomerOrder customerOrder);", "@Override\n public void deleteCustomer(UUID id) {\n log.debug(\"Customer has been deleted: \"+id);\n }", "public void delete(Customer customer) {\n\t\tcustRepo.delete(customer);\n\t}", "private void deleteCustomerById(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n int idCustomer = Integer.parseInt(request.getParameter(\"id\"));\n CustomerDao.deleteCustomer(idCustomer);\n response.sendRedirect(\"/\");\n }", "public void delete(Customer customer) {\r\n EntityManagerHelper.beginTransaction();\r\n CUSTOMERDAO.delete(customer);\r\n EntityManagerHelper.commit();\r\n renderManager.getOnDemandRenderer(customer.getCustomernumber().toString()).requestRender();\r\n //renderManager.removeRenderer(renderManager.getOnDemandRenderer(customer.getCustomernumber().toString()));\r\n }", "@Override\n\tpublic void deleteCoustomer(Customer customer) throws Exception {\n\t\tgetHibernateTemplate().delete(customer);\n\t}", "@Override\n\t@Transactional\n\tpublic void deleteCustomer(Customer customer) {\n\t\thibernateTemplate.delete(customer);\n\n\t\tSystem.out.println(customer + \"is deleted\");\n\t}", "BrainTreeCustomerResult removeCustomer(BrainTreeCustomerRequest request);", "@Override\n\tpublic void delete() {\n\t\tSystem.out.println(\"Mobile Customer delete()\");\n\t}", "@Override\n\tpublic void deleteCustomer(Long custId) {\n\t\tcustomerRepository.deleteById(custId);\n\t\t\n\t}", "public void delete(Customer c){\n Connection conn = ConnectionFactory.getConnection();\n PreparedStatement ppst = null;\n try {\n ppst = conn.prepareCall(\"DELETE FROM customer WHERE customer_key = ?\");\n ppst.setInt(1, c.getCustomerKey());\n ppst.executeUpdate();\n System.out.println(\"Successfully deleted.\");\n } catch (SQLException e) {\n throw new RuntimeException(\"Delete error: \", e);\n } finally {\n ConnectionFactory.closeConnection(conn, ppst);\n }\n }", "@Override\r\n\tpublic boolean deleteCustomer(int customerID) {\n\t\treturn false;\r\n\t}", "@DeleteMapping()\n public Customer deleteCustomer(@RequestBody Customer customer ) {\n customerRepository.delete(customer);\n return customerRepository.findById(customer.getId()).isPresent() ? customer : null;\n }", "public void deleteCustomer(Customer customer) {\n\n\t\tcustomers.remove(customer);\n\n\t\tString sql = \"UPDATE customer SET active = 0 WHERE customerId = ?\";\n\n\t\ttry ( Connection conn = DriverManager.getConnection(URL, USER_NAME, PASSWORD);\n\t\t\t\tPreparedStatement prepstmt = conn.prepareStatement(sql); ) {\n\n\t\t\tint customerId = Customer.getCustomerId(customer);\n\t\t\tprepstmt.setInt(1, customerId);\n\t\t\tprepstmt.executeUpdate();\n\n\t\t} catch (SQLException e){\n\t\t\tSystem.out.println(\"SQLException: \" + e.getMessage());\n\t\t\tSystem.out.println(\"SQLState: \" + e.getSQLState());\n\t\t\tSystem.out.println(\"VendorError: \" + e.getErrorCode());\n\t\t}\n\t}", "@Override\n\tpublic void removeCustomer(Session session){\n\t\ttry{\n\t\t\tSystem.out.print(\"*--------------Remove Customers here--------------*\\n\");\n\t\t\t//scanner class allows the admin to enter his/her input\n\t\t\tScanner scanner = new Scanner(System.in);\n\t\t\t//read input customer id\n\t\t\tSystem.out.print(\"Enter Customer Id to delete the customer: \");\n\t\t\tint customerId = scanner.nextInt();\n\n\t\t\t//pass these input items to client controller\n\t\t\tsamp=mvc.removeCustomer(session,customerId);\n\t\t\tSystem.out.println(samp);\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(\"Online Market App- Remove Customer Exception: \" +e.getMessage());\n\t\t}\n\t}", "@Override\n\tpublic void deleteCustomer(int theId) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\t\t\n\t\t// delete object with primary key\n\t\tQuery theQuery = \n\t\t\t\tcurrentSession.createQuery(\"delete from Customer where id=:customerId\");\n\t\ttheQuery.setParameter(\"customerId\", theId);\n\t\t\n\t\ttheQuery.executeUpdate();\t\t\n\t}", "void removeCustomer(Customer customer);", "@Override\n\tpublic void deleteCustomer(int theId) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\t\t\n\t\t// delete the object with the primary key\n\t\tQuery theQuery = currentSession.createQuery(\"delete from Customer where id=:customerId\");\n\t\ttheQuery.setParameter(\"customerId\", theId);\n\t\t\n\t\ttheQuery.executeUpdate();\n\t}", "@Override\n\tpublic boolean deleteCustomer(int customerId) {\n\t\treturn false;\n\t}", "@Override\n\tpublic void deleteCustomer(int theId) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n\t\t// delete object with primary key\n\t\tQuery theQuery = currentSession.createQuery(\"delete from Customer where id=:customerId\");\n\t\ttheQuery.setParameter(\"customerId\", theId);\n\n\t\ttheQuery.executeUpdate();\n\t}", "@Override\n\tpublic void deleteCustomer(int theId) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n\t\t//now delete the customer using parameter theId i.e., Customer id (primary key)\n\t\t//HQL query\n\t\tQuery theQuery = currentSession.createQuery(\"delete from Customer where id=:customerId\");\n\n\t\t//prev parameter theId is assigned to customerId\n\t\ttheQuery.setParameter(\"customerId\",theId);\n\n\t\t//this works with update, delete , so on ...\n\t\ttheQuery.executeUpdate();\n\n\t}", "@Override\r\n\tpublic void removeCustomer() {\n\t\t\r\n\t}", "public boolean deleteCustomer() {\n\t\treturn false;\r\n\t}", "@RequestMapping(value = \"/customer-addres/{id}\",\n method = RequestMethod.DELETE,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<Void> deleteCustomerAddres(@PathVariable Long id) {\n log.debug(\"REST request to delete CustomerAddres : {}\", id);\n customerAddresRepository.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(\"customerAddres\", id.toString())).build();\n }", "@Test\n\tpublic void deleteCustomer() {\n\n\t\t// Given\n\t\tString name = \"Leo\";\n\t\tString address = \"Auckland\";\n\t\tString telephoneNumber = \"021123728381\";\n\t\tICustomer customer = customerController.create(name, address, telephoneNumber);\n\t\tlong id = customer.getId();\n\t\tint originalLength = customerController.read().size();\n\n\t\t// When\n\t\tICustomer cus = customerController.delete(id);\n\n\t\t// Then\n\t\tint expected = originalLength - 1;\n\t\tint actual = customerController.read().size();\n\t\tAssert.assertEquals(expected, actual);\n\t\tAssert.assertNotNull(cus);\n\t}", "@Override\n\tpublic boolean deleteCustomer(int customerId) {\n Session session =sessionFactory.getCurrentSession();\n Customer customer= getCustomer(customerId);\n session.delete(customer);\n\t\treturn true;\n\t}", "@Override\n\tpublic void deleteOne(Customer c) {\n\t\tthis.getHibernateTemplate().delete(c);\n\t}", "public abstract void delete(CustomerOrder customerOrder);", "@DeleteMapping(\"/customers/{customerId}\")\n public String deleteCustomer(@PathVariable int customerId) {\n CustomerHibernate customerHibernate = customerService.findById(customerId);\n\n if (customerHibernate == null) {\n throw new RuntimeException(\"Customer id not found - \" + customerId);\n }\n customerService.deleteById(customerId);\n\n return String.format(\"Deleted customer id - %s \", customerId);\n }", "public void delete(String custNo) {\n\t\tcstCustomerDao.update(custNo);\n\t\t\n\t}", "@Override\n\tpublic Item delete() {\n\t\treadAll();\n\t\tLOGGER.info(\"\\n\");\n\t\t//user can select either to delete a customer from system with either their id or name\n\t\tLOGGER.info(\"Do you want to delete record by Item ID\");\n\t\tlong id = util.getLong();\n\t\titemDAO.deleteById(id);\n\t\t\t\t\n\t\t\t\t\n\t\treturn null;\n\t}", "@Override\r\n\tpublic void delete(String cust_ID) {\n\t\tConnection con = null;\r\n\t\tPreparedStatement pstmt = null;\r\n\r\n\t\ttry {\r\n\t\t\tcon = ds.getConnection();\r\n\t\t\tpstmt = con.prepareStatement(DELETE);\r\n\r\n\t\t\tpstmt.setString(1, cust_ID);\r\n\r\n\t\t\tpstmt.executeUpdate();\r\n\t\t} catch (SQLException se) {\r\n\t\t\tthrow new RuntimeException(\"A database error occured.\" + se.getMessage());\r\n\t\t} finally {\r\n\t\t\tif (pstmt != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tpstmt.close();\r\n\t\t\t\t} catch (SQLException se) {\r\n\t\t\t\t\tse.printStackTrace(System.err);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (con != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tcon.close();\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace(System.err);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "@DeleteMapping(\"/{id}\")\n public Boolean deleteCustomer(@PathVariable(\"id\") Long customerId) {\n return true;\n }", "public void actionPerformed(ActionEvent arg){\n\t\t\t\tif(editCustIdCombo.getSelectedIndex()!= 0){\n\t\t\t\t\tfor(Customer customer: customers){\n\t\t\t\t\t\tif(customer.getCustId() == Integer.parseInt(editCustIdCombo.getSelectedItem().toString())){\n\t\t\t\t\t\t\tlistOfCustomers.removeElement(editCustIdCombo.getSelectedItem().toString());\n\t\t\t\t\t\t\tlistOfCusIds.removeElement(editCustIdCombo.getSelectedItem().toString());\n\t\t\t\t\t\t\tcustIdCombo.removeItem(editCustIdCombo.getSelectedItem());\n\t\t\t\t\t\t\tcustNameCombo.removeItem(editCustIdCombo.getSelectedItem());\n\t\t\t\t\t\t\teditCustIdCombo.removeItem(editCustIdCombo.getSelectedItem());\n\t\t\t\t\t\t\tcustomers.remove(customer);\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Customer Deleted\");\n\t\t\t\t\t\t\teditCustIdCombo.setSelectedIndex(0);\n\t\t\t\t\t\t\teditCustName.setText(\"\");\n\t\t\t\t\t\t\teditCustAddress.setText(\"\");\n\t\t\t\t\t\t\teditCustEmail.setText(\"\");\n\t\t\t\t\t\t\teditCustPhone.setText(\"\");\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}else{\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please Select a Valid Customer.\");\n\t\t\t\t}\n\t\t\t}", "public void deleteCustomerbyId(int i) {\n\t\tObjectSet result = db.queryByExample(new Customer(i, null, null, null, null, null));\n\n\t\twhile (result.hasNext()) {\n\t\t\tdb.delete(result.next());\n\t\t}\n\t\tSystem.out.println(\"\\nEsborrat el customer \" + i);\n\t}", "private void deletePurchase(CustomerService customerService) throws DBOperationException\n\t{\n\t\tSystem.out.println(\"To delete coupon purchase enter coupon ID\");\n\t\tString idStr = scanner.nextLine();\n\t\tint id;\n\t\ttry\n\t\t{\n\t\t\tid=Integer.parseInt(idStr);\n\t\t}\n\t\tcatch(NumberFormatException e)\n\t\t{\n\t\t\tSystem.out.println(\"Invalid id\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// retrieve all coupons of this customer\n\t\tList<Coupon> coupons = customerService.getCustomerCoupons();\n\t\tCoupon coupon = null;\n\t\t\n\t\t// find coupon whose purchase to be deleted\n\t\tfor(Coupon tempCoupon : coupons)\n\t\t\tif(tempCoupon.getId() == id)\n\t\t\t{\n\t\t\t\tcoupon = tempCoupon;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\n\t\t// delete purchase of the coupon\n\t\tif(coupon != null)\n\t\t{\n\t\t\tcustomerService.deletePurchase(coupon);\n\t\t\tSystem.out.println(customerService.getClientMsg());\n\t\t}\n\t\telse\n\t\t\tSystem.out.println(\"Customer dors not have coupon with this id\");\n\t}", "@Override\n\t@Transactional\n\tpublic void deleteCustomer(int theId) {\n\t\tcustomerDAO.deleteCustomer(theId);\n\t}", "@GetMapping(\"/cancel/{custId}\")\n\tpublic String customerDelete(@PathVariable Integer custId) {\n\t\tCustomer cust = customerService.getCustomer(custId);\n\t\tSimpleMailMessage mailMessage = new SimpleMailMessage();\n\t\tmailMessage.setTo(cust.getCustomerEmail());\n\t\tmailMessage.setSubject(\"Account Denied\");\n\t\tmailMessage.setFrom(\"balumathi333.com\");\n\t\tmailMessage.setText(\"Document that have submitted is not valid!!!Please try to register with valid Document\");\n\t\temailSenderService.sendEmail(mailMessage);\n\t\tCustomer customer = customerService.deleteCustomer(custId);\n\t\treturn \"redirect:/verifycustomer\";\n\t}", "@Then(\"^user deletes customer \\\"([^\\\"]*)\\\"$\")\r\n\tpublic void user_deletes_customer(String arg1) throws Throwable {\n\t DeleteCustomer delete=new DeleteCustomer();\r\n\t StripeCustomer.response=delete.deleteCustomer(new PropertFileReader().getTempData(arg1));\r\n\t}", "@RequestMapping(method = RequestMethod.DELETE, value = \"/{id}\")\n\t public ResponseEntity<?> deleteCustomer(@PathVariable(\"id\") Long id, @RequestBody Customer customer) {\n\t \treturn service.deleteCustomer(id, customer);\n\t }", "@GetMapping(\"/carsAndCustomers/customer/delete/{id}\")\n public String deleteCustomerModal(@PathVariable(\"id\") Integer id, Model model) {\n model.addAttribute(\"customer\", customerRepository.findById(id));\n return \"fragments/deleteConfirmationCustomer :: deleteConfirmationCustomer\";\n\n }", "@Override\n\tpublic void removeCustomer(Customer customer) throws Exception {\n\t\tConnection con = pool.getConnection();\n\t\t\n\t\tCustomer custCheck = getCustomer(customer.getId());\n\t\tif(custCheck.getCustName() == null)\n\t\t\tthrow new Exception(\"No Such customer Exists.\");\n\t\t\n\t\tif(custCheck.getCustName().equalsIgnoreCase(customer.getCustName()) && customer.getId() == custCheck.getId()) {\n\t\t\ttry {\n\t\t\t\t\tStatement st = con.createStatement();\n\t\t\t\t\tString remove = String.format(\"delete from customer where id in('%d')\", \n\t\t\t\t\t\tcustomer.getId());\n\t\t\t\t\tst.executeUpdate(remove);\n\t\t\t\t\tSystem.out.println(\"Customer removed successfully\");\n\t\t\t} catch (SQLException e) {\n\t\t\t\tSystem.out.println(e.getMessage() + \" Could not retrieve data from DB\");\n\t\t\t}finally {\n\t\t\t\ttry {\n\t\t\t\t\tConnectionPool.getInstance().returnConnection(con);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@DeleteMapping(\"/customers/{customer_id}\")\n\tpublic String deletecustomer(@PathVariable(\"customer_id\") int customerid ) {\n\t\t\n\t\t//first check if there is a customer with that id, if not there then throw our exception to be handled by @ControllerAdvice\n\t\tCustomer thecustomer=thecustomerService.getCustomer(customerid);\n\t\tif(thecustomer==null) {\n\t\t\tthrow new CustomerNotFoundException(\"Customer with id : \"+customerid+\" not found\");\n\t\t}\n\t\t//if it is happy path(customer found) then go ahead and delete the customer\n\t\tthecustomerService.deleteCustomer(customerid);\n\t\treturn \"Deleted Customer with id: \"+customerid;\n\t}", "@DeleteMapping(\"/customer/id/{id}\")\r\n\tpublic Customer deleteCustomerbyId(@PathVariable(\"id\") int customerId) {\r\n\tif(custService.deleteCustomerbyId(customerId)==null) {\r\n\t\t\tthrow new CustomerNotFoundException(\"Customer not found with this id\" +customerId);\r\n\t\t}\r\n\t\treturn custService.deleteCustomerbyId(customerId);\r\n\t}", "public void deleteCustomer(Connection connection, int CID) throws SQLException {\n\n Scanner scan = new Scanner(System.in);\n\n DatabaseMetaData dmd = connection.getMetaData();\n ResultSet rs = dmd.getTables(null, null, \"CUSTOMER\", null);\n\n if (rs.next()){\n\n String sql = \"DELETE FROM Customer WHERE c_ID = ?\";\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n setCID(CID);\n pStmt.setInt(1, getCID());\n\n try { pStmt.executeUpdate(); }\n catch (SQLException e) { throw e; }\n finally {\n pStmt.close();\n rs.close();\n }\n }\n else {\n System.out.println(\"ERROR: Error loading CUSTOMER Table.\");\n }\n }", "@ApiOperation(value = \"Delete a customer\", notes = \"\")\n @DeleteMapping(value = {\"/{customerId}\"}, produces = MediaType.APPLICATION_JSON_VALUE)\n @ResponseStatus(HttpStatus.OK)\n public void deleteCustomer(@PathVariable Long customerId) {\n\n customerService.deleteCustomerById(customerId);\n\n }", "@Override\n\tpublic int deleteCustomerReprieve(Integer id) {\n\t\treturn customerDao.deleteCustomerReprieve(id);\n\t}", "@RequestMapping(value = \"/customer/{id}\",method=RequestMethod.DELETE)\n @ResponseStatus(HttpStatus.NO_CONTENT)\n public void removeCustomer(@PathVariable(\"id\") int id){\n //simply remove the customer using the id. If it does not exist, nothing will happen anyways\n service.removeCustomer(id);\n }", "@DELETE\n\t@Path(\"/delete\")\n\t@Consumes(MediaType.APPLICATION_JSON)\n\tpublic void delCustomer(String id)\n\t\t\tthrows MalformedURLException, RemoteException, NotBoundException, ClassNotFoundException, SQLException {\n\n\t\t// Connect to RMI and setup crud interface\n\t\tDatabaseOption db = (DatabaseOption) Naming.lookup(\"rmi://\" + address + service);\n\n\t\t// Connect to database\n\t\tdb.Connect();\n\n\t\t// Delete the customers table\n\t\tdb.Delete(\"DELETE FROM CUSTOMERS WHERE id='\" + id + \"'\");\n\n\t\t// Delete the bookings table\n\t\tdb.Delete(\"DELETE FROM BOOKINGS WHERE CUSTOMERID='\" + id + \"'\");\n\n\t\t// Disconnect to database\n\t\tdb.Close();\n\t}", "public void removeUser(Customer user) {}", "@Override\n\tpublic boolean deleteRecord(Customer record) {\n\t\tfinal int res = JOptionPane.showConfirmDialog(null,\n\t\t\t\t\"Are you sure you want to delete the selected customer?\", \"Delete Record\",\n\t\t\t\tJOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);\n\t\tif (res == JOptionPane.YES_OPTION) {\n\t\t\t// Remove customer from model\n\t\t\tsynchronized (model.customers) {\n\t\t\t\tmodel.customers.remove(record.getLogin());\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "@GET\n\t@Path(\"DeleteCustomer\")\n\tpublic Reply deleteCustomer(@QueryParam(\"id\") int id) {\n\t\treturn ManagerHelper.getCustomerManager().deleteCustomer(id);\n\t}", "@Override\n\t@Transactional\n\tpublic void delete(Long id) {\n\t\tcustomerDAO.deleteById(id);\n\t}", "public void deleteCustomer(Integer id) {\n\t\t//get current session\n\t\tSession currentSession = entityManager.unwrap(Session.class);\n\t\t//query for deleting the account\n\t\tQuery<Customer> query = currentSession.createQuery(\n\t\t\t\t\t\t\t\t\t\"delete from Customer where customerId=:id\",Customer.class);\n\t\tquery.setParameter(id, id);\n\t\tquery.executeUpdate();\n\t}", "@Nullable\n public DelegatedAdminCustomer delete() throws ClientException {\n return send(HttpMethod.DELETE, null);\n }", "@Test\n public void deleteCustomer() {\n Customer customer = new Customer();\n customer.setFirstName(\"Dominick\");\n customer.setLastName(\"DeChristofaro\");\n customer.setEmail(\"dominick.dechristofaro@gmail.com\");\n customer.setCompany(\"Omni\");\n customer.setPhone(\"999-999-9999\");\n customer = service.saveCustomer(customer);\n\n // Delete the Customer from the database\n service.removeCustomer(customer.getCustomerId());\n\n // Test the deleteCustomer() method\n verify(customerDao, times(1)).deleteCustomer(integerArgumentCaptor.getValue());\n assertEquals(customer.getCustomerId(), integerArgumentCaptor.getValue().intValue());\n }", "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}", "@Test\n public void testDeleteCustomer() {\n System.out.println(\"deleteCustomer\");\n String name = \"Gert Hansen\";\n String address = \"Grønnegade 12\";\n String phone = \"98352010\";\n CustomerCtr instance = new CustomerCtr();\n int customerID = instance.createCustomer(name, address, phone);\n instance.deleteCustomer(customerID);\n Customer result = instance.getCustomer(customerID);\n assertNull(result);\n // TODO review the generated test code and remove the default call to fail.\n// fail(\"The test case is a prototype.\");\n }", "void deleteAccountByCustomer(String customerId, String accountNumber) throws AccountException, CustomerException;", "void removeAuthorisationsOfCustomer(CustomerModel customer);", "public static void deleteCustomer(int customerID) throws SQLException{\r\n\r\n //connection and prepared statement set up\r\n Connection conn = DBConnection.getConnection();\r\n String deleteStatement = \"DELETE from customers WHERE Customer_ID = ?;\";\r\n DBQuery.setPreparedStatement(conn, deleteStatement);\r\n PreparedStatement ps = DBQuery.getPreparedStatement();\r\n ps.setInt(1,customerID);\r\n ps.execute();\r\n\r\n if (ps.getUpdateCount() > 0) {\r\n System.out.println(ps.getUpdateCount() + \" row(s) effected\");\r\n } else {\r\n System.out.println(\"no change\");\r\n }\r\n }", "public void delete(Customer customer) throws CustomerNotFoundException {\r\n customer = this.entityManager.merge(customer);\r\n this.entityManager.remove(customer);\r\n }", "public void deleteCustomer(String id) {\n\t\tConnection connection = DBConnect.getDatabaseConnection();\n\t\ttry {\n\t\t\tStatement deleteStatement = connection.createStatement();\n\t\t\t\n\t\t\tString deleteQuery = \"DELETE FROM Customer WHERE CustomerID='\"+id+\"')\";\n\t\t\tdeleteStatement.executeUpdate(deleteQuery);\t\n\t\t\t\n\t\t\t//TODO delete all DB table entries related to this entry:\n\t\t\t//address\n\t\t\t//credit card\n\t\t\t//All the orders?\n\t\t\t\n\t\t}catch(SQLException se) {\n\t\t\tse.printStackTrace();\n\t\t}finally {\n\t\t\tif(connection != null) {\n\t\t\t\ttry {\n\t\t\t\t\tconnection.close();\n\t\t\t\t} catch (SQLException e) {}\n\t\t\t}\n\t\t}\n\t\n\t}", "public Boolean removeCustomer() {\r\n boolean ok = false;\r\n\t\t//Input customer phone.\r\n\t\tString phone = readString(\"Input the customer phone: \");\r\n\t\tCustomer f = my.findByPhone(phone);\r\n\t\tif (f != null) {\r\n ok = my.remove(f);\r\n\t\t\t\r\n\t\t}\r\n\t\telse alert(\"Customer not found\\n\");\t\r\n return ok;\r\n\t}", "public int deleteUser(int id) {\n\t\t\t String deleteQuery=\"delete from registration_customer_data where id='\"+id+\"' \";\n\t\t\t return template.update(deleteQuery); \n\t\t\n\t\t}", "@RequestMapping(value = \"/customerOrders/{id}\",\n method = RequestMethod.DELETE,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<Void> deleteCustomerOrder(@PathVariable Long id) {\n log.debug(\"REST request to delete CustomerOrder : {}\", id);\n customerOrderRepository.delete(id);\n customerOrderSearchRepository.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(\"customerOrder\", id.toString())).build();\n }", "@FXML\n void onActionDeleteCustomer(ActionEvent event) throws IOException {\n\n customerToDelete = CustomerTableview.getSelectionModel().getSelectedItem();\n boolean hasAppointments = Queries.checkAppointments(customerToDelete);\n\n\n if (CustomerTableview.getSelectionModel().getSelectedItem() == null) {\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setTitle(\"No item selected.\");\n alert.setContentText(\"Don't forget to select a customer to delete!\");\n alert.show();\n }\n\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\n alert.setTitle(\"Confirm delete\");\n alert.setContentText(\"Are you sure you want to delete customer: \" + customerToDelete.getCustomerName() + \"? \\n\" +\n \"Deleting this customer will delete all of their appointments. \\nThis action cannot be undone.\");\n Optional<ButtonType> confirm = alert.showAndWait();\n if(confirm.get() == ButtonType.OK) {\n try {\n\n if (hasAppointments) {\n Queries.deleteAppt(customerAppointments);\n Queries.deleteCustomer(customerToDelete);\n CustomerTableview.getItems().remove(customerToDelete);\n } else {\n Queries.deleteCustomer(customerToDelete);\n CustomerTableview.getItems().remove(customerToDelete);\n }\n } catch (Exception exception) {\n exception.printStackTrace();\n }\n Alert alert1 = new Alert(Alert.AlertType.CONFIRMATION);\n alert1.setTitle(\"Customer deleted.\");\n alert1.setContentText(customerToDelete.getCustomerName() + \" and all associated appointments were deleted.\");\n alert1.show();\n\n } if (confirm.get() == ButtonType.CANCEL) {\n stage = (Stage) ((Button) event.getSource()).getScene().getWindow();\n scene = FXMLLoader.load(Objects.requireNonNull(getClass().getResource(\"/Views/CustomerTable.fxml\")));\n stage.setScene(new Scene(scene));\n stage.show();\n }\n }", "@DeleteMapping(\"/customer/{id}\")\n\tpublic ResponseEntity<Map<String, Boolean>> deleteCustomer(@PathVariable Long id) {\n\t\tCustomer customer = customerRepository.findById(id)\n\t\t\t\t.orElseThrow(() -> new ResourceNotFoundException(\"Customer not exist with id :\" + id));\n\n\t\tcustomerRepository.delete(customer);\n\t\tMap<String, Boolean> response = new HashMap<>();\n\t\tresponse.put(\"deleted\", Boolean.TRUE);\n\t\treturn ResponseEntity.ok(response);\n\t}", "public void deleteRequest(CustomerRequest request) {\n\t\tmAdapter.remove(request);\n\t\tmAdapter.notifyDataSetChanged();\n\t}", "public void Delete(int id) {\n\t\tString sql4 = \"DELETE FROM customers where customer_id= \" + id;\n\t\ttry {\n\t\t\tstmt.executeUpdate(sql4);\n\t\t\tSystem.out.println(\"Deleted\");\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}", "@DeleteMapping(\"/api/customer/{id}\")\n\tpublic ResponseEntity<?> deleteCustomerDetails(@PathVariable(\"id\") long id) {\n\t\tcustomerService.deleteCustomerDetails(id);\n\t\treturn ResponseEntity.ok().body(\"Customer Details is deleted\");\n\n\t}", "public void deleteProfile(Customer c) {\n\t\tfor (Customer u : User.customers) {\n\t\t\tif (c.getName().equals(u.getName())) {\n\t\t\t\tUser.customers.remove(c);\n\t\t\t}\n\t\t}\n\t}", "public void deleteCt() {\n\t\tlog.info(\"-----deleteCt()-----\");\n\t\t//int index = selected.getCtXuatKho().getCtxuatkhoThutu().intValue() - 1;\n\t\tlistCtKhoLeTraEx.remove(selected);\n\t\tthis.count = listCtKhoLeTraEx.size();\n\t\ttinhTien();\n\t}", "public void deleteOneForCustomer(Customer customer, int todoListNum) {\n TodoList todoList = todoListDao.findByCustomerAndNum(customer, todoListNum);\n todoListDao.deleteById(todoList.getId());\n computeTodoListNum(customer);\n }", "public void delete__customers( String qualificationId, final VoidCallback callback){\n\n /**\n Call the onBefore event\n */\n callback.onBefore();\n\n\n //Definging hashMap for data conversion\n Map<String, Object> hashMapObject = new HashMap<>();\n //Now add the arguments...\n \n hashMapObject.put(\"qualificationId\", qualificationId);\n \n\n \n invokeStaticMethod(\"prototype.__delete__customers\", hashMapObject, new Adapter.Callback() {\n @Override\n public void onError(Throwable t) {\n callback.onError(t);\n //Call the finally method..\n callback.onFinally();\n }\n\n @Override\n public void onSuccess(String response) {\n callback.onSuccess();\n //Call the finally method..\n callback.onFinally();\n }\n });\n \n\n\n \n\n \n\n }", "public boolean deleteCustomer(int id, int customerID)\n throws RemoteException, DeadlockException;", "public static int deleteCustomer(long custID) throws CouponSystemException {\n\t\tConnection con = null;\n\t\ttry {\n\t\t\tcon = pool.getConnection();\n\t\t\tStatement stmt = con.createStatement();\n\t\t\treturn stmt.executeUpdate(\"DELETE FROM customersCoupons WHERE customerID=\" + custID);\n\t\t} catch (Exception e) {\n\t\t\tthrow new CouponSystemException(\"Customer Not Deleted\");\n\t\t} finally {\n\t\t\tpool.returnConnection(con);\n\t\t}\n\t}", "public void deleteSalerCustomer(int uid) {\n\t\tthis.salerCustomerMapper.deleteSalerCustomer(uid);\n\t}", "public void onRemoveRequest(CustomerRequest request);", "@Test\n\t// @Disabled\n\tvoid testDeleteCustomer() {\n\t\tCustomer customer = new Customer(1, \"tommy\", \"cruise\", \"951771122\", \"tom@gmail.com\");\n\t\tMockito.when(custRep.findById(1)).thenReturn(Optional.of(customer));\n\t\tcustRep.deleteById(1);\n\t\tCustomer persistedCust = custService.deleteCustomerbyId(1);\n\t\tassertEquals(1, persistedCust.getCustomerId());\n\t\tassertEquals(\"tommy\", persistedCust.getFirstName());\n\n\t}", "public void remove(Customer c) {\n customers.remove(c);\n\n fireTableDataChanged();\n }", "@PreAuthorize(\"#oauth2.hasAnyScope('write','read-write')\")\n\t@RequestMapping(method = DELETE, value = \"/{id}\")\n\tpublic Mono<ResponseEntity<?>> deleteCustomer(@PathVariable @NotNull ObjectId id) {\n\n\t\tfinal Mono<ResponseEntity<?>> noContent = Mono.just(noContent().build());\n\n\t\treturn repo.existsById(id)\n\t\t\t.filter(Boolean::valueOf) // Delete only if customer exists\n\t\t\t.flatMap(exists -> repo.deleteById(id).then(noContent))\n\t\t\t.switchIfEmpty(noContent);\n\t}", "@Override\n\tpublic Uni<Boolean> deleteCustomerById(Long cid) {\n\t\treturn repo.deleteById(cid).chain(repo::flush).onItem().transform(ignore ->true);\n\t}", "@Transactional\r\n\tpublic void showFormForDeleteCustomer(int theId) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\r\n\t\t// Delete the object by primary key\r\n\t\tQuery theQuery = currentSession.createQuery(\"delete from Menu where id=:mid\");\r\n\t\ttheQuery.setParameter(\"mid\", theId);\r\n\r\n\t\ttheQuery.executeUpdate();\r\n\r\n\t}", "public String delete() {\r\n\t\tVendorMasterModel model = new VendorMasterModel();\r\n\t\tmodel.initiate(context, session);\r\n\t\tboolean result = model.delete(vendorMaster);\r\n\t\tif (result) {\r\n\t\t\taddActionMessage(\"Record Deleted Successfully.\");\r\n\t\t\treset();\r\n\t\t}// end of if\r\n\t\telse {\r\n\t\t\taddActionMessage(\"This record is referenced in other resources.So can't delete.\");\r\n\t\t\treset();\r\n\t\t}// end of else\r\n\t\tmodel.Data(vendorMaster, request);\r\n\t\tmodel.terminate();\r\n\t\tgetNavigationPanel(1); \r\n\t\treturn \"success\";\r\n\t}", "@Test\r\n\tpublic void deleteTeamCustomerByCoachCustFk() {\r\n\t\t// TODO: JUnit - Populate test inputs for operation: deleteTeamCustomerByCoachCustFk \r\n\t\tInteger team_teamId = 0;\r\n\t\tInteger related_customerbycoachcustfk_customerId = 0;\r\n\t\tTeam response = null;\r\n\t\tresponse = service.deleteTeamCustomerByCoachCustFk(team_teamId, related_customerbycoachcustfk_customerId);\r\n\t\t// TODO: JUnit - Add assertions to test outputs of operation: deleteTeamCustomerByCoachCustFk\r\n\t}", "public boolean removeCustomer(int deleteId) {\n\t\tCallableStatement stmt = null;\n\t\tboolean flag = true;\n\t\tCustomer ck= findCustomer(deleteId);\n\t\tif(ck==null){\n\t\t\tSystem.out.println(\"Cutomer ID not present in inventory.\");\n\t\t\treturn false;\n\t\t}\n\t\t\t\n\t\telse\n\t\t{\n\t\t\tString query = \"{call deleteCustomer(?)}\";\n\t\t\ttry {\n\t\t\t\tstmt = con.prepareCall(query);\n\t\t\t\tstmt.setInt(1, deleteId);\n\t\t\t\tflag=stmt.execute();\n\t\t\t\t//System.out.println(flag);\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\tSystem.out.println(\"Error in database operation. Try agian!!\");\n\t\t\t\t//e.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\treturn flag;\n\t\t\t\n\t\t}\n\t\t\n\t}" ]
[ "0.8019074", "0.8019074", "0.79458463", "0.79053545", "0.7870134", "0.7849993", "0.78061664", "0.7625073", "0.75862795", "0.75770605", "0.752381", "0.7489655", "0.7470342", "0.7462986", "0.7373457", "0.73703146", "0.7366075", "0.73617965", "0.734568", "0.72841555", "0.72578657", "0.7250807", "0.722452", "0.72123826", "0.7206657", "0.71949226", "0.7193344", "0.7192159", "0.71812266", "0.71709466", "0.7153049", "0.71427554", "0.7114068", "0.708981", "0.708569", "0.70586675", "0.703219", "0.7015459", "0.7010364", "0.70051575", "0.700447", "0.6997304", "0.69918317", "0.69893414", "0.6985819", "0.69653", "0.694455", "0.694221", "0.6931611", "0.6913775", "0.6910641", "0.6898897", "0.6885239", "0.68592536", "0.68417364", "0.68100625", "0.6786211", "0.6781878", "0.67803705", "0.67456937", "0.6742801", "0.6715721", "0.67144364", "0.6712788", "0.67031515", "0.66964304", "0.66763717", "0.6676243", "0.6666874", "0.6655799", "0.66441274", "0.66290444", "0.6614295", "0.66119945", "0.65919936", "0.6587755", "0.6574034", "0.6554414", "0.65540606", "0.6531308", "0.6513437", "0.64931005", "0.64869076", "0.64834577", "0.6482067", "0.64688945", "0.6455853", "0.6448169", "0.6438123", "0.64363503", "0.6433033", "0.64295274", "0.6416239", "0.6407144", "0.63962287", "0.63868284", "0.63859737", "0.6356724", "0.6354788", "0.6344096" ]
0.6395636
95
get position of sale in recyclerview
public Sale getSaleAt(int position) { return sales.get(position); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getItemPositionInGroup(int position);", "public long getItemId(int position)\n {\n return position;\n }", "@Override\n public long getItemId(int pos) {\n return pos;\n }", "@NonNull\n @Override\n public View getView(final int position, @Nullable View convertView, @NonNull ViewGroup parent) {\n if(convertView == null){\n convertView = LayoutInflater.from(getContext()).inflate(R.layout.layout_list_sale_item, parent, false);\n }\n\n //MenuItem for specific position\n final MenuItem menuItem = menuItems.get(position);\n\n //Set saleItem variables\n final String fillName = menuItem.getItem();\n final double fillPrice = menuItem.getPrice();\n final ArrayList<Ingredient> fillIngArr = menuItem.getIngredients();\n\n //Update convertView\n final TextView itemName = convertView.findViewById(R.id.itemName);\n final Button minusButton = convertView.findViewById(R.id.minusButton);\n final EditText itemQty = convertView.findViewById(R.id.itemQty);\n final Button plusButton = convertView.findViewById(R.id.plusButton);\n\n //Set item Names\n itemName.setText(menuItem.getItem());\n\n\n //set tag buttons\n minusButton.setTag(position);\n plusButton.setTag(position);\n\n //Button Listeners\n minusButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n //Subtract 1 from number up to 0\n int tempQty = Integer.parseInt(itemQty.getText().toString());\n if(tempQty > 0)\n {\n tempQty = tempQty - 1;\n itemQty.setText(String.valueOf(tempQty));\n }\n //get quantity\n int fillQuantity = Integer.parseInt(itemQty.getText().toString());\n //Create SaleItem\n SaleItem tempSaleItem = new SaleItem(fillName, fillQuantity, fillPrice, fillIngArr);\n //Update SaleItems Array\n saleItems.set(position, tempSaleItem);\n updateTotal();\n }\n });\n\n //Edit Text Listener\n itemQty.setOnEditorActionListener(new TextView.OnEditorActionListener() {\n @Override\n public boolean onEditorAction(TextView textView, int i, KeyEvent keyEvent) {\n //get quantity\n int fillQuantity = Integer.parseInt(itemQty.getText().toString());\n //Create SaleItem\n SaleItem tempSaleItem = new SaleItem(fillName, fillQuantity, fillPrice, fillIngArr);\n //Update SaleItems Array\n saleItems.set(position, tempSaleItem);\n updateTotal();\n return false;\n }\n });\n\n\n\n plusButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n //Add 1 to number\n int tempQty = Integer.parseInt(itemQty.getText().toString());\n tempQty = tempQty + 1;\n itemQty.setText(String.valueOf(tempQty));\n\n //get quantity\n int fillQuantity = Integer.parseInt(itemQty.getText().toString());\n //Create SaleItem\n SaleItem tempSaleItem = new SaleItem(fillName, fillQuantity, fillPrice, fillIngArr);\n //Update SaleItems Array\n saleItems.set(position, tempSaleItem);\n updateTotal();\n }\n });\n return convertView;\n }", "public long getItemId(int position)\n {\n return position;\n }", "@Override\n public long getItemId(int position){\n return position;\n }", "@Override\n public long getItemId(int position){\n return position;\n }", "@Override\n public Object getItem(int position) {\n return position;\n }", "@Override\n public Object getItem(int position) {\n return position;\n }", "@Override\n public Object getItem(int position) {\n return position;\n }", "@Override\n public Object getItem(int position) {\n return position;\n }", "@Override\n public Object getItem(int position) {\n return position;\n }", "@Override\n public Object getItem(int position) {\n return position;\n }", "@Override\n public Object getItem(int position) {\n return position;\n }", "@Override\n public long getItemId(int position) { return position; }", "public int getSale() {\n\t\treturn sale;\r\n\t}", "@Override\n public long getItemId(int position) {\n return position;\n }", "@Override\n public long getItemId(int position) {\n return position;\n }", "@Override\n public long getItemId(int position) {\n return position;\n }", "@Override\n public long getItemId(int position) {\n return position;\n }", "@Override\n public long getItemId(int position) {\n return position;\n }", "@Override\n public long getItemId(int position) {\n return position;\n }", "@Override\n public long getItemId(int position) {\n return position;\n }", "@Override\n public long getItemId(int position) {\n return position;\n }", "@Override\n public long getItemId(int position) {\n return position;\n }", "@Override\n public long getItemId(int position) {\n return position;\n }", "@Override\n public long getItemId(int position) {\n return position;\n }", "@Override\n public long getItemId(int position) {\n return position;\n }", "@Override\n public long getItemId(int position) {\n return position;\n }", "@Override\n public long getItemId(int position) {\n return position;\n }", "@Override\n public long getItemId(int position) {\n return position;\n }", "@Override\n public long getItemId(int position) {\n return position;\n }", "@Override\n public long getItemId(int position) {\n return position;\n }", "@Override\n public long getItemId(int position) {\n return position;\n }", "@Override\n public long getItemId(int position) {\n return position;\n }", "@Override\n public long getItemId(int position) {\n return position;\n }", "@Override\n public long getItemId(int position) {\n return position;\n }", "@Override\n public long getItemId(int position) {\n return position;\n }", "@Override\n public long getItemId(int position) {\n return position;\n }", "@Override\n public long getItemId(int position) {\n return position;\n }", "@Override\n public long getItemId(int position) {\n return position;\n }", "@Override\n public long getItemId(int position) {\n return position;\n }", "@Override\n public long getItemId(int position) {\n return position;\n }", "@Override\n public long getItemId(int position) {\n return position;\n }", "@Override\n public long getItemId(int position) {\n return position;\n }", "@Override\n public long getItemId(int position) {\n return position;\n }", "@Override\n public long getItemId(int position) {\n return position;\n }", "@Override\n public long getItemId(int position) {\n return position;\n }", "@Override\n public long getItemId(int position) {\n return position;\n }", "@Override\n public long getItemId(int position) {\n return position;\n }", "@Override\n public long getItemId(int position) {\n return position;\n }", "@Override\n public long getItemId(int position) {\n return position;\n }", "@Override\n public long getItemId(int position) {\n return position;\n }", "@Override\n public long getItemId(int position) {\n return position;\n }", "@Override\n public long getItemId(int position) {\n return position;\n }", "@Override\n public long getItemId(int position) {\n return position;\n }", "@Override\n public long getItemId(int position) {\n return position;\n }", "@Override\n public long getItemId(int position) {\n return position;\n }", "@Override\n public long getItemId(int position) {\n return position;\n }", "@Override\n public long getItemId(int position) {\n return position;\n }", "@Override\n public long getItemId(int position) {\n return position;\n }", "@Override\n public long getItemId(int position) {\n return position;\n }", "@Override\n public long getItemId(int position) {\n return position;\n }", "@Override\n public long getItemId(int position) {\n return position;\n }", "@Override\n public long getItemId(int position) {\n return position;\n }", "@Override\n public long getItemId(int position) {\n return position;\n }", "@Override\n public long getItemId(int position) {\n return position;\n }", "@Override\n public long getItemId(int position) {\n return position;\n }", "@Override\n public long getItemId(int position) {\n return position;\n }", "@Override\n public long getItemId(int position) {\n return position;\n }", "@Override\n public long getItemId(int position) {\n return position;\n }", "@Override\n public long getItemId(int position) {\n return position;\n }", "@Override\n public long getItemId(int position) {\n return position;\n }", "@Override\n public Object getItem(int position) {\n return position;\n }", "@Override\n public Object getItem(int position) {\n return position;\n }", "@Override\n public Object getItem(int position) {\n return position;\n }", "@Override\n public Object getItem(int position) {\n return position;\n }", "@Override\n public Object getItem(int position) {\n return position;\n }", "@Override\n public Object getItem(int position) {\n return position;\n }", "@Override\n public Object getItem(int position) {\n return position;\n }", "@Override\n public Object getItem(int position) {\n return position;\n }", "@Override\n public Object getItem(int position) {\n return position;\n }", "@Override\n public Object getItem(int position) {\n return position;\n }", "@Override\n public long getItemId(int position)\n {\n return position;\n }", "@Override\n public long getItemId(int position)\n {\n return position;\n }", "@Override\n public long getItemId(int position)\n {\n return position;\n }", "public long getItemId(int position) {\n return position;\n }", "public long getItemId(int position) {\n return position;\n }", "public long getItemId(int position) {\n return position;\n }", "public long getItemId(int position) {\n return position;\n }", "public long getItemId(int position) {\n return position;\n }", "public long getItemId(int position) {\n return position;\n }", "public long getItemId(int position) {\n return position;\n }", "public long getItemId(int position) {\n return position;\n }", "public long getItemId(int position) {\n return position;\n }", "public long getItemId(int position) {\n return position;\n }", "public long getItemId(int position) {\n return position;\n }", "@Override\n public void onClick(View view) {\n int tempQty = Integer.parseInt(itemQty.getText().toString());\n if(tempQty > 0)\n {\n tempQty = tempQty - 1;\n itemQty.setText(String.valueOf(tempQty));\n }\n //get quantity\n int fillQuantity = Integer.parseInt(itemQty.getText().toString());\n //Create SaleItem\n SaleItem tempSaleItem = new SaleItem(fillName, fillQuantity, fillPrice, fillIngArr);\n //Update SaleItems Array\n saleItems.set(position, tempSaleItem);\n updateTotal();\n }", "@Override\n public long getItemId(int position) {\n return position;\n }", "@Override\n public void onClick(View view) {\n int tempQty = Integer.parseInt(itemQty.getText().toString());\n tempQty = tempQty + 1;\n itemQty.setText(String.valueOf(tempQty));\n\n //get quantity\n int fillQuantity = Integer.parseInt(itemQty.getText().toString());\n //Create SaleItem\n SaleItem tempSaleItem = new SaleItem(fillName, fillQuantity, fillPrice, fillIngArr);\n //Update SaleItems Array\n saleItems.set(position, tempSaleItem);\n updateTotal();\n }" ]
[ "0.6365639", "0.61941606", "0.61829686", "0.61612123", "0.61593395", "0.61277825", "0.61277825", "0.61243576", "0.61243576", "0.61243576", "0.61243576", "0.61243576", "0.61243576", "0.61243576", "0.6083398", "0.60742956", "0.6073055", "0.6073055", "0.6073055", "0.6073055", "0.6073055", "0.6073055", "0.6073055", "0.6073055", "0.6073055", "0.6073055", "0.6073055", "0.6073055", "0.6073055", "0.6073055", "0.6073055", "0.6073055", "0.6073055", "0.6073055", "0.6073055", "0.6073055", "0.6073055", "0.6073055", "0.6073055", "0.6073055", "0.6073055", "0.6073055", "0.6073055", "0.6073055", "0.6073055", "0.6073055", "0.6073055", "0.6073055", "0.6073055", "0.6073055", "0.6073055", "0.6073055", "0.6073055", "0.6073055", "0.6073055", "0.6073055", "0.6073055", "0.6073055", "0.6073055", "0.6073055", "0.6073055", "0.6073055", "0.6073055", "0.6073055", "0.6073055", "0.6073055", "0.6073055", "0.6073055", "0.6073055", "0.6073055", "0.6073055", "0.6073055", "0.6073055", "0.6063751", "0.6063751", "0.6063751", "0.6063751", "0.6063751", "0.6063751", "0.6063751", "0.6063751", "0.6063751", "0.6063751", "0.60571074", "0.60571074", "0.60571074", "0.6044725", "0.6044725", "0.6044725", "0.6044725", "0.6044725", "0.6044725", "0.6044725", "0.6044725", "0.6044725", "0.6044725", "0.6044725", "0.6041765", "0.60397816", "0.6030058" ]
0.63789713
0
Insert user and user info to db with same ids
public static void insertAccount(User user, UserInfo userInfo) throws DBException, SQLException { ConnectionPool conPool = ConnectionPool.getInstance(); log.debug("Obtaining connection"); Connection con = conPool.getConnection(); try { log.debug("Starting transaction"); con.setAutoCommit(false); log.debug("Inserting user"); UserDAO.insertUser(con, user); log.debug("Get user ID from db"); user = UserDAO.findUser(con, user.getLogin()); log.debug("User ->" + user); userInfo.setId(user.getId()); log.debug("Inserting user info -> " + userInfo); UserInfoDAO.insertUserInfo(con, userInfo); con.commit(); } catch (SQLException e) { con.rollback(); throw new DBException(e.getMessage(),e); } finally { close(con); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int insert(Userinfo record);", "public int insertUser(final User user);", "@Override\n\tpublic void insertUserAndShopData() {\n\t\t\n\t}", "public void insert(User user);", "public void insertUser() {}", "Long insert(User record);", "int insert(UserInfoUserinfo record);", "Long insertSelective(User record);", "@Override\n public void save() {\n String query = null;\n super.save();\n ((DataUser) user).save();\n\n if (getId() == 0) {\n String[] values = {super.getId() + \"\", \"\" + getUser().getId()};\n\n query = Database.compose(\n \"INSERT INTO case_workers (person_id, user_id)\",\n \"VALUES('\" + String.join(\"','\", values) + \"')\",\n \"RETURNING id\"\n );\n } else {\n query = Database.compose(\n \"UPDATE case_workers SET\",\n \"person_id = \" + super.getId() + \",\",\n \"user_id = \" + getUser().getId() + \"\",\n \"WHERE id = \" + getId()\n );\n\n }\n\n Database.getInstance().query(query, rs -> {\n if (id == 0) {\n id = rs.getInt(1);\n }\n });\n }", "public synchronized void insertUser(Map<String, String> details)\n \t\t\tthrows SQLException {\n \t\tString sql = \"select fbid from users where fbid=?\";\n \t\tpreparedStatement = connect.prepareStatement(sql);\n \t\tpreparedStatement.setString(1, details.get(\"fbid\"));\n \t\tresultSet = preparedStatement.executeQuery();\n \t\tString fbid = null;\n \t\twhile (resultSet.next()) {\n \t\t\tfbid = resultSet.getString(1);\n \t\t}\n \n \t\tif (fbid != null && details.get(\"fbid\").compareTo(fbid) == 0) {\n \t\t\treturn;\n \t\t}\n \n \t\tsql = \"insert into users(name, fbid, sex, single) values(?,?,?,?)\";\n \t\tpreparedStatement = connect.prepareStatement(sql);\n \t\tpreparedStatement.setString(1, details.get(\"name\"));\n \t\tpreparedStatement.setString(2, details.get(\"fbid\"));\n \t\tpreparedStatement.setString(3, details.get(\"sex\"));\n \t\tpreparedStatement.setString(4, details.get(\"single\"));\n \t\tpreparedStatement.execute();\n \t\tpreparedStatement.close();\n \n \t}", "@Override\n\tpublic void insert(User objetc) {\n\t\tuserDao.insert(objetc);\n\t\t\n\t}", "@Override\n\tpublic void insertUser(User user) {\n\t\t\n\t}", "@Override\n\tpublic void insert(User entity) {\n\t\tuserlist.put(String.valueOf(entity.getDni()), entity);\n\t}", "int insert(User record);", "int insert(User record);", "int insert(User record);", "int insert(User record);", "int insert(User record);", "int insert(User record);", "int insert(User record);", "int insert(User record);", "int insert(UserInfo record);", "int insertSelective(UserInfoUserinfo record);", "int insert(BaseUser record);", "int insertSelective(User record);", "int insertSelective(User record);", "int insertSelective(User record);", "int insertSelective(User record);", "int insertSelective(User record);", "int insertSelective(User record);", "int insertSelective(User 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}", "Long insert(User user);", "int insert(UserEntity record);", "int insertSelective(UUser record);", "int insertSelective(UserEntity record);", "int insert(UUser record);", "@Override\n\tpublic Integer insert(User user) {\n\t\tuserMapper.insert(user);\n\t\t// MyBatisUtil.closeSqlSession();\n\t\treturn user.getId();\n\t}", "public void insertUser(String names,String email,String phone,String location) \n {\n SQLiteDatabase database = this.getWritableDatabase();\n ContentValues values = new ContentValues();\n \n String uniqueID = UUID.randomUUID().toString(); \n values.put(\"userNames\", names);\n values.put(\"userEmail\", email);\n values.put(\"userPhone\", phone);\n values.put(\"userAddress\", location);\n values.put(\"udpateStatus\", \"no\");\n values.put(\"guid\", uniqueID);\n database.insert(\"UsersTable\", null, values);\n database.close();\n }", "@Override\r\n\tpublic void insertUser(VIPUser user) {\n\t\ttry{\r\n\t\t\tString sql = \"insert into vipuser(id,name) values (?,?)\";\r\n\t\t\tObject[] args = new Object[]{user.getId(), user.getName()};\r\n\t\t\tdaoTemplate.update(sql, args, false);\r\n\t\t}catch (Exception e){\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}", "@Insert(\"insert into shoppinguser(id,nickname,password,salt,register_date,last_login_date,login_count) \"\n\t\t\t+ \"values(#{id},#{nickname},#{password},#{salt},#{register_date},#{last_login_date},#{login_count})\")\n\tBoolean tx(ShoppingUser user);", "int insert(ROmUsers record);", "@Override\n\tpublic int insert(User record) {\n\t\treturn userMapper.insert(record);\n\t}", "int insert(LikeUser record);", "int insert(RegsatUser record);", "int insert(UserGift record);", "int insertSelective(RegsatUser record);", "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}", "int insertSelective(ROmUsers record);", "int insertSelective(AdminUser record);", "int insertSelective(AdminUser record);", "private void pushToHibernate(){\n DATA_API.saveUser(USER);\n }", "@Override\r\n\t@Transactional(rollbackFor=Exception.class)\r\n\tpublic int insertUser(TUsers users) {\n\t\tdao.insertUser(users);\r\n\t\tint i=10/0;\r\n\t\tdao.insertUser(users);\r\n\t\treturn users.getId();\r\n\t}", "private void autoPopulateDB() {\r\n User newUser = new User(\"din_djarin\", \"baby_yoda_ftw\");\r\n User secondNew = new User(\"csumb\", \"otters_woo\");\r\n User lastNew = new User(\"username\", \"password\");\r\n\r\n mUserDAO.insert(newUser);\r\n mUserDAO.insert(secondNew);\r\n mUserDAO.insert(lastNew);\r\n }", "int insert(AdminUser record);", "int insert(AdminUser record);", "int insert(UserDO record);", "int insertSelective(SysUser record);", "int insert(CommentUser record);", "int insertSelective(LikeUser record);", "@Override\r\n\tpublic int insertSelective(User record) {\n\t\treturn userDao.insertSelective(record);\r\n\t}", "int insert(LitemallUserFormid record);", "void saveOrUpdate(User user);", "int insertSelective(CommentUser record);", "public void insertUser(HashMap<String, String> queryValues, Account account,String authority, Bundle extras) {\n SQLiteDatabase database = this.getWritableDatabase();\n ContentValues values = new ContentValues();\n /// Get current time and date\n\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH-mm-ss\");\n Date date = new Date();\n String dateTime = dateFormat.format(date);\n\n int id = (int)(Math.random()* 9000000)+1000000;\n\n values.put(\"_id\", id);\n values.put(\"title\", queryValues.get(\"title\"));\n values.put(\"farmerID\", queryValues.get(\"farmerID\"));\n values.put(\"surname\", queryValues.get(\"surname\"));\n values.put(\"middlename\", queryValues.get(\"middlename\"));\n values.put(\"phoneNumber\", queryValues.get(\"phoneNumber\"));\n values.put(\"phoneNumber_2\", queryValues.get(\"phoneNumber2\"));\n values.put(\"firstname\", queryValues.get(\"firstname\"));\n values.put(\"gender\", queryValues.get(\"gender\"));\n values.put(\"dob\", queryValues.get(\"dob\"));\n values.put(\"educationlevel\", queryValues.get(\"educationlevel\"));\n\n values.put(\"village\", queryValues.get(\"farmervillage\"));\n values.put(\"farmersaddress\", queryValues.get(\"farmeraddress\"));\n values.put(\"maritalstatus\", queryValues.get(\"maritalstatus\"));\n\n values.put(\"preferredlanguage\", queryValues.get(\"preferredlanguage\"));\n values.put(\"county\", queryValues.get(\"county\"));\n values.put(\"district\", queryValues.get(\"district\"));\n values.put(\"area\", queryValues.get(\"area\"));\n values.put(\"vcr\", queryValues.get(\"vcr\"));\n\n values.put(\"primary_crop\", queryValues.get(\"primary_crop\"));\n values.put(\"farmerscrop\", queryValues.get(\"farmerscrop\"));\n\n values.put(\"tree_crops\", queryValues.get(\"tree_crops\"));\n values.put(\"roots\", queryValues.get(\"roots\"));\n values.put(\"fruits\", queryValues.get(\"fruits\"));\n values.put(\"legumes\", queryValues.get(\"legumes\"));\n values.put(\"vegetables\", queryValues.get(\"vegetables\"));\n\n values.put(\"farmsize\", queryValues.get(\"farmsize\"));\n values.put(\"farmlocation\", queryValues.get(\"farmlocation\"));\n values.put(\"farmerslivestock\", queryValues.get(\"farmerslivestock\"));\n values.put(\"farmersfisheries\", queryValues.get(\"farmersfisheries\"));\n\n values.put(\"member_question\", queryValues.get(\"member_question\"));\n values.put(\"groupname\", queryValues.get(\"farmersgroup\"));\n values.put(\"groupleadername\", queryValues.get(\"groupleadername\"));\n values.put(\"groupleaderphone\", queryValues.get(\"groupleaderphone\"));\n\n values.put(\"adminfullName\", queryValues.get(\"adminfullname\"));\n values.put(\"adminphoneNumber\", queryValues.get(\"adminphone\"));\n values.put(\"admincounty\", queryValues.get(\"admincounty\"));\n values.put(\"admindistrict\", queryValues.get(\"admindistrict\"));\n values.put(\"imei\", queryValues.get(\"imei\"));\n\n values.put(\"picture\", queryValues.get(\"image\"));\n\n values.put(\"updateStatus\", \"no\");\n values.put(\"dateCreated\", dateTime);\n\n database.insert(\"farmers\", null, values);\n Log.d(\"INSERTED\", \"CreatedRecord\");\n database.close();\n }", "int insertSelective(WbUser record);", "@Override\n\tpublic int insertSelective(User record) {\n\t\treturn userMapper.insertSelective(record);\n\t}", "int insert(UserT record);", "@Override\r\n\tpublic int insert(User record) {\n\t\treturn userDao.insert(record);\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}", "int insert(SysUser record);", "int insert(SysUser record);", "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 void insertUser(User user) {\n mUserDAO.insertUser(user);\n }", "int insert(BizUserWhiteList record);", "private static void updateUserTest(Connection conn) {\n\t\t\n\t\ttry {\n\t\t\tUser existingUser = User.loadUserById(conn, 3); // User user = User.loadUserById(conn, 3);\n\t\t\t// the same id is preserved\n\t\t\texistingUser.setUsername(\"jo\");\n\t\t\texistingUser.setEmail(\"jo@wp.pl\");\n\t\t\texistingUser.setUserGroupId(2);\n\t\t\texistingUser.saveToDB(conn);\n\t\t\t\n\t\t\t/*Następnie\tnależy\tsprawdzić,\tczy:\n\t\t\t\t1.\t Czy\twpis\tw\tbazie\tdanych\tma\twszystkie\n\t\t\t\tdane\todpowiednio\tponastawiane?\n\t\t\t\t2.\t Czy\tobiekt\tma\tnastawione\tpoprawne\tid? - czyli niezmienione, bo nie mamy settera dla id\n\t\t\t\t3.\t Czy\tnie\tdodał\tsię\tnowy\twpis\tw\tbazie?*/\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public void insertUsers(User user){\n Tag Tag=null;\n db = this.getWritableDatabase();\n ContentValues values = new ContentValues();\n values.put(databaseValues.COLUMN_NAME3,user.getUsername());\n values.put(databaseValues.COLUMN_NAME1,user.getName());\n values.put(databaseValues.COLUMN_NAME2,user.getSurname());\n values.put(databaseValues.COLUMN_NAME4,user.getPassword());\n values.put(databaseValues.COLUMN_NAME5,user.getConfirmPassword());\n Log.e(String.valueOf(Tag), user.getName());\n Log.e(String.valueOf(Tag), user.getSurname());\n Log.e(String.valueOf(Tag), user.getUsername());\n Log.e(String.valueOf(Tag), user.getPassword());\n Log.e(String.valueOf(Tag), user.getConfirmPassword());\n db.insert(databaseValues.TABLE_NAME, null, values);\n db.close();\n }", "@Override\n\tpublic int insert(User record) {\n\t\treturn 0;\n\t}", "public void insert_in_userProfile(String name,String email, String mobnum, String ans1,\n String ans2, String ans3, String ans4, String ans5,String ans6, String ans7, String ans8)\n {\n ContentValues values= new ContentValues();\n values.put(COLUMN_NAME, name);\n values.put(COLUMN_EMAIL, email);\n values.put(COLUMN_MOB_NUM, mobnum);\n values.put(COLUMN_ANS1, ans1);\n values.put(COLUMN_ANS2, ans2);\n values.put(COLUMN_ANS3, ans3);\n values.put(COLUMN_ANS4, ans4);\n values.put(COLUMN_ANS5, ans5);\n values.put(COLUMN_ANS6, ans6);\n values.put(COLUMN_ANS7, ans7);\n values.put(COLUMN_ANS8, ans8);\n\n long insertId=sqlDB.insert(USER_PROFILE_TABLE, null, values);\n Log.d(\"INSERTED\",\"INSERTED => \" + insertId);\n }", "private static void insertProfile(Connection connection, String username, long id, boolean isRegistered)\n throws SQLException, ProfileKeyManagerPersistenceException {\n PreparedStatement statement =\n connection.prepareStatement(\"INSERT INTO all_user (username, user_id, registered_flag, \"\n + \"create_date, modify_date, create_user, modify_user) \"\n + \"VALUES (?, ?, ?, CURRENT, CURRENT, USER, USER)\");\n\n try {\n int idx = 1;\n statement.setString(idx++, username);\n statement.setLong(idx++, id);\n statement.setString(idx++, (isRegistered ? \"Y\" : \"N\"));\n\n if (statement.executeUpdate() < 1) {\n throw new ProfileKeyManagerPersistenceException(\"failed to insert user\");\n }\n } finally {\n closeStatement(statement);\n }\n }", "@Override\n public int insert(User record) {\n return 0;\n }", "void saveUserData(User user);", "int insert(WbUser record);", "int insertSelective(UserT record);", "public void insertInfo(editUserSetGet eu);", "int insert(SelectUserRecruit record);", "int insert(AliUserInfoDO record);", "Long insert(UserGroup record);", "int insertSelective(UserGift record);", "@Insert\n void insertAll(List<User> users);", "int insertSelective(UserDO record);", "@Override\r\n\tpublic void insertOne(GuestUserVo bean) throws SQLException {\n\t\t\r\n\t}", "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}", "int insertSelective(UserPasswordDO record);", "@Insert({\n \"insert into user_t (id, user_name, \",\n \"password, age, ver)\",\n \"values (#{id,jdbcType=INTEGER}, #{userName,jdbcType=VARCHAR}, \",\n \"#{password,jdbcType=VARCHAR}, #{age,jdbcType=INTEGER}, #{ver,jdbcType=INTEGER})\"\n })\n int insert(User record);", "int insertSelective(BizUserWhiteList record);", "int insertSelective(LitemallUserFormid record);", "@Override\n\tpublic void insertUser(UserPojo user) {\n\t\tuserDao.insertUser(user);\n\t}", "int insert(FeedsUsersKey record);", "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}", "@Override\n public boolean addUserPersonalInfo(String text) \n {\n \n User tmp = this.getLoggedUser();\n tmp.setPersonal_details(text);\n if(this.setLoggedUser(tmp)) System.out.print(\"done\");\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 = \"INSERT INTO user_personal_information (user_id,information) VALUES ( \" + this.getLoggedUser().getId() + \" , '\" + text + \"')\";\n \n int result = stmt.executeUpdate(sql);\n \n stmt.close();\n conn.close();\n if(result == 1) return true;\n else return false;\n } \n catch (SQLException ex) { ex.printStackTrace(); return false;} \n catch (ClassNotFoundException ex) { ex.printStackTrace(); return false;} \n \n }" ]
[ "0.68428487", "0.68374074", "0.6825577", "0.67918456", "0.67428035", "0.67092186", "0.66837513", "0.6640742", "0.6624866", "0.65897167", "0.6575213", "0.65575206", "0.64890355", "0.64833975", "0.64833975", "0.64833975", "0.64833975", "0.64833975", "0.64833975", "0.64833975", "0.64833975", "0.6482084", "0.647421", "0.6463575", "0.6443725", "0.6443725", "0.6443725", "0.6443725", "0.6443725", "0.6443725", "0.6443725", "0.64333206", "0.6428969", "0.6415292", "0.6336311", "0.6324492", "0.6324075", "0.63118297", "0.6297925", "0.6297504", "0.62873745", "0.62528336", "0.6250536", "0.6249837", "0.6245269", "0.6238243", "0.6238236", "0.6220664", "0.6202484", "0.6192246", "0.6192246", "0.6184546", "0.6181688", "0.6181184", "0.617735", "0.617735", "0.6174174", "0.6172022", "0.6164289", "0.616294", "0.6142568", "0.61381084", "0.61370885", "0.6124627", "0.6109014", "0.6100536", "0.60909706", "0.60846305", "0.60834205", "0.6083396", "0.6075191", "0.6075191", "0.6056149", "0.6023803", "0.6021126", "0.60101944", "0.60075355", "0.60020363", "0.60018986", "0.6000098", "0.59981316", "0.5993687", "0.59910995", "0.59883684", "0.5987976", "0.5983069", "0.5979787", "0.5972824", "0.5961871", "0.5956324", "0.5950116", "0.5948222", "0.59321356", "0.593174", "0.5929602", "0.59284765", "0.5925759", "0.5919571", "0.591934", "0.5914863", "0.5913565" ]
0.0
-1
Checksum trama = new Checksum();
public static void main(String[] args) { List<PcapIf> alldevs = new ArrayList<PcapIf>(); // Will be filled with NICs StringBuilder errbuf = new StringBuilder(); // For any error msgs /** * ************************************************************************* * First get a list of devices on this system * ************************************************************************ */ int r = Pcap.findAllDevs(alldevs, errbuf); if (r == Pcap.NOT_OK || alldevs.isEmpty()) { System.err.printf("Can't read list of devices, error is %s", errbuf .toString()); return; } System.out.println("Network devices found:"); int i = 0; try { for (PcapIf device : alldevs) { String description = (device.getDescription() != null) ? device.getDescription() : "No description available"; final byte[] mac = device.getHardwareAddress(); String dir_mac = (mac == null) ? "No tiene direccion MAC" : asString(mac); System.out.printf("#%d: %s [%s] MAC:[%s]\n", i++, device.getName(), description, dir_mac); }//for PcapIf device = alldevs.get(1); // We know we have atleast 1 device System.out .printf("\nChoosing '%s' on your behalf:\n", (device.getDescription() != null) ? device.getDescription() : device.getName()); /** * ************************************************************************* * Second we open up the selected device * ************************************************************************ */ /*"snaplen" is short for 'snapshot length', as it refers to the amount of actual data captured from each packet passing through the specified network interface. 64*1024 = 65536 bytes; campo len en Ethernet(16 bits) tam máx de trama */ int snaplen = 64 * 1024; // Capture all packets, no trucation int flags = Pcap.MODE_PROMISCUOUS; // capture all packets int timeout = 10 * 1000; // 10 seconds in millis Pcap pcap = Pcap.openLive(device.getName(), snaplen, flags, timeout, errbuf); if (pcap == null) { System.err.printf("Error while opening device for capture: " + errbuf.toString()); return; }//if /** * ******F I L T R O******* */ PcapBpfProgram filter = new PcapBpfProgram(); String expression = ""; // "port 80"; int optimize = 0; // 1 means true, 0 means false int netmask = 0; int r2 = pcap.compile(filter, expression, optimize, netmask); if (r2 != Pcap.OK) { System.out.println("Filter error: " + pcap.getErr()); }//if pcap.setFilter(filter); /** * ************* */ /** * ************************************************************************* * Third we create a packet handler which will receive packets from * the libpcap loop. * ******************************************************************** */ PcapPacketHandler<String> jpacketHandler = new PcapPacketHandler<String>() { public void nextPacket(PcapPacket packet, String user) { System.out.printf("Received packet at %s caplen=%-4d len=%-4d %s\n", new Date(packet.getCaptureHeader().timestampInMillis()), packet.getCaptureHeader().caplen(), // Length actually captured packet.getCaptureHeader().wirelen(), // Original length user // User supplied object ); /** * ****Desencapsulado******* */ for (int i = 0; i < packet.size(); i++) { System.out.printf("%02X ", packet.getUByte(i)); if (i % 16 == 15) { System.out.println(""); } } System.out.println("\n\nEncabezado: " + packet.toHexdump()); /*-------------------------Verificacion de ETHERNET-------------------------*/ int tipoIP; //tipoIP = (int) ((packet.getUByte(12)*(Math.pow(2, 8))) + packet.getUByte(13)); tipoIP = (packet.getUByte(12) << 8 | packet.getUByte(13)); System.out.printf("IP = %02X \n",(byte)tipoIP); /*--------------------------------------------------------------------------*/ /*-------------LONGITUD DEL PAQUETE (PDU DE IP)-----*/ byte[] longitudTrama = new byte[2]; longitudTrama[0] = (byte) (packet.getUByte(16)); longitudTrama[1] = (byte) (packet.getUByte(17)); /*--------------------------------------------------*/ /*------------------------CHECKSUM DE LA TRAMA--------------------------*/ byte[] checksum = {(byte)packet.getUByte(24),(byte)packet.getUByte(25)}; /*---------------------------------------------------------------------*/ if (tipoIP == 0x086DD) { //IPV6 System.out.println("IPV6: No contiene Checksum"); } else if (tipoIP == 0x0800) { //IPV4 System.out.println("IPV4"); /*Capturar bytes del encabezado IP. Va del byte 14-33, son 20 bytes------------*/ byte[] IP = new byte[20]; for (int j = 14,i=0; j < 34;j++) { IP[i]=(byte)packet.getUByte(j); if(j==24 || j==25){ //Lugar del Checksum IP[i] = (byte)0x00; } i++; } /*Obtener Checksum*/ long checksumIP = Checksum.calculateChecksum(IP); System.out.printf("|-- Valor de Checksum IP: %02X --|\n",checksumIP); /*------------------------------*/ int protocol = (packet.getUByte(23)); System.out.printf("\tProtocolo: %02X\n",(byte)protocol); if ((byte)protocol == 0x06) //PROTOCOLO TCP { System.out.printf("PROTOCOLO TCP: %02X\n",(byte)protocol); System.out.println("---PROTOCOLO TCP/IP---"); /*---------------------IHL: 45---------------------*/ byte IHL_limpio = (byte) (packet.getUByte(14) & 0x0000000F); int IHL = (IHL_limpio * 4); //Longitud del encabezado /*Solamente se requiere la longitud del encabezado: 5 La otra parte especifica la versión: 4*/ /*---------------------------------------------*/ /*---------------------PDU de IP---------------------*/ int longitud = (int) ((packet.getUByte(16) * (Math.pow(2, 8))) + (packet.getUByte(17))); /*---------------------------------------------------*/ /*------------Longitud que irá al Pseudo Encabezado---------*/ int longitudTotal = longitud - IHL; System.out.println("Longitud: "+longitud+"\nIHL: "+IHL); /*----------------------------------------------------------*/ //Reservado para la longitud de encabezado (TCP O UDP) byte[] pseudoEncabezado = new byte[IHL]; for (int j = 0; j < 4; j++) { /*----------------------IP ORIGEN----------------------*/ pseudoEncabezado[j] = (byte) (packet.getUByte(26 + j)); /*-----------------------------------------------------*/ /*---------------------IP DESTINO---------------------*/ pseudoEncabezado[j + 4] = (byte) (packet.getUByte(30 + j)); /*----------------------------------------------------*/ } pseudoEncabezado[8] = 0x00; /*-------------------PROTOCOLO (0x06)------------------*/ pseudoEncabezado[9] = (byte) (packet.getUByte(23)); /*----------------------------------------------------*/ /*-------------------LONGITUD-------------------------*/ pseudoEncabezado[10] = (byte)packet.getUByte(16); pseudoEncabezado[11] = (byte)(packet.getUByte(17)-IHL); /*---------------------------------------------------*/ /*El pseudoEncabezado representa la primer mitad para obtener el Checksum*/ /*---La segunda mitad es representada por el PDU_Trans---*/ byte[] PDU_Trans = new byte[longitudTotal]; for (int k = 34,q=0; k < 34+longitudTotal; k++,q++) { PDU_Trans[q]=(byte)packet.getUByte(k); } /*------------------------------------------------------*/ /*-----------UNION de PDU_Trans con pseudoEncabezado----*/ int length_pseudoE = pseudoEncabezado.length; int length_PDU_Trans = PDU_Trans.length; byte[] encabezadoFinal; encabezadoFinal= new byte[length_pseudoE + length_PDU_Trans]; System.arraycopy(pseudoEncabezado, 0, encabezadoFinal, 0, length_pseudoE); System.arraycopy(PDU_Trans, 0, encabezadoFinal, length_pseudoE, length_PDU_Trans); long checksumTCP = Checksum.calculateChecksum(encabezadoFinal); System.out.printf("Checksum del TCP: %04X \n",checksumTCP); /*------------------------------------------------------*/ }else if ((byte)protocol == 0x11){ //PROTOCOLO UDP System.out.printf("\tPROTOCOLO UDP: %02X\n",(byte)protocol); /*---------------------IHL: 45---------------------*/ byte IHL_limpio = (byte) (packet.getUByte(14) & 0x0000000F); int IHL = (IHL_limpio * 4); //Longitud del encabezado /*---------------------------------------------*/ /*---------------------PDU de IP---------------------*/ int longitud = (int) ((packet.getUByte(16) * (Math.pow(2, 8))) + (packet.getUByte(17))); /*---------------------------------------------------*/ /*------------Longitud que irá al Pseudo Encabezado---------*/ int longitudTotal = longitud - IHL; /*----------------------------------------------------------*/ //Reservado para la longitud de encabezado (TCP O UDP) byte[] pseudoEncabezado = new byte[IHL]; for (int j = 0; j < 4; j++) { /*----------------------IP ORIGEN----------------------*/ pseudoEncabezado[j] = (byte) (packet.getUByte(26 + j)); /*-----------------------------------------------------*/ /*---------------------IP DESTINO---------------------*/ pseudoEncabezado[j + 4] = (byte) (packet.getUByte(30 + j)); /*----------------------------------------------------*/ } pseudoEncabezado[8] = 0x00; /*-------------------PROTOCOLO (0x11)------------------*/ pseudoEncabezado[9] = (byte) (packet.getUByte(23)); /*----------------------------------------------------*/ /*-------------------LONGITUD-------------------------*/ pseudoEncabezado[10] = (byte)packet.getUByte(16); pseudoEncabezado[11] = (byte)(packet.getUByte(17)-IHL); /*---------------------------------------------------*/ /*El pseudoEncabezado representa la primer mitad para obtener el Checksum*/ /*---La segunda mitad es representada por el PDU_Trans---*/ byte[] PDU_Trans = new byte[longitudTotal]; for (int k = 34,q=0; k < 34+longitudTotal; k++,q++) { PDU_Trans[q]=(byte)packet.getUByte(k); } /*------------------------------------------------------*/ /*-----------UNION de PDU_Trans con pseudoEncabezado----*/ int length_pseudoE = pseudoEncabezado.length; int length_PDU_Trans = PDU_Trans.length; byte[] encabezadoFinal; encabezadoFinal= new byte[length_pseudoE + length_PDU_Trans]; System.arraycopy(pseudoEncabezado, 0, encabezadoFinal, 0, length_pseudoE); System.arraycopy(PDU_Trans, 0, encabezadoFinal, length_pseudoE, length_PDU_Trans); long checksumUDP = Checksum.calculateChecksum(encabezadoFinal); System.out.printf("Checksum del UCP: %04X \n",checksumUDP); /*------------------------------------------------------*/ } } } }; /** * ************************************************************************* * Fourth we enter the loop and tell it to capture 10 packets. The * loop method does a mapping of pcap.datalink() DLT value to * JProtocol ID, which is needed by JScanner. The scanner scans the * packet buffer and decodes the headers. The mapping is done * automatically, although a variation on the loop method exists * that allows the programmer to sepecify exactly which protocol ID * to use as the data link type for this pcap interface. * ************************************************************************ */ pcap.loop(10, jpacketHandler, "jNetPcap rocks!"); /** * ************************************************************************* * Last thing to do is close the pcap handle * ************************************************************************ */ pcap.close(); } catch (IOException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getChecksum();", "void addChecksum(int checksum);", "public void setChecksum(String checksum) {\n this.checksum = checksum;\n }", "private Checksum getCheckSun() {\n if (transientChecksum == null) {\n transientChecksum = new Adler32();\n }\n return transientChecksum;\n }", "public CRCoinReturner()\n {\n balance = 0;\n // your code here\n }", "public String getChecksum() {\n return checksum;\n }", "public void setChecksum(String checksum) {\r\n\t\tthis.checksum = checksum;\r\n\t}", "public String getChecksum() {\n return mChecksum;\n }", "public String getChecksum() {\r\n\t\treturn checksum;\r\n\t}", "public byte[] getChecksum() {\n return checksum;\n }", "public Builder setChecksum(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n checksum_ = value;\n onChanged();\n return this;\n }", "private int checksum()\n {\n byte[] data = new byte[size];\n buf.mark();\n buf.seek(offset);\n buf.read(data);\n buf.reset();\n return Checksum.crc32(data);\n }", "void compute_checksum() {\n\t\t\t// IMPORTANT : write this NOW !\n\t\t\t/*\n\t\t\t * short *ptr; Checksum = 0; for (ptr = (short *) pmh; ptr < (short\n\t\t\t * *)&pmh->Checksum; ptr++) Checksum ^= *ptr;\n\t\t\t */\n\t\t\tChecksum = 0;\n\t\t\tshort b[] = new short[9];\n\t\t\tb[0] = (short) (Key & 0xFF);\n\t\t\tb[1] = (short) ((Key & 0xFF00) >>> 16);\n\t\t\tb[2] = (short) Left;\n\t\t\tb[3] = (short) Top;\n\t\t\tb[4] = (short) Right;\n\t\t\tb[5] = (short) Bottom;\n\t\t\tb[6] = Inch;\n\t\t\tb[7] = (short) (Reserved & 0xFF);\n\t\t\tb[8] = (short) ((Reserved & 0xFF00) >>> 16);\n\t\t\tfor (int i = 0; i < b.length; i++)\n\t\t\t\tChecksum ^= b[i];\n\t\t}", "private static long calculateChecksum(final byte[] array) {\n final long crc;\n\n if ((array != null) && (array.length > 0)) {\n final Checksum checksum = new CRC32();\n checksum.update(array, 0, array.length);\n\n crc = checksum.getValue();\n } else {\n crc = 0;\n }\n\n return crc;\n }", "private byte[] getCheckSum(byte[] checksum){\r\n\treturn Arrays.copyOfRange(checksum, 0, 4);\r\n}", "public Checksum(String account, FileInfo file) {\r\n\t\tthis.account = account;\r\n\t\tthis.id = file.getId();\r\n\t\tthis.path = file.getPath();\r\n\t\tthis.name = file.getName();\r\n\t\tthis.size = file.getSize();\r\n\t\tthis.checksum = file.getChecksum();\r\n\t\tthis.created = file.getCreated();\r\n\t\tthis.modified = file.getModified();\r\n\t}", "com.google.protobuf.ByteString\n getChecksumBytes();", "public MD5Util() {\n }", "private String calchash() {\r\n String a0 = String.valueOf(bindex);\r\n a0 += String.valueOf(bdate);\r\n a0 += bdata;\r\n a0 += String.valueOf(bonce);\r\n a0 += blasthash;\r\n String a1;\r\n a1 = \"\";\r\n try {\r\n a1 = sha256(a0);\r\n } catch (NoSuchAlgorithmException ex) {\r\n Logger.getLogger(Block.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n return a1;\r\n\r\n }", "public com.google.protobuf.ByteString\n getChecksumBytes() {\n java.lang.Object ref = checksum_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n checksum_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "private long calcChecksum(File f) throws IOException {\n BufferedInputStream in = new BufferedInputStream(new FileInputStream(f));\n return calcChecksum(in, f.length());\n }", "int getChksum();", "@Override\n public void calculateChecksum(byte[] sysex, int start, int end, int offset) {\n }", "public static void main(String[] args) {\n CRC m = new CRC(\"101110\", \"1001\");\n \n System.out.println(\"Mensagem: \" + m.getMensagem());\n System.out.println(\"Polinomio: \" + m.getPolinomio());\n System.out.println(\"CRC: \" + m.getCrcString());\n System.out.println(\"Mensagem empacotada: \" + m.getMensagemEmpacotada());\n }", "@Schema(required = true, description = \"Object sha256 checksum in hex format\")\n public String getChecksum() {\n return checksum;\n }", "public abstract ChecksumPair read() throws IOException;", "static String generateChecksum(String filename) {\n\n try {\n // Instantiating file and Hashing Algorithm.\n MessageDigest md = MessageDigest.getInstance(\"MD5\");\n FileInputStream file = new FileInputStream(filename);\n\n // Generation of checksum.\n byte[] dataBytes = new byte[1024];\n int nread;\n\n while ((nread = file.read(dataBytes)) != -1) {\n md.update(dataBytes, 0, nread);\n }\n\n byte[] mdbytes = md.digest();\n\n // Convert byte to hex.\n StringBuilder hexString = new StringBuilder();\n\n for (byte mdbyte : mdbytes) {\n String hex = Integer.toHexString(0xff & mdbyte);\n if (hex.length() == 1) hexString.append('0');\n hexString.append(hex);\n }\n\n // Return checksum as completed string.\n return hexString.toString();\n\n } catch (NoSuchAlgorithmException | IOException e) {\n e.printStackTrace();\n }\n return null;\n }", "private static Suma creaObjetoSuma (){\n Suma suma = new Suma(4,6);\n return suma; \n }", "public byte getChecksumState() {\n return checksumState;\n }", "private cufftResult()\r\n {\r\n }", "public byte checkSum(byte[] data) {\n byte crc = 0x00;\n // 從指令類型累加到參數最後一位\n for (int i = 1; i < data.length - 2; i++) {\n crc += data[i];\n }\n return crc;\n }", "public static int getChecksum(int type, int id) {\n int crc = 0;\n byte[] data = null;\n try {\n data = GameLoader.getCache().CACHES[type + 1].decompress(id);\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (data != null && data.length > 2) {\n int length = data.length - 2;\n crc32.reset();\n crc32.update(data, 0, length);\n crc = (int) crc32.getValue();\n }\n return crc;\n }", "public com.google.protobuf.ByteString\n getChecksumBytes() {\n java.lang.Object ref = checksum_;\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 checksum_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@Override\n public void calculateChecksum(Patch p) {\n }", "public java.lang.String getChecksum() {\n java.lang.Object ref = checksum_;\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 checksum_ = s;\n return s;\n }\n }", "@Test\n public void testCreateDocumentChecksumFromContent() throws IOException {\n String content = \"Some content\";\n CachedInputStream is =\n new CachedStreamFactory(1024, 1024).newInputStream(content);\n Doc doc = new Doc(\"N/A\", is);\n MD5DocumentChecksummer cs = new MD5DocumentChecksummer();\n String checksum = cs.createDocumentChecksum(doc);\n is.dispose();\n Assertions.assertTrue(StringUtils.isNotBlank(checksum),\n \"No checksum was generated.\");\n }", "public final byte[] getChecksumData()\r\n\t{\r\n\t\treturn this.checksumData;\r\n\t}", "public long checkSum() {\n \tCRC32 crc = new CRC32();\n \tcrc.reset(); // in order to reuse the object for all signals\n \tString signal = this.trainID + \":\" + Double.toString(this.trainWeight) + \":\" + Double.toString(this.currentX) + \",\" + \n \t\t\tDouble.toString(this.currentY);\n \tcrc.update(signal.getBytes()); // signal is a String containing your data\n \tlong checksum = crc.getValue();\n \treturn checksum;\n }", "public CodeChecksumPragma(String fileName, Guid checksumAlgorithmId, byte[] checksumData)\r\n\t{\r\n\t\tthis.fileName = fileName;\r\n\t\tthis.checksumAlgorithmId = checksumAlgorithmId;\r\n\t\tthis.checksumData = checksumData;\r\n\t}", "public void assimilateChecksum(TransformationCatalogEntry entry) {\n if (entry.hasCheckSum()) {\n // PM-1617 add all metadata from the entry into FileTransfer\n Metadata m = (Metadata) entry.getAllProfiles().get(Profiles.NAMESPACES.metadata);\n this.getAllMetadata().merge(m);\n }\n }", "public java.lang.String getChecksum() {\n java.lang.Object ref = checksum_;\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 checksum_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public Builder setChecksumBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n checksum_ = value;\n onChanged();\n return this;\n }", "public MoneyTransfer() {\n }", "CheckSum generateCheckSum();", "private String fileChecksum(File tmpFile, ITaskMonitor monitor) {\n InputStream is = null;\n try {\n is = new FileInputStream(tmpFile);\n MessageDigest digester = getChecksumType().getMessageDigest();\n byte[] buf = new byte[65536];\n int n;\n while ((n = is.read(buf)) >= 0) {\n if (n > 0) {\n digester.update(buf, 0, n);\n }\n }\n return getDigestChecksum(digester);\n } catch (FileNotFoundException e) {\n monitor.setResult(\"File not found: %1$s\", e.getMessage());\n } catch (Exception e) {\n monitor.setResult(e.getMessage());\n } finally {\n if (is != null) {\n try {\n is.close();\n } catch (IOException e) {\n }\n }\n }\n return \"\";\n }", "public ReturnCash(){\n\t\t\n\t}", "public Summalista()\r\n\t{\r\n\t\tthis.summa = 0;\r\n\t\tthis.alkiot = 0;\r\n\t}", "@Override\n\tpublic void run() {\n\t\ttry {\n\t\t\tbyte[] bytes = new byte[1024];\n\t\t\tint bytesRead;\n\t\t\tString fileName = ois.readUTF();\n\t\t\tOutputStream output = new FileOutputStream(directory+fileName);\n\t\t\tString receivedCheckSum = ois.readUTF();\n\t\t\t//long size = ois.readLong();\n\t\t\tbyte[] buffer = new byte[1024];\n\t\t\twhile ((bytesRead = ois.read(buffer)) != -1) {\n\t\t\t\toutput.write(buffer, 0, bytesRead);\n\t\t\t\t//size -= bytesRead;\n\t\t\t}\n\n\t\t\tString checksumVal = calculateCheckSum(new File(directory + fileName));\n\t\t\tSystem.out.println(\"Server Side check sum value is \" + checksumVal);\n\n\t\t\t// String receivedCheckSum=(String)ois.readObject();\n\t\t\tSystem.out.println(\"client side checksum \" + receivedCheckSum);\n\t\t\tif (receivedCheckSum.equalsIgnoreCase(checksumVal)) {\n\t\t\t\tSystem.out.println(\"*****************Data is transfer without any error *********************\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Integrity verification failed !\");\n\t\t\t}\n\t\t\t// }\n\n\t\t\toos.close();\n\t\t\tois.close();\n\t\t} catch (Exception ex) {\n\t\t\t// TODO: handle exception\n\t\t\tLogger.getLogger(ThreadHandler.class.getName()).log(Level.SEVERE, null, ex);\n\t\t}\n\t}", "public AvaliacaoRisco() {\n }", "@Test\n public void md5Checksum() throws NoSuchAlgorithmException {\n String string = Utils.md5Checksum(\"abcde fghijk lmn op\");\n Assert.assertEquals(\"1580420c86bbc3b356f6c40d46b53fc8\", string);\n }", "public boolean verifyChecksum() {\n\t\tChecksum cs = new Checksum();\n\t\tlong remaining = size - Tran.HEAD_SIZE;\n\t\tint pos = adr;\n\t\twhile (remaining > 0) {\n\t\t\tByteBuffer buf = stor.buffer(pos);\n\t\t\t// safe as long as chunk size < Integer.MAX_VALUE\n\t\t\tint n = (int) Math.min(buf.remaining(), remaining);\n\t\t\tcs.update(buf, n);\n\t\t\tremaining -= n;\n\t\t\tpos = stor.advance(pos, n);\n\t\t}\n\t\tcs.update(zero_tail);\n\t\treturn cksum == cs.getValue();\n\t}", "@Override\n public int checksum(ByteBuffer bb) {\n if (bb == null)\n throw new NullPointerException(\"ByteBuffer is null in Fletcher32#checksum\");\n Fletcher32 f = f32.get();\n f.update(bb.array());\n return (int) f.getValue();\n }", "public FileInfo()\r\n {\r\n hash = new HashInfo();\r\n }", "public void assimilateChecksum(Container container) {\n if (container.hasCheckSum()) {\n // PM-1617 add all metadata from the entry into FileTransfer\n Metadata m = (Metadata) container.getAllProfiles().get(Profiles.NAMESPACES.metadata);\n this.getAllMetadata().merge(m);\n }\n }", "public final void setChecksumData(byte[] value)\r\n\t{\r\n\t\tthis.checksumData = value;\r\n\t}", "protected void calculateChecksum(Patch p) {\n calculateChecksum(p, checksumStart, checksumEnd, checksumOffset);\n }", "public static void main(String[] args) {\n System.out.println(getCRC(\"BB0130011911130849360002000110303030303131313130303030303033340000000000000000000000000000000000000000000000000000000101000150000016DC202424DC6F5C68BE4D171B2D78EAFFB40002010001791698620E9A3836353832303033303036353130310500D182A8CAA4E781979AA537DC5A74A870F52B72DB299DED9F398D9386F318CB5B\"));\n// System.out.println(getCRC(\"01 03 00 00 00 08\"));\n// System.out.println(getCRC(\"01 03 10 00 8F 02 4E 00 91 02 44 00 92 02 5A 00 8B 02 47\"));\n }", "byte produceChecksum(byte[] bytes, int start, int end)\n {\n // From the sysex document:\n //\n // \"Sum of all databytes truncated to 7 bits.\n // The addition is done in 8 bit format, the result is \n // masked to 7 bits (00h to 7Fh). A checksum of 7Fh is\n // always accepted as valid.\n // IMPORTANT: the MIDI status-bytes as well as the \n // ID's are not used for computing the checksum.\"\n \n // NOTE: it appears that the WaldorfPulse2's sysex does NOT include\n // the NN or DD data bytes. \n \n byte b = 0; // I *think* signed will work\n for(int i = start; i < end + 1; i++)\n b += bytes[i];\n \n b = (byte)(b & (byte)127);\n \n return b;\n }", "byte[] digest();", "public Achterbahn() {\n }", "public TarjetaDebito() {\n\t\tsuper();\n\t}", "public ChecksumException(int expected, int received) {\n this.expected = expected;\n this.received = received;\n }", "private long calcChecksum(InputStream in, long size) throws IOException{\n CRC32 crc = new CRC32();\n int len = buffer.length;\n int count = -1;\n int haveRead = 0; \n while((count=in.read(buffer, 0, len)) > 0){\n haveRead += count;\n crc.update(buffer, 0, count);\n }\n in.close();\n return crc.getValue();\n }", "public interface DigestFunction\n{\n\n byte[] digest(String clearToken);\n}", "public DuploQuantidadeFaturacao(){\r\n faturacao = 0;\r\n quantidade = 0;\r\n }", "public BankAccount() {\r\n\t\tbalance=0;\r\n\t\t\r\n\t}", "@Test\n public void testHash() \n\t{\n\tLaboonCoin l = new LaboonCoin();\n\t\tint hash = l.hash(\"boo\");\n\t\tint result = 1428150834;\n\t\tassertEquals(result, hash);\n }", "public Account() //default constructor \n {\n this.balance = 0;\n this.account_number = 0;\n }", "public static byte[] createCheckSum(String filename) throws Exception {\n InputStream fis = new FileInputStream(filename);\n\n byte[] buffer = new byte[1024];\n MessageDigest complete = MessageDigest.getInstance(\"MD5\");\n int numRead;\n\n do {\n numRead = fis.read(buffer);\n if (numRead > 0) {\n complete.update(buffer, 0, numRead);\n }\n } while (numRead != -1);\n\n fis.close();\n // Return MD5 Hash\n return complete.digest();\n }", "static long calculateChecksum(byte[] buf) {\n int length = buf.length;\n int i = 0;\n\n long sum = 0;\n long data;\n\n // Handle all pairs\n while (length > 1) {\n // Corrected to include @Andy's edits and various comments on Stack Overflow\n data = (((buf[i] << 8) & 0xFF00) | ((buf[i + 1]) & 0xFF));\n sum += data;\n // 1's complement carry bit correction in 16-bits (detecting sign extension)\n if ((sum & 0xFFFF0000) > 0) {\n sum = sum & 0xFFFF;\n sum += 1;\n }\n\n i += 2;\n length -= 2;\n }\n\n // Handle remaining byte in odd length buffers\n if (length > 0) {\n // Corrected to include @Andy's edits and various comments on Stack Overflow\n sum += (buf[i] << 8 & 0xFF00);\n // 1's complement carry bit correction in 16-bits (detecting sign extension)\n if ((sum & 0xFFFF0000) > 0) {\n sum = sum & 0xFFFF;\n sum += 1;\n }\n }\n\n // Final 1's complement value correction to 16-bits\n sum = ~sum;\n sum = sum & 0xFFFF;\n return sum;\n }", "public Cuenta(Usuario usuario) { // constructor que crea objetos tipo cuenta que recibe por parámetro\n //un objeto de tipo usuario\n\n this.usuario = usuario;\n saldo = 0;\n }", "public TwoSum() {\n\n }", "private long getChecksumForIntermediateValues(long a, long b) {\n return (long) (a + (b * Math.pow(2, 16)));\n }", "private static String getMD5Checksum(String filename) throws Exception {\r\n\t\tbyte[] b = createChecksum(filename);\r\n\t\tStringBuilder result = new StringBuilder();\r\n\t\tfor (byte v : b) {\r\n\t\t\tresult.append(Integer.toString((v & 0xff) + 0x100, 16).substring(1));\r\n\t\t}\r\n\t\treturn result.toString();\r\n\t}", "public Adler32() {\n }", "public Tarifa() {\n ;\n }", "@Test\n public void testDERIVATIVE_COMPRESS_CRC() throws IOException {\n// ZipMeVariables.getSINGLETON().setCRC___(true);\n// ZipMeVariables.getSINGLETON().setCOMPRESS___(true);\n// ZipMeVariables.getSINGLETON().setDERIVATIVE_COMPRESS_CRC___(true);\n\t Configuration.CRC=true;\n\t Configuration.COMPRESS=true;\n\t Configuration.DERIVATIVE_COMPRESS_CRC=true;\n if(Configuration.CRC && Configuration.COMPRESS && Configuration.DERIVATIVE_COMPRESS_CRC) { \n ZipOutputStream zout = new ZipOutputStream(new FileOutputStream(new File(\n homeDir + \"/files/src.zip\")));\n zout.crc.update(1);\n ZipEntry ze = new ZipEntry(\"C://\");\n zout.putNextEntry(ze);\n zout.hook41();\n assertTrue(zout.crc.crc == 0);\n\n zout.write(new byte[32], 0, 31);\n assertTrue(zout.size == 31);\n zout.closeEntry();\n assertTrue(ze.getCrc() == zout.crc.crc);\n }\n }", "public BasicCalculator() {\n // Initialization here.\n // this.count = 0;\n\n }", "public CreditCard ()\r\n\t{\r\n\t\t\r\n\t}", "ClaseColas() { // Constructor que inicializa el frente y el final de la Cola\r\n frente=0; fin=0;\r\n System.out.println(\"Cola inicializada !!!\");\r\n }", "@Test\n public void testDERIVATIVE_EXTRACT_CRC___() throws IOException {\n \n\t Configuration.CRC=true;\n\t Configuration.EXTRACT=true;\n\t Configuration.DERIVATIVE_EXTRACT_CRC=true;\n\t Configuration.COMPRESS=true;\n if(Configuration.CRC && Configuration.EXTRACT && Configuration.DERIVATIVE_EXTRACT_CRC && Configuration.COMPRESS) {\n \n ZipOutputStream zos = new ZipOutputStream(new FileOutputStream(new File(\n homeDir + \"/files/Teste.txt.zip\")));\n zos.putNextEntry(new ZipEntry(homeDir + \"/files/Teste.txt.zip\"));\n zos.write(new byte[32]);\n ZipInputStream zis = new ZipInputStream(new FileInputStream(new File(\n homeDir + \"/files/Teste.txt.zip\")));\n ZipEntry ze = zis.getNextEntry();\n assertTrue(ze != null);\n zis.available();\n zos.close();\n }\n }", "public Clade() {}", "public Account(){\r\n this.id = 0;\r\n this.saldo = 0.0;\r\n }", "@Test\n public void testExampleInputs() {\n CheckSum checkSum = new CheckSum();\n Integer[][] testData = new Integer[][]{\n { 5, 9, 2, 8 },\n { 9, 4, 7,3 },\n { 3, 8, 6, 5},\n };\n\n Integer result = checkSum.checksum(testData);\n System.out.printf(\"Result \" + result);\n assertEquals(new Integer(9), result);\n }", "public String getChecksumForType(MigrationType type);", "public TRFStoreTotal() {\n }", "private static String getFileChecksum(MessageDigest digest, File file) throws IOException\n\t {\n\t FileInputStream fis = new FileInputStream(file);\n\t \n\t //Create byte array to read data in chunks\n\t byte[] byteArray = new byte[1024];\n\t int bytesCount = 0;\n\t \n\t //Read file data and update in message digest\n\t while ((bytesCount = fis.read(byteArray)) != -1) {\n\t digest.update(byteArray, 0, bytesCount);\n\t };\n\t \n\t //close the stream; We don't need it now.\n\t fis.close();\n\t \n\t //Get the hash's bytes\n\t byte[] bytes = digest.digest();\n\t \n\t //This bytes[] has bytes in decimal format;\n\t //Convert it to hexadecimal format\n\t StringBuilder sb = new StringBuilder();\n\t for(int i=0; i< bytes.length ;i++)\n\t {\n\t sb.append(Integer.toString((bytes[i] & 0xff) + 0x100, 16).substring(1));\n\t }\n\t \n\t //return complete hash\n\t return sb.toString();\n\t }", "byte[] mo38566a();", "private ByteTools(){}", "public CashPayment()\n {\n super();\n }", "public ContractMethod() {\n }", "@Test\n public void testCreateDocumentChecksumFromMeta() throws IOException {\n CachedInputStream is =\n new CachedStreamFactory(1024, 1024).newInputStream();\n Doc doc = new Doc(\"N/A\", is);\n doc.getMetadata().add(\"field1\", \"value1.1\", \"value1.2\");\n doc.getMetadata().add(\"field2\", \"value2\");\n MD5DocumentChecksummer cs = new MD5DocumentChecksummer();\n\n // 2 matching fields\n cs.setFieldMatcher(TextMatcher.csv(\"field1,field2\"));\n String checksum1 = cs.createDocumentChecksum(doc);\n Assertions.assertTrue(\n StringUtils.isNotBlank(checksum1),\n \"No checksum was generated for two matching fields.\");\n\n // 1 out of 2 matching fields\n cs.setFieldMatcher(TextMatcher.csv(\"field1,field3\"));\n String checksum2 = cs.createDocumentChecksum(doc);\n Assertions.assertTrue(\n StringUtils.isNotBlank(checksum2),\n\n \"No checksum was generated for 1 of two matching fields.\");\n\n // No matching fields\n cs.setFieldMatcher(TextMatcher.csv(\"field4,field5\"));\n String checksum3 = cs.createDocumentChecksum(doc);\n Assertions.assertNull(checksum3,\n \"Checksum for no matching fields should have been null.\");\n\n // Regex\n cs.setFieldMatcher(TextMatcher.regex(\"field.*\"));\n String checksum4 = cs.createDocumentChecksum(doc);\n Assertions.assertTrue(StringUtils.isNotBlank(checksum4),\n \"No checksum was generated.\");\n\n\n // Regex only no match\n cs.setFieldMatcher(TextMatcher.regex(\"NOfield.*\"));\n String checksum5 = cs.createDocumentChecksum(doc);\n Assertions.assertNull(checksum5,\n \"Checksum for no matching regex should have been null.\");\n\n is.dispose();\n }", "byte[] getDigest();", "Long crear(Prestamo prestamo);", "public Builder clearChecksum() {\n \n checksum_ = getDefaultInstance().getChecksum();\n onChanged();\n return this;\n }", "private BytesUtils() {\n\n }", "public LaundryCard() {\n\t}", "private CompressionTools() {}", "public Raum() {}", "public Coin()\n {\n toss();//call the toss method\n }", "Determinante createDeterminante();" ]
[ "0.67318445", "0.6498179", "0.6354497", "0.6317029", "0.6301387", "0.6248827", "0.620931", "0.6190197", "0.6040302", "0.59755504", "0.5871801", "0.5818405", "0.58097035", "0.5784484", "0.564544", "0.5627485", "0.55835813", "0.552145", "0.5487608", "0.5463965", "0.5460083", "0.5421131", "0.540171", "0.53870964", "0.5377053", "0.53766596", "0.5368722", "0.5356113", "0.5347459", "0.5346957", "0.5344467", "0.53296363", "0.5307075", "0.52921957", "0.5287716", "0.52795637", "0.52400017", "0.52398956", "0.5239391", "0.5236385", "0.5219633", "0.521908", "0.5213338", "0.5199481", "0.51983", "0.5185033", "0.5183037", "0.51681894", "0.51616436", "0.51511073", "0.5149416", "0.51423246", "0.5136481", "0.5100622", "0.50997883", "0.50909036", "0.5072419", "0.5031733", "0.5028653", "0.5024121", "0.49838609", "0.49817818", "0.49651042", "0.49648717", "0.496103", "0.49581933", "0.4955942", "0.49545282", "0.49387875", "0.4924054", "0.4922009", "0.49198005", "0.49186116", "0.49141207", "0.4912653", "0.4910251", "0.49095953", "0.49030948", "0.49025726", "0.48968259", "0.48936585", "0.4879825", "0.4878041", "0.48753414", "0.48714185", "0.4869017", "0.4868148", "0.48670727", "0.48660251", "0.48644564", "0.48643896", "0.4863807", "0.48632938", "0.48550963", "0.48540848", "0.4847183", "0.48468518", "0.48445556", "0.48439127", "0.48385307", "0.4838504" ]
0.0
-1
Construtor do modelo Erro.
public Erro(final String propriedade, final String mensagem) { this.propriedade = propriedade; this.mensagem = mensagem; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ListaComuniModel() {\n\t\tsuper();\n\t}", "public ModeloNoValidoException(String mensaje) {\n\t\tsuper(mensaje);\n\t}", "public ConsultaMassivaCapitoloEntrataPrevisioneModel() {\n\t\tsuper();\n\t\tsetTitolo(\"Consulta Capitolo Entrata Previsione (Massivo)\");\n\t}", "@Override\n protected void carregaObjeto() throws ViolacaoRegraNegocioException {\n entidade.setNome( txtNome.getText() );\n entidade.setDescricao(txtDescricao.getText());\n entidade.setTipo( txtTipo.getText() );\n entidade.setValorCusto(new BigDecimal((String) txtCusto.getValue()));\n entidade.setValorVenda(new BigDecimal((String) txtVenda.getValue()));\n \n \n }", "public Modello() {\r\n super();\r\n initComponents();\r\n setModalita(APPEND_QUERY);\r\n setFrameTable(tabModello);\r\n setNomeTabella(\"vmodello\");\r\n tMarcaDescrizione.setEnabled(false);\r\n }", "public TipoCaracteresException() {\n\t\tsuper(\"Los campos 'nombre' y ' apellido' solo pueden contener letras\");\n\t}", "public RisultatiRicercaStampaAllegatoAttoModel() {\n\t\tsuper();\n\t\tsetTitolo(\"Risultati di ricerca stampe allegato atto\");\n\t}", "public PacienteModel(int codigo, String nome, String nascimento, String endereco, String telefone, String cep, String documento, String sexo, String data_cliente, String tipo, String email, String obs) {\r\n this.codigo = new SimpleIntegerProperty(codigo);\r\n this.nome = new SimpleStringProperty(nome);\r\n this.nascimento = new SimpleStringProperty(nascimento);\r\n this.endereco = new SimpleStringProperty(endereco);\r\n this.telefone = new SimpleStringProperty(telefone);\r\n this.cep = new SimpleStringProperty(cep);\r\n this.documento = new SimpleStringProperty(documento);\r\n this.sexo = new SimpleStringProperty(sexo);\r\n this.data_cliente = new SimpleStringProperty(data_cliente);\r\n this.tipo = new SimpleStringProperty(tipo);\r\n this.email = new SimpleStringProperty(email);\r\n this.obs = new SimpleStringProperty(obs);\r\n /*Apenas inicio ele*/\r\n this.status = new SimpleBooleanProperty();\r\n }", "public PacienteModel(CidadeModel cidadeModel, BairroModel bairroModel) {\r\n this.cidadeModel = cidadeModel;\r\n this.bairroModel = bairroModel;\r\n }", "public Erreur() {\n\t}", "public RemocaoDocumentoException(){\n\t\tsuper(\"Não é permitida a remoção deste tipo de documento!\");\n\t}", "public ModelBolting(){}", "public TipoPrestamo() {\n\t\tsuper();\n\t}", "public PacienteModel() {\r\n this.codigo = new SimpleIntegerProperty();\r\n this.nome = new SimpleStringProperty();\r\n this.nascimento = new SimpleStringProperty();\r\n this.endereco = new SimpleStringProperty();\r\n this.telefone = new SimpleStringProperty();\r\n this.cep = new SimpleStringProperty();\r\n this.documento = new SimpleStringProperty();\r\n this.sexo = new SimpleStringProperty();\r\n this.data_cliente = new SimpleStringProperty();\r\n this.tipo = new SimpleStringProperty();\r\n this.email = new SimpleStringProperty();\r\n this.obs = new SimpleStringProperty();\r\n this.status = new SimpleBooleanProperty();\r\n }", "public ClienteModel(int id,\n String nome,\n String email,\n String cpf,\n String sexo,\n String nascimento,\n String estadoCivil,\n String celular,\n String telefone,\n String endereco) {\n\n this.id = id;\n this.nome = nome;\n this.email = email;\n this.cpf = cpf;\n this.nascimento = nascimento;\n this.sexo = sexo;\n this.estadoCivil = estadoCivil;\n this.celular = celular;\n this.telefone = telefone;\n this.endereco = endereco;\n }", "public interface IModelTamanho {\r\n\t\r\n\tpublic void setCodigo(String cCodigo);\r\n\tpublic void setDescricao(String cDescricao);\r\n\tpublic void setPeso(double nPeso);\r\n\tpublic void setAltura(double nAltura);\r\n\tpublic void setLargura (double nLargura);\r\n\tpublic void setComprimento (double nComprimento);\r\n\tpublic String getCodigo();\r\n\tpublic String getDescricao();\r\n\tpublic double getPeso();\r\n\tpublic double getAltura();\r\n\tpublic double getLargura();\r\n\tpublic double getComprimento();\r\n\tpublic String toString();\r\n\t\r\n}", "public MVCModelo(int capacidad)\n\t{\n\t\tllave = \"\";\n\t\tvalue = 0.0;\n\t}", "public PacienteModel(int codigo, String nome, String nascimento, String endereco, String telefone, String cep, String documento, String sexo, String data_cliente, String tipo, String email, String obs,boolean status) {\r\n this.codigo = new SimpleIntegerProperty(codigo);\r\n this.nome = new SimpleStringProperty(nome);\r\n this.nascimento = new SimpleStringProperty(nascimento);\r\n this.endereco = new SimpleStringProperty(endereco);\r\n this.telefone = new SimpleStringProperty(telefone);\r\n this.cep = new SimpleStringProperty(cep);\r\n this.documento = new SimpleStringProperty(documento);\r\n this.sexo = new SimpleStringProperty(sexo);\r\n this.data_cliente = new SimpleStringProperty(data_cliente);\r\n this.tipo = new SimpleStringProperty(tipo);\r\n this.email = new SimpleStringProperty(email);\r\n this.obs = new SimpleStringProperty(obs);\r\n this.status = new SimpleBooleanProperty(status);\r\n }", "public TabellaModel() {\r\n lista = new Lista();\r\n elenco = new Vector<Persona>();\r\n elenco =lista.getElenco();\r\n values = new String[elenco.size()][3];\r\n Iterator<Persona> iterator = elenco.iterator();\r\n while (iterator.hasNext()) {\r\n\t\t\tfor (int i = 0; i < elenco.size(); i++) {\r\n\t\t\t\tpersona = new Persona();\r\n\t\t\t\tpersona = (Persona) iterator.next();\r\n\t\t\t\tvalues[i][0] = persona.getNome();\r\n\t\t\t\tvalues[i][1] = persona.getCognome();\r\n\t\t\t\tvalues[i][2] = persona.getTelefono();\t\r\n\t\t\t}\r\n\t\t}\r\n setDataVector(values, columnNames);\t\r\n }", "@Override\n public void validateModel() {\n }", "public PriceModelException() {\n\n }", "ModelData getModel();", "public ClienteModel getModelo() {\r\n return modelo;\r\n }", "public LeaveModel() {\n }", "public EntidadNoBorradaException() {\n super();\n }", "EisModel createEisModel();", "public void crearModelo() {\n modeloagr = new DefaultTableModel(null, columnasAgr) {\n public boolean isCellEditable(int fila, int columna) {\n return false;\n }\n };\n tbl.llenarTabla(AgendarA.tblAgricultor, modeloagr, columnasAgr.length, \"SELECT idPersonalExterno,cedula,CONCAT(nombres,' ',apellidos),municipios.nombre,telefono,telefono2,telefono3 FROM personalexterno,municipios WHERE tipo='agricultor' AND personalexterno.idMunicipio=municipios.idMunicipio\");\n tbl.alinearHeaderTable(AgendarA.tblAgricultor, headerColumnas);\n tbl.alinearCamposTable(AgendarA.tblAgricultor, camposColumnas);\n tbl.rowNumberTabel(AgendarA.tblAgricultor);\n }", "private Model(){}", "public Carmodel() {\n this(\"CarModel\", null);\n }", "public void crearModelo() {\r\n\t\tmodelo = new DefaultComboBoxModel<>();\r\n\t\tmodelo.addElement(\"Rojo\");\r\n\t\tmodelo.addElement(\"Verde\");\r\n\t\tmodelo.addElement(\"Azul\");\r\n\t\tmodelo.addElement(\"Morado\");\r\n\t}", "public void validate() {\n\t\tClass<?> clazz = this.getModelObject().getClass();\n\t\tif (!ArenaUtils.isObservable(clazz)) {\n\t\t\tthrow new RuntimeException(\"La clase \" + clazz.getName() + \" no tiene alguna de estas annotations \" + ArenaUtils.getRequiredAnnotationForModels() + \" que son necesarias para ser modelo de una vista en Arena\");\n\t\t}\n\t\t// TODO: Validate children bindings?\n\t}", "public MVCModelo()\n\t{\n\t\ttablaChaining=new HashSeparateChaining<String, TravelTime>(20000000);\n\t\ttablaLineal = new TablaHashLineal<String, TravelTime>(20000000);\n\t}", "public TemperaturaErradaExcepcion(){\r\n super(\"mensaxe por defecto:temperatura ten que ser naior que 80ºC\");//mensaxe por defecto\r\n }", "public TcUnidadEdoDTO() {\n }", "public Model() {\n\t}", "public Model() {\n\t}", "public ClienteModel(String nome,\n String email,\n String cpf,\n String sexo,\n String nascimento,\n String estadoCivil,\n String celular,\n String telefone,\n String endereco) {\n\n clientesCadastrados++;\n this.id = clientesCadastrados;\n this.nome = nome;\n this.email = email;\n this.cpf = cpf;\n this.nascimento = nascimento;\n this.sexo = sexo;\n this.estadoCivil = estadoCivil;\n this.celular = celular;\n this.telefone = telefone;\n this.endereco = endereco;\n }", "public void setModelOdobrenja(int value) {\n this.modelOdobrenja = value;\n }", "public Valvula(){}", "@Override\n\tpublic void prepare() throws Exception {\n\t\tsetMethodName(\"prepare\");\n\t\t//invoco il prepare della super classe:\n\t\tsuper.prepare();\n\t\t\n\t\t//setto il titolo:\n\t\tmodel.setTitolo(\"Aggiorna Subaccertamento\");\n\t}", "public Vehiculo() {\r\n }", "public ValorVariavel() {\r\n }", "public RepositorioTransacaoHBM() {\n\n\t}", "public Linearmodel() {\n this(DSL.name(\"LinearModel\"), null);\n }", "public CursoModel entity2model (Curso curso) {\r\n\t\t\r\n\t\tCursoModel cursoModel = new CursoModel();\r\n\t\t\r\n\t\tcursoModel.setNombre(curso.getNombre());\r\n\t\tcursoModel.setDescripcion(curso.getDescripcion());\r\n\t\tcursoModel.setHoras(curso.getHoras());\r\n\t\tcursoModel.setPrecio(curso.getPrecio());\r\n\t\t\r\n\t\treturn cursoModel;\r\n\t}", "public void entregarVehiculo(Modelo modeloAAdjudicar) {\n\t\t\n\t}", "public CampoModelo(String valor, String etiqueta, Integer longitud)\n/* 10: */ {\n/* 11:17 */ this.valor = valor;\n/* 12:18 */ this.etiqueta = etiqueta;\n/* 13:19 */ this.longitud = longitud;\n/* 14: */ }", "protected MVC_model() throws RemoteException {\n\t\tsuper();\n\t}", "public PromotionVoucherModel()\n\t{\n\t\tsuper();\n\t}", "public Exercicio(){\n \n }", "java.lang.String getModel();", "public TdNmResumenPK() {\n }", "public DefaultTableColumnModelExt() {\r\n super();\r\n }", "public PriceModelException(Reason reason) {\n super(reason.toString());\n setMessageKey(getMessageKey() + \".\" + reason.toString());\n }", "public Controlador(Vista view, Modelo model){\r\n \r\n //Se igualan las propiedades\r\n this.view = view;\r\n this.model = model;\r\n this.view.btnGuardar.addActionListener(this);\r\n \r\n //se iguala el modelo de la tabla\r\n table = new DefaultTableModel();\r\n view.tablaResultado.setModel(table);\r\n \r\n //nombre para la columna de la tabla\r\n table.addColumn(\"Listado\"); \r\n \r\n }", "public CambioComplementariosDTO() { }", "public InvalidModelException(String message) {\n super(message);\n }", "@Override\n\t\tpublic int getModel() {\n\t\t\treturn 0;\n\t\t}", "public ItemInvalidoException() {\r\n }", "@Override\r\n\tpublic void setModel() {\n\t}", "public Model() {\n }", "public Model() {\n }", "public Model() {\n }", "public Troco() {\n }", "public abstract M getModel();", "public RDR_RDR() { \r\n this(new DefaultModelClassFactory());\r\n }", "public Candidatura (){\n \n }", "ConstraintModelFactory getConstraintModelFactory();", "public void crearVehiculo( clsVehiculo vehiculo ){\n if( vehiculo.obtenerTipoMedioTransporte().equals(\"Carro\") ){\n //Debo llamar el modelo de CARRO\n modeloCarro.crearCarro( (clsCarro) vehiculo );\n } else if (vehiculo.obtenerTipoMedioTransporte().equals(\"Camion\")){\n //Debo llamar el modelo de CAMIÓN\n }\n }", "@Override\r\n public String getModel() {\n return null;\r\n }", "public RolesModel (String appName, String profile) { \r\n super(appName, profile);\r\n\r\n //add columns\r\n addColumn(computeTableName(\"roles\"),\"rol_id\",DataStore.DATATYPE_INT,true,true,ROLES_ROL_ID);\r\n addColumn(computeTableName(\"roles\"),\"nombre\",DataStore.DATATYPE_STRING,false,true,ROLES_NOMBRE);\r\n addColumn(computeTableName(\"roles\"),\"descripcion\",DataStore.DATATYPE_STRING,false,true,ROLES_DESCRIPCION);\r\n addColumn(computeTableName(\"roles\"),\"observaciones\",DataStore.DATATYPE_STRING,false,true,ROLES_OBSERVACIONES);\r\n\r\n //set order by\r\n setOrderBy(computeTableAndFieldName(\"roles.nombre\") + \" ASC\");\r\n\r\n //$CUSTOMCONSTRUCTOR$\r\n //Put custom constructor code between these comments, otherwise it be overwritten if the model is regenerated\r\n\r\n //$ENDCUSTOMCONSTRUCTOR$\r\n\r\n }", "public NuevaTablaResource() {\r\n }", "public TdOficioAfectacionPK() {\n }", "public FiltroMicrorregiao() {\r\n }", "public Trabajador() {\n\t\tsuper();\n\t}", "public LinearConstraint() {\n\n }", "public FareModel() {\n }", "public DefaultComboBoxModel<ModeloVO> preencherCbx_Modelo() {\n BaseDAO<ModeloVO> bDAO = new ModeloDAO();\n ArrayList<ModeloVO> list = bDAO.consultarTodos();\n return new DefaultComboBoxModel(list.toArray());\n }", "public Model() {\n\n }", "public abstract void validate () throws ModelValidationException;", "public AbstrJoueurModel retourneAbstrJoueurModel(){ return ajm;}", "TypedModel getModel();", "public void setModeloProblema(ModeloProblemaLinear modeloProblema) {\r\n this.modeloProblema = modeloProblema;\r\n }", "public CorreoElectronico() {\n }", "public Cgg_res_oficial_seguimiento_usuario(){}", "public MyException(){\r\n super(\"Loi sai nhap du lieu!!!!\");// super là nói về lớp cha- đại diện đối tượng cha\r\n }", "public ExceptionSubVersion() {\n this(\"EcologicaExcepciones\");\n }", "public telefono(){\n this.telefono =\"00000000\";\n this.saldo = 0.0;\n this.marca= \"Sin Marca\";\n }", "public InvoiceModel() {\n \n }", "public SintaxException() { //Si se llama con el mensaje por defecto\n super(\"Error de sintaxis en el polinomio\"); //El constructor llama a la clase superior\n }", "public BeanDatosAlumno() {\r\n bo = new BoPrestamoEjemplarImpl();\r\n verEjemplares(\"ABC0001\"); \r\n numerodelibrosPrestados();\r\n }", "@Override\r\n\tpublic String getModel() {\n\t\treturn \"Activa\";\r\n\t}", "public ChoixEntreprise() {\n\n }", "public void setTipoConstruccion(Valor tipoConstruccion) {\n this.tipoConstruccion = tipoConstruccion;\n }", "protected modelCartelera(Parcel in) {\n nombre = in.readString();\n descripcion = in.readString();\n id = in.readInt();\n //imagenCartelera = in.readInt();\n }", "public personnelMedicalModel(){\n\n }", "public VuePoissonRougeMale(PoissonRougeMale objet){\n\t\tthis.model = objet;\n\t}", "public Model() {\n this(DSL.name(\"model\"), null);\n }", "public EnvioPersonaPK() {\r\n }", "private Builder() {\n super(graphene.model.idl.G_DocumentError.SCHEMA$);\n }" ]
[ "0.6424503", "0.6083373", "0.5973975", "0.59421086", "0.58124316", "0.581096", "0.5777845", "0.5771928", "0.57702816", "0.5764357", "0.5756281", "0.5744272", "0.57333654", "0.57189894", "0.57055086", "0.5705137", "0.5689208", "0.56699604", "0.55924666", "0.5565968", "0.55622184", "0.5550148", "0.5541597", "0.5519001", "0.5506953", "0.5497899", "0.5496798", "0.54682904", "0.54646695", "0.5460538", "0.5453248", "0.54486436", "0.54474694", "0.54333067", "0.5423963", "0.5423963", "0.54220206", "0.5408368", "0.540496", "0.53908414", "0.53788173", "0.53690034", "0.53673357", "0.53643143", "0.53591985", "0.53576267", "0.5334117", "0.5318909", "0.53133255", "0.53086597", "0.53085226", "0.5304656", "0.5283403", "0.5273982", "0.52673614", "0.52661765", "0.52602917", "0.5237121", "0.52317405", "0.5225685", "0.52234906", "0.52234906", "0.52234906", "0.5223104", "0.52195376", "0.5215873", "0.52133566", "0.52107406", "0.5210325", "0.52068317", "0.5204195", "0.52037746", "0.52025646", "0.52009434", "0.51989836", "0.5197089", "0.5187185", "0.5185314", "0.5183929", "0.51806116", "0.5178544", "0.51774865", "0.51769924", "0.51749796", "0.51685995", "0.515686", "0.51512086", "0.51475704", "0.51398855", "0.5137091", "0.51367646", "0.513662", "0.5135085", "0.5130856", "0.513024", "0.5125695", "0.5123638", "0.5123535", "0.51206285", "0.51184165" ]
0.5236715
58
Sets the images to be animates
public void setImages(Bitmap[] images){ this.images=images; currentFrame=0; startTime=System.nanoTime(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setImages() {\n\n imgBlock.removeAll();\n imgBlock.revalidate();\n imgBlock.repaint();\n labels = new JLabel[imgs.length];\n for (int i = 0; i < imgs.length; i++) {\n\n labels[i] = new JLabel(new ImageIcon(Toolkit.getDefaultToolkit().createImage(imgs[i].getSource())));\n imgBlock.add(labels[i]);\n\n }\n\n SwingUtilities.updateComponentTreeUI(jf); // refresh\n initialized = true;\n\n }", "private void loadAnimations() {\n loadImages(imagesFront, \"F\");\n loadImages(imagesLeft, \"L\");\n loadImages(imagesRight, \"R\");\n loadImages(imagesBack, \"B\");\n }", "public void setStartingImages() {\n\t\t\n\t}", "protected void animate(GreenfootImage[] images, int currentFrame)\n {\n setImage(images[currentFrame]);\n }", "public void setImages(MimsPlus[] images) {\n this.images = images;\n }", "protected void setAnimation(BufferedImage[] sprites, int delay) {\r\n animation.setFrames(sprites);\r\n animation.setDelay(delay);\r\n }", "public void setAnimaciones( ){\n\n int x= 0;\n Array<TextureRegion> frames = new Array<TextureRegion>();\n for(int i=1;i<=8;i++){\n frames.add(new TextureRegion(atlas.findRegion(\"demon01\"), x, 15, 16, 15));\n x+=18;\n }\n this.parado = new Animation(1 / 10f, frames);//5 frames por segundo\n setBounds(0, 0, 18, 15);\n\n }", "private void initAnim()\n {\n \t\n //leftWalk = AnimCreator.createAnimFromPaths(Actor.ANIM_DURATION, \n // AUTO_UPDATE, leftWalkPaths);\n // get the images for leftWalk so we can flip them to use as right.#\n \tImage[] leftWalkImgs = new Image[leftWalkPaths.length];\n \tImage[] rightWalkImgs = new Image[leftWalkPaths.length];\n \tImage[] leftStandImgs = new Image[leftStandPaths.length];\n \tImage[] rightStandImgs = new Image[leftStandPaths.length];\n \t\n \t\n \t\n \tleftWalkImgs = AnimCreator.getImagesFromPaths(\n \t\t\tleftWalkPaths).toArray(leftWalkImgs);\n \t\n \theight = leftWalkImgs[0].getHeight();\n \t\n \trightWalkImgs = AnimCreator.getHorizontallyFlippedCopy(\n \t\t\tleftWalkImgs).toArray(rightWalkImgs);\n \t\n \tleftStandImgs = AnimCreator.getImagesFromPaths(\n \t\t\tleftStandPaths).toArray(leftStandImgs);\n \t\n \trightStandImgs = AnimCreator.getHorizontallyFlippedCopy(\n \t\t\tleftStandImgs).toArray(rightStandImgs);\n \t\n \tboolean autoUpdate = true;\n \t\n \tleftWalk = new /*Masked*/Animation(\n\t\t\t\t\t\t leftWalkImgs, \n\t\t\t\t\t\t Actor.ANIM_DURATION, \n\t\t\t\t\t\t autoUpdate);\n\n \trightWalk = new /*Masked*/Animation(\n \t\t\t\t\t\trightWalkImgs, \n \t\t\t\t\t\tActor.ANIM_DURATION, \n\t\t\t\t autoUpdate);\n \t\n \tleftStand = new /*Masked*/Animation(\n \t\t\t\t\t\tleftStandImgs, \n\t\t\t\t\t\t\tActor.ANIM_DURATION, \n\t\t\t\t\t\t\tautoUpdate);\n \t\n \trightStand = new /*Masked*/Animation(\n \t\t\t\t\t\trightStandImgs, \n \t\t\t\t\t\tActor.ANIM_DURATION,\n \t\t\t\t\t\tautoUpdate);\n \t\n \tsetInitialAnim();\n }", "public void loadImages() {\n\t\tcowLeft1 = new ImageIcon(\"images/animal/cow1left.png\");\n\t\tcowLeft2 = new ImageIcon(\"images/animal/cow2left.png\");\n\t\tcowLeft3 = new ImageIcon(\"images/animal/cow1left.png\");\n\t\tcowRight1 = new ImageIcon(\"images/animal/cow1right.png\");\n\t\tcowRight2 = new ImageIcon(\"images/animal/cow2right.png\");\n\t\tcowRight3 = new ImageIcon(\"images/animal/cow1right.png\");\n\t}", "private void setImage(){\n if(objects.size() <= 0)\n return;\n\n IImage img = objects.get(0).getImgClass();\n boolean different = false;\n \n //check for different images.\n for(IDataObject object : objects){\n IImage i = object.getImgClass();\n \n if((img == null && i != null) || \n (img != null && i == null)){\n different = true;\n break;\n }else if (img != null && i != null){ \n \n if(!i.getName().equals(img.getName()) ||\n !i.getDir().equals(img.getDir())){\n different = true;\n break;\n }\n } \n }\n \n if(!different){\n image.setText(BUNDLE.getString(\"NoImage\"));\n if(img != null){\n imgName = img.getName();\n imgDir = img.getDir();\n image.setImage(img.getImage());\n }else{\n image.setImage(null);\n }\n }else{\n image.setText(BUNDLE.getString(\"DifferentImages\"));\n }\n \n image.repaint();\n }", "public void setImageView() {\n \timage = new Image(\"/Model/boss3.png\", true);\n \tboss = new ImageView(image); \n }", "public void updateImage() {\n \t\tAnimation anim = this.animationCollection.at(\n \t\t\t\tfak.getCurrentAnimationTextualId());\n \n \t\t// if animation is set to something bad, then set it to back to initial\n \t\tif(anim==null)\n \t\t{\n \t\t\tfak.setCurrentAnimationTextualId(ConstantsForAPI.INITIAL);\n \t\t\tanim = this.animationCollection.at(\n \t\t\t\t\tfak.getCurrentAnimationTextualId());\n \t\t}\n \n \t\tif(anim==null)\n \t\t{\n \t\t\tanim = this.animationCollection.at(0);\n \t\t\tfak.setCurrentAnimationTextualId(anim.getTextualId());\n \t\t}\n \n \t\tif (anim != null) {\n \t\t\tif (fak.getCurrentFrame()\n \t\t\t\t\t>= anim.getLength()) {\n \t\t\t\tfak.setCurrentFrame(\n \t\t\t\t\t\tanim.getLength() - 1);\n \t\t\t}\n \n \t\t\tcom.github.a2g.core.objectmodel.Image current = anim.getImageAndPosCollection().at(\n \t\t\t\t\tfak.getCurrentFrame());\n \n \t\t\t// yes current can equal null in some weird cases where I place breakpoints...\n \t\t\tif (current != null\n \t\t\t\t\t&& !current.equals(this)) {\n \t\t\t\tif (this.currentImage != null) {\n \t\t\t\t\tthis.currentImage.setVisible(\n \t\t\t\t\t\t\tfalse, new Point(this.left,this.top));\n \t\t\t\t}\n \t\t\t\tthis.currentImage = current;\n \t\t\t}\n \t\t}\n \t\t// 2, but do this always\n \t\tif (this.currentImage != null) {\n \t\t\tthis.currentImage.setVisible(\n \t\t\t\t\tthis.visible, new Point(this.left,\n \t\t\t\t\t\t\tthis.top));\n \t\t}\n \n \t}", "private void setIcons(){\n\t\tfinal List<BufferedImage> icons = new ArrayList<BufferedImage>();\n\t\ttry {\n\t\t\ticons.add(ImageLoader.getBufferedImage(SMALL_ICON_PATH));\n\t\t\ticons.add(ImageLoader.getBufferedImage(BIG_ICON_PATH));\n\t\t} catch (IOException e) {\n\t\t\tmanager.handleException(e);\n\t\t}\n\t\tif(icons.size() > 0)\n\t\t\tsetIconImages(icons);\n\t}", "public void setImg(){\n if(PicSingleton.getInstance().getPicToShape() != null){\n\n mResultImg.setImageDrawable(PicSingleton.getInstance().getPicShaped());\n }\n }", "public void act() \n {\n if(images != null)\n {\n if(animationState == AnimationState.ANIMATING)\n {\n if(animationCounter++ > delay)\n {\n animationCounter = 0;\n currentImage = (currentImage + 1) % images.length;\n setImage(images[currentImage]);\n }\n }\n else if(animationState == AnimationState.SPECIAL)\n {\n setImage(specialImage);\n }\n else if(animationState == AnimationState.RESTING)\n {\n animationState = AnimationState.FROZEN;\n animationCounter = 0;\n currentImage = 0;\n setImage(images[currentImage]);\n }\n }\n }", "protected void setMovingAnimation(Image[] images, int frameDuration){\n //The HashMap takes a facing-direction and an animation image and becomes the movingAnimation\n \tmovingAnimations = new HashMap<Facing,Animation>();\n \n //The images of an object, facing right, is set as the default animation\n movingAnimations.put(Facing.RIGHT, new Animation(images,frameDuration));\n \n //A new animation is declared for the leftward-flipped images.\n Animation facingLeftAnimation = new Animation();\n //The loop goes through each image and flips all of them to face left\n //The \"getFlippedCopy\" provides a horizontally (true) and vertically (false) flipped image of the original\n for(Image i : images){\n facingLeftAnimation.addFrame(i.getFlippedCopy(true, false), frameDuration);\n }\n //The animation loop will now run with the images having been flipped.\n movingAnimations.put(Facing.LEFT, facingLeftAnimation);\n \n }", "private void animate() {\r\n\t\tif (spriteCounter > 50) {\r\n\t\t\tanimationFrame = 0;\r\n\t\t} else {\r\n\t\t\tanimationFrame = -16;\r\n\t\t}\r\n\t\t\r\n\t\tif (spriteCounter > 100) {\r\n\t\t\tspriteCounter = 0;\r\n\t\t}\r\n\t\t\r\n\t\r\n\t\tspriteCounter++;\r\n\t\tsetImage((Graphics2D) super.img.getGraphics());\r\n\t}", "public void setUpAnimations(){\n //Vertical movement animation\n this.verticalMovement = new Animation[NUMBER_OF_VERTICAL_FRAMES]; //Number of images\n TextureRegion[][] heroVerticalSpriteSheet = TextureRegion.split(new Texture(\"img/hero/hero_vertical.png\"), HERO_WIDTH_PIXEL, HERO_HEIGHT_PIXEL); //TODO: Load atlas?\n\n for(int i = 0; i < NUMBER_OF_VERTICAL_FRAMES; i++)\n verticalMovement[i] = new Animation(ANIMATION_SPEED, heroVerticalSpriteSheet[0][i]); //TODO HANDLE EXCEPTION?\n\n //Jump animation\n this.jumpMovement = new Animation[NUMBER_OF_JUMP_FRAMES];\n TextureRegion[][] heroJumpSpriteSheet = TextureRegion.split(new Texture(\"img/hero/hero_jump.png\"), HERO_WIDTH_PIXEL, HERO_HEIGHT_PIXEL); //TODO: Load atlas?\n\n for(int i = 0; i < NUMBER_OF_JUMP_FRAMES; i++)\n jumpMovement[i] = new Animation(ANIMATION_SPEED, heroJumpSpriteSheet[0][i]); //TODO HANDLE EXCEPTION?\n\n }", "private void setImage() {\r\n\t\ttry{\r\n\r\n\t\t\twinMessage = ImageIO.read(new File(\"obstacles/win.gif\"));\r\n\t\t\tcoin = ImageIO.read(new File(\"obstacles/Coin.gif\"));\r\n\t\t\toverMessage = ImageIO.read(new File(\"obstacles/over.gif\"));\r\n\r\n\t\t} catch (IOException ioe) {\r\n\t\t\tSystem.err.println(\"Image file not found\");\r\n\t\t}\r\n\r\n\t}", "public void createImageSet() {\n\t\t\n\t\t\n\t\tString image_folder = getLevelImagePatternFolder();\n \n String resource = \"0.png\";\n ImageIcon ii = new ImageIcon(this.getClass().getResource(image_folder + resource));\n images.put(\"navigable\", ii.getImage());\n\n\t}", "public Builder setImages(Image... images) {\n this.images = images;\n return this;\n }", "public static void createImages()\n {\n //Do if not done before\n if(!createdImages)\n {\n createdImages = true;\n for(int i=0; i<rightMvt.length; i++)\n {\n rightMvt[i] = new GreenfootImage(\"sniperEnemyRight\"+i+\".png\");\n leftMvt[i] = new GreenfootImage(\"sniperEnemyRight\"+i+\".png\");\n rightMvt[i].scale(rightMvt[i].getWidth()*170/100, rightMvt[i].getHeight()*170/100);\n leftMvt[i].scale(leftMvt[i].getWidth()*170/100, leftMvt[i].getHeight()*170/100);\n }\n for(int i=0; i<leftMvt.length; i++)\n {\n leftMvt[i].mirrorHorizontally();\n }\n for(int i=0; i<upMvt.length; i++)\n {\n upMvt[i] = new GreenfootImage(\"sniperEnemyUp\"+i+\".png\");\n downMvt[i] = new GreenfootImage(\"sniperEnemyDown\"+i+\".png\");\n upMvt[i].scale(upMvt[i].getWidth()*170/100, upMvt[i].getHeight()*170/100);\n downMvt[i].scale(downMvt[i].getWidth()*170/100, downMvt[i].getHeight()*170/100);\n }\n }\n }", "public void loadImages() {\n\t\tpigsty = new ImageIcon(\"images/property/pigsty.png\");\n\t}", "private void drawImages() {\n\t\t\r\n\t}", "private void importImages() {\n\n\t\t// Create array of the images. Each image pixel map contains\n\t\t// multiple images of the animate at different time steps\n\n\t\t// Eclipse will look for <path/to/project>/bin/<relative path specified>\n\t\tString img_file_base = \"Game_Sprites/\";\n\t\tString ext = \".png\";\n\n\t\t// Load background\n\t\tbackground = createImage(img_file_base + \"Underwater\" + ext);\n\t}", "private void initAnimationArray() {\r\n\t\tanimationArr = new GObject[8];\r\n\t\tfor(int i = 1; i < animationArr.length; i++) {\r\n\t\t\tString fileName = \"EvilMehran\" + i + \".png\";\r\n\t\t\tanimationArr[i] = new GImage(fileName);\r\n\t\t}\r\n\t}", "@Override\n protected void animateWalking() {\n if (seqIdx > 7) {\n seqIdx = 0;\n }\n if (walking) {\n this.setImage(\"images/bat/bat_\" + seqIdx + FILE_SUFFIX);\n } else {\n this.setImage(\"images/bat/bat_0.png\");\n }\n seqIdx++;\n }", "private void setImageDynamic(){\n questionsClass.setQuestions(currentQuestionIndex);\n String movieName = questionsClass.getPhotoName();\n ImageView ReferenceToMovieImage = findViewById(R.id.Movie);\n int imageResource = getResources().getIdentifier(movieName, null, getPackageName());\n Drawable img = getResources().getDrawable(imageResource);\n ReferenceToMovieImage.setImageDrawable(img);\n }", "public synchronized static void initialiseImages() \n {\n if (images == null) {\n GreenfootImage baseImage = new GreenfootImage(\"explosion-big.png\");\n int maxSize = baseImage.getWidth()/3;\n int delta = maxSize / IMAGE_COUNT;\n int size = 0;\n images = new GreenfootImage[IMAGE_COUNT];\n for (int i=0; i < IMAGE_COUNT; i++) {\n size = size + delta;\n images[i] = new GreenfootImage(baseImage);\n images[i].scale(size, size);\n }\n }\n }", "public void changeImageMule(){\n\t\tsetIcon(imgm);\n\t}", "private void initImages() {\n mImageView1WA = findViewById(R.id.comment_OWA);\n mImageView6DA = findViewById(R.id.comment_btn_6DA);\n mImageView5DA = findViewById(R.id.comment_btn_5DA);\n mImageView4DA = findViewById(R.id.comment_btn_4DA);\n mImageView3DA = findViewById(R.id.comment_btn_3DA);\n mImageView2DA = findViewById(R.id.comment_btn_2DA);\n mImageViewY = findViewById(R.id.comment_btn_1DA);\n\n imageList.add(mImageViewY);\n imageList.add(mImageView2DA);\n imageList.add(mImageView3DA);\n imageList.add(mImageView4DA);\n imageList.add(mImageView5DA);\n imageList.add(mImageView6DA);\n imageList.add(mImageView1WA);\n\n }", "public FrogImageAnimation(int id, TnUiArgAdapter[] images)\r\n {\r\n super(id);\r\n this.animationImages = new TnUiArgAdapter[images.length];\r\n System.arraycopy(images, 0, animationImages, 0, images.length);\r\n \r\n this.getTnUiArgs().copy(new TnUiArgs());\r\n initDefaultStyle();\r\n }", "public void picLoader() {\n if (num==0){\n image.setImageResource(R.drawable.mario);\n }\n if(num==1){\n image.setImageResource(R.drawable.luigi);\n }\n if(num==2){\n image.setImageResource(R.drawable.peach);\n }\n if(num==3){\n image.setImageResource(R.drawable.rosalina);\n }\n }", "private void setImage() {\n\t\t\n\t\tfor(int i=0; i<user.getIsVisited().length; i++) {\n\t\t\tif(user.getIsVisited()[i])\n\t\t\t\tspots[i].setBackgroundResource(R.drawable.num1_certified + i*2);\n\t\t\telse\n\t\t\t\tspots[i].setBackgroundResource(R.drawable.num1 + i*2);\n\t\t}\n\t}", "private void loadAnimations() {\n loadImageButtonAnimations(imgSharedFacebook, R.anim.activity_finish_fadein);\n loadImageButtonAnimations(imgSharedP2A, R.anim.activity_finish_fadein);\n loadImageButtonAnimations(txtTotalScore, R.anim.activity_finish_fadein);\n }", "public void normalizeImages(){\n\n biegeAlien.setImageResource(R.drawable.alienbeige);\n greenAlien.setImageResource(R.drawable.aliengreen);\n pinkAlien.setImageResource(R.drawable.alienpink);\n blueAlien.setImageResource(R.drawable.alienblue);\n yellowAlien.setImageResource(R.drawable.alienyellow);\n yellowAlien.setBackgroundColor(view.getSolidColor());\n blueAlien.setBackgroundColor(view.getSolidColor());\n greenAlien.setBackgroundColor(view.getSolidColor());\n pinkAlien.setBackgroundColor(view.getSolidColor());\n biegeAlien.setBackgroundColor(view.getSolidColor());\n }", "public void setDataFrom(final ModelAnimationImages otherImages) {\r\n\t\tclear();\r\n\r\n\t\tif (otherImages!=null) {\r\n\t\t\tnames.addAll(otherImages.names);\r\n\t\t\timagesHashes.addAll(otherImages.imagesHashes);\r\n\t\t\timages.addAll(otherImages.images.stream().map(image->copyImage(image)).collect(Collectors.toList()));\r\n\t\t}\r\n\t}", "private void setIcons() {\r\n \t\r\n \tbackground = new ImageIcon(\"images/image_mainmenu.png\").getImage();\r\n \tstart = new ImageIcon(\"images/button_start.png\");\r\n \thowto = new ImageIcon(\"images/button_howtoplay.png\");\r\n \toptions = new ImageIcon(\"images/button_options.png\");\r\n \tlboards = new ImageIcon(\"images/button_lboards.png\");\r\n \texit = new ImageIcon(\"images/button_exit.png\");\t\r\n }", "@Override\n public void updateImages()\n {\n image = ThemeManager.getInstance().getObstacleImage();\n blackedOutImage = ThemeManager.getInstance().getDisabledImage(\"obstacle\");\n }", "@Override\n\tpublic void loadImages() {\n\t\tsuper.setImage((new ImageIcon(\"pacpix/QuestionCandy.png\")).getImage());\t\n\t}", "private void prepareAnimations() {\n scaleTo0Overshot = AnimationUtils.loadAnimation(this, R.anim.scale_100_to_0_anticipate);\n scaleTo0Overshot.setAnimationListener(new Animation.AnimationListener() {\n @Override\n public void onAnimationStart(Animation animation) {\n //do nothing\n }\n\n @Override\n public void onAnimationEnd(Animation animation) {\n fab.setVisibility(View.GONE);\n }\n\n @Override\n public void onAnimationRepeat(Animation animation) {\n //do nothing\n }\n });\n\n scaleTo100Overshot = AnimationUtils.loadAnimation(this, R.anim.scale_0_to_100_overshot);\n scaleTo100Overshot.setAnimationListener(new Animation.AnimationListener() {\n @Override\n public void onAnimationStart(Animation animation) {\n fab.setVisibility(View.VISIBLE);\n }\n\n @Override\n public void onAnimationEnd(Animation animation) {\n //do nothing\n }\n\n @Override\n public void onAnimationRepeat(Animation animation) {\n //do nothing\n }\n });\n }", "public static void clearImages()\n\t{\n\t\tfor(int i=0;i<4;i++)\n\t\t{\n\t\t\tif(i<2)\n\t\t\t{\n\t\t\t\tdealerCardImg[i].setIcon(new ImageIcon(Gameplay.class.getResource(\"/cards/purple_back.png\")));\n\t\t\t\tuserCardImg[i].setIcon(new ImageIcon(Gameplay.class.getResource(\"/cards/purple_back.png\")));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tdealerCardImg[i].setIcon(null);\n\t\t\t\tuserCardImg[i].setIcon(null);\n\t\t\t}\n\t\t}\n\t}", "public void setImages(String images) {\n\t\tthis.images = images;\n\t}", "public void setImages(byte[] images) {\n this.images = images;\n }", "public void playerAnimation(){\r\n \r\n switch (gif) {\r\n case 5:\r\n j= new ImageIcon(getClass().getResource(\"/\" + Character.choosen_char + \"_1.png\"));\r\n img = j.getImage().getScaledInstance(200, 200, Image.SCALE_DEFAULT);\r\n ;\r\n break;\r\n case 15:\r\n j = new ImageIcon(getClass().getResource(\"/\"+ Character.choosen_char + \"_2.png\"));\r\n img = j.getImage().getScaledInstance(200, 200, Image.SCALE_DEFAULT);\r\n break;\r\n case 20:\r\n j = new ImageIcon(getClass().getResource(\"/\"+ Character.choosen_char + \"_3.png\"));\r\n img = j.getImage().getScaledInstance(200, 200, Image.SCALE_DEFAULT);\r\n\r\n break;\r\n case 35:\r\n j = new ImageIcon(getClass().getResource(\"/\" + Character.choosen_char + \"_4.png\"));\r\n img = j.getImage().getScaledInstance(200, 200, Image.SCALE_DEFAULT);\r\n\r\n break;\r\n case 45:\r\n j = new ImageIcon(getClass().getResource(\"/\" + Character.choosen_char + \"_5.png\"));\r\n img = j.getImage().getScaledInstance(200, 200, Image.SCALE_DEFAULT);\r\n\r\n break;\r\n case 55:\r\n j = new ImageIcon(getClass().getResource(\"/\" + Character.choosen_char + \"_6.png\"));\r\n img = j.getImage().getScaledInstance(200, 200, Image.SCALE_DEFAULT);\r\n\r\n break;\r\n case 65:\r\n // j= new ImageIcon(\"D:\\\\Netbeans\\\\Projects\\\\ProjectZ\\\\src\\\\shi_1.png\");\r\n // img = j.getImage().getScaledInstance(200, 200, Image.SCALE_DEFAULT);\r\n // \r\n gif = 0;\r\n break;\r\n default:\r\n break;\r\n }\r\n\r\n }", "public void setIns() {\n\t\tImage p1= null, f1 = null;\n\t\ttry {\n\t\t\tp1 = new Image(new FileInputStream(\"/Users/mingyuliu/eclipse-workspace/ICS4U - Final Project/src/finalProj/P1.png\"));\n\t\t\tf1 = new Image(new FileInputStream(\"/Users/mingyuliu/eclipse-workspace/ICS4U - Final Project/src/finalProj/FORWARD.png\"));\n\t\t} catch (FileNotFoundException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tImageView P1 = new ImageView(p1);\n\t\tP1.setFitHeight(360); \n\t\tP1.setFitWidth(600);\n\t\tImageView F1 = new ImageView(f1);\n\t\tF1.setX(545); \n\t\tF1.setY(305);\n\t\tF1.setFitHeight(50); \n\t\tF1.setFitWidth(50);\n\n\t\tGroup insP1 = new Group(P1, F1);\n\t\tScene scene1 = new Scene(insP1, 600, 360);\n\n\t\tImage p2= null, b2 = null, f2 = null;\n\t\ttry {\n\t\t\tp2 = new Image(new FileInputStream(\"/Users/mingyuliu/eclipse-workspace/ICS4U - Final Project/src/finalProj/P2.png\"));\n\t\t\tb2 = new Image(new FileInputStream(\"/Users/mingyuliu/eclipse-workspace/ICS4U - Final Project/src/finalProj/BACK.png\"));\n\t\t\tf2 = new Image(new FileInputStream(\"/Users/mingyuliu/eclipse-workspace/ICS4U - Final Project/src/finalProj/FORWARD.png\"));\n\t\t} catch (FileNotFoundException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tImageView P2 = new ImageView(p2);\n\t\tP2.setFitHeight(360); \n\t\tP2.setFitWidth(600);\n\t\tImageView B2 = new ImageView(b2);\n\t\tB2.setX(5); \n\t\tB2.setY(305);\n\t\tB2.setFitHeight(50); \n\t\tB2.setFitWidth(50);\n\t\tImageView F2 = new ImageView(f2);\n\t\tF2.setX(545); \n\t\tF2.setY(305);\n\t\tF2.setFitHeight(50); \n\t\tF2.setFitWidth(50);\n\n\t\tGroup insP2 = new Group(P2, F2, B2);\n\t\tScene scene2 = new Scene(insP2, 600, 360);\n\n\t\tImage p3= null, b3 = null, f3 = null;\n\t\ttry {\n\t\t\tp3 = new Image(new FileInputStream(\"/Users/mingyuliu/eclipse-workspace/ICS4U - Final Project/src/finalProj/P3.png\"));\n\t\t\tb3 = new Image(new FileInputStream(\"/Users/mingyuliu/eclipse-workspace/ICS4U - Final Project/src/finalProj/BACK.png\"));\n\t\t\tf3 = new Image(new FileInputStream(\"/Users/mingyuliu/eclipse-workspace/ICS4U - Final Project/src/finalProj/FORWARD.png\"));\n\t\t} catch (FileNotFoundException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tImageView P3 = new ImageView(p3);\n\t\tP3.setFitHeight(360); \n\t\tP3.setFitWidth(600);\n\t\tImageView B3 = new ImageView(b3);\n\t\tB3.setX(5); \n\t\tB3.setY(305);\n\t\tB3.setFitHeight(50); \n\t\tB3.setFitWidth(50);\n\t\tImageView F3 = new ImageView(f3);\n\t\tF3.setX(545); \n\t\tF3.setY(305);\n\t\tF3.setFitHeight(50); \n\t\tF3.setFitWidth(50);\n\n\t\tGroup insP3 = new Group(P3, F3, B3);\n\t\tScene scene3 = new Scene(insP3, 600, 360);\n\n\t\tImage p4= null, b4 = null, f4 = null;\n\t\ttry {\n\t\t\tp4 = new Image(new FileInputStream(\"/Users/mingyuliu/eclipse-workspace/ICS4U - Final Project/src/finalProj/P4.png\"));\n\t\t\tb4 = new Image(new FileInputStream(\"/Users/mingyuliu/eclipse-workspace/ICS4U - Final Project/src/finalProj/BACK.png\"));\n\t\t\tf4 = new Image(new FileInputStream(\"/Users/mingyuliu/eclipse-workspace/ICS4U - Final Project/src/finalProj/FORWARD.png\"));\n\t\t} catch (FileNotFoundException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tImageView P4 = new ImageView(p4);\n\t\tP4.setFitHeight(360); \n\t\tP4.setFitWidth(600);\n\t\tImageView B4 = new ImageView(b4);\n\t\tB4.setX(5); \n\t\tB4.setY(305);\n\t\tB4.setFitHeight(50); \n\t\tB4.setFitWidth(50);\n\t\tImageView F4 = new ImageView(f4);\n\t\tF4.setX(545); \n\t\tF4.setY(305);\n\t\tF4.setFitHeight(50); \n\t\tF4.setFitWidth(50);\n\n\t\tGroup insP4 = new Group(P4, B4, F4);\n\t\tScene scene4 = new Scene(insP4, 600, 360);\n\n\t\tImage p5= null, b5 = null;\n\t\ttry {\n\t\t\tp5 = new Image(new FileInputStream(\"/Users/mingyuliu/eclipse-workspace/ICS4U - Final Project/src/finalProj/P5.png\"));\n\t\t\tb5 = new Image(new FileInputStream(\"/Users/mingyuliu/eclipse-workspace/ICS4U - Final Project/src/finalProj/BACK.png\"));\n\t\t} catch (FileNotFoundException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tImageView P5 = new ImageView(p5);\n\t\tP5.setFitHeight(360); \n\t\tP5.setFitWidth(600);\n\t\tImageView B5 = new ImageView(b5);\n\t\tB5.setX(5); \n\t\tB5.setY(305);\n\t\tB5.setFitHeight(50); \n\t\tB5.setFitWidth(50);\n\n\t\tGroup insP5 = new Group(P5, B5);\n\t\tScene scene5 = new Scene(insP5, 600, 360);\n\n\t\tStage newWindow = new Stage();\n\t\tnewWindow.setTitle(\"Instructions\");\n\t\tnewWindow.setScene(scene1);\n\t\tnewWindow.initModality(Modality.WINDOW_MODAL);\n\t\tnewWindow.initOwner(primaryStage);\n\n\t\tnewWindow.show();\n\n\t\tF1.addEventHandler(MouseEvent.MOUSE_PRESSED, new EventHandler<MouseEvent>() {\n\t\t\tpublic void handle(MouseEvent me) {\n\t\t\t\tnewWindow.setScene(scene2);\n\t\t\t}\n\t\t});\n\t\tB2.addEventHandler(MouseEvent.MOUSE_PRESSED, new EventHandler<MouseEvent>() {\n\t\t\tpublic void handle(MouseEvent me) {\n\t\t\t\tnewWindow.setScene(scene1);\n\t\t\t}\n\t\t});\n\t\tF2.addEventHandler(MouseEvent.MOUSE_PRESSED, new EventHandler<MouseEvent>() {\n\t\t\tpublic void handle(MouseEvent me) {\n\t\t\t\tnewWindow.setScene(scene3);\n\t\t\t}\n\t\t});\n\t\tB3.addEventHandler(MouseEvent.MOUSE_PRESSED, new EventHandler<MouseEvent>() {\n\t\t\tpublic void handle(MouseEvent me) {\n\t\t\t\tnewWindow.setScene(scene2);\n\t\t\t}\n\t\t});\n\t\tF3.addEventHandler(MouseEvent.MOUSE_PRESSED, new EventHandler<MouseEvent>() {\n\t\t\tpublic void handle(MouseEvent me) {\n\t\t\t\tnewWindow.setScene(scene4);\n\t\t\t}\n\t\t});\n\t\tB4.addEventHandler(MouseEvent.MOUSE_PRESSED, new EventHandler<MouseEvent>() {\n\t\t\tpublic void handle(MouseEvent me) {\n\t\t\t\tnewWindow.setScene(scene3);\n\t\t\t}\n\t\t});\n\t\tF4.addEventHandler(MouseEvent.MOUSE_PRESSED, new EventHandler<MouseEvent>() {\n\t\t\tpublic void handle(MouseEvent me) {\n\t\t\t\tnewWindow.setScene(scene5);\n\t\t\t}\n\t\t});\n\t\tB5.addEventHandler(MouseEvent.MOUSE_PRESSED, new EventHandler<MouseEvent>() {\n\t\t\tpublic void handle(MouseEvent me) {\n\t\t\t\tnewWindow.setScene(scene4);\n\t\t\t}\n\t\t});\n\t}", "public void setIcon (playn.core.Image... icons) {\n assert icons.length > 0;\n List<BufferedImage> images = new ArrayList<BufferedImage>();\n for (playn.core.Image icon : icons) images.add(((JavaImage)icon).bufferedImage());\n _frame.setIconImages(images);\n }", "public void onAnimationEnd(Animation animation) {\n image.setImageResource(R.drawable.bauty2);\r\n }", "void setImageProperty() {\n\t\t imgView.setImageResource(R.drawable.weathericon);\n\t\tMatrix matrix = new Matrix();\n\t\trotate += 30;\n\t\tif (rotate == 360) {\n\t\t\trotate = 0;\n\t\t}\n\t\tfloat centerX = imgView.getWidth() / 2;\n\t\tfloat centerY = imgView.getHeight() / 2;\n\t\tmatrix.setRotate(rotate, centerX, centerY);\n\t\t//matrix.setTranslate(10, 20);\n\t\timgView.setImageMatrix(matrix); \n\t\t//ScaleType type = ScaleType.\n\t\t\n\t\t//imgView.setScaleType(scaleType);\n\t \n\t}", "public void set(BufferedImage[] images) {\n checkForLiveOrCompiled();\n\tint depth = ((ImageComponent3DRetained)this.retained).getDepth();\n\n if (depth != images.length)\n throw new IllegalArgumentException(J3dI18N.getString(\"ImageComponent3D1\"));\n for (int i=0; i<depth; i++) {\n ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n }\n }", "private void setPic() {\n int targetW = mainImageView.getWidth();\n int targetH = mainImageView.getHeight();\n\n // Get the dimensions of the bitmap\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n int photoW = bmOptions.outWidth;\n int photoH = bmOptions.outHeight;\n\n // Determine how much to scale down the image\n int scaleFactor = Math.min(photoW/targetW, photoH/targetH);\n\n // Decode the image file into a Bitmap sized to fill the View\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n// bmOptions.inPurgeable = true;\n\n Bitmap bitmap = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n mainImageView.setImageBitmap(bitmap);\n\n// bmOptions.inBitmap = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n// mainImageView.setImageBitmap(bmOptions.inBitmap);\n }", "public Animation(BufferedImage[] images, long millisPerFrame){\n\t\tthis.images=images;\n\t\tthis.millisPerFrame = millisPerFrame;\n\t\tlooping=true;\n\t\tstart();\n\t}", "private void setIcon(){\r\n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"images.png\")));\r\n }", "@Override\n public void setAnim(int nextIn, int nextOut, int quitIn, int quitOut) {\n if (manager != null) {\n manager.setAnim(nextIn, nextOut, quitIn, quitOut);\n }\n }", "public void createImages(){\r\n\t\ttry {\r\n\t\t\timg_bg = Image.createImage(GAME_BG);\r\n\t\t\timg_backBtn = Image.createImage(BACK_BTN);\r\n\t\t\timg_muteBtn = Image.createImage(MUTE_BTN);\r\n\t\t\timg_resetBtn = Image.createImage(RESET_BTN);\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}", "public void setAnimation()\n {\n if(speed<0)\n {\n if(animationCount % 4 == 0)\n animateLeft();\n }\n else\n {\n if(animationCount % 4 == 0)\n animateRight();\n }\n }", "protected void setPic() {\n }", "private void setImage(Image image, double width, double height, int cells) {\n spriteView.setImage(image);\n rect = new Rectangle2D(0, 0, width, height);\n resetView();\n columns = cells;\n int rows = (int) (spriteView.getImage().getHeight() / height);\n count = columns * rows;\n if (currentAnimation != null) {\n pause();\n currentAnimation = null;\n }\n }", "@Override\n\tpublic void setAvatarAnim(Anim anim) {\n\t\t\n\t}", "private void setPic() {\n int targetW = mImageView.getWidth();\n int targetH = mImageView.getHeight();\n\n\t\t/* Get the size of the image */\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n int photoW = bmOptions.outWidth;\n int photoH = bmOptions.outHeight;\n\n\t\t/* Figure out which way needs to be reduced less */\n int scaleFactor = 1;\n if ((targetW > 0) || (targetH > 0)) {\n scaleFactor = Math.min(photoW / targetW, photoH / targetH);\n }\n\n\t\t/* Set bitmap options to scale the image decode target */\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n bmOptions.inPurgeable = true;\n\n\t\t/* Decode the JPEG file into a Bitmap */\n Bitmap bitmap = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n\n\t\t/* Associate the Bitmap to the ImageView */\n mImageView.setImageBitmap(bitmap);\n mTextView.setText(mCurrentPhotoPath);\n\n // SendImage(mCurrentPhotoPath);\n\n // AsyncCallWS task = new AsyncCallWS();\n // Call execute\n // task.execute();\n }", "private void initImages() throws SlickException {\n\t\t// laser images\n\t\tlaserbeamimageN = new Image(\"resources/images_Gameplay/laserBeam_Norm.png\");\n\t\tlaserbeamimageA = new Image(\"resources/images_Gameplay/laserBeam_Add.png\");\n\t\tlasertipimageN = new Image(\"resources/images_Gameplay/laserTip_Norm.png\");\n\t\tlasertipimageA = new Image(\"resources/images_Gameplay/laserTip_Add.png\");\n\t}", "private void loadImages() {\n Glide\n .with(Activity_Game.this)\n .load(R.drawable.game_alien_img)\n .into(game_IMAGE_p1);\n\n Glide\n .with(Activity_Game.this)\n .load(R.drawable.game_predator_img)\n .into(game_IMAGE_p2);\n }", "public void initialiseAvatars() {\n\n\t\timage1 = null;\n\t\timage2 = null;\n\t\timage3 = null;\n\t\timage4 = null;\n\t\timage5 = null;\n\t\timage6 = null;\n\n\t\ttry {\n\t\t\timage1 = new Image(new FileInputStream(\"avatars/avatar1.png\"));\n\t\t\timage2 = new Image(new FileInputStream(\"avatars/avatar2.png\"));\n\t\t\timage3 = new Image(new FileInputStream(\"avatars/avatar3.png\"));\n\t\t\timage4 = new Image(new FileInputStream(\"avatars/avatar4.png\"));\n\t\t\timage5 = new Image(new FileInputStream(\"avatars/avatar5.png\"));\n\t\t\timage6 = new Image(new FileInputStream(\"avatars/avatar6.png\"));\n\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tav1.setImage(image1);\n\t\tav2.setImage(image2);\n\t\tav3.setImage(image3);\n\t\tav4.setImage(image4);\n\t\tav5.setImage(image5);\n\t\tav6.setImage(image6);\n\n\t}", "void setImage(BufferedImage i);", "private void loadImages() {\n\t\ttry {\n\t\t\timage = ImageIO.read(Pillar.class.getResource(\"/Items/Pillar.png\"));\n\t\t\tscaledImage = image;\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Failed to read Pillar image file: \" + e.getMessage());\n\t\t}\n\t}", "public BoundedAnimation(String filePrefix, int frameCount) {\n images = new ArrayList<Image>();\n for (int i=1; i<frameCount+1; i++) {\n //System.out.Println(filePrefix + \"_\" + i);\n ImageIcon ii = new ImageIcon(filePrefix + \"_\" + i + \".png\");\n images.add(ii.getImage());\n }\n }", "private void setImageSizeForAllImages() {\n phoneIcon.setFitWidth(ICON_WIDTH);\n phoneIcon.setFitHeight(ICON_HEIGHT);\n\n addressIcon.setFitWidth(ICON_WIDTH);\n addressIcon.setFitHeight(ICON_HEIGHT);\n\n emailIcon.setFitWidth(ICON_WIDTH);\n emailIcon.setFitHeight(ICON_HEIGHT);\n\n groupIcon.setFitWidth(ICON_WIDTH);\n groupIcon.setFitHeight(ICON_HEIGHT);\n\n prefIcon.setFitWidth(ICON_WIDTH);\n prefIcon.setFitHeight(ICON_HEIGHT);\n }", "private void setInitialAnim()\n {\n \n \n if(level.playerFacing == Direction.LEFT)\n {\t\n \tcurrentAnim = leftWalk;\n }\n else\n {\n \tcurrentAnim = rightWalk;\n }\n \n Image i = currentAnim.getCurrentFrame();\n width = i.getWidth();\n height = i.getHeight();\n }", "public static void loadImages() {\n PonySprite.loadImages(imgKey, \"graphics/ponies/GrannySmith.png\");\n }", "private void loadImages(){\n try{\n System.out.println(System.getProperty(\"user.dir\"));\n\n t1img = read(new File(\"resources/tank1.png\"));\n t2img = read(new File(\"resources/tank1.png\"));\n backgroundImg = read(new File(\"resources/background.jpg\"));\n wall1 = read(new File(\"resources/Wall1.gif\"));\n wall2 = read(new File(\"resources/Wall2.gif\"));\n heart = resize(read(new File(\"resources/Hearts/basic/heart.png\")), 35,35);\n heart2 = resize(read( new File(\"resources/Hearts/basic/heart.png\")), 25,25);\n bullet1 = read(new File(\"resources/bullet1.png\"));\n bullet2 = read(new File(\"resources/bullet2.png\"));\n\n }\n catch(IOException e){\n System.out.println(e.getMessage());\n }\n }", "void setPlayerImages(String playerName) {\n if (playerName.equals(\"player\")) {\n List<Image> images = diceImage.getImageList(player1.getColor(), player1.getLastRoll()); // dice face images corresponding to the player rolls.\n playerDice1.setImage(images.get(0));\n playerDice2.setImage(images.get(1));\n playerDice3.setImage(images.get(2));\n } else {\n List<Image> images = diceImage.getImageList(computer.getColor(), computer.getLastRoll());\n computerDice1.setImage(images.get(0));\n computerDice2.setImage(images.get(1));\n computerDice3.setImage(images.get(2));\n }\n }", "private void setPic() {\n int targetW = mImageView.getWidth();\n int targetH = mImageView.getHeight();\n\n // Get the dimensions of the bitmap\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n int photoW = bmOptions.outWidth;\n int photoH = bmOptions.outHeight;\n\n // Determine how much to scale down the image\n int scaleFactor = Math.min(photoW / targetW, photoH / targetH);\n\n // Decode the image file into a Bitmap sized to fill the View\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n bmOptions.inPurgeable = true;\n bitmap = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n\n// Bitmap bitmap = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n mImageView.setImageBitmap(bitmap);\n }", "@Override\n\tpublic void loadStateImages() {\n\t\tif (imageFilename[0][0] != null)\n\t\t\tthis.addStateImage(imageFilename[0][0], 0, 0);\n\t\tif (imageFilename[0][1] != null)\n\t\t\tthis.addStateImage(imageFilename[0][1], 1, 0);\n\t\tif (imageFilename[1][0] != null)\n\t\t\tthis.addStateImage(imageFilename[1][0], 0, 1);\n\t\tif (imageFilename[1][1] != null)\n\t\t\tthis.addStateImage(imageFilename[1][1], 1, 1);\n\t}", "public void resetImages() {\n \timages[TOP].setOnClickListener(null);\n \timages[BOTTOM].setOnClickListener(null);\n \timages[TOP].setOnLongClickListener(null);\n \timages[BOTTOM].setOnLongClickListener(null);\n\t\tshowDialog(PROGRESS_DIALOG);\n }", "private Images() {\n \n imgView = new ImageIcon(this,\"images/View\");\n\n imgUndo = new ImageIcon(this,\"images/Undo\");\n imgRedo = new ImageIcon(this,\"images/Redo\");\n \n imgCut = new ImageIcon(this,\"images/Cut\");\n imgCopy = new ImageIcon(this,\"images/Copy\");\n imgPaste = new ImageIcon(this,\"images/Paste\");\n \n imgAdd = new ImageIcon(this,\"images/Add\");\n \n imgNew = new ImageIcon(this,\"images/New\");\n imgDel = new ImageIcon(this,\"images/Delete\");\n \n imgShare = new ImageIcon(this,\"images/Share\");\n }", "public void animate(){\n\n if (ra1.hasStarted() && ra2.hasStarted()) {\n\n// animation1.cancel();\n// animation1.reset();\n// animation2.cancel();\n// animation2.reset();\n gear1Img.clearAnimation();\n gear2Img.clearAnimation();\n initializeAnimations(); // Necessary to restart an animation\n button.setText(R.string.start_gears);\n }\n else{\n gear1Img.startAnimation(ra1);\n gear2Img.startAnimation(ra2);\n button.setText(R.string.stop_gears);\n }\n }", "public void act() \n {\n setImage(\"1up.png\");\n setImage(\"acrate.png\");\n setImage(\"Betacactus.png\");\n setImage(\"bullet1.png\");\n setImage(\"bullet2.png\");\n setImage(\"burst.png\");\n setImage(\"cowboy.png\");\n setImage(\"fOxen1.png\");\n setImage(\"fOxen2.png\");\n setImage(\"fOxen3.png\");\n setImage(\"fOxen4.png\");\n setImage(\"fOxenH.png\");\n setImage(\"fWagon1.png\");\n setImage(\"fWagon2.png\");\n setImage(\"fWagon3.png\");\n setImage(\"fWagon4.png\");\n setImage(\"fWagonH.png\");\n setImage(\"health.png\");\n setImage(\"indian.png\");\n setImage(\"normal.png\");\n setImage(\"oxen.png\");\n setImage(\"oxen2.png\");\n setImage(\"oxen3.png\");\n setImage(\"oxen4.png\");\n setImage(\"oxen-hit.png\");\n setImage(\"plasma.png\");\n setImage(\"rapid.png\");\n setImage(\"snake1.png\");\n setImage(\"snake2.png\");\n setImage(\"snake3.png\");\n setImage(\"snake4.png\");\n setImage(\"spread.png\");\n setImage(\"theif.png\");\n setImage(\"train1.png\");\n setImage(\"train-hit.png\");\n setImage(\"wagon.png\");\n setImage(\"wagonhit.png\");\n setImage(\"wave.png\");\n getWorld().removeObject(this);\n }", "public void runEnterAnimation() {\n final long duration = (long) (ANIM_DURATION * PenndotApplication.sAnimatorScale);\n\n // Set starting values for properties we're going to animate. These\n // values scale and position the full size version down to the thumbnail\n // size/location, from which we'll animate it back up\n mImageView.setPivotX(0);\n mImageView.setPivotY(0);\n mImageView.setScaleX(mWidthScale);\n mImageView.setScaleY(mHeightScale);\n mImageView.setTranslationX(mLeftDelta);\n mImageView.setTranslationY(mTopDelta);\n\n // We'll fade the text in later\n mTextView.setAlpha(0);\n\n // Animate scale and translation to go from thumbnail to full size\n mImageView.animate().setDuration(duration).scaleX(1).scaleY(1).translationX(0)\n .translationY(0).setInterpolator(sDecelerator).withEndAction(new Runnable() {\n public void run() {\n // Animate the description in after the image animation\n // is done. Slide and fade the text in from underneath\n // the picture.\n mTextView.setTranslationY(-mTextView.getHeight());\n mTextView.animate().setDuration(duration / 2).translationY(0).alpha(1)\n .setInterpolator(sDecelerator);\n }\n });\n // Fade in the black background\n ObjectAnimator bgAnim = ObjectAnimator.ofInt(mBackground, \"alpha\", 0, 255);\n bgAnim.setDuration(duration);\n bgAnim.start();\n\n // Animate a color filter to take the image from grayscale to full\n // color.\n // This happens in parallel with the image scaling and moving into\n // place.\n ObjectAnimator colorizer = ObjectAnimator.ofFloat(FullImageActivity.this, \"saturation\", 0,\n 1);\n colorizer.setDuration(duration);\n colorizer.start();\n\n // Animate a drop-shadow of the image\n // ObjectAnimator shadowAnim = ObjectAnimator.ofFloat(mShadowLayout,\n // \"shadowDepth\", 0, 1);\n // shadowAnim.setDuration(duration);\n // shadowAnim.start();\n }", "protected void carregaImagens() {\n Handler carregaImagensHandler = new Handler();\n\n // Envia a Runnable ao Handler simulando um carregamento assincrono depois de 1 segundo\n carregaImagensHandler.postDelayed(new Runnable() {\n public void run() {\n // Carregando primeira imagem\n ImageView altaIV = findViewById(R.id.iv_alta);\n altaIV.setImageResource(R.drawable.android_verde);\n\n // Carregando primeira imagem\n ImageView baixaIV = findViewById(R.id.iv_baixa);\n baixaIV.setImageResource(R.drawable.android_preto);\n }\n }, 1000);\n }", "private void setupWindowsAnimations() {\n }", "private void setPic() {\n int targetW = imageIV.getWidth();\n int targetH = imageIV.getHeight();\n\n // Get the dimensions of the bitmap\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n int photoW = bmOptions.outWidth;\n int photoH = bmOptions.outHeight;\n\n // Determine how much to scale down the image\n int scaleFactor = Math.min(photoW/targetW, photoH/targetH);\n\n // Decode the image file into a Bitmap sized to fill the View\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n bmOptions.inPurgeable = true;\n\n Bitmap bitmap = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n imageIV.setImageBitmap(bitmap);\n }", "private void loadImages(BufferedImage[] images, String direction) {\n for (int i = 0; i < images.length; i++) {\n String fileName = direction + (i + 1);\n images[i] = GameManager.getResources().getMonsterImages().get(\n fileName);\n }\n\n }", "public void set(RenderedImage[] images) {\n\n checkForLiveOrCompiled();\n\tint depth = ((ImageComponent3DRetained)this.retained).getDepth();\n\n if (depth != images.length)\n\t throw new IllegalArgumentException(J3dI18N.getString(\"ImageComponent3D1\"));\n for (int i=0; i<depth; i++) {\n ((ImageComponent3DRetained)this.retained).set(i, images[i]);\n }\n }", "private void setCaptureButtonImages()\n\t{\n\t\tif(m_CaptureButtons == null)\n\t\t\treturn;\n\t\tCameraActivity camaraActivity = this.getCameraActivity();\n\t\tif(!Handle.isValid(m_CaptureButtonBgHandle))\n\t\t\tm_CaptureButtonBgHandle = m_CaptureButtons.setPrimaryButtonBackground(camaraActivity.getDrawable(R.drawable.capture_button_slow_motion_border), 0);\n\t\tif(!Handle.isValid(m_CaptureButtonIconHandle))\n\t\t\tm_CaptureButtonIconHandle = m_CaptureButtons.setPrimaryButtonIcon(camaraActivity.getDrawable(R.drawable.capture_button_slow_motion_icon), 0);\n\t}", "private void setPic() {\n int targetW = imageView.getWidth();\n int targetH = imageView.getHeight();\n\n // Get the dimensions of the bitmap\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n int photoW = bmOptions.outWidth;\n int photoH = bmOptions.outHeight;\n\n // Determine how much to scale down the image\n int scaleFactor = Math.min(photoW/targetW, photoH/targetH);\n\n // Decode the image file into a Bitmap sized to fill the View\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n bmOptions.inPurgeable = true;\n\n Bitmap bitmap = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n imageView.setImageBitmap(bitmap);\n imageView.invalidate();\n }", "private void loadImages() {\n\t\t\n\t\tImageView playerImage1;\n\t\tImageView playerImage2;\n Bitmap selectedPicture;\n \n\t\tplayerImage1 = (ImageView)findViewById(R.id.player_image_1);\n\t\tplayerImage2 = (ImageView)findViewById(R.id.player_image_2);\n\t\t\n\t\tif (playerUri1 != null) {\n\t \n\t try {\n\t selectedPicture = MediaStore.Images.Media.getBitmap(\n\tthis.getContentResolver(),playerUri1);\n\t playerImage1.setImageBitmap(selectedPicture);\n\t } catch (Exception e) {\n\t \tLog.e(DISPLAY_SERVICE, \"Pic not displaying\");\n\t \tfinish();\n\t }\n\t\t} else {\n\t\t\tplayerImage1.setImageResource(R.drawable.red);\n\t\t}\n \n\t\tif (playerUri2 != null) {\t \n\t try {\n\t selectedPicture = MediaStore.Images.Media.getBitmap(\n\tthis.getContentResolver(),playerUri2);\n\t playerImage2.setImageBitmap(selectedPicture);\n\t } catch (Exception e) {\n\t \tLog.e(DISPLAY_SERVICE, \"Pic not displaying\");\n\t \tfinish(); \n\t }\n\t\t} else {\n\t\t\tplayerImage2.setImageResource(R.drawable.green);\n\t\t}\n\t}", "public void setImg(String mapSelect){\n\t\ttry {\n\t\t if (mapSelect.equals(\"map01.txt\")){\n\t\t\timg = ImageIO.read(new File(\"space.jpg\"));\n\t\t\timg2 = ImageIO.read(new File(\"metal.png\"));\n\n\t\t }\t\n\t\t if (mapSelect.equals(\"map02.txt\")){\n\t\t\t\timg = ImageIO.read(new File(\"forest.jpg\"));\n\t\t\t\timg2 = ImageIO.read(new File(\"leaf.png\"));\n\t\t\t\timg3 = ImageIO.read(new File(\"log.png\"));\n\t\t }\n\t\t if (mapSelect.equals(\"map03.txt\")){\n\t\t\t\timg = ImageIO.read(new File(\"spinx.jpg\"));\n\t\t\t\timg2 = ImageIO.read(new File(\"pyramid.png\"));\n\t\t\t\timg3 = ImageIO.read(new File(\"sandy.png\"));\n\t\t\t\t\n\t\t }\n\t\t if (mapSelect.equals(\"map04.txt\")){\n\t\t\t\timg = ImageIO.read(new File(\"doublebg.png\"));\n\t\t\t\timg2 = ImageIO.read(new File(\"cloud.png\"));\n\t\t\t\t\n\t\t }\n\t\t\t\n\t\t}\n\t\t catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\t\n\t\t}\n\t}", "@Override\n public void onChanged(@Nullable final List<Image> images) {\n adapter.setImages(images);\n }", "public void updateImage() {\n Graphics2D g = img.createGraphics();\n for (Circle gene : genes) {\n gene.paint(g);\n }\n g.dispose();\n }", "public void setImg() {\n\t\tif (custom) {\n\t\t\tImage img1;\n\t\t\ttry {\n\t\t\t\timg1 = new Image(new FileInputStream(\"tmpImg.png\"));\n\t\t\t\tmainAvatar.setImage(img1); // Sets main user avatar as the custom image\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "private void initTabImage() {\n firstImage.setImageResource(R.drawable.home);\n secondImage.setImageResource(R.drawable.profile);\n// thirdImage.setImageResource(R.drawable.addcontent);\n fourthImage.setImageResource(R.drawable.channels);\n fifthImage.setImageResource(R.drawable.search);\n }", "public void init() {\n\t\t// Image init\n\t\tcharacter_static = MainClass.getImage(\"\\\\data\\\\character.png\");\n\t\tcharacter_static2 = MainClass.getImage(\"\\\\data\\\\character2.png\");\n\t\tcharacter_static3 = MainClass.getImage(\"\\\\data\\\\character3.png\");\n\t\t\n\t\tcharacterCover = MainClass.getImage(\"\\\\data\\\\cover.png\");\n\t\tcharacterJumped = MainClass.getImage(\"\\\\data\\\\jumped.png\");\n\t\t\n\t\t// Animated when static.\n\t\tthis.addFrame(character_static, 2000);\n\t\tthis.addFrame(character_static2, 50);\n\t\tthis.addFrame(character_static3, 100);\n\t\tthis.addFrame(character_static2, 50);\n\t\t\n\t\tthis.currentImage = super.getCurrentImage();\n\t}", "private void AnimateandSlideShow() {\n\n\t\tslidingimage = (ImageView) findViewById(R.id.ImageView3_Left);\n\t\t// Log.i(\"bitarray\", Integer.toString(bit_array.length));\n\t\tslidingimage.setImageBitmap(bit_array[currentimageindex\n\t\t\t\t% bit_array.length]);\n\n\t\tcurrentimageindex++;\n\n\t\tAnimation rotateimage = AnimationUtils.loadAnimation(this,\n\t\t\t\tR.anim.custom_anim);\n\n\t\tslidingimage.startAnimation(rotateimage);\n\n\t}", "public void setImage(Image itemImg) \n {\n img = itemImg;\n }", "void setAnimation(Animation animation) {\n prevHeight = spriteHeight;\n currAnimation = animation;\n spriteWidth = animation.getSpriteWidth();\n spriteHeight = animation.getSpriteHeight();\n }", "public void initialize()\r\n {\r\n ceresImage = new Image(\"Ceres.png\");\r\n erisImage = new Image(\"Eris.png\");\r\n haumeaImage = new Image(\"Haumea.png\");\r\n makemakeImage = new Image(\"MakeMake.png\");\r\n plutoImage = new Image(\"Pluto.png\");\r\n }", "public void setImage(BufferedImage i) {\n // Paint image object\n paint = true;\n image = i;\n this.repaint();\n }", "private void processImages(List<String> images) {\n setTitle(\"Showing images\");\n mImages = images;\n setListAdapter(new ImagesAdapter());\n }", "private void initializeAnimations(){\n final int DELAY = 1000;\n\n ra1 = new RotateAnimation(gear1.getStartDegree(), gear1.getEndDegree(), Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);\n ra1.setDuration(DELAY);\n ra1.setRepeatMode(Animation.RESTART);\n ra1.setRepeatCount(Animation.INFINITE);\n ra1.setFillAfter(true);\n\n ra2 = new RotateAnimation(gear2.getStartDegree(), gear2.getEndDegree(), Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);\n ra2.setDuration(DELAY);\n ra2.setRepeatMode(Animation.RESTART);\n ra2.setRepeatCount(Animation.INFINITE);\n ra2.setFillAfter(true);\n }", "public void imageSwap() {\n GreenfootImage image = (movement.dx < 1) ? leftImage : rightImage;\n setImage(image);\n }" ]
[ "0.73437124", "0.7041505", "0.68528175", "0.68008214", "0.679574", "0.6683864", "0.6676956", "0.6643064", "0.6640019", "0.6557388", "0.6536329", "0.650344", "0.6501328", "0.64804476", "0.64396703", "0.64287055", "0.63977325", "0.63760597", "0.63455814", "0.6337175", "0.6331578", "0.63070315", "0.6289794", "0.62725437", "0.624352", "0.6240592", "0.6231587", "0.6223941", "0.6209756", "0.6198319", "0.61896545", "0.61751986", "0.6174549", "0.6164516", "0.6158277", "0.6121214", "0.6111726", "0.6103581", "0.6084604", "0.60836136", "0.60773265", "0.6073878", "0.60718656", "0.60688037", "0.60683936", "0.6050947", "0.6042785", "0.60404754", "0.6017976", "0.6017388", "0.60120004", "0.6011849", "0.6010751", "0.6009895", "0.5996937", "0.5990853", "0.5980503", "0.59785295", "0.5971179", "0.59491587", "0.5946369", "0.5922229", "0.59210443", "0.59144443", "0.59058535", "0.58996433", "0.5898466", "0.58923817", "0.5882693", "0.5877971", "0.58658355", "0.5864877", "0.58498853", "0.5849319", "0.5845783", "0.5842748", "0.5827152", "0.58134246", "0.5812817", "0.58105415", "0.58068514", "0.5804521", "0.57975006", "0.5797072", "0.57953113", "0.5789313", "0.57842416", "0.57801247", "0.5780051", "0.57729363", "0.5763392", "0.5754545", "0.57506585", "0.57447416", "0.5732682", "0.573186", "0.573003", "0.57274973", "0.57205206", "0.5714023" ]
0.71354777
1
Set how long time it shall be between each image
public void setDelay(long d){delay = d;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public void modifyImage(long dt, long curTime, BufferedImage image) ;", "public void setImages(Bitmap[] images){\n this.images=images;\n currentFrame=0;\n startTime=System.nanoTime();\n }", "public void tick() {\n long elapsed = (System.nanoTime()-startTime)/1000000;\n\n if(elapsed>delay) {\n currentFrame++;\n startTime = System.nanoTime();\n }\n if(currentFrame == images.length){\n currentFrame = 0;\n }\n }", "public Animation(BufferedImage[] images, long millisPerFrame){\n\t\tthis.images=images;\n\t\tthis.millisPerFrame = millisPerFrame;\n\t\tlooping=true;\n\t\tstart();\n\t}", "public void tick(){\n\t\ttimer += System.currentTimeMillis() - lastTime;\n\t\tif(timer > speed){\n\t\t\tcurrent = image.next();\n\t\t\ttimer = 0;\n\t\t}\n\t\tlastTime = System.currentTimeMillis();\n\t}", "public void init() {\n\t\tSystem.out.println(\"Started \" + duration + \" minute timer.\");\n\t\tTimer timer = new Timer();\n\t\ttimer.scheduleAtFixedRate(new TimerTask() {\n\t\t\tpublic void run() {\n\t\t\t\tif(!images.isEmpty()) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tch.change(images.poll().getFile().getAbsolutePath());\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"Changed wallpaper\");\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"Out of wallpapers, program exiting.\");\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}\n\t\t}, 0, duration * 60 * 1000);\n\t}", "public static void setImageLoadingTimeout(long newTimeout) {\n ImageLoader.setTimeout(newTimeout);\n }", "public void setTime (View timeView) throws IOException {\n ImageView nowTime = (ImageView)findViewById(R.id.theTime);\n\n if (threeMinutes) {\n threeMinutes=false;\n nowTime.setImageResource(R.drawable.m1);\n } else {\n threeMinutes=true;\n nowTime.setImageResource(R.drawable.m3);\n }\n\n }", "@Override\n public void secondTick(int ms) {\n if (this.interactionTimeout == 0) {\n this.image = image_on;\n }\n super.secondTick(ms);\n }", "public void setAnimationFrameTime(int milis) {\r\n animationFrameTime = milis; \r\n timer = new Timer(animationFrameTime, this);\r\n }", "public void trackTime()\n {\n frames += 1;\n\n // Every second (roughly) reduce the time left\n if (frames % 60 == 0)\n {\n time += 1;\n showTime();\n }\n }", "void setTime(){\n gTime += ((float)millis()/1000 - millisOld)*(gSpeed/4);\n if(gTime >= 4) gTime = 0;\n millisOld = (float)millis()/1000;\n }", "public void setVideoJittcomp(int milliseconds);", "@Override\r\n\t\t\t\tpublic void run() {\n\t\t\t\t\tdimensionclip2.start(); // 두번째 효과음 재생\r\n\t\t\t\t\tTimer thirdeffect = new Timer();\r\n\t\t\t\t\tTimerTask thirdeffecttask = new TimerTask() {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\t\tdimensionclip3.start();\r\n\t\t\t\t\t\t\tTimer fourtheffect = new Timer();\r\n\t\t\t\t\t\t\tTimerTask fourtheffecttask = new TimerTask() {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\t\t\t\tdimensionclip4.start();\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\tfourtheffect.schedule(fourtheffecttask, 1300);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t};\r\n\t\t\t\t\tthirdeffect.schedule(thirdeffecttask, 1400);\r\n\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onFinish(long time) {\n\t\t\t\t\t\ttextView.append(\"get \" + testPicNum + \" pictures: use \" + time + \"ms\" + \"\\n\");\t\n\t\t\t\t\t}", "private void switchTimeBase()\n {\n currentFrame.size = 0L;\n currentFrame.completeTimeMs = -1L;\n currentFrame.timestamp = -1L;\n prevFrame.copy(currentFrame);\n }", "public void setTimeout (double seconds) {\n multiPathTimeout = seconds;\n }", "private void changeDelay() {\n delay = ((int) (Math.random() * 10000) + 1000) / MAX_FRAMES;\n }", "public void updateTimerDisplay(){\n int seconds = timeCounter / 60;\n setImage(new GreenfootImage(\"Time: \"+timeElapsed + \": \" + seconds, 24, Color.BLACK, Color.WHITE));\n }", "private void updateTime() {\n timer.update();\n frametime = timer.getTimePerFrame();\n }", "public void setStaticPictureFps(float fps);", "@Test\n\tpublic void testStartTiming() {\n\t\tip = new ImagePlus();\n\t\tip.startTiming();\n\t}", "public void setWait(int time)\n\t{\n\t\tthis.dx = 1;\n\t\tthis.dy = 1;\n\t\tthis.time = time;\n\t\t//run();\n\t}", "private void idleAnimation(){\n timer++;\n if( timer > 4 ){\n setImage(loadTexture());\n animIndex++;\n timer= 0;\n if(animIndex > maxAnimIndex ){\n animIndex = 0;\n }\n }\n }", "static void setTiming(){\n killTime=(Pars.txType!=0) ? Pars.txSt+Pars.txDur+60 : Pars.collectTimesB[2]+Pars.dataTime[1]+60;//time to kill simulation\n tracksTime=(Pars.tracks && Pars.txType==0) ? Pars.collectTimesI[1]:(Pars.tracks)? Pars.collectTimesBTx[1]:100*24*60;//time to record tracks\n }", "protected void setupTime() {\n this.start = System.currentTimeMillis();\n }", "void takeBefore(){\n beforeTimeNs=System.nanoTime();\n }", "public void slowDownProcess() {\n\n for (int i = 0; i < arrayList.size(); i++) {\n arrayList.get(i).gifImageView.setImageDrawable(null);\n }\n try {\n Thread.sleep(100);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n for (int i = 0; i < arrayList.size(); i++) {\n arrayList.get(i).display();\n }\n }", "@Override\n public void run() {\n long seconds = millisUntilFinished / 1000;\n long minutes = seconds / 60;\n\n String time = minutes % 60 + \":\" + seconds % 60;\n// double timeInDouble = Double.parseDouble(time);\n if(minutes >= 0 && seconds >= 0)holder.setText(time);\n else holder.setText(\"Task Completed\");\n\n millisUntilFinished -= 1000;\n\n Log.d(\"DEV123\",time);\n// imageView.setX(imageView.getX()+seconds);\n /* and here comes the \"trick\" */\n handler.postDelayed(this, 1000);\n }", "public void randomAuto() {\r\n\r\n Bitmap imageViewBitmap = _imageView.getDrawingCache();\r\n //if the bitmap is null, don't do anything\r\n if (imageViewBitmap == null) {\r\n return;\r\n }\r\n for(int i = 0; i < 1000; i++){\r\n randHelper();\r\n }\r\n invalidate();\r\n }", "@Override\r\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\tdimensionclip3.start();\r\n\t\t\t\t\t\t\tTimer fourtheffect = new Timer();\r\n\t\t\t\t\t\t\tTimerTask fourtheffecttask = new TimerTask() {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\t\t\t\tdimensionclip4.start();\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\tfourtheffect.schedule(fourtheffecttask, 1300);\r\n\t\t\t\t\t\t}", "public void run() {\nif(i[0] ==le.size()){\n i[0]=0;}\n File file = new File(\"/var/www/html/PawsAndClaws/web/bundles/uploads/brochures/\" + le.get( i[0]).getBrochure());\n\n Image it = new Image(file.toURI().toString(), 500, 310, false, false);\n eventspicture.setImage(it);\n i[0]++;\n }", "@Override\n public void run() {\n ElapsedTime time = new ElapsedTime();\n time.reset();\n while (!sh.liftReady && time.milliseconds() < 1500) {\n }\n //\n sh.pivotPID(650, true, .07/650, .01, .01/650, 2);\n sh.pivotPID(640, false, .07/640, .01, .01/640, 2);\n\n\n\n }", "void setSamplingIntervalMs(long ms);", "private void setTimer(){\n\n //initialize the time variable\n int time = 10;\n\n //calculate the totaltime\n totalTimeCountInMilliseconds = time * 1000;\n\n //set the maximum time of the progress bar timer\n mProgressBar1.setMax( time * 1000);\n }", "public void step() {\n \tinternaltime ++;\n \n }", "private void stepTiming() {\n\t\tdouble currTime = System.currentTimeMillis();\n\t\tstepCounter++;\n\t\t// if it's been a second, compute frames-per-second\n\t\tif (currTime - lastStepTime > 1000.0) {\n\t\t\tdouble fps = (double) stepCounter * 1000.0\n\t\t\t\t\t/ (currTime - lastStepTime);\n\t\t\t// System.err.println(\"FPS: \" + fps);\n\t\t\tstepCounter = 0;\n\t\t\tlastStepTime = currTime;\n\t\t}\n\t}", "@AfterEach\n public void setTimeInterval() {\n try {\n TimeUnit.SECONDS.sleep(Long.valueOf(settings.getTimeInterval()));\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "protected void runEachSecond() {\n \n }", "void setSamplingTaskRunIntervalMs(long ms);", "public void increaseTimescale() {\n\t\ttimeScaler = timeScaler>=5 ? 5 : timeScaler + TIMESCLALER_FACTOR;\n\t}", "public void setSit_time(int time)\n\t{\n\t\tsit_time = time - enter_time;\t\n\t}", "public native void setDelay(int delay) throws MagickException;", "void delayForDesiredFPS(){\n delayMs=(int)Math.round(desiredPeriodMs-(float)getLastDtNs()/1000000);\n if(delayMs<0) delayMs=1;\n try {Thread.currentThread().sleep(delayMs);} catch (java.lang.InterruptedException e) {}\n }", "public void act() \n {\n if(images != null)\n {\n if(animationState == AnimationState.ANIMATING)\n {\n if(animationCounter++ > delay)\n {\n animationCounter = 0;\n currentImage = (currentImage + 1) % images.length;\n setImage(images[currentImage]);\n }\n }\n else if(animationState == AnimationState.SPECIAL)\n {\n setImage(specialImage);\n }\n else if(animationState == AnimationState.RESTING)\n {\n animationState = AnimationState.FROZEN;\n animationCounter = 0;\n currentImage = 0;\n setImage(images[currentImage]);\n }\n }\n }", "void takeAfter(){\n afterTimeNs=System.nanoTime();\n lastdt=afterTimeNs-beforeTimeNs;\n samplesNs[index++]=afterTimeNs-lastAfterTime;\n lastAfterTime=afterTimeNs;\n if(index>=nSamples) index=0;\n }", "protected void speedRefresh() {\r\n\t\t\ttStartTime = System.currentTimeMillis();\r\n\t\t\ttDownloaded = 0;\r\n\t\t}", "public void setDelay(double clock);", "@Override\r\n public void setTimeouts()\r\n {\n\r\n }", "public Animation(BufferedImage[] images, long millisPerFrame, boolean looping){\n\t\tthis(images,millisPerFrame);\n\t\tthis.looping = looping;\n\t}", "public static long getImageLoadingTimeout() {\n return ImageLoader.getTimeout();\n }", "void setVoteFinalizeDelaySeconds(long voteFinalizeDelaySeconds);", "public abstract void setSecondsPerUpdate(float secs);", "private void waitFPS() {\n try {\n Thread.sleep((int) (1000.0f / 60.0f));\n } catch (InterruptedException e) {\n logger.error(\"Unable to wait some milli's !\", e);\n }\n }", "@Override\r\n public void timePassed() {\r\n }", "void updateIdleTime(int T);", "void setTime(final int time);", "public void teleopPeriodic() \n {\n // NIVision.Rect rect = new NIVision.Rect(10, 10, 100, 100);\n /*\n NIVision.IMAQdxGrab(session, frame, 1);\n //NIVision.imaqDrawShapeOnImage(frame, frame, rect,\n // DrawMode.DRAW_VALUE, ShapeMode.SHAPE_OVAL, 0.0f);\n */\n \n //cam.getImage(frame);\n //camServer.setImage(frame);\n \n //CameraServer.getInstance().setImage(frame);\n \n if(verticalLift.limitSwitchHit())\n verticalLift.resetEnc();\n \n Scheduler.getInstance().run();\n }", "private void m4810f() {\n long startTime = System.currentTimeMillis();\n if (startTime - this.f3855m < this.f3854l) {\n try {\n Thread.sleep((this.f3854l - startTime) + this.f3855m);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n this.f3855m = System.currentTimeMillis();\n synchronized (sBitmap) {\n sByteBuffer.clear();\n sBitmap.copyPixelsToBuffer(sByteBuffer);\n }\n }", "public void setTime(int t){\r\n\t\t\t\ttime = t;\r\n\t\t\t}", "@Override\r\n\tpublic void motion() {\r\n\t\tframeCount = frameCount== IMAGE_RATE*getImages().size() ? 1 : frameCount+1; \t//count the frames\r\n\r\n\t\tif(frameCount%IMAGE_RATE == 0 || isDirectionChanged() ) {\r\n\t\t\tsetDirectionChanged(false);\r\n\r\n\t\t\tif(isLeft()) {\r\n\t\t\t\tif(imgIndex < getImages().size()/2)\r\n\t\t\t\t\timgIndex =+ getImages().size()/2;\t\t\t\t\t\t\t\t\t\t\t\t\t//Set left Images [4,5,6,7]\r\n\t\t\t\telse\r\n\t\t\t\t\timgIndex = imgIndex == getImages().size()-1 ? getImages().size()/2 : imgIndex+1; \t//if index == list.size() -1 than index will be list.size()/2\r\n\t\t\t}else {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//otherwise it will increment by 1\r\n\t\t\t\tif(imgIndex >= getImages().size()/2) \r\n\t\t\t\t\timgIndex -= 4;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Set right Images [0,1,2,3]\r\n\t\t\t\telse\r\n\t\t\t\t\timgIndex = imgIndex == getImages().size()/2 -1 ? 0 : imgIndex+1; \t\t\t\t\t//if index == list.size()/2 -1 than index will be 0\r\n\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//otherwise it will increment by 1\r\n\r\n\t\t\tsetImage(getImages().get(imgIndex));\r\n\t\t}\r\n\t}", "public void setTime(long elapseTime) {\r\n\t\tsecond = (elapseTime / 1000) % 60;\r\n\t\tminute = (elapseTime / 1000) / 60 % 60;\r\n\t\thour = ((elapseTime / 1000) / 3600) % 24;\t\r\n\t}", "@Override\n public void timePassed() {\n }", "public void setTimer() {\n\t\t\n\t}", "public void setTime(){\r\n \r\n }", "@Override\n public void run() {\n if (timeToTakePhoto <= 0) {\n sendNotification();\n timeToTakePhoto = finalTimeToTakePhoto;\n } else {\n timeToTakePhoto -= 1000;\n }\n h.postDelayed(this, 1000);\n }", "public static void dormir(long milis)\r\n\t{\r\n\t\tlong inicial=System.currentTimeMillis();\r\n\t\twhile(System.currentTimeMillis()-inicial < milis) {/*Esperar a que pase el tiempo*/}\r\n\t}", "public void faster() {\n myTimer.setDelay((int) (myTimer.getDelay() * SPEED_FACTOR));\n }", "public void reset(){\r\n \tif (resetdelay<=0){//if he didn't just die\r\n \t\tsetLoc(400,575);\r\n \t\timg = imgs[4];\r\n \t}\r\n }", "@Override\r\n public void update(long timePassed) {\n\r\n }", "@Override\r\n\tpublic void perSecond() {\n\r\n\t}", "void setDuration(int duration);", "private void m128168k() {\n C42962b.f111525a.mo104671a(\"upload_page_duration\", C22984d.m75611a().mo59971a(\"first_selection_duration\", System.currentTimeMillis() - this.f104209S).mo59971a(\"page_stay_duration\", System.currentTimeMillis() - this.f104208R).f60753a);\n }", "private void timeSync() throws InterruptedException {\n long realTimeDateMs = currentTimeMs - System.currentTimeMillis();\n long sleepTime = periodMs + realTimeDateMs + randomJitter();\n\n if (slowdownFactor != 1) {\n sleepTime = periodMs * slowdownFactor;\n }\n\n if (sleepTime > 0) {\n Thread.sleep(sleepTime);\n }\n }", "public void setTime(float time) {\n this.time = time;\n }", "abstract public void setLoadingTime(long time);", "void setTime() {\n\t\tCalendar now = Calendar.getInstance();\n\t\tangleHours = (270 + 30 * now.get(now.HOUR) + now.get(now.MINUTE) / 2 ) % 360;\n\t\tangleMinutes = (270 + 6 * now.get(now.MINUTE)) % 360;\n\t\tangleSeconds = (270 + 6 * now.get(now.SECOND)) % 360;\n\t}", "public void run() {\n int tempRate;\n long frameTimeNanos = OppoRampAnimator.this.mChoreographer.getFrameTimeNanos();\n float timeDelta = ((float) (frameTimeNanos - OppoRampAnimator.this.mLastFrameTimeNanos)) * 1.0E-9f;\n OppoRampAnimator.this.mLastFrameTimeNanos = frameTimeNanos;\n OppoRampAnimator.access$208();\n if (OppoRampAnimator.this.mTargetValue > OppoRampAnimator.this.mCurrentValue) {\n int i = 300;\n if (4 == OppoBrightUtils.mBrightnessBitsConfig) {\n int i2 = OppoRampAnimator.this.mRate;\n if (OppoRampAnimator.mAnimationFrameCount <= 300) {\n i = OppoRampAnimator.mAnimationFrameCount;\n }\n tempRate = i2 + i;\n } else if (3 == OppoBrightUtils.mBrightnessBitsConfig) {\n int i3 = OppoRampAnimator.this.mRate;\n if (OppoRampAnimator.mAnimationFrameCount <= 300) {\n i = OppoRampAnimator.mAnimationFrameCount;\n }\n tempRate = i3 + i;\n } else if (2 == OppoBrightUtils.mBrightnessBitsConfig) {\n int i4 = OppoRampAnimator.this.mRate;\n if (OppoRampAnimator.mAnimationFrameCount <= 300) {\n i = OppoRampAnimator.mAnimationFrameCount;\n }\n tempRate = i4 + i;\n } else {\n tempRate = OppoRampAnimator.this.mRate;\n }\n } else {\n tempRate = OppoRampAnimator.this.mRate;\n }\n OppoBrightUtils unused = OppoRampAnimator.this.mOppoBrightUtils;\n float scale = OppoBrightUtils.mBrightnessNoAnimation ? 0.0f : ValueAnimator.getDurationScale();\n if (scale == OppoBrightUtils.MIN_LUX_LIMITI) {\n OppoRampAnimator oppoRampAnimator = OppoRampAnimator.this;\n oppoRampAnimator.mAnimatedValue = (float) oppoRampAnimator.mTargetValue;\n } else {\n float amount = OppoRampAnimator.this.caculateAmount((((float) tempRate) * timeDelta) / scale);\n float amountScaleFor4096 = 1.0f;\n OppoBrightUtils unused2 = OppoRampAnimator.this.mOppoBrightUtils;\n int i5 = OppoBrightUtils.mBrightnessBitsConfig;\n OppoBrightUtils unused3 = OppoRampAnimator.this.mOppoBrightUtils;\n if (i5 == 4) {\n amountScaleFor4096 = 2.0f;\n }\n if (OppoRampAnimator.this.mOppoBrightUtils.isAIBrightnessOpen()) {\n OppoBrightUtils unused4 = OppoRampAnimator.this.mOppoBrightUtils;\n if (!OppoBrightUtils.mManualSetAutoBrightness && OppoRampAnimator.this.mRate != OppoBrightUtils.BRIGHTNESS_RAMP_RATE_FAST && !DisplayPowerController.mScreenDimQuicklyDark) {\n OppoBrightUtils unused5 = OppoRampAnimator.this.mOppoBrightUtils;\n if (!OppoBrightUtils.mReduceBrightnessAnimating) {\n amount = amountScaleFor4096 * OppoRampAnimator.this.mOppoBrightUtils.getAIBrightnessHelper().getNextChange(OppoRampAnimator.this.mTargetValue, OppoRampAnimator.this.mAnimatedValue, timeDelta);\n }\n }\n }\n if (OppoRampAnimator.this.mTargetValue > OppoRampAnimator.this.mCurrentValue) {\n OppoRampAnimator oppoRampAnimator2 = OppoRampAnimator.this;\n oppoRampAnimator2.mAnimatedValue = Math.min(oppoRampAnimator2.mAnimatedValue + amount, (float) OppoRampAnimator.this.mTargetValue);\n } else {\n OppoBrightUtils unused6 = OppoRampAnimator.this.mOppoBrightUtils;\n if (!OppoBrightUtils.mUseAutoBrightness && amount < 10.0f) {\n amount = (float) (OppoBrightUtils.BRIGHTNESS_RAMP_RATE_FAST / 60);\n }\n OppoRampAnimator oppoRampAnimator3 = OppoRampAnimator.this;\n oppoRampAnimator3.mAnimatedValue = Math.max(oppoRampAnimator3.mAnimatedValue - amount, (float) OppoRampAnimator.this.mTargetValue);\n }\n }\n int oldCurrentValue = OppoRampAnimator.this.mCurrentValue;\n OppoRampAnimator oppoRampAnimator4 = OppoRampAnimator.this;\n oppoRampAnimator4.mCurrentValue = Math.round(oppoRampAnimator4.mAnimatedValue);\n if (oldCurrentValue != OppoRampAnimator.this.mCurrentValue) {\n OppoRampAnimator.this.mProperty.setValue(OppoRampAnimator.this.mObject, OppoRampAnimator.this.mCurrentValue);\n }\n if (OppoRampAnimator.this.mOppoBrightUtils.isSunnyBrightnessSupport()) {\n OppoRampAnimator.this.mOppoBrightUtils.setCurrentBrightnessRealValue(OppoRampAnimator.this.mCurrentValue);\n }\n if ((OppoBrightUtils.DEBUG_PRETEND_PROX_SENSOR_ABSENT || OppoRampAnimator.this.mTargetValue >= OppoRampAnimator.this.mCurrentValue || OppoAutomaticBrightnessController.mProximityNear) && ((OppoBrightUtils.DEBUG_PRETEND_PROX_SENSOR_ABSENT || OppoRampAnimator.this.mTargetValue <= OppoRampAnimator.this.mCurrentValue) && (!OppoBrightUtils.DEBUG_PRETEND_PROX_SENSOR_ABSENT || OppoRampAnimator.this.mTargetValue == OppoRampAnimator.this.mCurrentValue))) {\n OppoBrightUtils unused7 = OppoRampAnimator.this.mOppoBrightUtils;\n if (!OppoBrightUtils.mManualSetAutoBrightness || OppoRampAnimator.this.mTargetValue == OppoRampAnimator.this.mCurrentValue) {\n int unused8 = OppoRampAnimator.mAnimationFrameCount = 0;\n OppoRampAnimator.this.mAnimating = false;\n if (OppoRampAnimator.this.mListener != null) {\n OppoRampAnimator.this.mListener.onAnimationEnd();\n OppoBrightUtils unused9 = OppoRampAnimator.this.mOppoBrightUtils;\n OppoBrightUtils.mUseWindowBrightness = false;\n OppoBrightUtils unused10 = OppoRampAnimator.this.mOppoBrightUtils;\n OppoBrightUtils.mCameraUseAdjustmentSetting = false;\n return;\n }\n return;\n }\n }\n OppoRampAnimator.this.postAnimationCallback();\n }", "public void setTime(){\n\t\tthis.time = this.endTime - this.startTime;\t//calculate the time difference\n\t\t\n\t\t//now since the time is in milliseconds, convert the nanotime\n\t\tlong totalSeconds = (this.time / 1000000000);\n\t\t//Format the above seconds. So it will have at least \n\t\tint minute = (int)(totalSeconds/60);\n\t\tdouble second = totalSeconds - (minute*60);\t//get the remaining second part\n\t\t\n\t\tDecimalFormat minuteFormat = new DecimalFormat(\"##0\");\n\t\tDecimalFormat secondFormat = new DecimalFormat(\"###\");\t//so we only get the 3 digits\n\t\tString minutePart = minuteFormat.format(minute);\t//get the string for the second part\n\t\tString secondPart = secondFormat.format(second);\n\t\t\n\t\t\n\t\tString result = minutePart + \":\" + secondPart;\n\t\t\n\t\t//each time we set time, change the bounds\n\t\tthis.timeLabel.setText(String.valueOf(result));//set the JLabel text\n\t\t//when we set the time label, also set its location\n\t\tthis.timeLabel.setSize(timeLabel.getPreferredSize().width, \n\t\t\t\ttimeLabel.getPreferredSize().height);\n\t}", "private void updateDeviceImage(Shell shell) {\r\n mBusyLabel.setText(\"Capturing...\"); // no effect\r\n\r\n shell.setCursor(shell.getDisplay().getSystemCursor(SWT.CURSOR_WAIT));\r\n\r\n for (int i = 0; i < 10; i++) {\r\n long start = System.currentTimeMillis();\r\n getDeviceImage();\r\n long end = System.currentTimeMillis();\r\n System.out.println(\"count \" + i + \" take \" + (end-start) + \"ms\");\r\n }\r\n mRawImage = getDeviceImage();\r\n System.out.println(\"size is \" + mRawImage.size);\r\n for (int i = 0; i < mRotateCount; i++) {\r\n mRawImage = mRawImage.getRotated();\r\n }\r\n\r\n updateImageDisplay(shell);\r\n }", "public void notifyAllTimePassed() {\r\n // Make a copy of the Sprites before iterating over them.\r\n List<Sprite> spritesCopy = new ArrayList<Sprite>(this.sprites);\r\n for (Sprite s : spritesCopy) {\r\n s.timePassed();\r\n }\r\n }", "public void renderImage(long dt, long curTime, BufferedImage image) {\n\t\tmodifyImage(dt, curTime, image);\n\t\tconsumer.renderImage(dt, curTime, image);\t\n\t}", "public void setTimeLine(double time) {\n if (yCoord != 0) {\n try {\n offscreen.setRGB(0, yCoord, width, 1, pixels, 0, 0);\n } catch (Exception ex) {\n }\n }\n if (time > 0.0 && time < 1.0) {\n // store the new time line to the restoration array\n timeValue = time;\n yCoord = (int) (timeValue * height);\n offscreen.getRGB(0, yCoord, width, 1, pixels, 0, 0);\n for (int x = 0; x < width; x++) {\n pixels[x] ^= 0x00FFFFFF;\n }\n offscreen.setRGB(0, yCoord, width, 1, pixels, 0, 0);\n for (int x = 0; x < width; x++) {\n pixels[x] ^= 0x00FFFFFF;\n }\n }\n }", "@Override\n public int getTimeForNextTicInSeconds() {\n int seconds = Calendar.getInstance().get(Calendar.SECOND);\n return 60 - seconds;\n }", "@Override\n\t public void run() {\n\t \t \n\t currentItem = (currentItem +1) % picList.size();\n\t //更新界面\n\t // handler.sendEmptyMessage(0);\n timeHandler.sendEmptyMessageDelayed(0x01, 5000);\n\t }", "public void open (int nMilliseconds)\n {\n if (image_ == null) return;\n \n Timer timer = new Timer (Integer.MAX_VALUE, new ActionListener() {\n @Override\n public void actionPerformed (ActionEvent event) {\n ((Timer) event.getSource()).stop();\n close();\n };\n });\n \n timer.setInitialDelay (nMilliseconds);\n timer.start();\n\n setBounds (x_, y_, width_, height_);\n setVisible (true);\n }", "public void setTime(double time) {_time = time;}", "public long getLoopTime();", "public void setFinishTime() {\r\n\t\t\tthis.finishTime = RNG.MAXINT;\r\n\t\t}", "void setStartTimeout(int startTimeout);", "public void setTime(long time) {\r\n this.time = time;\r\n }", "public void setCurrentTime(double time) {\n if (time < 0) {\n time = 0;\n }\n \n nextStartTime = time;\n \n makeNewMusic();\n }", "public void resetTime() {\n\t\ttime_passed = 0l;\n\t}", "public void setUploadPtime(int ptime);", "@Override\r\n public void timePassed(double dt) {\r\n\r\n }", "@Override\r\n public void timePassed(double dt) {\r\n\r\n }", "public void run() {\r\n\t\t\r\n\t\tlong lastTime = new Date().getTime();\r\n\t\t\r\n\t\twhile (true)\r\n\t\t{\r\n\t\t\tlong ct = new Date().getTime();\r\n\t\t\tif (ct-lastTime < 50)\r\n\t\t\t\ttry {\r\n\t\t\t\t\t//thread.slee(10-ct+lastTime);\r\n\t\t\t\t\tThread.sleep(50);\r\n\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\tlastTime = new Date().getTime();\r\n\t\t\t\r\n\t\t\t//System.out.println(lastTime);\r\n\t\t\t\r\n\t\t\tif (working /*|| drawArea == null || drawArea.getGraphicsConfiguration() == null*/)\r\n\t\t\t\tcontinue;\r\n\t\t\t\r\n\t\t\tworker = new MySwingWorker(tempImage,this);\r\n\t\t \tworker.execute();\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "public void setTime(int aTime)\n{\n // If we loop, mod the time, otherwise, clamp time\n if(getLoops() && aTime>getMaxTime())\n aTime = aTime%getMaxTime();\n else aTime = SnapMath.clamp(aTime, 0, getMaxTime());\n \n // If already at given time, just return\n if(_time==aTime) return;\n\n // Set new value and fire property change\n firePropertyChange(\"Time\", _time, _time = aTime, -1);\n \n // Reset time of owner children\n for(int i=0, iMax=getOwner().getChildCount(); i<iMax; i++)\n getOwner().getChild(i).setTime(_time);\n \n // Send did update notification\n for(int i=0, iMax=getListenerCount(Listener.class); i<iMax; i++)\n getListener(Listener.class, i).animatorUpdated(this);\n \n // Clear new born list\n _newBorns.clear();\n}", "private void setBeginAndEnd() {\n for (int i=1;i<keyframes.size();i++){\n if (curTime <= ((PointInTime)keyframes.get(i)).time){\n beginPointTime=(PointInTime)keyframes.get(i-1);\n endPointTime=(PointInTime)keyframes.get(i);\n return;\n }\n }\n beginPointTime=(PointInTime)keyframes.get(0);\n if (keyframes.size()==1)\n endPointTime=beginPointTime;\n else\n endPointTime=(PointInTime)keyframes.get(1);\n curTime=((PointInTime)keyframes.get(0)).time;\n }", "public void setMaxTime(int aMaxTime)\n{\n // Set max time\n _maxTime = aMaxTime;\n \n // If time is greater than max-time, reset time to max time\n if(getTime()>_maxTime)\n setTime(_maxTime);\n}", "@Override\n public void run() {\n if (mImagePagerAdapter.getImageIdList().size() > 0) {\n if (i == 0) {\n i = 1;\n viewPager.setInterval(2000);\n viewPager.startAutoScroll();\n }\n }\n }" ]
[ "0.62552917", "0.6052689", "0.60179996", "0.59484607", "0.5928424", "0.5828423", "0.5785822", "0.5745503", "0.5659166", "0.5655023", "0.5647428", "0.5625857", "0.56184065", "0.56007254", "0.5599656", "0.55920154", "0.5576726", "0.55670035", "0.55617803", "0.55385584", "0.55353534", "0.55266285", "0.55167603", "0.5513473", "0.55046916", "0.5496017", "0.54848677", "0.54766387", "0.5474242", "0.5434408", "0.54260707", "0.5401115", "0.5387602", "0.537675", "0.5375806", "0.5370336", "0.5366169", "0.5331307", "0.5328539", "0.5327466", "0.53240037", "0.5316425", "0.5314126", "0.5308323", "0.53031576", "0.53028023", "0.52927643", "0.5292751", "0.5291263", "0.5288201", "0.5280678", "0.5280103", "0.52702034", "0.5262058", "0.52611387", "0.52531046", "0.52361715", "0.52348775", "0.5234021", "0.5228903", "0.52249277", "0.52221394", "0.52174133", "0.5214406", "0.5205891", "0.52042747", "0.52040523", "0.51943505", "0.519085", "0.518973", "0.51818866", "0.5178857", "0.516825", "0.51624393", "0.51586944", "0.5155096", "0.5154152", "0.51514375", "0.5150282", "0.5149457", "0.5149288", "0.51466036", "0.5140301", "0.51299304", "0.5126747", "0.51208234", "0.5118555", "0.5115916", "0.5114807", "0.510439", "0.5104128", "0.51033133", "0.51009506", "0.5097325", "0.50969267", "0.50969267", "0.50944793", "0.5087015", "0.5077645", "0.5077368", "0.5076591" ]
0.0
-1
Changes the picture for the gameobject if the timeframe has been met
public void tick() { long elapsed = (System.nanoTime()-startTime)/1000000; if(elapsed>delay) { currentFrame++; startTime = System.nanoTime(); } if(currentFrame == images.length){ currentFrame = 0; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void paint(){\n\t\tif(this.x+GameScreen.backCam<900 && this.x+GameScreen.backCam>-60){\n\t\t\tGraphicsHandler.drawImage(texture,this.x+GameScreen.backCam,this.y+GameScreen.yCam,size,size);\n\t\t}\n\t}", "abstract public void modifyImage(long dt, long curTime, BufferedImage image) ;", "public synchronized void tick(TiledMapTileLayer background) {\n\t\tplay.tick();\n\t\t\n\t\n\t\tswitch(timeState) {\n\t\tcase MidNight:\n\t\t\t\n\t\t\tRGB = 0.1f;\n\t\t\tbreak;\n\t\tcase Morning:\n\t\t\tRGB = 0.35f;\n\t\t\tbreak;\n\t\tcase Noon:\n\t\t\tRGB = 0.5f;\n\t\t\tbreak;\n\t\tcase Evening:\n\t\t\tRGB = 0.35f;\n\t\t\tbreak;\n\t\tcase Night:\n\t\t\tRGB = 0.2f;\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\tif(play.getX() + play.getWidth() < camWidth/2 ) {\n\t\t\tcamera.position.x = camWidth/2;\n\t\t}else if(play.getX()+play.getWidth()>(background.getWidth()*background.getTileWidth())-camWidth/2){\n\t\t\tcamera.position.x = (background.getWidth()*background.getTileWidth())-camWidth/2;\n\t\t}else {\n\t\t\tcamera.position.x = play.getX() + play.getWidth();\n\t\t}if(play.getY() + play.getHeight() <= camHeight/2) { \n\t\t\tcamera.position.y = camHeight/2;\n\t\t}else if(play.getY()+play.getHeight() > (background.getHeight() * background.getTileHeight()) - camHeight/2) {\n\t\t\tcamera.position.y = (background.getHeight() * background.getTileHeight()) - camHeight/2;\n\t\t}else{\n\t\t\tcamera.position.y = play.getY()+play.getHeight();\n\t\t}\n\t\t\n\t}", "public void updateTimerDisplay(){\n int seconds = timeCounter / 60;\n setImage(new GreenfootImage(\"Time: \"+timeElapsed + \": \" + seconds, 24, Color.BLACK, Color.WHITE));\n }", "public void act() \r\n {\r\n if(timeInterval > 0) {\r\n timeInterval--;\r\n }else{\r\n if(currentSprite < 30) {\r\n currentSprite++;\r\n GreenfootImage img = new GreenfootImage(\"explosion_\" + currentSprite + \".png\");\r\n img.scale(img.getWidth() / 2 + 25, img.getHeight() / 2 + 25);\r\n setImage(img);\r\n timeInterval = timeIntervalDef;\r\n }else{\r\n getWorld().removeObject(this);\r\n }\r\n }\r\n }", "public void flash(){\n //stop movement\n tState.stop();\n tMovement.stop();\n\n //store final image\n BufferedImage finalState = display; \n\n //update position for \"flash\" animation\n int xFin = x - 9;\n int yFin = y - 9; \n\n tEnd = new Timer(40,new ActionListener(){\n\n private int i = 0;\n\n @Override\n public void actionPerformed(ActionEvent e){\n x = xFin;\n y = yFin;\n \n BufferedImage b = new BufferedImage(50,50,BufferedImage.TYPE_INT_ARGB);\n Graphics g = b.getGraphics();\n if (i < 10){ \n BufferedImage img = flash[i];\n g.drawImage(img,25-img.getWidth()/2,25-img.getHeight()/2,null); \n g.drawImage(finalState,9,9,null);\n } else if (i == 20){\n tEnd.stop();\n caught = true;\n System.out.println(\"You caught \"+pok.getName().toUpperCase()+\"!\");\n } else {\n BufferedImage img = flash[19-i];\n g.drawImage(img,25-img.getWidth()/2,25-img.getHeight()/2,null); \n }\n g.dispose(); \n display = b;\n i++;\n } \n });\n tEnd.start();\n }", "@Override\n\tpublic void present(float deltaTime) {\n\t\tGraficos g = juego.getGraficos();\n\t\tg.drawPixmap(Assets.fondo, 0, 0);\n\t\t// g.drawPixmap(Assets.ayuda2, 64, 100);\n\t\tg.drawPixmap(Assets.ayuda2, 9, 80);\n\t\t// x =256 y = 416\n\t\tif (Control.autor) {\n\t\t\tg.drawPixmap(Assets.logotren, 20, 20);\n\t\t} else {\n\t\t\tg.drawPixmap(Assets.autor, 20, 20);\n\n\t\t}\n\t\tg.drawPixmap(Assets.botones1, 240, 10, 0, 0, 64, 64);\n\t}", "public boolean skyObjectTimer() {\r\n if (seconds - lastSkyObject >= Math.random()*2+6) {\r\n lastSkyObject = seconds;\r\n return true;\r\n } else if (seconds < lastSkyObject) {\r\n lastSkyObject = 0;\r\n }\r\n return false;\r\n }", "public void timer()\n {\n if(exists == true)\n { \n if(counter < 500) \n { \n counter++; \n } \n else \n { \n Greenfoot.setWorld(new Test()); \n exists = false; \n } \n } \n }", "@Override\n\tpublic void draw(GraphicsContext gc) {\n\t\tif (frameTick > 30) {\n\t\t\tframeTick = 0;\n\t\t\tframeState = (frameState + 1) % 2;\n\t\t}\n\t\tgc.drawImage(imageFrame.get(frameState), position.first - GameCanvas.getCurrentInstance().getStartX(),\n\t\t\t\tposition.second);\n\t\tframeTick++;\n\t}", "@Override\n\tpublic void update() {\n\t\tif(!canSwoop)\n\t\tif(System.currentTimeMillis() - lastAnim >= 200){\t\n\t\t\tif(currentAnim < 2){\n\t\t\t\tcurrentAnim++;\n\t\t\t} else {\n\t\t\t\tcurrentAnim = 0;\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"ANIMATING image: \" + currentAnim);\n\t\t\tlastAnim = System.currentTimeMillis();\t\t\n\t\t\t}\n\t\t\n\t\tthis.texture = Assets.shadowAnim[currentAnim];\n\t}", "public void render(){\r\n if(getLives() >= 10){\r\n StdDraw.picture(super.xCoord,super.yCoord,\"EnemyPurple.png\",super.radius*2,super.radius*2);\r\n }\r\n if(getLives() < 10){\r\n StdDraw.picture(super.xCoord,super.yCoord,\"EnemyPink.png\",super.radius*2,super.radius*2);\r\n }\r\n }", "private void update(){\n\n//\t\tif(frameSupplier != null){\n//\n//\t\t\tBufferedImage frame = frameSupplier.getFrame();\n//\n//\t\t\tvideoContainer.setIcon(new ImageIcon(frame));\n//\t\t\tvideoContainer.setText(null);\n//\n//\t\t}\n\n\t\tBufferedImage frame = camera.getImage();\n\t\tvideoContainer.setIcon(new ImageIcon(frame));\n\t\tvideoContainer.setText(null);\n\n\t\tgpioManager.setStatusColour(Color.getHSBColor((System.currentTimeMillis() % 3000) / 3000f, 1, 1));\n\n\t\tgpioManager.setShutterLEDState(System.currentTimeMillis() % 1000 > 500);\n\n\t\tjFrame.repaint();\n\t}", "public void playEnd ()\r\n {\r\n hauntedHouse = new ImageIcon(\"HauntedHouse.png\");\r\n frame.add(this);\r\n animationLoop = new Timer (2, new ActionListener ()\r\n {\r\n public void actionPerformed (ActionEvent ae)\r\n {\r\n count++; \r\n revalidate();\r\n repaint ();\r\n if (count >= 2320)\r\n {\r\n animationLoop.stop();\r\n frame.dispose();\r\n }\r\n }\r\n });\r\n animationLoop.start();\r\n }", "public void frogDeath(long now, String type) {\n\t\tString car = \"car\";\n\t\tString water = \"water\";\n\t\tdeath = true;\n\n\t\tfinal Image[] cardeath = new Image[4];\n\t\tcardeath[0] = new Image(\"file:src/main/resources/Img/cardeath1.png\", FrogImgSize, FrogImgSize, true, true);\n\t\tcardeath[1] = new Image(\"file:src/main/resources/Img/cardeath2.png\", FrogImgSize, FrogImgSize, true, true);\n\t\tcardeath[2] = new Image(\"file:src/main/resources/Img/cardeath3.png\", FrogImgSize, FrogImgSize, true, true);\n\t\tcardeath[3] = new Image(\"file:src/main/resources/Img/cardeath3.png\", FrogImgSize, FrogImgSize, true, true);\n\n\t\tfinal Image[] waterdeath = new Image[4];\n\t\twaterdeath[0] = new Image(\"file:src/main/resources/Img/waterdeath1.png\", FrogImgSize, FrogImgSize, true, true);\n\t\twaterdeath[1] = new Image(\"file:src/main/resources/Img/waterdeath2.png\", FrogImgSize, FrogImgSize, true, true);\n\t\twaterdeath[2] = new Image(\"file:src/main/resources/Img/waterdeath3.png\", FrogImgSize, FrogImgSize, true, true);\n\t\twaterdeath[3] = new Image(\"file:src/main/resources/Img/wwaterdeath4.png\", FrogImgSize, FrogImgSize, true, true);\n\n\t\tImage[] array = new Image[4];\n\t\tif (type == car)\n\t\t\tarray = cardeath;\n\t\tif (type == water)\n\t\t\tarray = waterdeath;\n\t\t\tif ((now) % 15 == 0) {\n\t\t\t\tthis.DeathAnimationTime++;\n\t\t\t}\n\t\t\tif (DeathAnimationTime == 1) {\n\t\t\t\tsetImage(array[0]);\n\t\t\t}\n\t\t\tif (DeathAnimationTime == 3) {\n\t\t\t\tsetImage(array[1]);\n\t\t\t}\n\t\t\tif (DeathAnimationTime == 5) {\n\t\t\t\tsetImage(array[2]);\n\t\t\t}\n\t\t\tif (DeathAnimationTime == 7) {\n\t\t\t\tsetImage(array[3]);\n\t\t\t}\n\t\t\tif (DeathAnimationTime == 9) {\n\t\t\t\tthis.lives -= 1;\n\t\t\t\tfrogReposition();\n\t\t\t\tintersectCar = false;\n\t\t\t\tintersectWater = false;\n\t\t\t\tthis.DeathAnimationTime = 0;\n\t\t\t\tsetImage(frog[0]);\n\t\t\t\tdeath = false;\n\t\t\t\taddPoints(-100);\n\n\n\t\t\t}\n\n\t\t}", "public void trackTime()\n {\n frames += 1;\n\n // Every second (roughly) reduce the time left\n if (frames % 60 == 0)\n {\n time += 1;\n showTime();\n }\n }", "@Override\n public void secondTick(int ms) {\n if (this.interactionTimeout == 0) {\n this.image = image_on;\n }\n super.secondTick(ms);\n }", "public void render(GraphicsContext gc, double time) {\n gc.drawImage(image, x, y);\n update(time, friction);\n lifetime += time;\n }", "public void tick(){\n\t\ttimer += System.currentTimeMillis() - lastTime;\n\t\tif(timer > speed){\n\t\t\tcurrent = image.next();\n\t\t\ttimer = 0;\n\t\t}\n\t\tlastTime = System.currentTimeMillis();\n\t}", "public void Boom()\r\n {\r\n image1 = new GreenfootImage(\"Explosion1.png\");\r\n image2 = new GreenfootImage(\"Explosion2.png\");\r\n image3 = new GreenfootImage(\"Explosion3.png\");\r\n image4 = new GreenfootImage(\"Explosion4.png\");\r\n image5 = new GreenfootImage(\"Explosion5.png\");\r\n image6 = new GreenfootImage(\"Explosion6.png\");\r\n setImage(image1);\r\n\r\n }", "@Override\n\tpublic void draw() {\n\t\tfloat delta = Gdx.graphics.getDeltaTime();\n\t\ti+= delta;\n\t\timage.setRegion(animation.getKeyFrame(i, true));\n\t\t//this.getSpriteBatch().draw(animation.getKeyFrame(i, true), 0, 0);\n\t\t\n\t\tGdx.app.log(\"tag\", \"delta = \" + i);\n\t\t\n\t\tsuper.draw();\n\t}", "public void act() \n {\n\n World wrld = getWorld();\n if(frameCounter >= frameWait)\n {\n super.act();\n frameCounter = 0;\n }\n else\n {\n frameCounter++;\n }\n if (dying)\n deathcounter++;\n GreenfootImage trans = getImage();\n trans.scale(500,500);\n setImage(trans);\n setLocation(getX(), (getY()));\n\n if (deathcounter > 10)\n {\n wrld.removeObject(this);\n ((Universe)wrld).score += 50;\n }\n else if (getX() < 10)\n wrld.removeObject(this);\n }", "public void act() \n {\n //plays animation with a delay between frames\n explosionSound.play();\n i = (i+1)%(frames.length); \n setImage(frames[i]);\n if(i == 0) getWorld().removeObject(this);\n }", "@Override\n public void update() {\n if(alive==false){\n afterBeKilled();\n return;\n }\n animate();\n chooseState();\n checkBeKilled();\n if(attack){\n if(timeBetweenShot<0){\n chooseDirection();\n attack();\n timeBetweenShot=15;\n }\n else{\n timeBetweenShot--;\n }\n\n }\n else{\n calculateMove();\n setRectangle();\n }\n }", "public void setFrameByFrameClock()\n {\n\tframeByFrameClock = true;\n }", "public void act() {\n if (System.currentTimeMillis() - lastTime > 5000) {\n lastTime = System.currentTimeMillis();\n int y = (int)(Math.random() * ((BackGround1.height-30)+1)+30);\n int x = (int)(Math.random() * ((BackGround1.width-15)+1)+15);\n addObject(new Coin(),x ,y);\n }\n }", "public void setGameTime() {\n\t\tgameTime = new Date();\n\t}", "private void idleAnimation(){\n timer++;\n if( timer > 4 ){\n setImage(loadTexture());\n animIndex++;\n timer= 0;\n if(animIndex > maxAnimIndex ){\n animIndex = 0;\n }\n }\n }", "@Override\n public void handle(long now) {\n int frame = (int) (now / 16666666.6667);\n if (frame % 600 == 0) new SimpleEnemy(game); // 10 seconds\n if (frame % 900 == 0) new SimplePowerUp(game); // 15 seconds\n if (frame % 1950 == 0) new HealthPack(game); // 32.5 seconds\n if (frame % 2100 == 0) new Shield(game); // 35 seconds\n for (GameEntity gameObject : Globals.gameObjects) {\n if (gameObject instanceof Animatable) {\n Animatable animObject = (Animatable) gameObject;\n animObject.step();\n }\n }\n Globals.gameObjects.addAll(Globals.newGameObjects);\n Globals.newGameObjects.clear();\n\n Globals.gameObjects.removeAll(Globals.oldGameObjects);\n Globals.oldGameObjects.clear();\n }", "private void animate() {\r\n\t\tif (spriteCounter > 50) {\r\n\t\t\tanimationFrame = 0;\r\n\t\t} else {\r\n\t\t\tanimationFrame = -16;\r\n\t\t}\r\n\t\t\r\n\t\tif (spriteCounter > 100) {\r\n\t\t\tspriteCounter = 0;\r\n\t\t}\r\n\t\t\r\n\t\r\n\t\tspriteCounter++;\r\n\t\tsetImage((Graphics2D) super.img.getGraphics());\r\n\t}", "public void gameLoop(double durationSinceLastFrame){\n // Ini dipanggil oleh Avatar Duel pada Animation Timer pada handle()\n // Reference: (1) - Cari bagian animation (bisa dipake buat yang bukan animasi juga)\n this.gameDrawer.drawGame(durationSinceLastFrame);\n }", "void shoot_ship_missiles(long now) {\n if (pressed_key_codes.contains(KeyCode.SPACE)) {\n // Rate of fire cannot exceed 2 missiles per second\n if (now - missile_timer > 500000000) {\n missile_audio.play();\n Missile missile = ship.shootMissile();\n ImageView ship_missile_image_view = new ImageView(ship_missile_image);\n ship_missile_image_view.setX(missile.x_position);\n ship_missile_image_view.setY(missile.y_position);\n ship_missile_image_view.setFitWidth(Dimensions.SHIP_MISSILE_WIDTH);\n ship_missile_image_view.setFitHeight(Dimensions.SHIP_MISSILE_HEIGHT);\n ship_missile_image_views.add(ship_missile_image_view);\n game_pane.getChildren().add(ship_missile_image_view);\n missile_timer = now;\n }\n }\n }", "public void update() {\n\t\tif (MainClass.getPlayer().isJumping()) {\n\t\t\tcurrentImage = characterJumped;\n\t\t} else if(Math.abs(MainClass.getPlayer().getSpeedY()) > Player.getFallspeed() ) {\n\t\t\tcurrentImage = characterJumped;\n\t\t} else if(MainClass.getPlayer().isCovered() == true) {\n\t\t\tcurrentImage = characterCover;\n\t\t} else if(MainClass.getPlayer().isJumping() == false && MainClass.getPlayer().isCovered() == false) {\n\t\t\tcurrentImage = super.getCurrentImage();\n\t\t}\n\t\tthis.update(25);\n\t\n\t}", "public void render(int gameSpeed){\n counterFrames++;\n if (counterFrames*gameSpeed*1000 >= (60 * (delay))){\n setDone();\n }\n }", "public void frameForward()\n{\n stop();\n setTime(getTime() + getInterval());\n}", "@Override\n\tpublic void render(float delta) \n\t{\n\t\tif (state_Game==GAME_READY) \n\t\t{\n\t\t\t/*Si esta en Ready Decrementa el tiempo hasta que el tiempo se igual a 0*/\n\t\t\ttiempo=60-(int) (stateTime/2);\n\t\t\tif(tiempo==0)\n\t\t\t{\n\t\t\t\t/*Si es igual a 0 entonces muestra la pantalla de gameover*/\n\t\t\t\tSettings.addScore(Score.getScore());\n\t\t\t\tgame.setScreen(new PantallaGameOver(game));\n\t\t\t}\n\t\t\tupdate(delta);\n\t\t}\n\t\tif (state_Game==GAME_PAUSED) \n\t\t{\n\t\t\t/*Si el estado del juego es Pausa muestra la ventana de Pausa*/\n\t\t\tpauseGame(delta);\n\t\t}\n\t\t\n\t}", "public void setTime (View timeView) throws IOException {\n ImageView nowTime = (ImageView)findViewById(R.id.theTime);\n\n if (threeMinutes) {\n threeMinutes=false;\n nowTime.setImageResource(R.drawable.m1);\n } else {\n threeMinutes=true;\n nowTime.setImageResource(R.drawable.m3);\n }\n\n }", "private void updateSprite(){\n //facing front\n getImage().clear();\n getImage().drawImage(SHEET,-(frame%SHEET_W)*SPRITE_W,0);\n if(!goLeft) getImage().mirrorHorizontally();\n if (iframes>0&&iframes%10<5) setImage(SpriteHelper.makeWhite( getImage()));\n else frame = frame + 1 % (SHEET_H* SHEET_W);\n }", "public void updateImage() {\n \t\tAnimation anim = this.animationCollection.at(\n \t\t\t\tfak.getCurrentAnimationTextualId());\n \n \t\t// if animation is set to something bad, then set it to back to initial\n \t\tif(anim==null)\n \t\t{\n \t\t\tfak.setCurrentAnimationTextualId(ConstantsForAPI.INITIAL);\n \t\t\tanim = this.animationCollection.at(\n \t\t\t\t\tfak.getCurrentAnimationTextualId());\n \t\t}\n \n \t\tif(anim==null)\n \t\t{\n \t\t\tanim = this.animationCollection.at(0);\n \t\t\tfak.setCurrentAnimationTextualId(anim.getTextualId());\n \t\t}\n \n \t\tif (anim != null) {\n \t\t\tif (fak.getCurrentFrame()\n \t\t\t\t\t>= anim.getLength()) {\n \t\t\t\tfak.setCurrentFrame(\n \t\t\t\t\t\tanim.getLength() - 1);\n \t\t\t}\n \n \t\t\tcom.github.a2g.core.objectmodel.Image current = anim.getImageAndPosCollection().at(\n \t\t\t\t\tfak.getCurrentFrame());\n \n \t\t\t// yes current can equal null in some weird cases where I place breakpoints...\n \t\t\tif (current != null\n \t\t\t\t\t&& !current.equals(this)) {\n \t\t\t\tif (this.currentImage != null) {\n \t\t\t\t\tthis.currentImage.setVisible(\n \t\t\t\t\t\t\tfalse, new Point(this.left,this.top));\n \t\t\t\t}\n \t\t\t\tthis.currentImage = current;\n \t\t\t}\n \t\t}\n \t\t// 2, but do this always\n \t\tif (this.currentImage != null) {\n \t\t\tthis.currentImage.setVisible(\n \t\t\t\t\tthis.visible, new Point(this.left,\n \t\t\t\t\t\t\tthis.top));\n \t\t}\n \n \t}", "void go() {\n while (!gameOver) {\n try {\n Thread.sleep(showDelay);\n } catch (Exception e) {\n e.printStackTrace();\n }\n canvas.repaint();\n checkFilling();\n if (figure.isTouchGround()) {\n figure.leaveOnTheGround();\n figure = new Shapes(this);\n gameOver = figure.isCrossGround(); // Is there space for a new figure?\n } else\n figure.stepDown();\n }\n }", "public void tick(){\n camera.tick(player);\n handler.tick();\n }", "public void updateGameTime() {\n\t\tGameTime = Timer.getMatchTime();\n\t}", "static public void display(){\n\n elapsedTime = TimerManager.getTime() - startTime;\n\n if (!isDone){\n\n //Animate\n if (TimerManager.getTime()-animTimer > animSpeed){\n animTimer = TimerManager.getTime();\n frame++;\n }\n if (frame > 27){\n frame = 27;\n }\n \n switch (state){\n case 1:\n //Fade in\n alpha = 300 - (int)(elapsedTime/3);\n if (alpha <= 0){\n alpha = 0;\n state = 2;\n startTime = TimerManager.getTime();\n }\n break;\n case 2:\n //Wait a bit\n if (elapsedTime > 2000){\n state = 3;\n startTime = TimerManager.getTime();\n }\n break;\n case 3:\n //Fade out\n alpha = (int)(elapsedTime/4);\n if (alpha >= 255){\n alpha = 255;\n state = 4;\n startTime = TimerManager.getTime();\n isDone = true;\n }\n break;\n }\n \n //Display our sprites\n\n Shapes.begin(Renderer.cameraUI);\n Shapes.setColor(255,255,255,255);\n Shapes.drawBox(0,0,(float)Display.getWidth(),(float)Display.getHeight());\n Shapes.end();\n\n Renderer.startUI();\n\n Renderer.setColor(Color.BLACK);\n Text.draw(0,0,\"State: \"+state);\n Renderer.setColor(Color.WHITE);\n\n Renderer.draw(splashTextures[frame % 28].getRegion(),(float) Display.getWidth()/2 - 128, (float)Display.getHeight()/2-128,256,256);\n\n Renderer.endUI();\n\n Shapes.begin(Renderer.cameraUI);\n Shapes.setColor(0,0,0,Math.min(255,alpha));\n Shapes.drawBox(0,0,(float)Display.getWidth(),(float)Display.getHeight());\n Shapes.end();\n\n }\n }", "public void update(double elapsedTime){\n ViewPort viewport = AsteroidsGame.SINGLETON.get_gameViewPort();\n\n if(_position.x + get_imageWidth() < viewport.get_position().x ||\n _position.x - get_imageWidth() > ( viewport.get_position().x + viewport.get_width() ) ||\n _position.y + get_imageHeight() < viewport.get_position().y ||\n _position.y - get_imageHeight() > ( viewport.get_position().y + viewport.get_height() )\n ){\n set_visible(false);\n }\n else{\n set_visible(true);\n }\n }", "public void update(float deltaTime) {\n if (creationPoint.y != (int)(GameView.instance.groundLevel - height*3/4) || creationPoint.x != x+width/2){\n creationPoint.x = x+width/2-width/4;\n creationPoint.y = (int)(GameView.instance.groundLevel - height/2)+height/8;\n }\n\n\n if(isStanding) {\n\n /*System.out.println(creationPoint.x);\n System.out.println(GameView.instance.player.position.x);\n System.out.println(GameView.instance.player.position.x-creationPoint.x);\n System.out.println(GameView.instance.cameraSize*attackRange);*/\n\n tax();\n\n\n //=======================================================================================//\n\n //Buildings\n\n //=======================================================================================//\n\n\n grow();\n\n\n // = ======== == ==\n // = = == == ==\n // ===== == ====\n // = = == == ===\n\n if (inRange() && !surrender) {\n countdown+=GameView.instance.fixedDeltaTime;\n //System.out.println(countdown);\n float shootSpeed=4-lv;\n if (countdown > 1000*shootSpeed) {\n\n if (countdown > 1200*shootSpeed && attack == 0) {\n Attack();\n\n attack += 1;\n }\n\n if (countdown > 1400*shootSpeed && attack == 1) {\n Attack();\n\n attack += 1;\n }\n\n if (countdown > 1600*shootSpeed && attack == 2) {\n Attack();\n\n attack += 1;\n }\n\n if (countdown >= 1800*shootSpeed) {\n countdown = 0;\n attack = 0;\n }\n }\n }\n if ((Scene.instance.timeOfDay) / (Scene.instance.dayLength) > 0.6) {\n spawnedNPC = false;\n }\n if(!spawnedNPC) {\n //spawning thief\n if ((townFear > 20 && lv != 0 && (currentGold < maxGold / 2)) || (goldRate < 200 && lv != 0) && Scene.instance.day > 2) {\n GameView.instance.npc_pool.spawnThiefs(x, (int) GameView.instance.groundLevel, 1, this);\n }\n if(!surrender) {\n //spawning dragonslayer\n if (townFear > 30 && lv != 0) {\n GameView.instance.npc_pool.spawnDragonLayers(x, (int) GameView.instance.groundLevel, this);\n }\n\n //spawning wizard\n if (townFear > 35 && lv == 2 && !summonedWizard) {\n GameView.instance.npc_pool.spawnFarmers(x, (int) GameView.instance.groundLevel, this);\n summonedWizard = true;\n }\n }\n spawnedNPC = true;\n }\n\n if(!surrender) {\n if (townFear > surrenderFear) {\n surrender = true;\n flag.setSurrender(surrender);\n SoundEffects.instance.play(SoundEffects.TRIBUTE);\n }\n }\n else {\n if(townFear < surrenderFear/2) {\n surrender = false;\n flag.setSurrender(surrender);\n\n }\n }\n\n\n\n Flagposition(deltaTime);\n }\n else {\n buildingImage = SpriteManager.instance.getBuildingSprite(\"FortressRuin\");\n\n if(beenEmptied == false){\n GoldPool.instance.spawnGold(collider.centerX(), collider.centerY(),Math.min(currentGold,100*(lv+1)) );\n beenEmptied = true;\n }\n townFear = 0;\n }\n\n //==== ===== ===== = == ==== ============================\n //= = == = = = = == = = ============================\n //==== == ===== ===== == ==== ============================\n //= == ===== = = = == = == ============================\n repair(deltaTime);\n\n for(int i = 0; i < currentBuildingsLeft.size(); i++){\n currentBuildingsLeft.get(i).update(deltaTime);\n }\n\n for(int i = 0; i < currentBuildingsRight.size(); i++){\n currentBuildingsRight.get(i).update(deltaTime);\n }\n super.update(deltaTime);\n\n }", "private void updateTime() {\n timer.update();\n frametime = timer.getTimePerFrame();\n }", "public void logic()\r\n\t{\r\n\t\tif(time>0)\r\n\t\t{\t\r\n\t\ttime--;\r\n\t\tsetTime.setText(\"\"+time);\r\n\t\tif (time==0)\r\n\t\t{\r\n\t\t//from OutroPanel Constructor class\r\n\t\t\tsetTime.setText(\"\"+done);\r\n\t\t\t\r\n\t\t\tJFrame frame = new JFrame(\"CuBez\"); //put the name of the game once decided here\r\n\t\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\t\t\r\n\t\t\t//Inserts the graphics and buttons\r\n\t\t\tOutroPanel image = new OutroPanel();\r\n\t\t\tframe.getContentPane().add(image);\r\n\t\t\t\r\n\t\t\tframe.pack();\r\n\t\t\tframe.setVisible(true);\r\n\t\t}\t\r\n\t\t}\r\n\t\t\r\n\t\t//if (incorrect square clicked)\r\n\t\t//{\r\n\t\t//\ttime-3;\r\n\t\t//\tsetTime.setText(\"\"+time);\r\n\t\t// else\t\tnull\r\n\t\t//}\r\n\t}", "@Override\n public void actionPerformed(ActionEvent ae)\n {\n if (time < survivalTime && lives > 0)\n {\n updateTime();\n for (int i = 0; i < numFigs; i++)\n figures[i].hide();\n for (int i = 0; i < numFigs; i++)\n figures[i].move();\n for (int i = 0; i < numFigs; i++)\n figures[i].draw();\n playCollisionSound();\n }\n else\n {\n this.moveTimer.stop();\n for (int i = 0; i < this.numFigs; i++)\n figures[i].hide();\n if (lives > 0)\n {\n this.youWinLabel.setVisible(true);\n playYouWinSound();\n }\n else\n {\n this.gameOverLabel.setVisible(true);\n playGameOverSound();\n }\n }\n \n }", "void setTime(){\n gTime += ((float)millis()/1000 - millisOld)*(gSpeed/4);\n if(gTime >= 4) gTime = 0;\n millisOld = (float)millis()/1000;\n }", "public void paint(Entity entity, Graphics graphics, Camera camera)\r\n\t{\r\n\t\tint tileSize = GameConfiguration.TILE_SIZE;\r\n\t\tint unitSize = EntityConfiguration.UNIT_SIZE;\r\n\t\tint cavalrySize = EntityConfiguration.CAVALRY_SIZE;\r\n\t\t\r\n\t\t\r\n\t\tint width = GameConfiguration.WINDOW_WIDTH;\r\n\t\tint height = GameConfiguration.WINDOW_HEIGHT;\r\n\t\tif(GameConfiguration.launchInFullScreen) {\r\n\t\t\twidth = Toolkit.getDefaultToolkit().getScreenSize().width;\r\n\t\t\theight = Toolkit.getDefaultToolkit().getScreenSize().height;\r\n\t\t}\r\n\t\tPosition p = entity.getPosition();\r\n\t\tAnimation animation = entity.getAnimation();\r\n\r\n\t\tif(entity.getId() == EntityConfiguration.CAVALRY) {\r\n\t\t\tif(p.getX() + cavalrySize - camera.getX() >= 0 && p.getY() - camera.getY() + cavalrySize >= 0 && p.getX() - camera.getX() <= width && p.getY() - camera.getY() <= height) {\r\n\t\t\t\tgraphics.drawImage(animation.getFrame(), p.getX() - camera.getX(), p.getY() - camera.getY(), cavalrySize, cavalrySize, null);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if(entity.getId() >= EntityConfiguration.INFANTRY && entity.getId() <= EntityConfiguration.WORKER) {\r\n\t\t\tif(p.getX() + unitSize - camera.getX() >= 0 && p.getY() - camera.getY() + unitSize >= 0 && p.getX() - camera.getX() <= width && p.getY() - camera.getY() <= height) {\t\r\n\t\t\t\tgraphics.drawImage(animation.getFrame(), p.getX() - camera.getX(), p.getY() - camera.getY(), unitSize, unitSize, null);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif(p.getX() + tileSize - camera.getX() >= 0 && p.getY() - camera.getY() + tileSize >= 0 && p.getX() - camera.getX() <= width && p.getY() - camera.getY() <= height) {\r\n\t\t\t\tgraphics.drawImage(animation.getFrame(), p.getX() - camera.getX(), p.getY() - camera.getY(), tileSize, tileSize, null);\r\n\t\t\t}\r\n\t\t}\r\n\t\tpaintLifeBarre(entity, graphics, camera);\r\n\t}", "public void updateTime(int time)\n\t{\n\t\tshotsRemaining = rateOfFire;\n\t}", "@Override\n public void timerTicked() {\n //subtracts one second from the timer of the current team\n if(state.getCurrentTeamsTurn() == Team.RED_TEAM) {\n state.setRedTeamSeconds(state.getRedTeamSeconds() - 1);\n } else {\n state.setBlueTeamSeconds(state.getBlueTeamSeconds() - 1);\n }\n }", "public void tick(long timePassed) {\t\t\n\t\t\tif(isEntered())\n\t\t\t\tcurrentTextureIndex = 1;\n\t\t\telse\n\t\t\t\tcurrentTextureIndex = 0;\n\t\t\t\n\t\t\t// if Mouse movement is selected, keep the button highlighted\n\t\t\tif(Program.controlMethod == Program.WASD_MOVEMENT)\n\t\t\t\tcurrentTextureIndex = 2;\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\ttextures[currentTextureIndex].update(timePassed);\n\t\t}", "public void tickTock() {\n Calendar t2 = Calendar.getInstance();//gets current time\n t2.add(Calendar.MILLISECOND, 580);//adds time to time retrieved\n Date t = t2.getTime();//set t to time gotten\n time = timeFormat.format(t);//formats the time for the timeLabel\n timeLabel.setText(\" \" + time + \" \");//sets the time for the time label\n day = dayFormat.format(t);\n dayLabel.setText(\" \" + day + \" \");\n date = dateFormat.format(t);\n dateLabel.setText(date);\n\n/*public void setImage() {\n ImageIcon icon = new ImageIcon(\"geometric-cool-elephant-wall-clocks.jpg\");\n image = new JLabel();\n image.setIcon(icon);\n add(image);\n }\n*/\n }", "@Override\n public void paint(final Graphics g_) {\n final Graphics2D g2d = (Graphics2D) g_;\n g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,\n RenderingHints.VALUE_ANTIALIAS_ON);\n\n g2d.drawImage(BACK_IMAGE, 0, 0, WIDTH, HEIGHT, null);\n\n for (final Tube tube : tubes) {\n g2d.drawImage(TUBE1_IMAGE, (int) tube.position,\n HEIGHT - (int) tube.height - TUBE_APERTURE - TUBE_HEIGHT,\n TUBE_WIDTH, TUBE_HEIGHT, null);\n g2d.drawImage(TUBE2_IMAGE, (int) tube.position,\n HEIGHT - (int) tube.height, TUBE_WIDTH, TUBE_HEIGHT, null);\n }\n\n g2d.drawImage(GROUND_IMAGE,\n -(FLOOR_SPEED * ticks % (WIDTH - FLOOR_WIDTH)),\n HEIGHT - FLOOR_OFFSET, FLOOR_WIDTH, FLOOR_HEIGHT, null);\n\n //Number of birds alive\n int alive = 0;\n final int anim = ticks / 3 % 3;\n \n //For each bird, if not dead increment the number of birds alive\n for (final Bird bird : birds) {\n if (bird.dead)\n continue;\n ++alive;\n \n //Handles rotation of the bird as it moves\n final AffineTransform at = new AffineTransform();\n at.translate(WIDTH / 3 - BIRD_HEIGHT / 3, HEIGHT - bird.height);\n at.rotate(-bird.angle / 180.0 * Math.PI, BIRD_WIDTH / 2,\n BIRD_HEIGHT / 2);\n //Draws the bird\n g2d.drawImage(bird.images[anim], at, null);\n }\n \n \n //Toggle speed\n g2d.setColor(Color.BLACK);\n Font trb = new Font(\"TimesRoman\", Font.BOLD, 18);\n g2d.setFont(trb);\n g2d.drawString(\"Click Mouse to Toggle Speed\", 160, 700);\n \n //Draw number of birds that are alive\n g2d.drawString(\"\" + alive +\"/\"+POPULATION + \" alive\", 470, 50);\n \n //Display fitness\n g2d.drawString(\"Fitness \" + best.genome.fitness + \"/\" + Pool.maxFitness,\n 10, 50);\n \n //Generation\n g2d.drawString(\"Generation \" + Pool.generation, 10, 80);\n \n //Draw score\n g2d.setColor(Color.WHITE);\n trb = new Font(\"TimesRoman\", Font.BOLD, 28);\n g2d.setFont(trb);\n g2d.drawString(\"\" + score, WIDTH/2, 100);\n \n }", "public void act() \n {\n String worldname = getWorld().getClass().getName();\n if (worldname == \"Level0\")\n setImage(new GreenfootImage(\"vibranium.png\"));\n else if (worldname == \"Level1\")\n setImage(rocket.getCurrentImage());\n setLocation(getX()-8, getY()); \n if (getX() == 0) \n {\n getWorld().removeObject(this);\n }\n \n }", "protected void timeIsOver(){\n //Gets all the boats that are not placed\n for(BoatDrawing myBoat : boatMap.values()){\n while(!myBoat.isPlaced()){\n //Sets a non placed boat with a random position with a random rotation\n activeBoat=myBoat;\n Random rn = new Random(); \n draw(activeBoat, rn.nextInt(NB_CASES_GRID), rn.nextInt(NB_CASES_GRID));\n if(rn.nextInt(RANDOM_ROTATION)==1){\n drawRotation(activeBoat);\n } \n if(positionCorrect(myBoat)){\n //If the position is corrrect, draws the boat\n this.placeBoat(myBoat);\n }\n }\n }\n onValidate();\n }", "public void update()\n {\n // get the GridSquare object from the world\n Terrain terrain = game.getTerrain(row, column);\n boolean squareVisible = game.isVisible(row, column);\n boolean squareExplored = game.isExplored(row, column);\n \n if (game.hasPlayer(row, column)){\n setImage2(\"images/player.png\");\n } else {\n player = null;\n }\n \n //ImageIcon image = null;//new ImageIcon(\"images/blank.png\");\n JLabel lblImage = new JLabel(); // create a new label to put an image on\n \n // call the method to set a new Buffered image to this panel\n \n if (squareVisible && image == null){\n switch ( terrain )\n {\n case SAND : setImage(\"images/sand.png\"); break;// = new ImageIcon(\"images/sand.png\"); break;\n case FOREST : setImage(\"images/forest.png\"); break;\n case WETLAND : setImage(\"images/wetland.png\"); break;\n case SCRUB : setImage(\"images/scrub.png\"); break;\n case WATER : setImage(\"images/water.png\"); break;\n default : image = null; break;\n }\n }\n \n// this is old code that use to change the graphics, trying BufferedImage instead of IconImage\n// switch ( terrain )\n// {\n// case SAND : setImage(\"images/forest.png\");// = new ImageIcon(\"images/sand.png\"); break;\n// case FOREST : image = new ImageIcon(\"images/forest.png\"); break;\n// case WETLAND : image = new ImageIcon(\"images/wetland.png\"); break;\n// case SCRUB : image = new ImageIcon(\"images/scrub.png\"); break;\n// case WATER : image = new ImageIcon(\"images/water.png\"); break;\n// default : image = null; break;\n// }\n \n if ( squareExplored || squareVisible )\n {\n // Set the text of the JLabel according to the occupant\n lblText.setText(game.getOccupantStringRepresentation(row,column)); \n }\n else {\n lblText.setText(\"\");\n image = null;\n }\n \n // if the game is not being played, remove the activeBorder (this fixes the multiple borders glitch)\n// if (game.getState() != GameState.PLAYING) {\n// setBorder(normalBorder);\n// } \n \n // set the redsquare border to active if the player is here\n setBorder(game.hasPlayer(row,column) ? activeBorder : normalBorder);\n \n\n // add the imageIcon to the gridsquare panel\n //lblImage.setIcon((Icon) image); // add the image to the label\n this.add(lblImage); // add the jlabel image to the current gridsquare\n \n JLabel lblImage2 = new JLabel(); \n this.add(lblImage2);\n \n }", "public void update() {\n if (this.active) {\n GameObject.processing.image(this.image, this.xPosition, this.yPosition);\n }\n }", "@Override\n\tpublic void drawMe(Graphics2D g2) {\n\t\tg2.drawImage(punishmentImg, PosX*60, PosY*60, 60, 60, null);\n\t}", "public void timer() {\r\n date.setTime(System.currentTimeMillis());\r\n calendarG.setTime(date);\r\n hours = calendarG.get(Calendar.HOUR_OF_DAY);\r\n minutes = calendarG.get(Calendar.MINUTE);\r\n seconds = calendarG.get(Calendar.SECOND);\r\n //Gdx.app.debug(\"Clock\", hours + \":\" + minutes + \":\" + seconds);\r\n\r\n buffTimer();\r\n dayNightCycle(false);\r\n }", "@Override\r\n public void handle(long now) {\n\r\n long timepassed = System.currentTimeMillis() - startTime;\r\n long secondspassed = timepassed / 1000;\r\n\r\n // System.out.println(secondspassed);\r\n if (secondspassed > old) {\r\n gameController.timeEdit(-secondspassed + old);\r\n // gameController.setTime(gameController.getTime()-secondspassed+old);\r\n old = secondspassed;\r\n }\r\n timerLabel.setText(\"TIME LEFT: \" + (int) (gameController.getTime()));\r\n secs = (int) secondspassed % 60;\r\n mins = (int) secondspassed / 60;\r\n timeplayedLabel.setText(\"time elapsed: \" + mins + \" : \" + secs);\r\n\r\n\r\n if (myObjects.size() < 1) {\r\n List<ISliceableObject> newMyObjects = gameController.createGameObject(1);\r\n myObjects.addAll(newMyObjects);\r\n\r\n for (ISliceableObject object : myObjects) {\r\n objectsOnScreen.put(object.getImageView(), object);\r\n object.getImageView().setOnMouseMoved(new EventHandler<MouseEvent>() {\r\n @Override\r\n public void handle(MouseEvent event) {\r\n if (objectsOnScreen.get(event.getTarget()).isSliced() == false && runFlag == true) {\r\n objectsToSlice.add(objectsOnScreen.get(event.getTarget()));\r\n }\r\n }\r\n });\r\n pane.getChildren().add(object.getImageView());\r\n }\r\n }\r\n gameController.updateObjectsLocations(myObjects, objectsToRemove);\r\n\r\n\r\n slice(objectsToSlice);\r\n objectsToSlice.clear();\r\n myObjects.removeAll(objectsToRemove);\r\n moveOffScreen(objectsToRemove);\r\n objectsToRemove.clear();\r\n if(gameController.getScore()>gameController.getBest())//bisho: real time highest score\r\n bestLabel.setText(\"Highest score: \" + gameController.getScore());\r\n scoreLabel.setText(\"Current Score: \" + gameController.getScore());\r\n livesLabel.setText(\"LIVES: \" + gameController.getLives());\r\n if (gameController.checkGameOver()) {// bisho: gameover check (bool return) and alert box if true\r\n endGame(stage);\r\n }\r\n ///////////////////////////////////////////////////////////////////////////////\r\n\r\n }", "public void setStaticPictureFps(float fps);", "public void act() {\n setImage(myGif.getCurrentImage());\n }", "@Override\n public void update() {\n update(Pong.STANDARD_FRAMETIME);\n }", "public void timeChanged();", "public void death(){\n setCoordinate(super.getGameImage().getCoordInit());\n diminueVies();\n super.initAnimation();\n\n }", "private void gameLoop() {\n\n looping = true;\n long lastTime = System.currentTimeMillis();\n while (looping) {\n long delta = System.currentTimeMillis() - lastTime;\n if (delta >= 1000/60d) {\n view.render();\n game.update(delta);\n lastTime = System.currentTimeMillis();\n }\n }\n }", "public void timer() \r\n\t{\r\n\t\tSeconds.tick();\r\n\t \r\n\t if (Seconds.getValue() == 0) \r\n\t {\r\n\t \tMinutes.tick();\r\n\t \r\n\t \tif (Minutes.getValue() == 0)\r\n\t \t{\r\n\t \t\tHours.tick();\r\n\t \t\t\r\n\t \t\tif(Hours.getValue() == 0)\r\n\t \t\t{\r\n\t \t\t\tHours.tick();\r\n\t \t\t}\r\n\t \t}\r\n\t }\t\t\r\n\t \r\n\t updateTime();\r\n\t }", "public void setTime()\n \t{\n \t\tif( !paused )\n \t\t{\n\t \t\tlong playingTime = System.currentTimeMillis() - startTime;\n\t \t\tlong timeLeft = 180000 - playingTime;\n\t \t\tlong min = timeLeft / 60000;\n\t \t\tlong sec = ( timeLeft - ( min * 60000 ) ) / 1000L;\n\t \t\t\n\t \t\tif( timeLeft < 0 )\n\t \t\t{\n\t \t\t\t//Game over!\n\t \t\t\tgameOver();\n\t \t\t\treturn;\n\t \t\t}\n\t \t\t\n\t \t\tString s = \"Time: \";\n\t \t\ts += Integer.toString( (int)min ) + \":\";\n\t \t\tif( sec >= 10 )\n\t \t\t\ts += Integer.toString( (int)sec );\n\t \t\telse\n\t \t\t\ts += \"0\" + Integer.toString( (int)sec );\n\t \t\t\n\t \t\ttimerLabel.setText( s );\n \t\t}\n \t}", "public void act()\n { \n if(returnTime.millisElapsed() > 1000) { //time count down every second\n time --;\n }\n \n if (time == 0) { \n bgm.stop();\n Greenfoot.stop();\n }\n \n showCredit();\n }", "public void teleopPeriodic() \n {\n // NIVision.Rect rect = new NIVision.Rect(10, 10, 100, 100);\n /*\n NIVision.IMAQdxGrab(session, frame, 1);\n //NIVision.imaqDrawShapeOnImage(frame, frame, rect,\n // DrawMode.DRAW_VALUE, ShapeMode.SHAPE_OVAL, 0.0f);\n */\n \n //cam.getImage(frame);\n //camServer.setImage(frame);\n \n //CameraServer.getInstance().setImage(frame);\n \n if(verticalLift.limitSwitchHit())\n verticalLift.resetEnc();\n \n Scheduler.getInstance().run();\n }", "public void draw() {\n /* put graphical code here, runs repeatedly at defined framerate in setup, else default at 60fps: */\n if (renderingForce == false) {\n background(255); \n //imageMode(CORNERS);\n image(outputSplat, 0, 0);\n world.draw();\n checkChangeColor();\n }\n}", "public void superPacman(){\n setSuperPacman(true);\n\n for(VisualObject v : Map.visualObjects){\n if(v.getClass().getGenericSuperclass() == Fantome.class){\n ((Fantome)v).changeSpriteAnimation(\"./data/SpriteMouvement/FantomePeur/\");\n ((Fantome)v).initAnimation();\n }\n }\n new Thread(() -> {\n //mettre la nouvelle image du superpacman\n try {\n TimeUnit.SECONDS.sleep(10);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n setSuperPacman(false);\n for(VisualObject v : Map.getVisualObjects()){\n if(v.getClass().getGenericSuperclass() == Fantome.class){\n ((Fantome)v).initSpriteAnimation();\n ((Fantome)v).initAnimation();\n }\n }\n }).start();\n\n }", "@Override\r\n\tpublic void gameOver() {\n\t\tgameOver = true;\r\n\t\tupdate();\r\n\t}", "public void setTimeLine(double time) {\n if (yCoord != 0) {\n try {\n offscreen.setRGB(0, yCoord, width, 1, pixels, 0, 0);\n } catch (Exception ex) {\n }\n }\n if (time > 0.0 && time < 1.0) {\n // store the new time line to the restoration array\n timeValue = time;\n yCoord = (int) (timeValue * height);\n offscreen.getRGB(0, yCoord, width, 1, pixels, 0, 0);\n for (int x = 0; x < width; x++) {\n pixels[x] ^= 0x00FFFFFF;\n }\n offscreen.setRGB(0, yCoord, width, 1, pixels, 0, 0);\n for (int x = 0; x < width; x++) {\n pixels[x] ^= 0x00FFFFFF;\n }\n }\n }", "public void act() \n {\n setImage(\"1up.png\");\n setImage(\"acrate.png\");\n setImage(\"Betacactus.png\");\n setImage(\"bullet1.png\");\n setImage(\"bullet2.png\");\n setImage(\"burst.png\");\n setImage(\"cowboy.png\");\n setImage(\"fOxen1.png\");\n setImage(\"fOxen2.png\");\n setImage(\"fOxen3.png\");\n setImage(\"fOxen4.png\");\n setImage(\"fOxenH.png\");\n setImage(\"fWagon1.png\");\n setImage(\"fWagon2.png\");\n setImage(\"fWagon3.png\");\n setImage(\"fWagon4.png\");\n setImage(\"fWagonH.png\");\n setImage(\"health.png\");\n setImage(\"indian.png\");\n setImage(\"normal.png\");\n setImage(\"oxen.png\");\n setImage(\"oxen2.png\");\n setImage(\"oxen3.png\");\n setImage(\"oxen4.png\");\n setImage(\"oxen-hit.png\");\n setImage(\"plasma.png\");\n setImage(\"rapid.png\");\n setImage(\"snake1.png\");\n setImage(\"snake2.png\");\n setImage(\"snake3.png\");\n setImage(\"snake4.png\");\n setImage(\"spread.png\");\n setImage(\"theif.png\");\n setImage(\"train1.png\");\n setImage(\"train-hit.png\");\n setImage(\"wagon.png\");\n setImage(\"wagonhit.png\");\n setImage(\"wave.png\");\n getWorld().removeObject(this);\n }", "@Override\n\tpublic void draw() {\n\t\tdouble t = System.currentTimeMillis();\n\t\tdouble dt = t - currentTime;\n\t\tcurrentTime = t;\n\n\t\t// Fetch current animation\n\t\tBaseAnimation animation = AnimationManager.getInstance().getCurrentAnimation();\n\t\tif (animation == null) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Draw animation frame with delta time\n\t\tanimation.draw(dt);\n\n\t\t// Send image to driver\n\t\tdriver.displayImage(animation.getImage());\n\n\t\t// Display previews\n\t\tbackground(0);\n\t\tif (ledPreviewEnabled) {\n\t\t\timage(preview.renderPreview(animation.getImage()), 0, 0);\n\t\t} else {\n\t\t\ttextAlign(CENTER);\n\t\t\ttextSize(16);\n\t\t\ttext(\"Press W to preview the animation.\", previewRect.width/2, previewRect.height/2);\n\t\t}\n\t\t\n\t\tif (sourcePreviewEnabled && BaseCanvasAnimation.class.isAssignableFrom(animation.getClass())) {\n\t\t\timage(((BaseCanvasAnimation) animation).getCanvasImage(), 0, 0);\n\t\t} else if (sourcePreviewEnabled) {\n\n\t\t\t// Copy animation image (else the animation image gets resized)\n\t\t\t// and scale it for better visibility\n\t\t\tPImage sourcePreview = animation.getImage().get();\n\t\t\tsourcePreview.resize(130, 405);\n\n\t\t\timage(sourcePreview, 0, 0);\n\t\t}\n\n\t}", "public void runAnimation() {\n int fps = 0;\n int frames = 0;\n long totalTime = 0;\n long curTime = System.currentTimeMillis();\n long lastTime = curTime;\n // Start the loop.\n while (true) {\n try {\n // Calculations for FPS.\n lastTime = curTime;\n curTime = System.currentTimeMillis();\n totalTime += curTime - lastTime;\n if (totalTime > 1000) {\n totalTime -= 1000;\n fps = frames;\n frames = 0;\n }\n ++frames;\n // clear back buffer...\n g2d = buffer.createGraphics();\n g2d.setColor(Color.WHITE);\n g2d.fillRect(0, 0, X, Y);\n // Draw entities\n ArrayList<Spawn> living = new ArrayList<Spawn>();\n if (engine != null) {\n living.addAll(engine.getFullState().living);\n }\n for (int i = 0; i < living.size(); i++) {\n g2d.setColor(Color.BLACK);\n Spawn s = living.get(i);\n g2d.fill(new Ellipse2D.Double(s.getX(), s.getY(), s.getRadius() * 2, s.getRadius() * 2));\n }\n for (int i = 0; i < living.size(); i++) {\n g2d.setColor(Color.RED);\n Spawn s = living.get(i);\n g2d.drawLine((int) (s.getCenterX()), (int) (s.getCenterY()), (int) (s.getCenterX() + s.vx()), (int) (s.getCenterY() + s.vy()));\n }\n // display frames per second...\n g2d.setFont(new Font(\"Courier New\", Font.PLAIN, 12));\n g2d.setColor(Color.GREEN);\n g2d.drawString(String.format(\"FPS: %s\", fps), 20, 20);\n // Blit image and flip...\n graphics = b.getDrawGraphics();\n graphics.drawImage(buffer, 0, 0, null);\n if (!b.contentsLost())\n b.show();\n // Let the OS have a little time...\n Thread.sleep(15);\n } catch (InterruptedException e) {\n } finally {\n // release resources\n if (graphics != null)\n graphics.dispose();\n if (g2d != null)\n g2d.dispose();\n }\n }\n }", "public void updateScreen() {\n\t\t++this.panoramaTimer;\n\t}", "public void update()\n\t{\n\t\t// Place this GameCanvas at the proper location and size\n\t\tthis.setBounds(0, 0, game.getWindow().getWidth(), game.getWindow().getHeight());\n\t\t\n\t\tif (timeCount > game.getFps())\n\t\t\ttimeCount = 0;\n\t\t\n\t\ttimeCount++;\n\t}", "@Override\n public void reactTo(Tick tick) {\n\ttry {\n\t Thread.sleep(FRAME_INTERVAL_MILLIS);\n\t} catch (InterruptedException e) {\n\t // TODO Auto-generated catch block\n\t e.printStackTrace();\n\t}\n\tscreen.update();\n\tmpq.add(new Tick(tick.time() + 1));\n }", "protected void changePic() {\nif(framesforUser.isEmpty())\n{\nToast.makeText(getApplicationContext(), \"Finished!\", Toast.LENGTH_LONG);\nmodeTextView.setText(\"Finished\");\nnewImgButton.setEnabled(false);\n\n}\nelse{\n\tCollections.shuffle(framesforUser);\n\n\tcurrentPicIndex=framesforUser.get(0);\n\n\t\t Log.e(\"SY\", \"Current PicIndex= \"+currentPicIndex+\" \"+framesforUser.get(0));\n\t\t currentOverlay = getResources().getDrawable(resourcefromframeorder[framesforUser.get(0)]);\n\t\t \n\t\t overlayview.setImageDrawable(currentOverlay);\n\t\t cameraframe.removeView(overlayview);\n\t\t cameraframe.addView(overlayview,1);\n\n\t\t framenumTextView.setText(currentPicIndex+\"\");\n\t\t\tcountdownView.setText(framesforUser.size()+\"\");\n\n\t}\n }", "@Override\n void planted() {\n super.planted();\n TimerTask Task = new TimerTask() {\n @Override\n public void run() {\n\n for (Drawable drawables : gameState.getDrawables()) {\n if (drawables instanceof Zombie) {\n int distance = (int) Math.sqrt(Math.pow((drawables.x - x), 2) + Math.pow((drawables.y - y), 2));\n if (distance <= explosionradious) {\n ((Zombie) drawables).hurt(Integer.MAX_VALUE);\n }\n }\n }\n\n life = 0;\n }\n\n };\n\n Timer timer = new Timer();\n timer.schedule(Task, 2000);\n }", "public void timeChanged( int newTime );", "public void tick() {\n\r\n\t\tdouble angle = Math.atan2(getY()-y, getX()-x);\r\n\t\tif(seeking||Math.sqrt(((getX()-x)/1000)*((getX()-x)/1000)+((getY()-y)/1000)*((getY()-y)/1000))*1000>range[stage]){\r\n\r\n\t\t\tx += (int)(speed *Math.cos(angle));\r\n\t\t\ty += (int)(speed *Math.sin(angle));\t\t\r\n\t\t}else if(stage==0){\r\n\t\t\tstage=1;\r\n\t\t}\r\n\t\telse seeking = true;\r\n\t\tif(health<=0)\r\n\t\t{\r\n\t\t\tHandler.removeObject(this);\r\n\t\t\trage = rage + 1;\r\n\r\n\t\t}\r\n\t}", "public void act() \n {\n\n if(isTouching(Car.class))\n {\n Lap = Lap + 1;\n if ((Lap % 11) == 0)\n {\n String lap = Integer.toString(Lap / 11);\n\n getWorld().showText(lap, 450, 30);\n getWorld().showText(\"Lap:\", 400, 30);\n }\n } \n if (Lap == 47)\n {\n Greenfoot.stop();\n getWorld().showText(\"GameOver\",250,250);\n }\n }", "public void victory() {\n fieldInerface.setPleasedSmile();\n fieldInerface.timestop();\n int result = fieldInerface.timeGet();\n /*try {\n if (result < Integer.parseInt(best.getProperty(type))) {\n best.setProperty(type, Integer.toString(result));\n fieldInerface.makeChampionWindow(type);\n }\n } catch (NullPointerException e) {\n } catch (NumberFormatException e) {\n best.setProperty(type, Integer.toString(result));\n fieldInerface.makeChampionWindow(type);\n }*/\n\n gamestart = true; // new game isn't started yet!\n for (int j = 0; j < heightOfField; j++)\n for (int i = 0; i < widthOfField; i++)\n if (fieldManager.isCellMined(i, j))\n if (!fieldManager.isCellMarked(i, j)) {\n fieldInerface.putMarkToButton(i, j);\n fieldInerface.decrement();\n }\n gameover = true; // game is over!!\n }", "public void setTime(){\r\n \r\n }", "@Override\n public void draw(Graphics g){\n \n //Here we draw a portion of the sprite sheet, placing it at x and y on\n //the screen and drawing a portion of the sprite sheet defined\n //by the current frame\n g.drawImage(image, \n x, y, (x + width), (y + height),\n (currentFrame * width), 0, (currentFrame * width + width), height,\n null);\n \n //this is our logic to step through frames. We count frames until the\n //frame delay is up and then move to the next frame\n delayCount++;\n if (delayCount == frameDelay){\n currentFrame++;\n delayCount = 0;\n }\n \n if (currentFrame == frames) {\n currentFrame = 0;\n }\n }", "@Override\n\tpublic void render(Graphics2D g) {\n\t\tfloat alpha = (time)/(float)maxTime;\n\t\talpha = alpha < 0 ? 0 : alpha > 1 ? 1 : alpha;\n\t AlphaComposite composite = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 1 - alpha);\n\t g.setComposite(composite);\n\t //draw second\n\t g.drawImage(Images.splashBackground, 0, 0, null);\n\t //reset alpha\n\t composite = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 1.0f);\n\t g.setComposite(composite);\n\t \n\t //g.drawImage(Images.logo, (int)((Main.WIDTH / 2d) + Math.tan(textTime) * 40) - (int)(Main.WIDTH / 3d), Main.HEIGHT / 2, null);\n\t \n\t g.drawImage(Images.logo, (int)((Math.tan(textTime) * 135)) + 200, 200, null);\n\t \n\t //g.drawString(\"The Cleaning Lady:\", (int)((Main.width / 2d) + tan(time) * 40) - (int)(Main.width / 3d), (int)(Main.height / 4d));\n\t \n\t}", "public void gameOver() \n {\n Greenfoot.stop();\n }", "public void sleep()\r\n\t{\r\n\t\tif (regulate)\r\n\t\t{\r\n\t\t\tDisplay.sync(fps);\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic void gameOver() {\n\t\tover = true;\r\n\t\tupdate();\r\n\t}", "public void changeImage() {\r\n this.image = ColourDoor.image2;\r\n }", "public boolean draw(Canvas canvas) {\n\t\t x += xVelocity;\n\t\t y -= yVelocity;\n\t\t setYVelocity(yVelocity - gravity);\n\t\t //System.out.println(xVelocity+ \" \"+yVelocity + \" \"+ x + \" \" +x);\n\t\t if((x <0 || x >1920) || (y > 500))\n\t\t\t return false;\n\t\t \n\t\t \n\t canvas.drawBitmap(bitmap,x,y, null);\n\t return true;\n\t \n\t}", "public void updateMoon(){\n if(TimeUtils.nanoTime() - lastTimeMoon > 20000000l){\n lastTimeMoon = TimeUtils.nanoTime();\n if(moonXposition + textureMoon.getWidth() >= Gdx.graphics.getWidth()){\n moonXposition = 0;\n isXAtBorder = true;\n lastTimeXAtBorder = TimeUtils.nanoTime();\n }\n else{\n moonXposition += 400f * Gdx.graphics.getDeltaTime();\n if(TimeUtils.nanoTime() - lastTimeXAtBorder > 500000000){\n isXAtBorder = false;\n }\n }\n }\n }", "@Override\n public void render() {\n if (!gameOver && !youWin) this.update();\n\n //Dibujamos\n this.draw();\n }", "@Override\n public void update() {\n adjustRenderHitbox();\n if (renderHurtboxes) {\n renderHurtbox.setRect(player.getHurtbox().x / 1920 * gameWidth, player.getHurtbox().y / 1080 * gameHeight, player.getHurtbox().width / 1920 * gameWidth, player.getHurtbox().height / 1080 * gameHeight);\n }\n updateAnimationLoop();\n }", "@Override\n\tpublic void draw(Canvas canvas) {\n\t\tif (hit && animTimer <= 100) {\n\t\t\tgraphicExt.draw(canvas);\n\t\t\tanimTimer++;\n\t\t\tif (animTimer == 100) {\n\t\t\t\tanimTimer = 0;\n\t\t\t\thit = false;\n\t\t\t}\n\t\t} else {\n\t\t\tgraphic.draw(canvas);\n\t\t}\n\t}" ]
[ "0.6481298", "0.6251526", "0.6224016", "0.61946684", "0.6151658", "0.609164", "0.5999379", "0.5990836", "0.5908802", "0.5891798", "0.5875189", "0.5860769", "0.5813589", "0.5807164", "0.57809454", "0.5779081", "0.5778483", "0.5760616", "0.5751517", "0.5749034", "0.5747079", "0.5728317", "0.57191855", "0.57145864", "0.5687072", "0.56708777", "0.56335557", "0.562632", "0.5619477", "0.55993426", "0.55928916", "0.55905354", "0.5589316", "0.5587112", "0.55681473", "0.5560023", "0.5554943", "0.5553757", "0.55535686", "0.5553172", "0.55261934", "0.5519041", "0.55022776", "0.54948914", "0.549404", "0.5492023", "0.5491137", "0.54859906", "0.548297", "0.5481692", "0.5481449", "0.5480327", "0.5478711", "0.5459297", "0.54474056", "0.5436813", "0.5434364", "0.5424515", "0.5422303", "0.5410415", "0.5409839", "0.540828", "0.5407342", "0.5403941", "0.54012173", "0.5398631", "0.5397952", "0.5396772", "0.5392608", "0.5384721", "0.5384267", "0.53819996", "0.53691876", "0.5367619", "0.53646123", "0.53623545", "0.5361693", "0.53587043", "0.53586614", "0.5354958", "0.5354606", "0.53442997", "0.53435075", "0.5341385", "0.5336284", "0.53284746", "0.5327113", "0.5321484", "0.5320225", "0.5307849", "0.5305704", "0.5304655", "0.53037673", "0.5295524", "0.5293228", "0.5285431", "0.5282707", "0.52819943", "0.5281919", "0.5281447" ]
0.5831871
12
Returns what the current image is
public Bitmap getImage(){ return images[currentFrame]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ImageIcon getCurrentImage() {\n\t\t\treturn this.currentImage;\n\t}", "public BufferedImage getCurrentImage(){\n\t\treturn getCurrentImage(System.currentTimeMillis()-lastUpdate);\n\t}", "public ImageArray getCurrentImage() {\n return currentIm;\n }", "public ColorImage getCurrentImage() {\n try {\n return currentImage.peek();\n } catch (EmptyStackException e) {\n return null;\n }\n }", "public String getImage() {\n\t\treturn image;\n\t}", "public String getImage() {\n\t\treturn image;\n\t}", "public ImageObj currentImage() {\n if (model.getImageList().size() == 0) {\n noImages = true;\n return new ImageObj(\"http://www.xn--flawiler-fachgeschfte-n2b.ch/wp-content/uploads/2016/09/sample-image.jpg\", \"No Image\");\n }\n return model.getImageList().get(position);\n }", "public Texture getCurrentFrame(){\n\t\treturn images[currentFrame];\n\t}", "public ImageInfo getImage() {\n return image;\n }", "private Image getCurrentPicture(){\r\n\t\tif (i >= images.size()) {\r\n\t\t\ti = 0;\r\n\t\t}else if(i<0){\r\n\t\t\ti = images.size() -1;\r\n\t\t}\r\n\t\treturn new Image(images.get(i).getUrl());\r\n\t}", "public Stack<ColorImage> getCurrentImageHistory() {\n return currentImage;\n }", "java.lang.String getImage();", "public BufferedImage getImage() {\n\t\tTelaInterna ti = ( TelaInterna )contentPane.getSelectedFrame();\n\t\tBufferedImage img;\n\t\timg = ti.getImage();\n\t\treturn img;\n\t}", "public String getNewImage() {\r\n\t\treturn newImage;\r\n\t}", "public String getImage() {\n return this.Image;\n }", "public int getImage();", "String getImage();", "public static Image target()\n\t{\n\t\treturn targetImg;\n\t}", "public String getImage() { return image; }", "public ImageIdentifier getImageIdentifier() {\n synchronized (this.imageLock) {\n return this.animation.getCurrentImage();\n }\n }", "public String getCurrentUserPicture() {\n\t\treturn currentUser.getPicture();\n\t}", "public String getImage()\n {\n return image;\n }", "public String getImage() {\n return image;\n }", "public String getImage() {\n return image;\n }", "public String getImage() {\n return image;\n }", "public String getImage() {\n return image;\n }", "Imagem getImagem();", "@Override\r\n\tpublic Image getImg() {\n\t\treturn img.getImage();\r\n\t}", "public String getImage() {\n\t\treturn null;\n\t}", "public Image getImage() {\n\t\treturn image;\r\n\t}", "public String getImage() {\n return image;\n }", "public Image getImage() {\n\t\treturn image;\n\t}", "public Image getImage() {\n\t\treturn image;\n\t}", "public BufferedImage getImage() {\t\r\n\t\treturn this.image;\t\t\t\r\n\t}", "public Image getImage() {\r\n\t\treturn GDAssemblerUI.getImage(GDAssemblerUI.IMAGE_GD);\r\n\t}", "public String getImageSource() {\r\n return imageSource;\r\n }", "public Image getImage() {\r\n\t\treturn image;\r\n\t}", "@Override\n\tpublic Matrix getCurrentImageViewMatrix() {\n\t\treturn mContext.getMainImage().getDisplayMatrix();\n\t}", "public java.lang.String getEatImage() {\n return localEatImage;\n }", "public String getSourceImage() {\n return sourceImage;\n }", "public java.lang.String getIdleImage() {\n return localIdleImage;\n }", "public BufferedImage getImage() {\n\t\treturn this.image;\n\t}", "public YuiImage getSelectedImg() {\r\n\t\treturn selectedImg;\r\n\t}", "public Image getInstanceImage() {\r\n return this.image;\r\n }", "public String getImageFile() {\n\t\treturn imagefile;\n\t}", "public BufferedImage getCurrentFrame(){\n\t\tif(first)\n\t\t\treturn animation_frame[index];\n\t\telse\n\t\t\treturn animation_frame[0];\n\t\t\n\t}", "@Override\n\tpublic Image getImage() {\n\t\treturn image;\n\t}", "BufferedImage getSelectedImage();", "@Override\r\n\tpublic int getImage() {\n\t\treturn Parametre.BALLE;\r\n\t}", "public Image getState () {\n\t\treturn images[state];\n\t}", "public ImageIcon getImage(){\n\t\treturn this.image;\n\t}", "public final ImageProcessor getImage() {\r\n return image;\r\n }", "public String getImage() {\n\t\tString ans=\"Data/NF.png\";\n\t\tif(image!=null)\n\t\t\tans=\"Data/Users/Pics/\"+image;\n\t\treturn ans;\n\t}", "@Override\n\tpublic Image getImage() {\n\t\treturn img;\n\t}", "public BufferedImage getImage() {\n\t\t return img;\n\t}", "public Image getImage() {\n\t\t// Check we have frames\n\t\tif(frames.size() == 0) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\treturn getFrame(currentFrameIndex).image;\n\t\t}\n\t}", "public Image getImage() {\n\t\tif (State == \"NORMAL\") {\n\t\t\tBox = sBoxNormal.getImage();\n\t\t} else if (State == \"OK\") {\n\t\t\tBox = sBoxGoal.getImage();\n\t\t}\n\t\treturn Box;\n\t}", "public boolean isActiveImage() {\r\n return this.activeImage;\r\n }", "public Image getShowImage() {\n\t\treturn showImage;\n\t}", "public String getImg(){\n switch(image){\n case 0: // Case 0: Ant looks up/north\n return \"imgs/ant_n.png\";\n case 1: // Case 1: Ant looks right/east\n return \"imgs/ant_e.png\";\n case 2: // Case 2: Ant looks down/south\n return \"imgs/ant_s.png\";\n case 3: // Case 3: Ant looks left/west\n return \"imgs/ant_w.png\";\n default: // Default: This shouldn't happen on a normal run. It returns an empty string and prints an error.\n System.err.println(\"Something went wrong while the ant was trying change direction\");\n return \"\";\n }\n }", "public Image getImage() {\n return (isFacingRight) ? Images.get(\"rightTedhaun\") : Images.get(\"leftTedhaun\");\n }", "public String getImgOriginal() {\r\n return imgOriginal;\r\n }", "public Sprite getCurrentSprite() {\n\t\tif (this.getVx() <= 0) {\n\t\t\treturn getImages()[0];\n\t\t}\n\t\treturn getImages()[1];\n\t}", "public javax.activation.DataHandler getPicture() {\r\n return localPicture;\r\n }", "public ImageIcon getImage() {\n\t\treturn this.image;\n\t}", "public ImageIcon image() {\n return image;\n }", "public BufferedImage getCurrentImage(long elapsed){\n\t\telapsed += millisIntoFrame;\n\t\tthis.millisIntoFrame = elapsed%millisPerFrame;\n\t\tif (looping){\n\t\t\tthis.currentFrame = (int) ((currentFrame+(elapsed/millisPerFrame))%images.length);\n\t\t}\n\t\telse{\n\t\t\tthis.currentFrame = (int) (currentFrame+(elapsed/millisPerFrame));\n\t\t\tif(currentFrame >= images.length){\n\t\t\t\tthis.currentFrame = images.length-1;\n\t\t\t\tthis.finished = true;\n\t\t\t}\n\t\t}\n\t\treturn images[currentFrame];\n\t}", "public Image getImage() {\r\n return image;\r\n }", "public String getImageToDisplay() {\n return imageToDisplay;\n }", "public boolean loadCurrentImage()\n\t{\n\t\timgPlus = WindowManager.getCurrentImage();\n\t\tif ( imgPlus == null )\n\t\t{\n\t\t\tIJ.error( \"There must be an active, open window!\" );\n\t\t\treturn false;\n\t\t}\n\t\t// final int[] dims = imgPlus.getDimensions(); // width, height,\n\t\t// nChannels, nSlizes, nFrames\n\t\t// if ( dims[ 3 ] > 1 || dims[ 4 ] < 1 ) {\n\t\t// IJ.error(\n\t\t// \"The active, open window must contain an image with multiple frames, but no slizes!\"\n\t\t// );\n\t\t// return;\n\t\t// }\n\t\treturn true;\n\t}", "public Rectangle getImage() {\n\t\treturn image;\n\t}", "public Image getImage() {\n return image;\n }", "public Image getImage() {\n return image;\n }", "public PImage getImage() {\n return this.image;\n }", "public String getImageName() {\r\n\t\treturn _imageName;\r\n\t}", "public Image getImage() {\r\n\t\tif (isShieldActivated()) {\r\n\t\t\treturn GameGUI.SPACESHIP_IMAGE_SHIELD;\r\n\t\t}\r\n\t\treturn GameGUI.SPACESHIP_IMAGE;\r\n\t}", "public String getOriginalImg() {\n return originalImg;\n }", "public BufferedImage getImage() {\n return image;\n }", "public Picture picture() {\n return new Picture(current);\n }", "public final String getImageName() {\n return this.imageName;\n }", "public char getCurrentIcon(){\n\t\treturn icon;\r\n\t}", "public String getSourceImageName() {\n return this.sourceImageName;\n }", "public String getCurrentPhotoPath() { return mCurrentPhotoPath; }", "public BufferedImage image(){\n\t\treturn shotPic;\n\t}", "public ImageIcon getImage()\n {\n return image;\n }", "private void displayCurrentPicture() {\r\n\t\tglobalContainer.setWidget(0, 0, getCurrentPicture());\r\n\t}", "public abstract BufferedImage getSnapshot();", "public javafx.scene.image.Image getImage() {\n return super.getImage();\n }", "public javafx.scene.image.Image getImage() {\n return super.getImage();\n }", "public javafx.scene.image.Image getImage() {\n return super.getImage();\n }", "public Integer getImageResource(){\n return mImageResource;\n }", "public float getIMG(){\n return profile.getImg();\n }", "public abstract String getImageFormat();", "public BufferedImage getImage() {\n/* 81 */ return this.bufImg;\n/* */ }", "public String getpImage() {\n return pImage;\n }", "public Bitmap getBitmap() {\n\t\treturn this.initialBitmap;\r\n\t}", "public static ImageIcon importState() {\n if(isImChose) {\n if(isImPress)\n return imPre;\n if(isImHover)\n return imChoHov;\n return imCho;\n }\n if(isImPress)\n return imPre;\n if(isImHover)\n return imHov;\n return imDef; \n }", "public BufferedImage queryImage() {\n\t\treturn cloud;\n\t}", "@Override\n\tpublic final Image getImage() {\n\t\treturn this.getSprite().getImage();\n\t}", "public BufferedImage getImage()\r\n\t{\r\n\t\treturn mImageBuffer;\r\n\t}" ]
[ "0.7881672", "0.7811634", "0.7461439", "0.71530473", "0.69913083", "0.69913083", "0.6953021", "0.6946012", "0.6937818", "0.6874533", "0.68418056", "0.68245995", "0.6817332", "0.6771992", "0.6768702", "0.67498994", "0.6733908", "0.6727789", "0.6726959", "0.66924906", "0.66921973", "0.66530347", "0.6641001", "0.6641001", "0.6641001", "0.6641001", "0.66258556", "0.6624249", "0.66200733", "0.6619992", "0.66162294", "0.6609608", "0.6609608", "0.6604394", "0.66003495", "0.65995187", "0.65960425", "0.6585425", "0.65825766", "0.6563535", "0.65547746", "0.65525794", "0.65461016", "0.6544819", "0.65368575", "0.6526188", "0.65176326", "0.64966387", "0.64945966", "0.6488368", "0.64831924", "0.648133", "0.6475687", "0.64737225", "0.64598596", "0.6452553", "0.64516956", "0.64492613", "0.64475614", "0.64434975", "0.64401025", "0.6427234", "0.64271545", "0.6413461", "0.6409571", "0.63931763", "0.6393003", "0.63835686", "0.6373404", "0.6371355", "0.636528", "0.63219064", "0.63142526", "0.63112766", "0.6295132", "0.6290767", "0.629056", "0.6286666", "0.62859803", "0.62856966", "0.6284344", "0.6276952", "0.62667227", "0.626339", "0.6262719", "0.62497157", "0.6248089", "0.62414825", "0.62414825", "0.62414825", "0.62401044", "0.6236838", "0.62303656", "0.6230166", "0.6226058", "0.6224521", "0.62211204", "0.6203857", "0.62002397", "0.61797076" ]
0.68393075
11
length of DNA drawn in graph by draw() Initializes a sequence from a string.
public Sequence(String s) { for (char c : s.toCharArray()) { if (isValid(c)) seq.add(c); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getLength(){\n return sequence.length(); \n\t}", "public RandomString(int length) {\n\t\tthis(length, new SecureRandom());\n\t}", "public int normalizedLength(List<String> sequence);", "Sequence(String inString) {\r\n // Allocate bytes for the sequence\r\n seqArray = new byte[(int)Math.ceil(inString.length() / 4.0)];\r\n seqLength = inString.length();\r\n\r\n for (int i = 0; i < inString.length(); i++) {\r\n // Begin at the start of byte minus 2, then subtract\r\n // the number of bits into the byte we are\r\n int bytePos = 6 - (i % 4) * 2;\r\n // Divide by the current position in string to find current byte\r\n int currByte = i / 4;\r\n char currChar = inString.charAt(i);\r\n if (currChar == 'A') {\r\n seqArray[currByte] |= 0 << bytePos;\r\n }\r\n else if (currChar == 'C') {\r\n seqArray[currByte] |= 1 << bytePos;\r\n }\r\n else if (currChar == 'G') {\r\n seqArray[currByte] |= 2 << bytePos;\r\n }\r\n else if (currChar == 'T') {\r\n seqArray[currByte] |= 3 << bytePos;\r\n }\r\n else {\r\n System.out.print(\"Could not create sequence!\");\r\n }\r\n }\r\n }", "public int getLength() {\r\n return this.seqLength;\r\n }", "private int countLength ( StringBuffer sequence )\n{\n int bases = 0;\n\n // Count up the non-gap base characters.\n for ( int i = 0; i < sequence.length (); i++ )\n\n if ( sequence.charAt ( i ) != '*' ) bases++;\n\n return bases;\n}", "Length createLength();", "public RandomString(int length, Random random) {\n\t\tthis(length, random, RandomString.alphanum);\n\t}", "public int length() {\n return aminoAcidSequence.length();\n }", "public int getLength()\n {\n return seq.length;\n }", "public abstract void createLongestRepeatedSubstring();", "public Individual(String s){\n this.dna = s.toCharArray();\n }", "private static void longestRepeatingSubsequence(String string) {\n\t\t\n\t}", "static int size_of_lda(String passed){\n\t\treturn 3;\n\t}", "Length initLength(Length iLength)\n {\n iLength.updateElementValue(\"Length\");\n return iLength;\n }", "static int size_of_ani(String passed){\n\t\treturn 2;\n\t}", "public NGram(String string) {\n this(string, false, false);\n }", "static int size_of_inr(String passed){\n\t\treturn 1;\n\t}", "static int size_of_dcr(String passed){\n\t\treturn 1;\n\t}", "@Override\r\n\tpublic int length() {\n\t\treturn chars.length;\r\n\t}", "public void fill(String seqInput) throws BaseException\n {\n fill(seqInput.split(\"\"));\n }", "public static String generateString(String characters, int length) {\r\n Random rng = new Random();\r\n char[] text = new char[length];\r\n for (int i = 0; i < length; i++)\r\n {\r\n text[i] = characters.charAt(rng.nextInt(characters.length()));\r\n }\r\n return new String(text);\r\n }", "public int get_length();", "protected abstract int decodeLength ();", "public abstract int length();", "public abstract int length();", "public static final String generate(int length) {\r\n\t\tif (length <= 0 || length > 100000) {\r\n\t\t\tSystem.out.println(\"Invalid length! We accept [0-100 000]!\");\r\n\t\t\treturn randomString;\r\n\t\t} else {\r\n\t\t\tfor (int i = 0; i < length; i++) {\r\n\t\t\t\trandomRange = rand.nextInt((NUMBERS - CAPITAL_LETTERS) + 1) + CAPITAL_LETTERS;\r\n\r\n\t\t\t\tif (randomRange == CAPITAL_LETTERS) {\r\n\t\t\t\t\trandomNumber = rand\r\n\t\t\t\t\t\t\t.nextInt((CAPITAL_LETTERS_MAX_ASCII_CHARACTER - CAPITAL_LETTERS_MIN_ASCII_CHARACTER) + 1)\r\n\t\t\t\t\t\t\t+ CAPITAL_LETTERS_MIN_ASCII_CHARACTER;\r\n\t\t\t\t} else if (randomRange == LOWERCASE_LETTERS) {\r\n\t\t\t\t\trandomNumber = rand.nextInt(\r\n\t\t\t\t\t\t\t(LOWERCASE_LETTERS_MAX_ASCII_CHARACTER - LOWERCASE_LETTERS_MIN_ASCII_CHARACTER) + 1)\r\n\t\t\t\t\t\t\t+ LOWERCASE_LETTERS_MIN_ASCII_CHARACTER;\r\n\t\t\t\t} else if (randomRange == NUMBERS) {\r\n\t\t\t\t\trandomNumber = rand.nextInt((NUMBERS_MAX_ASCII_CHARACTER - NUMBERS_MIN_ASCII_CHARACTER) + 1)\r\n\t\t\t\t\t\t\t+ NUMBERS_MIN_ASCII_CHARACTER;\r\n\t\t\t\t}\r\n\t\t\t\trandomString += (char) randomNumber;\r\n\t\t\t}\r\n\t\t\treturn randomString;\r\n\t\t}\r\n\r\n\t}", "public int length() {\n/* 103 */ return this.m_str.length();\n/* */ }", "void mo9058ad(String str, int i);", "public LyricSentence (String str) {\n this(str, 0);\n }", "public int length();", "public int length();", "public int length();", "public int length();", "public int length();", "static int size_of_ral(String passed){\n\t\treturn 1;\n\t}", "public static String generateRandomID(int length, String characters) {\n String CHAR_LOWER = \"abcdefghijklmnopqrstuvwxyz\";\n if (characters != null) {\n CHAR_LOWER = characters;\n }\n final String CHAR_UPPER = CHAR_LOWER.toUpperCase();\n final String NUMBER = \"0123456789\";\n final String DATA_FOR_RANDOM_STRING = CHAR_LOWER + CHAR_UPPER + NUMBER;\n SecureRandom random = new SecureRandom();\n StringBuilder sb = new StringBuilder(length);\n for (int i = 0; i < length; i++) {\n int rndCharAt = random.nextInt(DATA_FOR_RANDOM_STRING.length());\n char rndChar = DATA_FOR_RANDOM_STRING.charAt(rndCharAt);\n sb.append(rndChar);\n }\n return sb.toString();\n }", "private int length() { return length; }", "public void setLength(int length) {\r\n this.length = length;\r\n }", "public void setLength(int length) {\r\n this.length = length;\r\n }", "@Override\n\tpublic int getLength() {\n\t\tint c = 0;\n\t\tfor (char c1 : theString.toCharArray()) {\n\t\t\tc++;\n\t\t}\n\t\treturn c;\n\t}", "Race(String description, double length) {\r\n\t\t\tthis.description = description;\r\n\t\t\tthis.length = length;\r\n\t\t}", "public void setLength(int length)\n {\n this.length = length;\n }", "void setLength(int length);", "public static String generateID(int length) {\n\t\tString id = \"\";\n\t\t\n\t\tfor (int i = 0; i < length; i++) {\n\t\t\tid += (int) (Math.random() * 10);\n\t\t}\n\t\t\n\t\treturn id;\n\t}", "protected abstract int getLength();", "public static void main(String[] args) {\n\t\tString s = \"AAAAAAAAAAA\";\n\t\tSystem.out.println(s.substring(0, 10));\n\t\tRepeatedDNAsequences hp = new RepeatedDNAsequences();\n\t\tSystem.out.println(hp.findRepeatedDnaSequences(s));\n\t}", "static int size_of_aci(String passed){\n\t\treturn 2;\n\t}", "static long repeatedString(String s, long n) {\n char[] arr=s.toCharArray();\n int i,count=0,cnt=0;\n for(i=0;i<arr.length;i++){\n if(arr[i]=='a'){\n count++;\n }\n }\n long len=(n/arr.length)*count;\n long extra=n%arr.length;\n if(extra==0){\n return len;\n }else{\n for(i=0;i<extra;i++){\n if(arr[i]=='a'){\n cnt++;\n }\n }\n return len+cnt;\n }\n\n\n }", "static void addSequence(DnaSequence dna, String s, int level) {\n\t\tint childIndex = getValue(s.charAt(level));\n\t\tif(dna.childs[childIndex] == null) dna.childs[childIndex] = new DnaSequence(s);\n\t\telse addSequence(dna.childs[childIndex], s, level + 1);\n\t}", "@Override\n public int length() {\n return mString.length();\n }", "@Override\n\tpublic void setLength(int length) {\n\t\t\n\t}", "static int size_of_ldax(String passed){\n\t\treturn 1;\n\t}", "public String randomString(int Length, String s) {\n\t\t\t\t\tRandom rand = new Random();\n\t\t\t\t\tStringBuilder sb = new StringBuilder(Length);\n\t\t\t\t\tfor (int i = 0; i < Length; i++) { sb.append(s.charAt(rand.nextInt(s.length()))); }\n\t\t\t\t\treturn sb.toString();\n\t\t\t\t}", "public static String randomStringGenerator(int len)\n {\n \t int lLimit = 97; \n \t int rLimit = 122; \n \t int targetStringLength =len;\n \t Random random = new Random();\n String generatedString = random.ints(lLimit, rLimit + 1)\n \t .limit(targetStringLength)\n \t .collect(StringBuilder::new, StringBuilder::appendCodePoint, StringBuilder::append)\n \t .toString();\n return generatedString;\n }", "static int size_of_dad(String passed){\n\t\treturn 1;\n\t}", "public static String generateRandomID(int length) {\n return generateRandomID(length, null);\n }", "public static int longestRepeatingSubsequenceNaive(String sequence) {\r\n\t\tint i1 = 0;\r\n\t\tint i2 = 0;\r\n\t\treturn longestRepeatingSubsequenceNaiveHelper(sequence, i1, i2);\r\n\t}", "static public int getHobgoblinStr(){\n str = rand.nextInt(3) + 3;\n return str;\n }", "static long repeatedString(String s, long n) {\n long a_count = 0;\n long total_a_count = 0;\n long modulo_s = 0;\n\n if(n>s.length()){\n for (int i=0; i<s.length(); i++)\n if(s.charAt(i)=='a') a_count++;\n\n total_a_count = a_count*(n/s.length());\n modulo_s = n%s.length();\n\n for (int i=0; i<modulo_s; i++)\n if(s.charAt(i)=='a') total_a_count++;\n\n return total_a_count;\n }\n\n else {\n for (int i=0; i<n; i++)\n if(s.charAt(i)=='a') a_count++;\n return a_count;\n }\n }", "static int size_of_adi(String passed){\n\t\treturn 2;\n\t}", "public static String guessString(int length) { // takes the integer output of makeGuess and returns the string it guessed\r\n\t\tchar[] characterSet = \"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ\".toCharArray();\r\n\t if(length<0)\r\n\t\t length=0;\r\n\t return new String(\"\"+characterSet[length]);\r\n\t}", "static long repeatedString(String s, long n) {\n \t\n \tchar first;\n \tfirst = s.charAt(0);\n \t\n \tint count = 0;\n \tlong[] fill = new long[n];\n \t\n \tfor(int i=1; i<n; i++) {\n \t\tif(first == s.charAt(i)) count++;\n \t}\n \t\n \tlong result = ((n / s.length()) * count) + (n % s.length());\n \treturn result;\n\n }", "public double strLen(String str, double size) {\n return mcFont().getStringWidth(str) * size / mcFont().FONT_HEIGHT;\n }", "static long repeatedString(String s, long n) {\n long l=s.length();\n long k=n/l;\n long r=n%l;\n long count=0;\n long count1=0;\n char ch[]=s.toCharArray();\n for(int t=0;t<ch.length;t++){\n if(ch[t]=='a')\n count1++;\n }\n for(int t=0;t<r;t++){\n if(ch[t]=='a')\n count++;\n }\n return k*count1+count;\n\n }", "private static String makeCorrectSize(String s, int length){\n\t\tStringBuilder sb = new StringBuilder(s); \n\t\tfor(int i = sb.length(); i<length; i++){\n sb.append(\" \");\n }\n\t\treturn sb.toString(); \n\n\t}", "public void setLength(int length) {\r\n\t\tthis.length = length;\r\n\t}", "static int size_of_daa(String passed){\n\t\treturn 1;\n\t}", "private Long getSeedSequence() {\n String s1 = \"Please enter seed and end with 'S'\";\n boolean getin = false;\n drawFrame(20, 20, s1, true);\n String seedstr = \"\";\n while (!getin) {\n if (StdDraw.hasNextKeyTyped()) {\n drawFrame(20, 20, \"\", true);\n Character ch = StdDraw.nextKeyTyped();\n if ((ch.equals('S') || ch.equals('s'))) {\n return Long.parseLong(seedstr);\n }\n seedstr += ch;\n drawFrame(20, 20, seedstr, false);\n }\n }\n return Long.parseLong(seedstr);\n }", "RandomIdNoLuhnProvider(int length) {\n this.length = length;\n }", "public static String rndString(int length) {\r\n char[] c = RBytes.rndCharArray(length);\r\n return new String(c);\r\n\r\n }", "static int size_of_dcx(String passed){\n\t\treturn 1;\n\t}", "public static int length(String s) {\n\treturn s.length();\n\t}", "public int my_length();", "protected static String generateString(int length) {\n String characters = \"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n Random rnd = new Random(System.nanoTime());\n char[] text = new char[length];\n for (int i = 0; i < length; i++) {\n text[i] = characters.charAt(rnd.nextInt(characters.length()));\n }\n return new String(text);\n }", "public static String buildTestString(int length, Random random) {\n char[] chars = new char[length];\n for (int i = 0; i < length; i++) {\n chars[i] = (char) random.nextInt();\n }\n return new String(chars);\n }", "public int getLength ()\r\n {\r\n return glyph.getBounds().width;\r\n }", "public numero(char s, int length)\n {\n this.sign = s;\n this.raw_value = new char[length];\n for(int i = 0; i < this.raw_value.length; i++) this.raw_value[i] = '0';\n }", "public void setCharacterSequence(String chars);", "public void setLength(long length);", "public void setLength(long length);", "public static String generateRoomCode(int length) {\n StringBuilder result = new StringBuilder(length);\n for (int i = 0; i < length; ++i) {\n result.append((char)('A' + Math.floor(Math.random() * 26)));\n }\n return result.toString();\n }", "public int getLongestRepeatedSubstringLength()\r\n {\r\n return maxLength;\r\n }", "public int getLength() {return length;}", "static int size_of_lxi(String passed){\n\t\treturn 3;\n\t}", "public String next() {\n // abc len=2 [0,1]--> [0,2]---> [1,2] //\n // abc len=3 [0,1,2]\n // 01,02,03,12,13,23 len=2 c=4\n //\n for (int i = len-1; i >=0; i--) {\n // i = 1; (2)\n // i = 0; (1)\n// if (index[i]< characters.length()-1 - (len-1 - i)) {\n if (index[i]< characters.length() - len + i) {\n index[i]++;\n break;\n }\n }\n StringBuilder sb = new StringBuilder();\n for(int i:index) {\n sb.append(characters.charAt(i));\n }\n return sb.toString();\n }", "public static String generateMessage(int len) {\n String messagePattern = \"[A-Za-z]{\" + len + \"}\";\n return new Generex(messagePattern).random();\n }", "public abstract void drawString(String str, int x, int y);", "public int getNumberOfCharactersInThisText(){\n\t\treturn this.number;\n\t}", "public int getLength() { return length;\t}", "public static int findLength(String str) {\n flushMap();\n if (str==null || str.isEmpty()) return -1;\n int x = 0;\n int count = 0;\n int maxCount = 0;\n while (x<str.length()) {\n char letter = str.charAt(x);\n if (!isRepeating(letter)) count++;\n else {\n flushMap();\n maxCount = Math.max(maxCount, count);\n x--;\n count = 0;\n }\n x++;\n }\n return Math.max(maxCount, count);\n }", "int getTextLength();", "private String generateRandomString(int length) {\n\n StringBuilder stringBuilder = new StringBuilder(length);\n int index = -1;\n while (stringBuilder.length() < length) {\n index = mRandom.nextInt(TEST_CHAR_SET_AS_STRING.length());\n stringBuilder.append(TEST_CHAR_SET_AS_STRING.charAt(index));\n }\n return stringBuilder.toString();\n }", "static long repeatedString(String s, long n) {\n\n char[] str = s.toCharArray();\n\n String temp = \"\";\n\n int i=0;\n long count=0;\n\n while(i<str.length){\n if(str[i]=='a'){\n count++;\n }\n i++;\n }\n\n long occurance = n/str.length;\n long remainder = n%str.length;\n count = count*occurance;\n\n i=0;\n while(i<remainder){\n if(str[i]=='a'){\n count++;\n }\n i++;\n }\n\n return count;\n\n }", "static long repeatedString(String s, long n) {\n if (s.contains(\"a\")) {\n StringBuilder stringBuilder = new StringBuilder(s);\n String infiniteString = \"\";\n if (stringBuilder.length() < n) {\n //repeat String if length is less than n\n infiniteString = infiniteString(s, n);\n }\n int count = 0;\n char[] stringArray = infiniteString.toCharArray();\n for (int i = 0; i < n; i++) {\n\n char a = 'a';\n if (stringArray[i] == a) {\n count++;\n }\n }\n return count;\n } else {\n return 0;\n }\n }", "public int getTextLength();", "@Override\r\n\tpublic void setSequenceSize(int size) {\n\t\tthis.sequence = \"Sequence length: \"+size;\r\n\t\tupdate();\r\n\t}", "LengthAdd createLengthAdd();", "public void setLength(int length) {\n\t\tthis.length = length;\n\t}", "public void setLength(int length) {\n\t\tthis.length = length;\n\t}" ]
[ "0.58497435", "0.56027776", "0.5557125", "0.547572", "0.5442074", "0.5439736", "0.5401103", "0.538668", "0.5370346", "0.5369556", "0.53482336", "0.52330035", "0.51953185", "0.51800585", "0.5171871", "0.5160953", "0.51440984", "0.5128336", "0.512515", "0.50851953", "0.50810385", "0.5075654", "0.5072754", "0.50597626", "0.5054768", "0.5054768", "0.50510144", "0.50026405", "0.49965894", "0.49956036", "0.49918514", "0.49918514", "0.49918514", "0.49918514", "0.49918514", "0.4985562", "0.49799037", "0.4977221", "0.49585408", "0.49585408", "0.4956497", "0.49563834", "0.49549296", "0.49483", "0.49450114", "0.49189112", "0.49152023", "0.49143642", "0.4910003", "0.49058017", "0.49005944", "0.48914936", "0.48913568", "0.48903465", "0.48846313", "0.48804188", "0.48719013", "0.48678952", "0.48673704", "0.48659837", "0.48638108", "0.48625794", "0.48623917", "0.48459172", "0.48387632", "0.4837975", "0.48344663", "0.48222497", "0.4798925", "0.4798812", "0.47969043", "0.47968107", "0.4793495", "0.47934014", "0.47932875", "0.47923318", "0.47807232", "0.47773108", "0.47698587", "0.47696754", "0.47696754", "0.47680902", "0.47627586", "0.47594312", "0.47554648", "0.47545773", "0.4753576", "0.47534946", "0.47529897", "0.47503707", "0.47499424", "0.47445613", "0.4738219", "0.47367105", "0.4736488", "0.47336966", "0.4725529", "0.47239175", "0.47232202", "0.47232202" ]
0.52802634
11
Initializes a sequence from a scanner.
public Sequence(Scanner sc) { String s = sc.next(); for (char c : s.toCharArray()) { if (isValid(c)) seq.add(c); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public A4Parser(java_cup.runtime.Scanner s) {super(s);}", "public A4Parser(java_cup.runtime.Scanner s) {super(s);}", "public static void init() {\n\t\tscanner = new Scanner(System.in);\n\t\treturn;\n\t}", "public Scanner(String program) {\n\t\tthis.program=program;\n\t\tpos=0;\n\t\ttoken=null;\n\t\tinitWhitespace(whitespace);\n\t\tinitDigits(digits);\n\t\tinitLetters(letters);\n\t\tinitLegits(legits);\n\t\tinitKeywords(keywords);\n\t\tinitOperators(operators);\n }", "public Parser(java_cup.runtime.Scanner s) {super(s);}", "public Parser(java_cup.runtime.Scanner s) {super(s);}", "public Parser(java_cup.runtime.Scanner s) {super(s);}", "public Parser(java_cup.runtime.Scanner s) {super(s);}", "public Parser(java_cup.runtime.Scanner s) {super(s);}", "public Parser(java_cup.runtime.Scanner s) {super(s);}", "public parser(java_cup.runtime.Scanner s) {super(s);}", "public parser(java_cup.runtime.Scanner s) {super(s);}", "public parser(java_cup.runtime.Scanner s) {super(s);}", "public parser(java_cup.runtime.Scanner s) {super(s);}", "public parser(java_cup.runtime.Scanner s) {super(s);}", "public parser(java_cup.runtime.Scanner s) {super(s);}", "public parser(java_cup.runtime.Scanner s) {super(s);}", "public parser(java_cup.runtime.Scanner s) {super(s);}", "public parserCapas(java_cup.runtime.Scanner s) {super(s);}", "public CoolParser(java_cup.runtime.Scanner s) {super(s);}", "public Sintactico(java_cup.runtime.Scanner s) {super(s);}", "public Parser(Scanner scanner) {\n this.scanner = scanner;\n scan();\n }", "public FractalParser(java_cup.runtime.Scanner s) {super(s);}", "public CompParser(java_cup.runtime.Scanner s) {super(s);}", "public LookaheadSequence(final Sequence seq) {\n mSeq = seq;\n mNext = seq.next();\n }", "public MJParser(java_cup.runtime.Scanner s) {super(s);}", "public Scanner(String source) {\n // The source code read in from stdin is stored here as a char array\n // TODO: if source is empty in Sc.java do something??\n this.source = source.toCharArray();\n this.position = 0;\n this.size = source.length();\n this.comments = false;\n this.depth = 0;\n this.called = false;\n }", "public AnalizadorSintactico(java_cup.runtime.Scanner s) {super(s);}", "public parser(Scanner s) {super(s);}", "public Scanner(String inString)\n {\n in = new BufferedReader(new StringReader(inString));\n eof = false;\n getNextChar();\n }", "public Menu() {\n scanner = new Scanner(System.in);\n }", "public void setScan(ByteArrayInputStream inStream){\t\t\n\t\tthis.programIn= (ByteArrayInputStream) inStream;\t\t\n\t\tthis.scan = new Scanner (programIn);\t\t\n\t}", "public Scanner(InputStream inStream)\n {\n in = new BufferedReader(new InputStreamReader(inStream));\n eof = false;\n getNextChar();\n }", "public LuaGrammarCup(java_cup.runtime.Scanner s) {super(s);}", "private void prepareScanner() {\r\n\t\tbcLocator = new BCLocator();\r\n\t\tbcGenerator = new BCGenerator();\r\n\t}", "public static void setInputScanner(InputScanner scanner){\n inputScanner = scanner;\n }", "public Asintactico(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public InputReader() {\n reader = new Scanner(System.in);\n }", "public PasitoScanner(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "public PasitoScanner(java.io.Reader in) {\n this.yy_reader = in;\n }", "public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public static InitialUnit loadFrom (Scanner sc) {\n int o = sc.nextInt();\n Unit.Type t = Unit.Type.values()[sc.nextInt()];\n Position pos = Position.loadFrom(sc);\n return new InitialUnit(o, t, pos);\n }", "public Sequence(String s) {\n for (char c : s.toCharArray()) {\n if (isValid(c)) seq.add(c);\n }\n }", "public LexicalScanner() throws IOException {\n this.codesMap = new CodesMap();\n this.keyWords = loadKeywords();\n this.specialCharacters = loadSpecialCharacters();\n this.identifierAutomata = new FA(IDENTIFIER_AUTOMATA_FILE);\n this.constantAutomata = new FA(CONSTANT_AUTOMATA_FILE);\n }", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public Ch12Ex1to9()\n {\n scan = new Scanner( System.in );\n }", "public Scanner(java.io.InputStream in) {\r\n this(new java.io.InputStreamReader(in));\r\n }", "private ConsoleScanner() {}", "public MyInput() {\r\n\t\tthis.scanner = new Scanner(System.in);\r\n\t}", "public Sequence(){\n\n }", "public SequenceNumberTest() {}", "public static void init()throws IOException{if(fileIO){f=new FastScanner(\"\");}else{f=new FastScanner(System.in);}}", "public Scanner(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "public Scanner(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "private Sequence() {\n this(\"<Sequence>\", null, null);\n }", "public void init() throws IOException {\n restart(scan.getStartRow());\n }", "public Programa(java.io.InputStream stream, String encoding) {\n if (jj_initialized_once) {\n System.out.println(\"ERROR: Second call to constructor of static parser. \");\n System.out.println(\" You must either use ReInit() or set the JavaCC option STATIC to false\");\n System.out.println(\" during parser generation.\");\n throw new Error();\n }\n jj_initialized_once = true;\n try { jj_input_stream = new SimpleCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }\n token_source = new ProgramaTokenManager(jj_input_stream);\n token = new Token();\n jj_ntk = -1;\n jj_gen = 0;\n for (int i = 0; i < 2; i++) jj_la1[i] = -1;\n }", "public Ch12Ex1to9( String str )\n {\n scan = new Scanner( str );\n }", "public PCLParser(java_cup.runtime.Scanner s) {super(s);}", "public SintaxAnalysis(java_cup.runtime.Scanner s) {super(s);}", "public Person(Scanner sc) {\n\t\tsuper(sc);\n\t\tif (sc.hasNext()) this.skill = sc.next();\n\t\tworking = false;\n\t}", "public parserCapas(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public void setScan(InputStream inStream){\t\t\n\t\tthis.scan = new Scanner (inStream);\t\t\t\t\t\n\t}", "@Test\n public void testConstructorTransformations() {\n\n String t1 = \"A C G T A C G T A A A A\";\n Sequence seq1 = new Sequence(\"t1\", t1, five);\n assertTrue(s1.equals(seq1.sequence()));\n\n String t2 = \"acgtacgtaaaa\";\n Sequence seq2 = new Sequence(\"t2\", t2, five);\n assertTrue(s1.equals(seq2.sequence()));\n\n }", "public static void setScanner(Scanner s) {\n scanner = s;\n }", "public SequenceImpl() {\n super();\n initSequence();\n }", "public CoolParser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public SintacticoH(java_cup.runtime.Scanner s) {\r\n super(s);\r\n }", "private void initScanner() {\n /*\n * since barcodeReaderFragment is the child fragment in the ScannerFragment therefore\n * it is get using getChildFragmentManager\n * setting up the custom bar code listener\n */\n\n }", "public static FastaSequence makeSequence(String header, String sequence)\r\n\t{\r\n\t\treturn new FastaSequence(header, sequence);\r\n\t}", "public MetadataScanner()\n {\n this(\"\");\n }", "public iCimpilir(java.io.InputStream stream, String encoding) {\n if (jj_initialized_once) {\n System.out.println(\"ERROR: Second call to constructor of static parser. \");\n System.out.println(\" You must either use ReInit() or set the JavaCC option STATIC to false\");\n System.out.println(\" during parser generation.\");\n throw new Error();\n }\n jj_initialized_once = true;\n try {\n jj_input_stream = new SimpleCharStream(stream, encoding, 1, 1);\n } catch (java.io.UnsupportedEncodingException e) {\n throw new RuntimeException(e);\n }\n token_source = new iCimpilirTokenManager(jj_input_stream);\n token = new Token();\n jj_ntk = -1;\n jj_gen = 0;\n for (int i = 0; i < 18; i++) {\n jj_la1[i] = -1;\n }\n }", "public AnalizadorSintactico(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public InputReader(String csv){\n inputStream = new Scanner(csv);\n instantiate();\n assert(invariant());\n }", "public SparrowParser(java.io.InputStream stream, String encoding) {\n if (jj_initialized_once) {\n System.out.println(\"ERROR: Second call to constructor of static parser. \");\n System.out.println(\" You must either use ReInit() or set the JavaCC option STATIC to false\");\n System.out.println(\" during parser generation.\");\n throw new Error();\n }\n jj_initialized_once = true;\n try { jj_input_stream = new JavaCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }\n token_source = new SparrowParserTokenManager(jj_input_stream);\n token = new Token();\n jj_ntk = -1;\n jj_gen = 0;\n for (int i = 0; i < 3; i++) jj_la1[i] = -1;\n for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();\n }", "Sequence createSequence();", "public parser(Scanner s, SymbolFactory sf) {super(s,sf);}", "public Scanner(java.io.Reader in) {\r\n this.zzReader = in;\r\n }", "public WrongInputDataInScanner() {\n\tsuper();\n\t\n}", "public Sequence(String title) { this(title, new Vector<Step>(), \"\"); }", "public Sequence(){\r\n \r\n }", "public static List<InitialUnit> getStartingPositions (Scanner sc) {\n List<InitialUnit> res = new ArrayList<InitialUnit>();\n int n = sc.nextInt();\n for (int i = 0; i < n; i++) {\n res.add(InitialUnit.loadFrom(sc));\n }\n return res;\n }", "public void init() {\n\t\tinit(\"1,0 3,0 5,0 7,0 9,0 0,1 2,1 4,1 6,1 8,1 1,2 3,2 5,2 7,2 9,2 0,3 2,3 4,3 6,3 8,3\", \n\t\t\t \"1,6 3,6 5,6 7,6 9,6 0,7 2,7 4,7 6,7 8,7 1,8 3,8 5,8 7,8 9,8 0,9 2,9 4,9 6,9 8,9\"); \n }", "public Sintactico(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public Scanner(java.io.Reader in) {\n this.zzReader = in;\n }", "public Scanner(java.io.Reader in) {\n this.zzReader = in;\n }" ]
[ "0.65210867", "0.65210867", "0.6430348", "0.64205474", "0.6292735", "0.6292735", "0.6292735", "0.6292735", "0.6292735", "0.6292735", "0.62728953", "0.62728953", "0.62728953", "0.62728953", "0.62728953", "0.62728953", "0.62728953", "0.62728953", "0.6263012", "0.6182212", "0.61665887", "0.6108215", "0.610249", "0.6098046", "0.609564", "0.607024", "0.60263956", "0.5989703", "0.5941257", "0.59063333", "0.5815607", "0.5787161", "0.5778112", "0.57736415", "0.5767087", "0.57658195", "0.57653964", "0.5747552", "0.5721444", "0.5697384", "0.5677475", "0.5677475", "0.5677475", "0.5677475", "0.5677475", "0.5677475", "0.5677475", "0.5664705", "0.5663953", "0.56512344", "0.56458557", "0.56458557", "0.56458557", "0.56458557", "0.56458557", "0.56458557", "0.56458557", "0.56458557", "0.56458557", "0.56455964", "0.5628167", "0.5602234", "0.558159", "0.55805486", "0.5564848", "0.55600303", "0.55563104", "0.55563104", "0.55396104", "0.5535108", "0.5529128", "0.5520002", "0.5519981", "0.5514406", "0.55096984", "0.55076516", "0.54967624", "0.54686385", "0.5460891", "0.5453175", "0.54522806", "0.54499537", "0.54158074", "0.5406493", "0.5403655", "0.53974736", "0.53937894", "0.5393158", "0.5389679", "0.53764", "0.53712505", "0.53675175", "0.5364782", "0.53637475", "0.5361771", "0.53573483", "0.5349127", "0.5338633", "0.5330974", "0.5330974" ]
0.7383252
0
Returns true if c represents a valid nucleotide; otherwise returns false.
private boolean isValid(char c) { if (c == 'A' || c == 'T' || c == 'G' || c == 'C' || c == 'N' || c == 'a' || c == 't' || c == 'g' || c == 'c') { return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean ValidarCantidad(String c) {\n String numCuenta = c;\n int NOnum = 0;\n for (int i = 0; i < numCuenta.length(); i++) {\n if (!Character.isDigit(numCuenta.charAt(i))) {\n NOnum++;\n }\n }\n return NOnum == 0;\n }", "public boolean isConsonant(int charCode);", "public static boolean isNonterminal(Character c){\n for(int i = 0; i < INVALID_IDENTIFIERS.length; i++){\n if(c == INVALID_IDENTIFIERS[i])\n return false;\n }\n return true;\n }", "public static boolean isATGCN(char c) {\n\tswitch(c) {\n\t\tcase 'n': case 'N': return true;\n\t\tdefault: return isATGC(c);\n\t\t}\n\t}", "public boolean isCValueValid();", "public boolean isValid (String c)\n {\n\tif (c.equals (\"f\") || c.equals (\"F\") || c.equals (\"Fire\") || c.equals (\"FIRE\") || c.equals (\"fire\") || c.equals (\"Water\") || c.equals (\"water\") || c.equals (\"WATER\") || c.equals (\"W\") || c.equals (\"w\") || c.equals (\"GRASS\") || c.equals (\"grass\") || c.equals (\"Grass\") || c.equals (\"G\") || c.equals (\"g\"))\n\t return true;\n\telse\n\t return false;\n }", "private boolean isNonCharacter(int c) {\n return (c & 0xFFFE) == 0xFFFE;\n }", "public static boolean isATGCN(final CharSequence c) {\n\tif(c==null || c.length()==0) return false;\n\tfor(int i=0;i< c.length();i++) if(!isATGCN(c.charAt(i))) return false;\n\treturn true;\n\t}", "public boolean isC() {\n return c;\n }", "public boolean isValidChar(char c) {\n\t\tif (Character.isIdentifierIgnorable(c))\r\n\t\t\treturn false;\r\n\t\telse\r\n\t\t\treturn renderer.getFont().canDisplay(c);\r\n\t}", "private boolean esCoordenadaValida(Coordenada c) {\n assert c != null : \"Error: la coordenada introducida no puede ser null\";\n int fila = c.getFila();\n int columna = c.getColumna();\n\n return (fila>=0 && fila<=casillas.length-1) &&\n (columna>=0 && columna<=casillas[0].length-1);\n }", "public boolean checkInvalid3(String x) {\n for (int i = 0; i < x.length(); i++) {\n int temp = 0;\n if (!consonants.contains(String.valueOf(x.charAt(i)))) {\n temp = i;\n for (int j = i + 1; j < x.length(); j++) {\n if (!consonants.contains(String.valueOf(x.charAt(j)))) {\n temp++;\n if (j - temp > 0) {\n return true;\n }\n }\n }\n }\n }\n return false;\n }", "public static boolean isInvalid(int c) {\n return !isValid(c);\n }", "static boolean isGeneral(char c) {\n\t\t\tswitch (c) {\n\t\t\t\tcase BOOLEAN:\n\t\t\t\tcase BOOLEAN_UPPER:\n\t\t\t\tcase STRING:\n\t\t\t\tcase STRING_UPPER:\n\t\t\t\tcase HASHCODE:\n\t\t\t\tcase HASHCODE_UPPER:\n\t\t\t\t\treturn true;\n\t\t\t\tdefault:\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "private static boolean m127620a(char c) {\n return Pattern.compile(\"[一-龥]\").matcher(String.valueOf(c)).matches();\n }", "public static boolean m64544a(@C6003d char[] cArr, char c) {\n C14445h0.m62478f(cArr, \"$receiver\");\n return m64612b(cArr, c) >= 0;\n }", "protected boolean testCC(String cc) {\n\t\tswitch (cc) {\n\t\t\tcase \"O\":\n\t\t\t\treturn dataspace.fOverflow;\n\t\t\tcase \"NO\":\n\t\t\t\treturn !dataspace.fOverflow;\n\t\t\tcase \"C\":\n\t\t\tcase \"B\":\n\t\t\tcase \"NAE\":\n\t\t\t\treturn dataspace.fCarry;\n\t\t\tcase \"NC\":\n\t\t\tcase \"NB\":\n\t\t\tcase \"AE\":\n\t\t\t\treturn !dataspace.fCarry;\n\t\t\tcase \"E\":\n\t\t\tcase \"Z\":\n\t\t\t\treturn dataspace.fZero;\n\t\t\tcase \"NE\":\n\t\t\tcase \"NZ\":\n\t\t\t\treturn !dataspace.fZero;\n\t\t\tcase \"BE\":\n\t\t\tcase \"NA\":\n\t\t\t\treturn (dataspace.fCarry || dataspace.fZero);\n\t\t\tcase \"NBE\":\n\t\t\tcase \"A\":\n\t\t\t\treturn !(dataspace.fCarry || dataspace.fZero);\n\t\t\tcase \"S\":\n\t\t\t\treturn dataspace.fSign;\n\t\t\tcase \"NS\":\n\t\t\t\treturn !dataspace.fSign;\n\t\t\tcase \"P\":\n\t\t\tcase \"PE\":\n\t\t\t\treturn dataspace.fParity;\n\t\t\tcase \"NP\":\n\t\t\tcase \"PO\":\n\t\t\t\treturn !dataspace.fParity;\n\t\t\tcase \"L\":\n\t\t\tcase \"NGE\":\n\t\t\t\t// \"^\" = \"xor\" ( \"!=\" would work as well)\n\t\t\t\treturn (dataspace.fSign ^ dataspace.fOverflow);\n\t\t\tcase \"NL\":\n\t\t\tcase \"GE\":\n\t\t\t\treturn dataspace.fSign == dataspace.fOverflow;\n\t\t\tcase \"LE\":\n\t\t\tcase \"NG\":\n\t\t\t\treturn ((dataspace.fSign ^ dataspace.fOverflow) || dataspace.fZero);\n\t\t\tcase \"NLE\":\n\t\t\tcase \"G\":\n\t\t\t\treturn !((dataspace.fSign ^ dataspace.fOverflow) || dataspace.fZero);\n\t\t\tcase \"CXZ\":\n\t\t\t\treturn (dataspace.CX.getShortcut() == 0);\n\t\t\tcase \"ECXZ\":\n\t\t\t\treturn (dataspace.ECX.getShortcut() == 0);\n\t\t\tdefault:\n\t\t\t\treturn false;\n\t\t}\n\t}", "public static boolean isATGC(final CharSequence c) {\n\tif(c==null || c.length()==0) return false;\n\tfor(int i=0;i< c.length();i++) if(!isATGC(c.charAt(i))) return false;\n\treturn true;\n\t}", "public boolean eDentro(Casella c) { return eDentro(c.riga,c.colonna); }", "public static boolean isConsonant(char carattere) {\n\t\t\tif (carattere == 'a' || carattere == 'e' || carattere == 'i' || carattere == 'o' || carattere == 'u' || carattere == 'A' || carattere == 'E' || carattere == 'I' || carattere == 'O' || carattere == 'U') return false;\n\t\t\t\telse return true;\n\t\t}", "public static boolean isValid(int c) {\n return (c < 0x10000 && (CHARS[c] & MASK_VALID) != 0) ||\n (0x10000 <= c && c <= 0x10FFFF);\n }", "@Override\n\tpublic boolean contains(Charset cs) {\n\t\treturn false;\n\t}", "public boolean checkInvalid4(String x) {\n int temp = x.length();\n for (int i = 0; i < x.length(); i++) {\n if (consonants.contains(String.valueOf(x.charAt(i))))\n temp--;\n }\n return temp > 3;\n }", "static boolean maybeTibetanCompositeVowel(int c) {\n return (c & 0x1fff01) == 0xf01;\n }", "boolean hasC();", "public static boolean verificarLetras(String cadeia) {\n\t\tfor (int i = 0; i < cadeia.length(); i++) {\n\t\t\tif (Character.isDigit(cadeia.charAt(i))) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "private boolean checkInCashe(String s) {\n return true;\n }", "public boolean hasC() {\n return c_ != null;\n }", "public boolean validadorDeCedula(String cedula) {\n boolean cedulaCorrecta = false;\n\n try {\n\n if (cedula.length() == 10) // ConstantesApp.LongitudCedula\n {\n int tercerDigito = Integer.parseInt(cedula.substring(2, 3));\n if (tercerDigito < 6) {\n // Coeficientes de validación cédula\n // El decimo digito se lo considera dígito verificador\n int[] coefValCedula = {2, 1, 2, 1, 2, 1, 2, 1, 2};\n int verificador = Integer.parseInt(cedula.substring(9, 10));\n int suma = 0;\n int digito = 0;\n for (int i = 0; i < (cedula.length() - 1); i++) {\n digito = Integer.parseInt(cedula.substring(i, i + 1)) * coefValCedula[i];\n suma += ((digito % 10) + (digito / 10));\n }\n\n if ((suma % 10 == 0) && (suma % 10 == verificador)) {\n cedulaCorrecta = true;\n } else if ((10 - (suma % 10)) == verificador) {\n cedulaCorrecta = true;\n } else {\n cedulaCorrecta = false;\n }\n } else {\n cedulaCorrecta = false;\n }\n } else {\n cedulaCorrecta = false;\n }\n } catch (NumberFormatException nfe) {\n cedulaCorrecta = false;\n } catch (Exception err) {\n System.out.println(\"Una excepcion ocurrio en el proceso de validadcion\");\n cedulaCorrecta = false;\n }\n\n if (!cedulaCorrecta) {\n System.out.println(\"La Cédula ingresada es Incorrecta\");\n }\n return cedulaCorrecta;\n }", "private boolean m21859c() {\n return m21861e() || m21855a(f16400d, \"Geny\") || m21855a(f16404h, \"Andy\") || m21855a(f16405i, \"Nox\") || m21866j() || m21855a(f16402f, \"Pipes\") || m21868l() || (m21867k() && m21855a(f16403g, \"X86\"));\n }", "static boolean mayHaveLccc(int c) {\n if(c < 0x300) { return false; }\n if(c > 0xffff) { c = UTF16.getLeadSurrogate(c); }\n int i;\n return\n (i = lcccIndex[c >> 5]) != 0 &&\n (lcccBits[i] & (1 << (c & 0x1f))) != 0;\n }", "public boolean a(C c) {\n return Range.a(this.a, (Comparable) c) <= 0;\n }", "boolean hasCsStr();", "public static boolean isStrictIdentifierChar(char c) {\n return Character.isJavaIdentifierPart(c) ||\n (c == '!') || (c == '?') || (c == '=');\n }", "public static boolean validAtom(char atom)\n\t{\n\t\tchar temp = Character.toUpperCase(atom);\n\t\treturn temp == 'C' || temp == 'H' || temp == 'O';\n\t}", "private boolean verifySequence(String seq) {\n for (int i = 0; i < seq.length(); i++) {\n if (seq.charAt(i) != 'A' && seq.charAt(i) != 'T'\n && seq.charAt(i) != 'C' && seq.charAt(i) != 'G') {\n return false;\n }\n }\n return true;\n }", "public boolean isCompatible(Complexity c) {\n return this == UNKNOWN || c == UNKNOWN ||\n (betterOrEqual(P) && c.betterOrEqual(P)) ||\n equals(c);\n }", "public static final boolean m64543a(@C6003d char[] cArr) {\n C14445h0.m62478f(cArr, \"$receiver\");\n return !(cArr.length == 0);\n }", "public static boolean isLiteral (char c) {\n if (c != '*' && c != '?' && c != '(' && c != '[' && c != '\\\\' && c!= '|' && c!='^' && c!='.' && c!=')' && c!=']') return true;\n else return false;\n }", "public boolean checkInvalid2(String x) {\n for (int i = 0; i < x.length(); i++) {\n if (consonants.contains(String.valueOf(x.charAt(i)))) {\n count++;\n }\n }\n return count == x.length();\n\n }", "boolean contains(char c) {\n for (char x : _chars) {\n if (x == c) {\n return true;\n }\n }\n return false;\n }", "public boolean a(C c) {\n return Range.a(this.a, (Comparable) c) < 0;\n }", "public boolean canMove(Character c, DirectionFactory d){\n int x = c.getPosX() ;\n int y = c.getPosY();\n\n try {\n Cell nextCell = labyrinth.getNextCell(x, y, d);\n for(int i =0; i < monsters.size(); i++){\n if(nextCell.getX()==monsters.get(i).getPosX() && nextCell.getY()==monsters.get(i).getPosY()){\n return false;\n }\n }\n if(!c.isThroughWall() && nextCell.isSolid()){\n return false;\n }\n\n return true;\n }catch (NullPointerException e){\n\n }\n return false;\n }", "private boolean isValid() {\n return Character.isLetter(c);\n }", "public boolean checkInvalid7(String x) {\n if (x.length() > 3) {\n for (int i = 0; i < x.length() - 2; i++) {\n if (consonants.contains(String.valueOf(x.charAt(i)))\n && (consonants.contains(String.valueOf(x.charAt(i + 1))))\n && consonants.contains(String.valueOf(x.charAt(i + 2)))\n && ((x.charAt(i) != 'n') || x.charAt(i + 1) !=\n 'g' || x.charAt(i + 2) != 'h')) {\n return true;\n }\n }\n }\n return false;\n }", "public static boolean validarDNI(String dni) {\r\n\t\tboolean resul = false;\r\n\t\tint i = 0;\r\n\t\tint caracterASCII = 0;\r\n\t\tchar letra = ' ';\r\n\t\tint miDNI = 0;\r\n\t\tint resto = 0;\r\n\t\tchar[] asignacionLetra = { 'T', 'R', 'W', 'A', 'G', 'M', 'Y', 'F', 'P', 'D', 'X', 'B', 'N', 'J', 'Z', 'S', 'Q',\r\n\t\t\t\t'V', 'H', 'L', 'C', 'K', 'E' };\r\n\r\n\t\tif (dni != null) {\r\n\t\t\tif (dni.length() == 9 && Character.isLetter(dni.charAt(8))) {\r\n\r\n\t\t\t\tdo {\r\n\t\t\t\t\tcaracterASCII = dni.codePointAt(i);\r\n\t\t\t\t\tresul = (caracterASCII > 47 && caracterASCII < 58);\r\n\t\t\t\t\ti++;\r\n\t\t\t\t} while (i < dni.length() - 1 && resul);\r\n\t\t\t}\r\n\r\n\t\t\tif (resul) {\r\n\t\t\t\tletra = Character.toUpperCase(dni.charAt(8));\r\n\t\t\t\tmiDNI = Integer.parseInt(dni.substring(0, 8));\r\n\t\t\t\tresto = miDNI % 23;\r\n\t\t\t\tresul = (letra == asignacionLetra[resto]);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn resul;\r\n\t}", "public boolean is_valid(char c1, char c2) {\n return ((c1 == '(' && c2 == ')') || (c1 == '{' && c2 == '}') || (c1 == '[' && c2 == ']'));\n }", "public static final boolean m65420y(@C6003d char[] cArr) {\n C14445h0.m62478f(cArr, \"$receiver\");\n return cArr.length == 0;\n }", "public static boolean goodGC(String sequence) {\n\t\tdouble gcCount = 0;\n\t\tfor (int i = 0; i < sequence.length(); i++)\n\t\t\tif (sequence.charAt(i) == 'g' || sequence.charAt(i) == 'c') gcCount++;\n\t\treturn (gcCount / sequence.length()) >= MIN_GC_FRACTION && (gcCount / sequence.length()) <= MAX_GC_FRACTION;\n\t}", "public boolean mo46251a(char c) {\n return C14794o.m64544a(this.f43070b, c);\n }", "@Requires(\"c != null\")\n private boolean pathIsTooDivergentFromReference( final Cigar c ) {\n for( final CigarElement ce : c.getCigarElements() ) {\n if( ce.getOperator().equals(CigarOperator.N) ) {\n return true;\n }\n }\n return false;\n }", "boolean hasC3();", "public boolean mo42069a(C12314c cVar) {\n if (!mo42073c(cVar)) {\n return false;\n }\n cVar.dispose();\n return true;\n }", "public boolean checkO(Country c) {\n\t\tfor (Country ca : players.get(turnCounter).getCountries()) {\r\n\t\t\tif (c.equals(ca)) {\r\n\t\t\t\treturn true;\r\n\t\t\t} \t\r\n\t\t}\r\n\t\t\r\n\t\treturn false;\r\n\t\t\r\n\t}", "public boolean validaCnpj(String cnpj){\n if (cnpj.equals(\"00000000000000\") || cnpj.equals(\"11111111111111\") || cnpj.equals(\"22222222222222\")\n || cnpj.equals(\"33333333333333\") || cnpj.equals(\"44444444444444\") || cnpj.equals(\"55555555555555\")\n || cnpj.equals(\"66666666666666\") || cnpj.equals(\"77777777777777\") || cnpj.equals(\"88888888888888\")\n || cnpj.equals(\"99999999999999\") || (cnpj.length() != 14))\n return (false);\n\n char dig13, dig14;\n int sm, i, r, num, peso;\n\n // \"try\" - protege o código para eventuais erros de conversao de tipo (int)\n try {\n // Calculo do 1o. Digito Verificador\n sm = 0;\n peso = 2;\n for (i = 11; i >= 0; i--) {\n // converte o i-ésimo caractere do CNPJ em um número:\n // por exemplo, transforma o caractere '0' no inteiro 0\n // (48 eh a posição de '0' na tabela ASCII)\n num = (int) (cnpj.charAt(i) - 48);\n sm = sm + (num * peso);\n peso = peso + 1;\n if (peso == 10)\n peso = 2;\n }\n\n r = sm % 11;\n if ((r == 0) || (r == 1))\n dig13 = '0';\n else\n dig13 = (char) ((11 - r) + 48);\n\n // Calculo do 2o. Digito Verificador\n sm = 0;\n peso = 2;\n for (i = 12; i >= 0; i--) {\n num = (int) (cnpj.charAt(i) - 48);\n sm = sm + (num * peso);\n peso = peso + 1;\n if (peso == 10)\n peso = 2;\n }\n\n r = sm % 11;\n if ((r == 0) || (r == 1))\n dig14 = '0';\n else\n dig14 = (char) ((11 - r) + 48);\n\n // Verifica se os dígitos calculados conferem com os dígitos informados.\n if ((dig13 == cnpj.charAt(12)) && (dig14 == cnpj.charAt(13)))\n return (true);\n else\n return (false);\n } catch (InputMismatchException erro) {\n return (false);\n }\n }", "private boolean isChar(char c){\n\t\tif(Character.isISOControl(c))\n\t\t\treturn false;\n\t\treturn true;\n\t}", "private static boolean m44512a(char c) {\n return c == 10 || c == 13 || c == 9 || c == ' ';\n }", "public static boolean validLocation(AbstractCard c) {\n return AbstractDungeon.player.hand.contains(c) ||\n AbstractDungeon.player.drawPile.contains(c) ||\n AbstractDungeon.player.discardPile.contains(c) ||\n AbstractDungeon.player.exhaustPile.contains(c);\n }", "public abstract boolean matches(char c);", "public boolean isNum(String cad){\n try{\n Integer.parseInt(cad);\n return true;\n }catch(NumberFormatException nfe){\n System.out.println(\"Solo se aceptan valores numericos\");\n return false;\n }\n }", "public boolean judgeSquare(int c){\n\t\tfor(long a = 0 ; a*a<c; a++){\n\t\t\tdouble b = Math.sqrt(c-a*a);\n\t\t\tif(b == (int) b){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "private boolean CATS(Category... cs) {\r\n if (in >= input.length()) return false;\r\n int len = input.nextLength(in);\r\n int ch = input.nextChar(in, len);\r\n Category cat = Category.get(ch);\r\n boolean ok = false;\r\n for (Category c : cs) if (cat == c) ok = true;\r\n if (! ok) return false;\r\n in += len;\r\n return true;\r\n }", "private static boolean checkChar(char c) {\n\t\tif (Character.isDigit(c)) {\n\t\t\treturn true;\n\t\t} else if (Character.isLetter(c)) {\n\t\t\tif (Character.toUpperCase(c) >= 'A' && Character.toUpperCase(c) <= 'F') {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "boolean judgeValid()\r\n\t{\r\n\t\tif(loc.i>=0 && loc.i<80 && loc.j>=0 && loc.j<80 && des.i>=0 && des.i<80 && des.j>=0 && des.j<80)\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t\t\r\n\t}", "public boolean testRelation(Caisse c){\n boolean bool =false;\n\tfor(Caisse c1 : this.lesCaisses){\n\tif (c.equals(c1)){\n\t bool =true;\n }\n bool =false;\n\t }\n\treturn bool ;\n}", "public static boolean isNCName(int c) {\n return c < 0x10000 && (CHARS[c] & MASK_NCNAME) != 0;\n }", "@AssertTrue(message=\"La clave debe ser alfanumerica \")\r\n\tpublic boolean validarClave(){\r\n\t\tboolean a=StringUtils.isAlphanumeric(clave);\r\n\t\tboolean b=StringUtils.isNotBlank(clave);\r\n\t\treturn (a && b);\r\n\t}", "public static boolean isGraphic(char c) {\r\n\t\tint gc = Character.getType(c);\r\n\t\treturn gc != Character.CONTROL && gc != Character.FORMAT && gc != Character.SURROGATE && gc != Character.UNASSIGNED && gc != Character.LINE_SEPARATOR\r\n\t\t\t\t&& gc != Character.PARAGRAPH_SEPARATOR && gc != Character.SPACE_SEPARATOR;\r\n\t}", "protected boolean isToBeRemoved(char c) {\r\n if(removeChars == null) return false;\r\n int len = removeChars.length;\r\n if(len == 8) return false;\r\n for(char removeChar : removeChars) {\r\n if(removeChar == c) return true;\r\n }\r\n return false;\r\n }", "public static boolean isKanji(char c){\n\t\treturn kanjiWhitelist.contains(c);\n\t}", "public boolean checkValid(int r, int c) throws RemoteException {\r\n\t\tint[] co = o.getCoordinates();\r\n\t\tif (r < co[0] || r > co[1] || c < co[2] || c > co[3]) {\r\n\t\t\tio.println(\"Invalid coordinates\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public boolean canPlace(Card o, String c)\r\n {\r\n if (this.color == c)\r\n return true;\r\n else if (this.value == o.value)\r\n return true;\r\n else if (this.color == \"none\") // Wild cards\r\n return true;\r\n return false;\r\n }", "public static boolean isATGCN(final Allele a) {\n\tif(a==null || a.isBreakpoint() || a.isNoCall() || a.isSymbolic() || a.isSingleBreakend() || a.length()==0) return false;\n\treturn isATGCN(a.getDisplayString());\n\t}", "public static boolean isATGC(char c) {\n\tswitch(c) {\n\t\tcase 'A': case 'a':\n\t\tcase 'C': case 'c':\n\t\tcase 'G': case 'g':\n\t\tcase 'T': case 't':\n\t\t\treturn true;\n\t\tdefault: return false;\n\t\t}\n\t}", "public boolean isCNPJ(String CNPJ) {\n\t\t// considera-se erro CNPJ's formados por uma sequencia de numeros iguais\n if (CNPJ.equals(\"00000000000000\") || CNPJ.equals(\"11111111111111\") ||\n CNPJ.equals(\"22222222222222\") || CNPJ.equals(\"33333333333333\") ||\n CNPJ.equals(\"44444444444444\") || CNPJ.equals(\"55555555555555\") ||\n CNPJ.equals(\"66666666666666\") || CNPJ.equals(\"77777777777777\") ||\n CNPJ.equals(\"88888888888888\") || CNPJ.equals(\"99999999999999\") ||\n (CNPJ.length() != 14))\n return(false);\n\n char dig13, dig14;\n int sm, i, r, num, peso;\n\n// \"try\" - protege o codigo para eventuais erros de conversao de tipo (int)\n try {\n// Calculo do 1o. Digito Verificador\n sm = 0;\n peso = 2;\n for (i=11; i>=0; i--) {\n// converte o i-�simo caractere do CNPJ em um n�mero:\n// por exemplo, transforma o caractere '0' no inteiro 0\n// (48 eh a posi��o de '0' na tabela ASCII)\n num = (int)(CNPJ.charAt(i) - 48);\n sm = sm + (num * peso);\n peso = peso + 1;\n if (peso == 10)\n peso = 2;\n }\n\n r = sm % 11;\n if ((r == 0) || (r == 1))\n dig13 = '0';\n else dig13 = (char)((11-r) + 48);\n\n// Calculo do 2o. Digito Verificador\n sm = 0;\n peso = 2;\n for (i=12; i>=0; i--) {\n num = (int)(CNPJ.charAt(i)- 48);\n sm = sm + (num * peso);\n peso = peso + 1;\n if (peso == 10)\n peso = 2;\n }\n\n r = sm % 11;\n if ((r == 0) || (r == 1))\n dig14 = '0';\n else dig14 = (char)((11-r) + 48);\n\n// Verifica se os d�gitos calculados conferem com os d�gitos informados.\n if ((dig13 == CNPJ.charAt(12)) && (dig14 == CNPJ.charAt(13)))\n return(true);\n else return(false);\n } catch (InputMismatchException erro) {\n return(false);\n }\n\t}", "public static final boolean m23677a(char c) {\n if (Character.isWhitespace(c) || Character.isSpaceChar(c)) {\n return true;\n }\n return false;\n }", "static boolean requiresBidi(char c) {\n if (c < '\\u0591') return false;\n if (c > '\\u202e') return false; // if contains arabic extended data, presume already ordered\n byte dc = getDirectionCode(c);\n return dc == R || dc == AR || dc == F;\n }", "public static boolean isContent(int c) {\n return (c < 0x10000 && (CHARS[c] & MASK_CONTENT) != 0) ||\n (0x10000 <= c && c <= 0x10FFFF);\n }", "private boolean validNbit(String input) {\n\t\treturn input.matches(\"[0-9A-F]+\");\n\t}", "public boolean hasC() {\n return cBuilder_ != null || c_ != null;\n }", "public static boolean dniCorrecto(String dni) {\r\n\t\tif (!dni.matches(\"[0-9]{8}[A-Z]\"))\r\n\t\t\treturn false;\r\n\t\tString digitos=dni.substring(0, 8);\r\n\t\tchar letra=dni.charAt(8);\r\n\t\t\t\t\r\n\t\treturn letra==calcularLetraDni(digitos);\r\n\t}", "private boolean esNumero(String cadena) {\n try {\n Integer.parseInt(cadena);\n return true;\n } catch (NumberFormatException nfe) {\n return false;\n }\n }", "public boolean canCompete(String t){\n\t\tif(talents != null)\n\t\t{\n\t\t\tint i;\n\t\t\tfor(i = 0; i < talents.length; i++)\n\t\t\t\tif (talents[i] == t)\n\t\t\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n }", "static boolean isCharacter(char c) {\n\t\t\tswitch (c) {\n\t\t\t\tcase CHARACTER:\n\t\t\t\tcase CHARACTER_UPPER:\n\t\t\t\t\treturn true;\n\t\t\t\tdefault:\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "public static boolean ehInteiro(String s) {\n char[] c = s.toCharArray();\n boolean d = true;\n\n for (int i = 0; i < c.length; i++) {\n // verifica se o char não é um dígito\n if (!Character.isDigit(c[i])) {\n d = false;\n break;\n }\n }\n\n return d;\n }", "private static boolean contieneAtomo(FormaClausal fc, char atomo) {\n\t\treturn fc.formas.contains(String.valueOf(atomo));\n\t}", "public boolean accept(final char c) {\n return Character.isDigit(c) || c == ' ';\n }", "private static boolean pathIsTooDivergentFromReference(final Cigar c) {\n return c.getCigarElements().stream().anyMatch(ce -> ce.getOperator() == CigarOperator.N);\n }", "private boolean isNumericoConFraccion(char unChar) {\r\n\t\tswitch (unChar) {\r\n\t\tcase '0':\r\n\t\t\treturn true;\r\n\t\tcase '1':\r\n\t\t\treturn true;\r\n\t\tcase '2':\r\n\t\t\treturn true;\r\n\t\tcase '3':\r\n\t\t\treturn true;\r\n\t\tcase '4':\r\n\t\t\treturn true;\r\n\t\tcase '5':\r\n\t\t\treturn true;\r\n\t\tcase '6':\r\n\t\t\treturn true;\r\n\t\tcase '7':\r\n\t\t\treturn true;\r\n\t\tcase '8':\r\n\t\t\treturn true;\r\n\t\tcase '9':\r\n\t\t\treturn true;\r\n\t\tcase '.':\r\n\t\t\treturn dotCountValidate();\r\n\t\tdefault:\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public static boolean esNumero(String cadena) {\n try {\n Integer.parseInt(cadena);\n return true;\n } catch (NumberFormatException nfe) {\n return false;\n }\n }", "public static boolean contieneSoloLetras(String cadena) {\r\n //metodo para comprobar si una cadena contiene solamente letras\r\n for (int x = 0; x < cadena.length(); x++) {\r\n char c = cadena.charAt(x);\r\n // Si no está entre a y z, ni entre A y Z, ni es un espacio\r\n if (!((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || c == ' ')) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }", "public boolean isCactus() {\n return this.type == Type.CACTUS;\n }", "public boolean isChar(char c) \n\t{\n\t\tif (this.numBytes==1 && (charBytes[0]==c))\n\t\t\treturn true; \n\t\treturn false; \n\t}", "@Override\n\tpublic boolean verificaContaCorrente(String codigoAgencia, String codigoConta)\n\t{\n\t\tint[] pesoDigitos = {9, 7, 3, 1, 9, 7, 1, 3, 1, 9, 7, 3};\n\t\t\n\t\tchar[] digitosAgencia = capturaDigitos(codigoAgencia, 4, 0);\n\t\t\n\t\tif (digitosAgencia == null)\n\t\t\treturn false;\n\n\t\tchar[] digitosConta = capturaDigitos(codigoConta, 9, 0);\n\t\t\n\t\tif (digitosConta == null)\n\t\t\treturn false;\n\t\t\n\t\tint soma = 0;\n\t\t\n\t\tfor (int i = 0; i < 4; i++)\n\t\t\tsoma += (digitosAgencia[i] - '0') * pesoDigitos[i] % 10;\n\t\t\n\t\tfor (int i = 0; i < 8; i++)\n\t\t\tsoma += (digitosConta[i] - '0') * pesoDigitos[i + 4] % 10;\n\n\t\tint digito = soma % 10;\n\t\t\n\t\tif (digito != 0)\n\t\t\tdigito = 10 - digito;\n\t\t\n\t\tchar ch = (char)('0' + digito);\n\t\treturn digitosConta[8] == ch;\n\t}", "public static boolean isPuryn(char iupac) {\n\tswitch(iupac) {\n\tcase 'A': case 'a' :\n\tcase 'G': case 'g':\n\tcase 'R': case 'r':\n\t\treturn true;\n\tdefault: return false;\n\t}\n}", "public boolean ehInteiro(String s) {\n\t\tchar[] c = s.toCharArray();\n\t\tboolean d = true;\n\t\tfor (int i = 0; i < c.length; i++)\n\t\t\t// verifica se o char não é um dígito\n\t\t\tif (!Character.isDigit(c[i])) {\n\t\t\t\td = false;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\treturn d;\n\t}", "public static boolean isValidNCName(String ncName) {\n if (ncName.length() == 0)\n return false;\n char ch = ncName.charAt(0);\n if( isNCNameStart(ch) == false)\n return false;\n for (int i = 1; i < ncName.length(); i++ ) {\n ch = ncName.charAt(i);\n if( isNCName( ch ) == false ){\n return false;\n }\n }\n return true;\n }", "public boolean isChemical() {\n return chemical;\n }", "public boolean isChromosome() {\n return this.placement.getSeqId().startsWith(\"NC_\");\n }", "public boolean mo33133b(C5679c cVar, C5682f fVar) {\n return true;\n }" ]
[ "0.6500825", "0.6469504", "0.6361606", "0.62915355", "0.6152541", "0.6118688", "0.6057727", "0.60229164", "0.5991159", "0.59582204", "0.59416705", "0.58934", "0.5838062", "0.58311826", "0.5829663", "0.57968384", "0.5774948", "0.57379395", "0.57374287", "0.57325405", "0.5679706", "0.5658107", "0.5626727", "0.5619006", "0.5617549", "0.56066895", "0.55947083", "0.5594483", "0.5576925", "0.5528979", "0.5519102", "0.55167574", "0.55147547", "0.54939145", "0.5488177", "0.54829746", "0.54747266", "0.54667073", "0.5462025", "0.54416764", "0.5440122", "0.54340696", "0.5433865", "0.541642", "0.5412904", "0.5411153", "0.53944993", "0.5391143", "0.5391086", "0.53894454", "0.5381209", "0.5372854", "0.536322", "0.5362754", "0.53599375", "0.53522146", "0.53353214", "0.5331147", "0.53284156", "0.5325162", "0.5316627", "0.53046185", "0.530306", "0.5300902", "0.52970946", "0.52938366", "0.5283511", "0.52767986", "0.52749276", "0.5271743", "0.52579224", "0.52440965", "0.52384716", "0.523334", "0.52257955", "0.5223784", "0.5212964", "0.5212445", "0.5202132", "0.5192493", "0.5185935", "0.5178016", "0.5174689", "0.51734924", "0.51693046", "0.5167627", "0.51546896", "0.5152002", "0.51468897", "0.5145791", "0.51423645", "0.51418245", "0.51409155", "0.51339936", "0.5130707", "0.5122474", "0.5121625", "0.51192343", "0.51182663", "0.51167566" ]
0.65814954
0
Returns the nucleotide sequence of the sequence.
public List<Character> getSeq() { return seq; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getSeq();", "public static Sequence getSequence(){\n\t\treturn curMIDI;\n\t}", "public DBSequence getNotiId() {\r\n return (DBSequence)getAttributeInternal(NOTIID);\r\n }", "public String getSequence()\r\n\t{\r\n\t\treturn sequence;\r\n\t}", "public String getSequence() \n\t{\n\t\treturn sequence;\n\t\t\n\t}", "public String getSequence() {\r\n return sequence;\r\n }", "public String getSequence() {\n\t\treturn sequence;\n\t}", "public String getSequence() {\n\t\treturn sequence;\n\t}", "public String getSequence()\n\t{\n\t\treturn this.sequence;\n\t}", "public java.lang.String getSeq() {\n java.lang.Object ref = seq_;\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 seq_ = s;\n }\n return s;\n }\n }", "public String getSEQN() {\n return SEQN;\n }", "public Optional<Integer> getSequence() {\n return sequence;\n }", "public java.lang.String getSeq() {\n java.lang.Object ref = seq_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n seq_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "@Override\n\tpublic String getNextSequenceValue(String sequence) {\n\t\treturn \"\";\n\t}", "public long getSequence() {\n\t\tif (order != null){\n\t\t\treturn order.getSequence();\n\t\t}\n\t\treturn sequence;\n\t}", "public String getSequence() {\r\n return mySequenceFragment;\r\n }", "public Integer getSeq() {\n return seq;\n }", "public Integer getSeq() {\n return seq;\n }", "public Integer getSeq() {\n return seq;\n }", "MolecularSequenceReferenceSeq getReferenceSeq();", "public String consensus_sequence () {\n return(current_contig.consensus.sequence.toString());\r\n }", "long getSeqnum();", "long getSeqnum();", "long getSeqnum();", "long getSeqnum();", "long getSeqnum();", "long getSeqnum();", "long getSeqnum();", "public static String getDnaSequence(final DnaComponent component) {\n String rtn = \"\";\n if (component instanceof Part) {\n final Part part = (Part) component;\n rtn = part.getDnaSequence();\n }\n if (component instanceof Gate) {\n final Gate gate = (Gate) component;\n rtn = SBOLDataUtils.getDnaSequence(gate);\n }\n if (component instanceof InputSensor) {\n final InputSensor sensor = (InputSensor) component;\n rtn = SBOLDataUtils.getDnaSequence(sensor);\n }\n if (component instanceof OutputDevice) {\n final OutputDevice reporter = (OutputDevice) component;\n rtn = SBOLDataUtils.getDnaSequence(reporter);\n }\n return rtn;\n }", "public long getSequenceNo() {\n\treturn sequenceNo;\n }", "public Integer getSequence()\n {\n return sequence;\n }", "public long getSequenceNum() {\n return sequenceNum;\n }", "int getSeq();", "int getSeq();", "int getSeq();", "public long sequenceNumber() {\n return sequenceNumber;\n }", "public Integer getSequence() {\n return sequence;\n }", "public StrColumn getSeq() {\n return delegate.getColumn(\"seq\", DelegatingStrColumn::new);\n }", "public Number getSequenceNo() {\n return (Number)getAttributeInternal(SEQUENCENO);\n }", "public static String getUniqueSequence() {\n\t\treturn UUID.randomUUID().toString();\n\t}", "org.hl7.fhir.String getObservedSeq();", "public com.google.protobuf.ByteString\n getSeqBytes() {\n java.lang.Object ref = seq_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n seq_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@Nullable\n public String getSequence() {\n return XmlUtils.getAttributeValue(this.mAdNode, \"sequence\");\n }", "public char consensus_nucleotide (int offset) {\n return current_contig.consensus.sequence.charAt(offset - 1);\r\n }", "public long getSeqNo() {\n return seqNo;\n }", "public BigInteger getSeqNextVal(String sequence) {\r\n\t\treturn this.crudDAO.getSeqNextVal(sequence);\r\n\t}", "public String get_sequence() {\n return m_aa_sequence;\n }", "public long getSeqnum() {\n return seqnum_;\n }", "public long getSeqnum() {\n return seqnum_;\n }", "public long getSeqnum() {\n return seqnum_;\n }", "public long getSeqnum() {\n return seqnum_;\n }", "public long getSeqnum() {\n return seqnum_;\n }", "public long getSeqnum() {\n return seqnum_;\n }", "public long getSeqnum() {\n return seqnum_;\n }", "public com.google.protobuf.ByteString\n getSeqBytes() {\n java.lang.Object ref = seq_;\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 seq_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getQcIdseq() {\n return (String) getAttributeInternal(QCIDSEQ);\n }", "public long getSeqnum() {\n return seqnum_;\n }", "public long getSeqnum() {\n return seqnum_;\n }", "public long getSeqnum() {\n return seqnum_;\n }", "public long getSeqnum() {\n return seqnum_;\n }", "public long getSeqnum() {\n return seqnum_;\n }", "public long getSeqnum() {\n return seqnum_;\n }", "public long getSeqnum() {\n return seqnum_;\n }", "public int getSeqNo();", "public int getSeqNo();", "public java.lang.Integer getSeqNo () {\n\t\treturn seqNo;\n\t}", "public BigInteger getSeqCurrentVal(String sequence) {\r\n\t\treturn this.crudDAO.getSeqCurrentVal(sequence);\r\n\t}", "public int getSequence() {\n return sequence;\n }", "public gov.nih.nlm.ncbi.www.SeqIdDocument.SeqId getSeqId()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n gov.nih.nlm.ncbi.www.SeqIdDocument.SeqId target = null;\r\n target = (gov.nih.nlm.ncbi.www.SeqIdDocument.SeqId)get_store().find_element_user(SEQID$0, 0);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target;\r\n }\r\n }", "public int getSeq() {\n return -1;\n }", "long getOriginseqnum();", "public int getSeq() {\n return seq_;\n }", "public int getSeq() {\n return seq_;\n }", "public Sequence nextSequence(Alphabet alphabet) throws IOException{\n\t\tif (eof)\n\t\t\treturn null;\n\n\n\t\tif (alphabet == null){\n\t\t\talphabet = Alphabet.DNA16();//The most conservative\n\t\t}\n\n\t\tStringBuilder header = new StringBuilder();\n\t\tseqIndex = 0;//the number of nucletiodes read\n\n\t\tif (currentByte != 62){// 62 = '>'\n\t\t\tthrow new RuntimeException(\"> is expected at the start line \" + lineNo + \", found \" + ((char)currentByte));\n\t\t}\n\n\t\t//Read the header\n\t\twhile (!eol){\n\t\t\tnextByte();\n\t\t\theader.append((char) currentByte);\n\t\t}\n\n\t\twhile (true){\n\t\t\tif (nextByte()){\n\t\t\t\tbyte nucleotide = alphabet.byte2index(currentByte);\n\n\t\t\t\tif (nucleotide >= 0){//valid nucleotide\t\t\t\t\n\t\t\t\t\t//ensure the sequence array is big enough\n\t\t\t\t\tif (seqIndex >= seq.length) {// Full\n\t\t\t\t\t\tint newLength = seq.length * 2;\n\t\t\t\t\t\tif (newLength < 0) {\n\t\t\t\t\t\t\tnewLength = Integer.MAX_VALUE;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// if the array is extended\n\t\t\t\t\t\tif (newLength <= seqIndex) {\n\t\t\t\t\t\t\t// in.close();\n\t\t\t\t\t\t\tthrow new RuntimeException(\n\t\t\t\t\t\t\t\t\t\"Sequence is too long to handle\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// create new array of byte\n\t\t\t\t\t\tseq = Arrays.copyOf(seq, newLength);\n\t\t\t\t\t}\n\t\t\t\t\t//next symbol\n\t\t\t\t\tseq[seqIndex++] = nucleotide;\n\t\t\t\t\t//seqIndex++;\t\t\t\t\t\n\t\t\t\t}else if(currentByte == 62){\n\t\t\t\t\t//start of a new sequence\n\t\t\t\t\t//seqNo ++;\n\t\t\t\t\treturn makeSequence(alphabet, seq, seqIndex, header.toString().trim());\n\t\t\t\t}else{\n\t\t\t\t\tif (nucleotide == -1){\n\t\t\t\t\t\tthrow new RuntimeException(\"Unexecpected character '\" + (char) currentByte + \"' for dna {\" + alphabet + \"} at the line \" + lineNo);\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}//if\n\t\t\telse{\n\t\t\t\t//seqNo ++;\n\t\t\t\treturn makeSequence(alphabet, seq, seqIndex, header.toString().trim());\n\t\t\t}\t\t\t\n\n\t\t}\n\t}", "long getSeq() {\n return seq;\n }", "public int getSequenceNum() {\n\t\treturn sequenceNumber;\n\t}", "@Override\n\tpublic String getCurrentSequenceValue(String sequence) {\n\t\treturn \"\";\n\t}", "public int getSeq() {\n return seq_;\n }", "public int getSeq() {\n return seq_;\n }", "ISequence sequence();", "@Override\n\tpublic String getNextSequenceValuesQuery(String sequence) {\n\t\treturn \"\";\n\t}", "public String getQuerySequencesString() {\n \t\treturn null;\n \t}", "long getSequenceNum() {\n return sequenceNum;\n }", "public long getSequenceId()\n {\n return sequence_id_;\n }", "@Override\r\n\tpublic int getSeq() {\n\t\treturn pdsdao.getSeq();\r\n\t}", "public String getCQcIdseq() {\n return (String) getAttributeInternal(CQCIDSEQ);\n }", "public int getSeqNumber() {\n return buffer.getShort(2) & 0xFFFF;\n }", "public String getConteIdseq() {\n return (String) getAttributeInternal(CONTEIDSEQ);\n }", "public String getDNA() {\n return dna.toString();\n }", "public double[] sequence()\n\t{\n\t\treturn _adblSequence;\n\t}", "public gov.nih.nlm.ncbi.www.PatentSeqIdDocument.PatentSeqId getPatentSeqId()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n gov.nih.nlm.ncbi.www.PatentSeqIdDocument.PatentSeqId target = null;\r\n target = (gov.nih.nlm.ncbi.www.PatentSeqIdDocument.PatentSeqId)get_store().find_element_user(PATENTSEQID$0, 0);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target;\r\n }\r\n }", "public String getQrIdseq() {\n return (String) getAttributeInternal(QRIDSEQ);\n }", "public gov.nih.nlm.ncbi.www.PDBSeqIdDocument.PDBSeqId getPDBSeqId()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n gov.nih.nlm.ncbi.www.PDBSeqIdDocument.PDBSeqId target = null;\r\n target = (gov.nih.nlm.ncbi.www.PDBSeqIdDocument.PDBSeqId)get_store().find_element_user(PDBSEQID$0, 0);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target;\r\n }\r\n }", "public java.lang.Long getSeqId () {\n\t\treturn seqId;\n\t}", "public Base[] getSeq()\n {\n return seq;\n }", "com.google.protobuf.ByteString\n getSeqBytes();", "@Field(3) \n\tpublic int SequenceNo() {\n\t\treturn this.io.getIntField(this, 3);\n\t}", "public long getOriginseqnum() {\n return originseqnum_;\n }", "java.lang.String getN();", "public String getSequenceId() {\n return this.placement.getSeqId();\n }" ]
[ "0.6620204", "0.6412884", "0.6379409", "0.6280598", "0.6264178", "0.6224934", "0.6159378", "0.6159378", "0.6114917", "0.61043733", "0.6102896", "0.6087238", "0.6031644", "0.5966123", "0.59576166", "0.5953956", "0.595068", "0.595068", "0.595068", "0.5945321", "0.5945077", "0.59358233", "0.59358233", "0.59358233", "0.59358233", "0.59358233", "0.59358233", "0.59358233", "0.59338063", "0.59285647", "0.59150225", "0.58805877", "0.5869505", "0.5869505", "0.5869505", "0.5861826", "0.5861098", "0.58520985", "0.5828305", "0.58115363", "0.5804259", "0.579346", "0.5789746", "0.57881445", "0.5782759", "0.57740957", "0.57707775", "0.57670987", "0.57670987", "0.57670987", "0.57670987", "0.57670987", "0.57670987", "0.57670987", "0.5735152", "0.5732668", "0.5722425", "0.5722425", "0.5722425", "0.5722425", "0.5722425", "0.5722425", "0.5722425", "0.56919384", "0.56919384", "0.5661932", "0.5629606", "0.5620534", "0.5619401", "0.5617537", "0.56137997", "0.56034625", "0.56034625", "0.5597791", "0.55808365", "0.5555677", "0.5555059", "0.55492604", "0.55492604", "0.55375177", "0.553142", "0.55263203", "0.55012107", "0.54924554", "0.54794765", "0.5478492", "0.547653", "0.54762596", "0.54757476", "0.54754245", "0.5459583", "0.54585266", "0.5433637", "0.54305464", "0.54271424", "0.5424038", "0.5413957", "0.5401616", "0.5388927", "0.53790194" ]
0.5495329
83
Returns the number of nucleotides in the sequence.
public int size() { return seq.size(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int numNodi() {\n\t\treturn this.nodi.size();\n\t}", "public int getNumNucleiToRemove() {\n return 0 - numNucleiToRemove;\n }", "public int getNumTotal() {\n return nucleiSelected.size();\n }", "public int length() {\n return aminoAcidSequence.length();\n }", "public int getNumNucleiToAdd() {\n return updateCount - numNucleiToRemove;\n }", "public static int getNos() {\n\t\treturn numberOfStudents;\n\t}", "int getUniqueNumbersCount();", "public long getCount() {\n long count = 0L;\n \n for (GTSEncoder encoder: chunks) {\n if (null != encoder) {\n count += encoder.getCount();\n }\n }\n \n return count;\n }", "public int length() {\n\t\treturn this.n;\n\t}", "public int getN() {\r\n\t\treturn n;\r\n\t}", "public Long getNumeroCuotas() {\n return numeroCuotas;\n }", "public int getN() {\n\t\treturn n;\n\t}", "public int getN() {\n\t\treturn N;\n\t}", "public int N() {\n return (A != null ? A.length : 0);\n }", "public int getN() {\n return n_;\n }", "public int getN() {\n return n_;\n }", "public long getN() {\n return n;\n }", "public int size(){\n\t\tListUtilities start = this.returnToStart();\n\t\tint count = 1;\n\t\twhile(start.nextNum != null){\n\t\t\tcount++;\n\t\t\tstart = start.nextNum;\n\t\t}\n\t\treturn count;\n\t}", "public int getVdusCount() {\n if (vdusBuilder_ == null) {\n return vdus_.size();\n } else {\n return vdusBuilder_.getCount();\n }\n }", "private int numeroCuentas() {\r\n\t\tint cuentasCreadas = 0;\r\n\t\tfor (Cuenta cuenta : this.cuentas) {\r\n\t\t\tif (cuenta != null) {\r\n\t\t\t\tcuentasCreadas++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn cuentasCreadas;\r\n\t}", "public int getCantidadNodos() {\n\t\treturn cantNodos;\n\t}", "BigInteger getNumRegistro();", "public static int numberOfSegs() {\n String sql = \"SELECT COUNT(*) FROM corpus1;\";\n\n int notDistinctCount = 0;\n int distinctCount = 0;\n\n try (Connection conn = DatabaseOperations.connect();\n Statement stmt = conn.createStatement();\n ResultSet rs = stmt.executeQuery(sql)) {\n\n notDistinctCount = rs.getInt(1);\n } catch (SQLException e) {\n System.out.println(\"count: \" + e.getMessage());\n }\n\n sql = \"SELECT COUNT(DISTINCT id) FROM corpus1;\";\n try (Connection conn = DatabaseOperations.connect();\n Statement stmt = conn.createStatement();\n ResultSet rs = stmt.executeQuery(sql)) {\n\n distinctCount = rs.getInt(1);\n } catch (SQLException e) {\n System.out.println(\"count: \" + e.getMessage());\n }\n\n if (distinctCount != notDistinctCount) {\n System.out.println(distinctCount + \", \" + notDistinctCount);\n }\n\n return distinctCount;\n }", "public int getNumChromosomes();", "public int length() {\n int counter = 0;\n while (bitAt(counter) == '1' || bitAt(counter) == '0') {\n counter = counter + 1;\n }\n return counter;\n }", "public int getNumMutants() {\n\t\tint count = 0;\n\t\tfor (Bacteria ind : this.inds) {\n\t\t\tif (ind.hasMutator()) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\treturn count;\n\t}", "public int getVdusCount() {\n return vdus_.size();\n }", "public int getN() {\n return n;\n }", "public int getLength()\n {\n return seq.length;\n }", "public int getCount(){\r\n return sequence.getValue();\r\n }", "public int size() {\n return N;\n }", "public int size() {\n return N;\n }", "public int size() {\n return N;\n }", "public int size() {\n return N;\n }", "public int size() {\n return N;\n }", "public int size() {\n return N;\n }", "public int size() {\n return N;\n }", "public int numeroHojas(){\n\t int N=0, ni=0, nd=0;\n\t Arbol <T> aux=null;\n\t if (!vacio()) {\n\t if ((aux=getHijoIzq())!=null) ni = aux.numeroHojas();\n\t if ((aux=getHijoDer())!=null) nd = aux.numeroHojas();\n\t if ((aux=getHijoDer())==null && (aux=getHijoIzq())==null)N = 1;\n\t else N = ni + nd;\n\t }\n\t\treturn N;\n\t}", "public static int size_seqnum() {\n return (8 / 8);\n }", "public Integer getNumCompetitions() {\r\n return numCompetitions;\r\n }", "public int size()\n {\n return N;\n }", "public int getLength(){\n return sequence.length(); \n\t}", "public int getNSteps() {\n //if (mCovered == null) {\n //return 0;\n //}\n return mCovered.length;\n }", "public int size() {\r\n return N;\r\n }", "public int getN() {\n return this.n;\n }", "int getBlockNumbersCount();", "public int getNunFigli() {\n\t\tint numFigli = 0;\n\t\tfor (Nodo_m_ario figlio : figli) {\n\t\t\tif (figlio != null) {\n\t\t\t\tnumFigli += 1;\n\t\t\t}\n\t\t}\n\t\treturn numFigli;\n\t}", "public int size() {\n return _N;\n\n }", "public NM getNumberOfItemsPerUnit() { \r\n\t\tNM retVal = this.getTypedField(14, 0);\r\n\t\treturn retVal;\r\n }", "public int variantBases() {\n int ret = referenceAlleleLength;\n for (Alt alt : alts) {\n if (referenceAlleleLength != alt.length()) {\n ret += alt.length();\n }\n }\n return ret;\n }", "public int size (){\n return N;\n }", "public int sizeOfSupArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(SUP$4);\n }\n }", "public int numCiudades() {\r\n \r\n return ciudades.size();\r\n }", "public int size() {\n return n;\n }", "public int size() {\n return n;\n }", "public int size() {\n return n;\n }", "public int size() {\n return n;\n }", "public int size() {\n return n;\n }", "public int size() {\n return n;\n }", "public int size() {\n return n;\n }", "public int size() {\n return n;\n }", "public int size() {\n return n;\n }", "public int size() {\n return n;\n }", "public int getNCycles() {\n return ncycles;\n }", "public int getCount(){\n int c = 0;\n for(String s : this.counts){\n c += Integer.parseInt(s);\n }\n return c;\n }", "public int size() {\n\t\treturn N;\n\t}", "public int size() {\n\t\treturn N;\n\t}", "public int size() {\n\t\treturn N;\n\t}", "public int size() {\n\t\treturn N;\n\t}", "public int size() {\n\t\treturn N;\n\t}", "public NM getPsl14_NumberOfItemsPerUnit() { \r\n\t\tNM retVal = this.getTypedField(14, 0);\r\n\t\treturn retVal;\r\n }", "protected short getCount() \r\n {\r\n // We could move this to the individual implementing classes\r\n // so they have their own count\r\n synchronized(AbstractUUIDGenerator.class) \r\n {\r\n if (counter < 0)\r\n {\r\n counter = 0;\r\n }\r\n return counter++;\r\n }\r\n }", "public long getNumInstructions();", "public int get_count() {\n return (int)getUIntBEElement(offsetBits_count(), 16);\n }", "public int size() {\n return N;\n\n }", "public int getNumBitsSet()\n \t{\n \t\tint count = 0;\n \n \t\tfor (int index = getLength() - 1; index >= 0; index--)\n \t\t{\n \t\t\tif (isSet(index))\n \t\t\t{\n \t\t\t\tcount++;\n \t\t\t}\n \t\t}\n \n \t\treturn count;\n \t}", "int getBlockNumsCount();", "int getBlockNumsCount();", "public int numberOfTires() {\n int tires = 4;\n return tires;\n }", "int getNumOfChunks();", "public int size() {\n\t return N;\n\t }", "public int size()\r\n {\r\n return n;\r\n }", "public int obtenerNumeroSolicitudes(){\n return listaSolicitudes.size();\n }", "public int size()\n\t\t{\n\t\treturn N;\n\t\t}", "public int getNumPositive() {\n int numPositive = 0;\n for (NucleiSelected n : nucleiSelected) {\n switch (n.getState()) {\n case POSITIVE:\n numPositive++;\n break;\n case NEGATIVE:\n // do nothing\n break;\n }\n }\n return numPositive;\n }", "public int size(){\r\n\t\treturn N;\r\n\t}", "public int getLength()\n\t{\n\t\tDNode tem=first;\n\t\tint length=0;\n\t\twhile(tem.nextDNode!=null)\n\t\t{\n\t\t\tlength=length+1;\n\t\t\ttem=tem.nextDNode;\n\t\t}\n\t\tif(first!=null)\n\t\t\tlength=length+1;\n\t\treturn length;\n\t}", "public int getNumberOfSelfDivisibleNumbers() \r\n\t{\r\n\t\tList <Integer> numOfDiv = getSelfDivisibleNumbers();\r\n\t\tint rtnNum = numOfDiv.size();\r\n\t\treturn rtnNum;\r\n\t}", "public int size(){\n\t\t\r\n\t\treturn N;\r\n\t}", "@Override\r\n protected long getN() {\r\n boolean handleOutOfMemoryError = false;\r\n long n = 0;\r\n Grids_GridDouble g = getGrid();\r\n int nrows = g.getChunkNRows(ChunkID, handleOutOfMemoryError);\r\n int ncols = g.getChunkNCols(ChunkID, handleOutOfMemoryError);\r\n double noDataValue = g.getNoDataValue(false);\r\n for (int row = 0; row < nrows; row++) {\r\n for (int col = 0; col < ncols; col++) {\r\n double value = getCell(row, col);\r\n if (Double.isNaN(value) && Double.isFinite(value)) {\r\n if (value != noDataValue) {\r\n n++;\r\n }\r\n }\r\n }\r\n }\r\n return n;\r\n }", "public int getNombreNoeud()\t{\r\n \treturn this.noeuds.size();\r\n }", "public int computeNbEtudiant() {\n\t\treturn 0;\n\t}", "public static int getNbCycle() {\n\t\treturn nbCycle;\n\t}", "public int size() {\n return n;\n\n }", "public int getNumNudo() {\n return numNudo;\n }", "public Long getNumContaCorrente() {\n\t\treturn numContaCorrente;\n\t}", "public int size() {\n return this.n;\n }", "public int size() {\r\n\t\treturn n;\r\n\t\t\r\n\t}", "public int NumTerms() throws Z3Exception\n {\n return Native.getPatternNumTerms(Context().nCtx(), NativeObject());\n }", "public Integer cantidadPersonasEnMicro(){\r\n return pasajeros.size();\r\n }" ]
[ "0.6636675", "0.6577122", "0.65074027", "0.6423953", "0.63761526", "0.6373897", "0.62918615", "0.62572205", "0.62176615", "0.6207459", "0.6200175", "0.61908287", "0.6190004", "0.6174245", "0.6160963", "0.6157476", "0.6148518", "0.6137417", "0.61185503", "0.61015093", "0.6099604", "0.6048931", "0.60313636", "0.60297346", "0.60273236", "0.60245866", "0.6003328", "0.5995544", "0.5991802", "0.5990315", "0.5977609", "0.5977609", "0.5977609", "0.5977609", "0.5977609", "0.5977609", "0.5977609", "0.59660125", "0.5948875", "0.59464115", "0.5941563", "0.5936959", "0.59336525", "0.5921192", "0.5917846", "0.5912065", "0.59081197", "0.5873393", "0.586764", "0.5866559", "0.58559847", "0.5841125", "0.5838286", "0.58364516", "0.58364516", "0.58364516", "0.58364516", "0.58364516", "0.58364516", "0.58364516", "0.58364516", "0.58364516", "0.58364516", "0.5836029", "0.5823669", "0.58145434", "0.58145434", "0.58145434", "0.58145434", "0.58145434", "0.5810981", "0.5807792", "0.5805894", "0.5799033", "0.5796389", "0.5795044", "0.57813734", "0.57813734", "0.5781352", "0.57657766", "0.5764969", "0.57623327", "0.57512516", "0.57504547", "0.5749809", "0.5744555", "0.57370013", "0.57366407", "0.5715685", "0.5714535", "0.57078296", "0.57064867", "0.5705981", "0.5704374", "0.5693982", "0.5689179", "0.56819445", "0.56818783", "0.5680262", "0.5670099" ]
0.5703494
94
Returns the number of nucleotides printed per line by print().
public int printLength() { return printLength; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getBlockNumbersCount();", "int getBlockNumsCount();", "int getBlockNumsCount();", "int getLinesCount();", "public int getNumLines ();", "public int getNumTotal() {\n return nucleiSelected.size();\n }", "private static void printNos() {\n\t\tfor(int i=0; i<=10; i++) { //this is a single line comment\n\t\t\tSystem.out.println(i);\n\t\t}\n\t\t/*\n\t\t * this is a multiline comment\n\t\t */\n\t}", "int getNumberOfLines();", "public static int getNos() {\n\t\treturn numberOfStudents;\n\t}", "public int getNumChromosomes();", "public int getNumLines() {\n\t\treturn numLines;\n\t}", "int getNumOfChunks();", "public int getN() {\n\t\treturn N;\n\t}", "public int getN() {\r\n\t\treturn n;\r\n\t}", "public long getNumInstructions();", "public int getN() {\n\t\treturn n;\n\t}", "public int getN() {\n return writeResult.getN();\n }", "public int getN() {\n return n_;\n }", "public int discCount() {\n\t\tint countBLACK = discBlackCount();\n\t\tint countWHITE = discWhiteCount();\n\n\t\treturn countBLACK + countWHITE;\n\t\t\n\t}", "public int getN() {\n return n_;\n }", "int getChunksCount();", "int getChunksCount();", "public long getN() {\n return n;\n }", "private static int numLines() {\n\t\tif(subway != null)\n\t\t\treturn subway[0].length;\n\t\treturn 0;\n\t}", "static int displayN(Node node)\r\n {\r\n return node.neighbors.size();\r\n }", "public int getBlockNumsCount() {\n return blockNums_.size();\n }", "public int getBlockNumsCount() {\n return blockNums_.size();\n }", "public int numNodi() {\n\t\treturn this.nodi.size();\n\t}", "public int getNCycles() {\n return ncycles;\n }", "public int size() {\n return N;\n }", "public int size() {\n return N;\n }", "public int size() {\n return N;\n }", "public int size() {\n return N;\n }", "public int size() {\n return N;\n }", "public int size() {\n return N;\n }", "public int size() {\n return N;\n }", "public int getCount(){\n int c = 0;\n for(String s : this.counts){\n c += Integer.parseInt(s);\n }\n return c;\n }", "public int size() {\r\n return N;\r\n }", "public int count() {\n\t\treturn sizeC;\n\t}", "int getBytesPerLine() {\n\t\treturn bytesInLine.intValue();\n\t}", "public int numberOfIcosahedrons() {\n return icosList.size();\n }", "public int size()\n {\n return N;\n }", "public int getLine_number_display_digits() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn __io__block.readInt(__io__address + 40);\n\t\t} else {\n\t\t\treturn __io__block.readInt(__io__address + 40);\n\t\t}\n\t}", "public static int getNSectors()\n {\n return Disk.NUM_OF_SECTORS - ADisk.REDO_LOG_SECTORS - 1;\n }", "public int getN() {\n return n;\n }", "public int size() {\n return n;\n }", "public int size() {\n return n;\n }", "public int size() {\n return n;\n }", "public int size() {\n return n;\n }", "public int size() {\n return n;\n }", "public int size() {\n return n;\n }", "public int size() {\n return n;\n }", "public int size() {\n return n;\n }", "public int size() {\n return n;\n }", "public int size() {\n return n;\n }", "public int getBlockNumsCount() {\n return blockNums_.size();\n }", "public int getBlockNumsCount() {\n return blockNums_.size();\n }", "int NoOfNodes() {\r\n return noOfNodes;\r\n }", "public int size (){\n return N;\n }", "public int size() {\r\n\t\treturn n;\r\n\t\t\r\n\t}", "int numOfPillars() {\n // there are one more coordinate line than blocks in each direction\n // since each block must be hinged on a coordinate line on each side\n return (ni+1) * (nj+1);\n }", "public int length() {\n\t\treturn this.n;\n\t}", "public int getLinesCount() {\n return lines.length;\n }", "public int size()\r\n {\r\n return n;\r\n }", "public int getN() {\n return this.n;\n }", "public static int numberOfSegs() {\n String sql = \"SELECT COUNT(*) FROM corpus1;\";\n\n int notDistinctCount = 0;\n int distinctCount = 0;\n\n try (Connection conn = DatabaseOperations.connect();\n Statement stmt = conn.createStatement();\n ResultSet rs = stmt.executeQuery(sql)) {\n\n notDistinctCount = rs.getInt(1);\n } catch (SQLException e) {\n System.out.println(\"count: \" + e.getMessage());\n }\n\n sql = \"SELECT COUNT(DISTINCT id) FROM corpus1;\";\n try (Connection conn = DatabaseOperations.connect();\n Statement stmt = conn.createStatement();\n ResultSet rs = stmt.executeQuery(sql)) {\n\n distinctCount = rs.getInt(1);\n } catch (SQLException e) {\n System.out.println(\"count: \" + e.getMessage());\n }\n\n if (distinctCount != notDistinctCount) {\n System.out.println(distinctCount + \", \" + notDistinctCount);\n }\n\n return distinctCount;\n }", "public int lines() {\n return list.size();\n }", "public int size() {\n return N;\n\n }", "public int size() {\n\t\treturn N;\n\t}", "public int size() {\n\t\treturn N;\n\t}", "public int size() {\n\t\treturn N;\n\t}", "public int size() {\n\t\treturn N;\n\t}", "public int size() {\n\t\treturn N;\n\t}", "public int size() {\n return _N;\n\n }", "public int getNunFigli() {\n\t\tint numFigli = 0;\n\t\tfor (Nodo_m_ario figlio : figli) {\n\t\t\tif (figlio != null) {\n\t\t\t\tnumFigli += 1;\n\t\t\t}\n\t\t}\n\t\treturn numFigli;\n\t}", "public int size() {\n return this.n;\n }", "public Long getNumContaCorrente() {\n\t\treturn numContaCorrente;\n\t}", "public long getCount() {\n long count = 0L;\n \n for (GTSEncoder encoder: chunks) {\n if (null != encoder) {\n count += encoder.getCount();\n }\n }\n \n return count;\n }", "public Long getNumeroCuotas() {\n return numeroCuotas;\n }", "public int size(){\r\n\t\treturn N;\r\n\t}", "public int size(){\n\t\tListUtilities start = this.returnToStart();\n\t\tint count = 1;\n\t\twhile(start.nextNum != null){\n\t\t\tcount++;\n\t\t\tstart = start.nextNum;\n\t\t}\n\t\treturn count;\n\t}", "public int size() {\n\t return N;\n\t }", "public int size()\n\t\t{\n\t\treturn N;\n\t\t}", "public int size() {\n return n;\n\n }", "public int size() { \r\n \treturn n; \r\n }", "protected int bytesPerLine() {\n return (48);\n }", "protected int bytesPerLine() {\n return (48);\n }", "int numOfBlocks() {\n return ni * nj * nk;\n }", "private int size() {\n return n;\n }", "public int getNumCars() {\r\n\t\treturn (numCars + numSmallCars);\r\n\t}", "public int getNumOfChunks() {\n return numOfChunks_;\n }", "public int numberOfTires() {\n int tires = 4;\n return tires;\n }", "public String getVerticesCount() {\n long res = 0;\n Iterator<Vertex> itty = g.vertices();\n Vertex v;\n while (itty.hasNext()) {\n v = itty.next();\n res++;\n }\n return Long.toString(res);\n }", "public int size(){\n\t\t\r\n\t\treturn N;\r\n\t}", "public int size() {\n return lines.size();\n }", "public int getVdusCount() {\n return vdus_.size();\n }", "public int size()\r\n\t{\r\n\t\tsynchronized (lines)\r\n\t\t{\r\n\t\t\treturn lines.size();\r\n\t\t}\r\n\t}", "public int totalNum(){\n return wp.size();\n }", "@Override\n\tpublic int count() {\n\t\treturn 4;\n\t}", "public abstract int numberOfLines();" ]
[ "0.63161576", "0.6305639", "0.6305639", "0.61035776", "0.6042489", "0.60138863", "0.59978616", "0.598536", "0.58719695", "0.5853088", "0.5827148", "0.5814774", "0.5804351", "0.57952374", "0.5773437", "0.5753009", "0.5751393", "0.57513857", "0.57400453", "0.5736767", "0.57181394", "0.57181394", "0.56905985", "0.5685925", "0.56829625", "0.5682646", "0.5682646", "0.56775284", "0.56709784", "0.5663491", "0.5663491", "0.5663491", "0.5663491", "0.5663491", "0.5663491", "0.5663491", "0.56435996", "0.56425977", "0.56408966", "0.5640408", "0.5625995", "0.5622581", "0.5613195", "0.560558", "0.55973417", "0.55966383", "0.55966383", "0.55966383", "0.55966383", "0.55966383", "0.55966383", "0.55966383", "0.55966383", "0.55966383", "0.55966383", "0.5579715", "0.5579715", "0.5574301", "0.5572539", "0.5558976", "0.5553342", "0.5550679", "0.55495286", "0.5539434", "0.55389553", "0.5534271", "0.5533927", "0.55308264", "0.55279535", "0.55279535", "0.55279535", "0.55279535", "0.55279535", "0.55253345", "0.5509704", "0.54947805", "0.5489362", "0.5485026", "0.54754174", "0.54727334", "0.54704386", "0.54702324", "0.54700947", "0.5459377", "0.5455467", "0.5449926", "0.5449926", "0.5449318", "0.5447853", "0.5444786", "0.5443876", "0.54416984", "0.5434902", "0.54261225", "0.5420204", "0.54183394", "0.54182094", "0.54177284", "0.54168385", "0.540891" ]
0.59796476
8
Returns the length of sequence drawn in graph by draw().
public double drawLength() { return drawLength; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int length() {\n \t\tif (-1 == n_points) setupForDisplay();\n \t\treturn n_points;\n \t}", "public double getLength() {\n return count;\n }", "int getTickLength();", "public int getLength ()\r\n {\r\n return glyph.getBounds().width;\r\n }", "public int getLength()\n {\n return seq.length;\n }", "protected int getLength() {\n int length = super.getLength(); //see if it is defined in the ncml\n if (length < 0) {\n double[] t = getTimes();\n if (t != null) length = t.length;\n else length = 0;\n }\n return length;\n }", "public double length()\n {\n return this.getR();\n }", "public int getLength(){\n return sequence.length(); \n\t}", "public double length() {\n\t\tdouble length = 0;\n\t\tif (isEmpty())\n\t\t\treturn 0;\n\t\tjava.util.ListIterator<PathPoint> it = listIterator();\n\t\tPathPoint current = it.next();\n\t\twhile (it.hasNext()) {\n\t\t\tPathPoint next = it.next();\n\t\t\tlength += mc.distance3d(current.getLocation(), next.getLocation());\n\t\t\tcurrent = next;\n\t\t}\n\t\treturn length;\n\t}", "int getSequenceStepsCount();", "public int length() {\n return steps.size();\n }", "protected int length() { return FormatTools.getRasterLength(lengths); }", "public double get_length() {\n\t\treturn _length;\n\t}", "int getPointLength();", "public double Length()\n {\n\n return new Point3D().distance(head);\n }", "public double getLength()\n\t{\n\t\treturn length;\n\t}", "public int getCount(){\r\n return sequence.getValue();\r\n }", "public int getLength()\n\t{\n\t\tDNode tem=first;\n\t\tint length=0;\n\t\twhile(tem.nextDNode!=null)\n\t\t{\n\t\t\tlength=length+1;\n\t\t\ttem=tem.nextDNode;\n\t\t}\n\t\tif(first!=null)\n\t\t\tlength=length+1;\n\t\treturn length;\n\t}", "public final int size() {\r\n return sequentialSize(root);\r\n }", "int getNumberOfCurveSegments();", "public double getLength() {\n\t\treturn length;\n\t}", "public double getLength() {\r\n\t\treturn length;\r\n\t}", "public double length() {\n\t\treturn startPoint.distance(endPoint);\n\t}", "public double getLength() {\r\n\t\t\treturn length;\r\n\t\t}", "public double getLength();", "public double length(){\n return end.distance(getStart());\n }", "public int getLength() {\r\n return this.seqLength;\r\n }", "public int length() {\n\t\treturn this.n;\n\t}", "public double length () {\n return Math.sqrt(lengthSquared());\n }", "public double getLength() {\r\n return length;\r\n }", "public double getLength() {\n return length;\n }", "public int getNumberOfVertices();", "abstract double getLength();", "public double getLength(){\r\n\t\treturn length;\r\n\t}", "int getLinesCount();", "float getLength();", "float getLength();", "public int get_nr_of_segments() {\n return nr_of_segments;\n }", "public double length()\n\t{\n\t\treturn Math.sqrt(x*x + y*y);\n\t}", "public int getNumVertices();", "public double Length() {\n return OCCwrapJavaJNI.Units_Dimensions_Length(swigCPtr, this);\n }", "public int numberOfSegments() {\n return lineSegs.length;\n }", "public int size() { return seq.size(); }", "public float length ()\n {\n return FloatMath.sqrt(lengthSquared());\n }", "public double getLength()\n {\n return length;\n }", "public long size() {\n return CoreJni.sizeInCoreRenderNodeDescArrayView(this.agpCptr, this);\n }", "public int length() {\n return aminoAcidSequence.length();\n }", "public int length()\n {\n int count = 0;\n Node position = head;\n\n while(position != null)\n {\n count++;\n position = position.nLink;\n } // end while\n\n return count;\n }", "public int getLength()\n\t{\n\t\treturn (int) length;\n\t}", "public int numberOfSegments() {\n return lineSegments.size();\n }", "public int numberOfSegments() {\n return lineSegments.size();\n }", "public double length()\n {\n return Math.sqrt(this.lengthsq());\n }", "public int numVertices();", "public int numVertices();", "public int getNumLines ();", "public long length() {\n\tint nBits;\n\tlong x, y;\n\tlong length = 7 + Math.max(minBitsS(toFixed(getTranslateX())),\n\t\t\t\t minBitsS(toFixed(getTranslateY())));\n\tif (hasScale()) {\n\t length += 5 + Math.max(minBitsS(toFixed(getScaleX())),\n\t\t\t\t minBitsS(toFixed(getScaleY())));\n\t}\n\tif (hasRotate()) {\n\t length += 5 + Math.max(minBitsS(toFixed(getRotate1())),\n\t\t\t\t minBitsS(toFixed(getRotate2())));\n\t}\n\treturn length;\n }", "public int numberOfSegments() {\n return lineSegments.length;\n }", "public Double getLength()\n {\n return length;\n }", "public double length() {\n return this.getHead().distance(Point3D.ZERO);\n }", "public abstract int getNumberOfVertices();", "public double length() {\n\t\treturn Math.sqrt(x * x + y * y + z * z + w * w);\n\t}", "public int getStepLength() {\n return OffsetOriginStep.getLength();\n }", "public int numberOfSegments() {\n return this.lineSegments.length;\n }", "public int length() {\n return size();\n }", "protected int getGraphWidth() {\r\n\t\treturn pv.graphWidth;\r\n\t\t/*\r\n\t\t * if (canPaintGraph()) return getWidth()-leftEdge-rightEdge; else\r\n\t\t * return 0;\r\n\t\t */\r\n\t}", "int getNumSegments();", "public int length()\n\t{\n\t\treturn length;\n\t}", "int getPointsCount();", "public int length() {\n return length;\n }", "public int length() {\n return length;\n }", "public int length() {\n return length;\n }", "public int length() {\n\tif (next == null) return 1;\n\telse return 1 + next.length();\n }", "public int getSize() {\n\t\treturn width + length;\n\t}", "public int get_nr_of_points() {\n return points_per_segment;\n }", "public int length() {\n return nextindex - startIndex;\n }", "@Override\n\tpublic double getLength() {\n \tdouble muscleLength = myAmplitude * Math.sin(myPie);\n\t\tmyPie += myFrequency;\n\t\treturn muscleLength;\n }", "public int height()\n {\n\treturn this.next.size();\n }", "public int length() {\n\t\treturn length;\n\t}", "public int length() {\n\t\treturn length;\n\t}", "public int getSeriesLength() {\n\t\treturn -1;\n\t}", "@JSProperty(\"tickLength\")\n double getTickLength();", "public int size()\n {\n return numEdges;\n }", "public int getVertexCount();", "int getNumberOfEdges();", "public int numberOfSegments() {\n return this.segments.length;\n }", "public int getLength()\n\t{\n\t\treturn length;\n\t}", "public int getLength()\n\t{\n\t\treturn length;\n\t}", "private static int numLines() {\n\t\tif(subway != null)\n\t\t\treturn subway[0].length;\n\t\treturn 0;\n\t}", "public int shapeCount()\n {\n // return the number of children in the list\n return children.size();\n }", "public String getVerticesCount() {\n long res = 0;\n Iterator<Vertex> itty = g.vertices();\n Vertex v;\n while (itty.hasNext()) {\n v = itty.next();\n res++;\n }\n return Long.toString(res);\n }", "public int length(){\r\n int counter = 0;\r\n ListNode c = head;\r\n while(c != null){\r\n c = c.getLink();\r\n counter++;\r\n }\r\n return counter;\r\n }", "public int getNumberOfPaths(){ \r\n HashMap<FlowGraphNode, Integer> number = new HashMap<>();\r\n LinkedList<FlowGraphNode> queue = new LinkedList<>();\r\n HashMap<FlowGraphNode, Integer> label = new HashMap<>();\r\n \r\n label.put(start,1);\r\n queue.add(start);\r\n do{\r\n FlowGraphNode node = queue.pop();\r\n for(FlowGraphNode child : node.to){\r\n int count = number.getOrDefault(child, child.inDeg()) -1;\r\n if(count == 0){\r\n queue.add(child);\r\n number.remove(child);\r\n //label\r\n int sum = 0;\r\n for(FlowGraphNode anc : child.from){\r\n sum += label.get(anc);\r\n }\r\n label.put(child,sum);\r\n }else{\r\n number.put(child, count);\r\n }\r\n }\r\n }while(!queue.isEmpty());\r\n \r\n if(!number.isEmpty()){\r\n //there has to be a loop in the graph\r\n return -1;\r\n }\r\n \r\n return label.get(end);\r\n }", "public int getLength() {\r\n return length;\r\n }", "public int getLength() {\r\n return length;\r\n }", "public int getLength() {\r\n return length;\r\n }", "private int size() {\n assert _vertices.size() == _edges.size();\n return _edges.size();\n }", "public int numberOfSegments() {\n return p;\n }", "public int getLength() {\n return this.sideLength;\n }", "@Override\n public int getWidth() {\n return graphicsEnvironmentImpl.getWidth(canvas);\n }", "public int numEdges();" ]
[ "0.71463823", "0.65902007", "0.6484698", "0.64508677", "0.6438165", "0.63989407", "0.63986826", "0.6395285", "0.6360126", "0.6338407", "0.63080806", "0.6307985", "0.62118703", "0.62098676", "0.61895645", "0.6156813", "0.6156476", "0.61122537", "0.6110195", "0.6099611", "0.6087495", "0.6086532", "0.608434", "0.6080369", "0.6065582", "0.6065495", "0.6049607", "0.604171", "0.6019257", "0.6019042", "0.59941", "0.5992481", "0.59851164", "0.59676236", "0.59639084", "0.59586346", "0.59586346", "0.59566516", "0.5953148", "0.5952651", "0.5951926", "0.59471595", "0.59455854", "0.59283787", "0.59205806", "0.5904347", "0.5903869", "0.58945704", "0.58926797", "0.5884079", "0.5884079", "0.5882299", "0.5873516", "0.5873516", "0.5864312", "0.5856335", "0.58509874", "0.58501935", "0.5848804", "0.582888", "0.5826226", "0.5823612", "0.58003354", "0.57910526", "0.5789614", "0.57883596", "0.5769173", "0.5767302", "0.5764994", "0.5764994", "0.5764994", "0.5754363", "0.57452154", "0.57425064", "0.57334524", "0.5721564", "0.57147354", "0.57130444", "0.57130444", "0.57099503", "0.57067025", "0.5703986", "0.5699878", "0.56979537", "0.5696905", "0.5688255", "0.5688255", "0.56818205", "0.56798106", "0.5678308", "0.5672968", "0.56701636", "0.56688046", "0.56688046", "0.56688046", "0.5665678", "0.5665401", "0.5664467", "0.56596047", "0.56558067" ]
0.6795319
1
Draws a line in graph that represents the sequence, and labels the start and end number.
public void draw() { StdDraw.clear(); StdDraw.setPenColor(StdDraw.BLACK); StdDraw.setXscale(-drawLength * 0.1, drawLength * 1.2); StdDraw.setYscale(-drawLength * 0.65, drawLength * 0.65); StdDraw.line(0, 0, drawLength, 0); StdDraw.text(-drawLength * 0.05, 0, "0"); StdDraw.text(drawLength * 1.1, 0, Integer.toString(size())); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void drawLine(int x1, int y1, int x2, int y2);", "void addLine(int index, Coordinate start, Coordinate end);", "public DrawLineGraph()\n\t{\n\t\tframe = new JFrame();\n\t\tframe.setTitle(\"Line Graph\");\n\t\tframe.setSize(600,400);\n\t\tframe.setLayout(new BorderLayout());\n\t\tframe.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n\t\t\n\t\tseries = new XYSeries(\"Cross Entropy Cost Function\");\n\t\tXYSeriesCollection dataset = new XYSeriesCollection(series);\n\t\tchart = ChartFactory.createXYLineChart(\"Cross Entropy Cost Function\", \"Epoch\", \"Error\", dataset);\n\t\tframe.add(new ChartPanel(chart), BorderLayout.CENTER);\n\t\t\n\n\t}", "private void drawLine(int x1, int y1, int x2, int y2)\n {\n System.out.println(\"Draw a line from x of \" + x1 + \" and y of \" + y1);\n System.out.println(\"to x of \" + x2 + \" and y of \" + y2);\n System.out.println(\"The line color is \" + lineColor);\n System.out.println(\"The width of the line is \" + lineWidth);\n System.out.println(\"Then length of the line is \" + df.format(getLength()) + \"\\n\" );\n }", "private void drawLine(double x1, double y1, double x2, double y2) {\r\n\t\tGLine line = new GLine(x1,y1,x2,y2);\r\n\t\tadd(line);\r\n\t}", "private void drawLine(int x, int y, int x1, int y1, int count, Color color) {\n\n // draw a line if count is greater than 0\n if (count > 0) {\n\n NscLine newLine = new NscLine(x+count, y, x1+count, y1);\n newLine.setForeground(color);\n add(newLine);\n \n // ensure we repaint the window\n repaint();\n\n // recursively call this method, decreasing count each time\n drawLine(x, y, x1, y1, count-1, color);\n\n }\n\n }", "private void drawLine(Graphics g, int x1, int y1, int x2, int y2) {\n int d = 0;\n\n int dx = Math.abs(x2 - x1);\n int dy = Math.abs(y2 - y1);\n\n int dx2 = 2 * dx; // slope scaling factors to\n int dy2 = 2 * dy; // avoid floating point\n\n int ix = x1 < x2 ? 1 : -1; // increment direction\n int iy = y1 < y2 ? 1 : -1;\n\n int x = x1;\n int y = y1;\n\n if (dx >= dy) {\n while (true) {\n plot(g, x, y);\n if (x == x2)\n break;\n x += ix;\n d += dy2;\n if (d > dx) {\n y += iy;\n d -= dx2;\n }\n }\n } else {\n while (true) {\n plot(g, x, y);\n if (y == y2)\n break;\n y += iy;\n d += dx2;\n if (d > dy) {\n x += ix;\n d -= dy2;\n }\n }\n }\n }", "private void drawLine(GraphicsContext canvas, Point start, Point end) {\n canvas.strokeLine(\n start.X, start.Y,\n end.X, end.Y\n );\n }", "private void drawLineSeg(int entryNum, GPoint from, GPoint to) {\n\t\tGLine line = new GLine(from.getX(), from.getY(),\n\t\t\t\t\t\t\t to.getX(), to.getY());\n\t\tline.setColor(getColor(entryNum));\n\t\tadd(line);\n\t}", "public void drawLine() {\n for(int i=0; i < nCols; i++) {\n System.out.print(\"----\");\n }\n System.out.println(\"\");\n }", "public void drawLine(int x, int y, int x2, int y2, int color);", "public void renderLine (Graphics g)\r\n {\r\n if (glyph.getContourBox()\r\n .intersects(g.getClipBounds())) {\r\n getLine(); // To make sure the line has been computed\r\n\r\n Point start = glyph.getLag()\r\n .switchRef(\r\n new Point(\r\n getStart(),\r\n (int) Math.rint(line.yAt((double) getStart()))),\r\n null);\r\n Point stop = glyph.getLag()\r\n .switchRef(\r\n new Point(\r\n getStop() + 1,\r\n (int) Math.rint(line.yAt((double) getStop() + 1))),\r\n null);\r\n g.drawLine(start.x, start.y, stop.x, stop.y);\r\n }\r\n }", "public void drawLine(double startx, double starty, double endx, double endy, Color color) {\n\t\tgc.setStroke(color);\n\t\tgc.strokeLine(startx,starty,endx,endy);\n\t}", "public void drawLine(int x1, int y1, int x2, int y2 , Graphics g) {\r\n \tfloat dY, dX;\r\n \tfloat x,y;\r\n \tdX = x2-x1;\r\n \tdY = y2-y1;\r\n \tx = x1;\r\n \ty = y1;\r\n \t\t\t\r\n \tfloat range = Math.max(Math.abs(dX), Math.abs(dY));\r\n \tdY = dY/range;\r\n \tdX = dX/range;\r\n \t\r\n \tfor (int i =0 ; i < range ; i++ ) { \r\n \t\tg.drawRect(Math.round(x), Math.round(y),1,1);\r\n \t\tx = x + dX;\r\n \t\ty = y + dY;\r\n \t}\r\n\r\n \t\r\n }", "public Line(Point startingPoint, Point endingPoint) {\n this.startingPoint = startingPoint;\n this.endingPoint = endingPoint;\n }", "public void drawLine(float x, float y, float x2, float y2, float width) {\n throw new NotImplementedException(); // TODO Implement\n }", "public void drawLine(float x, float y, float x2, float y2, float width, float u, float v, float texW, float texH) {\n throw new NotImplementedException(); // TODO Implement\n }", "public void draw(Graphics g) {\r\n g.drawLine(line.get(0).getX() + 4, line.get(0).getY() + 4, line.get(4).getX() + 4, line.get(4).getY() + 4);\r\n }", "@Override\n public void draw(Graphics g) {\n g.setColor(Color.BLACK);\n g.drawLine(startingPoint.x, startingPoint.y, endingPoint.x, endingPoint.y);\n }", "private void drawHorizontalLines(){\r\n\r\n\t\tdouble x1 = START_X;\r\n\t\tdouble x2 = getWidth();\r\n\t\tdouble y1 = GRAPH_MARGIN_SIZE;\r\n\t\tdouble y2 = y1;\r\n\r\n\t\tdrawLine(x1,y1,x2,y2);\r\n\r\n\t\tdouble newY1 = getHeight() - y1;\r\n\t\tdouble newY2 = newY1;\r\n\r\n\t\tdrawLine(x1,newY1,x2,newY2);\r\n\t}", "void showLine(int[] xy1, int[] xy2, int width, char col) {\r\n\t\tgc.setStroke(colFromChar(col)); // set the stroke colour\r\n\t\tgc.setLineWidth(width);\r\n\t\tgc.strokeLine(xy1[0], xy1[1], xy2[0], xy2[1]); // draw line\r\n\t}", "private void drawTimeLine (Graphics g) {\n g.setColor (parent.parent.parent.rulerColor);\n g.fillRect (0, _yPix - 3 * parent.lineSize, _xPix, 3 * parent.lineSize);\n \n g.setColor (Color.black);\n g.drawLine (0, _yPix - 3 * parent.lineSize, _xPix, _yPix - 3 * parent.lineSize);\n double inchT = parent.getTime (parent.dpi); if (inchT <= 0) return;\n int i = (int)Math.rint (begT / inchT);\n double t = i * inchT;\n while (t < endT) {\n int xcord = i * parent.dpi - parent.getEvtXCord (begT) - \n (int)Math.rint (parent.fm.charWidth ('|') / 2.0);\n \n g.drawString (\"|\", xcord, _yPix - 2 * parent.lineSize - parent.fDescent);\n \n String t1 = (new Float (t)).toString (), t2;\n \n if (t1.indexOf ('E') == -1) {\n\tint index = max;\n\tif (index > t1.length ()) index = t1.length ();\n\tt2 = t1.substring (0, index);\n }\n else {\n\tint exp = t1.indexOf ('E');\n\tString e = t1.substring (exp, t1.length ());\n\t\n\tint si = 5; if (exp < si) si = exp;\n\tString a = t1.substring (0, si);\n\t\n\tt2 = a + e;\n }\n \n g.drawString (t2,\n xcord - (int)Math.rint (parent.fm.stringWidth (t2) / 2.0),\n _yPix - (parent.lineSize + parent.fDescent));\n t = (++i * inchT);\n }\n }", "public String toString() {\n\t\treturn \"LINE:(\"+startPoint.getX()+\"-\"+startPoint.getY() + \")->(\" + endPoint.getX()+\"-\"+endPoint.getY()+\")->\"+getColor().toString();\n\t}", "Line createLine();", "public void drawLine(Point2D startPoint, Point2D endPoint, double lineStroke, int EndType);", "public void drawGraph() {\n\t\tthis.ig2.setColor(this.backgroundColor);\n\t\tthis.ig2.fillRect(0, 0, this.bi.getWidth(), this.bi.getHeight());\n\n\t\tthis.drawLines();\n\t\tthis.drawFonts(this.scaleStringLine * 10);\n\t\tthis.drawCurves(this.scaleStringLine * 10);\n\t}", "public void plot() {\n // TODO: Implement this method\n System.out.printf(\"%10s : [\",this.label);\n for (int i=1;i<=this.value;i++) {\n System.out.print(\"#\");\n }\n System.out.printf(\"] (%d)\\n\",this.value);\n }", "private void drawConnectLine(double[] startPoint, double[] endPoint, Color color) {\r\n\t\tdouble startX = startPoint[0];\r\n\t\tdouble startY = startPoint[1];\r\n\t\t\r\n\t\tdouble endX = endPoint[0];\r\n\t\tdouble endY = endPoint[1];\r\n\t\t\r\n\t\tGLine line = new GLine();\r\n\t\tline.setStartPoint(startX, startY);\r\n\t\tline.setEndPoint(endX, endY);\r\n\t\tline.setColor(color);\r\n\t\tadd(line);\r\n\t}", "private void drawLine(Vector3 point1, Vector3 point2, Node n) {\n\n Node nodeForLine= new Node();\n nodeForLine.setName(LINE_STRING);\n //First, find the vector extending between the two points and define a look rotation\n //in terms of this Vector.\n final Vector3 difference = Vector3.subtract(point1, point2);\n final Vector3 directionFromTopToBottom = difference.normalized();\n final Quaternion rotationFromAToB =\n Quaternion.lookRotation(directionFromTopToBottom, Vector3.up());\n MaterialFactory.makeTransparentWithColor(getApplicationContext(), new Color(this.colorLine.x, this.colorLine.y, this.colorLine.z,this.alphaColor))\n .thenAccept(\n material -> {\n /* Then, create a rectangular prism, using ShapeFactory.makeCube() and use the difference vector\n to extend to the necessary length. */\n ModelRenderable model = ShapeFactory.makeCube(\n new Vector3(this.sizeLine, this.sizeLine, difference.length()),\n Vector3.zero(), material);\n /* Last, set the world rotation of the node to the rotation calculated earlier and set the world position to\n the midpoint between the given points . */\n\n nodeForLine.setParent(n);\n\n\n nodeForLine.setRenderable(model);\n nodeForLine.setWorldPosition(Vector3.add(point1, point2).scaled(.5f));\n nodeForLine.setWorldRotation(rotationFromAToB);\n }\n );\n\n }", "Line(Dot StartDot,Dot EndDot,int index){\n \tthis.StartDot = StartDot;\n \tthis.EndDot = EndDot;\n \tthis.sx = StartDot.getX();\n \tthis.sy = StartDot.getY();\n \tthis.ex = EndDot.getX();\n \tthis.ey = EndDot.getY();\n \tthis.Angle = Math.atan2((ey - sy),(ex - sx)); \n// \tif((ey - sy) > 0 && (ex - sx) < 0) Angle += Math.PI;\n// \tif((ey - sy) < 0 && (ex - sx) < 0) Angle += Math.PI;\n// \tif((ey - sy) < 0 && (ex - sx) > 0) Angle += Math.PI * 2;\n// \tif((ex-sx) < 0) Angle += Math.PI;\n// \tif((ex - sx) > 0 && (ey - sy) < 0) Angle += Math.PI * 2;\n \tif(Angle < 0) Angle += Math.PI * 2;\n \tthis.rightPoly = null;\n \tthis.leftPoly = null;\n \tthis.index = index;\n }", "private void drawGraph() {\n\t\t//draw vertical (decade) lines\n\t\tdouble deltaX = getWidth() / NDECADES;\n\t\tfor (int i = 0; i < NDECADES; i++) {\n\t\t\tGLine decadeLine = new GLine(i * deltaX, getHeight(),\n\t\t\t\t\t\t\t\t\t\t i * deltaX, 0);\n\t\t\tadd(decadeLine);\n\t\t}\n\t\t\n\t\t//draw horizontal (margin) lines\n\t\tGLine topMargin = new GLine(0, GRAPH_MARGIN_SIZE,\n\t\t\t\t\t\t\t\t\tgetWidth(), GRAPH_MARGIN_SIZE);\n\t\tadd(topMargin);\n\t\tGLine botMargin = new GLine(0, getHeight() - GRAPH_MARGIN_SIZE,\n\t\t\t\t\t\t\t\t\tgetWidth(), getHeight() - GRAPH_MARGIN_SIZE);\n\t\tadd(botMargin);\n\t\t\n\t\t//draw decade labels\n\t\tint year = START_DECADE;\n\t\tfor (int j = 0; j < NDECADES; j++) {\n\t\t\tGLabel label = new GLabel(Integer.toString(year));\n\t\t\tadd(label, j * deltaX, getHeight());\n\t\t\tyear += 10;\n\t\t}\n\t}", "public void drawLine(int i, int y1, int j, int y2, Paint paint) {\n\t\t\n\t}", "public static void renderLine(double startx , double starty , double endx , double endy) {\n\t\t//Find out what rendering mode to use\n\t\tif (! Settings.Android && Settings.Video.OpenGL)\n\t\t\t//Render a line using OpenGL\n\t\t\tBasicRendererOpenGL.renderLine(startx , starty , endx , endy);\n\t\telse if (! Settings.Android && ! Settings.Video.OpenGL)\n\t\t\t//Render a line using Java\n\t\t\tBasicRendererJava.renderLine(startx , starty , endx , endy);\n\t\telse if (Settings.Android && ! Settings.Video.OpenGL)\n\t\t\t//Render a line using Android\n\t\t\tBasicRendererAndroid.renderLine(startx , starty , endx , endy);\n\t}", "private void drawLineNumbers(Canvas canvas, float offsetX, float width, int color){\n if(width + offsetX <= 0){\n return;\n }\n int first = getFirstVisibleLine();\n int last = getLastVisibleLine();\n mPaint.setTextAlign(mLineNumberAlign);\n mPaint.setColor(color);\n mPaint.setTypeface(mTypefaceLineNumber);\n for(int i = first;i <= last;i++){\n switch(mLineNumberAlign){\n case LEFT:\n canvas.drawText(Integer.toString(i + 1), offsetX, getLineBaseLine(i) - getOffsetY(), mPaint);\n break;\n case RIGHT:\n canvas.drawText(Integer.toString(i + 1), offsetX + width, getLineBaseLine(i) - getOffsetY(), mPaint);\n break;\n case CENTER:\n canvas.drawText(Integer.toString(i + 1), offsetX + width / 2f, getLineBaseLine(i) - getOffsetY(), mPaint);\n }\n }\n mPaint.setTextAlign(Paint.Align.LEFT);\n }", "public void drawLine(float[] line) {\n\t\tparent.line(line[0], line[1], line[2], line[3]);\n\t}", "public void draw()\n {\n drawLine(x1, y1, x2, y2);\n }", "public LineSegment( CartesianCoordinate start , CartesianCoordinate end)\n\t{\n\t\tthis.startPoint = start;\n\t\tthis.endPoint = end;\n\t}", "public void paintComponent(Graphics g) {\n\t\t\tsuper.paintComponent(g);\n\t\t\t\n\t\t\t// First 2 arguments (X, Y) -> start, Last 2 arguments (X, Y) -> end\n\t\t\tg.drawLine(0, 3, 200, 200);\n\t\t\tg.drawLine(200, 200, 0, 400);\n\t\t\t\n\t\t}", "@Override\r\n\tprotected void paintComponent(Graphics g) {\n\t\tsuper.paintComponent(g);\r\n\t\tg.drawString(str, 10, 10);\r\n\t\tg.drawLine(10, 20, 110, 20);\r\n\t\tg.drawRect(pX, 30, 100, 100);\r\n\t\t\r\n\t}", "public void drawLine(double x0, double y0, double x1, double y1, int red, int green, int blue){\n\t\tif( x0 > x1 ) {\n\t\t\tdouble xt = x0 ; x0 = x1 ; x1 = xt ;\n\t\t\tdouble yt = y0 ; y0 = y1 ; y1 = yt ;\n\t\t}\n\t\t\n\t\tdouble a = y1-y0;\n\t\tdouble b = -(x1-x0);\n\t\tdouble c = x1*y0 - x0*y1;\n\n\t\t\tif(y0<y1){ // Octant 1 or 2\n\t\t\t\tif( (y1-y0) <= (x1-x0) ) { //Octant 1\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t// Calculate initial x and initial y\n\t\t\t\t\tint x = (int)Math.round(x0);\n\t\t\t\t\tint y = (int)Math.round((-a*x-c)/b);\n\t\t\t\t\t\n\t\t\t\t\tdouble d = a*(x+1) + b*(y+0.5) + c;\n\t\t\t\t\t\n\t\t\t\t\t// Do we need to go E or SE\n\t\t\t\t\twhile(x<=Math.round(x1)){\n\t\t\t\t\t\tRenderer.setPixel(x, y, red, green, blue);\n\t\t\t\t\t\tif(d<0){\n\t\t\t\t\t\t\td = d+a;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\td = d+a+b;\n\t\t\t\t\t\t\ty = y+1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tx = x+1;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t} else { // Octant 2\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t// Calculate initial x and initial y\n\t\t\t\t\tint y = (int)Math.round(y0);\n\t\t\t\t\tint x = (int)Math.round((-b*y-c)/a);\n\t\t\t\n\t\t\t\t\tdouble d = a*(x+0.5) + b*(y+1) + c;\n\t\t\t\t\t\n\t\t\t\t\t// Do we need to go SE or S\t\t\t\t\t\n\t\t\t\t\twhile(y<=Math.round(y1)){\n\t\t\t\t\t\tRenderer.setPixel(x, y, red, green, blue);\n\t\t\t\t\t\tif(d>0){\n\t\t\t\t\t\t\td = d+b; \n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\td = d+a+b;\n\t\t\t\t\t\t\tx = x+1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ty = y+1;\n\t\t\t\t\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} else { // Octant 7 or 8\n\t\t\t\tif( (y0-y1) <= (x1-x0) ) { // Octant 8\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tint x = (int)Math.round(x0);\n\t\t\t\t\tint y = (int)Math.round((-a*x-c)/b);\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tdouble d = a*(x+1) + b*(y-0.5) + c;\n\t\t\t\t\t\n\t\t\t\t\t// Do we need to go E or NE\t\t\t\t\t\n\t\t\t\t\twhile(x<=Math.round(x1)){\n\t\t\t\t\t\tRenderer.setPixel(x, y, red, green, blue);\n\t\t\t\t\t\tif(d>0){ \n\t\t\t\t\t\t\td = d+a;\n\t\t\t\t\t\t} else { \n\t\t\t\t\t\t\td = d+a-b;\n\t\t\t\t\t\t\ty = y-1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tx = x+1;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t} else { //Octant 7\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tint y = (int)Math.round(y0);\n\t\t\t\t\tint x = (int)Math.round((-b*y-c)/a);\n\t\t\t\t\t\n\t\t\t\t\tdouble d = a*(x+0.5) + b*(y-1) + c;\n\t\t\t\t\t\n\t\t\t\t\t// Do we need to go NE or N\n\t\t\t\t\twhile(y>=Math.round(y1)){\n\t\t\t\t\t\tRenderer.setPixel(x, y, red, green, blue);\n\t\t\t\t\t\tif(d<0){\n\t\t\t\t\t\t\td = d-b; \n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\td = d+a-b;\n\t\t\t\t\t\t\tx = x+1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ty = y-1;\n\t\t\t\t\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}", "public void setLine (int Line);", "private void drawLines() {\n int min = BORDER_SIZE;\n int max = PANEL_SIZE - min;\n int pos = min;\n g2.setColor(LINE_COLOR);\n for (int i = 0; i <= GUI.SIZE[1]; i++) {\n g2.setStroke(new BasicStroke(i % GUI.SIZE[0] == 0 ? 5 : 3));\n g2.drawLine(min, pos, max, pos);\n g2.drawLine(pos, min, pos, max);\n pos += CELL_SIZE;\n }\n }", "public void paintLine(Point2D pt1, Point2D pt2, Graphics graphics) {\n Graphics2D g = (Graphics2D) graphics;\n g.setXORMode(java.awt.Color.lightGray);\n g.setColor(java.awt.Color.darkGray);\n if (pt1 != null && pt2 != null) {\n // the line connecting the segments\n OMLine cLine = new OMLine((float) pt1.getY(), (float) pt1.getX(), (float) pt2.getY(), (float) pt2.getX(), lineType);\n // get the map projection\n Projection proj = theMap.getProjection();\n // prepare the line for rendering\n cLine.generate(proj);\n // render the line graphic\n cLine.render(g);\n }\n }", "public static void drawLine(PixelWriter writer, Color color, int startX, int endX, int startY, int endY) {\n\t\tdouble stepY;\n\t\tdouble stepX;\n\t\tdouble yLength = (double) endY - startY;\n\t\tdouble xLength = (double) endX - startX;\n\t\tif (xLength < yLength) {\n\t\t\tstepY = 1;\n\t\t\tstepX = yLength == 0 ? 0 : (xLength / yLength);\n\t\t} else {\n\t\t\tstepX = 1;\n\t\t\tstepY = xLength == 0 ? 0 : (yLength / xLength);\n\t\t}\n\n\t\tdouble y = startY;\n\t\tdouble x = startX;\n\t\tdo {\n\t\t\tdo {\n\t\t\t\twriter.setColor((int) x, (int) y, color);\n\t\t\t\tx += stepX;\n\t\t\t} while (x < endX);\n\t\t\ty += stepY;\n\t\t} while (y < endY);\n\t}", "void drawLine(int startx,int starty,int endx,int endy,ImageView imageView){\n imageView.setVisibility(View.VISIBLE);\n Bitmap bitmap = Bitmap.createBitmap(getWindowManager().getDefaultDisplay().getWidth(),getWindowManager().getDefaultDisplay().getHeight(),Bitmap.Config.ARGB_8888);\n Canvas canvas = new Canvas(bitmap);\n imageView.setImageBitmap(bitmap);\n\n Paint paint = new Paint();\n paint.setColor(Color.RED);\n paint.setStrokeWidth(20);\n paint.setStyle(Paint.Style.STROKE);\n\n canvas.drawLine(startx,starty,endx,endy,paint);\n\n //animates the drawing to fade in\n Animation animation = new AlphaAnimation(0.0f,1.0f);\n animation.setDuration(4000);\n imageView.startAnimation(animation);\n }", "public void addLine(String startNode, String endNode) {\n int startIndex =Integer.parseInt(startNode);\n int endIndex = Integer.parseInt(endNode);\n\n if (startIndex >= 0 && endIndex >= 0) {\n// visited[startIndex]=-1;\n// visited[endIndex]=-1;\n adjacencyMatrix[startIndex][endIndex] = 1;\n }\n }", "@Override\n public void draw(GraphicsContext gc){\n for(int i = 1; i < path.size(); i++) {\n Point2D from = path.get(i-1);\n Point2D to = path.get(i);\n gc.strokeLine(from.getX(), from.getY(), to.getX(), to.getY());\n }\n }", "public void drawLine(Graphics2D g, int width, int height) {\n GetMaximas();\n drawLine(g, width, height, lowerX, lowerY, upperX, upperY);\n }", "public Line drawLine(double startx, double starty, double endx, double endy, int[][] vertices) throws IOException {\n int ind = 0;\n int[] coord = new int[4];\n while (ind < 36) {\n if (vertices[ind][0] <= startx && startx <= vertices[ind][1] && vertices[ind][2] >= starty && starty >= vertices[ind][3]) {\n coord[0] = vertices[ind][4];\n coord[1] = vertices[ind][5];\n return endVali(coord[0],coord[1],endx,endy,vertices);\n }\n ind++;\n }\n return null;\n }", "public void lineDraw(GraphNodeAL<MapPoint> l1, GraphNodeAL<MapPoint> l2) {\n Line l = new Line((int) l1.data.xCo, (int) l1.data.yCo, (int) l2.data.xCo, (int) l2.data.yCo);\n l.setTranslateX(mapImage.getLayoutX());\n l.setTranslateY(mapImage.getLayoutY());\n ((Pane) mapImage.getParent()).getChildren().add(l);\n }", "@Override\n public void drawLine(String id, Location start, Location end, double weight, Color color, boolean arrow, boolean screenCoords) {\n if(screenCoords) {\n start = convToImageCoords(start);\n end = convToImageCoords(end);\n }\n Line l = new Line(id, start, end, weight, color, arrow);\n lineMap.put(id, l);\n render();\n }", "public void drawHorizontalLine(int RGB, int x, int y, int length) {\n\t\tfor (int i = 0; i < length; i++) {\n\t\t\tdrawPixel(RGB, x + i, y);\n\t\t}\n\t}", "public void drawLine(int x0, int y0, int x1, int y1) {\n \t\tmyCanvas.drawLine(x0, y0, x1, y1, myPaint);\n \t}", "private void drawConnectorLine(final Graphics g) {\r\n if (startPort != null && startPoint != null && current != null) {\r\n g.drawLine((int) startPoint.getX(), (int) startPoint.getY(), (int) current.getX(), (int) current.getY());\r\n }\r\n }", "public void drawLine(int x1, int y1, int x2, int y2){\n int a1 = new Coordinate2D(x1, y1).getPixelPointX();\n int b1 = new Coordinate2D(x1, y1).getPixelPointY();\n int a2 = new Coordinate2D(x2, y2).getPixelPointX();\n int b2 = new Coordinate2D(x2, y2).getPixelPointY();\n graphics2D.drawLine(a1, b1, a2, b2);\n }", "@Override\n public void drawLine(String id, Location start, Location end, double weight, Color color, boolean screenCoords) {\n drawLine(id, start, end, weight, color, false, screenCoords);\n }", "public void draw(Graphics g) {\n g.drawLine(start_x, start_y, start_x, end_y);\n g.drawLine(start_x, start_y, end_x, start_y);\n g.drawLine(start_x, end_y, end_x, end_y);\n g.drawLine(end_x, start_y, end_x, end_y);\n }", "final void createLines(boolean isFirst, double length, boolean isContinuous, int number, int direction, boolean isLast, int headType) {\n Line previousLine;\n for (int i = 0; i < number; i++) {\n Line line = new Line();\n line.setStrokeWidth(1.5);\n Anchor anchor;\n Color transparent = new Color(1, 1, 1, 0);\n if (isFirst && i == 0) {\n base = new Anchor(transparent, new SimpleDoubleProperty(startX), new SimpleDoubleProperty(startY));\n anchor = base;\n }\n else {\n previousLine = (Line)getChildren().get(getChildren().size()-1);\n anchor = new Anchor(transparent, previousLine.endXProperty(), previousLine.endYProperty());\n }\n getChildren().add(anchor);\n line.startXProperty().bind(anchor.centerXProperty());\n line.startYProperty().bind(anchor.centerYProperty());\n switch(direction) {\n // Direction is up\n case 1:\n line.endXProperty().bind(anchor.centerXProperty());\n line.endYProperty().bind(anchor.centerYProperty().subtract(length));\n break;\n // Direction is right\n case 2:\n line.endXProperty().bind(anchor.centerXProperty().add(length));\n line.endYProperty().bind(anchor.centerYProperty());\n break;\n // Direction is down\n case 3:\n line.endXProperty().bind(anchor.centerXProperty());\n line.endYProperty().bind(anchor.centerYProperty().add(length));\n break;\n // Direction is left\n case 4:\n line.endXProperty().bind(anchor.centerXProperty().subtract(length));\n line.endYProperty().bind(anchor.centerYProperty());\n break;\n }\n if(!isContinuous)\n line.getStrokeDashArray().setAll(5.0, 5.0);\n line.setMouseTransparent(true);\n getChildren().add(line);\n }\n if(isLast) {\n previousLine = (Line)getChildren().get(getChildren().size()-1);\n head = new Head(headType * 10 + direction, previousLine.endXProperty(), previousLine.endYProperty());\n getChildren().add(head);\n }\n }", "public void drawGraph(Graphics g) \n\t{\n\t\tNode<T> n = start;\n\t\tint count = 0;\t//loop counter variable\n\t\twhile((n.next != start && count == 0) || count < 1) //while not at end of list and hasnt looped\n\t\t{\n\t\t\tint[] pos = n.computeXY();\t\t\t\t\t\t//compute coordinates of the current node\n\t\t\tint[] nextPos = n.next.computeXY();\t\t\t\t//compute coordinates of the next node\n\n\t\t\t//System.out.println(\"--\\nval: \" + n.value + \" position: \" + pos[0] + \", \" + pos[1]);\n\n\t\t\tg.setColor(Color.BLACK); //set draw color to black\n\t\t\tg.drawLine(pos[0], pos[1], nextPos[0], nextPos[1]); //draw line between current \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// and next node\n\t\t\tif(n.isCurrent) //if the node n is the current node in the list\n\t\t\t{\n\t\t\t\tg.setColor(new Color(100, 200, 100));\t\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\tg.setColor(new Color(130, 225, 235));\t\n\t\t\t}\n\n\t\t\tg.fillOval(pos[0] - 25, pos[1] - 25, 50, 50);\t//fill the oval\n\t\t\tg.setColor(Color.BLACK);\t\t\t\t\t\t//set the color of the oval\n\t\t\tif(n == start) \t\t\t\t\t\t\t\t\t//if n is the starting node\n\t\t\t{\n\t\t\t\tg.drawOval(pos[0] - 20, pos[1] - 20, 40, 40);\n\t\t\t}\n\t\t\tg.drawOval(pos[0] - 25, pos[1] - 25, 50, 50);\n\t\t\tg.drawString(n.value.toString(), pos[0], pos[1] + 5);\n\t\t\t\n\t\t\tif(n.next == start) //if we are at the end\n\t\t\t{\n\t\t\t\tcount++;\t\t//increment loop counter\n\t\t\t}\n\t\t\tn = n.next;\n\t\t}\n\t}", "public abstract void lineTo(double x, double y);", "public void setLineId(Number value) {\n setAttributeInternal(LINEID, value);\n }", "public void setLineId(Number value) {\n setAttributeInternal(LINEID, value);\n }", "public void setLineId(Number value) {\n setAttributeInternal(LINEID, value);\n }", "public void drawLine(float[] line) {\n\t\tline(line[0], line[1], line[2], line[3]);\n\t}", "public void drawOneLine(float x1, float y1,float x2,float y2){\n \tGL11.glBegin(GL11.GL_LINES);\n \tGL11.glVertex2f(x1,y1);\n \tGL11.glVertex2f(x2,y2);\n \tGL11.glEnd();\n }", "public HBox answerIntervalLine(String begin, String end)\n {\n HBox answerIntervalLine = new HBox(5);\n answerIntervalLine.getChildren().addAll(new Label(\"Esteve entre \"), new Text(begin), new Label(\" e \"), new Text(end));\n answerIntervalLine.setAlignment(Pos.BASELINE_LEFT);\n\n return answerIntervalLine; \n }", "public Line() {\n \n this.buffer = new ArrayList<ArrayList<Integer>>();\n this.buffer.add(new ArrayList<Integer>());\n this.lineT = 0;\n this.columnT = 0;\n this.inputMode = false;\n }", "public Polyline drawLine(Star one, Star two)\r\n\t{\t\t\r\n\t\treturn lang.newPolyline(new Offset[] { getStarPosition(one.x, one.y), getStarPosition(two.x, two.y) }, \"line\" + one.toString() + two.toString(), null, connectionLines);\r\n\t}", "@Override\n public void paintComponent(Graphics g) {\n super.paintComponent(g);\n if (task.isFinished()) {\n int y = this.getHeight() / 2;\n g.drawLine(0, y, this.getWidth(), y);\n }\n }", "private void drawLines()\n {\n getBackground().setColor( Color.BLACK );\n \n for( int i = 200; i < getWidth(); i += 200 )\n {\n getBackground().drawLine(i, 0, i, getHeight() );\n getBackground().drawLine(0, i, getWidth(), i);\n }\n \n Greenfoot.start();\n }", "@Override\n public void draw(Graphics g) {\n g.setColor(this.getColor());\n g.drawLine(left, axisY, right, axisY);\n\n // Draw string to the left of the plot labeling the height of this axis\n g.setColor(LABEL_COLOR);\n g.setFont(LABEL_FONT);\n FontMetrics metric = g.getFontMetrics(LABEL_FONT);\n int width = metric.stringWidth(label);\n int height = metric.getAscent();\n int x = left - 8 - width;\n int y = axisY + (height / 2) - 1;\n g.drawString(label, x, y);\n }", "public void setLineToStart(final int lineToStart) {\r\n\t\tthis.lineToStart = lineToStart;\r\n\t}", "public void setLine(int line);", "public Line(Point start, Point end) {\r\n this.start = new Point(start.getX(), start.getY());\r\n this.end = new Point(end.getX(), end.getY());\r\n if (this.start.getX() > this.end.getX()) {\r\n // swap points because end is left then start\r\n Point temp = this.start;\r\n this.start = this.end;\r\n this.end = temp;\r\n }\r\n }", "public LineShape() {\n sc=new ShapeComponent[4];\n sc[0]=new ShapeComponent(0,0);\n sc[1]=new ShapeComponent(0,5);\n sc[2]=new ShapeComponent(0,10);\n sc[3]=new ShapeComponent(0,15);\n size=5;\n }", "public void makeLine() {\n \t\tList<Pellet> last_two = new LinkedList<Pellet>();\n \t\tlast_two.add(current_cycle.get(current_cycle.size() - 2));\n \t\tlast_two.add(current_cycle.get(current_cycle.size() - 1));\n \n \t\tPrimitive line = new Primitive(GL_LINES, last_two);\n \t\tMain.geometry.add(line);\n \n \t\tActionTracker.newPolygonLine(line);\n \t}", "public void drawVerticalLine(int RGB, int x, int y, int length) {\n\t\tfor (int i = 0; i < length; i++) {\n\t\t\tdrawPixel(RGB, x, y + i);\n\t\t}\n\t}", "private void addLine(int textStart, int textEnd, boolean isDisjoin, LayoutContext lc, boolean glue) {\n //String s = new String(text, textStart,textEnd-textStart);\n int xx = style.getControlAlignment(true); //flsobral@tc126: use the new method to get the line's alignment.\n if (xx == 0 || xx == Control.LEFT) {\n xx = lc.nextX; //flsobral@tc126: always use nextX when left aligned.\n }\n int yy = lc.nextY;\n if (glue) {\n yy -= Edit.prefH;\n }\n if (lc.atStart()) {\n yy += style.topMargin;\n }\n TextLine l = new TextLine(textStart, textEnd);\n parent.add(l);\n l.setFont(font);\n if (style.alignment == Style.ALIGN_LEFT) {\n lc.verify(l.getPreferredWidth());\n }\n l.setRect(xx, yy, PREFERRED, PREFERRED);\n if (style.alignment == Style.ALIGN_CENTER || style.alignment == Style.ALIGN_RIGHT) {\n l.setRect(xx, KEEP, KEEP, KEEP, lc.parentContainer); //flsobral@tc126: make line relative to the layout context parent container when aligned with center or right.\n }\n if (isDisjoin) {\n lc.disjoin();\n } else {\n lc.update(l.getWidth());\n }\n lc.lastControl = l;\n }", "public void drawLine(Position scanPos, Position mypos)// in\n \t\t// ver�nderter\n \t\t// Form von\n \t\t// http://www-lehre.informatik.uni-osnabrueck.de\n \t\t\t{\n \t\t\t\tint x, y, error, delta, schritt, dx, dy, inc_x, inc_y;\n \n \t\t\t\tx = mypos.getX(); // \n \t\t\t\ty = mypos.getY(); // As i am center\n \n \t\t\t\tdx = scanPos.getX() - x;\n \t\t\t\tdy = scanPos.getY() - y; // Hoehenzuwachs\n \n \t\t\t\t// Schrittweite\n \n \t\t\t\tif (dx > 0) // Linie nach rechts?\n \t\t\t\t\tinc_x = 1; // x inkrementieren\n \t\t\t\telse\n \t\t\t\t\t// Linie nach links\n \t\t\t\t\tinc_x = -1; // x dekrementieren\n \n \t\t\t\tif (dy > 0) // Linie nach oben ?\n \t\t\t\t\tinc_y = 1; // y inkrementieren\n \t\t\t\telse\n \t\t\t\t\t// Linie nach unten\n \t\t\t\t\tinc_y = -1; // y dekrementieren\n \n \t\t\t\tif (Math.abs(dy) < Math.abs(dx))\n \t\t\t\t\t{ // flach nach oben oder unten\n \t\t\t\t\t\terror = -Math.abs(dx); // Fehler bestimmen\n \t\t\t\t\t\tdelta = 2 * Math.abs(dy); // Delta bestimmen\n \t\t\t\t\t\tschritt = 2 * error; // Schwelle bestimmen\n \t\t\t\t\t\twhile (x != scanPos.getX())\n \t\t\t\t\t\t\t{\n \n \t\t\t\t\t\t\t\tif (x != mypos.getX())\n \t\t\t\t\t\t\t\t\t{\n \t\t\t\t\t\t\t\t\t\tincPix(x + mypos.getX(), y + mypos.getY()); // Fuer\n \t\t\t\t\t\t\t\t\t\t// jede\n \t\t\t\t\t\t\t\t\t\t// x-Koordinate\n \t\t\t\t\t\t\t\t\t\t// System.out.println(\"inc pos \"+ (x +\n \t\t\t\t\t\t\t\t\t\t// mypos.getX()));\n \t\t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t\t// Pixel\n \t\t\t\t\t\t\t\tx += inc_x; // naechste x-Koordinate\n \t\t\t\t\t\t\t\terror = error + delta; // Fehler aktualisieren\n \t\t\t\t\t\t\t\tif (error > 0)\n \t\t\t\t\t\t\t\t\t{ // neue Spalte erreicht?\n \t\t\t\t\t\t\t\t\t\ty += inc_y; // y-Koord. aktualisieren\n \t\t\t\t\t\t\t\t\t\terror += schritt; // Fehler\n \t\t\t\t\t\t\t\t\t\t// aktualisieren\n \t\t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t}\n \t\t\t\t\t} else\n \t\t\t\t\t{ // steil nach oben oder unten\n \t\t\t\t\t\terror = -Math.abs(dy); // Fehler bestimmen\n \t\t\t\t\t\tdelta = 2 * Math.abs(dx); // Delta bestimmen\n \t\t\t\t\t\tschritt = 2 * error; // Schwelle bestimmen\n \t\t\t\t\t\twhile (y != scanPos.getY())\n \t\t\t\t\t\t\t{\n \t\t\t\t\t\t\t\tif (y != mypos.getY())\n \t\t\t\t\t\t\t\t\t{// fuer jede y-Koordinate\n \t\t\t\t\t\t\t\t\t\tincPix(x + mypos.getX(), y + mypos.getY());\n \t\t\t\t\t\t\t\t\t}// setze\n \t\t\t\t\t\t\t\t// Pixel\n \t\t\t\t\t\t\t\ty += inc_y; // naechste y-Koordinate\n \t\t\t\t\t\t\t\terror = error + delta; // Fehler aktualisieren\n \t\t\t\t\t\t\t\tif (error > 0)\n \t\t\t\t\t\t\t\t\t{ // neue Zeile erreicht?\n \t\t\t\t\t\t\t\t\t\tx += inc_x; // x-Koord. aktualisieren\n \t\t\t\t\t\t\t\t\t\terror += schritt; // Fehler\n \t\t\t\t\t\t\t\t\t\t// aktualisieren\n \t\t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\tif ((x != scanPos.getX() && y != scanPos.getY()))\n \t\t\t\t\t{\n \t\t\t\t\t\tdecPix(scanPos.getX() + x, scanPos.getY() + y);\n \t\t\t\t\t}\n \t\t\t}", "public void drawLine(int x1, int y1, int x2, int y2) {\n canvas.drawLine(x1, y1, x2, y2, paint);\n }", "private void drawVerticalLines() {\r\n\t\tfor(int i=0;i<NDECADES;i++){\r\n\r\n\t\t\tdouble x1 = i* (getWidth()/NDECADES);\r\n\t\t\tdouble x2 = x1;\r\n\t\t\tdouble y1 = START_Y;\r\n\t\t\tdouble y2 = getHeight();\r\n\r\n\t\t\tdrawLine(x1,y1,x2,y2);\r\n\t\t}\r\n\t}", "private void drawGantt(Gantt g, int id) {\n int x = DEFAULT_NAME_SPACE + 2*DEFAULT_HORIZONTAL_SPACE, y = DEFAULT_HEIGHT_GANTT*id+DEFAULT_VERTICAL_SPACE;\n \n //draw the resource name before each line\n this.drawString(g.resource, DEFAULT_HORIZONTAL_SPACE, y + (DEFAULT_HEIGHT_GANTT/2) + DEFAULT_HEIGHT_GANTT%2, Color.black);\n \n //controls how many segment lines each node will have\n int size = g.segmentLines.size();\n for (int i = 0; i < size; i++) {\n if (i != size -1) {\n float c = 1 - ((float)g.activeContainers.get(i)/(float)16);\n drawRectangle(x+g.segmentLines.get(i)*PxS,\n y,\n (g.segmentLines.get(i+1) - g.segmentLines.get(i))*PxS,\n DEFAULT_HEIGHT_GANTT,\n true,\n new Color(c,c,c));\n drawLine(x+g.segmentLines.get(i)*PxS,\n y,\n x+g.segmentLines.get(i)*PxS,\n y+DEFAULT_HEIGHT_GANTT,\n Color.black);\n } else {\n drawLine(x+g.segmentLines.get(i)*PxS,\n y,\n x+g.segmentLines.get(i)*PxS,\n y+DEFAULT_HEIGHT_GANTT,\n Color.black);\n }\n }\n //cosmetic lines \n drawLine(x+(latest_finish*PxS), y, x+(latest_finish*PxS), y+DEFAULT_HEIGHT_GANTT, Color.black);\n drawLine(x, y, x+(latest_finish*PxS), y, Color.black);\n drawLine(x, y+DEFAULT_HEIGHT_GANTT, x+(latest_finish*PxS), y+DEFAULT_HEIGHT_GANTT, Color.black);\n }", "public static void line(int input, int y) {\n int a;\n int x;\n for (a = input; a > y; a--) {//controls spacing, decrease spacing with each number increase\n System.out.print(\" \");\n }\n for (x = 0; x < y - 1; x++) {//controls the number of times that the number comes out, which will be 2n-1 when you include the System.out.println(y)\n System.out.print(y + \"\" + y);\n\n }\n System.out.println(y);\n\n }", "public void draw()\r\n\t{\r\n\t\tsynchronized (lines)\r\n\t\t{\r\n\t\t\tfor(int i = lines.size()-1; i >= 0; i--)\r\n\t\t\t{\r\n\t\t\t\tlines.get(i).draw();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void drawLine(int x, int y, int x2, int y2, int color){\n int dy = y - y2;\n int dx = x - x2;\n int fraction, stepx, stepy;\n\n if(dy < 0){\n dy = -dy;\n stepy = -1;\n }else{\n stepy = 1;\n }\n if(dx < 0){\n dx = -dx;\n stepx = -1;\n }else{\n stepx = 1;\n }\n dy <<= 1;\n dx <<= 1;\n\n set(x, y, color);\n\n if(dx > dy){\n fraction = dy - (dx >> 1);\n while(x != x2){\n if(fraction >= 0){\n y += stepy;\n fraction -= dx;\n }\n x += stepx;\n fraction += dy;\n set(x, y, color);\n }\n }else{\n fraction = dx - (dy >> 1);\n while(y != y2){\n if(fraction >= 0){\n x += stepx;\n fraction -= dy;\n }\n y += stepy;\n fraction += dx;\n set(x, y, color);\n }\n }\n }", "private void drawLine(KdNode kdNode, double x0, double x1, double y0, double y1) {\n if (kdNode.dimension) { // True, or node is vertical\n StdDraw.setPenColor(Color.red);\n StdDraw.line(kdNode.point.x(), y0, kdNode.point.x(), y1);\n if (kdNode.left != null) drawLine(kdNode.left, x0, kdNode.point.x(), y0, y1);\n if (kdNode.right != null) drawLine(kdNode.right, kdNode.point.x(), x1, y0, y1);\n }\n else { // False, or node is horizontal\n StdDraw.setPenColor(Color.blue);\n StdDraw.line(x0, kdNode.point.y(), x1, kdNode.point.y());\n if (kdNode.left != null) drawLine(kdNode.left, x0, x1, y0, kdNode.point.y());\n if (kdNode.right != null) drawLine(kdNode.right, x0, x1, kdNode.point.y(), y1);\n }\n\n }", "private Line addLine() {\n\t\t// Create a new line\n\t\tLine line = new Line(doily.settings.getPenScale(), \n\t\t\t\tdoily.settings.getPenColor(), doily.settings.isReflect());\n\t\tdoily.lines.add(line);\n\t\treturn line;\n\t}", "public void markLine(int x1, int y1, int x2, int y2) {\n for (int row = y1 - 1; row <= y2 - 1 && row < height; row++) {\n for (int col = x1 - 1; col <= x2 - 1 && col < width; col++) {\n pixels[row][col] = DRAWING_CHAR;\n }\n }\n }", "public EPILine(int[][] pixels, int line, Position position)\r\n\t{\r\n\t\t_position=position;\r\n\t\t_line=line;\r\n\t\t_pixels=pixels;\r\n\t\t\r\n\t}", "public void lineTo(int x, int y){\n paint.setColor(Color.parseColor(\"#000000\"));\n //ToDo: implement line drawing here\n\n canvas.drawLine(lastX, lastY, x, y, paint);\n lastX = x;\n lastY = y;\n Log.d(\"Canvas Element\", \"drawing line from: \" + lastX + \", \" + lastY +\",\" + \" to: \" + x +\", \" + y);\n }", "private void drawArm(double x, double y) {\n\t\tdouble outerX = outerCircle.getX();\n\t\tdouble outerY = outerCircle.getY();\n\t\tdouble outerR = outerCircle.getWidth()/2;\n\t\tarmLine = new GLine(x, outerY+outerR, outerX+outerR, outerY+outerR);\n\t\tadd(armLine);\n\t\tGPoint startpoint = armLine.getStartPoint();\n\t\tadd(markerCircle, startpoint.getX() - MARKER_CIRCLE_RADIUS, startpoint.getY()- MARKER_CIRCLE_RADIUS);\n\t}", "public void setStartLine(final int startLine) {\n this.startLine = startLine;\n }", "public void setStartLine(int startLine) {\r\n this.startLine = startLine;\r\n }", "KochLine(Point start, Point end){\n\t\tsuper(start,end);\n\t\tthis.p1=this.getStart();\n\t\tthis.p5=this.getEnd();\n\t\t\n\t}", "private void drawLink(GL2 gl, GLU glu, float fXCenter, float fYCenter,\n\t\t\tfloat fSegmentXCenter, float fSegmentYCenter, float fBendPointX,\n\t\t\tfloat fBendPointY, LabelContainer labelContainer) {\n\n\t\tgl.glLoadIdentity();\n\n\t\tgl.glColor4fv(RadialHierarchyRenderStyle.LABEL_TEXT_COLOR, 0);\n\t\tgl.glBegin(GL.GL_LINE_STRIP);\n\t\tgl.glVertex3f(fXCenter + fSegmentXCenter, fYCenter + fSegmentYCenter, 0);\n\t\tgl.glVertex3f(fXCenter + fBendPointX, fYCenter + fBendPointY, 0);\n\t\tif (fSegmentXCenter <= 0) {\n\t\t\tgl.glVertex3f(labelContainer.getRight(), fYCenter + fBendPointY, 0);\n\t\t} else {\n\t\t\tgl.glVertex3f(labelContainer.getLeft(), fYCenter + fBendPointY, 0);\n\t\t}\n\t\tgl.glEnd();\n\n\t\tdrawSegmentMarker(gl, glu, fXCenter + fSegmentXCenter, fYCenter + fSegmentYCenter);\n\t}", "private void drawTextMarker(Graphics g, String message, int yLine) {\n\t\tint xCenter = getGameWidthPixels() / 2;\n\t\tVector2DLong position0Inverted = new Vector2DLong(xCenter, yLine),\n\t\t\t\tposition1NonInverted = new Vector2DLong(xCenter, getGameHeightPhysics() - yLine);\n\t\tdrawScoreMarker(g, new ScoreMarker(message, position0Inverted, null, true));\n\t\tdrawScoreMarker(g, new ScoreMarker(message, position1NonInverted, null, false));\n\t}", "public void lineTo(double x, double y)\n {\n\tPoint2D pos = transformedPoint(x,y);\n\tdouble tx = pos.getX();\n\tdouble ty = pos.getY();\n\t\n\tLine line = new Line(_currentx, _currenty, tx, ty);\n\n\tSystem.out.println(\"+Line: \" + line.toString());\n\t_currentPath.add(line);\n\t_currentx = tx;\n\t_currenty = ty;\n }", "private void drawTimeLineForLine(Graphics2D g2d, RenderContext myrc, Line2D line, \n Composite full, Composite trans,\n int tl_x0, int tl_x1, int tl_w, int tl_y0, int tl_h, \n long ts0, long ts1) {\n g2d.setComposite(full); \n\t// Parametric formula for line\n double dx = line.getX2() - line.getX1(), dy = line.getY2() - line.getY1();\n\tdouble len = Utils.length(dx,dy);\n\tif (len < 0.001) len = 0.001; dx = dx/len; dy = dy/len; double pdx = dy, pdy = -dx;\n\tif (pdy < 0.0) { pdy = -pdy; pdx = -pdx; } // Always point down\n double gather_x = line.getX1() + dx*len/2 + pdx*40, gather_y = line.getY1() + dy*len/2 + pdy*40;\n\n\t// Find the bundles, for this with timestamps, construct the timeline\n\tSet<Bundle> set = myrc.line_to_bundles.get(line);\n\tIterator<Bundle> itb = set.iterator(); double x_sum = 0.0; int x_samples = 0;\n while (itb.hasNext()) {\n\t Bundle bundle = itb.next();\n\t if (bundle.hasTime()) { x_sum += (int) (tl_x0 + (tl_w*(bundle.ts0() - ts0))/(ts1 - ts0)); x_samples++; }\n }\n\tif (x_samples == 0) return;\n\tdouble x_avg = x_sum/x_samples;\n ColorScale timing_marks_cs = RTColorManager.getTemporalColorScale();\n itb = set.iterator();\n\twhile (itb.hasNext()) { \n\t Bundle bundle = itb.next();\n\n\t if (bundle.hasTime()) {\n double ratio = ((double) (bundle.ts0() - ts0))/((double) (ts1 - ts0));\n\t g2d.setColor(timing_marks_cs.at((float) ratio));\n\n\t int xa = (int) (tl_x0 + (tl_w*(bundle.ts0() - ts0))/(ts1 - ts0));\n // g2d.setComposite(full); \n g2d.draw(line);\n\t if (bundle.hasDuration()) {\n int xb = (int) (tl_x0 + (tl_w*(bundle.ts1() - ts0))/(ts1 - ts0)); \n double r = (tl_h-2)/2;\n g2d.fill(new Ellipse2D.Double(xa-r,tl_y0-tl_h/2-r,2*r,2*r));\n g2d.fill(new Ellipse2D.Double(xb-r,tl_y0-tl_h/2-r,2*r,2*r));\n if (xa != xb) g2d.fill(new Rectangle2D.Double(xa, tl_y0-tl_h/2-r, xb-xa, 2*r));\n\t if (xa != xb) { g2d.drawLine(xa,tl_y0-tl_h,xb,tl_y0); g2d.drawLine(xa,tl_y0, xb,tl_y0); }\n\t }\n\t g2d.drawLine(xa,tl_y0-tl_h,xa,tl_y0); // Make it slightly higher at the start\n double x0 = line.getX1() + dx * len * 0.1 + dx * len * 0.8 * ratio,\n\t y0 = line.getY1() + dy * len * 0.1 + dy * len * 0.8 * ratio;\n\t g2d.draw(new CubicCurve2D.Double(x0, y0, \n x0 + pdx*10, y0 + pdy*10,\n gather_x - pdx*10, gather_y - pdy*10,\n gather_x, gather_y));\n g2d.draw(new CubicCurve2D.Double(gather_x, gather_y, \n\t gather_x + pdx*40, gather_y + pdy*40,\n\t\t\t\t\t x_avg, tl_y0 - 10*tl_h, \n\t x_avg, tl_y0 - 8*tl_h));\n g2d.draw(new CubicCurve2D.Double(x_avg, tl_y0 - 8*tl_h,\n (x_avg+xa)/2, tl_y0 - 6*tl_h,\n xa, tl_y0 - 2*tl_h,\n xa, tl_y0 - tl_h/2));\n }\n\t}\n }", "@Override\n public void lineTo(double x, double y) {\n graphicsEnvironmentImpl.lineTo(canvas, x, y);\n }", "protected abstract void lineTo(final float x, final float y);", "public Line()\n\t{\n\t\tthis(1.0f, 1.0f, 0.0f);\n\t}" ]
[ "0.6378227", "0.62468696", "0.62214285", "0.62018895", "0.6189733", "0.61646765", "0.6154188", "0.6139882", "0.6125204", "0.61001766", "0.6098153", "0.60747236", "0.59974617", "0.5995093", "0.59892076", "0.59630054", "0.594143", "0.5911481", "0.5866878", "0.5829586", "0.5812267", "0.5808104", "0.57960415", "0.5784864", "0.57389355", "0.57384247", "0.5730683", "0.5723188", "0.5721089", "0.57021815", "0.5688548", "0.56829244", "0.5680688", "0.5664747", "0.56609285", "0.5658893", "0.5656318", "0.5651828", "0.5624956", "0.5621547", "0.56146914", "0.5610813", "0.55870426", "0.5583581", "0.55790126", "0.5564535", "0.55507004", "0.55411744", "0.55217594", "0.55189526", "0.55150217", "0.5512717", "0.54964733", "0.5480452", "0.5479762", "0.5464143", "0.5463406", "0.5457696", "0.54569393", "0.54373467", "0.54268825", "0.54268825", "0.54268825", "0.54216456", "0.5406227", "0.5399266", "0.5386894", "0.5364588", "0.53594726", "0.53585243", "0.5358073", "0.53499573", "0.5335048", "0.5334201", "0.5323071", "0.53184134", "0.531806", "0.5302197", "0.52934486", "0.52881414", "0.5277455", "0.52736455", "0.5261022", "0.5258154", "0.52571154", "0.52511626", "0.5249371", "0.5249349", "0.52476114", "0.52476096", "0.52447516", "0.52373135", "0.5237076", "0.5226128", "0.5223554", "0.52171534", "0.5204125", "0.52012664", "0.52010286", "0.5191565", "0.51911306" ]
0.0
-1
Prints the sequence to the console in a specific format for visualization.
public void print() { int n = getSeq().size(); int m = n / printLength; for (int i = 0; i < m; i++) { printLine(i * printLength, printLength); } printLine(n - n % printLength, n % printLength); System.out.println(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void print() {\n\t\t\tfor (int i = 0; i < nowLength; i++) {\n\t\t\t\tSystem.out.print(ray[i] + \" \");\n\t\t\t}\n\t\t\tSystem.out.print(\"\\n\");\n\t\t}", "public void formatPrint() {\n\t\tSystem.out.printf(\"%8d \", codigo);\n\t\tSystem.out.printf(\"%5.5s \", clase);\n\t\tSystem.out.printf(\"%5.5s \", par);\n\t\tSystem.out.printf(\"%5.5s \", nombre);\n\t\tSystem.out.printf(\"%8d \", comienza);\n\t\tSystem.out.printf(\"%8d\", termina);\n\t}", "public void print() {\n\t\t\n\t\tfor (int j = 0; j < height(); j++) {\n\t\t\tfor (int i = 0; i < width(); i++) {\n\t\t\t\tSystem.out.printf(\"%3d \", valueAt(i, j));\n\t\t\t}\n\t\t\tSystem.out.printf(\"\\n\");\n\t\t}\n\t\tSystem.out.printf(\"\\n\");\t\n\t}", "public void printSequence(int l, int r) {\n\t\tfor (int i = 1; i <= 10; i++) {\n\t\t\tSystem.out.print(sequence[i + 1]);\n\t\t}\n\t}", "@Override\n\tpublic String toString(){\n return description + \"\\n\" + SequenceUtils.format(sequence);\n\t}", "public void print() {\n System.out.println(toString());\n }", "public void print() {\n\t\tSystem.out.println(toString());\n\t}", "public void print() {\n\t\tfor (int i = 0; i < TABLE_SIZE; i++) {\n\t\t\tSystem.out.print(\"|\");\n\t\t\tif (array[i] != null) {\n\t\t\t\tSystem.out.print(array[i].value);\n\t\t\t} else {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.print(\"|\\n\");\n\t}", "public void print() {\r\n\t\t System.out.println(toString());\r\n\t }", "public void print()\n\t{\n\t\tStringBuffer print = new StringBuffer();\n\t\tif (arraySize != 0)\n\t\t{\n\t\t\tfor (int index = 0; index < arraySize - 1; index++) \n\t\t\t{ \n\t\t\t\tprint.append(array[index] + \", \");\n\t\t\t}\n\t\t\tprint.append(array[arraySize - 1]);\n\t\t\tSystem.out.println(print.toString());\n\t\t}\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(){\r\n System.out.println(toString());\r\n }", "public String print(int format);", "public void print(){\n String res = \"\" + this.number;\n for(Edge edge: edges){\n res += \" \" + edge.toString() + \" \";\n }\n System.out.println(res.trim());\n }", "public void print() {\n System.out.print(\"[ \" + value + \":\" + numSides + \" ]\");\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 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 static void printDP(){\r\n for (int i = 0; i < sequence.length(); i++) {\r\n for (int j = 0; j < sequence.length(); j++) {\r\n System.out.print(DPMatrix[i][j] + \" \");\r\n }\r\n System.out.println(\"\");\r\n }\r\n }", "public void display() {\n System.out.println(toString());\n }", "@Override\n public void print() {\n for (int i = 1; i <= itertion; i++) {\n if(n <0){\n this.result = String.format(\"%-3d %-3s (%-3d) %-3s %d \", i, \"*\", n, \"=\", (n * i));\n System.out.println(this.result);\n }else {\n this.result = String.format(\"%-3d %-3s %-3d %-3s %d \", i, \"*\", n, \"=\", (n * i));\n System.out.println(this.result);\n }\n }\n }", "private void print(){\n\t\tfor(int i = 0; i < maxNum; i++){\n\t\t\tSystem.out.print(m[i] + \" \");\n\t\t\t\n\t\t\tif((i + 1) % order == 0){\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}\n\t\tSystem.out.println();\n\t}", "public void print() {\n\t\tfor(String subj : subjects) {\n\t\t\tSystem.out.println(subj);\n\t\t}\n\t\tSystem.out.println(\"==========\");\n\t\t\n\t\tfor(StudentMarks ssm : studMarks) {\n\t\t\tSystem.out.println(ssm.student);\n\t\t\tfor(Byte m : ssm.marks) {\n\t\t\t\tSystem.out.print(m + \" \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public void print() {\r\n System.out.print(\"[id: <\" + this.id + \"> \");\r\n if (this.dimension > 0) {\r\n System.out.print(this.data[0]);\r\n }\r\n for (int i = 1; i < this.dimension * 2; i++) {\r\n System.out.print(\" \" + this.data[i]);\r\n }\r\n System.out.println(\"]\");\r\n }", "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 print() {\r\n System.out.print( getPlayer1Id() + \", \" );\r\n System.out.print( getPlayer2Id() + \", \");\r\n System.out.print(getDateYear() + \"-\" + getDateMonth() + \"-\" + getDateDay() + \", \");\r\n System.out.print( getTournament() + \", \");\r\n System.out.print(score + \", \");\r\n System.out.print(\"Winner: \" + winner);\r\n System.out.println();\r\n }", "public void print() \r\n\t{\r\n\t\tif(debug)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Debug - Starting print\");\r\n\t\t}\r\n\t\t\r\n\t\tfor (int index = 0; index < count; index++) \r\n\t\t{\r\n\t\t\tif (index % 5 == 0) \r\n\t\t\t\tSystem.out.println();\r\n\t\t\t\r\n\t\t\tif(debug)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"\\nDebug - numArray[index] = \" + numArray[index]);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tSystem.out.print(numArray[index] + \"\\t\");\t\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println();\r\n\t\t\r\n\t\tif(debug)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Debug - Ending print\");\r\n\t\t}\r\n\t}", "public void print () \r\n\t{\r\n\t\tfor (int index = 0; index < count; index++)\r\n\t\t{\r\n\t\t\tif (index % 5 == 0) // print 5 columns\r\n\t\t\t\tSystem.out.println();\r\n\r\n\t\t\tSystem.out.print(array[index] + \"\\t\");\t// print next element\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t}", "public void print(){\n\t\tfor (int i=0; i<_size; i++){\n\t\t\tSystem.out.print(_a[i].getKey()+\"; \");\n\t\t}\n\t\tSystem.out.println();\n\t}", "public void println() { System.out.println( toString() ); }", "public void print() {\n System.out.println(this.toString());\n }", "public void showLineage() {\n\t\tfor (Iterator i = this.getLineage().iterator(); i.hasNext();) {\n\t\t\tprtln((String) i.next());\n\t\t}\n\t}", "public void print() {\n\t// Skriv ut en grafisk representation av kösituationen\n\t// med hjälp av klassernas toString-metoder\n System.out.println(\"A -> B\");\n System.out.println(r0);\n System.out.println(\"B -> C\");\n System.out.println(r1);\n System.out.println(\"turn\");\n System.out.println(r2);\n //System.out.println(\"light 1\");\n System.out.println(s1);\n //System.out.println(\"light 2\");\n System.out.println(s2);\n }", "public void display() {\n\t\tSystem.out.println(\"[\" + recDisplay(head) + \"]\");\n\t}", "@Override\n\t\tpublic void print() {\n\n\t\t}", "public void consoleBoardDisplay(){\n\t\tString cell[][] = ttt.getCells();\n\t\tSystem.out.println(\"\\n\" +\n\t\t\t\"R0: \" + cell[0][0] + '|' + cell[0][1] + '|' + cell[0][2] + \"\\n\" +\n\t\t\t\" \" + '-' + '+' + '-' + '+' + '-' + \"\\n\" +\n\t\t\t\"R1: \" + cell[1][0] + '|' + cell[1][1] + '|' + cell[1][2] + \"\\n\" +\n\t\t\t\" \" + '-' + '+' + '-' + '+' + '-' + \"\\n\" +\n\t\t\t\"R2: \" + cell[2][0] + '|' + cell[2][1] + '|' + cell[2][2] + \"\\n\"\n\t\t);\n\t}", "public void print()\n {\n for (int i=0; i<list.length; i++)\n System.out.println(i + \":\\t\" + list[i]);\n }", "public void print(){\n\t\tif(isEmpty()) System.out.println(\"[vazio]\");\n\t\telse{\n\t\t\tSystem.out.print(\"A = [\" + A[0]);\n\t\t\tfor(int i=1; i<size; i++)\n\t\t\t\tSystem.out.print(\", \"+ A[i]);\n\t\t\tSystem.out.println(\"]\");\n\t\t}\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}", "public void show() {\n for (int i = 0; i < rowCount; i++) {\n for (int j = 0; j < columnCount; j++)\n System.out.printf(\"%9.4f \", data[i][j]);\n System.out.println();\n }\n }", "private void print() {\n printInputMessage();\n printFrequencyTable();\n printCodeTable();\n printEncodedMessage();\n }", "public String print(){\r\n\t\t\r\n\t\treturn String.format(\"%9d\\t%-5s\\t\\t%-3d\\t\\t%-15s\",\r\n\t\t\t\tthis.engineNumber, \r\n\t\t\t\tthis.companyName, \r\n\t\t\t\tthis.numberOfRailCars, \r\n\t\t\t\tthis.destinationCity);\r\n\t}", "public void mostrar() {\r\n\t\tfor (int i = 0; i < bolsa.length; i++) {\r\n\t\t\tSystem.out.printf(\"#%d: %d\\t\", i, bolsa[i]);\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t}", "public void Print()\r\n {\r\n \t//A for loop that will cycle \"NumTimes\" times.\r\n \tfor (int I = 0; I < NumTimes; I++)\r\n \t\t//Printing out the \"Word\".\r\n \t\tSystem.out.println (Word);\r\n \t\r\n \t//Skipping a line between the data sets.\r\n \tSystem.out.println ();\r\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 static void printNum() {\n\t\tfor(int i = 1; i<= 20; i++) {\n\t\t\tSystem.out.print(\" \" + i);\n\t\t}\n\t\tSystem.out.println(\"\\n\");\n\t\t}", "public void print() {\n for (int i = 0; i < headers.length; i++) {\n System.out.printf(headers[i] + \", \"); // Print column headers.\n }\n System.out.printf(\"\\n\");\n for (int i = 0; i < (data.length - 1); i++) {\n for (int j = 0; j < data[i].length; j++) {\n System.out.printf(data[i][j] + \" \"); // Print value at i,j.\n }\n System.out.printf(\"\\n\");\n }\n }", "public void print() {\r\n\r\n\t\tfor (int row=0; row<10; row++) \r\n\t\t{\r\n\t\t\tfor (int col=0; col<10; col++)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.print(\"\\t\"+nums[row][col]); //separated by tabs\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}", "static void displaySteps(int arr[]) {\n\n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\tSystem.out.print(arr[i] + \"\\t\");\n\t\t}\n\t}", "public void print() {\n\t\tSystem.out.println(word0 + \" \" + word1 + \" \" + similarity);\n\t}", "public void print() {\n int rows = this.getNumRows();\n int cols = this.getNumColumns();\n\n for (int r = 0; r < rows; r++) {\n\n for (int c = 0; c < cols; c++) {\n System.out.print(this.getString(r, c) + \", \");\n }\n\n System.out.println(\" \");\n }\n }", "@Override\n\tpublic String toString()\n\t{\n\t\treturn String.format(\"%-25s: %d\", this.getSequence(), this.getWeight());\n\t}", "public static void Display(int[] array) {\n for(int i=0;i<array.length;i++){\n System.out.print(array[i]+\"\\t\");\n }\n System.out.println();\n }", "public void display() {\n\t\tSystem.out.println(\" ---------------------------------------\");\n\t\t\n\t\tfor (byte r = (byte) (b.length - 1); r >= 0; r--) {\n\t\t\tSystem.out.print(r + 1);\n\t\t\t\n\t\t\tfor (byte c = 0; c < b[r].length; c++) {\n\t\t\t\tSystem.out.print(\" | \" + b[r][c]);\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\" |\");\n\t\t\tSystem.out.println(\" ---------------------------------------\");\n\t\t}\n\t\t\n\t\tSystem.out.println(\" a b c d e f g h\");\n\t}", "@Override\n\t\t\tpublic void print() {\n\t\t\t\t\n\t\t\t}", "public void print() {\n\t\tif(log.isTraceEnabled()) {\n\t\t\tlog.info(\">> print()\");\n\t\t}\n\t\tSystem.out.println(p + \"/\" + q);\n\t\tif(log.isTraceEnabled()) {\n\t\t\tlog.info(\"<< print()\");\n\t\t}\n\t}", "public String print(){\r\n\t\treturn String.format(\"%9d\\t%-5s\\t\\t%-3d\\t\\t%-15s\",\r\n\t\t\t\tthis.trackNumber, \r\n\t\t\t\tthis.engineNumber, \r\n\t\t\t\tthis.numRailCars, \r\n\t\t\t\tthis.destCity);\r\n\t\t}", "public void printAlignment(SWGAlignment alignment){\n\t\t\tString \torigSeq1 = alignment.getOriginalSequence1().toString(),\n\t\t\t\t\torigSeq2 = alignment.getOriginalSequence2().toString(),\n\t\t\t\t\talnSeq1 = new String(alignment.getSequence1()),\n\t\t\t\t\talnSeq2 = new String(alignment.getSequence2());\n\t\t\tint \tstart1 = alignment.getStart1(),\n\t\t\t\t\tstart2 = alignment.getStart2(),\n\t\t\t\t\tgap1 = alignment.getGaps1(),\n\t\t\t\t\tgap2 = alignment.getGaps2();\n\t\t\t\n\t\t\tString seq1, seq2, mark;\n\t\t\tif(start1>=start2){\n\t\t\t\tseq1=origSeq1.substring(0, start1) + alnSeq1 + origSeq1.substring(start1+alnSeq1.length()-gap1);\n\t\t\t\tString \tseq2Filler = start1==start2?\"\":String.format(\"%\"+(start1-start2)+\"s\", \"\"),\n\t\t\t\t\t\tmarkFiller = start1==0?\"\":String.format(\"%\"+start1+\"s\", \"\");\n\t\t\t\tseq2= seq2Filler + origSeq2.substring(0, start2) + alnSeq2 + origSeq2.substring(start2+alnSeq2.length()-gap2);\n\t\t\t\tmark= markFiller+String.valueOf(alignment.getMarkupLine());\n\t\t\t}else{\n\t\t\t\tseq2=origSeq2.substring(0, start2) + alnSeq2 + origSeq2.substring(start2+alnSeq2.length()-gap2);\n\t\t\t\tString \tmarkFiller = start2==0?\"\":String.format(\"%\"+start2+\"s\", \"\");\n\t\t\t\tseq1=String.format(\"%\"+(start2-start1)+\"s\", \"\") + origSeq1.substring(0, start1) + alnSeq1 + origSeq1.substring(start1+alnSeq1.length()-gap1);\n\t\t\t\tmark=markFiller+String.valueOf(alignment.getMarkupLine());\n\t\t\t}\n\t\t\tSystem.out.println(alignment.getSummary());\n\t\t\tSystem.out.println(seq1);\n\t\t\tSystem.out.println(mark);\n\t\t\tSystem.out.println(seq2);\n\t\t}", "public void print() {\r\n System.out.println(c() + \"(\" + x + \", \" + y + \")\");\r\n }", "public void draw() {\r\n System.out.print(this);\r\n }", "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}", "public void print()\n {\n System.out.println(\"Course: \" + title + \" \" + codeNumber);\n \n module1.print();\n module2.print();\n module3.print();\n module4.print();\n \n System.out.println(\"Final mark: \" + finalMark + \".\");\n }", "public void print() {\n System.out.print(datum+\" \");\n if (next != null) {\n next.print();\n }\n }", "void Print()\n {\n int quadLabel = 1;\n String separator;\n\n System.out.println(\"CODE\");\n\n Enumeration<Quadruple> e = this.Quadruple.elements();\n e.nextElement();\n\n while (e.hasMoreElements())\n {\n Quadruple nextQuad = e.nextElement();\n String[] quadOps = nextQuad.GetOps();\n System.out.print(quadLabel + \": \" + quadOps[0]);\n for (int i = 1; i < nextQuad.GetQuadSize(); i++)\n {\n System.out.print(\" \" + quadOps[i]);\n if (i != nextQuad.GetQuadSize() - 1)\n {\n System.out.print(\",\");\n } else System.out.print(\"\");\n }\n System.out.println(\"\");\n quadLabel++;\n }\n }", "public void printToViewConsole(String arg);", "private static void printColor() {\n\t\tfor (int i = 0; i < colors.length; i++) {\n\t\t\tSystem.out.print(String.format(\"%d for %s\", i + 1, colors[i]));\n\t\t\tif (i != colors.length - 1) {\n\t\t\t\tSystem.out.print(\", \"); // Separate colors with comma\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\")\"); // Print a new line for the last color option\n\t\t\t}\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 }", "public void print() {\n\n for (int i = 0; i < this.rows; i++) {\n for (int j = 0; j < this.cols; j++) {\n System.out.format(\"%.4f\", data[i][j]);\n if (j != this.cols - 1)\n System.out.print(\" \");\n }\n System.out.println(\"\");\n }\n }", "@Override\n public void printable()\n {\n\tfor (int i = 0; i < width; i++)\n\t{\n\t for (int k = 0; k < length; k++)\n\t {\n\t\tif (k == 0 || k == length - 1)\n\t\t System.out.print(\"O \");\n\t\telse if (i == 0 || i == width - 1)\n\t\t System.out.print(\"O \");\n\t\telse\n\t\t System.out.print(\" \");\n\t }\n\n\t System.out.println();\n\t}\n }", "public void look() {\n\t\tthis.print((this.observe().get(0)).toString());\n\t\t\n\t}", "public void print() {\n\t\tcounter++;\n\t\tSystem.out.print(counter + \" \");\n\t\tfor (int i = 0; i < size; i++) {\n\t\t for (int j = 0; j < size; j++) {\n\t\t\t\tSystem.out.print(squares[j][i].getValue());\n\t\t }\n\t\t System.out.print(\"//\");\n\t\t}\n\t\tSystem.out.println();\n }", "@Override\r\n\t\t\tpublic void print() {\n\t\t\t\t\r\n\t\t\t}", "public void print() {\n\t\tSystem.out.println(name + \" -- \" + rating + \" -- \" + phoneNumber);\n\t}", "public String quizDisplay(String question, String[] options, int optionSequence) {\n String s = (\"What is the meaning of \" + question + \"?\\n\");\n int index = 1;\n for (int i = optionSequence; i < optionSequence + 4; i++) {\n s += (index + \".\" + options[i % 4] + \" \\n\");\n index++;\n }\n s += \"\\n\";\n return s;\n }", "public void print() {\n\t\tint i = 1;\n\t\tfor (String s: g.keySet()) {\n\t\t\tSystem.out.print(\"Element: \" + i++ + \" \" + s + \" --> \");\n\t\t\tfor (String k: g.get(s)) {\n\t\t\t\tSystem.out.print(k + \" ### \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\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 }", "public void printToStdout() {\n\t\tfor (int i = 0; i < results.size(); i++) {\n\t\t\tSystem.out.println(results.get(i).toString());\n\t\t}\n\t}", "public String toString()\n\t{\n\t\treturn this.defline + \"\\n\" + this.sequence + \"\\n + \\n\" + this.quality + \"\\n\";\n\t}", "public void print() {\n\t\tfor (int count = 0; count < adjacencyList.length; count++) {\n\t\t\tLinkedList<Integer> edges = adjacencyList[count];\n\t\t\tSystem.out.println(\"Adjacency list for \" + count);\n\n\t\t\tSystem.out.print(\"head\");\n\t\t\tfor (Integer edge : edges) {\n\t\t\t\tSystem.out.print(\" -> \" + edge);\n\t\t\t}\n\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "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 dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }", "public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }", "public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }", "public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }", "public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }", "public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }", "public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }", "public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }", "public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }", "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 }", "public void print();", "public void print();", "public void print();", "public void print();", "public static void print() {\r\n System.out.println();\r\n }", "public String toString() {\r\n return super.toString() +\r\n \"sequenceName: \" + sequenceName + \"\\n\" +\r\n \"initial value: \" + initialValue + \"\\n\" +\r\n \"step value: \" + stepValue + \"\\n\" +\r\n \"maxValue: \" + maxValue + \"\\n\" +\r\n \"minValue:\" + minValue + \"\\n\" +\r\n \"cycle: \" + cycle + \"\\n\";\r\n }", "public void display() {\n\t\tSystem.out.println(x + \" \" + y + \" \" + z);\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 printResults() {\n\t System.out.println(\"BP\\tBR\\tBF\\tWP\\tWR\\tWF\");\n\t System.out.print(NF.format(boundaryPrecision) + \"\\t\" + NF.format(boundaryRecall) + \"\\t\" + NF.format(boundaryF1()) + \"\\t\");\n\t System.out.print(NF.format(chunkPrecision) + \"\\t\" + NF.format(chunkRecall) + \"\\t\" + NF.format(chunkF1()));\n\t System.out.println();\n }", "private static void print(int[] arr) {\n\t\tfor(int i=0;i<=arr.length;i++)\r\n\t\t{\r\n\t\t\tSystem.out.print(arr[i]+\" \");\r\n\t\t}\r\n\t}", "public void println();" ]
[ "0.6634394", "0.65745544", "0.65185016", "0.6508963", "0.65056026", "0.6499602", "0.64843255", "0.6481084", "0.6463564", "0.6430733", "0.6403617", "0.63464737", "0.63140947", "0.631376", "0.6267498", "0.62547183", "0.6248083", "0.62440497", "0.62313014", "0.622957", "0.6227307", "0.621935", "0.61983055", "0.6193181", "0.6145887", "0.6127125", "0.61211926", "0.6110655", "0.60927016", "0.60846967", "0.60842174", "0.60840744", "0.60769403", "0.60671866", "0.606234", "0.60565704", "0.6054879", "0.6052281", "0.60513437", "0.6045156", "0.6043031", "0.6021674", "0.6020137", "0.6016157", "0.6011101", "0.6010371", "0.60048836", "0.6001", "0.6000448", "0.59996945", "0.59980065", "0.5997814", "0.5995266", "0.59915787", "0.5991316", "0.59879595", "0.5987484", "0.5974312", "0.5969189", "0.596804", "0.59542316", "0.5949365", "0.5947749", "0.59354746", "0.59170735", "0.5916951", "0.5916335", "0.5912478", "0.5907389", "0.5907174", "0.59046316", "0.59043074", "0.5899197", "0.5895341", "0.58951896", "0.58846486", "0.58788246", "0.587313", "0.58670574", "0.5863844", "0.5863844", "0.5863844", "0.5863844", "0.5863844", "0.5863844", "0.5863844", "0.5863844", "0.5863844", "0.58547944", "0.5853287", "0.5853287", "0.5853287", "0.5853287", "0.58524966", "0.5835382", "0.5833259", "0.5830561", "0.58301306", "0.58289695", "0.58129895" ]
0.75683415
0
Prints k numbers of nucleotides starting from site n + 1 in sequence.
private void printLine(int n, int k) { System.out.printf("%4d- ", n + 1); for (int i = 0; i < k; i++) { if (i % 10 == 0) System.out.printf(" "); System.out.printf("%c", seq.get(i + n)); } for (int i = k; i < printLength; i++) { if (i % 10 == 0) System.out.printf(" "); System.out.printf(" "); } System.out.printf(" -%4d\n", n + printLength); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static void kaprekarNumbers(int p, int q) {\n for (int i = p; i <=q ; i++) {\n if(isKN(i)){\n System.out.print(i+\" \");\n }\n }\n }", "static void moserDeBruijn(int n)\n{\n for (int i = 0; i < n; i++)\n System.out.print(gen(i)+\" \");\n}", "public String getPermutation(int n, int k) {\n if(n<1)\n return null;\n List<Long> list=new LinkedList<Long>();\n for(long i=1;i<=n;i++){\n list.add(i);\n }\n long kk=k-1;\n StringBuilder res=new StringBuilder();\n long total=1;\n for(long i=2;i<n;i++){\n total*=i;\n }\n for(long i=n-1;i>=0;i--){\n res.append(list.remove((int)(kk/total)));\n kk=kk%total;\n if(i>0)\n total=total/i;\n }\n return res.toString();\n }", "public static void printPattern(int n){\n int c=1;\n for(int i=1;i<=(n+1)/2;i++){\n for(int j=1;j<=n;j++){\n System.out.print(c+\" \");\n c++;\n }\n c=c+n;\n System.out.println();\n }\n if(n%2==0)\n c=c-n;\n else\n c=c-3*n;\n for(int i=(n+1)/2;i<n;i++){\n for(int j=1;j<=n;j++){\n System.out.print(c+\" \");\n c++;\n }\n c=c-3*n;\n System.out.println();\n }\n\n\t}", "public static void printX(int n, String string) {\n\t\tfor(int i=0; i<n;i++) {\n\t\t\tfor(int j=0; j<n; j++) {\n\t\t\t\tif(i == j || i+j == n-1) {\n\t\t\t\t\tSystem.out.print(string);\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.print(\" \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public final static void main(String[] args) {\n\t\tfinal int n = 8;\n\t\tfinal int k = 4;\n\n\t\tStreamSupport.stream(\n\t\t\t\tnew PermutationSpliterator(Selection.of(n, k)),\n\t\t\t\tfalse)\n\t\t\t\t.forEachOrdered(a -> {});\n\n\t\tfor (int cur = 0; cur < 70; cur++) {\n\t\t\tlong tCur = cur;\n\t\t\tfinal int x = (n - k)+1;\n\t\t\tint i = k;\n\t\t\tfinal int[] array = new int[k];\n\t\t\twhile (i >= 1) {\n\t\t\t\tarray[i-1] = (int) (tCur % x);\n\t\t\t\ttCur /= i--;\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tint k,n=10;\r\n\t\tk=n-1;\r\n\t\tfor(int i=0;i<=n;i++)\r\n\t\t{\r\n\t\t\tfor(int j=0;j<=k;j++)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\r\n\t\t\t}\r\n\t\t\tk=k-1;\r\n\t\t\tfor(int j=0;j<=i;j++)\r\n\t\t\t\tSystem.out.print(\"*\"+\" \");\r\n\t\t\tSystem.out.println(\"\\r\");\r\n\t\t}\r\n\t}", "public static String KthPermutation(int n, int k){\n if(n > 9 || k <= 0) return \"\";\n if(n == 1) return \"1\";\n\n int[] factors = new int[n + 1];\n factors[0] = 1;\n for(int i = 1; i <= n; i++) factors[i] = factors[i - 1] * i;\n\n k = k - 1;\n k = k % factors[n];\n\n StringBuilder nums = new StringBuilder(\"123456789\");\n StringBuilder permutation = new StringBuilder();\n for(int i = n - 1; i >= 0; i--){\n int curNum = k / factors[i];\n permutation.append(nums.charAt(curNum));\n nums.deleteCharAt(curNum);\n k = k - curNum * factors[i];\n }\n return permutation.toString();\n }", "static void print4(int n) {\n\t\tint blank = 0;\n\t\tint star = (n/2) + 1;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tfor (int j = 0; j < blank; j++) {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t\tfor (int j = 0; j < Math.abs(star); j++) {\n\t\t\t\tSystem.out.print(\"*\");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t\tstar--;\n\t\t\tif(star == 0) {\n\t\t\t\tstar = -2;\n\t\t\t}\n\t\t\tblank++;\n\t\t\tif(blank > n/2)\n\t\t\t\tblank = n >> 1;\n\t\t}\n\t}", "public void printElements() {\n\t\tfor(int i=1;i<=this.str.length()/n;i++){\r\n\t\t\tint j=i*this.n;\r\n\t\t\tSystem.out.print(this.str.charAt(j-1));\r\n\t\t}\r\n\t}", "public static void main(String[] Args){\n Scanner n = new Scanner(System.in);\n int N = n.nextInt();\n int j = 1;\n int count = 1;\n while (j <= N){\n if ((3*count + 2) % 4 == 0){\n count++;\n }\n else {\n System.out.print(3*count + 2);\n System.out.print(\" \");\n j++;\n count++;\n }\n }\n }", "public static void main(String[] args) {\n\t\tint k =1;\n\t\twhile(k < 20){\n\t\t\tif ((k % 3)==1){\n\t\t\t\tSystem.out.print(k + \" \");\n\t\t\t}\n\t\t\tk++;\n\t\t}\n\t}", "public static void main(String[] args) {\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tint n = sc.nextInt();\r\n\t\tint m = sc.nextInt();\r\n\t\tint k = sc.nextInt();\r\n\t\tfor (int i = -1; i < n*k+1; i++) {\r\n\t\t\tif (i == -1 || i == n*k) {\r\n\t\t\t\tSystem.out.println(String.format(\"+%s +\",\" -\".repeat(m*k)));\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.print(\"| \");\r\n\t\t\t\tfor (int j = 0; j < m*k*2; j+=2) {\r\n\t\t\t\t\tif (i % (2*k) < k && j % (k*4) < k*2 || i % (2*k) >= k && j % (k*4) >=k *2)\r\n\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tSystem.out.print(\"* \");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println(\"|\");\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void main (String[] args){\n Scanner in = new Scanner(System.in);\n int n= in.nextInt();\n int ncount=1;\n int nmcount;\n while(n>0)\n {\n nmcount=ncount;\n for(int count=n;count>0;count--)\n {\n System.out.print(count);\n }\n ncount=nmcount-1;\n n--;\n System.out.println(\" \");\n }\n\t}", "public String getSequenceForSpace(int k) {\n\t\tif (k <= 0) {\n\t\t\treturn \"\";\n\t\t}\n\t\tfinal int scale = (int) Math.pow(10, k);\n\t\tchar[] visited = new char[scale];\n\t\tint num = scale - 1;\n\t\tvisited[num] = 1;\n\t\tint left = num;\n\t\tStringBuilder seq = new StringBuilder(Integer.toString(num));\n\t\twhile (left > 0) {\n\t\t\tint digit = 0;\n\t\t\tint tmp = (num * 10) % scale;\n\t\t\twhile (digit < 10) {\n\t\t\t\tif (visited[tmp + digit] == 0) {\n\t\t\t\t\tnum = tmp + digit;\n\t\t\t\t\tseq.append(digit);\n\t\t\t\t\tvisited[num] = 1;\n\t\t\t\t\t--left;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t++digit;\n\t\t\t}\n\t\t\tif (digit == 10) {\n\t\t\t\tthrow new IllegalStateException();\n\t\t\t}\n\t\t}\n\t\treturn seq.toString();\n\t}", "public static void printN(List<Student> data, int n){\n for (int r = 0; r < n; r++) {\n System.out.println(data.get(r));\n }\n System.out.println();\n }", "public static void ninethProgram() {\n\t\tfor(int i=1;i<=4;i++) {\n\t\t\tfor(int j=4-1;j>=i;j--) {\n\t\t\t\tSystem.out.print(\" \");\t\n\t\t\t}for(int k=1;k<=4;k++) {\n\t\t\t\tSystem.out.print(\"*\");\t\t\n\t\t\t}System.out.println();\n\t\t}\n\t}", "public String getPermutation(int n, int k) {\n\n StringBuilder str = new StringBuilder();\n for (int i = 1; i <= n; i++) {\n str.append(i);\n }\n permute(k, str.toString().toCharArray(), 0);\n return result;\n }", "public void Series() {\n\t\tint n=8,i=1,k=2,count=0;\n\t\tSystem.out.print(n+\" \");\n\t\twhile (count<5) {\n\t\t\tn=n*i;//12\n\t\t\tn=n-k;//9\n\t\t\tSystem.out.print(n+\" \");//9\n\t\t\ti++;\n\t\t\tk++;\n\t\t\tcount++;\n\t\t}\n\t\t/*System.out.println(n);//8\n\t\tn=n*1;//8\n\t\tn=n-2;//6\n\t\t\n\t\tSystem.out.println(n);//6\n\t\tn=n*2;//12\n\t\tn=n-3;//9\n\t\tSystem.out.println(n);//9\n\t\tn=n*3;//27\n\t\tn=n-4;//23\n\t\tSystem.out.println(n);\n\t\tn=n*4;//12\n\t\tn=n-5;*/\n\t\t\n\t\t/*System.out.println(n);\n\t\tn=n*5;//12\n\t\tn=n-6;\n\t\tSystem.out.println(n);*/\n\t\t\n\t}", "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 pattern7(int n) {\r\n\r\n\t\tfor (int i = 1; i <= 7; i++) {\r\n\t\t\tfor (int j = 1; j <= i; j++) {\r\n\t\t\t\tSystem.out.print(j + \" \");\r\n\t\t\t}\r\n\t\t\tint temp = i;\r\n\t\t\tif (temp > 1 && temp<=7) {\r\n\t\t\t\tfor (int k = i - 1; k > 0; k--) {\r\n\t\t\t\t\tSystem.out.print(k + \" \");\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println(\"\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tSystem.out.println(\"\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}", "public static void combination(int n, int k) {\n\t\tSystem.out.print(n + \" choose \" + k + \" = \");\n\t\ttry {\n\t\t\tif (useFact)\n\t\t\t\tSystem.out.println(combinationFactorial(n, k));\n\t\t\telse\n\t\t\t\tSystem.out.println(combinationRecursive(n, k));\n\t\t} catch (ArithmeticException ex) {\n\t\t\tSystem.out.println(\"LOL!\");\n\t\t}\n\t}", "public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n int n = in.nextInt();\n\n int stairs = 1;\n if (n > 0) {\n if (n > 1) {\n for (int j = 0; j < n; j++) {\n String s = \"\";\n for (int i = 0; i < n; i++) {\n if (i + stairs < n)\n s += \" \";\n else if (i < n)\n s += \"#\";\n }\n System.out.println(s);\n stairs++;\n }\n } else {\n System.out.println(\"#\");\n }\n }\n }", "public static void main(String[] args) {\n\n int k=5;\n int factorial=1;\n for (int i=1;i<=5;i++){\n factorial*=i;\n }\n System.out.println(factorial);\n }", "public static void main(String[] args) {\n\t\tint k = 1;\n\t\tfor(int i=1; i<5; i++) {\n\t\t\t\n\t//\t\tSystem.out.println(\"loop 1\");\n\t\t\t \n\t\t\tfor(int j =1; j<=i; j++) {\n\t\t\t\t\n\t\t\t\tSystem.out.print(k);\n\t\t\t\t\n\t//\t\t\tSystem.out.println(\"loop 2\");\n\t\t\t\tSystem.out.print(\"\\t\");\n\t\t\t\tk++;\n\t\t\t}\n\t\t\t\n\t\t System.out.println(\"\");\n\t\t}\n\t\t\n\n\t}", "void show() {\n\t\tSystem.out.println(\"k: \" + k);\n\t}", "private static void printNos() {\n\t\tfor(int i=0; i<=10; i++) { //this is a single line comment\n\t\t\tSystem.out.println(i);\n\t\t}\n\t\t/*\n\t\t * this is a multiline comment\n\t\t */\n\t}", "public static void sequence(int n)\n { \n int x = n;\n if(n == 1)\n {\n System.out.print(1);\n }\n else\n { \n System.out.print(n + \" \"); \n sequence(next(x)); \n }\n }", "public void print()\r\n {\r\n int i = numar.length()/3;\r\n while( i != 0 ){\r\n String n = numar.substring(0,3);\r\n numar = numar.substring(3);\r\n printNo(n);\r\n if( i == 3){\r\n System.out.print(\"million \");\r\n }\r\n else if( i == 2 ){\r\n System.out.print(\"thousand \");\r\n }\r\n i--;\r\n }\r\n }", "public static void main(String[] args) {\n\t\tRandom random = new Random();\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n//\t\tSystem.out.print(n);\n\t\tint[] lotto = new int[6];\n\t\tString str = \"[\";\n\t\t\n\t\tfor(int i=0; i<n; i++) {\n\t\t\tfor(int j=0; j<6; j++) {\n\t\t\t\tlotto[i] = random.nextInt(45)+1;\n\t\t\t\tif (j == 5) {\n\t\t\t\t\tstr += String.valueOf(lotto[i])+\"\";\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tstr += String.valueOf(lotto[i])+\", \";\n\t\t\t\t}\n\t\t\t}\n\t\t\tstr += \"]\";\n\t\t\t\n\t\t\tSystem.out.println((i+1) + \"번째 : \" + str);\n\t\t\tstr = \"[\";\n\t\t}\n\t}", "@Override\n\tpublic void printLotteryNo() {\n\t\tint[] prefixNums = generateNumber(35, 5);\n\t\tint[] suffixNums = generateNumber(12, 2);\n\t\tSystem.out.println(\"本期大乐透前区号码是:\" + printNums(prefixNums));\n\t\tSystem.out.println(\"本期大乐透后区号码是:\" + printNums(suffixNums));\n\t}", "public void showAllNu()\r\n {\r\n for (int i = 1; i < T; i++) {\r\n System.out.println(\"(nu(\"+(i+1)+\"))^2 : \"+getNu()[i]+\"\\t\\t| nu(\"+(i+1)+\") : \"+Math.sqrt(getNu()[i]));\r\n }\r\n }", "public static void main(String[] args) {\n\t\tList<Integer> nums = new ArrayList<Integer>();\n\t\tint n, k;\n\n\t\tSystem.out.println(\"================= n=2, k=1 =====================\");\n\t\tn = 2;\n\t\tk = 1;\n\n\t\tfor (int i = 1; i <= n; i++) {\n\t\t\tnums.add(i);\n\t\t}\n\t\t\n\t\tk = k - 1;\n\t\tplay(n, k, 0, nums);\n\t\t\n\t\tSystem.out.println(nums);\n\t\t\n\t\tSystem.out.println(\"================= n=4, k=2 =====================\");\n\t\tnums.clear();\n\t\tn = 4;\n\t\tk = 2;\n\n\t\tfor (int i = 1; i <= n; i++) {\n\t\t\tnums.add(i);\n\t\t}\n\t\t\n\t\tk = k - 1;\n\t\tplay(n, k, 0, nums);\n\t\t\n\t\tSystem.out.println(nums);\n\t\t\n\t\tSystem.out.println(\"================= n=40, k=7 =====================\");\n\t\tnums.clear();\n\t\tn = 40;\n\t\tk = 7;\n\n\t\tfor (int i = 1; i <= n; i++) {\n\t\t\tnums.add(i);\n\t\t}\n\t\t\n\t\tk = k - 1;\n\t\tplay(n, k, 0, nums);\n\t\t\n\t\tSystem.out.println(nums);\n\t\t\n\t\tSystem.out.println(\"================= n=50, k=10 =====================\");\n\t\tnums.clear();\n\t\tn = 50;\n\t\tk = 10;\n\n\t\tfor (int i = 1; i <= n; i++) {\n\t\t\tnums.add(i);\n\t\t}\n\t\t\n\t\tk = k - 1;\n\t\tplay(n, k, 0, nums);\n\t\t\n\t\tSystem.out.println(nums);\n\t}", "public static void printMissingNumbers(int[] numbers, int n) {\n int missingCount = n - numbers.length;\n BitSet bitSet = new BitSet(n);\n for (int num : numbers) {\n // sets the value of the bit passed in to true\n bitSet.set(num - 1);\n }\n int lastMissingIndex = 0;\n for (int i = 0; i < missingCount; i++) {\n // finds the first bit in the set that is set to false\n lastMissingIndex = bitSet.nextClearBit(lastMissingIndex);\n System.out.print(++lastMissingIndex + \" \");\n }\n System.out.println();\n }", "public static void main(String[] args) {\n\t\tint n=5;\n\t\tfor(int i=1;i<=n;i++)\n\t\t{\n\t\t\tfor(int j=n;j>=i;j--)\n\t\t\t{\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t\tfor(int k=1;k<2*i;k++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\"*\");\n\t\t\t}\n\t\t\t/*for(int l=2;l<=i;l++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\"*\");\n\t\t\t}*/\n\t\t\tSystem.out.println();\n\t\t}\n\t\tfor(int i=1;i<=5;i++)\n\t\t{\n\t\t\tfor(int j=3;j<=30;j++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\"*\");\n\t\t\t}\n\t\t\tfor(int k=1;k<=i;k++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\"*\");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "@Override\n public void print() {\n for (int i = 1; i <= itertion; i++) {\n if(n <0){\n this.result = String.format(\"%-3d %-3s (%-3d) %-3s %d \", i, \"*\", n, \"=\", (n * i));\n System.out.println(this.result);\n }else {\n this.result = String.format(\"%-3d %-3s %-3d %-3s %d \", i, \"*\", n, \"=\", (n * i));\n System.out.println(this.result);\n }\n }\n }", "@Override\n public void print(int n) {\n for (int i = 0; i < n; i++) {\n System.out.print(' ');\n }\n System.out.print(\" #{Built-in Procedure \");\n symbol.print(0);\n for (int i = 0; i < n; i++) {\n System.out.print(' ');\n }\n System.out.print('}');\n System.out.println();\n }", "public String getPermutation1(int n, int k) {\n\t\t ArrayList<String> rs = new ArrayList<String>();\n\t\t char[] data = new char[n];\n\t\t for (int i = 0; i < n ; ++i)\n\t\t\t data[i] = String.valueOf(i + 1).charAt(0);\n\t\t permutate(data, 0, rs);\n\t\t return rs.get(k); \n\t }", "public static void main(String[] args) {\n\tfor(int k=1; k<=3;k++)\r\n\t{\r\n\t\tfor(int i=1; i<=9; i++)\r\n\t\t {\r\n\t\t\tSystem.out.println();\r\n\t\t for(int j=3*k-1; j<=3*k+1;j++)\r\n\t\t {\r\n\t\t if(j!=10)\r\n\t\t System.out.printf(j+\"*\"+i+\"=\"+i*j+\"\\t\");\r\n\t\t }\r\n\t\t }\r\n\t}\t\r\n }", "public static int Main()\n\t{\n\t\tint n; //????\n\t\tint k;\n\t\tint i;\n\t\tint i2;\n\t\tint j;\n\t\tn = Integer.parseInt(ConsoleInput.readToWhiteSpace(true));\n\t\tk = Integer.parseInt(ConsoleInput.readToWhiteSpace(true));\n\t\tfor (i2 = 1;;i2++)\n\t\t{ //????\n\t\t\ti = i2;\n\t\t\tfor (j = 0;j < n;j++)\n\t\t\t{ //????\n\t\t\t\tif (i % (n - 1) != 0)\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\ti = i * n / (n - 1) + k;\n\t\t\t}\n\t\t\tif (j == n)\n\t\t\t{\n\t\t\t\tSystem.out.print(i);\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}", "public void printKDistantIter(Node root, int k) {\r\n if(root == null) {\r\n return;\r\n }\r\n\r\n Queue<Node> queue = new LinkedList<>();\r\n queue.add(root);\r\n while(!queue.isEmpty() && k != 0) {\r\n k--;\r\n int nodeCount = queue.size();\r\n while(nodeCount > 0) {\r\n Node top = queue.poll();\r\n\r\n if(top.left != null) {\r\n queue.add(top.left);\r\n }\r\n\r\n if(top.right != null) {\r\n queue.add(top.right);\r\n }\r\n nodeCount--;\r\n }\r\n }\r\n\r\n while(!queue.isEmpty()) {\r\n Node node = queue.poll();\r\n System.out.println(node.data);\r\n }\r\n }", "public static void main(String[] args){\n\n for(int n = 2; n < 102; n+=2)System.out.printf(\"%d\\n\",n);\n \n \n }", "public static void main(String[] args) {\n Scanner in = new Scanner (System.in);\n int n = in.nextInt(), k = in.nextInt();\n int[] t = new int[n]; for ( int i = 0; i < n; ++i ) { t[i] = in.nextInt(); }\n\n int special = 0;\n // the chapter might be numbered '1', but we need to index the vector\n for ( int chapter = 0, page = 1, nextChapterPage; chapter < n; ++chapter, page = nextChapterPage ) {\n int problemsInChapter = t[chapter], pagesInChapter = ( problemsInChapter + k - 1 ) / k;\n nextChapterPage = page + pagesInChapter;\n if ( page > problemsInChapter )\n continue;\n for ( int problem = 1, nextPageProblem; page < nextChapterPage; ++page, problem = nextPageProblem ) {\n nextPageProblem = problem + k;\n if ( page >= problem && page < nextPageProblem && page <= problemsInChapter )\n ++special;\n }\n }\n System.out.println (special);\n }", "public static void printNum() {\n\t\tfor(int i = 1; i<= 20; i++) {\n\t\t\tSystem.out.print(\" \" + i);\n\t\t}\n\t\tSystem.out.println(\"\\n\");\n\t\t}", "private void print(String val, int i, int n) {\n if (i < Math.pow(2, n)) {\n if (level > 1)\n val = val + \"_\" + (i % 2 == 0 ? 1 : 2);\n System.out.println(val);\n val = val.replace(\"Level_\" + level, \"Level_\" + (level + 1));\n level++;\n String baseVal = val.trim();\n val = this.p.getMenuStr(val.length()) + baseVal;\n print(val, 2 * i, n);\n print(val, 2 * i + 1, n);\n level--;\n }\n\n }", "public void PrintKNeighbours() {\n\t\t\n\t\tLinkSample ptr = k_closest;\n\t\twhile(ptr != null) {\n\t\t\tSystem.out.print(ptr.dim_weight+\" \");\n\t\t\tptr = ptr.next_ptr;\n\t\t}\n\t\t\n\t\tSystem.out.println(\"\");\n\t}", "public void printPrimeNumbers(int n) {\n int upperBound = (int) Math.sqrt(n);\n boolean[] isComposite = new boolean[n + 1];\n for (int i = 2; i <= upperBound; i++) {\n if (!isComposite[i]) {\n for (int k = i * i; k <= n; k += i) {\n isComposite[k] = true;\n }\n }\n }\n\n for (int i = 2; i <= n; i++) {\n if (!isComposite[i]) {\n System.out.print(String.format(\"%d \", i));\n }\n }\n }", "public static void main(String[] args) {\r\n\t\tint numRows = 15;\r\n\t\tfor(List<Integer> list : generate(numRows)){\r\n\t\t\tfor( Integer i : list ){\r\n\t\t\t\tSystem.out.print(i + \" \");\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}", "private static void iterative(String[] set, int n) {\n if(set == null || n <= 0) {\n return;\n }\n \n // number of power sets is 2 ^ n\n long powerSetSize = (long)Math.pow(2, n); // or 1<<n\n \n \n // Run a loop for printing all 2^n subsets\n for(int i = 0; i < powerSetSize; i++) {\n System.out.print(\"\\\"\");\n \n for(int j = 0; j < n; j++) {\n /* \n * Don't understand!\n * \n * Check if jth bit in the counter i is set.\n * If set then print jth element from set \n */\n // (1<<j) is a number with jth bit 1\n // so when we 'and' them with the\n // subset number we get which numbers\n // are present in the subset and which\n // are not\n if((i & (1 << j)) > 0) {\n System.out.print(set[j]);\n }\n }\n System.out.print(\"\\\"\");\n \n System.out.println();\n }\n }", "public static void main(String[] args) {\n\n\t\tint n=5;\n\t\tfor (int i=0;i<n;i++)\n\t\t{\n\t\t\tSystem.out.format(\"%ns\", \"#\");\n\t\t}\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n\n List<String> result = new ArrayList<>();\n for (int i = 1; i < 100; i++) {\n if (i % 2 == 0) { // i가 짝수일때 분모가 i부터 줄어듦\n // 분모\n for (int j = i; j >= 1; j--) {\n StringBuilder sb = new StringBuilder();\n sb.append((i - j + 1)); // 분자\n sb.append(\"/\"); // 등호\n sb.append(j); // 분모\n\n result.add(sb.toString());\n }\n } else { // i가 홀수 일 때 분자가 i부터 줄어듦\n\n for (int j = i; j >= 1; j--) {\n StringBuilder sb = new StringBuilder();\n sb.append(j); // 분자\n sb.append(\"/\"); // 등호\n sb.append((i - j + 1)); // 분모\n\n result.add(sb.toString());\n }\n }\n\n }\n\n System.out.println(result.get(n - 1));\n }", "public static void main(String[] args) {\n\t\tint n,i,j;\r\n\t\tScanner ob = new Scanner(System.in);\r\n\t\t\r\n\t\tSystem.out.println(\"Enter val of n\");\r\n\t\tn = ob.nextInt();\r\n\t\t\t\t\r\n\t\tfor(i=1;i<=n;i++)\r\n\t\t{\r\n\t\t\tfor(j=n; j>=i;j--)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.print(j);\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}", "private static void printNumber(){\r\n\t\tfor(int i = 1;i <= 10; i++)\r\n\t\t\tSystem.out.println(i);\r\n\t}", "public static void main(String[] args) {\n\t\tint c = 7;\r\n\t\tfor(int i=1;i<=4;i++)\r\n\t\t{\r\n\t\t\tfor(int j=0;j<i;j++)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.print(c+\" \");\r\n\t\t\t\tc++;\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\r\n\t}", "private void printRandomNumbers() {\n\t\tdouble convAmt = (double)numberAmt/5;\n\t\tint amtCeiling = (int)Math.ceil(convAmt);\n\t\tint index = 0;\n\t\t\n\t\tfor(int i = 0; i < amtCeiling; i++) {\n\t\t\tfor(int j = 0; j < 5; j++) {\n\t\t\t\tSystem.out.print(\"\\t\" + randomNumbers.get(index));\n\t\t\t\tindex++;\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tint n=3;\n\t\tString s=\"1\";\n\t\tint count =1;\n\t\tint k=1;\n\t\twhile(k<n){\n\t\t\tStringBuilder t=new StringBuilder();\n\t\t\t//t.append(s.charAt(0));\n\t\t\tfor(int i=1;i<=s.length();i++){\n\t\t\t\t\t\t\t\t\n\t\t\t\tif(i==s.length() || s.charAt(i-1)!=s.charAt(i)){\n\t\t\t\t\tt.append(count); t.append(s.charAt(i-1));\n\t\t\t\t\tcount=1;\n\t\t\t\t}\n\t\t\t\telse if(s.charAt(i-1)==s.charAt(i)){count=count+1;}\n\t\t\t }\t\n\t\t\t\ts=t.toString();\n\t\t\t\tk=k+1;\n\t\t\t\tSystem.out.println(\"k:\"+k);\n\n\t\t\t}\n\t\t\t\t\n\t\t\t\n\t\t\tSystem.out.println(s);\n\t\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public static void printX2(int n, String string) {\n\t\tfor(int i=0; i<n;i++) {\n\t\t\tfor(int j=0; j<n; j++) {\n\t\t\t\tif(i< n/2) {\n\t\t\t\t\tif(j<i) {\n\t\t\t\t\t\tSystem.out.print(\" \");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.out.print(string.substring(i, i+1)+\" \");\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif((i+j)<(n-1)) {\n\t\t\t\t\t\tSystem.out.print(\" \");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.out.print(string.substring(i, i+1)+\" \");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public String toString() \n {\n StringBuilder str = new StringBuilder();\n str.append(N + \"\\n\");\n \n for (int i = 0; i < SIZE; i++)\n {\n str.append(String.format(\"%2d \", (int) blocks[i]));\n if ((i + 1) % N == 0) { str.append(\"\\n\"); } \n }\n \n return str.toString(); \n }", "public List<List<Integer>> combinationSum3(int k, int n) {\n List<List<Integer>> res = new ArrayList<>();\n int min = 0, max = 0;\n for (int i = 1; i <= k; i++) {\n min += i;\n max += (10 - i);\n }\n if (n > max || n < min) return res;\n List<Integer> list = new ArrayList<>();\n dfs(k, n, res, list, 1);\n return res;\n }", "public static void main (String[] args){\n Scanner in = new Scanner (System.in);\n \n for (int n1=30;n1<=50;n1=n1+1)\n System.out.println(n1);\n\t}", "public void printNodes(){\n for(int i =0; i<n;i++)\n System.out.print(key[i]+\" \");\n System.out.println(isLeaf);\n if (!isLeaf){\n for(int i =0; i<=n;i++){\n c[i].printNodes();\n }\n }\n }", "public void printKDistant(Node root, int k) {\r\n if(root == null) {\r\n return;\r\n } \r\n if(k == 0) {\r\n System.out.println(root.data);\r\n return;\r\n } \r\n printKDistant(root.left, k - 1);\r\n printKDistant(root.right, k - 1);\r\n \r\n }", "public static void print(int n) {\n int[][] data = new int[n][n];\n data[0][0] = 1;\n data[n - 1][n - 1] = n * n;\n\n //将蛇形矩阵按照正对角线分为上半部分和下半部分\n //现在先来设计上半部分,并且负责对角线,上半部分可将斜线的顺序记为k,按k的奇偶性进行判断\n //以斜线为基准打印\n for (int k = 1; k <= (n - 1); k++) {\n if (k % 2 == 1) {//当k为奇数时,代表每条斜线的最小值在上方\n data[0][k] = 1 + k * (k + 1) / 2;\n for (int i = 1; i <= k; i++) {\n data[i][k - i] = data[0][k] + i;//行递增,列递减\n\n }\n } else {//当k为偶数时,代表每条斜线的最小值在下方\n data[k][0] = 1 + k * (k + 1) / 2;\n for (int i = 0; i <= k; i++) {\n data[k - i][i] = data[k][0] + i;//行递减,列递增\n }\n }\n }//上半部分就已经设计好了,接着设计下半部分\n\n //下半部分就会显得比较复杂,首先要先判断n的奇偶性,还要再判断k的奇偶性\n //从左向右按照从大到小的顺序进行斜线的连接,同样以k代表斜线的序号\n if (n % 2 == 0) {//如果n为偶数\n for (int k = 1; k <= (n - 2); k++) {\n if (k % 2 == 1) {//当k为奇数的时候每条斜线的最大值在上方\n data[k][n - 1] = data[n - 1][n - 1] - (n - k - 1) * (n - k) / 2;\n for (int i = 1; i < n - k; i++) {\n data[k + i][n - 1 - i] = data[k][n - 1] - i;//行递增,列递减\n }\n } else {//当k为偶数的时候,每条斜线的最大值在下方\n data[n - 1][k] = data[n - 1][n - 1] - (n - k - 1) * (n - k) / 2;\n for (int i = 1; i < n - k; i++) {\n data[n - 1 - i][k + i] = data[n - 1][k] - i;//行递减,列递增\n }\n }\n }\n } else {//如果n为奇数,那么就是相反的\n for (int k = 1; k <= (n - 2); k++) {\n if (k % 2 == 0) {//当k为偶数的时候每条斜线的最大值在上方\n data[k][n - 1] = data[n - 1][n - 1] - (n - k - 1) * (n - k) / 2;\n for (int i = 1; i < n - k; i++) {\n data[k + i][n - 1 - i] = data[k][n - 1] - i;//行递增,列递减\n }\n } else {//当k为奇数的时候,每条斜线的最大值在下方\n data[n - 1][k] = data[n - 1][n - 1] - (n - k - 1) * (n - k) / 2;\n for (int i = 1; i < n - k; i++) {\n data[n - 1 - i][k + i] = data[n - 1][k] - i;//行递减,列递增\n }\n }\n }\n }//下半部分的就设计好咯\n\n //接下来就是显示矩阵咯\n\n for (int i = 0; i < data.length; i++) {\n for (int j = 0; j < data[i].length; j++) {\n System.out.print(data[i][j] + \"\\t\");\n }\n System.out.println();\n }//结束显示,结束print方法,进入main方法\n }", "public static void print(int n) {}", "public void printForward(){\n int k=start;\n for(int i=0;i<size;i++){\n System.out.print(cir[k]+\",\");\n k=(k+1)%cir.length;\n }\n System.out.println();\n }", "public List<List<Integer>> combine(int n, int k) {\n List<List<Integer>> res = new ArrayList<>();\n dfs(res,1,k,new ArrayList<>(),n);\n return res;\n }", "public String countAndSay(int n) {\n if(n == 1){\n return \"1\";\n }else{\n StringBuilder sb = new StringBuilder();\n int k = 0;\n String s = countAndSay(n-1);\n int l = s.length();\n for(int i = 0; i < l; i++){\n if(i == 0){\n k ++;\n }else{\n if(s.charAt(i) == s.charAt(i-1)){\n k ++;\n }else{\n sb.append(k);\n sb.append(s.charAt(i-1));\n k = 1;\n }\n }\n }\n sb.append(k);\n sb.append(s.charAt(l-1));\n return sb.toString();\n }\n }", "@Override\r\n\tpublic int runn(int k) {\n\t\treturn 0;\r\n\t}", "public void print(){\n if (isLeaf){\n for(int i =0; i<n;i++)\n System.out.print(key[i]+\" \");\n System.out.println();\n }\n else{\n for(int i =0; i<n;i++){\n c[i].print();\n System.out.print(key[i]+\" \");\n }\n c[n].print();\n }\n }", "private void printSeparation(){\n\t\tfor (int i = 0; i < 50; i++) {\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public static String generaSerieAscendente(int n){\n\t\tStringBuilder sb;\n\t\tsb=new StringBuilder();\n\t\t\n\t\tfor(int i=1; i<=n;i++)\n\t\t\tsb.append(i+\" \" );\n\t\t\t\n\t\treturn sb.toString();\t\n\t\t}", "private void call(int n) {\n // System.out.println(\"\\\"\" + n + \"\\\"\\t -> \\t\" + solution.numSquares(n));\n System.out.print(solution.numSquares(n) + \",\");\n }", "public static void m6() {\r\n\tfor(int i=1;i<=5;i++) {\r\n\t\t\r\n\t\tfor(int j=1;j<=(5-i);j++) {\r\n\t\tSystem.out.print(\" \");\t\r\n\t\t}\r\n\t\tchar ch ='A';\r\n\t\tfor(int k =1;k<=i;k++) {\r\n\t\t\tSystem.out.print(ch);\r\n\t\t\tch++;\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t}\r\n}", "private void printNQueen(int[] x2) {\n\t\t\r\n\t\tint N = x2.length;\r\n\t\t\r\n\t\tfor(int i=0;i<N;i++)\r\n\t\t{\r\n\t\t\tfor(int j=0;j<N;j++)\r\n\t\t\t{\r\n\t\t\t\tif(x[i] == j)\r\n\t\t\t\t\tSystem.out.print(\"Q\");\r\n\t\t\t\telse \r\n\t\t\t\t\tSystem.out.print(\"*\");\r\n\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t\t\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t\t\r\n\t}", "protected void pktsOut(int n) {}", "public static void m9() {\r\n\tfor(int i =1;i<=5;i++) {\r\n\t\t\r\n\t for(int j =1;j<=i;j++) {\r\n\t\t System.out.print(\" \");\r\n\t }\r\n\t char ch ='A';\r\n\t for(int k=0;k<=(5-i);k++) {\r\n\t System.out.print(ch);\r\n\t ch++;\r\n\t }\r\n\t System.out.println();\r\n\t}\r\n}", "public static int Main()\n\t{\n\t\tint n; //????\n\t\tint k;\n\t\tint i = 1;\n\t\tint j;\n\t\tn = Integer.parseInt(ConsoleInput.readToWhiteSpace(true));\n\t\tk = Integer.parseInt(ConsoleInput.readToWhiteSpace(true));\n\t\tint[] f = new int[n + 1]; //????\n\t\twhile (i > 0) //??????????\n\t\t{\n\t\t\tf[0] = (n - 1) * i; //?????\n\t\t\tfor (j = 1;j < n + 1;j++) //????\n\t\t\t{\n\t\t\t\tif (f[j - 1] % (n - 1) != 0)\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tf[j] = f[j - 1] * n / (n - 1) + k;\n\t\t\t}\n\t\t\tif (j == n + 1)\n\t\t\t{\n\t\t\t\tbreak; //???????\n\t\t\t}\n\t\t\ti = i + 1;\n\t\t}\n\t\tSystem.out.print(f[n]);\n\t\tSystem.out.print(\"\\n\");\n\t\treturn 0;\n\t}", "public static void main(String[] args) {\n\t\tint n = 4;\t// Kontejneri\n\t\tint k = 1;\t// Kapacitet\n\t\tint prvi = n / k; // Provjera da li se svi mogu sloziti jedan u drugi (djeljivost sa 2)\n\t\tint exponent; // Jedini brojevi djeljivi sa 2 do kraja (slaganja kontejnera)\n\t\tint dodatni; // Koliko treba dodatnih\n\t\tfor (int i = 1; i > 0;) { // Racunaj eksponent 2 do kraja int vrijednosti...\n\t\t\ti = i * 2;\n\t\t\texponent = i;\n\t\t\tif (prvi == exponent) {\n\t\t\t\tSystem.out.println(\"Ne treba\");\n\t\t\t\tbreak;\n\t\t\t} else if (prvi != exponent) { // Ako se ne mogu sloziti do kraja, uzmi slijedeci veci eksponent od broj kontejnera i daj ostatak djeljenja, to su dodatne kutije.\n\t\t\t\tif (2 < n && n < 4) {\n\t\t\t\t\tdodatni = 4 % n;\n\t\t\t\t\tSystem.out.printf(\"Mujo treba %d dodatnih kontejnera\",\n\t\t\t\t\t\t\tdodatni);\n\t\t\t\t} else if (prvi != exponent && 4 < n && n < 8) {\n\t\t\t\t\tdodatni = 8 % n;\n\t\t\t\t\tSystem.out.printf(\"Mujo treba %d dodatnih kontejnera\",\n\t\t\t\t\t\t\tdodatni);\n\t\t\t\t} else if (prvi != exponent && 8 < n && n < 16) {\n\t\t\t\t\tdodatni = 16 % n;\n\t\t\t\t\tSystem.out.printf(\"Mujo treba %d dodatnih kontejnera\",\n\t\t\t\t\t\t\tdodatni);\n\t\t\t\t} else if (prvi != exponent && 16 < n && n < 32) {\n\t\t\t\t\tdodatni = 32 % n;\n\t\t\t\t\tSystem.out.printf(\"Mujo treba %d dodatnih kontejnera\",\n\t\t\t\t\t\t\tdodatni);\n\t\t\t\t\tbreak;\n\t\t\t\t} else if (prvi != exponent && 32 < n && n < 64) {\n\t\t\t\t\tdodatni = 64 % n;\n\t\t\t\t\tSystem.out.printf(\"Mujo treba %d dodatnih kontejnera\",\n\t\t\t\t\t\t\tdodatni);\n\t\t\t\t} else if (prvi != exponent && 64 < n && n < 128) {\n\t\t\t\t\tdodatni = 128 % n;\n\t\t\t\t\tSystem.out.printf(\"Mujo treba %d dodatnih kontejnera\",\n\t\t\t\t\t\t\tdodatni);\n\t\t\t\t} else if (prvi != exponent && 128 < n && n < 256) {\n\t\t\t\t\tdodatni = 256 % n;\n\t\t\t\t\tSystem.out.printf(\"Mujo treba %d dodatnih kontejnera\",\n\t\t\t\t\t\t\tdodatni);\n\t\t\t\t} else if (prvi != exponent && 256 < n && n < 512) {\n\t\t\t\t\tdodatni = 512 % n;\n\t\t\t\t\tSystem.out.printf(\"Mujo treba %d dodatnih kontejnera\",\n\t\t\t\t\t\t\tdodatni);\n\t\t\t\t} else { // U suprotno, djeljenje kontejnera i kapaciteta je jednako eksponentu 2 i ne treba doadatnih.\n\t\t\t\t\tSystem.out.println(\"Ne treba dodatnih kontejnera.\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t}", "private static long combinations(int n, int k) {\n\t\tif (k > n / 2) {\n\t\t\tk = n - k;\n\t\t}\n\n\t\tlong result = 1;\n\n\t\tfor (int i = 1, j = n - k + 1; i <= k; i++, j++) {\n\t\t\tresult = result * j / i;\n\t\t}\n\n\t\treturn result;\n\t}", "public static void main(String[] args) {\n\t\tint n = 4;\n\n\t\tfor (int i = 1; i <= n; i++) {\n\t\t\tfor (int j = 1; j <= n; j++) {\n\t\t\t\tSystem.out.print(i * j + \"\\t\");// \\t means tab to make nice space\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\n\t}", "public static void main(String[] args) {\n\t\tfor(int i=2;i<=9;i+=3)\r\n\t\t{\r\n\t\t\tfor(int j=1;j<=9;j++)\r\n\t\t\t{\r\n\t\t\t\tfor(int k=i;k<i+3&&k!=10;k++)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.print(k+\"*\"+j+\"=\"+k*j+\"\\t\");\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println();\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"\\n\\n\");\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\t\tint n1=1,n2=1;\r\n\t\tint n3;\r\n\t\tSystem.out.print(n1+\" \"+n2);\r\n\t\t\r\n\t\tfor(int i=0;i<=20;i++) {\r\n\t\t\tn3=n1+n2;\r\n\t\t\tn1=n2;\r\n\t\t\tn2=n3;\r\n\t\t\t\tSystem.out.print(\" \"+n3);\r\n\t\t}\r\n\t\t\r\n\t}", "public static String koch(int n) {\n\t\tif (n < 1) {\n\t\t\treturn \"F\";\n\t\t}\n\n\t\treturn koch(n-1).replaceAll(\"F\", \"F+F-F-F+F\");\n\t}", "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 }", "public int generate(int k) {\n int result = 0;\n\n for (int i = 0; i < k; i++) {\n result = 2 * result + step();\n }\n return result;\n }", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n//\t\tT = sc.nextInt();\n\t\tNN = sc.nextInt();\n\t\t\n\t\tfor(int i=1;i<=NN;i++){\n\t\t\tif(i==1000){\n\t\t\t\tSystem.out.print(i);\n\t\t\t}else{\n\t\t\t\t//\n\t\t\t\tarr = new int[3];\n//\t\t\t\tarr[0] = i/100;\t\t//100의 자리\n//\t\t\t\tarr[1] = i/10;\t\t//10의자리\n//\t\t\t\tarr[2] = i%100;\t\t//1의자리\n\t\t\t\tint N = 0;\n\t\t\t\tif(i>=0&&i<10){\n\t\t\t\t\tN=1;\n\t\t\t\t\tarr[0] = i;\n\t\t\t\t}else if(i>=10&&i<100){\n\t\t\t\t\tN=2;\n\t\t\t\t\tarr[1] = i%10;\n\t\t\t\t\tarr[0] = i/10;\n\t\t\t\t}else if(i>=100&&i<1000){\n\t\t\t\t\tN=3;\n\t\t\t\t\tarr[2] = (i%100)%10;\n\t\t\t\t\tarr[1] = (i%100)/10;\n\t\t\t\t\tarr[0] = i/100;\n\t\t\t\t}\n\t\t\t\tString ot = \"\";\n\t\t\t\tint state = 0;\n\t\t\t\tboolean flag = true;\n\t\t\t\t\n\t\t\t\tfor(int j=0;j<N;j++){\n\t\t\t\t\tif(arr[j]==3||arr[j]==6||arr[j]==9){\n\t\t\t\t\t\tot = ot+\"-\";\n\t\t\t\t\t\tflag = false;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tot = ot + arr[j];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(ot.equals(\"--\")||ot.equals(\"--=\")){\n\t\t\t\t\tSystem.out.print(ot);\n\t\t\t\t}else{\n\t\t\t\t\tif(!flag){\n\t\t\t\t\t\tSystem.out.print(\"-\");\n\t\t\t\t\t}else{\n\t\t\t\t\t\tSystem.out.print(ot);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(i!=(NN)){\n\t\t\t\t\tSystem.out.print(\" \");\n\t\t\t\t}else{\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n//\t\tfor(int t=0;t<T;t++){\n//\t\t\tarr = new int[10];\n//\t\t\tint MAX = 0;\n//\t\t\tfor(int i=0;i<10;i++){\n//\t\t\t\tarr[i] = sc.nextInt();\n//\t\t\t}\n//\t\t\tfor(int i=0;i<10;i++){\n//\t\t\t\tif(arr[i]%2==1){\n//\t\t\t\t\tMAX = MAX+arr[i];\n//\t\t\t\t}\n//\t\t\t}\t\t\t\n//\t\t\t\n//\t\t\tSystem.out.println(\"#\"+(t+1)+\" \"+MAX);\n//\t\t}\n\t}", "static void all_sub_groups_of_size_k(int num_of_nodes,\r\n int k, long numOfGroups,\r\n LinkedList<Integer>[] groups)\r\n {\r\n //create array of all the nodes\r\n int arr[] = new int[num_of_nodes];\r\n for (int i = 0; i < num_of_nodes; i++){\r\n arr[i] = i;\r\n }\r\n\r\n int data[] = new int[k]; // temporary array which will hold the subgroup\r\n\r\n currNumOfGroups = 0;\r\n // Print all combination using temprary\r\n // array 'data[]'\r\n getAllGroupsOfSizeK(arr, num_of_nodes, k, 0, data, 0,\r\n numOfGroups, groups);\r\n }", "public void printOrder() {\n int count = 0;\n for(Jumper skier : jumpers) {\n count += 1;\n System.out.println(\" \" + count + \". \" + skier); \n }\n System.out.println(\"\"); \n }", "static int printCount(Node root, int k) {\n\t\tHashMap<Integer, Integer> p = new HashMap<>();\n\n\t\t// Function call\n\t\tk_paths(root, k, p, 0);\n\n\t\t// Return the required answer\n\t\treturn res;\n\t}", "static void selectKItems(int stream[], int n, int k)\n {\n int i; // index for elements in stream[]\n\n // reservoir[] is the output array. Initialize it with\n // first k elements from stream[]\n int reservoir[] = new int[k];\n for (i = 0; i < k; i++)\n reservoir[i] = stream[i];\n Random r = new Random();\n // Iterate from the (k+1)th element to nth element\n for (; i < n; i++)\n {\n // Pick a random index from 0 to i.\n int j = r.nextInt(i + 1);\n\n // If the randomly picked index is smaller than k,\n // then replace the element present at the index\n // with new element from stream\n if(j < k)\n reservoir[j] = stream[i];\n }\n System.out.println(\"Following are k randomly selected items\");\n System.out.println(Arrays.toString(reservoir));\n }", "private static void recursion(char[] number, int index,int n) {\n\t\tif(n == index)\n\t\t{\n\t\t\tint j=n-1;\n\t\t\tfor(int m=0;m<n;m++)\n\t\t\t\tif(number[m]!='0'){\n\t\t\t\t\tj=m;\n\t\t\t\t\tbreak;}\n\t\t\t\n\t\t\tfor (;j<n;j++)\n\t\t\t System.out.print(number[j]);\n\t\t\tSystem.out.println();\n\t\t\treturn;\n\t\t}\n\t\tfor(int k =0;k<=9;k++)\n\t\t{\n\t\t\tnumber[index]=(char) (k+'0');\n\t\t\trecursion(number,index+1,n);\n\t\t}\n\t}", "public static void collatz(int n) {\n\t\tSystem.out.println(n);\n\t\twhile(n != 1) {\n\t\t\tn = naslednjiClen(n);\n\t\t\tSystem.out.println(n);\n\t\t}\n\t\t\n\t}", "public final void setN(final int koko) {\r\n this.n = koko;\r\n }", "public static void main(String[] args) {\n int n=1;\n for(System.out.print('a');n<=3;System.out.print('c'),n++){\n System.out.print('b');\n }\n }", "public static void main(String[] args) {\n\t\tint[] num = {1,1,5};\r\n\t\tnextPermutation(num);\r\n\t\tfor(int n : num)\r\n\t\t\tSystem.out.print(n + \" \");\r\n\t}", "public static void main(String[] args) {\n\t\tint nDisks=3;\r\n\t\tString steps=hanoi(nDisks,1,3);\r\n\t\t\r\n\t\tfor(String step:steps.split(\";\")){\r\n\t\t\tSystem.out.println(step);\r\n\t\t}\r\n\r\n\t}", "public static void main(String[] args) {\n String j=\"\";\n int i=1;\n while(i<=5)\n {\t \n \t j+=\"\"+i;\n System.out.println(j);\n i++;\n }\n while(i>=1)\n { \n \t System.out.println(j.substring(0,i-1));\n \t i--;\n }\n\t}", "public void run(int n){\n System.out.println(\"Find E Program starting on JNumber\");\n System.out.println(\"Finding E to the Nth Number\");\n System.out.println(this.toNth(n));\n System.out.println(\"Find E Program ending on JNumber\");\n }", "private static void printPascal(int n) {\r\n\t\tLinkedList<Integer> newList = new LinkedList<>();\r\n\t\tLinkedList<Integer> oldList = new LinkedList<>();\r\n\t\tint numOfSpaces = n - 1;\r\n\t\toldList.add(1);\r\n\t\tif(n >= 1)\r\n\t\t\tfor(Integer i : oldList) {\r\n\t\t\t\tfor(int j = 0 ; j < numOfSpaces ; j++)\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\tnumOfSpaces --;\r\n\t\t\t\tSystem.out.println(i);\r\n\t\t\t}\r\n\t\tfor(int i = 2; i <= n; i++) {\r\n\t\t\t\r\n\t\t\tfor(int j = 0 ; j < numOfSpaces ; j++)\r\n\t\t\t\tSystem.out.print(\" \");\r\n\t\t\tnumOfSpaces --;\r\n\t\t\tnewList.add(1);\r\n\t\t\tfor(int j = 2; j <= i - 1; j++)\r\n\t\t\t\tnewList.add(oldList.get(j-2) + oldList.get(j - 1));\r\n\t\t\tnewList.add(1);\r\n\t\t\t\r\n\t\t\tfor(Integer j: newList)\r\n\t\t\t\tSystem.out.print(j + \" \");\r\n\t\t\t\r\n\t\t\tSystem.out.println();\r\n\t\t\t\r\n\t\t\toldList.clear();\r\n\t\t\toldList.addAll(newList);\r\n\t\t\tnewList.clear();\r\n\t\t}\r\n\t\t\r\n\t}", "protected void show(int n) {\n result.setText(Integer.toString(n));\n }" ]
[ "0.63949925", "0.6323902", "0.60841095", "0.5884089", "0.58751667", "0.58631235", "0.585009", "0.5829877", "0.5815763", "0.5811431", "0.58103555", "0.57777303", "0.57735765", "0.57516426", "0.57504565", "0.5743478", "0.57397294", "0.5728139", "0.5720396", "0.57067895", "0.5685115", "0.56792796", "0.5671954", "0.5655592", "0.5646674", "0.56449306", "0.5626096", "0.5619839", "0.5616336", "0.56105477", "0.5609906", "0.5604222", "0.5591587", "0.55908126", "0.55803275", "0.55781734", "0.5576782", "0.557107", "0.5557644", "0.5552053", "0.5537136", "0.552535", "0.5522416", "0.5516873", "0.5516404", "0.55132085", "0.5465584", "0.5462096", "0.5458115", "0.5451503", "0.544125", "0.54263073", "0.5423364", "0.5415463", "0.5412854", "0.5403973", "0.5398127", "0.53948814", "0.5391579", "0.5385456", "0.5382661", "0.53815496", "0.5376693", "0.5375395", "0.53709817", "0.53625256", "0.5356355", "0.5348694", "0.53436244", "0.5338848", "0.5335952", "0.53295875", "0.53292656", "0.5320719", "0.53114414", "0.53102446", "0.5306505", "0.5305318", "0.52995455", "0.52944076", "0.52874553", "0.5280438", "0.5274302", "0.5261945", "0.52618456", "0.5258888", "0.5257781", "0.5256121", "0.52550507", "0.5254517", "0.52532357", "0.524983", "0.5242345", "0.5241297", "0.52333754", "0.52312565", "0.5231167", "0.5229315", "0.52221674", "0.52214694" ]
0.7283204
0
Adds sequence in s to current sequence starting from site k.
public void insert(String s, int k) { assert(k > -1 && k < seq.size() + 1); ArrayList<Character> newSeq = new ArrayList<Character>(); if (k == 0) { for (char c : s.toCharArray()) { if (isValid(c)) newSeq.add(c); } } else { for (int i = 0; i < k; i++) { newSeq.add(seq.get(i)); } for (char c : s.toCharArray()) { if (isValid(c)) newSeq.add(c); } } for (int i = k; i < seq.size(); i++) { newSeq.add(seq.get(i)); } seq = newSeq; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void extendSequence (int k);", "public int insert(int i, int k, String s) //O(log(n))\n {\n\t int output = this.lst.rankinsertion(i, k, s); //see details in class AVLTree\n\t if(output == 0)\n\t\t this.length++; //we added one element\n\t return output;\n }", "public void add(int i, int k) {\n for (int m = i + 1; m <= count; m++) {\n values[m] = values[m-1];\n }\n values[i] = k;\n count++;\n }", "public static NodoListaS add(NodoListaS p, int k, String x) {\r\n\t\tif (k==0)\r\n\t\t\tp = new NodoListaS(x,p);\r\n\t\telse {\r\n\t\t\tNodoListaS q = p;\r\n\t\t\tfor (int i=0; i<k-1 && q!=null; i++)\r\n\t\t\t q = q.next;\r\n\t\t\tif (q!=null)\r\n\t\t\t q.next = new NodoListaS(x,q.next); \r\n\t\t}\r\n\t\treturn p; \r\n\t}", "private final void setto(String s)\n\t { int l = s.length();\n\t int o = j+1;\n\t for (int i = 0; i < l; i++) b[o+i] = s.charAt(i);\n\t k = j+l;\n\t }", "public void add(Location s) {\n\t\t//nothing gets added\n\t\tif (s == null){\n\t\t\treturn;\n\t\t}\n\t\tNode addedLocation = new Node();\n\t\taddedLocation.setElement(s);\n\t\tif (head == null){ //adding to an empty set\n\t\t\thead = addedLocation;\n\t\t\tsize ++;\n\t\t} else{ \n\t\t\t//adding to the top of a set that has at least one element stored in it\n\t\t\taddedLocation.next = head;\n\t\t\thead = addedLocation;\n\t\t\tsize ++;\n\t\t}\n\t}", "@Override\n protected Z advanceG(final long k) {\n return Z.valueOf(5 * k - 2); // mSeqG.next();\n }", "public void addToFirstRegisterNumber(int k) {\n if (firstRegisterNumber + k < 2) {\n throw new IllegalArgumentException(\"Register managment error : trying to add \" + k + \" to the number \" +\n \"of the first usable register when this number is \" + firstRegisterNumber + \", resulting in an\" +\n \" invalid register number.\");\n }\n firstRegisterNumber += k;\n if (firstRegisterNumber > maxRegisterUsed) {\n maxRegisterUsed = firstRegisterNumber;\n }\n }", "public static void permutation2(String s, int k, Set<Character> skip, StringBuffer sb,\r\n\t\t\tSet<String> set) {\r\n\r\n\t\tif (k == s.length()) {\r\n\t\t\tset.add(sb.toString());\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tfor (int i = 0; i < s.length(); i++) {\r\n\t\t\tif (!skip.contains(s.charAt(i))) {\r\n\t\t\t\tsb.append(s.charAt(i));\r\n\t\t\t\tskip.add(s.charAt(i));\r\n\t\t\t\t\r\n\t\t\t\tpermutation2(s, k + 1, skip, sb, set);\r\n\t\t\t\tsb.setLength(sb.length() - 1);\r\n\t\t\t\tskip.remove(s.charAt(i));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void add(int k) {\n\t\tcontains[k] = true;\n\t}", "void add(Element p,int pos)\n {\n if(pos==0)\n {\n\t Sequence temp = new Sequence(this.val, this.next);\n\t\t\t//swap head element\n\t\t\tthis.val = p;\n\t\t\t//change link to copied head\n\t\t\tthis.next = temp;\n }\n else\n {\n int count=1;\n Sequence test=this;\n while(count<pos)\n {\n test=test.next;\n count++;\n }\n Sequence no=new Sequence();\n no.val=p;\n no.next=test.next;\n test.next=no;\n }\n }", "private void helper(int[] S, int k, int p, ArrayList<ArrayList<Integer>> result, ArrayList<Integer> set) {\n if(k==0) {\n result.add(set);\n return;\n }\n if(S.length-p>=k) {\n ArrayList<Integer> newSet = new ArrayList<Integer>(set);\n newSet.add(S[p]);\n helper(S, k-1, p+1, result, newSet); //if S[p] be choosen\n helper(S, k, p+1, result, set); // if S[p] not be choosen\n }\n\n }", "public int addToSequencePlayer(SequencePlayer s, int totalTicks, int lcm);", "public void add(CharSequence s, Language lang) {\r\n\t\t\r\n\t\t//Convert String to Hash Code\r\n\t\tint kmer = s.hashCode();\r\n\t\t\r\n\t\t//Get The Handle of the map for the particular language\r\n\t\tMap<Integer, LanguageEntry> langDb = getLanguageEntries(lang);\r\n\t\t\r\n\t\t\r\n\t\tint frequency = 1;\r\n\t\t//If Language Mapping Already has the Kmer, increment its Frequency\r\n\t\tif (langDb.containsKey(kmer)) {\r\n\t\t\tfrequency += langDb.get(kmer).getFrequency();\r\n\t\t}\r\n\t\t//Otherwise Insert into Map as New Language Entry\r\n\t\tlangDb.put(kmer, new LanguageEntry(kmer, frequency));\r\n\t\r\n\t\t\r\n\t}", "static String caesarCipher(String s, int k) {\n char[] chars = s.toCharArray();\n for (int i = 0; i < chars.length; i++) {\n chars[i] = shift(chars[i], k);\n }\n return new String(chars);\n }", "public static void shift(StringBuilder s){\n\t\t\n\t\t\n\t\t\n\t}", "public void push(int k) {\n head = new Node(k, head);\n ++size;\n }", "private void addState(NFAState s) {\n\t\tstates.add(s);\n\t}", "public static void permutation1(String s, int k, StringBuffer sb,\r\n\t\t\tSet<String> set) {\r\n\r\n\t\tif (k == s.length()) {\r\n\t\t\tset.add(sb.toString());\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tfor (int i = 0; i < s.length(); i++) {\r\n\t\t\tsb.append(s.charAt(i));\r\n\t\t\tpermutation1(s, k + 1, sb, set);\r\n\t\t\tsb.setLength(sb.length() - 1);\r\n\r\n\t\t}\r\n\t}", "public Sequence(String s) {\n for (char c : s.toCharArray()) {\n if (isValid(c)) seq.add(c);\n }\n }", "void insert(String s, int index) {\n Node curr = root;//lets start by root node and insert\n for (int i = 0; i < s.length(); i++) {\n\n // we dont want to override existing key only add new key thats what putifabsent do..\n curr.childrens.putIfAbsent(s.charAt(i), new Node(s.charAt(i)));\n curr.childrens.get(s.charAt(i));\n }\n curr.end = index;\n }", "public String getSequenceForSpace(int k) {\n\t\tif (k <= 0) {\n\t\t\treturn \"\";\n\t\t}\n\t\tfinal int scale = (int) Math.pow(10, k);\n\t\tchar[] visited = new char[scale];\n\t\tint num = scale - 1;\n\t\tvisited[num] = 1;\n\t\tint left = num;\n\t\tStringBuilder seq = new StringBuilder(Integer.toString(num));\n\t\twhile (left > 0) {\n\t\t\tint digit = 0;\n\t\t\tint tmp = (num * 10) % scale;\n\t\t\twhile (digit < 10) {\n\t\t\t\tif (visited[tmp + digit] == 0) {\n\t\t\t\t\tnum = tmp + digit;\n\t\t\t\t\tseq.append(digit);\n\t\t\t\t\tvisited[num] = 1;\n\t\t\t\t\t--left;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t++digit;\n\t\t\t}\n\t\t\tif (digit == 10) {\n\t\t\t\tthrow new IllegalStateException();\n\t\t\t}\n\t\t}\n\t\treturn seq.toString();\n\t}", "static int lookupSequence(String s) {\n\t\treturn lookupSequence(root, s, 0);\n\t}", "private void addStage(Stage s) {\r\n\t\tstages[num_stages] = s;\r\n\t\tnum_stages++;\r\n\t}", "private void storeSp(int s) {\n UNSAFE.putOrderedInt(this, spOffset, s);\n }", "private void PuzzleSolve(int k, ArrayList<Integer> S, ArrayList<Integer> U) {\n // for every integer value in the array passed in U we will add it to the empty array and remove it from the\n // new array made called list.\n for (Integer s : U) {\n ArrayList<Integer> list = new ArrayList<>(U);\n S.add(s);\n list.remove(s);\n // If we have removed all numbers in the list and S is now full, check the evaluation.\n if (k == 1) {\n Equals(S);\n }\n // else we keep calling this method until U is empty.\n else {\n PuzzleSolve(k - 1, S, list);\n }\n // remove the value from s and then add it back to the list to test a new variation at the end.\n S.remove(s);\n list.add(s);\n }\n }", "private int moveForward(int i, int s) {\n if (i + s >= items.length) {\n return ((i + s) - items.length);\n }\n return i + s;\n }", "private void fillPkCache(Stack s, String ename) {\n\t\tLong pkValueStart = getNextPkValueForEntityIncreaseBy(ename, 10, increaseBy());\n\t\tlong value = pkValueStart.longValue();\n\t\tlog.debug(\"filling pkCache for {}, starting at {}\", ename, value);\n\t\tfor (int i = increaseBy(); i > 0; i--) {\n\t\t\ts.push(Long.valueOf(i + value));\n\t\t}\n\t}", "static void addSequence(DnaSequence dna, String s, int level) {\n\t\tint childIndex = getValue(s.charAt(level));\n\t\tif(dna.childs[childIndex] == null) dna.childs[childIndex] = new DnaSequence(s);\n\t\telse addSequence(dna.childs[childIndex], s, level + 1);\n\t}", "protected void addToStoredStrings(String s) {\n \tif (debug) debug(\n \t\t\"addToStoredStrings(s=\", StringUtil.toString(s), \") at index=\",\n \t\tString.valueOf(storedStrings.size())\n \t);\n storedStrings.add(s);\n }", "public void insert(int k) {\n int i = 0;\n\n heapsize = heapsize + 1;\n i = heapsize;\n i = i - 1;\n\n if (heapsize == 1) {\n array[0] = k;\n } else {\n while ((i > 0) && ((array[parent(i)]) > k)) {\n array[i] = array[parent(i)];\n i = parent(i);\n }\n array[i] = k;\n }\n }", "public void add(Object o){\n if (n<sequence.length){\n// sequence[n]=o;\n// n++;\n sequence[n++]=o;\n }\n }", "private void reachable(Set s) {\n for (Iterator i = this.succ.iterator(); i.hasNext(); ) {\n IdentityHashCodeWrapper ap = (IdentityHashCodeWrapper)i.next();\n if (!s.contains(ap)) {\n s.add(ap);\n ((AccessPath)ap.getObject()).reachable(s);\n }\n }\n }", "public static void kSmallest(int l,int r,int k){\n\t\t\n if((r-l+1)>=k){\n\t\tint freq[]=new int[26];\n\t\tfor(int i=l;i<=r;i++){\n\t\t\tfreq[source.charAt(i)-97]++;\n\t\t}\n\t\t\n\t\tint sum=0;\n\n\t\tfor(int i=0;i<26;i++){\n\t\t\tif(freq[i]>0){\n\t\t\t\tsum+=freq[i];\n\t\t\t\tif(sum>=k){\n\t\t\t\t\tSystem.out.println((char)(i+97));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n }else{\n \t System.out.println(\"Out of range\");\n }\n\t}", "public void includeSymbol(String s) {\n if (!slexic.containsKey(s)) {\n int slexic_size = slexic.size();\n slexic.put(s, -(slexic_size + 1));\n slexicinv.add(s);\n }\n }", "public void mutate(int k, char c) {\n if (isValid(c)) seq.set(k, c);\n }", "public void shingleString(String s) {\n\t\tint len = s.length();\n\t\tif(len<this.k){\n\t\t\tSystem.out.println(\"Error! k>word length\");\n\t\t}else{\n\t\t\tfor(int i=0;i<(len-this.k+1);i++){\n\t\t\t\tString shingle = s.substring(i, i+this.k);\n\t\t\t\tif(!this.contains(shingle)){\n\t\t\t\t\tthis.add(shingle);\n\t\t\t\t}\t\t\t\n\t\t\t}\n\t\t}\n//\t\tSystem.out.println(this.toString());\n\t}", "public void insert(String s){\n\t\tinsertHelper(root, s);\n\t}", "public boolean add(String s){\n if(count == contents.length) {\n return false;\n }\n contents[count] = s;\n count++;\n return true;\n }", "void addFirst(Key k) {\n\t\tfirstNode = new Node(k, getFirstNode()); // creates new node, pointing to the previous first node and sets it to firstNode\n\t\tif(size++==0) lastNode = firstNode;\n\t}", "public Sequence(Scanner sc) {\n String s = sc.next();\n for (char c : s.toCharArray()) {\n if (isValid(c)) seq.add(c);\n }\n }", "static void insert(Queue<Integer> q, int k){\n \n q.add(k);\n \n }", "public void call(int k){\n\t\tWorker.reg.pushPCtoStack();\n\t\tWorker.reg.setPC(k);\n\t\tWorker.reg.addCycle();\n\t\tWorker.reg.addCycle();\n\t}", "public void add(E s,int index) {\t//O(n)\r\n\t\t//checks if the index is valid\r\n\t\tif(index>=0 && index<=size) {\t//index is valid\r\n\t\t\t//checks if there is any space left in the array\r\n\t\t\tif(size>=capacity)\r\n\t\t\t\tresize(this.capacity*2);\t//increases size of the array\r\n\t\t\tfor (int k=size-1; k>=index;k--) {\t//shifting element\r\n\t\t\t\tlist[k+1]=list[k];\r\n\t\t\t}\r\n\t\t\tlist[index]=s;\t//add element to the index\r\n\t\t\tsize++;\t//increases size\r\n\t\t} else {\t//index is not valid\r\n\t\t\tSystem.out.println(\"index \"+index+\" is out or range!\");\r\n\t\t}\r\n\t}", "public void expand(String s){\n\t System.out.println(\"expand method is performed\");\n\t this.children.put(s,new Node(s));\t\n\t}", "public static String orderlyQueue(String s, int k) {\n //Runtime: 9 ms, faster than 5.74% of Java online submissions for Orderly Queue.\n //Memory Usage: 41.4 MB, less than 5.15% of Java online submissions for Orderly Queue.\n\n if (k == 1) {\n String ans = s;\n for (int i = 0; i < s.length(); i++) {\n String temp = s.substring(i) + s.substring(0, i);\n if (temp.compareTo(ans) < 0) {\n ans = temp;\n }\n }\n return ans;\n } else {\n char[] chars = s.toCharArray();\n Arrays.sort(chars);\n return new String(chars);\n }\n }", "public void IncCount(String s) \n\t{\n if(numEntries+1 >= tableSize)\n rehashTable();\n \n HashEntry entry = contains(s);\n \n if(entry == null)\n {\n insert(s);\n numEntries++;\n }\n else\n entry.value++;\n\t}", "public void add(E s) {\n expandCapacity();\n this.elements[this.size] = s;\n this.size += 1;\n }", "public static void permutation3(StringBuffer sb, int k, Set<String> set)\r\n\t{\r\n\t\tif(k == sb.length())\r\n\t\t{\r\n\t\t\tset.add(sb.toString());\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\t\r\n\t\t\r\n\t\tfor(int i =k ;i < sb.length();i++)\r\n\t\t{\r\n\t\t\tswap(sb,k,i);\r\n\t\t\tpermutation3(sb,k+1, set);\r\n\t\t\tswap(sb,i,k);\r\n\t\t}\r\n\t}", "protected void sink(int k) {\n\n while (2*k <= N) {\n int j = 2*k;\n\n if (j < N && less(j, j+1)) j++;\n if (!less(k, j)) break;\n exchange(k, j);\n k = j;\n }\n }", "public void add(long key, C value) {\n if(Long.toString(key).length() != 8) {\n \t//System.out.println(\"Sequence Error: Length is not 8.\\n\");\n return;\n }\n\n //clear the old key\n try {\n this.remove(key); \n } catch(Exception e) {\n sequence.add(new Entry<C>(key, value));\n size++;\n return;\n }\n //System.out.println(\"Found duplicate for key \" + key + \".\\n\"); \n sequence.add(new Entry<C>(key, value));\n size++;\n }", "public void insertDH(String s) {\n int key = Math.floorMod(oaat(s.toCharArray()), this.size);\n int step = Math.floorMod(fnv1a32(s.toCharArray()), this.size - 1) + 1;\n while (this.data[key] != null) {\n this.collisions++;\n key = Math.floorMod(key + step, this.size);\n }\n this.data[key] = s;\n }", "public void insertKey(int k)\n\t{\n\t if (size == maxsize)\n\t {\n\t System.out.println(\"Overflow: Could not insertKey\");\n\t return;\n\t }\n\t \n\t // First insert the new key at the end\n\t size++;\n\t int i = size - 1;\n\t Heap[i] = k;\n\t \n\t // Fix the min heap property if it is violated\n\t while (i != 0 && Heap[parent(i)] < Heap[i])\n\t {\n\t swap(i, parent(i));\n\t i = parent(i);\n\t }\n\t}", "gov.nih.nlm.ncbi.www.SeqLocDocument.SeqLoc addNewSeqLoc();", "public void addFirst(E s) {// 0(1)\r\n\t\t//checks if there is any space left in the array\r\n\t\tif (size>=capacity)\r\n\t\t\tresize(this.capacity*2);\t//increases size of the array\r\n\t\tlist[size]=s;\t//adds element to the array\r\n\t\tsize++;\t//increases size\r\n\t}", "public boolean insert(Segment s) {\n\t\tint x = s.getLeft().getX();\n\t\tupdateComparator(x);\n\t\tboolean res = this.add(s);\n\t\treturn res;\n\t}", "public void addAll(String s,String sp){\n this.split(s,sp,items);\n }", "public int generate(int k) {\n int result = 0;\n\n for (int i = 0; i < k; i++) {\n result = 2 * result + step();\n }\n return result;\n }", "public void insertAfterCursor(String s) {\n if(this.isEmpty())\n {\n lines.addFirst(s);\n }\n else\n lines.addAfter(new PositionObject<>(lines.get(cursor)), s);\n cursor++;\n }", "public ListNode SolveByMovingPointers(ListNode head, int k)\n {\n // Edge cases\n if (head == null)\n return null;\n if (k == 0)\n return head;\n\n // Calculate list length + actual number of rotations\n int listLength = FindLength(head);\n int numberOfRotations = k >= listLength? k % listLength : k;\n\n // Another edge case - may not need to rotate at all\n if (listLength == 1 || numberOfRotations == 0)\n return head;\n\n // Iterate to the node before the node with number that needs to be rotated to beginning...\n ListNode oldHeadIterator = head;\n int counter = listLength - numberOfRotations - 1;\n while (counter != 0)\n {\n counter -= 1;\n oldHeadIterator = oldHeadIterator.next;\n }\n\n // ... Then make the following node be the beginning of new head + nullify tail of old head\n ListNode newHead = oldHeadIterator.next;\n oldHeadIterator.next = null;\n\n // Iterate to end of the new head, then simply add the old head contents to the tail\n ListNode newHeadIterator = newHead;\n while (newHeadIterator.next != null)\n newHeadIterator = newHeadIterator.next;\n newHeadIterator.next = head;\n\n return newHead;\n }", "public void increment(int i, ArrayList<Split> s)\n\t{\n\t\tthis.iValue += i;\n\t\t\n\t\tfor(int counter = 0; counter < s.size(); counter ++)\n\t\t{\n\t\t\tthis.incrementSplit(s.get(counter));\n\t\t}\n\t}", "public void setNextLocation(String s) {\n if (s == null) nextLocation = \"\";\n else nextLocation = s;\n }", "public int characterReplacement2(String s, int k) {\n Set<Character> letters = new HashSet();\n int longest = 0;\n for(int i=0;i<s.length();i++) letters.add(s.charAt(i));\n for(char l: letters){\n int c = 0;\n for(int i=0,j=0;j<s.length();j++){\n if(l==s.charAt(j))c++;\n if((j-i+1)>c+k)\n if(l==s.charAt(i++)) c--;\n longest = Math.max(j-i+1, longest);\n }\n }\n return longest;\n }", "public void push(State s0) {\n\t\tsList.add(s0);\r\n\t}", "public void push(String s){\n //resize array\n if(N==stackArray.length)resizeArray(2*N);\n stackArray[N++]=s;\n }", "private final void step1()\n\t { if (b[k] == 's')\n\t { if (ends(\"sses\")) k -= 2; else\n\t if (ends(\"ies\")) setto(\"i\"); else\n\t if (b[k-1] != 's') k--;\n\t }\n\t if (ends(\"eed\")) { if (m() > 0) k--; } else\n\t if ((ends(\"ed\") || ends(\"ing\")) && vowelinstem())\n\t { k = j;\n\t if (ends(\"at\")) setto(\"ate\"); else\n\t if (ends(\"bl\")) setto(\"ble\"); else\n\t if (ends(\"iz\")) setto(\"ize\"); else\n\t if (doublec(k))\n\t { k--;\n\t { int ch = b[k];\n\t if (ch == 'l' || ch == 's' || ch == 'z') k++;\n\t }\n\t }\n\t else if (m() == 1 && cvc(k)) setto(\"e\");\n\t }\n\t }", "public void rotate(int[] nums, int k) {\n\t\tif(nums == null || nums.length == 0 || k <= 0){\n\t\t\treturn;\n\t\t}\n\t\tint n = nums.length, count = 0;\n\t\tk %= n;\n\t\tfor(int start = 0; count < n; start++){\n\t\t\tint cur = start;\n\t\t\tint prev = nums[start];\n\t\t\tdo{\n\t\t\t\tint next = (cur + k) % n;\n\t\t\t\tint temp = nums[next];\n\t\t\t\tnums[next] = prev;\n\t\t\t\tcur = next;\n\t\t\t\tprev = temp;\n\t\t\t\tcount++;\n\t\t\t}while(start != cur);\n\t\t}\n\t}", "public synchronized void modify(String s) {\n\t\tsynchronized (list) {\n\t\t\tif (list.size() > 25) {\n\t\t\t\tlist.clear();\n\t\t\t\tmap.clear();\n\t\t\t}\n\t\t\tlist.add(s);\n\t\t\ttry {\n\t\t\t\tThread.sleep(300);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t}\n\t\t}\n\t\tmap.put(s, s);\n\t\t//\t\tSystem.out.println(\"modify end: \" + s);\n\t}", "public void rotateold2(int[] a, int k) {\n\n\t\tif (a == null || a.length == 0)\n\t\t\treturn;\n\n\t\tint jump = 0, len = a.length, cur = a[0], next, count = 0;\n\n\t\tk %= len; \n\t\tif (k == 0) return;\n\n\t\tif (len % k != 0 || k == 1)\n\t\t{ \n\t\t\tint i = 0;\n\t\t\twhile (i < len)\n\t\t\t{\n\t\t\t\tjump = (jump + k) % len;\n\t\t\t\tnext = a[jump];\n\t\t\t\ta[jump] = cur;\n\t\t\t\tcur = next;\n\t\t\t\ti++;\n\t\t\t} \n\t\t} \n\t\telse\n\t\t{\n\t\t\tfor (int i = 0; i <= len/k; i ++)\n\t\t\t{\n\t\t\t\tint start = 0;\n\t\t\t\tjump = i;\n\t\t\t\tnext = a[jump];\n\t\t\t\tcur = a[i];\n\t\t\t\twhile (start <= len/k)\n\t\t\t\t{\n\t\t\t\t\tjump = (jump + k) % len;\n\t\t\t\t\tnext = a[jump];\n\t\t\t\t\ta[jump] = cur;\n\t\t\t\t\tcur = next;\n\t\t\t\t\tstart++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void push(Item s) {\n\t\tif (N == arr.length)\n\t\t\tresize (arr.length*2);\t\n\t\tarr[N++] = s;\n\t}", "private void buildString(String input, int k, int[] samp) {\n\r\n\t\tMap<Character, Integer> countermap = new HashMap<Character, Integer>();\r\n\r\n\t\tString out = \"\";\r\n\r\n\t\tfor (int i = 0; i < input.length(); i++) {\r\n\t\t\tcountermap.put(input.charAt(i), countermap.getOrDefault(input.charAt(i), 0) + 1);\r\n\t\t\tif (countermap.get(input.charAt(i)) <= k) {\r\n\r\n\t\t\t\tif (countermap.get(input.charAt(i)) == 1) {\r\n\t\t\t\t\tout += input.charAt(i);\r\n\t\t\t\t\tsamp[(int) input.charAt(i)] -= 1;\r\n\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t\tfor (int j = 0; j < i; j++) {\r\n\t\t\t\t\t\tif ((samp[(int) input.charAt(j)] != 0) && (countermap.get(input.charAt(i)) != 1)) {\r\n\t\t\t\t\t\t\tout += input.charAt(j);\r\n\t\t\t\t\t\t\tsamp[(int) input.charAt(j)] -= 1;\r\n\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\tSystem.out.println(out);\r\n\t}", "public void permutationOfString(String s, int start, int end){\n if(start == end && !hs.contains(s)){\n hs.add(s);\n System.out.println(s);\n return;\n }\n\n for(int i=start;i<=end;i++){\n s=swap(s,i,start);\n permutationOfString(s,start+1, end);\n s=swap(s,i,start);\n }\n\n }", "public static void EmbedSLink(SLink s_link) {\n\t\t\n\t\tKDNode ptr = s_link.src;\n\t\twhile(ptr != null) {\n\t\t\t\n\t\t\tif(s_link.dst.IsParent(ptr) == true) {\n\t\t\t\t// cannot merge in the same node\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tif(ptr.s_link_num < max_s_link_num) {\n\t\t\t\t\n\t\t\t\tSLink s = new SLink();\n\t\t\t\ts.src = s_link.src;\n\t\t\t\ts.dst = s_link.dst;\n\t\t\t\ts.trav_prob = s_link.trav_prob;\n\t\t\t\t\n\t\t\t\tSLink prev_ptr = ptr.s_links;\n\t\t\t\tptr.s_links = s;\n\t\t\t\ts.next_ptr = prev_ptr;\n\t\t\t\tptr.s_link_num++;\n\t\t\t}\n\t\t\t\n\t\t\tptr = ptr.parent_ptr;\n\t\t}\n\t}", "public void insertBeforeCursor(String s) {\n if(this.isEmpty() || cursor==-1)\n {\n lines.addFirst(s);\n }\n else\n lines.addBefore(new PositionObject<>(lines.get(cursor)), s);\n //cursor--;\n }", "public Stage connectFrom( Stage s )\n { previous = s; return this; }", "public void incrementSplit(Split s)\n\t{\n\t\tint index = this.getSplitIndex(s);\n\t\t\n\t\tif(index == -1)\n\t\t{\n\t\t\tthis.addSplit(s);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tsplits.get(index).increment(s.getValue());\n\t}", "public void push(int x) {\n \tint size = s2.size();\n \tfor(int i = 0; i < size; i++) {\n \t\ts.push(s2.pop());\n \t}\n \ts.push(x);\n }", "public void insert(K k, E e) \n\t{\n\t\troot = inserthelp(root, k, e);\n\t\tnodecount++;\n\t}", "static Node reserveIterativeTraversal(MyLinkedList l, int k) {\n\t\tNode p1 = l.getHead();\n\t\tNode p2 = l.getHead();\n\t\t\n\t\tfor(int i = 0; i < k; i++) \n\t\t\tp1 = p1.getNext();\n\t\t\t\n\t\twhile(p1.getNext() != null) {\n\t\t\tp1 = p1.getNext();\n\t\t\tp2 = p2.getNext();\n\t\t}\n\t\t\n\t\treturn p2;\n\t}", "private static SingleLinkedNode findFromEnd(SinglyLinkedList sll, int k) {\n\t\tSingleLinkedNode fast = sll.getHead();\r\n\t\tSingleLinkedNode slow = fast;\r\n\t\tint count = 1;\r\n\t\twhile (fast != null && count < k) {\r\n\t\t\tfast = fast.getNext();\r\n\t\t\tcount++;\r\n\t\t}\r\n\t\tif (fast == null) {\r\n\t\t\treturn null; // not enough elements.\r\n\t\t}\r\n\t\tif (fast.getNext() == null) {\r\n\t\t\t// remove 1st element.\r\n\t\t\tsll.setHead(slow.getNext());\r\n\t\t\treturn slow;\r\n\t\t}\r\n\t\t// Now slow and fast are k elements apart.\r\n\t\t// look 2 ahead so we can remove the element\r\n\t\twhile (fast.getNext().getNext() != null) {\r\n\t\t\tfast = fast.getNext();\r\n\t\t\tslow = slow.getNext();\r\n\t\t}\r\n\t\tfast = slow.getNext(); // temp pointer\r\n\t\tslow.setNext(slow.getNext().getNext());\r\n\t\treturn fast;\r\n\t\t\r\n\t}", "@Override\r\n\tpublic void add(Seasoning s) {\n\t\t\r\n\t}", "private static boolean move(int k) {\n\t\tSystem.out.println(sn.arr.size());\n\t\tint nr = sn.arr.getLast().r + dx[k];\n\t\tint nc = sn.arr.getLast().c + dy[k];\n\t\tif(nr<0||nr>=map.length||nc<0||nc>=map.length)\n\t\t\treturn false;\n\t\t\n\t\tif (map[nr][nc] == 1) {\n\t\t\tappleCnt--;\n\t\t\tsn.arr.add(new node(nr, nc));\n\t\t\tsn.size++;\n\t\t\tmap[nr][nc] = 2;\n\t\t} else if (map[nr][nc] == 0) {\n\t\t\tsn.arr.add(new node(nr, nc));\n\t\t\tmap[nr][nc]=2;\n\t\t\tmap[sn.arr.getFirst().r][sn.arr.getFirst().c] = 0;\n\t\t\tsn.arr.removeFirst();\n\t\t\t\n\t\t}else {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public boolean enqueue(String s) {\n\t\tif ( isFull() )\n\t\t\treturn false;\n\t\t//is this the first insert?\n\t\tif ( isEmpty() )\n\t\t\tdata[++head] = s;\n\t\t//otherwise, move the tail to the new position\n\t\telse\n\t\t\tdata[(head+numElements)%data.length] = s;\n\t\tnumElements++;\n\t\treturn true;\n\t}", "public void insert( int x) \r\n {\r\n h[++N] = x;\r\n siftUp( N);\r\n }", "public void push(String s)\n\t{\n\t\t\tStringNode newNode = new StringNode(s);\n\t\t\tnewNode.setLink(top);\n\t\t\ttop = newNode;\n\t}", "public void insert(int i, K k, P p) {\n\t\tfor (int j = keyCount; j > i; j--) {\n\t\t\tkeys[j] = keys[j - 1];\n\t\t\tpointers[j] = pointers[j - 1];\n\t\t}\n\t\tkeys[i] = k;\n\t\tpointers[i] = p;\n\t\tkeyCount++;\n\t}", "public int generate(int k) {\n int r = 0;\n for (int i = 0; i < k; i++) {\n r = (r*2) + step();\n }\n return r;\n }", "public void insertAtTail(String s)\n {\n Node temp = new Node(s);\n \n if(head == null)\n {\n head = temp;\n temp.next = head;\n }\n else\n {\n Node current = head;\n \n while(current.next != head)\n {\n current = current.next;\n }\n \n current.next = temp;\n temp.next = head;\n }\n }", "public void addState(AState s) {\n this.states.add(s);\n }", "public void add(String s) {\n HashMap<String, TrieNode> temp = children;\n for (int i = 0; i < s.length(); i++){\n if (!temp.containsKey(String.valueOf(s.charAt(i)))){\n temp.put(String.valueOf(s.charAt(i)), new TrieNode());\n }\n if (i == s.length() - 1){\n temp.get(String.valueOf(s.charAt(i))).isWord = true;\n }\n temp = temp.get(String.valueOf(s.charAt(i))).children;\n }\n }", "void insert(int pos, String s);", "public void addAll(String s){\n this.split(s,sp,items);\n }", "private/* smem_lti_id */long smem_lti_soar_add(SymbolImpl s) throws SoarException, SQLException\n {\n final IdentifierImpl id = s.asIdentifier();\n if((id != null) && (id.smem_lti == 0))\n {\n // try to find existing lti\n id.smem_lti = smem_lti_get_id(id.getNameLetter(), id.getNameNumber());\n \n // if doesn't exist, add\n if(id.smem_lti == 0)\n {\n id.smem_lti = smem_lti_add_id(id.getNameLetter(), id.getNameNumber());\n \n id.smem_time_id = epmem.getStats().getTime();\n id.id_smem_valid = epmem.epmem_validation();\n \n epmem.epmem_schedule_promotion(id);\n }\n }\n \n return id.smem_lti;\n }", "public void keyPress(String s)\n\t\t{\n\t\t\tif(s.equals(\"w\"))\n\t\t\t{\n\t\t\t\tjoe.translate(0,-8);\n\t\t\t}\n\t\t\tif(s.equals(\"a\"))\n\t\t\t{\n\t\t\t\tjoe.translate(-8,0);\n\t\t\t}\n\t\t\tif(s.equals(\"s\"))\n\t\t\t{\n\t\t\t\tjoe.translate(0,8);\n\t\t\t}\n\t\t\tif(s.equals(\"d\"))\n\t\t\t{\n\t\t\t\tjoe.translate(8,0);\n\t\t\t}\n\t\t\t\n\t\t\tif(s.equals(\"wa\"))\n\t\t\t{\n\t\t\t\tjoe.translate(0,-8);\n\t\t\t\tjoe.translate(-8,0);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tchar done = (char)10;\n\t\t\tString temp = Character.toString(done);\n\t\t\t\n\t\t}", "static void insertToHash(Node root, HashSet<Integer> s) {\n if (root == null)\n return;\n insertToHash(root.left, s);\n s.add(root.data);\n insertToHash(root.right, s);\n }", "public List<String> findRepeatedDnaSequences(String s) {\n if(s.length() < 10) return new ArrayList<String>();\n \n int[] map = new int[256];\n map['A'] = 0;\n map['T'] = 1;\n map['C'] = 2;\n map['G'] = 3;\n \n List<String> result = new ArrayList<String>();\n \n //this set contains string that occurs before\n Set<Integer> visited = new HashSet<Integer>();\n //this set contains string that we have inserted into result\n Set<Integer> inResult = new HashSet<Integer>();\n \n int key = 0;\n \n //Since we only partially modify the key, we need to firstly initialize it\n for(int i = 0; i < 9; i++){\n key <<= 2;\n key |= map[s.charAt(i)];\n }\n \n for(int i = 9; i < s.length(); i++){\n key <<= 2;\n key |= map[s.charAt(i)];\n //our valid key has 20 digits, we use 0xFFFFF to remove digits that beyong this range\n key &= 0xFFFFF;\n \n String temp = s.substring(i - 9, i+1);\n \n //if this is not the first time we visit this substring\n if(!visited.add(key)){\n //if this is the first time we add this substring into result\n if(inResult.add(key)){\n result.add(temp);\n }\n }\n }\n \n return result;\n }", "public void increaseKey(FHeapNode x, int k)\r\n {\r\n x.key = x.key + k;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//increment value of x.key\r\n FHeapNode y = x.parent;\t\t\r\n\r\n if ((y != null) && (x.key > y.key))\t\t\t\t\t\t\t\t\t\t\t//remove node x and its children if incremented key value is greater than its parent\r\n\t\t{\r\n cut(x, y);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//remove node x from parent node y, add x to root list of heap.\r\n cascadingCut(y);\t\t\t\t\t\t\t\t\t\t\t\t\t\t//check the child cut value of parent y and perform cascading cut if required\r\n }\r\n\r\n if (x.key > maxNode.key)\t\t\t\t\t\t\t\t\t\t\t\t\t//update maxnode pointer if necessary\r\n\t\t{\r\n maxNode = x;\r\n }\r\n }", "private void nextMovement()\n\t{\n\t\tif(SEQUENCE.length <= 1)\n\t\t\tSEQUENCE = null;\n\t\telse\n\t\t{\n\t\t\tint[] temp = new int[SEQUENCE.length - 1];\n\t\t\tfor(int i = 1; i < SEQUENCE.length; i++)\n\t\t\t{\n\t\t\t\ttemp[i-1] = SEQUENCE[i];\n\t\t\t}\n\t\t\tSEQUENCE = temp;\n\t\t}\n\t}", "public static int traverse(TreeNode node, int sequence, int k, int res) {\n //return the current root sequence\n if(node == null){\n return sequence;\n }\n\n sequence = traverse(node.left, sequence, k, res);\n //come back to this stack again, so need to add 1 sequence number!!!!!!!!!!!!\n sequence+=1;\n if(sequence == k){\n res = node.val;\n }\n sequence = traverse(node.right, sequence, k, res);\n return sequence;\n }", "protected void insertBeginning(T value) {\r\n\t\tthis.getHead().setPrev(new SNode<T>(value, this.getHead().getPrev()));\r\n\t\tthis.size++;\r\n\t}" ]
[ "0.64056253", "0.5840204", "0.5557304", "0.5538049", "0.5245058", "0.51852447", "0.5137154", "0.51158255", "0.50728035", "0.5025041", "0.5002577", "0.49874133", "0.49868858", "0.49843705", "0.49598935", "0.49495214", "0.49238378", "0.49137372", "0.49104658", "0.48954085", "0.48952848", "0.4868345", "0.48630098", "0.4862332", "0.48537645", "0.4853628", "0.48427173", "0.48225477", "0.4797255", "0.4726212", "0.47209612", "0.47048956", "0.46953776", "0.46842083", "0.4681448", "0.46723285", "0.46609095", "0.46553463", "0.46534905", "0.46520522", "0.46379676", "0.46376517", "0.4636698", "0.46271652", "0.4611785", "0.46041638", "0.45990705", "0.4597225", "0.45946875", "0.45882988", "0.45602024", "0.45360747", "0.45354307", "0.45195717", "0.4512014", "0.4508507", "0.45059174", "0.4504724", "0.44973826", "0.4493925", "0.44905698", "0.44881883", "0.44852328", "0.4469182", "0.4463979", "0.44590822", "0.44519994", "0.44513538", "0.44438866", "0.4442061", "0.44408494", "0.4437581", "0.44348192", "0.44321722", "0.442776", "0.4426529", "0.44250166", "0.44208178", "0.44193536", "0.44121146", "0.439036", "0.438754", "0.43830118", "0.43751067", "0.43724224", "0.4361475", "0.43590328", "0.43532225", "0.4347075", "0.43402255", "0.43375054", "0.43348482", "0.4328515", "0.43278983", "0.43270102", "0.43223083", "0.43222344", "0.4306518", "0.43053237", "0.43034524" ]
0.7258699
0
Deletes nucleotides between site k1 to k2 in the sequence.
public void delete(int k1, int k2) { assert(k1 > -1 && k1 < seq.size() + 1); assert(k2 > -1 && k2 < seq.size() + 1); if (k1 > k2) { int temp = k1; k1 = k2; k2 = temp; } ArrayList<Character> newSeq = new ArrayList<Character>(); for (int i = 0; i < k1; i++) { newSeq.add(seq.get(i)); } for (int i = k2; i < seq.size(); i++) { newSeq.add(seq.get(i)); } seq = newSeq; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void removeAll(String k1, String k2) {\n java.util.HashMap<String, V> newMap = new java.util.HashMap<String, V>(map);\n for (String key: newMap.keySet()) {\n int ind = key.indexOf(\"|\");\n String a = key.substring(0, ind);\n String b = key.substring(ind + 1, key.length());\n\n // if the current key contains either k1 or k2 remove it\n if (a.equals(k1) || b.equals(k1) || a.equals(k2) || b.equals(k2)) {\n map.remove(a + \"|\" + b);\n map.remove(b + \"|\" + a);\n } // END if\n } // END for key\n }", "public void deleteAt(int k) {\n if (isEmpty()) return;\n if (k == 0) {//check if node is head\n Cus_Node p = head;\n head = head.next;\n p.next = null;\n } else {\t\n Cus_Node p = pos(k);//get node position k\n if (p == null) return;\n Cus_Node q = pos(k - 1);//q is node before of p\n // Remove p\n q.next = p.next;\n p.next = null;\n if (p == tail) tail = q;\n }\n }", "public void EliminarArista(int v1, int v2) {\n\t\tNodoGrafo n1 = Vert2Nodo(v1);\n\t\tEliminarAristaNodo(n1, v2);\n\t}", "public void deleteDoubles() {\r\n\t for (int j = 0; j < this.size()-1; j++) {\r\n\t for (int i = j+1; i < this.size(); i++) {\r\n\t if (this.get(i).equals(this.get(j))) {\r\n\t this.remove(i);\r\n\t i--;\r\n\t }\r\n\t }\r\n\t }\r\n\t }", "public void deleteDigram(){\n \n SequiturSymbol dummy;\n\n if (n.isGuard())\n return;\n dummy = (SequiturSymbol)theDigrams.get(this);\n\n // Only delete digram if its exactly\n // the stored one.\n\n if (dummy == this)\n theDigrams.remove(this);\n }", "public void removeIndexInterval(long index0, long index1) {\n return;\r\n }", "void removeInconsistency(Integer optionId1, Integer optionId2);", "public int DeleteOperationforTwoStrings(String word1, String word2)\n\t{\n\t\tint n1 = word1.length();\n int n2 = word2.length();\n int[][] dp = new int[n1 + 1][n2 + 1];\n for(int i = 1; i <= n1; i ++)\n {\n for(int j = 1; j <= n2; j ++)\n {\n dp[i][j] = word1.charAt(i - 1) == word2.charAt(j - 1) ? \n dp[i - 1][j - 1] + 1 : Math.max(dp[i - 1][j], dp[i][j - 1]);\n }\n }\n return n1 + n2 - 2 * dp[n1][n2];\n\t}", "@Override\n\tpublic void borrarArco(Ciudad c1, Ciudad c2) {\n\t\tgetVertice(c1).removeArc(c2);\n\t\tthis.cantArcos--;\n\t}", "public void deleteAll(Key k) {\n\t\tNode temp = getFirstNode(); // this does not work because Java is pass by value, not pass by reference\n\t\tfor (int i = 0; i < size-1; i++) {\n\t\t\tif(temp.next.key==k){\n\t\t\t\ttemp.next = temp.next.next;\n\t\t\t}\n\t\t}\n\t\tif (lastNode.key == k)\n\t\t\tlastNode = null;\n\t}", "public abstract void deletedSentences(long ms, int n);", "public void delete(String key){\r\n\t\tint hash = hash(key);\r\n for(int i = 0; i < M; i++){\r\n if(hash + i < M){\r\n if(keys[hash + i] != null && keys[hash + i].equals(key)){\r\n remove(hash + i);\r\n N--;\r\n break;\r\n }\r\n }else{\r\n if(keys[hash + i - M] != null && keys[hash + i - M].equals(key)){\r\n remove(hash + i - M);\r\n N--;\r\n break;\r\n }\r\n }\r\n\t\t}\r\n }", "public void unirSinEliminar(Estado es1, Estado es2) {\n\t\tes1.unir(es2.getTrans());\n\t\taut.forEach((k, v) -> v.recolocarTransicionesSinBorrar(es2.getId(), es1.getId()));\n\t}", "public void removeNuclei() {\n int size = nucleiSelected.size();\n if (size > 0) {\n nucleiSelected.remove(size - 1);\n lastModified = Calendar.getInstance().getTimeInMillis(); // record time\n decrementUpdateCount();\n }\n }", "public static boolean QuasiThresholdDeletion (Graph<Integer,String> g, Integer k){\n\t\t\r\n\t\tif (k<0) return false;\r\n\t\t//System.out.print(\" \"+k+\"\\n\");\r\n\t\tboolean existsP4orC4 = false;\r\n\t\t\r\n\t\tIterator<Integer> a = g.getVertices().iterator();\r\n\t\tIterator<Integer> b;\r\n\t\tIterator<Integer> c;\r\n\t\tIterator<Integer> d;\r\n\t\twhile(a.hasNext()){\r\n\t\t\tInteger A = a.next();\r\n\t\t\t//System.out.print(\"\"+A+\" \");\r\n\t\t\tb = g.getNeighbors(A).iterator();\r\n\t\t\twhile(b.hasNext()){\r\n\t\t\t\tInteger B = b.next();\r\n\t\t\t\tc = g.getNeighbors(B).iterator();\r\n\t\t\t\twhile (c.hasNext()){\r\n\t\t\t\t\tInteger C = c.next();\r\n\t\t\t\t\tif (g.isNeighbor(C, A) || C==A) continue;\r\n\t\t\t\t\td = g.getNeighbors(C).iterator();\r\n\t\t\t\t\twhile (d.hasNext()){\r\n\t\t\t\t\t\tInteger D = d.next();\r\n\t\t\t\t\t\tif (D==B) continue; \r\n\t\t\t\t\t\tif (g.isNeighbor(D,B)) continue;\r\n\t\t\t\t\t\t//otherwise, we have a P4 or a C4\r\n\r\n\t\t\t\t\t\texistsP4orC4 = true;\r\n\t\t\t\t\t\t//System.out.print(\"Found P4: \"+A+\"-\"+B+\"-\"+C+\"-\"+D+\"... not a cograph\\n\");\r\n\r\n\t\t\t\t\t\tif (g.isNeighbor(D,A)) {\r\n\t\t\t\t\t\t\t// we have a C4 = a-b-c-d-a\r\n\t\t\t\t\t\t\t// delete any two edges\r\n\r\n\t\t\t\t\t\t\tg.removeEdge(g.findEdge(A, B));\r\n\r\n\t\t\t\t\t\t\tg.removeEdge(g.findEdge(B, C));\r\n\t\t\t\t\t\t\tif(QuasiThresholdDeletion(g,k-2) == true) return true;\r\n\t\t\t\t\t\t\tg.addEdge(\"mar-\"+B+\"-\"+C, B,C);\r\n\r\n\t\t\t\t\t\t\tg.removeEdge(g.findEdge(C, D));\r\n\t\t\t\t\t\t\tif(QuasiThresholdDeletion(g,k-2) == true) return true;\r\n\t\t\t\t\t\t\tg.addEdge(\"mar-\"+C+\"-\"+D, C,D);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tg.removeEdge(g.findEdge(D, A));\r\n\t\t\t\t\t\t\tif(QuasiThresholdDeletion(g,k-2) == true) return true;\r\n\r\n\t\t\t\t\t\t\tg.addEdge(\"mar-\"+A+\"-\"+B, A,B);\r\n\t\t\t\t\t\t\t// all cases with AB deleted are done. AD is still deleted\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tg.removeEdge(g.findEdge(B, C));\r\n\t\t\t\t\t\t\tif(QuasiThresholdDeletion(g,k-2) == true) return true;\r\n\t\t\t\t\t\t\tg.addEdge(\"mar-\"+B+\"-\"+C, B,C);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tg.removeEdge(g.findEdge(C, D));\r\n\t\t\t\t\t\t\tif(QuasiThresholdDeletion(g,k-2) == true) return true;\r\n\r\n\t\t\t\t\t\t\t// all cases with AB deleted or AD deleted are done\r\n\t\t\t\t\t\t\t// at this point, CD and AD are still deleted\r\n\t\t\t\t\t\t\t// only need to try BC and CD together deleted.\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tg.addEdge(\"mar-\"+A+\"-\"+D, A,D);\r\n\t\t\t\t\t\t\tg.removeEdge(g.findEdge(B, C));\r\n\t\t\t\t\t\t\tif(QuasiThresholdDeletion(g,k-2) == true) return true;\r\n\r\n\t\t\t\t\t\t\tg.addEdge(\"mar-\"+B+\"-\"+C, B,C);\r\n\t\t\t\t\t\t\tg.addEdge(\"mar-\"+C+\"-\"+D, C,D);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t// this case says:\r\n\t\t\t\t\t\t\t// else D is NOT adjacent to A. Then we have P4=abcd\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tg.removeEdge(g.findEdge(A, B));\r\n\t\t\t\t\t\t\tif(QuasiThresholdDeletion(g,k-1) == true) return true;\r\n\t\t\t\t\t\t\tg.addEdge(\"mar-\"+A+\"-\"+B, A,B);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tg.removeEdge(g.findEdge(B, C));\r\n\t\t\t\t\t\t\tif(QuasiThresholdDeletion(g,k-1) == true) return true;\r\n\t\t\t\t\t\t\tg.addEdge(\"mar-\"+B+\"-\"+C, B,C);\r\n\t\r\n\t\t\t\t\t\t\tg.removeEdge(g.findEdge(C, D));\r\n\t\t\t\t\t\t\tif(QuasiThresholdDeletion(g,k-1) == true) return true;\r\n\t\t\t\t\t\t\tg.addEdge(\"mar-\"+C+\"-\"+D, C,D);\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t} // end d.hasNext()\r\n\t\t\t\t} // end c.hasNext()\r\n\t\t\t} // end b.hasNext() \r\n\t\t} // end a.hasNext()\r\n\r\n\t\t// if we reached here, no P4 was found\r\n\t\tif (existsP4orC4 == false) {\r\n\t\t\t// arrived at a quasi-threshold graph since no P4 or C4 was found\r\n\t\t\tSystem.out.print(\"Edge deletion found with \" +k+ \" left to spare.\\n\");\r\n\t\t\tSystem.out.print(\"Resulting graph is \" + g);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\t// ...\r\n\t\tSystem.out.print(\"Critical Error. No P_4 or C_4 found in a non-quasi-threshold graph.\\n\");\r\n\t\treturn false;\r\n\r\n\t\t\r\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\tprivate static void deleteTagInstances(PersistenceManager pm, Key k) {\r\n\t\tfinal Query q = pm.newQuery(Dish.class);\r\n\t\tq.setFilter(\"tags.contains(:tagKey)\");\r\n\t\tfinal List<Dish> dishes = (List<Dish>) q.execute(k);\r\n\r\n\t\tfor (Dish d : dishes) {\r\n\t\t\td.removeTag(k);\r\n\t\t\tpm.makePersistent(d);\r\n\t\t}\r\n\t}", "public void markIpAddress2Delete() throws JNCException {\n markLeafDelete(\"ipAddress2\");\n }", "public void markIpAddress2Delete() throws JNCException {\n markLeafDelete(\"ipAddress2\");\n }", "public void markVlanTag2Delete() throws JNCException {\n markLeafDelete(\"vlanTag2\");\n }", "private Node delete(Order ord2) {\n\t\treturn null;\n\t}", "public void deleteSamSyndicator() {\r\n deletePublisher(TckPublisher.getSamPublisherId());\r\n }", "@Override\n\tpublic void RemoverCupons(EntidadeDominio entidade) throws SQLException {\n\t\t\n\t}", "public void removeN(K k){\n root = removeVn(root, k);\n deleting = false;\n }", "public void delete(DNA key){\n if(this.debug)\n System.out.println(\"ExtHash::delete >> eliminando cadena: \" + key.toString() + \", hashCode: \" + key.hashCode());\n\n Node actual_node = this.getReference(key);\n if(this.debug)\n System.out.println(\"ExtHash::delete >> altura del nodo: \" + actual_node.getAltura());\n\n int reference_page = actual_node.getReference();\n ArrayList<Integer> content = this.fm.read(reference_page); this.in_counter++;\n\n int last_page = reference_page, last_chain = 0;\n ArrayList<Integer> last_content = content, search_content;\n\n // last_block: referencia al ultimo bloque.\n // search_block: referencia al bloque con el elemento buscado.\n int last_block = reference_page, search_block = -1, search_pos = -1;\n int total_elements = 0, altura = actual_node.getAltura();\n\n while(true) {\n if(this.debug)\n System.out.println(\"ExtHash::delete >> referencia a pagina: \" + last_page);\n\n if(this.debug) {\n System.out.println(\"ExtHash::delete >> contenido de la pagina:\");\n for(int i=0; i<last_content.size(); i++)\n System.out.println(\" \" + last_content.get(i));\n }\n\n total_elements += last_content.get(0);\n if(search_block == -1) {\n for (int i = 1; i <= last_content.get(0); i++) {\n if (last_content.get(i) == key.hashCode()) {\n if(this.debug)\n System.out.println(\"ExtHash::delete >> cadena \" + key.hashCode() + \" encontrada\");\n search_pos = i;\n search_block = last_page;\n total_elements--;\n total_in--;\n break;\n }\n }\n }\n\n if(last_content.get(0) != 0) {\n last_block = last_page;\n last_chain = last_content.get(last_content.get(0));\n }\n\n if(last_content.get(0) != B - 2) {\n break;\n }\n\n if(this.debug)\n System.out.println(\"ExtHash::delete >> acceciendo a siguiente pagina\");\n\n last_page = last_content.get(B-1);\n last_content = this.fm.read(last_page); this.in_counter++;\n }\n\n ArrayList<Integer> new_content = new ArrayList<>();\n if(search_block != -1) {\n // se encontro el elemento buscado.\n // search_block: referencia al bloque que contiene la buscado.\n // last_block: referencia al ultimo bloque de la lista enlazada.\n\n search_content = this.fm.read(search_block); this.in_counter++;\n last_content = this.fm.read(last_block); this.in_counter++;\n\n if(search_block == last_block) {\n // elemento buscado estaba en la ultima pagina de la lista enlazada.\n new_content.add(search_content.get(0) - 1);\n for(int i=1; i<=search_content.get(0); i++) {\n if(i != search_pos)\n new_content.add(search_content.get(i));\n\n }\n if(search_content.get(0) == B-2)\n total_active_block--;\n\n } else {\n // elemento buscado no esta en la ultima pagina de la lista enlazada.\n new_content.add(search_content.get(0));\n for(int i=1; i<=search_content.get(0); i++) {\n if(i != search_pos)\n new_content.add(search_content.get(i));\n else\n new_content.add(last_chain);\n\n }\n new_content.add(search_content.get(B - 1));\n\n ArrayList<Integer> new_last_content = new ArrayList<>();\n new_last_content.add(last_content.get(0) - 1);\n for(int i=1; i<last_content.get(0); i++) {\n new_last_content.add(last_content.get(i));\n\n }\n if(last_content.get(0) == B-2)\n total_active_block--;\n\n this.fm.write(new_last_content, last_block); this.out_counter++;\n\n }\n this.fm.write(new_content, search_block); this.out_counter++;\n }\n\n // la pagina contiene pocos elementos, y no es parte del primer nodo\n\n if(total_elements < (B - 2) / 2 && search_block != -1 && 0 < altura){\n if(this.debug)\n System.out.println(\"ExtHash::delete >> limite de pagina, iniciando compresion\");\n this.compress(actual_node);\n }\n\n }", "public void deleteEntity2(Entity2 entity2) throws DaoException;", "public void supprimerPCPosition(int position) {\n if (position == 1) // if deleted computer is at the start\n {\n if (taille == 1) {\n start = null;\n end = null;\n taille = 0;\n return;\n }\n start = start.getLinkNext();\n start.setLinkPrev(end);\n end.setLinkNext(start);\n taille--;\n return;\n }\n if (position == taille) // If deleted computer is at the end\n {\n end = end.getLinkPrevious();\n end.setLinkNext(start);\n start.setLinkPrev(end);\n taille--;\n }\n\n Computer Computer = start.getLinkNext();\n for (int i = 2; i <= taille; i++) {\n if (i == position) {\n Computer p = Computer.getLinkPrevious();\n Computer n = Computer.getLinkNext();\n\n p.setLinkNext(n);\n n.setLinkPrev(p);\n taille--;\n return;\n }\n Computer = Computer.getLinkNext();\n }\n }", "private void step4(Node node) {\n\t\tHashMap<String, ArrayList<String>> svn = node.svN;\r\n\t\tHashMap<String, ArrayList<String>> cn = node.cN;\r\n\t\tArrayList<String> keys = node.keysN;\r\n\t\tString c = checksubset(cn);\r\n\r\n\t\tif (c != null) {\r\n\t\t\tfor (int i = 0; i < keys.size(); i++) {\r\n\t\t\t\tif (svn.get(keys.get(i)).contains(c)) {\r\n\t\t\t\t\tsvn.get(keys.get(i)).remove(c);\r\n\t\t\t\t\tif (svn.get(keys.get(i)).size() <= 1) {\r\n\t\t\t\t\t\tsvn.remove(keys.get(i));\r\n\t\t\t\t\t\tkeys.remove(i);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcn.remove(c);\r\n\t\t}\r\n\t}", "void deleteUnusedTags();", "public void deleteMulti(String ids);", "public void mergeDisjoint(UFPartition<T> p2){\r\n\t\tp2 = p2.clone();\r\n\t\tfor(Node<T> n : p2.nodes.values()) {\r\n\t\t\tassert !nodes.containsKey(n.getE());\r\n\t\t\tnodes.put(n.getE(), new Node<T>(n.getE()));\r\n\t\t}\r\n\t\tfor(Node<T> n : p2.nodes.values()) {\r\n\t\t\tNode<T> newNode = getNode(n.getE());\r\n\t\t\tNode<T> newNodeRoot = getNode(n.getRoot().getE());\r\n\t\t\tnewNode.setParent(newNodeRoot);\r\n\t\t\tnodes.put(n.getE(), new Node<T>(n.getE()));\r\n\t\t}\r\n\t\t\r\n\t}", "public abstract void deletedWords(long ms, int n);", "public static int deleteS(Set<String> noInduks) throws SQLException{\r\n return DBSR.deleteKasirOsByString(tableName, noIndukColName, noInduks);\r\n }", "public void markNextHopIpv4GwAddr2Delete() throws JNCException {\n markLeafDelete(\"nextHopIpv4GwAddr2\");\n }", "private void clean() {\n //use iterator\n Iterator<Long> it = nodes.keySet().iterator();\n while (it.hasNext()) {\n Long node = it.next();\n if (nodes.get(node).adjs.isEmpty()) {\n it.remove();\n }\n }\n }", "public abstract void deletedConcepts(long ms, int n);", "public static void generate_deletion(char[] sequence, int nb_deletion, HashSet<String> hash, int offset){\n for(int c=offset;c<sequence.length;c++){\n char[] new_seq = new char[sequence.length-1];\n int newseq_index=0;\n // copy the char array, applying the appropriate modifications\n for(int i=0;i<sequence.length;i++){\n if(i==c) continue;\n new_seq[newseq_index] = sequence[i];\n newseq_index++;\n }\n hash.add(new String(new_seq));\n if(nb_deletion > 1){\n generate_deletion(new_seq,nb_deletion-1,hash,offset);\n }\n }\n }", "private void eliminarDisparos(int num){\n\t\t\n\t\tnumDisparos--;\n\t\tfor(int i=num;i<numDisparos;i++)\n\t\t\tdisparos[i]=disparos[i+1];\n\t\t\tdisparos[numDisparos]=null;\n\t}", "public void deleteAtPos(int pos)\n\n { \n\n if (pos == 1) \n\n {\n\n if (size == 1)\n\n {\n\n start = null;\n\n end = null;\n\n size = 0;\n\n return; \n\n }\n\n start = start.getLinkNext();\n\n start.setLinkPrev(null);\n\n size--; \n\n return ;\n\n }\n\n if (pos == size)\n\n {\n\n end = end.getLinkPrev();\n\n end.setLinkNext(null);\n\n size-- ;\n\n }\n\n Node ptr = start.getLinkNext();\n\n for (int i = 2; i <= size; i++)\n\n {\n\n if (i == pos)\n\n {\n\n Node p = ptr.getLinkPrev();\n\n Node n = ptr.getLinkNext();\n\n \n\n p.setLinkNext(n);\n\n n.setLinkPrev(p);\n\n size-- ;\n\n return;\n\n }\n\n ptr = ptr.getLinkNext();\n\n } \n\n }", "public void eliminarNovedadesRegistradas(Integer codigoCompania, Collection<Long> codigosProcesoLogistico) throws SICException;", "public void deleteAtPos(int pos)\n { \n if (pos == 1)\n {\n if (size == 1)\n {\n start = null;\n end = null;\n size = 0;\n return;\n }\n start = start.getListNext();\n start.setListPrev(null);\n size--;\n return ;\n }\n if (pos == size)\n {\n end = end.getListPrev();\n end.setListNext(null);\n size-- ;\n }\n List ptr = start.getListNext();\n for (int i = 2; i <= size; i++)\n {\n if (i == pos)\n {\n List p = ptr.getListPrev();\n List n = ptr.getListNext();\n p.setListNext(n);\n n.setListPrev(p);\n size-- ;\n return;\n }\n ptr = ptr.getListNext();\n } \n }", "public void removeEdge(int node1, int node2)\n{\n\tif(getNodes().containsKey(node1) && getNodes().containsKey(node2))\n\t{\n\t\tNode n1 = (Node) getNodes().get(node1);\n\t\tNode n2 = (Node) getNodes().get(node2);\n\n\t\tif(n1.getEdgesOf().containsKey(node2))\n\t\t{\n\t\t\tedge_size--;\n\t\t\tmc++;\n\t\t\tn1.getEdgesOf().remove(node2);\n\n\t\t}\n\t\tif(n2.getEdgesOf().containsKey(node1))\n\t\t{\n\t\t\tedge_size--;\n\t\t\tmc++;\n\t\t\tn2.getEdgesOf().remove(node1);\n\n\t\t}\n\t\t\n\t\telse {\n\t\t\t\n\t\t\t//System.out.println(\"Edge doesnt exist\");\n\t\t}\n\t}\n\telse {\n\t\treturn;\n\t\t//System.out.println(\"src or dest doesnt exist\");\n\t}\n}", "public void eliminarBodegaActual(){\n Nodo_bodega_actual.obtenerAnterior().definirSiguiente(Nodo_bodega_actual.obtenerSiguiente());\n if(Nodo_bodega_actual.obtenerSiguiente() != null){\n Nodo_bodega_actual.obtenerSiguiente().definirAnterior(Nodo_bodega_actual.obtenerAnterior());\n } \n }", "public final void removeRange(int i, int i2) {\n a();\n if (i2 >= i) {\n long[] jArr = this.zzbod;\n System.arraycopy(jArr, i2, jArr, i, this.size - i2);\n this.size -= i2 - i;\n this.modCount++;\n return;\n }\n throw new IndexOutOfBoundsException(\"toIndex < fromIndex\");\n }", "public void removeDups(Instance instance) {\n ArrayList<Instance> toRemove = backRelation.get(instance);\n if(toRemove == null)\n return;\n for (Instance remove : toRemove) {\n relatedInstances.get(remove).remove(instance);\n toLink.remove(remove.getId());\n }\n backRelation.remove(instance);\n\n }", "public void remove() {\n\n\t\t\tsuprimirNodo(anterior);\n\n\t\t}", "@Test public void deletePentagonalPyramid2Test() {\n PentagonalPyramid[] pArray = new PentagonalPyramid[20];\n pArray[0] = new PentagonalPyramid(\"PP1\", 1, 2);\n pArray[1] = new PentagonalPyramid(\"PP1\", 2, 3);\n pArray[2] = new PentagonalPyramid(\"PP1\", 3, 4);\n PentagonalPyramidList2 pList2 = new PentagonalPyramidList2(\"Test List\", \n pArray, 3);\n pList2.deletePentagonalPyramid(\"ss\");\n Assert.assertEquals(\"Test\", pArray[2], pArray[2]);\n }", "void deleteChains() {\n\t\tif (!params.isDebug()) {\n\t\t\tfor (File deleteCandidate : toDelete) {\n\t\t\t\tdeleteCandidate.delete();\n\t\t\t\t\n\t\t\t\ttry (DirectoryStream<Path> directoryStream = Files.newDirectoryStream(deleteCandidate.toPath())) {\n\t\t\t\t\tfor (Path path : directoryStream) {\n\t\t\t\t\t\tif (!path.getFileName().toString().endsWith(\"_SCWRLed.pdb\")) {\n\t\t\t\t\t\t\tpath.toFile().delete();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch (IOException ex) {\n\t\t\t\t\tex.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static Set<Doc> not(Set<Doc> set1,Set<Doc> corpus) {\r\n \t\tif(set1 == null)\r\n \t\t\tset1 = new TreeSet<Doc>();\r\n \t\tTreeSet<Doc> result = new TreeSet<Doc>(corpus);\r\n \t\tresult.removeAll(set1);\r\n \t\treturn result;\r\n \t}", "public void delContextNodes();", "void compareDeletion();", "public void delRelations(XDI3Segment arcXri);", "public TagRemover(String keyList, String keyPrefixList) {\n\t\tkeysToDrop = new HashSet<String>();\n\t\tString[] keys = keyList.split(\",\");\n\t\tfor (int i = 0; i < keys.length; i++) {\n\t\t\tkeysToDrop.add(keys[i]);\n\t\t}\n\t\tkeyPrefixesToDrop = keyPrefixList.split(\",\");\n\t\tif (keyPrefixesToDrop[0] == \"\") {\n\t\t\tkeyPrefixesToDrop = new String[] {};\n\t\t}\n\t}", "public void eliminar(ListaConArreglo nodosMaquina){\n\t\tmodAdmin.eliminar( nodosMaquina);\n\t\tif(!ModAdmin.existe){\n\t\t\tSystem.err.println(\"El dominio indicado no existe en la base\");\n\t\t}\n\t\tModAdmin.existe=false;\n\t}", "public void delete(String entity_name, String key) {\r\n \r\n Entity entity = getEntity(entity_name);\r\n int RF = entity.RF;\r\n\r\n //For each node\r\n for ( int i_node =0 ; i_node < numar_noduri && RF > 0; i_node++) {\r\n\r\n int i_instance = 0;\r\n while (i_instance < noduri.get(i_node).dimensiune && RF > 0) {\r\n\r\n Instance instance = noduri.get(i_node).instances.get(i_instance);\r\n \r\n if (instance.entity_name.equals(entity_name)\r\n && String.valueOf(instance.values.get(0)).equals(key)) {\r\n\r\n noduri.get(i_node).instances.remove(i_instance);\r\n noduri.get(i_node).dimensiune--;\r\n RF--;\r\n i_instance--;\r\n }\r\n i_instance++;\r\n }\r\n }\r\n if (RF > 0) {\r\n System.out.println(\"NO INSTANCE TO DELETE\");\r\n }\r\n }", "void deleteMulti(String[] pids);", "public static void scriptDelete() {\n List<BeverageEntity> beverages = (List<BeverageEntity>) adminFacade.getAllBeverages();\n for (int i = 0; i < beverages.size(); i++) {\n System.out.println(\"delete : \" + beverages.get(i));\n adminFacade.removeBeverage(beverages.get(i));\n }\n List<DecorationEntity> decos = (List<DecorationEntity>) adminFacade.getAllDecorations();\n for (int i = 0; i < decos.size(); i++) {\n System.out.println(\"delete : \" + decos.get(i));\n adminFacade.removeDecoration(decos.get(i));\n }\n\n /* Check that there isn't any other cocktails, and delete remaining */\n List<CocktailEntity> cocktails = (List<CocktailEntity>) adminFacade.getAllCocktails();\n if (cocktails.size() > 0) {\n System.err.println(\"Les cocktails n'ont pas été tous supprimés... \"\n + cocktails.size() + \" cocktails restants :\");\n }\n for (int i = 0; i < cocktails.size(); i++) {\n CocktailEntity cocktail = adminFacade.getCocktailFull(cocktails.get(i));\n System.err.println(cocktail.getName() + \" : \"\n + cocktail.getDeliverables());\n adminFacade.removeCocktail(cocktail);\n }\n\n /* Remove client accounts */\n List<ClientAccountEntity> clients = (List<ClientAccountEntity>) adminFacade.getAllClients();\n for (int i = 0; i < clients.size(); i++) {\n adminFacade.removeClient(clients.get(i));\n }\n\n /* Remove addresses */\n List<AddressEntity> addresses = (List<AddressEntity>) adminFacade.getAllAddresses();\n for (int i = 0; i < addresses.size(); i++) {\n adminFacade.removeAddress(addresses.get(i));\n }\n\n /* TODO :\n * * Remove orders\n */\n }", "@Override\r\n\tpublic void deleteBySSO(String sso) {\n\t\t\r\n\t}", "@Override\n public int delete( J34SiscomexPaises j34SiscomexPaises ) {\n return super.doDelete(j34SiscomexPaises);\n }", "public void unDistributeMyKeys() {\n unDistributeKeys(readNodeEntries());\n }", "private static void task3333(int nUMS, SplayTree<Integer> j) {\n\t\t// TODO Auto-generated method stub\n\t\tdouble search_start = 0, search_end = 0;\n\n\t System.out.println(\"SPLAY DELETION Started...\");\n\t search_start = System.nanoTime();\n\t int count = 0;\n\t \t\n\t for (int z = 0; z < nUMS; z++) {\n\t \tint checker= GenerateInt.generateNumber();\n//\t \tSystem.out.println(GenerateStrings.getAlphaNumericString(limit));\n\t if (j.contains(checker)) {\n\t j.remove(checker);\n//\t System.out.println(\"INT Removed\");\n\t count++;\n\t }\n\t }\n\t search_end = System.nanoTime();\n\t System.out.println(\"Average time for each deletion: \" + (search_end - search_start) / nUMS + \" nanoseconds\");\n\t \n\t System.out.println(\"TOTAL REMOVES\" + count);\n\n\t\t\n\t}", "public MyStringBuilder2 delete(int start, int end)\n\t{\n\t\tif(start < 0 || end <= start || start > length) {\n\t\t\t//do nothing\n\t\t\treturn this;\n\t\t} else {\n\t\t\t//checks to see if the end is greater than length\n\t\t\tif(end >= length || end == (length - 1)) {\n\t\t\t\tend = (length);\n\t\t\t\tif(start > 0) {\n\t\t\t\t\tlastC = getCNodeAt(start - 1, firstC);\n\t\t\t\t} else {\n\t\t\t\t\tlastC = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//checks for first delete\n\t\t\tif(start == 0) {\n\t\t\t\tCNode temp = getCNodeAt(end - 1, firstC);\n\t\t\t\tfirstC = temp.next;\n\t\t\t\tlength = length - end;\n\t\t\t\treturn this;\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\tCNode temp = getCNodeAt(end - 1, firstC);\n\t\t\t\trecursiveDelete(end - start, start, 1);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t}", "public static void deleteSpliceDonorSite(String spliceDonorSite) {\n\t\tSequenceUtil.spliceDonorSites.remove(spliceDonorSite);\n\t}", "public void delRelations();", "public void union(String first, String second) {\n\t\t\n\t\tString firstRepresentative = find(first);\n\t\tString secondRepresentative = find(second);\n\t\t\n\t\tSet<String> firstSet = null;\n\t\tSet<String> secondSet = null;\n\t\t\n\t\t//look for the sets containing the first and second elements \n\t\tfor(int i = 0; i < disjointSet.size(); i++) {\n\t\t\tMap<String, Set<String>> map = disjointSet.get(i);\n\t\t\tif(map.containsKey(firstRepresentative)) {\n\t\t\t\tfirstSet = map.get(firstRepresentative);\n\t\t\t}\n\t\t\tif(map.containsKey(secondRepresentative)) {\n\t\t\t\tsecondSet = map.get(secondRepresentative);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(firstSet != null && secondSet != null) {\n\t\t\t\n\t\t\t//merge the two sets\n\t\t\tfirstSet.addAll(secondSet);\n\t\t\t\n\t\t\t//select a representative and delete the set already merged \n\t\t\tfor(int i = 0; i < disjointSet.size(); i++) {\n\t\t\t\tMap<String, Set<String>> map = disjointSet.get(i);\n\t\t\t\tif(map.containsKey(firstRepresentative)) {\n\t\t\t\t\tmap.put(firstRepresentative, firstSet);\n\t\t\t\t}\n\t\t\t\telse if(map.containsKey(secondRepresentative)) {\n\t\t\t\t\tmap.remove(secondRepresentative);\n\t\t\t\t\tdisjointSet.remove(i);\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\t\n\t}", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n DefaultNucleotideCodec defaultNucleotideCodec0 = DefaultNucleotideCodec.INSTANCE;\n DefaultNucleotideCodec defaultNucleotideCodec1 = DefaultNucleotideCodec.INSTANCE;\n DefaultNucleotideCodec defaultNucleotideCodec2 = DefaultNucleotideCodec.INSTANCE;\n Nucleotide nucleotide0 = Nucleotide.Pyrimidine;\n Set<Nucleotide> set0 = nucleotide0.getBasesFor();\n byte[] byteArray0 = defaultNucleotideCodec1.encode((Collection<Nucleotide>) set0);\n Nucleotide nucleotide1 = defaultNucleotideCodec0.decode(byteArray0, 0L);\n assertEquals(Nucleotide.Cytosine, nucleotide1);\n \n defaultNucleotideCodec1.getNumberOfGapsUntil(byteArray0, 1717986918);\n DefaultNucleotideCodec defaultNucleotideCodec3 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec3.getUngappedLength(byteArray0);\n DefaultNucleotideCodec defaultNucleotideCodec4 = DefaultNucleotideCodec.INSTANCE;\n int int0 = defaultNucleotideCodec4.getUngappedOffsetFor(byteArray0, (-1209));\n assertEquals((-1209), int0);\n \n int int1 = defaultNucleotideCodec2.getGappedOffsetFor(byteArray0, (-1209));\n assertEquals(2, int1);\n \n defaultNucleotideCodec2.getGappedOffsetFor(byteArray0, 1717986918);\n DefaultNucleotideCodec defaultNucleotideCodec5 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec5.decodedLengthOf(byteArray0);\n defaultNucleotideCodec0.decodedLengthOf(byteArray0);\n DefaultNucleotideCodec defaultNucleotideCodec6 = DefaultNucleotideCodec.INSTANCE;\n DefaultNucleotideCodec defaultNucleotideCodec7 = DefaultNucleotideCodec.INSTANCE;\n int int2 = defaultNucleotideCodec7.getGappedOffsetFor(byteArray0, 0);\n int int3 = defaultNucleotideCodec6.getNumberOfGapsUntil(byteArray0, 5);\n assertTrue(int3 == int2);\n assertArrayEquals(new byte[] {(byte)0, (byte)0, (byte)0, (byte)2, (byte) (-34)}, byteArray0);\n assertEquals(0, int3);\n }", "@After\n public void removeEverything() {\n\n ds.delete(uri1);\n ds.delete(uri2);\n ds.delete(uri3);\n\n System.out.println(\"\");\n }", "public void supprimerImproductifs(){\n grammaireCleaner.nettoyNonProdGramm();\n setChanged();\n notifyObservers(\"2\");\n }", "public void markNextHopIpv6GwAddr2Delete() throws JNCException {\n markLeafDelete(\"nextHopIpv6GwAddr2\");\n }", "public int removeDuplicateWords (String [] list1, int count1, String [] list2){\n \n String lValue = list1[0];\n list2[0] = lValue;\n int count = 1;\n \n //Checks all words if the current value matches and stores only unique values\n for (int i = 0; i < count1; i++){\n String cValue = list1[i];\n if (!cValue.equals(lValue)){\n list2[count] = cValue;\n lValue = cValue;\n count++;\n }\n }//End for loop\n \n return count;\n \n }", "@Test\n public void removeEqualWordsTest(){\n BotController botController = new BotController(clueService);\n List<Synonym> synonymsOfDiamond = botController.getSimilarWords(\"diamond\");\n //assume diamonds get return as synonym of diamond\n Synonym diamondsSynonym = new Synonym();\n diamondsSynonym.setWord(\"diamonds\");\n diamondsSynonym.setScore(1000);\n synonymsOfDiamond.add(diamondsSynonym);\n\n List<String> synonymsBeforeRemoving = new ArrayList<>();\n for(Synonym synonym: synonymsOfDiamond){\n synonymsBeforeRemoving.add(synonym.getWord());\n }\n synonymsOfDiamond = botController.removeEqualWords(synonymsOfDiamond,\"diamond\");\n List<String> synonymsAfterRemoving = new ArrayList<>();\n for(Synonym synonym: synonymsOfDiamond){\n synonymsAfterRemoving.add(synonym.getWord());\n }\n\n assertTrue(synonymsBeforeRemoving.contains(\"diamonds\"));\n assertFalse(synonymsAfterRemoving.contains(\"diamonds\"));\n\n\n }", "public static String delete(String str1,String str2){\n\t\tString newOne=str1.replace(str2, \"\");\n\t\treturn newOne;\n\t}", "private static Set symmetricSetDifference (Set<Integer> set1, Set<Integer> set2)\n {\n Set<Integer> skæringspunktet = new HashSet<Integer>(set1);\n\n // Holder på set2 også\n skæringspunktet.retainAll(set2);\n\n // Set1 fjerner alt fra Settet\n set1.removeAll(skæringspunktet);\n // Set1 fjerner alt fra Settet\n set2.removeAll(skæringspunktet);\n\n // Tilføjer alt fra set2 til set1\n set1.addAll(set2);\n\n // Returnerer set1\n return set1;\n }", "void deleteMin() {\n delete(keys[0]);\n }", "public void borrarQuesos(ArrayList<Queso> quesosV)\r\n\t{\n\t\tint limite = quesos.size();\r\n\t\t\r\n\t\tfor (int i = 0; i < limite; i++) {\r\n\t\t\tfor (int j = 0; j < quesosV.size(); j++) {\r\n\t\t\t\tif(quesos.get(i).getId().equalsIgnoreCase(quesosV.get(j).getId()))\r\n\t\t\t\t{\r\n\t\t\t\t\tquesos.remove(i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "void removeNodes(List<CyNode> nodes);", "@Override\n\tpublic Integer DeleteBoleto(int idTck2) throws Exception {\n\t\treturn null;\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(\"LinkedList 1: \");\r\n\t\tListNode<Integer> l1=new ListNode<Integer>(0);\r\n\t\tListNode<Integer> l2=new ListNode<Integer>(1);\r\n\t\tListNode<Integer> l3=new ListNode<Integer>(3);\r\n\t\tListNode<Integer> l4=new ListNode<Integer>(5);\r\n\t\tListNode<Integer> l5=new ListNode<Integer>(7);\r\n\t\tListNode<Integer> l6=new ListNode<Integer>(22);\r\n\t\tl1.next=l2;l2.next=l3;l3.next=l4;l4.next=l5;l5.next=l6;\r\n\t\tdisplay(l1);\r\n\t\tint pos=5;\r\n\t\tremoveKthLastNode(l1,pos);\r\n\t\tSystem.out.println(\"\\nAfter Deletion : \");\r\n\t\tdisplay(l1);\r\n\t\t\r\n\r\n\t}", "SpCharInSeq delete(Integer spcharinseqId);", "public void deleteSpace(){\n\t\t\t//TODO: need to pop-up a confirmation dialogue\n\t\t/*try {\n\t\t\tthis.muc.destroy(null, null);\n\t\t} catch (XMPPException e) {\n\t\t\tLog.d(TAG, \"Unable to destroy Space!\");\n\t\t}*/\n\t\t\tCollection<User> users = this.space.getAllParticipants().values();\n\t\t\tfor (User u : users) {\n\t\t\t\ttry {\n\t\t\t\t\tif(!u.getUsername().equals(MainApplication.user_primary.getUsername()))\n\t\t\t\t\t\tthis.space.getKickoutController().kickoutUser(u, Network.DEFAULT_KICKOUT);\n\t\t\t\t} catch (XMPPException 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\tthis.space.getMUC().leave();\n\t\t\t//end experiment \n\t\t\t\n\t\t\tif(space.equals(Space.getMainSpace())){\n\t\t\t\tSpace.setMainSpace(null);\n\t\t\t}\n\t}", "public abstract void disconnectInDirection(N n1, N n2);", "@Override\r\n\tpublic void delete(Iterable<? extends Candidat> entities) {\n\r\n\t}", "public void borrar(DbConnection connection, int id,int id2)\n\t\t\tthrows SQLException, ClassNotFoundException {\n\t\ttry {\n\t\t\tStatement statement = connection.getConnection().createStatement();\n\t\t\tstatement.executeUpdate(\"DELETE FROM jugadorxjugador WHERE id = \" + id + \" AND id2 = \" + id2);\n\t\t\tstatement.close();\n//\t\t\tconnection.close();\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"Error\" + e);\n\t\t}\n\t}", "@Test(timeout = 4000)\n public void test11() throws Throwable {\n DefaultNucleotideCodec defaultNucleotideCodec0 = DefaultNucleotideCodec.valueOf(\"INSTANCE\");\n byte[] byteArray0 = new byte[7];\n byteArray0[0] = (byte) (-50);\n byteArray0[1] = (byte) (-38);\n DefaultNucleotideCodec defaultNucleotideCodec1 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec1.decodedLengthOf(byteArray0);\n defaultNucleotideCodec0.decodedLengthOf(byteArray0);\n DefaultNucleotideCodec defaultNucleotideCodec2 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec2.getUngappedLength(byteArray0);\n Nucleotide nucleotide0 = Nucleotide.NotGuanine;\n Set<Nucleotide> set0 = nucleotide0.getBasesFor();\n byte[] byteArray1 = defaultNucleotideCodec0.encode((Collection<Nucleotide>) set0);\n Nucleotide nucleotide1 = defaultNucleotideCodec0.decode(byteArray0, 0L);\n assertEquals(Nucleotide.Gap, nucleotide1);\n \n defaultNucleotideCodec0.getNumberOfGapsUntil(byteArray0, 1717986918);\n long long0 = defaultNucleotideCodec1.getUngappedLength(byteArray0);\n assertEquals((-824573952L), long0);\n \n defaultNucleotideCodec1.getUngappedOffsetFor(byteArray1, (-651));\n defaultNucleotideCodec2.getGappedOffsetFor(byteArray0, (byte) (-38));\n defaultNucleotideCodec0.getGappedOffsetFor(byteArray0, (byte) (-50));\n DefaultNucleotideCodec defaultNucleotideCodec3 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec3.decodedLengthOf(byteArray1);\n defaultNucleotideCodec3.decodedLengthOf(byteArray1);\n DefaultNucleotideCodec defaultNucleotideCodec4 = DefaultNucleotideCodec.INSTANCE;\n int int0 = defaultNucleotideCodec4.getGappedOffsetFor(byteArray1, (byte) (-38));\n assertEquals(3, int0);\n \n DefaultNucleotideCodec defaultNucleotideCodec5 = DefaultNucleotideCodec.INSTANCE;\n int int1 = defaultNucleotideCodec5.getNumberOfGapsUntil(byteArray1, (byte) (-38));\n assertArrayEquals(new byte[] {(byte)0, (byte)0, (byte)0, (byte)3, (byte)29, (byte) (-32)}, byteArray1);\n assertEquals(0, int1);\n }", "private void cleanMnemonicsConflict() {\n Enumeration enumer = mnemonicConflict.keys();\n \n while(enumer.hasMoreElements()) {\n String key = (String)enumer.nextElement();\n HashSet hs = (HashSet)mnemonicConflict.get(key);\n if(hs.size()==1)\n mnemonicConflict.remove(key);\n }\n \n }", "private static void task03333(int nUMS, SplayTree<Integer> j) {\n\n\t\tlong start = System.nanoTime();\n\t System.out.println( \"Deletion in the table...\" );\n\t int count=0;\n\t\tfor( int i = 1; i <= nUMS; i++)\n\t\t{\n\t\t\tif(j.isEmpty() == false)\n\t\t\t{\n\t\t\t\n\t\t\tj.remove(i);\n\t\t\t\n\t\t\t}\n//\t\t\tSystem.out.println(GenerateInt.generateNumber());\n\n\t\t}\n\t\tSystem.out.println(\"Total Size \" + count);\n\t\tSystem.out.println(\"Is it empty \" + j.isEmpty());\n\t\tlong end = System.nanoTime();;\n\t\tlong elapsedTime = end - start;\n\t\tSystem.out.println(elapsedTime + \" NanoSeconds\");\n\t\tSystem.out.println(\"Average Time \" + elapsedTime/nUMS);\n\t}", "private void clean() {\n Iterable<Long> v = vertices();\n Iterator<Long> iter = v.iterator();\n while (iter.hasNext()) {\n Long n = iter.next();\n if (world.get(n).adj.size() == 0) {\n iter.remove();\n }\n }\n }", "private void deleteFixup(Node<K, V> x) {\n\t\t\n\t}", "void dropcard()\n{\nfor (int i=0;i<hc.size()-1;i++)\n\t{\n\tif(hc.get(i)==1||hc.get(i)==2)\n\t\tcontinue;\n\telse if((((hc.get(i))-3)/4)==(((hc.get(i+1))-3)/4))\n\t\t{hc.remove(i);\n\t\thc.remove(i);\n\t\ti--;}\t\n\t}\n}", "public void removeEdge() {\n Graph GO = new Graph(nbOfVertex + 1);\n Value.clear();\n for (int i = 0; i < x.length; i++) {\n for (int j : x[i].getDomain()) {\n Value.add(j);\n if (MaxMatch[i] == Map.get(j)) {\n GO.addEdge(Map.get(j), i);\n } else {\n GO.addEdge(i, Map.get(j));\n }\n }\n }\n\n for (int i : V2) {\n for (int j : Value) {\n if (!V2.contains(j)) {\n GO.addEdge(i, j);\n }\n }\n }\n //System.out.println(\"GO : \");\n //System.out.println(GO);\n int[] map2Node = GO.findStrongConnectedComponent();\n //GO.printSCC();\n\n ArrayList<Integer>[] toRemove = new ArrayList[n];\n for (int i = 0; i < n; i++) {\n toRemove[i] = new ArrayList<Integer>();\n }\n for (int i = 0; i < n; i++) {\n for (int j : x[i].getDomain()) {\n ////System.out.println(i + \" \" + j);\n if (map2Node[i] != map2Node[Map.get(j)] && MaxMatch[i] != Map.get(j)) {\n toRemove[i].add(j);\n if (debug == 1) System.out.println(\"Remove arc : \" + i + \" => \" + j);\n }\n }\n }\n for (int i = 0; i < n; i++) {\n for (int j : toRemove[i]) {\n x[i].removeValue(j);\n }\n }\n }", "public void eliminarDiferenciasRegistradas(Integer codigoCompania, Collection<Long> codigosProcesoLogistico) throws SICException;", "@Override\n\tpublic void delete_from_DB() throws CouponSiteMsg\n\t{\n\t\t\n\t}", "private void removeNoMoreExistingOriginalNodes() {\n for (Node mirrorNode : mirrorGraph.nodes()) {\n if (!isPartOfMirrorEdge(mirrorNode) && !originalGraph.has(mirrorNode)) {\n mirrorGraph.remove(mirrorNode);\n }\n }\n }", "public void remove(String ids);", "void pairDown() {\n\n Set<String> ingredientsToRemove = new HashSet<String>();\n Set<String> allergensToRemove = new HashSet<String>();\n\n do {\n\n ingredientsToRemove.clear();\n allergensToRemove.clear();\n\n // Iterate the dishes.\n for (Dish dish : dishes) {\n \n // Iterate the allergens.\n for (String allergen : dish.allergenNames) {\n\n Set<String> ingredientsInAll = new HashSet<String>();\n\n // Iterate the ingredients.\n for (String ingredient : dish.ingredientNames) {\n\n boolean inAll = true;\n\n // Iterate the dishes.\n for (Dish iDish : dishes) {\n\n // Check if this dish has the allergen.\n if (!iDish.allergenNames.contains(allergen))\n continue;\n\n // Check if this dish has the ingredient.\n if (!iDish.ingredientNames.contains(ingredient)) {\n inAll = false;\n break;\n }\n }\n\n if (inAll) {\n \n // This ingredient is in all.\n // It's a candidate for removal. But are there others?\n ingredientsInAll.add(ingredient);\n }\n }\n\n // If there's only one ingredient in all of the dishes with this allergen\n // then the ingredient and allergen can be removed from the entire menu and we can start over.\n if (ingredientsInAll.size() == 1) {\n ingredientsToRemove.add((String)ingredientsInAll.toArray()[0]);\n allergensToRemove.add(allergen);\n\n // For part 2, store the allergen and the food that contains it.\n allergensToIngredients.put(allergen, (String)ingredientsInAll.toArray()[0]);\n \n if (!allAllergens.contains(allergen))\n allAllergens.add(allergen);\n }\n }\n }\n\n // Remove identified ingredients and allergens from the menu.\n for (Dish dish : dishes) {\n\n for (String ingredient : ingredientsToRemove)\n dish.ingredientNames.remove(ingredient);\n \n for (String allergen : allergensToRemove)\n dish.allergenNames.remove(allergen); \n }\n\n } while (ingredientsToRemove.size() > 0);\n }", "private void clean() {\n // TODO: Your code here.\n for (Long id : vertices()) {\n if (adj.get(id).size() == 1) {\n adj.remove(id);\n }\n }\n }", "public static void deletecou(String cno2) {\n\t\ttry {\n\t\t\tps = conn.prepareStatement(\"delete from course where Cno = ?\");\n\t\t\tps.setString(1, cno2);\n\t\t\tps.execute();\n\t\t\t\n\t\t\tJOptionPane.showMessageDialog(null, \"课程删除成功!\", \"提示消息\", JOptionPane.INFORMATION_MESSAGE);\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t\tJOptionPane.showMessageDialog(null, \"课程删除失败!\", \"提示消息\", JOptionPane.INFORMATION_MESSAGE);\n\t\t}\n\t}", "List<String> generateDeleteAllScript();", "@Override\r\n\tpublic boolean pdsdelete(int seq) {\n\t\treturn pdsdao.pdsdelete(seq);\r\n\t}", "public static void main(String[] args) {\n// link.deleteAtIndex(1);\n// System.out.println(link.get(1));\n\n ListNode l1 = new ListNode(3);\n l1.add(9).add(9).add(9).add(9).add(9).add(9).add(9).add(9).add(9);\n ListNode l2 = new ListNode(7);\n N445TwoNumSum2 su = new N445TwoNumSum2();\n su.addTwoNumbers(l1,l2);\n }", "public void removeExistingSnpLocations(SingleNucleotidePolymorphism snp) {\n\n // Get a list of locations currently linked to SNP\n Collection<Location> oldSnpLocations = snp.getLocations();\n\n if (oldSnpLocations != null && !oldSnpLocations.isEmpty()) {\n Set<Long> oldSnpLocationIds = new HashSet<>();\n for (Location oldSnpLocation : oldSnpLocations) {\n oldSnpLocationIds.add(oldSnpLocation.getId());\n }\n\n // Remove old locations\n snp.setLocations(new ArrayList<>());\n singleNucleotidePolymorphismRepository.save(snp);\n\n // Clean-up old locations that were linked to SNP\n if (oldSnpLocationIds.size() > 0) {\n for (Long oldSnpLocationId : oldSnpLocationIds) {\n cleanUpLocations(oldSnpLocationId);\n }\n }\n }\n }" ]
[ "0.53147066", "0.5158766", "0.5126301", "0.4981716", "0.49561116", "0.4951141", "0.49489594", "0.49388996", "0.4905798", "0.49040198", "0.48999864", "0.48836625", "0.48692495", "0.4850114", "0.48273802", "0.48200268", "0.4808115", "0.4808115", "0.48073483", "0.480286", "0.4789957", "0.4785953", "0.47838348", "0.4780802", "0.47577745", "0.47113097", "0.47020423", "0.46893677", "0.46585876", "0.46516398", "0.46477813", "0.46458972", "0.46384463", "0.46359447", "0.46272767", "0.4626439", "0.46164745", "0.46154436", "0.46000835", "0.4572478", "0.45592254", "0.45562157", "0.45486772", "0.45461997", "0.45430872", "0.4541251", "0.4535841", "0.45285696", "0.45200983", "0.45162988", "0.45122162", "0.45115957", "0.4507729", "0.44955477", "0.44913843", "0.44897014", "0.4489279", "0.44861156", "0.44793144", "0.44778937", "0.4476582", "0.44729272", "0.44642097", "0.4463118", "0.444383", "0.44414625", "0.44398257", "0.44355124", "0.442788", "0.4427247", "0.44215286", "0.4419666", "0.44174656", "0.44172713", "0.44152516", "0.44118285", "0.44051558", "0.4401925", "0.44018558", "0.43980923", "0.4395206", "0.4394857", "0.43944785", "0.4394135", "0.43938917", "0.43869665", "0.4385263", "0.43818858", "0.43796274", "0.43766868", "0.43738875", "0.43728268", "0.43722382", "0.43664172", "0.4365271", "0.43642542", "0.43602857", "0.4358325", "0.43567896", "0.4354428" ]
0.6914074
0
Changes nucleotide at site k to c.
public void mutate(int k, char c) { if (isValid(c)) seq.set(k, c); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setCxcleunik(int cxcleunik) {\r\r\r\r\r\r\r\n this.cxcleunik = cxcleunik;\r\r\r\r\r\r\r\n }", "private static void muta(Cromosoma c)\n\t{\n\t}", "public void changeDna(char[] c){\n dna = c;\n }", "public void setKinkenriyou03(Long kinkenriyou03) {\r\n this.kinkenriyou03 = kinkenriyou03;\r\n }", "public void update(int k, int value, double d) {\r\n\t\tcounter = counter * Math.pow(d, k - tid) + value;\r\n\t\ttid = k;\r\n\t}", "@Override\n\tpublic void updateConseille(Conseille c) {\n\t\t\n\t}", "void setCit(java.lang.String cit);", "public void tiepTucNhap() {\n\t\tlog.info(\"-----tiepTucNhap()-----\");\n\t\tlog.info(String.format(\"-----index: %s\", updateItem));\n\t\t\n\t\tlog.info(\"tonkhoMa:\"+tonkhoMa);\n\t\tlog.info(\"xuat:\"+xuat);\n\t\tlog.info(\"dmtMa:\"+dmtMa);\n\t\tlog.info(\"updateItem:\"+updateItem);\n\t\tlog.info(\"tonkho:\"+tonkho);\n\n\t\tif (xuat == null || xuat.equals(\"\") || tonkho == null || tonkho.equals(\"\")){\n\t\t\treturn;\n\t\t}\n\t\t \n\t\tif (\"\".equals(tonkhoMa) && tonkhoMa == null) {\n\t\t\tlog.info(\"-----tonkho ma is null.\");\n\t\t} else {\n\t\t\tlog.info(String.format(\"-----tonkho ma: %s\", tonkhoMa));\n\t\t\tTonKho tk = null;\n\t\t\t\n\t\t\tTonKhoDelegate tkDelegate;\n\t\t\ttry {\n\t\t\t\ttkDelegate = TonKhoDelegate.getInstance();\n\t\t\t\t\n\t\t\t\ttk = tkDelegate.find(Integer.valueOf(tonkhoMa));\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tCtTraKho ctx = new CtTraKho();\n\t\t\t\n\t\t\tDouble slXuat = new Double(\"0\");\n\t\t\tfor (int i = 0; i < listCtKhoLeTraEx.size(); i++) {\n\t\t\t\tCtTraKho ctxk = listCtKhoLeTraEx.get(i).getCtTraKho();\n\t\t\t\tif (malk.equals(ctxk.getCttrakhoMalk())) {\n\t\t\t\t\tlog.info(\"-----malk \" + malk);\n\t\t\t\t\tslXuat += ctxk.getCttrakhoSoluong();\n\t\t\t\t\tupdateItem = i;\n\t\t\t\t}\n\t\t\t}\n\t\t\tslXuat += Double.valueOf(xuat);\n\t\t\tctx.setCttrakhoSoluong(slXuat);\n\t\t\tCtTraKhoExt ctxEx = createCtXuatKho(ctx, tk);\n\t\t\tlog.info(\"-----xuat: \" + slXuat);\n\t\t\t\n\t\t\tif (updateItem.equals(-1)) {\n\t\t\t\tlog.info(\"-----them moi ct\");\n\t\t\t\tlistCtKhoLeTraEx.add(ctxEx);\n\t\t\t} else {\n\t\t\t\tlog.info(\"-----Cap nhat ct-----\");\n\t\t\t\tif (tk != null) {\n\t\t\t\t\tlistCtKhoLeTraEx.set(updateItem, ctxEx);\n\t\t\t\t} else {\n\t\t\t\t\tFacesMessages.instance().add(IConstantsRes.PHIEUXUATKHO_TK_NULL, dmtMa);\n\t\t\t\t}\n\n\t\t\t\tlog.info(String.format(\"-----update ct: %s\", ctx.getCttrakhoThutu()));\n\t\t\t}\n\n\t\t\tcount = listCtKhoLeTraEx.size();\n\t\t\tlog.info(String.format(\"-----listCtXuatKho: %s\", listCtKhoLeTraEx.size()));\n\t\t\ttonkhoMa = \"\";\n\t\t\tdmtMa = \"\";\n\t\t\ttonkho = new Double(0);\n\t\t\txuat = new Double(0);\n\t\t\tupdateItem = -1;\n\t\t}\n\t\ttinhTien();\n\t}", "public final void setKingdom(Kingdom kingdom) {\r\n\tremove();\r\n\tthis.kingdom = kingdom;\r\n\tapply();\r\n }", "@Override\n public void modify(PKMonomer monomer) {\n if(this.aminoAcid.equals(\"N/A\"))\n return;\n StructureLoader loader = new AminoAcidStructLoader(this.aminoAcid);\n try {\n IAtomContainer aaMol = loader.loadStructure();\n //Join K in amino acid mol file to the K in the Monomer\n\n IAtom K_monomer=null;\n IAtom N_monomer = null;\n IAtom c_conn_K_monomer=null;\n\n IAtom K_aa=null;\n IAtom L_aa = null;\n IAtom atom_conn_K_aa=null;\n\n for(IAtom atom_monomer : monomer.getMolecule().atoms()) {\n if(atom_monomer.getSymbol().equals(\"K\")) {\n K_monomer = atom_monomer;\n c_conn_K_monomer = monomer.getMolecule().getConnectedAtomsList(atom_monomer).get(0);\n } else if(atom_monomer.getSymbol().equals(\"N\")) {\n N_monomer = atom_monomer;\n }\n }\n\n for(IAtom atom_aa : aaMol.atoms()) {\n if(atom_aa.getSymbol().equals(\"K\")) {\n K_aa = atom_aa;\n atom_conn_K_aa = aaMol.getConnectedAtomsList(atom_aa).get(0);\n } else if(atom_aa instanceof IPseudoAtom && ((IPseudoAtom) atom_aa).getLabel().equals(\"L\")) {\n L_aa = atom_aa;\n }\n }\n\n if(K_aa!=null && K_monomer!=null) {\n IBond c_k_monomer = monomer.getMolecule().getBond(K_monomer,c_conn_K_monomer);\n IBond conn_k_aa = aaMol.getBond(K_aa,atom_conn_K_aa);\n\n c_k_monomer.setOrder(conn_k_aa.getOrder());\n c_k_monomer.setAtom(c_conn_K_monomer,0);\n c_k_monomer.setAtom(atom_conn_K_aa,1);\n\n aaMol.removeAtom(K_aa);\n aaMol.removeBond(conn_k_aa);\n\n monomer.getMolecule().add(aaMol);\n monomer.getMolecule().removeAtom(K_monomer);\n\n //If L is present in the aminoacid, join it with N of the monomer.\n if(L_aa!=null && N_monomer!=null) {\n IBond L_bond = monomer.getMolecule().getConnectedBondsList(L_aa).get(0);\n IAtom atom_conn_L = monomer.getMolecule().getConnectedAtomsList(L_aa).get(0);\n L_bond.setAtom(N_monomer,0);\n L_bond.setAtom(atom_conn_L,1);\n monomer.getMolecule().removeAtom(L_aa);\n }\n }\n\n } catch (Exception e) {\n LOGGER.error(\"Issues when processing monomer:\",e);\n }\n }", "public void setKinkenriyou26(Long kinkenriyou26) {\r\n this.kinkenriyou26 = kinkenriyou26;\r\n }", "protected void mo1603c(long j) {\n this.f7046g = j;\n }", "public void setK(int k) {\n this.k = k;\n }", "public void kast() {\n\t\t// vaelg en tilfaeldig side\n\t\tdouble tilfaeldigtTal = Math.random();\n\t\tvaerdi = (int) (tilfaeldigtTal * 6 + 1);\n\t}", "public void deleteAt(int k) {\n if (isEmpty()) return;\n if (k == 0) {//check if node is head\n Cus_Node p = head;\n head = head.next;\n p.next = null;\n } else {\t\n Cus_Node p = pos(k);//get node position k\n if (p == null) return;\n Cus_Node q = pos(k - 1);//q is node before of p\n // Remove p\n q.next = p.next;\n p.next = null;\n if (p == tail) tail = q;\n }\n }", "void set(int c, int r, Piece v) {\n set(c, r, v, null);\n }", "public void sugangSincheong(CSugang sugang) {\n\t\t\r\n\t}", "public void setChest(Block sign, Chest chest, Player p)\n\t{\n\t\tBoutiqueSign bs = this.getBoutiqueSign(sign);\n\t\t\n\t\t\n\t\tif(bs == null)\n\t\t{\n\t\t\t// TODO: message \"Impossible de trouver le panneau en question\"\n\t\t\tp.sendMessage(plugin.chatPrefix + Messages.getString(\"Sign.CHOOSESIGNBEFORE\")); //$NON-NLS-1$\n\t\t\treturn;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tString newChestLoc = \"\"; //$NON-NLS-1$\n\t\t\tString oldChestLoc = \"\"; //$NON-NLS-1$\n\t\t\t\n\t\t\tChest bsc = bs.getChest();\n\t\t\t\n\t\t\t\n\t\t\toldChestLoc = bs.getChestString();\n\t\t\tnewChestLoc = BoutiqueSign.getLocationString(chest.getBlock().getLocation());\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//verifie que le panneau n'etait pas deja relié au coffre\t\t\t\n\t\t\tif (oldChestLoc == newChestLoc)\n\t\t\t{\n\t\t\t\tp.sendMessage(plugin.chatPrefix + Messages.getString(\"Sign.SIGNALREADYBINDED\")); //$NON-NLS-1$\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tint distX = sign.getX() - chest.getBlock().getX();\n\t\t\tint distZ = sign.getZ() - chest.getBlock().getZ();\n\t\t\n\t\t\t\n\t\t\tint maxDist = 15;\n\t\t\tif (distX > maxDist || distZ > maxDist ) \n\t\t\t{\n\t\t\t\tp.sendMessage(plugin.chatPrefix + Messages.getString(\"Sign.CHESTTOOFARAWAY\") + maxDist + Messages.getString(\"Sign.MAXBLOCKS\")); //$NON-NLS-1$ //$NON-NLS-2$\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t//DEBUG\n\t\t\t//p.sendMessage(plugin.chatPrefix + \"Enregistrement coffre\");\n\t\t\t\t\t\t\n\t\t\tbs.setChest(chest);\t\t\t\n\t\t\t\n\t\t\tupdateSignDb(bs);\n\t\t\t\n\t\t\tp.sendMessage(plugin.chatPrefix + Messages.getString(\"Sign.CHESTBINDED\")); //$NON-NLS-1$\n\t\t\t\t\t\n\t\t\t//DEBUG\n\t\t\t//p.sendMessage(plugin.chatPrefix + \"panneau: \" + bs.getChestString());\n\t\t\t\n\t\t}\t\t\n\t}", "public void mo5350a(C0275kc kcVar, C0283kk kkVar, C0114ed edVar) {\n throw null;\n }", "void setKingdom(KingdomUser user, Kingdom kingdom);", "public void setKinkenriyou27(Long kinkenriyou27) {\r\n this.kinkenriyou27 = kinkenriyou27;\r\n }", "public void setAcideAmine(String codon) {\n switch (codon) {\n \n case \"GCU\" :\n case \"GCC\" :\n case \"GCA\" :\n case \"GCG\" : \n this.acideAmine = \"Alanine\";\n break;\n case \"CGU\" :\n case \"CGC\" :\n case \"CGA\" :\n case \"CGG\" :\n case \"AGA\" :\n case \"AGG\" :\n this.acideAmine = \"Arginine\";\n break;\n case \"AAU\" :\n case \"AAC\" :\n this.acideAmine = \"Asparagine\";\n break;\n case \"GAU\" :\n case \"GAC\" :\n this.acideAmine = \"Aspartate\";\n break;\n case \"UGU\" :\n case \"UGC\" :\n this.acideAmine = \"Cysteine\";\n break;\n case \"GAA\" :\n case \"GAG\" :\n this.acideAmine = \"Glutamate\";\n break;\n case \"CAA\" :\n case \"CAG\" :\n this.acideAmine = \"Glutamine\";\n break;\n case \"GGU\" :\n case \"GGC\" :\n case \"GGA\" :\n case \"GGG\" :\n this.acideAmine = \"Glycine\";\n break;\n case \"CAU\" :\n case \"CAC\" :\n this.acideAmine = \"Histidine\";\n break;\n case \"AUU\" :\n case \"AUC\" :\n case \"AUA\" :\n this.acideAmine = \"Isoleucine\";\n break;\n case \"UUA\" :\n case \"UUG\" :\n case \"CUU\" :\n case \"CUC\" :\n case \"CUA\" :\n case \"CUG\" :\n this.acideAmine = \"Leucine\";\n break;\n case \"AAA\" :\n case \"AAG\" :\n this.acideAmine = \"Lysine\";\n break;\n case \"AUG\" :\n this.acideAmine = \"Methionine\";\n break;\n case \"UUU\" :\n case \"UUC\" :\n this.acideAmine = \"Phenylalanine\";\n break;\n case \"CCU\" :\n case \"CCC\" :\n case \"CCA\" :\n case \"CCG\" :\n this.acideAmine = \"Proline\";\n break;\n case \"UAG\" :\n this.acideAmine = \"Pyrrolysine\";\n break;\n case \"UGA\" :\n this.acideAmine = \"Selenocysteine\";\n break;\n case \"UCU\" :\n case \"UCC\" :\n case \"UCA\" :\n case \"UCG\" :\n case \"AGU\" :\n case \"AGC\" :\n this.acideAmine = \"Serine\";\n break;\n case \"ACU\" :\n case \"ACC\" :\n case \"ACA\" :\n case \"ACG\" :\n this.acideAmine = \"Threonine\";\n break;\n case \"UGG\" :\n this.acideAmine = \"Tryptophane\";\n break;\n case \"UAU\" :\n case \"UAC\" :\n this.acideAmine = \"Tyrosine\";\n break;\n case \"GUU\" :\n case \"GUC\" :\n case \"GUA\" :\n case \"GUG\" :\n this.acideAmine = \"Valine\";\n break;\n case \"UAA\" :\n this.acideAmine = \"Marqueur\";\n break;\n }\n }", "public void setAtNeutral(Kingdom relatingKingdom) {\n try {\n java.sql.PreparedStatement s = QuartzKingdoms.DBKing.prepareStatement(\"SELECT * FROM relationships WHERE kingdom_id=? AND sec_kingdom_id=?;\");\n s.setInt(1, this.id);\n s.setInt(2, relatingKingdom.getID());\n ResultSet res = s.executeQuery();\n\n java.sql.PreparedStatement s1 = QuartzKingdoms.DBKing.prepareStatement(\"SELECT * FROM relationships WHERE kingdom_id=? AND sec_kingdom_id=?;\");\n s1.setInt(1, relatingKingdom.getID());\n s1.setInt(2, this.id);\n ResultSet res1 = s1.executeQuery();\n\n if (res.next()) {\n java.sql.PreparedStatement s2 = QuartzKingdoms.DBKing.prepareStatement(\"DELETE FROM relationships WHERE kingdom_id=? AND sec_kingdom_id=?;\");\n s2.setInt(1, relatingKingdom.getID());\n s2.setInt(2, this.id);\n s2.executeUpdate();\n } else if (res1.next()) {\n\n } else {\n return;\n }\n } catch (SQLException e) {\n KUtil.printException(\"Could not set kingdoms at neutral\", e);\n }\n }", "void changeCadence(int newValue);", "public boolean controllo(String c,int k) {\r\n\t\tString r=\"#\";\r\n\t\tfor(int i=0;i<c.length();i++) {\r\n\t\t\tif(!c.contains(r)) return false;\r\n\t\t}\r\n\t\treturn true;\r\n\t\t}", "private void set(int k, PieceColor v) {\n assert validSquare(k);\n _board[k] = v;\n }", "private void step4(Node node) {\n\t\tHashMap<String, ArrayList<String>> svn = node.svN;\r\n\t\tHashMap<String, ArrayList<String>> cn = node.cN;\r\n\t\tArrayList<String> keys = node.keysN;\r\n\t\tString c = checksubset(cn);\r\n\r\n\t\tif (c != null) {\r\n\t\t\tfor (int i = 0; i < keys.size(); i++) {\r\n\t\t\t\tif (svn.get(keys.get(i)).contains(c)) {\r\n\t\t\t\t\tsvn.get(keys.get(i)).remove(c);\r\n\t\t\t\t\tif (svn.get(keys.get(i)).size() <= 1) {\r\n\t\t\t\t\t\tsvn.remove(keys.get(i));\r\n\t\t\t\t\t\tkeys.remove(i);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcn.remove(c);\r\n\t\t}\r\n\t}", "public void setNomorSK2 (String NomorSK2);", "public void miseEnFormeChomsky(){\n miseEnFormeChom.miseEnFormeChomsky();\n setChanged();\n notifyObservers(\"6\");\n }", "public void setKinkenriyou13(Long kinkenriyou13) {\r\n this.kinkenriyou13 = kinkenriyou13;\r\n }", "public void setKinkenriyou16(Long kinkenriyou16) {\r\n this.kinkenriyou16 = kinkenriyou16;\r\n }", "public void applyPerturbation(int k) {\n\t\t\n\t\tfor (int i=0; i<numGenes_; i++) {\n\t\t\tgrn_.getGene(i).setMax( wildType_.get(i) + deltaMax_.get(i) );\n\t\t\tgrn_.getGene(i).perturbBasalActivation( deltaBasalActivation_.get(i) );\n\t\t}\n\t}", "public void setKdKelas(java.lang.CharSequence value) {\n this.kd_kelas = value;\n }", "public void setKinkenriyou29(Long kinkenriyou29) {\r\n this.kinkenriyou29 = kinkenriyou29;\r\n }", "public void byConstant(double k){\r\n if (k<0){\r\n double aux = firstExtreme;\r\n firstExtreme = k*secondExtreme;\r\n secondExtreme = k*aux;\r\n }else{\r\n firstExtreme = k*firstExtreme;\r\n secondExtreme = k*secondExtreme;\r\n }\r\n }", "public void setMerkki(char merkki){\r\n this.merkki = merkki; \r\n }", "void set(int n, char s) {\n set(n);\n set(s);\n }", "public static void kuo(String c)\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//C++ TO JAVA CONVERTER TODO TASK: Pointer arithmetic is detected on this variable, so pointers on this variable are left unchanged:\n\t\tchar * i;\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 * t;\n\t\tint s;\n\t\tfor (;;)\n\t\t{\n\t\t\ts = 0;\n\t\t\tfor (i = c; * i != '\\0';i++)\n\t\t\t{\n\t\t\t\tfor (p = i; * p != '\\0';p++)\n\t\t\t\t{\n\t\t\t\t\tif (*p == '(')\n\t\t\t\t\t{\n\t\t\t\t\t\tfor (q = p + 1; * q != '\\0';q++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (*q == '(')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (*q == ')')\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t*p = 'a';\n\t\t\t\t\t\t\t\t\t*q = 'a';\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\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\tfor (q = c; * q != '\\0';q++)\n\t\t\t{\n\t\t\t\tfor (t = q; * t != '\\0';t++)\n\t\t\t\t{\n\t\t\t\t\tif (*q == '(' && *t == ')')\n\t\t\t\t\t{\n\t\t\t\t\t\ts = 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (s == 0)\n\t\t\t{\n\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t}", "public void Free_SSL(int k){\n // Link deleted element to a alternate link list\n // Let free element become the second element of alternate link list\n StaticLinkList[k].cur = StaticLinkList[0].cur;\n // Let the deleted element become the first element of alternate link list\n StaticLinkList[0].cur = k;\n }", "private void setMu2(MeaningUnit mu) {\n\t\t// falls die MU aus CW und FW besteht\n\t\tif (mu.getFunctionWord() != null) {\n\t\t\tmodel.getSGCreatingMenu().setMU2(mu.getFunctionWord() + \" \" + mu.getConstitutiveWord());\n\t\t}\n\t\t// falls die MU nur aus CW besteht\n\t\telse {\n\t\t\tmodel.getSGCreatingMenu().setMU2(mu.getConstitutiveWord().toString());\n\t\t}\n\t\tmodel.getView().design(mu, true);\n\t\tmu2 = mu;\t\t\t\t\t\t\t\t\n\t}", "public void vlozNaUcet(int ciastka, TerminovanyUcet terminovanyUcet) {\r\n\t\tcislo += ciastka;\r\n\t\tterminovanyUcet.setVklad(ciastka);\r\n\t\tSporiaciUcet.super.setVyber(ciastka);\r\n\t}", "public static void Inicialitzar_Secret_Old(char[][] Matriu) {\r\n\r\n\t\tfor (int F = 0; F < TAULER; F++)\r\n\t\t\tfor (int C = 0; C < TAULER; C++)\r\n\t\t\t\tif (F == 0)\r\n\t\t\t\t\tif (C == 0 || C == 1)\r\n\t\t\t\t\t\tMatriu[F][C] = 'A';\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tMatriu[F][C] = 'B';\r\n\t\t\t\telse if (F == 1)\r\n\t\t\t\t\tif (C == 0 || C == 1)\r\n\t\t\t\t\t\tMatriu[F][C] = 'C';\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tMatriu[F][C] = 'D';\r\n\t\t\t\telse if (F == 2)\r\n\t\t\t\t\tif (C == 0 || C == 1)\r\n\t\t\t\t\t\tMatriu[F][C] = 'E';\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tMatriu[F][C] = 'F';\r\n\t\t\t\telse if (F == 3)\r\n\t\t\t\t\tif (C == 0 || C == 1)\r\n\t\t\t\t\t\tMatriu[F][C] = 'G';\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tMatriu[F][C] = 'H';\r\n\t}", "public void setClBlockup(Short clBlockup) {\r\n\t\tthis.clBlockup = clBlockup;\r\n\t}", "public void setConc(double c) {\t\t\r\n\t\tfor(int i=0;i<boxes[0];i++)\r\n\t\t\tfor(int j=0;j<boxes[1];j++)\r\n\t\t\t\tfor(int k=0;k<boxes[2];k++) quantity[i][j][k] = c*boxVolume;\r\n\t}", "public int getCxcleunik() {\r\r\r\r\r\r\r\n return cxcleunik;\r\r\r\r\r\r\r\n }", "private void suono(int idGioc) {\n\t\tpartita.effettoCasella(idGioc);\n\t}", "public void restartAt(S2Point c) {\n this.c = c;\n acb = -triage(aCrossB, c);\n }", "public void stupenVrcholu(String klic){\n\t\tint indexKlic = index(klic);\n\t\tfor(int i = 0; i < matice.length;i++){\n\t\t\tif(matice[i][indexKlic] == 1 )\n\t\t\t\tvrchP[indexKlic].stupenVstup++;\n\t\t\t\n\t\t\tif(matice[indexKlic][i] == 1)\n\t\t\t\t\tvrchP[indexKlic].stupenVystup++;\n\t\t\t}\n\t\t\t\t\n\t\t\n\t}", "public final void setN(final int koko) {\r\n this.n = koko;\r\n }", "public static void permutation3(StringBuffer sb, int k, Set<String> set)\r\n\t{\r\n\t\tif(k == sb.length())\r\n\t\t{\r\n\t\t\tset.add(sb.toString());\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\t\r\n\t\t\r\n\t\tfor(int i =k ;i < sb.length();i++)\r\n\t\t{\r\n\t\t\tswap(sb,k,i);\r\n\t\t\tpermutation3(sb,k+1, set);\r\n\t\t\tswap(sb,i,k);\r\n\t\t}\r\n\t}", "private void coins_a2G(){\n\t\tthis.cube[31] = this.cube[11]; \n\t\tthis.cube[11] = this.cube[2];\n\t\tthis.cube[2] = this.cube[38];\n\t\tthis.cube[38] = this.cube[47];\n\t\tthis.cube[47] = this.cube[31];\n\t}", "public void copiar() {\n for (int i = 0; i < F; i++) {\n for (int j = 0; j < C; j++) {\n old[i][j]=nou[i][j];\n }\n }\n }", "public void C(u6 u62) {\n this.q = u62;\n synchronized (this) {\n long l10 = this.H;\n long l11 = 128L;\n this.H = l10 |= l11;\n }\n this.notifyPropertyChanged(15);\n super.requestRebind();\n }", "void set( couple ch)\r\n { \r\n \r\n //couple ch = itr.next();\r\n ch.g1.sethappy(ch.bucket);\r\n ch.b1.sethappy(ch.bucket);\r\n ch.happiness = ch.b1.happy + ch.g1.happy;\r\n ch.compatibility = (ch.b1.budget - ch.g1.getmaint()) + Math.abs(ch.b1.getintg() - ch.g1.getiq()) + Math.abs(ch.b1.getattr() - ch.g1.getb());\r\n // this sets the happiness n compatibility of the co \r\n \r\n }", "public void setUpc(String upc) {\r\n this.upc = upc;\r\n }", "void gotovariation (int i, int j)\n\t// goto the variation at (i,j)\n\t{\n\t\tTreeNode newpos = P.tree(i, j);\n\t\tgetinformation();\n\t\tif (VCurrent && newpos.parentPos() == Pos.parentPos())\n\t\t{\n\t\t\tgoback();\n\t\t\tPos = newpos;\n\t\t\tsetnode();\n\t\t\tsetlast();\n\t\t}\n\t\telse if ( !VCurrent && newpos.parentPos() == Pos)\n\t\t{\n\t\t\tPos = newpos;\n\t\t\tsetnode();\n\t\t\tsetlast();\n\t\t}\n\t\tcopy();\n\t\tshowinformation();\n\t}", "private String encriptarClave(String clave, UMD5 mo) {\r\n\t\ttry{\r\n\t\t\t//UMD5 md = UMD5.getInstance();\r\n\t\t\t\r\n\t\t\tlog.info(\"clave:\"+clave);\r\n\t\t\tclave=mo.hashData(clave.getBytes()).toLowerCase();\r\n\t\t\tlog.info(\"clave:\"+clave);\r\n\t\t\t}catch(Exception e){\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t/*fin\r\n\t\t * */\r\n\t\treturn clave;\r\n\t}", "private void kk12() {\n\n\t}", "private final void setto(String s)\n\t { int l = s.length();\n\t int o = j+1;\n\t for (int i = 0; i < l; i++) b[o+i] = s.charAt(i);\n\t k = j+l;\n\t }", "public void setKinkenriyou14(Long kinkenriyou14) {\r\n this.kinkenriyou14 = kinkenriyou14;\r\n }", "private void coins_fG(){\n\t\tthis.cube[31] = this.cube[27]; \n\t\tthis.cube[27] = this.cube[33];\n\t\tthis.cube[33] = this.cube[35];\n\t\tthis.cube[35] = this.cube[29];\n\t\tthis.cube[29] = this.cube[31];\n\t}", "public void correr(double km){\n System.out.println(\"He corrido\"+km+\"kilometros\");\n }", "public void promote() {\n this.isKing = true;\n }", "public void setKinkenriyou21(Long kinkenriyou21) {\r\n this.kinkenriyou21 = kinkenriyou21;\r\n }", "public void setDeci(int c){\n this.deci = c;\n }", "public void c(long j) {\n this.h = j;\n }", "public void setCountryKey(ObjectKey key) throws TorqueException\n {\n \n setCustCountryId(((NumberKey) key).intValue());\n }", "private void setK(int mu) {\r\n\t\tk = 1;\r\n\t\tint g = 0;\r\n\t\tint intervalLength = intervals.length;\r\n\t\twhile(g<intervalLength && mu>intervals[g]) {\r\n\t\t\tg++;\r\n\t\t\tk++;\r\n\t\t}\r\n\t}", "public void rumoreAltroSettore(int idGioc, String value){\n\t\t partita.rumore(idGioc, value);\n\t}", "public void setKinkenriyou23(Long kinkenriyou23) {\r\n this.kinkenriyou23 = kinkenriyou23;\r\n }", "public void setCijena(double value) {\r\n this.cijena = value;\r\n }", "public void changeCharm(int i) {\n \t\tcharm += i;\n \t}", "public void call(int k){\n\t\tWorker.reg.pushPCtoStack();\n\t\tWorker.reg.setPC(k);\n\t\tWorker.reg.addCycle();\n\t\tWorker.reg.addCycle();\n\t}", "public void nettoyageGrammaire(){\n grammaireCleaner.nettoyGrammaire();\n setChanged();\n notifyObservers(\"23\");\n }", "@Override\n public void function(String k)\n {\n world.decreaseWorldSpeed();\n }", "public final C32662an mo53159bu(long j) {\n this.cVK = j;\n return this;\n }", "private void mutate(Chromosome c){\n for(double[] gene:c.getGeneData()){\n for(int i=0; i<gene.length; i++){\n if(Math.random()<mutationRate){\n //Mutate the data\n gene[i] += (Math.random()-Math.random())*maxPerturbation;\n }\n }\n }\n }", "public Kingdom setKing(QKPlayer player) {\n try {\n java.sql.PreparedStatement s = QuartzKingdoms.DBKing.prepareStatement(\"UPDATE Kingdoms SET kingID=? WHERE id=?;\");\n s.setInt(1, player.getID());\n s.setInt(2, this.id);\n if (s.executeUpdate() == 1) {\n this.king = player.getID();\n player.setKingdomGroup(6);\n return this;\n } else {\n return this;\n }\n } catch (SQLException e) {\n return this;\n }\n }", "public void colorearSecuencial() {\n\t\t// Collections.shuffle(nodos);\n\t\tcolorearSecuencialAlternativo();\n\t}", "public abstract void setCod_dpto(java.lang.String newCod_dpto);", "public void setKinkenriyou30(Long kinkenriyou30) {\r\n this.kinkenriyou30 = kinkenriyou30;\r\n }", "public long getprefx(long cnumber, int k) {\n if (thesize(cnumber) > k) {\n String num = cnumber + \"\";\n return Long.parseLong(num.substring(0, k));\n }\n return cnumber;\n }", "public void replaceThesarusWordwithGoogleWord ( ) {\r\n\t \t\t \t\r\n\t \tfor (Map.Entry<String, List<String>> entry : GoogleToThesarus.entrySet()) {\r\n\t String key = entry.getKey();\r\n\t List<String> values = entry.getValue();\r\n\t //String wordIsReplaced=null;\r\n\t \r\n\t for (String temp: values) {\r\n\t \t//why is this null\r\n\t \t\r\n\t \tif (splitto.equals(temp)) {\r\n\t \t\tsplitto=key;\r\n\t \t\tif(!replacedWordList.contains(splitto))\r\n\t \t\t\treplacedWordList.add(splitto);\r\n \t\t\r\n\t \t \t\t \t\t}\r\n\t \telse {\r\n\t \t\t//wordIsReplaced=splitto;\r\n\t \t\t//System.out.println(\"failed\");\r\n\t \t}\r\n\t \t\t }\r\n\t \t}\r\n\t }", "public void setKinkenriyou02(Long kinkenriyou02) {\r\n this.kinkenriyou02 = kinkenriyou02;\r\n }", "public void k() {\n if (this.l <= 0) {\n c();\n }\n }", "public void setDiscrepancyKey(long value) {\r\n this.discrepancyKey = value;\r\n }", "public Cotisant visite(Contributeur c){ \n int somme = this.state.get(c); \n c.affecterSolde(somme); \n return c ; \n }", "public void setKakaricd(String kakaricd) {\r\n this.kakaricd = kakaricd;\r\n }", "public void setCustCountryId(int v) throws TorqueException\n {\n \n if (this.custCountryId != v)\n {\n this.custCountryId = v;\n setModified(true);\n }\n \n \n if (aCountry != null && !(aCountry.getCountryId() == v))\n {\n aCountry = null;\n }\n \n }", "public void update(Conseiller c) {\n\t\t\r\n\t}", "protected int replace_s(int c_bra, int c_ket, String s)\n {\n\tint adjustment = s.length() - (c_ket - c_bra);\n\tcurrent.replace(c_bra, c_ket, s);\n\tlimit += adjustment;\n\tif (cursor >= c_ket) cursor += adjustment;\n\telse if (cursor > c_bra) cursor = c_bra;\n\treturn adjustment;\n }", "public void topkInConstituency(String constituency, String k){\n\t\tint v=Integer.parseInt(k);\n\t\tVector<BST<String, Integer>.node> nn=bst.givenode(constituency);\n\t\tfor(int i=0;i<nn.size();i++){\n\t\t\tfor(int j=i;j<nn.size();j++){\n\t\t\t\tif(nn.get(i).value<nn.get(j).value){\n\t\t\t\t\t//BST.node tmp=new BST.node(null,null,null,null,null,null,null);\n\t\t\t\t\tBST.node tmp=nn.get(i);\n\t\t\t\t\tnn.set(i,nn.get(j));\n\t\t\t\t\tnn.set(j,tmp);\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tint pp=Integer.parseInt(k);\n\t\tint total=pp;\n\t\tif(pp>nn.size()){\n\t\t\ttotal=nn.size();\n\n\t\t}\n\t\tfor (int i=0;i<total;i++){\n\t\t\tSystem.out.println(nn.get(i).name+\", \"+nn.get(i).key+\", \"+nn.get(i).party);\n\t\t\t\n\t\t}\n\n\t\t//write your code here\n\t}", "public void setKinkenriyou15(Long kinkenriyou15) {\r\n this.kinkenriyou15 = kinkenriyou15;\r\n }", "public void setKinkenriyou25(Long kinkenriyou25) {\r\n this.kinkenriyou25 = kinkenriyou25;\r\n }", "public static Nucleotide get(char b) {\n switch (Character.toUpperCase(b)) {\n case 'A':\n return A;\n case 'B':\n return B;\n case 'C':\n return C;\n case 'D':\n return D;\n case 'G':\n return G;\n case 'H':\n return H;\n case 'K':\n return K;\n case 'M':\n return M;\n case 'N':\n return N;\n case 'R':\n return R;\n case 'S':\n return S;\n case 'T':\n return T;\n case 'U':\n return U;\n case 'V':\n return V;\n case 'W':\n return W;\n case 'Y':\n return Y;\n default:\n return NONE;\n }\n }", "public void setCoin(int c) {\n setStat(c, coin);\n }", "public static void kosajaru(int u , int pass){\n\t\t\n\t\t\n\t\tdfs_num[u] = 1;\n\t\tArrayList<Pair> neighbor;\n\t\tif(pass == 1) neighbor = adjList.get(u) ;else neighbor = adjListT.get(u);\n\t\tif(pass == 2) set.add(u); \n\t\tfor(int j = 0 ; j < neighbor.size(); j++){\n\t\t\tPair v = neighbor.get(j);\n\t\t\tif( dfs_num[v.first] == UNVISITED){\n\t\t\t\tkosajaru(v.first , pass);\n\t\t\t}\n\t\t}\n\t\tS.add(u);\n\t}", "public void setKinkenriyou09(Long kinkenriyou09) {\r\n this.kinkenriyou09 = kinkenriyou09;\r\n }", "public void setK(boolean k) {\n\tthis.k = k;\n }", "public void setKinkenriyou22(Long kinkenriyou22) {\r\n this.kinkenriyou22 = kinkenriyou22;\r\n }" ]
[ "0.57862526", "0.53683996", "0.52461874", "0.51511437", "0.51380783", "0.5115637", "0.49806598", "0.49722064", "0.49413994", "0.49117163", "0.48788956", "0.48722067", "0.48548383", "0.48303807", "0.48109993", "0.48075372", "0.48064733", "0.47931212", "0.4785098", "0.4781485", "0.47799885", "0.47688407", "0.47595447", "0.47579572", "0.47473657", "0.4737127", "0.47349006", "0.47334632", "0.47224572", "0.4718805", "0.47120756", "0.47055423", "0.46998", "0.4699231", "0.46969992", "0.46962857", "0.46948528", "0.46947303", "0.4691993", "0.46892053", "0.4686491", "0.46855816", "0.46836108", "0.4669734", "0.4665385", "0.466426", "0.46622798", "0.46611452", "0.46553364", "0.46534464", "0.4649073", "0.46475118", "0.4646653", "0.46431154", "0.46419418", "0.46363494", "0.46342215", "0.46299577", "0.46283603", "0.46245757", "0.46240228", "0.4615845", "0.46121308", "0.46119222", "0.46107236", "0.4610454", "0.46032146", "0.4602945", "0.45999533", "0.45998475", "0.45987266", "0.45951095", "0.458773", "0.4584232", "0.45783314", "0.45762104", "0.45740417", "0.45718768", "0.4570535", "0.45672297", "0.45620745", "0.45613903", "0.45604226", "0.45560044", "0.45471343", "0.45427", "0.45404783", "0.45395327", "0.45361176", "0.45289224", "0.45250198", "0.4523179", "0.452246", "0.45220053", "0.45213592", "0.4516142", "0.4515274", "0.45142502", "0.4513379", "0.45131227" ]
0.5369028
1
Reverses the order of sequence.
public void reverse() { ArrayList<Character> newSeq = new ArrayList<Character>(); for (int i = 0; i < seq.size(); i++) { newSeq.add(seq.get(seq.size() - 1 - i)); } seq = newSeq; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void reverse();", "void reverse();", "void reverseTurnOrder() {\n turnOrder *= -1;\n }", "public DoubleLinkedSeq reverse(){\r\n\t DoubleLinkedSeq rev = new DoubleLinkedSeq();\r\n\t for(cursor = head; cursor != null; cursor = cursor.getLink()){\r\n\t\t rev.addBefore(this.getCurrent());\r\n\t }\r\n\t \r\n\t return rev; \r\n }", "void reverse()\n\t{\n\t\tint a;\n\t\tif(isEmpty())\n\t\t\treturn;\n\t\telse\n\t\t{\t\n\t\t\ta = dequeue();\n\t\t\treverse(); \n\t\t\tenqueue(a);\n\t\t}\n\t}", "public void reverse() {\n var previous = first;\n var current = first.next;\n\n last = first;\n last.next = null;\n while (current != null) {\n var next = current.next;\n current.next = previous;\n previous = current;\n current = next;\n\n }\n first = previous;\n\n }", "public void _reverse() {\n\n var prev = first;\n var current = first.next;\n last = first;\n last.next = null;\n while (current != null) {\n var next = current.next;\n current.next = prev;\n prev = current;\n current = next;\n\n }\n first = prev;\n\n }", "void FlipBook()\r\n\t\t{\r\n\t\t\t Collections.reverse(this);\r\n\t\t}", "void reverseDirection();", "public void reverse() {\n\t\tif(isEmpty()) {\n\t\t\treturn;\n\t\t}\n\t\tNodo <T> pri_n= fin;\n\t\t\n\t\tint cont= tamanio-1;\n\t\tNodo<T> nodo_act= pri_n;\n\t\twhile(cont >0) {\n\t\t\tNodo <T> aux= getNode(cont-1);\n\t\t\tnodo_act.setSiguiente(aux);\n\t\t\tnodo_act= aux;\n\t\t\tcont--;\n\t\t}\n\t\tinicio = pri_n;\n\t\tfin= nodo_act;\n\t\tfin.setSiguiente(null);\n\t}", "public void reverse() {\n\t\tNode previous = first;\n\t\tNode current = first.next;\n\n\t\twhile (current != null) {\n\t\t\tNode next = current.next;\n\t\t\tcurrent.next = previous;\n\n\t\t\tprevious = current;\n\t\t\tcurrent = next;\n\t\t}\n\t\tlast = first;\n\t\tlast.next = null;\n\t\tfirst = previous;\n\t}", "public void reverse() {\n\t\tif (!this.isEmpty()) {\n\t\t\tT x = this.peek();\n\t\t\tthis.pop();\n\t\t\treverse();\n\t\t\tinsert_at_bottom(x);\n\t\t} else\n\t\t\treturn;\n\t}", "public void reverser(String[] x){\n reverse(x, 0, x.length -1);\n }", "public void decrementOrder() {\n mOrder--;\n }", "public void reverse() {\n\t\tNode<E> temp = null;\n\t\tNode<E> n = root;\n\n\t\twhile (n != null) {\n\t\t\ttemp = n.getBefore();\n\t\t\tn.setBefore(n.getNext());\n\t\t\tn.setNext(temp);\n\t\t\tn = n.getBefore();\n\t\t}\n\n\t\ttemp = root;\n\t\troot = tail;\n\t\ttail = temp;\n\t}", "public void reverse() {\n\t\t// write you code for reverse using the specifications above\t\t\n\t\tNode nodeRef = head;\n\t\thead = null;\n\t\t\n\t\twhile(nodeRef != null) {\n\t\t\tNode tmp = nodeRef;\n\t\t\tnodeRef = nodeRef.next;\n\t\t\ttmp.next = head;\n\t\t\thead = tmp;\n\t\t}\n\t}", "public void reverse()\n\t{\n\t\tSinglyLinkedListNode nextNode = head;\n\t\tSinglyLinkedListNode prevNode = null;\n\t\tSinglyLinkedListNode prevPrevNode = null;\n\t\twhile(head != null)\n\t\t{\n\t\t\tprevPrevNode = prevNode;\n\t\t\tprevNode = nextNode;\n\t\t\tnextNode = prevNode.getNext();\n\t\t\tprevNode.setNext(prevPrevNode);\n\t\t\tif(nextNode == null)\n\t\t\t{\n\t\t\t\thead = prevNode;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public void reverse() {\n throw new UnsupportedOperationException();\n }", "public Iterable<Integer> reverseOrder() {\r\n\t\treturn reverseOrder;\r\n\t}", "@NonNull\n ConsList<E> reverse();", "public Reversal() {\n\t\tsuper();\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 Graphe reverse()\t{\r\n \tfor(Liaison route : this.routes)\r\n \t\tif(route.isSensUnique())\r\n \t\t\troute.reverse();\t//TODO check si reverse marche bien\r\n \treturn this;\r\n }", "public IDnaStrand reverse();", "@Override\r\n\tpublic boolean reverseAccrualIt() {\n\t\r\n\t\t\r\n\t\treturn false;\r\n\t}", "public DATATYPE reverse() {\n\t\tString[] lines = mLines;\n\t\t\n\t\tmLines = new String[lines.length];\n\t\t\n\t\tfor (int i=lines.length-1, x=0; i >= 0; i--, x++) {\n\t\t\tmLines[x] = lines[i];\n\t\t}\n\t\t\n\t\treturn (DATATYPE) this;\n\t}", "public void reverse() {\n\n\t\tif (head == null) {\n\t\t\tSystem.out.println(\"List is empty.\");\n\t\t\treturn;\n\t\t}\n\t\tint nodes = nodeCounter();\n\t\tDLNode t = tail.prev;\n\t\thead = tail;\n\t\tfor (int i = 0; i < nodes - 1; i++) {\n\n\t\t\tif (t.list == null && t.val != Integer.MIN_VALUE) {\n\t\t\t\tthis.reverseHelperVal(t.val);\n\t\t\t\tt = t.prev;\n\t\t\t} else {\n\t\t\t\tthis.reverseHelperList(t.list);\n\t\t\t\tt = t.prev;\n\t\t\t}\n\t\t}\n\t\ttail.next = null;\n\t\thead.prev = null;\n\n\t}", "public Reversal(Clue clue) {\n\t\tsuper(clue);\n\t}", "public static void reverse(java.util.List arg0)\n { return; }", "@Test\n public void testReverse() {\n System.out.println(\"reverse\");\n al.add(1);\n al.add(2);\n al.add(3);\n ArrayList<Integer> rl = new ArrayList<>();\n rl.add(3);\n rl.add(2);\n rl.add(1);\n al.reverse();\n assertEquals(rl.get(0), al.get(0));\n assertEquals(rl.get(1), al.get(1));\n assertEquals(rl.get(2), al.get(2));\n }", "public void reverse(String IRQ){\r\n\t\tthis.switches.reverse(IRQ);\r\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}", "public static void reverse(byte[] array) {\n if (array == null) {\n return;\n }\n int i = 0;\n int j = array.length - 1;\n byte tmp;\n while (j > i) {\n tmp = array[j];\n array[j] = array[i];\n array[i] = tmp;\n j--;\n i++;\n }\n }", "@Test\n public void correctnessReverse() {\n final Iterator<Partition<Integer>> it = Partitions.lexicographicEnumeration(Helper.newHashSet(1, 2, 3, 4, 5, 6, 7, 8, 9, 10), new int[]{3, 5}, ImmutablePartition::new);\n final Iterator<Partition<Integer>> itr = Partitions.reverseLexicographicEnumeration(Helper.newHashSet(1, 2, 3, 4, 5, 6, 7, 8, 9, 10), new int[]{3, 5}, ImmutablePartition::new);\n final List<Partition<Integer>> partitions = new ArrayList<>();\n final List<Partition<Integer>> partitionsReverse = new ArrayList<>();\n while (it.hasNext() && itr.hasNext()) {\n final Partition<Integer> p = it.next();\n final Partition<Integer> pr = itr.next();\n partitions.add(p);\n partitionsReverse.add(pr);\n }\n Assert.assertTrue(!it.hasNext() && !itr.hasNext());\n Collections.reverse(partitionsReverse);\n Assert.assertEquals(partitions, partitionsReverse);\n }", "public void reverseDirection() {\n\t\tdirection *= -1;\n\t\ty += 10;\n\t}", "private static void reverse(int[] elements) {\n int[] reversed = new int[elements.length];\n int cursor = elements.length - 1;\n\n for (int i = 0; i < elements.length; i++) {\n reversed[i] = elements[cursor];\n cursor--;\n }\n\n for (int i = 0; i < reversed.length; i++) {\n elements[i] = reversed[i];\n }\n }", "protected void reversePath() {\n\t\t\n\t\tif(_reverse) {\n\t\t\t\n\t\t\tif(_nextMove + 1 > movingPattern.size() - 1)\n\t\t\t\t_nextMove = 0;\n\t\t\telse\n\t\t\t\t_nextMove++;\n\t\t\t\n\t\t\t_reverse = false;\n\t\t}\n\t\telse {\n\t\t\t\n\t\t\tif(_nextMove - 1 < 0)\n\t\t\t\t_nextMove = movingPattern.size() - 1;\n\t\t\telse\n\t\t\t\t_nextMove--;\n\t\t\t\n\t\t\t_reverse = true;\n\t\t}\n\t}", "public static void reverse(int[] numbers) {\n\t\tfor(int i = 0; i < numbers.length / 2; i++) {\n\t\t\tint tempVar = numbers[i];\n\t\t\tnumbers[i] = numbers[numbers.length - 1 - i];\n\t\t\tnumbers[numbers.length - 1 - i] = tempVar;\n\t\t}\n\t}", "@Override\n\tpublic boolean reverseAccrualIt() {\n\t\treturn false;\n\t}", "public static void reverse(int[] array) {\n\t\tfor (int i=0; i<array.length/2;i++) {\n\t\t\tint s = array[i];\n\t\t\tarray[i] = array[array.length-1-i];\n\t\t\tarray[array.length-1-i] = s;\n\t\t}\n\t}", "public static void reverse(int[] a){\n \n int n = a.length;\n \n for(int i = 0; i<n/2;i++){\n int c = a[i];\n int d = a[n-1-i];\n int temp=0;\n \n temp =c;\n c= d;\n d=temp;\n a[i]= c;\n a[n-1-i]=d;\n }\n \n \n \n }", "private static void iterateLinkedListInReverseOrder() {\n\t\tLinkedList<Integer> list = new LinkedList<Integer>();\n\t\tlist.add(10);\n\t\tlist.add(20);\n\t\tlist.add(30);\n\t\tlist.add(40);\n\t\tlist.add(50);\n\t\tSystem.out.println(\"LinkedList is : \" + list);\n\t\tCollections.reverse(list);\n\t\tSystem.out.println(\"Reverse the LinkedList is : \" + list);\n\t}", "public void reverse(){\n\n\n SNode reverse =null;\n\n while(head != null) {\n\n SNode next= head.next;\n head.next=reverse;\n reverse = head;\n\n head=next;\n\n\n }\n head=reverse; // set head to reverse node. it mean next node was null and head should be previous node.\n\n\n }", "public void reverseDi() {\n int hi = size - 1;\n int lo = 0;\n\n while (lo < hi) {\n Node left = getNodeAt(lo);\n Node right = getNodeAt(hi);\n\n Object temp = left.data;\n left.data = right.data;\n right.data = temp;\n\n lo++;\n hi--;\n }\n }", "public void reverse(boolean ascending) {\n\t\tif (!ascending)\n\t\t\tCollections.reverse(FlightData.ITEMS);\n\t}", "void decrementOrderByOne( int nOrder, int nIdWorkflow );", "public static void main(String[] args) {\n \n LinkedList<Integer> l = new LinkedList<Integer>();\n l.add(1);\n l.add(2);\n l.add(3);\n l.add(4);\n ReverseCollection rev = new ReverseCollection();\n rev.reverse(l);\n System.out.println(Arrays.toString(l.toArray()));\n\n }", "public static <E> void reverse(E[] a) {\n Stack<E> buffer = new ArrayStack<>(a.length);\n for (int i = 0; i < a.length; i++)\n buffer.push(a[i]);\n for (int i = 0; i < a.length; i++)\n a[i] = buffer.pop();\n }", "public String reverse() {\n\t\treturn null;\n\t}", "public String getReverse() {\r\n return reverse;\r\n }", "private void reverseAfter(int i) {\n int start = i + 1;\n int end = n - 1;\n while (start < end) {\n swap(index, start, end);\n start++;\n end--;\n }\n }", "public void backDown(){\n backSolenoid.set(DoubleSolenoid.Value.kReverse);\n }", "public static void main(String[] args) {\n\t\tint [] a= {1,2,3,4,5,6,7};\n\t\trev(a,0,a.length-1);\t\n\t}", "void reverseList(){\n\n Node prev = null;\n Node next = null;\n Node iter = this.head;\n\n while(iter != null)\n {\n next = iter.next;\n iter.next = prev;\n prev = iter;\n iter = next;\n\n }\n\n //prev is the link to the head of the new list\n this.head = prev;\n\n }", "public static void main(String[] args) {\n Integer arr[] = {10, 20, 30, 40, 50}; \n \n System.out.println(\"Original Array : \" + \n Arrays.toString(arr)); \n \n // Please refer below post for details of asList() \n \n Collections.reverse(Arrays.asList(arr)); \n \n System.out.println(\"Modified Array : \" + \n Arrays.toString(arr)); \n\t\t\n\t\t\n\t\t\n\t}", "public void reverseDirection(Position ep) throws InvalidPositionException;", "public MyStringBuilder2 reverse()\n\t{\n\t\t\t\tCNode currNode = firstC;\n\t\t\t\tCNode nextNode = null;\n\t\t\t\tCNode prevNode = null;\n\t\t\t\trecursiveReverse(currNode, nextNode, prevNode);\n\t\t\t\treturn this;\n\t}", "static void reverse( String[]array) {\n\t\tfor (int i = array.length-1; i >=0; i--) {\n\t\t\tSystem.out.println(array[i]);\n\t\t}\n\t}", "public void flip() {\r\n\t\tObject[] bak = path.toArray(new Direction[path.size()]);\r\n\t\tpath.clear();\r\n\t\tfor (int i = bak.length-1; i >= 0; i--) {\r\n\t\t\tpath.push((Direction) bak[i]);\r\n\t\t}\r\n\t}", "public boolean getReverse() {\r\n return Reverse;\r\n }", "public boolean getReverse() {\r\n return Reverse;\r\n }", "private void flip() {\n ObservableList<Node> tmp = FXCollections.observableArrayList(this.getChildren());\n Collections.reverse(tmp);\n getChildren().setAll(tmp);\n setAlignment(Pos.TOP_LEFT);\n }", "private void flip() {\n ObservableList<Node> tmp = FXCollections.observableArrayList(this.getChildren());\n Collections.reverse(tmp);\n getChildren().setAll(tmp);\n setAlignment(Pos.TOP_LEFT);\n }", "private void flip() {\n ObservableList<Node> tmp = FXCollections.observableArrayList(this.getChildren());\n Collections.reverse(tmp);\n getChildren().setAll(tmp);\n setAlignment(Pos.TOP_LEFT);\n }", "public Digraph reverse() {\n Digraph reverse = new Digraph(ver);\n for (int v = 0; v < ver; v++) {\n for (int w : adj(v)) {\n reverse.addEdge(w, v);\n }\n }\n return reverse;\n }", "public void reverseX()\r\n {\r\n\t if(moveX < 0)\r\n\t\t moveX = moveX * (-1);\r\n\t else if(moveX > 0)\r\n\t\t moveX = moveX * (-1);\r\n }", "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 static void reverse(int[] arr, int i, int length) {\n\t\tif(i >= length)\r\n\t\t{\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tint temp=arr[i];\r\n\t\tarr[i]=arr[length];\r\n\t\tarr[length]=temp;\r\n\t\treverse(arr, i+1, length-1);\r\n\t}", "public static void reverseIterative(int[] data) {\n int low = 0, high = data.length - 1;\n while (low < high) { // swap data[low] and data[high]\n int temp = data[low];\n data[low++] = data[high]; // post-increment of low\n data[high--] = temp; // post-decrement of high\n }\n }", "Node reverseIterative(Node head) {\n\t\tNode prev = null;\n\t\tNode current = head;\n\t\tNode next = null;\n\t\twhile (current != null) {\n\t\t\tnext = current.next;\n\t\t\tcurrent.next = prev;\n\t\t\tprev = current;\n\t\t\tcurrent = next;\n\t\t}\n\t\thead = prev;\n\t\treturn head;\n\t}", "private static void reverse(int[] arr) {\n\t\t\r\n\t\tfor(int i=arr.length-1;i >=0;i--)\r\n\t\t{\r\n\t\t\tSystem.out.print(arr[i]+\" \");\r\n\t\t}\r\n\t}", "public void reverseLinkedList(){\n\t\tNode prev = null;\n\t\tNode current = head;\n\t\twhile (current != null){\n\t\t\tNode temp = current.next;\n\t\t\tcurrent.next = prev;\n\t\t\t// move pointers be careful must move previous to current first\n\t\t\tprev = current;\n\t\t\tcurrent = temp;\n\t\t\t\n\n\t\t}\n\t\tthis.head = prev;\n\t}", "public static String reverseComplement(final CharSequence seq)\n\t{\n\tfinal StringBuilder b=new StringBuilder(seq.length());\n\tfor(int i=0;i< seq.length();++i)\n\t\t{\n\t\tb.append(complement(seq.charAt((seq.length()-1)-i)));\n\t\t}\n\treturn b.toString();\n\t}", "private Code genArgsInReverse(ExpNode.ArgumentsNode args) {\n beginGen(\"ArgsInReverse\");\n List<ExpNode> argList = args.getArgs();\n Code code = new Code();\n for(int i = argList.size()-1; 0 <= i; i--) {\n code.append(argList.get(i).genCode(this));\n }\n endGen(\"ArgsInReverse\");\n return code;\n }", "public static void main(String[] args) {\n\t\t\n\t\tint[] a = {1,2,3,4,5,6};\n\t\t\n\t\tint[] rev = new int[a.length];\n\t\t\n\t\tfor(int i=a.length-1;i>=0;i--) {\n\t\t\trev[a.length-1-i] = a[i];\n\t\t}\n\t\t\n\t\tfor(int j=0;j<rev.length;j++) {\n\t\tSystem.out.println(rev[j]);\n\t}\n\n}", "public void reversePrint()\n {\n reversePrint(size-1);\n }", "public static void reverse(int[] array){\n int[] reverseArray = Arrays.copyOf(array,array.length);\n for(int i=0;i<array.length;i++){\n reverseArray[i]=array[array.length-i-1];\n }\n System.out.println(\"The reversed assay is:\"+ Arrays.toString(reverseArray));\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 }", "public String backwards()\n\t{\n\t\tString answer = \"\";\n\t\tDLLNode cursor = tail;\n\t\twhile (cursor != null)\n\t\t{\n\t\t\tanswer = \"<--\" + cursor.data + answer;\n\t\t\tcursor = cursor.prev;\n\t\t}\n\n\t\tanswer = \"(null)\" + answer;\n\t\treturn answer;\n\t}", "public static void main(String[] args) {\n// reverse(queue);\n// System.out.println(queue);\n\n Stack<Integer> stack=new Stack<>();\n stack.push(1);\n stack.push(2);\n stack.push(3);\n stack.push(4);\n System.out.println(stack);\n stack=reverse(stack);\n System.out.println(stack);\n\n\n\n\n }", "public void setReverse(boolean reverse) {\n\t\t_reverse = reverse;\n\t}", "@Override\n\tpublic IDnaStrand reverse() {\n\t\tLinkStrand reversed = new LinkStrand();\n\t\tNode current = new Node(null);\n\t\tcurrent = myFirst;\n\t\t\n\t\twhile (current != null) {\n\t\t\t\n\t\t\tStringBuilder copy = new StringBuilder(current.info);\n\t\t\tcopy.reverse();\n\t\t\tNode first = new Node(copy.toString());\n\t\t\t\n\t\t\tfirst.next = reversed.myFirst;\n\t\t\tif (reversed.myLast == null) {\n\t\t\t\treversed.myLast = reversed.myFirst;\n\t\t\t\treversed.myLast.next = null;\n\t\t\t\t\n\t\t\t}\n\t\t\treversed.myFirst = first;\n\t\t\treversed.mySize += copy.length();\n\t\t\treversed.myAppends ++;\n\t\t\t\n\t\t\t\n\t\t\tcurrent = current.next;\n\t\t\t\n\t\t}\n\t\treturn reversed;\n\t}", "public void backward()\n\t{\n\t\tupdateState( MotorPort.BACKWARD);\n\t}", "private static int[] reverse(int[] original) {\n int size = original.length;\n int[] reversed = new int[size];\n for(int i=0; i<size; i++) {\n reversed[i]= original[size - i-1];\n }\n return reversed;\n }", "public static void main(String[] args) {\r\n\t\t\r\n\t\tint a[]= {10,30,50,70,89,76,67,43,90};\r\n\t\tint temp;\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(\"ORIGNAL ARRAY\");\r\n\t\tfor (int i = 0; i < a.length; i++) {\r\n\t\t\tSystem.out.print(a[i]+\" \");\r\n\t\t}\r\n\t\t\r\n\t\t\r\nfor (int i = 0; i < a.length; i++) {\r\n\t\t\t\r\n\t\tfor (int j = i+1; j < a.length; j++) {\r\n\t\t\t\r\n\t\t\t\r\n\t\t\ttemp=a[i];\r\n\t\t\ta[i]=a[j];\r\n\t\t\ta[j]=temp;\r\n\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(\"\\n\\nREVERSE ARRAY\");\r\n\t\tfor (int i = 0; i < a.length; i++) {\r\n\t\t\tSystem.out.print(a[i]+\" \");\r\n\t\t}\r\n\t}", "private static int[] reverseArray(int[] inputs) {\n for(int i =0; i < inputs.length/2; i++) {\n int tmp = inputs[i];\n int nextPosition = (inputs.length - i) -1;\n inputs[nextPosition] = tmp;\n }\n return inputs;\n }", "private static Node reverseList(Node start) {\n Node runner = start;\n // initialize the return value\n Node rev = null;\n // set the runner to the last item in the list\n while (runner != null) {\n Node next = new Node(runner.value);\n next.next = rev;\n rev = next;\n runner = runner.next;\n }\n return rev;\n }", "public void getReverse(byte[] is, int offset, int length) {\n\t\tfor (int i = offset + length - 1; i >= offset; i--) {\n\t\t\tis[i] = payload.get();\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tSystem.out.println(reverse(\"foo\"));\n\t\tSystem.out.println(reverse(\"student\"));\n\t\t\n\t}", "public void printInReverseOrder() {\n\t\tNode currentNode = headNode;\n\t\tNode previousNode = headNode;\n\t\t\n\t\tif(currentNode==null) {\n\t\t\treturn;\n\t\t} else {\n\t\t\tList<Node> listOfNodes = new ArrayList<Node>();\n\t\t\t//deal One element LinkedList\n\t\t\tif(currentNode.getNextNode()==null) {\n\t\t\t\tSystem.out.println(currentNode.getData());\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\twhile(currentNode.getNextNode()!=null) {\n\t\t\t\t\tpreviousNode = currentNode;\n\t\t\t\t\tcurrentNode = currentNode.getNextNode();\n\t\t\t\t\tlistOfNodes.add(previousNode);\n\t\t\t\t\tSystem.out.println(\" Adding Node value to the List as \"+currentNode.getData());\n\t\t\t\t}\n\t\t\t\tif(currentNode!=null) {\n\t\t\t\t\tSystem.out.println(\" The Last Node is \"+currentNode.getData());\n\t\t\t\t\tcurrentNode = previousNode.getNextNode();\n\t\t\t\t\tSystem.out.println(\" The Last Node's Next Node is \"+currentNode.getData());\n\n\t\t\t\t\tlistOfNodes.add(currentNode);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(listOfNodes!=null && listOfNodes.size()>0) {\n\t\t\t\t\tCollections.reverse(listOfNodes);\n\t\t\t\t\tlistOfNodes.stream().forEach(elem->System.out.print(elem.data+\" =>\"));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}", "public void flipIndexes() {\n int temp = index1;\n index1 = index2;\n index2 = temp;\n }", "void reverse(string str) \n{ \n for (int i=str.length()-1; i>=0; i--) \n cout << str[i]; \n}", "public void startReverse() {\n startHelper(f_startDirection.getOppositeDirection(), \"startReverse()\");\n }", "public boolean reverse() {\n if (type == 0) {\n return false;\n }\n type = (type == 1) ? 2 : 1;\n isFresh = false;\n return true;\n }", "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 void go_to_reverse_position() {\n stop_hold_arm();\n Pneumatics.get_instance().set_solenoids(false);\n Dispatcher.get_instance().add_job(new JMoveArm(RobotMap.Arm.pot_value_reverse, 0.9, 0.7, 0.7, 0.2, 0.8, false, false));\n hold_arm();\n }", "public E[] reverseList(E[] toReverse) {\n\t\tfor (int i = 0; i < toReverse.length / 2; i++) {\n\t\t\tE temp = toReverse[i];\n\t\t\ttoReverse[i] = toReverse[toReverse.length - 1 - i];\n\t\t\ttoReverse[toReverse.length - 1 - i] = temp;\n\t\t}\n\t\treturn toReverse;\n\t}", "private static void reverse(int[] myArray) {\n int temp;\n for (int i = 0; i < myArray.length / 2; i++) {\n// System.out.println(\"first = \" + myArray[i]);\n// System.out.println(\"last = \" + myArray[myArray.length - 1 - i]);\n temp = myArray[i];\n myArray[i] = myArray[myArray.length - 1 - i];\n myArray[myArray.length - 1 - i] = temp;\n }\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 }", "public static String reverseCompDNA(String seq) {\n\t\tString reverse = new StringBuilder(seq).reverse().toString();\n\t\tStringBuilder rcRes = new StringBuilder();\n\n\t\tfor (int i=0; i < reverse.length(); i++) {\n\t\t\trcRes.append(getComplementBP(reverse.charAt(i)));\n\t\t}\n\n\t\treturn rcRes.toString();\n\t}" ]
[ "0.73538697", "0.73538697", "0.7239963", "0.7231543", "0.7134793", "0.7043444", "0.69754237", "0.6877122", "0.68533057", "0.683556", "0.6766928", "0.676368", "0.6753293", "0.6676249", "0.667133", "0.6607286", "0.658017", "0.6566582", "0.65558714", "0.65033835", "0.6459156", "0.64164084", "0.63955456", "0.6378384", "0.63330543", "0.63305336", "0.62724704", "0.62459564", "0.6223397", "0.6194224", "0.61772394", "0.6175245", "0.6173269", "0.6171609", "0.6120319", "0.60940593", "0.6083977", "0.6074425", "0.6070674", "0.60600495", "0.6041067", "0.6017633", "0.60081875", "0.6002541", "0.5983939", "0.5961352", "0.5958029", "0.5931121", "0.5927994", "0.5917821", "0.591048", "0.58864576", "0.5881008", "0.5866489", "0.5845478", "0.58374447", "0.58370394", "0.5836534", "0.5833333", "0.58330184", "0.58330184", "0.58309263", "0.58309263", "0.58309263", "0.58067346", "0.5798323", "0.5798261", "0.5793003", "0.5785608", "0.57849014", "0.5784466", "0.5783705", "0.5763307", "0.5760441", "0.5757704", "0.57575166", "0.57395744", "0.5739542", "0.57149994", "0.5707503", "0.5704229", "0.570306", "0.56985295", "0.5695964", "0.5693547", "0.56908184", "0.5677844", "0.56770307", "0.56763995", "0.5668268", "0.56614655", "0.5654071", "0.56483036", "0.5645216", "0.5645026", "0.5642481", "0.5631273", "0.5630537", "0.56303793", "0.56213313" ]
0.8093882
0
Changes sequence to the complementary one.
public void complement() { ArrayList<Character> newSeq = new ArrayList<Character>(); for (char c : seq) { newSeq.add(complement(c)); } seq = newSeq; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 }", "private void nextMovement()\n\t{\n\t\tif(SEQUENCE.length <= 1)\n\t\t\tSEQUENCE = null;\n\t\telse\n\t\t{\n\t\t\tint[] temp = new int[SEQUENCE.length - 1];\n\t\t\tfor(int i = 1; i < SEQUENCE.length; i++)\n\t\t\t{\n\t\t\t\ttemp[i-1] = SEQUENCE[i];\n\t\t\t}\n\t\t\tSEQUENCE = temp;\n\t\t}\n\t}", "@Override\n\tpublic int sequence() {\n\t\treturn 0;\n\t}", "public void consumir(int consID, int consSeq) {\n\t}", "public int[] Version1(int[] seq){\n \n return seq;\n \n }", "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 }", "void resetSequential() {\n seq = nextLong(PRAND, maxSeq);\n inc = minInc + nextLong(PRAND, maxInc - minInc);\n }", "protected void incrementSeqNum() {\n intToNetworkByteOrder(mySeqNum++, sequenceNum, 0, 4);\n }", "public void setSequence(Integer sequence) {\n this.sequence = sequence;\n }", "public void setSeq(Integer seq) {\n this.seq = seq;\n }", "public void setSeq(Integer seq) {\n this.seq = seq;\n }", "public void setSeq(Integer seq) {\n this.seq = seq;\n }", "void setSeq(long seq) {\n this.seq = seq;\n }", "public void setCompositorAsSequence() {\n _compositor = SEQUENCE;\n }", "int getSeq();", "int getSeq();", "int getSeq();", "public void modifySequence(String sequence) {\n this.sequence = sequence;\n }", "protected void resetSequence() {\n doQuery(\"ALTER SEQUENCE feedentryqueue_id_seq RESTART\");\n }", "public void setSequence(Integer sequence)\n {\n if (sequence == null)\n sequence = 0;\n \n if (sequence < 0)\n throw new IllegalArgumentException(\"sortrank must be >= 0\");\n \n this.sequence = sequence;\n }", "@Test\n\tpublic void testEquivalentSequences(){\n\t\tchord = new Chord(1, Tonality.maj, 4);\n\t\tChord chord2 = new Chord(1, Tonality.maj, 4);\n\t\tassertTrue(chord.equals(chord2));\n\t\tassertTrue(chord2.equals(chord));\n\n\t\tLinkedList<Chord> sequence = new LinkedList<Chord>();\n\t\tLinkedList<Chord> sequence2 = new LinkedList<Chord>();\n\n\t\tsequence.add(chord);\n\t\tsequence.add(chord2);\n\t\tsequence2.add(chord);\n\t\tsequence2.add(chord2);\n\t\tassertEquals(sequence, sequence2);\n\n\t\tsequence2.clear();\n\t\tsequence2.addAll(sequence);\n\t\tassertEquals(sequence, sequence2);\n\t}", "protected abstract void recombineNext();", "public double[] sequence()\n\t{\n\t\treturn _adblSequence;\n\t}", "public int getNextUnSafeSequence(){ return value++;}", "public void setComplementary_start(long complementary_start) {\n this.complementary_start = complementary_start;\n }", "public int getSeq() {\n return -1;\n }", "public void applySequence(Sequence seq) {\n List<Game> games = seq.getGames();\n int nextStart = 0;\n for (Game game : games) {\n game.setStart(nextStart);\n nextStart += game.getDuration();\n }\n tau.setStart(nextStart);\n sequence = seq;\n }", "void fill()\n\t{\n\t\tif(!mySeq.isEmpty())\n\t\t{\t\n\t\t\tPair temp = mySeq.removeFirst();\t\t\n\t\t\tthis.nextPos = temp.getSecond();\n\t\t\tthis.myTurn = temp.getFirst();\n\t\t}\n\t}", "public void sequenceSwaps(int[] tempItem1, int[] tempItem2, Vector<int[]> cyclePosition, int distTotal, Vector<int[]> sequence, int mut_rate){\n boolean b;\n int[] cycles2 = new int[cyclePosition.size()];\n int nrSwaps = 0;\n Arrays.fill(cycles2,-1);\n sequence.clear();\n while(true){\n int j = r.nextInt(cyclePosition.size());\n\n b = false;\n for(int i = 0; i < cycles2.length; i++)\n if(cycles2[i] == -1){\n b = true;\n break;\n }\n if(!b){\n break;\n }\n while(cycles2[j] != -1)\n j = r.nextInt(cyclePosition.size());\n cycles2[j] = 1;\n int[] indexSwap = cyclePosition.elementAt(j).clone();\n int dist = indexSwap.length; //+1;//ps1.getDistance(tempDist1,tempDist2);\n\n //\n int rInt = r.nextInt(indexSwap.length);\n int indexI, indexII;\n \n //tempR.clear();\n for(int i = 0; i < dist-1; i++){\n indexI = tempItem1[indexSwap[rInt]];\n //find indexI in temp2\n indexII = -1;\n for(int k = 0; k < indexSwap.length; k++)\n if(tempItem2[indexSwap[k]] == indexI){\n indexII = indexSwap[k];\n break;\n }\n \n int[] tempInt = new int[2];\n tempInt[0] = indexII;\n tempInt[1] = indexSwap[rInt];\n\n sequence.add(tempInt);\n\n //swaps the two positions\n int temp = tempItem1[indexSwap[rInt]];\n tempItem1[indexSwap[rInt]]=tempItem1[indexII];\n tempItem1[indexII]=temp;\n\n nrSwaps++;\n if(nrSwaps >= mut_rate-1)\n break;\n\n }\n if(nrSwaps >= mut_rate-1)\n break;\n }\n }", "public void sync() {\n\t\t\n\t\tfor (int i = 0; i <= temporary.length - 1; i++) {\n\t\t\tfinalized[i] = temporary[i];\n\t\t}\n\n//TODO:\t\ttemporary.clear();\n\t}", "public void setCSeq\n (CSeqHeader cseqHeader) {\n this.setHeader(cseqHeader);\n }", "ISequence sequence();", "private void setCarry() {\n if (carry[noThread] == 2) {\n int index = noThread - 1;\n do {\n carry[noThread] = carry[index];\n index--;\n } while (carry[noThread] == 2);\n }\n }", "public static String reverseComplement(final CharSequence seq)\n\t{\n\tfinal StringBuilder b=new StringBuilder(seq.length());\n\tfor(int i=0;i< seq.length();++i)\n\t\t{\n\t\tb.append(complement(seq.charAt((seq.length()-1)-i)));\n\t\t}\n\treturn b.toString();\n\t}", "Sequence createSequence();", "public void setSequence(String sequence) {\r\n this.sequence = sequence;\r\n }", "@Override\n public boolean includeSequence(Sequence sequence) {\n return false;\n }", "public int getSequence() {\n return sequence;\n }", "public final void setSequence(java.lang.Integer sequence)\r\n\t{\r\n\t\tsetSequence(getContext(), sequence);\r\n\t}", "public void displayComSeq(){\t\n\t\tThread t = new Thread(new Runnable() {\n\t\t\tpublic void run(){\n\t\t\t\tcompTurn = true;\n\t\t\t\tRandom random = new Random();\n\t\t\t\tint val = random.nextInt(5 - 1)+1;\n\t\t\t\tinput.add(val);\n\t\t\t\tdisplayCounter = 0;\n\t\t\t\tdisplayTimer.start();\n\t\t\t}\n\t\t});\n\t\tt.start();\n\t}", "ArrayList<Integer> getSequence() {\n return sequence;\n }", "public static void setSequence(Sequence m){\n\t\tcurMIDI = m;\n\t}", "@IcalProperty(pindex = PropertyInfoIndex.SEQUENCE,\n eventProperty = true,\n todoProperty = true,\n journalProperty = true\n )\n public void setSequence(final int val) {\n sequence = val;\n }", "public Builder clearSeq() {\n\n seq_ = 0;\n onChanged();\n return this;\n }", "public Builder clearSeq() {\n\n seq_ = 0;\n onChanged();\n return this;\n }", "public Integer getSequence()\n {\n return sequence;\n }", "public void cpl() {\n\t\tint op = registers.getRegister(Register.A);\n\t\tint result = invert(op);\n\t\tregisters.setRegister(Register.A, result);\n\n\t\tregisters.setFlag(Flag.H, true);\n\t\tregisters.setFlag(Flag.N, true);\n\t}", "long getOriginseqnum();", "void removeHas_consequence(Consequence oldHas_consequence);", "public void toUpper() {\n ArrayList<Character> newSeq = new ArrayList<Character>();\n for (char c : seq) {\n newSeq.add(Character.toUpperCase(c));\n }\n seq = newSeq;\n }", "public void advance()\n\t{\n\t\t//calling copy function\n\t\tcopy(); \n\t\t//for loop for row \n\t\tfor(int row =0; row<this.currentVersion.length; row++)\n\t\t{\t//for loop for column\n\t\t\tfor(int column =0; column<this.currentVersion[row].length; column++)\n\t\t\t{\n\t\t\t\t//if statements to implement 2D CA rules\n\t\t\t\tif (column == 0 && row == 0)\n\t\t\t\t{\n\t\t\t\t\tif(currentVersion[row+1][column] == currentVersion[row][column] + 1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row+1][column];\n\t\t\t\t\telse if(currentVersion[row][column+1] == currentVersion[row][column] +1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row][column +1];\n\t\t\t\t\telse if (currentVersion[row][column] == 0)\n\t\t\t\t\t\tnextVersion[row][column] = 1; \n\t\t\t\t\telse if (currentVersion[row][column] == state-1)\n\t\t\t\t\t\tnextVersion[row][column] = 0; \n\t\t\t\t\telse if(currentVersion[row][column] == state-2)\n\t\t\t\t\t\tnextVersion[row][column] = (byte) (state-1);\n\t\t\t\t}\n\t\t\t\tif (row == 0 && column == currentVersion.length-1)\n\t\t\t\t{\n\t\t\t\t\tif(currentVersion[row][column - 1] == currentVersion[row][column] +1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row][column - 1];\n\t\t\t\t\telse if (currentVersion[row+1][column] == currentVersion [row][column] +1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row+1][column];\n\t\t\t\t\telse if (currentVersion[row][column] == 0)\n\t\t\t\t\t\tnextVersion[row][column] = 1; \n\t\t\t\t\telse if (currentVersion[row][column] == state-1)\n\t\t\t\t\t\tnextVersion[row][column] = 0; \n\t\t\t\t\telse if(currentVersion[row][column] == state-2)\n\t\t\t\t\t\tnextVersion[row][column] = (byte) (state-1);\n\t\t\t\t}\n\t\t\t\tif (row == 0 && column > 0 && column < currentVersion.length-1)\n\t\t\t\t{\n\t\t\t\t\tif(currentVersion[row][column-1] == currentVersion[row][column] + 1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row][column-1];\n\t\t\t\t\telse if(currentVersion[row+1][column] == currentVersion[row][column] + 1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row+1][column];\n\t\t\t\t\telse if(currentVersion[row][column+1] == currentVersion[row][column] +1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row][column+1];\n\t\t\t\t\telse if (currentVersion[row][column] == 0)\n\t\t\t\t\t\tnextVersion[row][column] = 1; \n\t\t\t\t\telse if (currentVersion[row][column] == state-1)\n\t\t\t\t\t\tnextVersion[row][column] = 0; \n\t\t\t\t\telse if(currentVersion[row][column] == state-2)\n\t\t\t\t\t\tnextVersion[row][column] = (byte) (state-1);\n\t\t\t\t}\n\t\t\t\tif (row == currentVersion.length-1 && column == 0)\n\t\t\t\t{\n\t\t\t\t\tif(currentVersion[row-1][column] == currentVersion[row][column] + 1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row -1][column]; \n\t\t\t\t\telse if(currentVersion[row][column+1] == currentVersion[row][column] + 1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row][column+1];\n\t\t\t\t\telse if (currentVersion[row][column] == 0)\n\t\t\t\t\t\tnextVersion[row][column] = 1; \n\t\t\t\t\telse if (currentVersion[row][column] == state-1)\n\t\t\t\t\t\tnextVersion[row][column] = 0; \n\t\t\t\t\telse if(currentVersion[row][column] == state-2)\n\t\t\t\t\t\tnextVersion[row][column] = (byte) (state-1);\n\t\t\t\t}\n\t\t\t\tif (row > 0 && column ==0 && row < currentVersion.length-1)\n\t\t\t\t{\n\t\t\t\t\tif(currentVersion[row+1][column] == currentVersion[row][column]+1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row+1][column];\n\t\t\t\t\tif(currentVersion[row][column+1] == currentVersion[row][column]+1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row][column+1];\n\t\t\t\t\telse if (currentVersion[row][column] == 0)\n\t\t\t\t\t\tnextVersion[row][column] = 1; \n\t\t\t\t\telse if (currentVersion[row][column] == state-1)\n\t\t\t\t\t\tnextVersion[row][column] = 0; \n\t\t\t\t\telse if(currentVersion[row][column] == state-2)\n\t\t\t\t\t\tnextVersion[row][column] = (byte) (state-1);\n\t\t\t\t}\n\t\t\t\tif(row == currentVersion.length-1 && column == currentVersion.length-1)\n\t\t\t\t{\n\t\t\t\t\tif(currentVersion[row-1][column] == currentVersion[row][column] +1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row-1][column];\n\t\t\t\t\telse if(currentVersion[row][column-1] == currentVersion[row][column]+1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row][column-1];\n\t\t\t\t\telse if (currentVersion[row][column] == 0)\n\t\t\t\t\t\tnextVersion[row][column] = 1; \n\t\t\t\t\telse if (currentVersion[row][column] == state-1)\n\t\t\t\t\t\tnextVersion[row][column] = 0; \n\t\t\t\t\telse if(currentVersion[row][column] == state-2)\n\t\t\t\t\t\tnextVersion[row][column] = (byte) (state-1);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif(row == currentVersion.length-1 && column > 0 && column < currentVersion.length-1)\n\t\t\t\t{\n\t\t\t\t\tif(currentVersion[row-1][column] == currentVersion[row][column]+1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row-1][column];\n\t\t\t\t\telse if(currentVersion[row][column-1] == currentVersion[row][column]+1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row][column-1]; \n\t\t\t\t\telse if(currentVersion[row][column+1] == currentVersion[row][column] +1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row][column+1];\n\t\t\t\t\telse if (currentVersion[row][column] == 0)\n\t\t\t\t\t\tnextVersion[row][column] = 1; \n\t\t\t\t\telse if (currentVersion[row][column] == state-1)\n\t\t\t\t\t\tnextVersion[row][column] = 0; \n\t\t\t\t\telse if(currentVersion[row][column] == state-2)\n\t\t\t\t\t\tnextVersion[row][column] = (byte) (state-1);\n\t\t\t\t}\t\n\t\t\t\tif(row>0 && row < currentVersion.length-1 && column == currentVersion.length-1)\n\t\t\t\t{\n\t\t\t\t\tif (currentVersion[row-1][column] == currentVersion[row][column]+1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row-1][column];\n\t\t\t\t\telse if(currentVersion[row+1][column] == currentVersion[row][column]+1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row+1][column]; \n\t\t\t\t\telse if(currentVersion[row][column-1] == currentVersion[row][column]+1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row][column-1];\n\t\t\t\t\telse if (currentVersion[row][column] == 0)\n\t\t\t\t\t\tnextVersion[row][column] = 1; \n\t\t\t\t\telse if (currentVersion[row][column] == state-1)\n\t\t\t\t\t\tnextVersion[row][column] = 0; \n\t\t\t\t\telse if(currentVersion[row][column] == state-2)\n\t\t\t\t\t\tnextVersion[row][column] = (byte) (state-1);\n\t\t\t\t}\n\t\t\t\tif(row>0 && row < currentVersion.length-1 && column > 0 && column < currentVersion.length-1)\n\t\t\t\t{\n\t\t\t\t\tif (currentVersion[row-1][column] == currentVersion[row][column]+1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row-1][column];\n\t\t\t\t\telse if(currentVersion[row+1][column] == currentVersion[row][column]+1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row+1][column]; \n\t\t\t\t\telse if(currentVersion[row][column-1] == currentVersion[row][column]+1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row][column-1];\n\t\t\t\t\telse if(currentVersion[row][column+1] == currentVersion[row][column]+1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row][column+1];\n\t\t\t\t\telse if (currentVersion[row][column] == 0)\n\t\t\t\t\t\tnextVersion[row][column] = 1; \n\t\t\t\t\telse if (currentVersion[row][column] == state-1)\n\t\t\t\t\t\tnextVersion[row][column] = 0;\n\t\t\t\t\telse if(currentVersion[row][column] == state-2)\n\t\t\t\t\t\tnextVersion[row][column] = (byte) (state-1);\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\t\t}\n\t//passing new nextVersion array to currentVersion array\n\tsetUniverse(nextVersion);\n\t}", "public String getSequence()\r\n\t{\r\n\t\treturn sequence;\r\n\t}", "public void setActiveSequence(Sequence sequence) {\n\t\tif(!sequences.contains(sequence) && sequence != null) {\n\t\t\tLogger.log(\"New sequence added: \" + sequence.getName());\n\t\t\tsequences.add(sequence);\n\t\t}\n\t\t\n\t\tif(sequence == null) {\n\t\t\tLogger.log(\"Active sequence set to: NULL\");\n\t\t} else {\n\t\t\tLogger.log(\"Active sequence set to: \" + sequence.getName());\n\t\t}\n\t\t\n\t\tactiveSequence = sequence;\n\t}", "private static void translate(Sequence seq) {\n int frame;\n if(seq.getFrameWithLongestORF()==2){\n frame =0;\n }\n else if (seq.getFrameWithLongestORF()==0){\n //** TEst annomalies??? this frame produces the best aa\n frame = 0;\n }\n else if (seq.getFrameWithLongestORF()==1){\n frame = 2;\n }\n else if(seq.getFrameWithLongestORF()==3){\n frame = 0;\n compliment(seq);\n }\n else if(seq.getFrameWithLongestORF()==4){\n frame = 1;\n compliment(seq);\n }\n else{\n frame = 2;\n compliment(seq);\n }\n String temp = seq.getRawSeq();\n StringBuilder finalreturn = new StringBuilder();\n String codon;\n for (int i = frame; i < seq.getLength() - 2; i+=3) {\n codon = temp.substring(i, i+3);\n if(codon.contains(\"N\") || codon.contains(\"n\")){\n finalreturn.append(\"^\");\n }\n else {\n finalreturn.append(codonsMap.get(codon));\n }\n }\n seq.setTranslatedAA(finalreturn.toString());\n }", "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}", "public Builder setSeq(int value) {\n\n seq_ = value;\n onChanged();\n return this;\n }", "public Builder setSeq(int value) {\n\n seq_ = value;\n onChanged();\n return this;\n }", "public void reversarComprobanteContabilidad() {\r\n String ide_cnccc = ser_comprobante.reversarComprobante(tab_tabla1.getValorSeleccionado(), null);\r\n if (guardarPantalla().isEmpty()) {\r\n utilitario.agregarMensaje(\"Se genero el Comprobante Num: \", ide_cnccc);\r\n }\r\n }", "private void changeCurIndex() {\n\t\tint TexID=-1;\r\n\t\tif(ApplicationInfo.Destination == Constants.TO_FRONT)\r\n\t\t{\r\n\t\t\tCurIndex=++CurIndex >= mApplications.size()? 0 : CurIndex;\r\n\t\t\tif((TexID=mApplications.get(getPreIndex()).getReady()) != -1)\r\n\t\t\t\tunSetTexID(TexID);\r\n \t\t\tmApplications.get(getPreIndex()).setReady(-1);\r\n\t\t}\r\n\t\telse if(ApplicationInfo.Destination == Constants.TO_BACK)\r\n\t\t{\r\n\t\t\tCurIndex=--CurIndex < 0? mApplications.size()-1 : CurIndex;\r\n\t\t\tif((TexID=mApplications.get(getNextIndex()).getReady()) != -1)\r\n\t\t\t\tunSetTexID(TexID);\r\n\t\t\tmApplications.get(getNextIndex()).setReady(-1);\r\n\t\t}\r\n\t\tLog.d(TAG, \"changeCurIndex :\"+CurIndex);\r\n\t}", "void setSequenceNumber(int sequenceNumber);", "protected void reset()\n {\n super.reset();\n m_seqNum = 1;\n }", "public static String reverseCompDNA(String seq) {\n\t\tString reverse = new StringBuilder(seq).reverse().toString();\n\t\tStringBuilder rcRes = new StringBuilder();\n\n\t\tfor (int i=0; i < reverse.length(); i++) {\n\t\t\trcRes.append(getComplementBP(reverse.charAt(i)));\n\t\t}\n\n\t\treturn rcRes.toString();\n\t}", "@Test\r\n\tpublic void testLastElementInHeadOfL11() {\r\n\t\tl1 = Arrays.asList(1,2);\r\n\t\tl2 = Arrays.asList(2,1);\r\n\t\tassertTrue(\"The list L1 is a subseq of L2\", sequencer.subSeq(l1, l2));\r\n\t}", "protected int getSeqIndex()\n {\n return seqIndex;\n }", "public Integer getSeq() {\n return seq;\n }", "public Integer getSeq() {\n return seq;\n }", "public Integer getSeq() {\n return seq;\n }", "java.lang.String getSeq();", "public void setSequenceNumber(int sequence) {\n\t\tfSequenceNumber= sequence;\n\t}", "public void seq_SET(char src)\n { set_bytes((char)(src) & -1L, 2, data, 0); }", "public void setDisplaySequence(Integer value) {\n this.displaySequence = value;\n }", "public void setSeqNo (int SeqNo);", "public void setSeqNo (int SeqNo);", "public Integer getSequence() {\n return sequence;\n }", "private int proximo_sequencia(int atual){\n if (atual + Utils.tamanho_util_pacote > Utils.numero_max_seq) return (atual + Utils.tamanho_util_pacote) - Utils.numero_max_seq;\n else return atual + Utils.tamanho_util_pacote;\n\n }", "void FlipBook()\r\n\t\t{\r\n\t\t\t Collections.reverse(this);\r\n\t\t}", "@Override\n public int continuar() {\n // TODO Auto-generated method stub\n return 0;\n }", "public String getSequence() {\r\n return sequence;\r\n }", "public SequenceRegion sequencesAfter(Sequence sequence) {\n\tthrow new PasseException();\n/*\nudanax-top.st:15736:SequenceSpace methodsFor: 'smalltalk: passe'!\n{SequenceRegion} sequencesAfter: sequence {Sequence}\n\t\"Essential. All sequences greater than or equal to the given sequence.\n\tShould this just be supplanted by CoordinateSpace::region ()?\"\n\tself passe.\n\t^SequenceRegion usingx: false\n\t\twith: (PrimSpec pointer arrayWith: (BeforeSequence make: sequence))!\n*/\n}", "public Builder clearSeq() {\n bitField0_ = (bitField0_ & ~0x00000040);\n seq_ = getDefaultInstance().getSeq();\n onChanged();\n return this;\n }", "FeedbackConsequence getConsequence();", "private void presentShowcaseSequence() {\n }", "public static void main(String[] args) {\n\n\n int b[] = ArrayHelper.generateSequenceArray(10);\n ArrayHelper.printArray(b);\n rotate(b,6);\n ArrayHelper.printArray(b);\n\n\n\n }", "static synchronized long getNextSeqNumber() {\n return seqNumber++;\n }", "public static void intercambiar(int []Grado1, int ii, int jj){\nint aux=Grado1[ii];\nGrado1[ii]= Grado1[jj];\nGrado1[jj]=aux;\n}", "private long getSeqNum() throws Exception {\n\t\tSystem.out.println(\"seq: \" + seq);\n\t\tif (seq == 256) {\n\t\t\tseq = 0;\n\t\t}\n\t\treturn seq++;\n\t}", "public int getSeq() {\n return seq_;\n }", "public int getSeq() {\n return seq_;\n }", "public String getSequence() \n\t{\n\t\treturn sequence;\n\t\t\n\t}", "public void linearize() {\r\n Object[] temp = new Object[size];\r\n int k = start;\r\n for (int i = 0; i < size; i++) {\r\n temp[i] = cir[k];\r\n k = (k + 1) % cir.length;\r\n }\r\n cir = temp;\r\n }", "private static void atualizaContadorCodigos(ArrayList<Produto> produto) {\n int contadorAtual = produto.size() + 1;\n Produto.setContador(contadorAtual);\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 }", "public void rotate() { // rotate the first element to the back of the list\n // TODO\n if ( tail != null){\n tail = tail.getNext();\n }\n\n }", "public SequenceImpl() {\n super();\n initSequence();\n }", "public int getSeq() {\n return seq_;\n }", "public int getSeq() {\n return seq_;\n }", "public Sequence(){\r\n \r\n }", "public void insertReorderBarrier() {\n\t\t\n\t}", "private void dec_x()\n {\n synchronized(mLock_IndexX) { set_x(get_x() - 1); }\n }", "private void preComp(long from, long to) {\n\t\tfor (long i = from; i < to; i++) {\n\t\t\tif (isEmirp(i)) {\t\t\t\t\n\t\t\t\tpreComputedEmirps.add(i);\n\t\t\t}\n\t\t}\n\t\tlastComputedUpTo = to;\n\t}" ]
[ "0.69263095", "0.60745513", "0.58935994", "0.58357054", "0.58355373", "0.5684356", "0.55401945", "0.5505564", "0.5481371", "0.54211146", "0.54211146", "0.54211146", "0.53940725", "0.53047955", "0.52954143", "0.52954143", "0.52954143", "0.52783495", "0.5258154", "0.52055585", "0.51863784", "0.51748246", "0.5143841", "0.51323557", "0.51291674", "0.51193476", "0.51168776", "0.5112061", "0.5090622", "0.50736696", "0.5072367", "0.50704646", "0.5062129", "0.5057461", "0.5051917", "0.50342953", "0.50247616", "0.5020162", "0.5009728", "0.49943063", "0.49647593", "0.49559835", "0.49445173", "0.49444574", "0.49444574", "0.49409842", "0.49401554", "0.48888126", "0.48782125", "0.48781323", "0.48694053", "0.48660955", "0.48646432", "0.48640227", "0.4860051", "0.48572704", "0.48572704", "0.48544043", "0.4850378", "0.484386", "0.48408315", "0.48405087", "0.48404756", "0.48365816", "0.48349765", "0.48349765", "0.48349765", "0.4828352", "0.48258108", "0.48236585", "0.4819131", "0.48110884", "0.48110884", "0.47988302", "0.47964212", "0.4793524", "0.47903207", "0.47867814", "0.47841805", "0.47764027", "0.47749338", "0.477331", "0.47679943", "0.47612897", "0.47558555", "0.4754618", "0.47523397", "0.47523397", "0.47512272", "0.47447234", "0.47385314", "0.4737219", "0.47311452", "0.47306973", "0.47275895", "0.47275895", "0.47158504", "0.47140995", "0.47119117", "0.47083673" ]
0.65901697
1
Changes nucleotide c to the complementary one.
private char complement(char c) { switch (c) { case 'A': c = 'T'; break; case 'T': c = 'A'; break; case 'G': c = 'C'; break; case 'C': c = 'G'; break; case 'a': c = 't'; break; case 't': c = 'a'; break; case 'g': c = 'c'; break; case 'c': c = 'g'; break; default: c = 'N'; break; } return c; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void updateConseille(Conseille c) {\n\t\t\n\t}", "public void addConcullor(Councillor c) {\r\n\t\tthis.councillors.add(c);\r\n\t}", "public void setC(CCode c) {\n \t\tthis.c = c;\n \t}", "public void setC(String c) {\n this.c = c == null ? null : c.trim();\n }", "public void enfoncerChiffre(int c) {\n\t\tif (raz) {\n\t\t\tthis.valC = 0;\n\t\t}\n\t\tif (this.valC == 0) {\n\t\t\tthis.valC = c;\n\t\t\tthis.raz = false;\n\n\t\t}\n\t\telse {\n\t\t\tthis.valC = (this.valC * 10) + c;\n\t\t\tthis.raz = false;\n\t\t}\n\t}", "public void setConc(int x, int y, int z, double c) {\r\n\t\tquantity[x][y][z] = c*boxVolume;\r\n\t}", "public void setConc(double c) {\t\t\r\n\t\tfor(int i=0;i<boxes[0];i++)\r\n\t\t\tfor(int j=0;j<boxes[1];j++)\r\n\t\t\t\tfor(int k=0;k<boxes[2];k++) quantity[i][j][k] = c*boxVolume;\r\n\t}", "public void copy(CpElement c) {\n for (int i=0; i<Constants.CPELEMENT_LEN; i++) {\n this.value[i] = c.value[i];\n }\n }", "public void update(Conseiller c) {\n\t\t\r\n\t}", "private static void muta(Cromosoma c)\n\t{\n\t}", "public void setC(double value) {\n this.c = value;\n }", "public void setConc(Vector3d v, double c) {\r\n\t\tint[] b = boxCoords(v);\r\n\t\tsetConc(b[0],b[1],b[2],c);\r\n\t}", "public void deductCoin(int c) {\n setCoin(getCoin() - c);\n }", "public void setC(Color c) {\n\t\tthis.c = c;\n\t}", "public void setC(boolean c) {\n\tthis.c = c;\n }", "public void c() {\n if (this.b != null) {\n this.c.removeView(this.b);\n this.b = null;\n }\n }", "public void antiClue(Card c) {\n\t\tnotPossible.add(c);\n\t}", "public void restartAt(S2Point c) {\n this.c = c;\n acb = -triage(aCrossB, c);\n }", "public void changeDna(char[] c){\n dna = c;\n }", "public Complemento getC() {\n return C;\n }", "public void removeCouncillor(Councillor c){\r\n\t\tif(!this.councillors.isEmpty() && this.councillors.contains(c))\r\n\t\t\tthis.councillors.remove(c);\r\n\t\telse\r\n\t\tthrow new IndexOutOfBoundsException(\"No councillors in the reserve\");\r\n\t}", "public void test(String c){\n\t\tc = (Integer.parseInt(c) + 1) + \"\";//按理说修改了c的引用了啊\n\t}", "public boolean update(CyPoj c) {\n\t\treturn d.merge(c);\r\n\t}", "public void addCorrection(Correction c){\n\t\tString typo = c.getTypo();\n\t\tCorrection possibility = this.typos.get(typo);\n\t\tif(possibility == null) this.typos.put(typo, c);\n\t\telse{\n\t\t\tHashSet<String> h = new HashSet<String>();\n\t\t\tString[] d = possibility.getCorrection(), finalCorr;\n\t\t\tIterator<String> it;\n\t\t\tfor(String p : d) h.add(p);\n\t\t\td = c.getCorrection();\n\t\t\tfor(String p : d) h.add(p);\n\t\t\tit = h.iterator();\n\t\t\tfinalCorr = new String[h.size()];\n\t\t\tfor(int i = 0; it.hasNext(); i++) finalCorr[i] = it.next();\n\t\t\tthis.typos.put(typo, new Correction(typo, finalCorr));\n\t\t}\n\t}", "public void copiar() {\n for (int i = 0; i < F; i++) {\n for (int j = 0; j < C; j++) {\n old[i][j]=nou[i][j];\n }\n }\n }", "public Cotisant visite(Contributeur c){ \n int somme = this.state.get(c); \n c.affecterSolde(somme); \n return c ; \n }", "public void modificarCuadrante (int primerDia, int mes, int anio, String idDepartamento, Cuadrante c) {\r\n\t\tint i = 0;\r\n\t\tboolean encontrado = false;\r\n\t\twhile (i<cuadrantes.size() && !encontrado) {\r\n\t\t\tif (cuadrantes.get(i).getAnio()!=anio || cuadrantes.get(i).getMes()!=mes || !cuadrantes.get(i).getIdDepartamento().equals(idDepartamento)) \r\n\t\t\t\ti++;\r\n\t\t\telse\r\n\t\t\t\tencontrado = true;\r\n\t\t}\r\n\t\tfor (int j=primerDia-1;j<c.getNumDias();j++)\r\n\t\t\tcuadrantes.get(i).getCuad()[j]=c.getCuad()[j];\r\n\t}", "public String getC() {\n return c;\n }", "public void updateChar(int c) {\n\t\tchars = c;\n\t}", "public Clue(String c, String a) {\n this.clue = c;\n this.answer = a;\n }", "public void setCoin(int c) {\n setStat(c, coin);\n }", "public double getC() {\n return c;\n }", "public void updateCxlcComprometer(Integer cxlcCiclo, Long cxlcCompromiso, Set<Integer> cxlcComprometer, String usuario) {\n String updateCxlcComprometer = super.getQueryDefinition(\"updateCxlcComprometer\");\n \n Map<String, Object> mapValues = new HashMap<String, Object>();\n mapValues.put(\"cxlcCiclo\", cxlcCiclo);\n mapValues.put(\"cxlcCompromiso\", cxlcCompromiso);\n mapValues.put(\"cxlcComprometer\", cxlcComprometer);\n mapValues.put(\"usuario\", usuario);\n \n SqlParameterSource namedParameters = new MapSqlParameterSource(mapValues);\n DataSource ds = super.getJdbcTemplate().getDataSource();\n NamedParameterJdbcTemplate namedTemplate = new NamedParameterJdbcTemplate(ds);\n \n super.getJdbcTemplate().setFetchSize(100);\n \n namedTemplate.update(updateCxlcComprometer, namedParameters);\n }", "int invert(int c) {\n int index = wrap(c);\n if (_inverse != null && _inverse.containsKey(index)) {\n return _inverse.get(index);\n } else {\n return index;\n }\n }", "public void cpl() {\n\t\tint op = registers.getRegister(Register.A);\n\t\tint result = invert(op);\n\t\tregisters.setRegister(Register.A, result);\n\n\t\tregisters.setFlag(Flag.H, true);\n\t\tregisters.setFlag(Flag.N, true);\n\t}", "public final void mC() throws RecognitionException {\n try {\n // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:396:11: ( ( 'c' | 'C' ) )\n // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:396:12: ( 'c' | 'C' )\n {\n if ( input.LA(1)=='C'||input.LA(1)=='c' ) {\n input.consume();\n\n }\n else {\n MismatchedSetException mse = new MismatchedSetException(null,input);\n recover(mse);\n throw mse;}\n\n\n }\n\n }\n finally {\n }\n }", "public void appliquerDirectementCoup(Coup c)\r\n {\r\n this.position = c.getArrivee();\r\n this.p.setGrille(this.p.getGrillePlateau()[c.getDepart().getY()][c.getDepart().getX()],c.getArrivee());\r\n this.p.setGrille(null,c.getDepart());\r\n System.out.println();\r\n System.out.println(\"Le coup a ete applique\");\r\n \r\n }", "public void mo4298a(C0781c cVar) {\n this.f3125N = cVar;\n }", "@Override\n\tpublic void updateCpteCourant(CompteCourant cpt) {\n\t\t\n\t}", "public void D(SetStabilizerFragment$c setStabilizerFragment$c) {\n this.o = setStabilizerFragment$c;\n synchronized (this) {\n long l10 = this.H;\n long l11 = 256L;\n this.H = l10 |= l11;\n }\n this.notifyPropertyChanged(23);\n super.requestRebind();\n }", "public void repaint(int c){\n pUI.repaint(pUI.getBound(c));\n }", "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 int getC() {\n return c_;\n }", "public void setUniquekeyC( String uniquekeyC )\n {\n this.uniquekeyC = uniquekeyC;\n }", "public Builder setC(int value) {\n bitField0_ |= 0x00000001;\n c_ = value;\n onChanged();\n return this;\n }", "void changeCadence(int newValue);", "public final void mC() throws RecognitionException {\n try {\n // /Users/devdatta.kulkarni/Documents/Cassandra/apache-cassandra-0.8.6-src/src/java/org/apache/cassandra/cql/Cql.g:529:11: ( ( 'c' | 'C' ) )\n // /Users/devdatta.kulkarni/Documents/Cassandra/apache-cassandra-0.8.6-src/src/java/org/apache/cassandra/cql/Cql.g:529:13: ( 'c' | 'C' )\n {\n if ( input.LA(1)=='C'||input.LA(1)=='c' ) {\n input.consume();\n\n }\n else {\n MismatchedSetException mse = new MismatchedSetException(null,input);\n recover(mse);\n throw mse;}\n\n\n }\n\n }\n finally {\n }\n }", "public VDouble getC() {\r\n return c;\r\n }", "public void add(int c, int d)\n {\n int g = gcd(num, den);\n num = (num * d + den * c) / g;\n den = (den * d) / g;\n }", "public void B(c$a c$a) {\n this.f = c$a;\n synchronized (this) {\n long l10 = this.m;\n long l11 = 4;\n this.m = l10 |= l11;\n }\n this.notifyPropertyChanged(23);\n super.requestRebind();\n }", "public void setC3(java.lang.Long c3)\n {\n this.c3 = c3;\n }", "public void afficher (UneCommande22<Integer> cde){ //POURQUOI CETTE MÉTHODE EST STATIQUE??? LA DEPLACER PE DANS COMMANDE\n\t\t\t\tif(cde.taille()==0) {ClientJava1DateUser.affiche(\"\\n\\t\\t COMMANDE EST VIDE\");\n\t\t\t\t}\n\t\t\t\telse {ClientJava1DateUser.affiche(cde.toString());}\t\n\t\t\t}", "@Override\r\n\tpublic void update(int cnum) {\n\r\n\t}", "public CentredCCD(CentredCCD original)\n\t{\n\t\tsuper(original);\n\t\t\n\t\tsetCentrePosition(original.getCentrePosition().clone());\n\t}", "public int getC() {\n return c_;\n }", "private void outputAnswer(double c){\n\t\tprint(\"c = \" + c);\n\t}", "public void setCnode(Node<T1> cNode) {\r\n\t\tthis.cnode = cNode;\r\n\t\tcheckRep();\r\n\t}", "public static String completeChaine(String p_in, char c, int n) {\n\n\t\t\n\t\tString ret=p_in\t;\n\t\tif (ret!=null){\n\t\t\tfor (int i=0;i<n-p_in.length();i++){\n\t\t\t\tret = c + ret;\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t}", "@Override\n\tpublic void deleteConseille(Conseille c) {\n\t\t\n\t}", "public static double discr(double a, double b, double c) {\n return sq(b) - 4 * a * c;\n }", "public Complement(CharClass cc) {\n super(-cc.getContainsBmp(), -cc.getContainsNonBmp());\n this.cc = cc;\n }", "public static <C> LIST<C> COMP3(C a, C b, C c, LIST<C> L) {\n LIST<C> LP = L;\n if ( L == null ) {\n LP = new LIST<C>();\n }\n LP.list.addFirst( c );\n LP.list.addFirst( b );\n LP.list.addFirst( a );\n return LP;\n }", "public void setAll(int c, int e) {\n\t\tsetCoefficient(c);\n\t\tsetExponent(e);\n\t}", "public N_Cupon(Connection c) {\n N_Cupon.conexion = c;\n initComponents();\n tf_Descuento.setText(\"\");\n setIDCupon();\n }", "public void setContCD(String contCD) {\n this.contCD = contCD;\n }", "public void setComplementary_end(long complementary_end) {\n this.complementary_end = complementary_end;\n }", "public void setComplementary_start(long complementary_start) {\n this.complementary_start = complementary_start;\n }", "public void setCaddress(String caddress) {\n this.caddress = caddress;\n }", "public void assign(int newVal, int r, int c) {\r\n\tboard[r][c].setGuess(newVal, true);\r\n\tmax--;\r\n\tremoveFromRow(newVal, r);\r\n\tremoveFromCol(newVal, c);\r\n\tremoveFromCollection(newVal, r, c);\r\n //remove from the collection\r\n }", "public Integer getC() {\n return c;\n }", "public final void normalizeCP() {\n\t// domain error may occur\n\tdouble s = Math.pow(determinant(), -1.0/3.0);\n\tmul((float)s);\n }", "public void copy(final Coordinate c) { row = c.row; col = c.col; }", "public void setDisplacementCC(String displacementCC) {\r\n this.displacementCC = displacementCC;\r\n }", "int getC();", "public void setUserC( String userC )\n {\n this.userC = userC;\n }", "void updateSelected(Coord c) {\n this.selected = c;\n }", "private void mutate(Chromosome c){\n for(double[] gene:c.getGeneData()){\n for(int i=0; i<gene.length; i++){\n if(Math.random()<mutationRate){\n //Mutate the data\n gene[i] += (Math.random()-Math.random())*maxPerturbation;\n }\n }\n }\n }", "public final synchronized void mo39723b(C14836c cVar) {\n this.f40709J = cVar;\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}", "@Override\n\tpublic void ccc() {\n\t\t\n\t}", "@Override\r\n\tpublic void updateCourse(Course c) {\n\t\t\r\n\t\tint cid1 = c.getCid();\r\n\t\ttry\r\n\t\t{\r\n\t\tConnection connection=DBConnection.getConnection();\r\n\t\tString sqlQuery=\"update \"+TABLECourse+\" set \"+COLcname+\" = ?, \"+COLduration+\" = ?, \"+COLfees+\"=? where \"+COLcid+\" =\"+cid1;\r\n\t\t\r\n\t\tPreparedStatement pst = connection.prepareStatement(sqlQuery);\r\n\t\tpst.setString(1, c.getCname());\r\n\t\tpst.setInt(2, c.getCduration());\r\n\t\tpst.setInt(3, c.getCfees());\r\n\t\t\r\n\t\tpst.executeUpdate();\r\n\r\n\t\t\r\n\t\t\r\n\t\t} catch (SQLException e) {\r\n\t\t\t\t\t\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}", "public void applyTo(Component c)\n\t{\n\t\tapplyTo(c, null, null, null);\n\t}", "private void removeAt(Coord c) {\n\t\tElement e = getAt(c);\n\t\tif(e != null) {\n\t\t\tlistLiving.remove(e);\n\t\t}\n\t\tmapContains.put(c, null);\n\t}", "public ContribuintesIndividuais(ContribuintesIndividuais c){\n super(c);\n this.dependentes = c.getDependentes();\n this.nifs = c.getNifs();\n this.coeffiscal = c.getCoeffiscal();\n this.codigos = c.getCodigos();\n this.numFilhos = c.getNumFilhos();\n }", "@Override public void setColor(Color c) \n\t{\n\t\tc2 = c1; c1 = c.dup();\n\t}", "public void changeCount(final int c) {\n\t\tcount += c;\n\t}", "public void putMoleculeInCilia(){\n\t\t\tcilia.setOdorantMolecule(molecule);\n\t\t}", "public void c(long j) {\n this.h = j;\n }", "public static Note getC() { return (Note)C.clone();}", "public static void updatecou(String cno2, String cname2, double stucredit2) {\n\t\ttry{\n\t\t\tps = conn.prepareStatement(\"update course set Cname = ?, Ccredit = ? where Cno = ?\");\n\t\t\tps.setString(1, cname2);\n\t\t\tps.setDouble(2, stucredit2);\n\t\t\tps.setString(3, cno2);\n\t\t\tps.executeUpdate();\n\t\t\t\n\t\t\tJOptionPane.showMessageDialog(null, \"课程信息修改成功!\", \"提示消息\", JOptionPane.INFORMATION_MESSAGE);\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t\tJOptionPane.showMessageDialog(null, \"课程信息修改失败!\", \"提示消息\", JOptionPane.INFORMATION_MESSAGE);\n\t\t}\n\t}", "public void enfoncerDel() {\n\t\tthis.valC = this.valC/10;\n\t}", "int invert(char c) {\n return _alphabet.toChar(invert(_alphabet.toInt(c)));\n }", "void removePiece(int c, int r) {\n _forwardDiag[forward(c, r)] += -1;\n _backwardDiag[backward(c, r)] += -1;\n _col[c - 1] += -1;\n _row[r - 1] += -1;\n }", "private void appendToComment(char c) throws SAXException {\n if (longStrBufPending == '-' && c == '-') {\n if (commentPolicy == XmlViolationPolicy.FATAL) {\n fatal(\"This document is not mappable to XML 1.0 without data loss to \\u201C--\\u201D in a comment.\");\n } else {\n warn(\"This document is not mappable to XML 1.0 without data loss to \\u201C--\\u201D in a comment.\");\n if (wantsComments) {\n if (commentPolicy == XmlViolationPolicy.ALLOW) {\n appendLongStrBuf('-');\n } else {\n appendLongStrBuf('-');\n appendLongStrBuf(' ');\n }\n }\n longStrBufPending = '-';\n }\n } else {\n if (longStrBufPending != '\\u0000') {\n if (wantsComments) {\n appendLongStrBuf(longStrBufPending);\n }\n longStrBufPending = '\\u0000';\n }\n if (c == '-') {\n longStrBufPending = '-';\n } else {\n if (wantsComments) {\n appendLongStrBuf(c);\n }\n }\n }\n }", "public void updateWord(char c) {\n int index = word.indexOf(c);\n while (index != -1) {\n display[index] = c;\n if (index == (word.length() - 1))\n return;\n index = word.indexOf(c, index + 1);\n }\n }", "public void setDeci(int c){\n this.deci = c;\n }", "public boolean updateCourse(Course c) {\n\t\treturn false;\n\t}", "public Builder clearC() {\n \n c_ = getDefaultInstance().getC();\n onChanged();\n return this;\n }", "private void updateCou(HttpServletRequest request, HttpServletResponse response) {\n\t\ttry {\r\n\t\t\tString courseid = request.getParameter(\"courseid\");\r\n\t\t\tCourse cou = course.findByCode(courseid);\r\n\t\t\trequest.setAttribute(\"CourseInfo\", cou);\r\n\t\t\trequest.getRequestDispatcher(\"CourseInfo/modifyCou.jsp\").forward(request, response);\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t}\r\n\t}", "public final void c(a aVar) {\n super.c(aVar);\n aVar.a(\"undo_msg_v1\", this.a);\n aVar.a(\"undo_msg_type_v1\", this.b);\n }" ]
[ "0.59795094", "0.57313854", "0.57308125", "0.5711003", "0.56899136", "0.5686413", "0.568317", "0.55892414", "0.5589219", "0.5578793", "0.55443394", "0.55236167", "0.5461657", "0.54220843", "0.5399621", "0.5378441", "0.5368568", "0.5297454", "0.5295601", "0.52879363", "0.5238001", "0.5231342", "0.5229527", "0.5215406", "0.52056926", "0.51939243", "0.5183779", "0.5147143", "0.5144601", "0.5122619", "0.5102912", "0.5101425", "0.5078407", "0.50783354", "0.5068482", "0.5056273", "0.5032776", "0.50199413", "0.49926203", "0.49919483", "0.49819314", "0.4973414", "0.49596366", "0.4956508", "0.49422392", "0.4933252", "0.4931349", "0.49306455", "0.49259084", "0.49204287", "0.49102193", "0.49070877", "0.4897296", "0.4890335", "0.4890295", "0.4884783", "0.48696432", "0.48674357", "0.48577866", "0.48563072", "0.48556468", "0.4844251", "0.4842359", "0.48412716", "0.48377255", "0.48253962", "0.48237735", "0.4822655", "0.48210093", "0.48201314", "0.48163968", "0.4811334", "0.4807824", "0.48067516", "0.48061562", "0.48018435", "0.48011702", "0.47911513", "0.4781082", "0.47727656", "0.4771365", "0.47636294", "0.47583827", "0.4757259", "0.4749557", "0.47493708", "0.47447106", "0.47428295", "0.4721503", "0.472103", "0.47198036", "0.47194058", "0.47090766", "0.4706046", "0.47036353", "0.46973777", "0.46867234", "0.46847194", "0.468456", "0.46817422" ]
0.54168034
14
Changes sequence to the reversecomplementary sequence. (Convert sequence of one strand of the doublestranded DNA to the sequence of the other strand)
public void revComp() { ArrayList<Character> newSeq = new ArrayList<Character>(); for (int i = 0; i < seq.size(); i++) { char c = seq.get(seq.size() - 1 - i); newSeq.add(complement(c)); } seq = newSeq; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public IDnaStrand reverse();", "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 }", "public static String reverseCompDNA(String seq) {\n\t\tString reverse = new StringBuilder(seq).reverse().toString();\n\t\tStringBuilder rcRes = new StringBuilder();\n\n\t\tfor (int i=0; i < reverse.length(); i++) {\n\t\t\trcRes.append(getComplementBP(reverse.charAt(i)));\n\t\t}\n\n\t\treturn rcRes.toString();\n\t}", "public Strand getReverseStrand() throws BaseException\n {\n Type newType;\n \n //TODO: determine the value of newType\n // If the current type is RNA, keep the new type as RNA\n // If the current type is 3', change it to 5'\n // If the current type if 5', change it to 3'\n //Remove the following line -- it is for default compilation\n newType = Type.RNA;\n \n Base[] rev;\n //TODO: create a new array of Bases that is the reverse of the current\n // sequence. Store the result in rev.\n //Remove the following line -- it is for default compilation\n rev = new Base[]{};\n \n return new Strand(newType, rev);\n }", "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}", "public static String reverseComplement(final CharSequence seq)\n\t{\n\tfinal StringBuilder b=new StringBuilder(seq.length());\n\tfor(int i=0;i< seq.length();++i)\n\t\t{\n\t\tb.append(complement(seq.charAt((seq.length()-1)-i)));\n\t\t}\n\treturn b.toString();\n\t}", "public DoubleLinkedSeq reverse(){\r\n\t DoubleLinkedSeq rev = new DoubleLinkedSeq();\r\n\t for(cursor = head; cursor != null; cursor = cursor.getLink()){\r\n\t\t rev.addBefore(this.getCurrent());\r\n\t }\r\n\t \r\n\t return rev; \r\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 }", "@Override\n\tpublic IDnaStrand reverse() {\n\t\tLinkStrand reversed = new LinkStrand();\n\t\tNode current = new Node(null);\n\t\tcurrent = myFirst;\n\t\t\n\t\twhile (current != null) {\n\t\t\t\n\t\t\tStringBuilder copy = new StringBuilder(current.info);\n\t\t\tcopy.reverse();\n\t\t\tNode first = new Node(copy.toString());\n\t\t\t\n\t\t\tfirst.next = reversed.myFirst;\n\t\t\tif (reversed.myLast == null) {\n\t\t\t\treversed.myLast = reversed.myFirst;\n\t\t\t\treversed.myLast.next = null;\n\t\t\t\t\n\t\t\t}\n\t\t\treversed.myFirst = first;\n\t\t\treversed.mySize += copy.length();\n\t\t\treversed.myAppends ++;\n\t\t\t\n\t\t\t\n\t\t\tcurrent = current.next;\n\t\t\t\n\t\t}\n\t\treturn reversed;\n\t}", "void reverse();", "void reverse();", "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}", "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 }", "void reverseDirection();", "private static void reverse(char[] programs, int start, int end) {\n char temp;\n while (start < end) {\n temp = programs[start];\n programs[start] = programs[end];\n programs[end] = temp;\n start++;\n end--;\n }\n }", "public static String revserse(char string[], int suffixStartIndex) {\n\t\tint j = string.length -1;\n\n\t\twhile (suffixStartIndex < j) {\n\t\t\tchar temp = string[j];\n\t\t\tstring[j] = string[suffixStartIndex];\n\t\t\tstring[suffixStartIndex] = temp;\n\n\t\t\tj--;\n\t\t\tsuffixStartIndex++;\n\t\t}\n\n\t\treturn new String(string);\n\t}", "public void _reverse() {\n\n var prev = first;\n var current = first.next;\n last = first;\n last.next = null;\n while (current != null) {\n var next = current.next;\n current.next = prev;\n prev = current;\n current = next;\n\n }\n first = prev;\n\n }", "@Test\n public void reverseComplement() {\n ReverseComplementor r = new ReverseComplementor();\n String x = r.reverseComplement(\"AATGATACGGCGACCACCGAGATCTACACTCTTTCCCTACACGACGCTCTTCCGATCT\");\n assertEquals(\"AGATCGGAAGAGCGTCGTGTAGGGAAAGAGTGTAGATCTCGGTGGTCGCCGTATCATT\", x);\n }", "void reverseIterative(char arr[],int start) {\n // Your Logic Here\n for(int i=start;i<arr.length/2;i++)\n {\n if(arr[i] != arr[arr.length-1-i])\n {\n arr[i]^=arr[arr.length-1-i];\n arr[arr.length-1-i]^=arr[i];\n arr[i]^=arr[arr.length-1-i];\n }\n }\n}", "public MyStringBuilder2 reverse()\n\t{\n\t\t\t\tCNode currNode = firstC;\n\t\t\t\tCNode nextNode = null;\n\t\t\t\tCNode prevNode = null;\n\t\t\t\trecursiveReverse(currNode, nextNode, prevNode);\n\t\t\t\treturn this;\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 Graphe reverse()\t{\r\n \tfor(Liaison route : this.routes)\r\n \t\tif(route.isSensUnique())\r\n \t\t\troute.reverse();\t//TODO check si reverse marche bien\r\n \treturn this;\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 }", "public void reverse() {\n var previous = first;\n var current = first.next;\n\n last = first;\n last.next = null;\n while (current != null) {\n var next = current.next;\n current.next = previous;\n previous = current;\n current = next;\n\n }\n first = previous;\n\n }", "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 Rev_Str_Fn(){\r\n\t\r\n\tString x=\"ashu TATA\";\r\n\t\r\n\tStringBuilder stb=new StringBuilder();\r\n\tstb.append(x);\r\n\tstb.reverse();\r\n\tSystem.out.println(stb);\r\n}", "public String reverseLink(String str) {\n int pip = str.indexOf(BundlesDT.DELIM, str.indexOf(BundlesDT.DELIM)+1);\n\treturn str.substring(pip+1,str.length()) + BundlesDT.DELIM + str.substring(0,pip);\n }", "public static void reverse(int[] a){\n \n int n = a.length;\n \n for(int i = 0; i<n/2;i++){\n int c = a[i];\n int d = a[n-1-i];\n int temp=0;\n \n temp =c;\n c= d;\n d=temp;\n a[i]= c;\n a[n-1-i]=d;\n }\n \n \n \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 }", "@Override\n\tpublic String reverse() {\n\t\tint len = theString.length();\n\t\tString s1 = \"\";\n\t\tfor (int i = len - 1; i >= 0; i--) {\n\t\t\ts1 = s1 + theString.charAt(i);\n\t\t}\n\t\t// System.out.println(s1);\n\n\t\treturn s1;\n\t}", "public void reverser(String[] x){\n reverse(x, 0, x.length -1);\n }", "String reverse(String first) {\n\t String reverse = \"\";\n\t for (int i = first.length()-1; i>=0; i--) {\n\t reverse = reverse+first.charAt(i);\n\t }\n\t return reverse;\n\t }", "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 }", "@Override\r\n\tpublic boolean reverseAccrualIt() {\n\t\r\n\t\t\r\n\t\treturn false;\r\n\t}", "void reverseH(char arr[],int start) {\nif(arr == null)\n return;\n if(start==(arr.length/2))\n return;\n \n int i=start;\n if(arr[i] != arr[arr.length-1-i])\n {\n arr[i]^=arr[arr.length-1-i];\n arr[arr.length-1-i]^=arr[i];\n arr[i]^=arr[arr.length-1-i];\n }\n reverseH(arr,start+1);\n}", "public static void main(String[] args) {\n\n StringBuilder lz = new StringBuilder(\"Led Zeppelin\");\n lz.reverse();\n System.out.println(lz);\n\n String lz2 = \"Led Zeppelin\";\n// System.out.println(lz2.reverse()); // does not compile\n\n }", "String transcribe(String dnaStrand) {\n\t\tStringBuilder rnaStrand = new StringBuilder();\n\t\t\n\t\tfor(int i=0; i<dnaStrand.length(); i++)\n\t\t{\n\t\t\t//using append function to add the characters in rnaStrand\n\t\t\trnaStrand.append(hm.get(dnaStrand.charAt(i)));\n\t\t}\n\t\t\n\t\t//return rnaStrand as String.\n\t\treturn rnaStrand.toString();\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 }", "static String reverse3(String s)\n\t{\n\t\tString reverseStr = new StringBuffer(s).reverse().toString();\n\t\treturn reverseStr;\n \n\t}", "public static void main(String[] args) {\n\t\t\n\t\tSystem.out.println(reverse(\"foo\"));\n\t\tSystem.out.println(reverse(\"student\"));\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tString str=\"Ali Can\";\r\n\t\t\r\n\t\tString reverse=\"\";\r\n\t\t\r\n\t\tfor(int i=str.length()-1;i>=0;i--) {\r\n\t\t\treverse=reverse+str.charAt(i);\r\n\t\t}\r\n\t\tSystem.out.println(reverse);\r\n\t}", "private void reverse(ListNode startNode, ListNode endNode) {\n endNode.next = null;\n ListNode pre = startNode, cur = startNode.next, newEnd = pre;\n while (cur != null) {\n ListNode nextNode = cur.next;\n cur.next = pre;\n pre = cur;\n cur = nextNode;\n }\n }", "public void reverse(String IRQ){\r\n\t\tthis.switches.reverse(IRQ);\r\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 }", "static String reverseSyllables(String nom) {\n String reversedNom = \"\";\n for(int i = 0; i < nom.length()-1; i += 2) {\n reversedNom += new StringBuilder(nom.substring(i, i+2)).reverse().toString();\n }\n if(nom.length() % 2 == 1) {\n reversedNom += nom.substring(nom.length() - 1);\n }\n return reversedNom;\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 static void main(String[] args)\n {\n String input = \"now this was interesting\";\n\n StringBuilder input1 = new StringBuilder();\n\n // append a string into StringBuilder input1\n input1.append(input);\n\n // reverse StringBuilder input1\n input1.reverse();\n\n // print reversed String\n System.out.println(input1);\n }", "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 void reverse() {\n\t\tNode previous = first;\n\t\tNode current = first.next;\n\n\t\twhile (current != null) {\n\t\t\tNode next = current.next;\n\t\t\tcurrent.next = previous;\n\n\t\t\tprevious = current;\n\t\t\tcurrent = next;\n\t\t}\n\t\tlast = first;\n\t\tlast.next = null;\n\t\tfirst = previous;\n\t}", "public boolean isReverseStrand(){\n\t\treturn testBitwiseFlag(16);\n\t}", "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 static String reverseString(char[] str, int begin, int end) {\n\t\tfor(int i = 0; i < (end-begin)/2; i++){\n\t\t\tchar temp = str[begin+i];\n\t\t\tstr[begin+i] = str[end-i-1];\n\t\t\tstr[end-i-1] = temp;\n\t\t}\n\t\treturn new String(str);\n\t}", "private static void invertBuffer(char[] buffer,\n int start,\n int length) {\n\n for(int i = start, j = start + length - 1; i < j; i++, --j) {\n char temp = buffer[i];\n buffer[i] = buffer[j];\n buffer[j] = temp;\n }\n }", "public void getReverseA(byte[] is, int offset, int length) {\n\t\tfor (int i = offset + length - 1; i >= offset; i--) {\n\t\t\tis[i] = getByteA();\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tString str1=\"A man, a plan, a canal: Panama\";\r\n\t\tSystem.out.println(reverseString(str1));\r\n\t}", "public static void main(String[] args) {\n\t\tString str = \"Pooja\";\n\t\tchar str1[] = str.toCharArray();\n\t\tString reverse = \"\";\n\t\t\n\t\tfor (int i = str1.length; i>=0 ; i--) {\n\t\t\treverse = reverse + str1[i];\n\t\t}\n\t\t\n\t\tSystem.out.println(reverse);\n\n\t}", "private String reverseString(String s) {\n char[] c = s.toCharArray();\n int i = 0, j = s.length() - 1;\n while (i < j) {\n if (c[i] != c[j]) {\n c[i] ^= c[j];\n c[j] ^= c[i];\n c[i] ^= c[j];\n }\n ++i;\n --j;\n }\n return new String(c);\n }", "private String bidirectionalReorder(String text) {\n try {\n Bidi bidi = new Bidi((new ArabicShaping(8)).shape(text), 127);\n bidi.setReorderingMode(0);\n return bidi.writeReordered(2);\n } catch (ArabicShapingException exception) {\n return text;\n }\n }", "public static void main(String[] args) {\n\t\tString name=\"BEGMYRAT\";\r\n\t\tString reversed=\"\";\r\n\t\t\r\n\t\tfor(int idx=name.length()-1; idx>=0; idx--) {\r\n\t\t\treversed=reversed+name.charAt(idx);\r\n\t\t}System.out.println(reversed);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "private static String reverse(String in){\n\t\tString reversed = \"\";\n\t\tfor(int i = in.length() - 1; i >= 0; i--){\n\t\t\treversed += in.charAt(i);\n\t\t}\n\t\treturn reversed;\n\t}", "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}", "String str(String strR) {\n\t\tString rev = \"\";\n\t\tfor (int i = strR.length(); i >0; i--) {\n\t\t\trev = rev + strR.substring(i - 1, i);\n\t\t}\n\t\treturn rev;\n\t}", "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\n\tString swap () {\n\n\t\tString ret =\n\t\t\tnextIsA\n\t\t\t\t? aString\n\t\t\t\t: bString;\n\n\t\tnextIsA =\n\t\t\t! nextIsA;\n\n\t\treturn ret;\n\n\t}", "public static void reverse(int[] array) {\n\t\tfor (int i=0; i<array.length/2;i++) {\n\t\t\tint s = array[i];\n\t\t\tarray[i] = array[array.length-1-i];\n\t\t\tarray[array.length-1-i] = s;\n\t\t}\n\t}", "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}", "private void normalize()\n {\n if (m_unnormalized_ == null) {\n m_unnormalized_ = new StringBuilder();\n m_n2Buffer_ = new Normalizer2Impl.ReorderingBuffer(m_nfcImpl_, m_buffer_, 10);\n } else {\n m_unnormalized_.setLength(0);\n m_n2Buffer_.remove();\n }\n int size = m_FCDLimit_ - m_FCDStart_;\n m_source_.setIndex(m_FCDStart_);\n for (int i = 0; i < size; i ++) {\n m_unnormalized_.append((char)m_source_.next());\n }\n m_nfcImpl_.decomposeShort(m_unnormalized_, 0, size, m_n2Buffer_);\n }", "public void reverseLastTranslation() {\r\n this.translate(-lastDx,-lastDy);\r\n }", "public static void main(String[] args) {\n\t\tString s = \"I am Ritesh Kumar\";\r\n \r\n\t\tString to = StringRecusiveReverse.reverseMe(s);\r\n\t\tString to1 = StringRecusiveReverse.recursiveReverseString(s);\r\n\t\tSystem.out.println(to);\r\n System.out.println(to1);\r\n /*StringTokenizer st=new StringTokenizer(s);\r\n while(st.hasMoreTokens()) {\r\n \ts1=st.nextToken(); \r\n \tSystem.out.println(s1);\r\n }*/\r\n String[] s1=s.split(\" \");\r\n \r\n for(int i=s1.length-1;i>=0;i--)\r\n \tSystem.out.println(s1[i]);\r\n\t}", "public static void transform() {\n String s = BinaryStdIn.readString();\n CircularSuffixArray circularSuffixArray = new CircularSuffixArray(s);\n for (int i = 0; i < s.length(); i++) {\n if (circularSuffixArray.index(i) == 0) {\n BinaryStdOut.write(i);\n }\n }\n for (int i = 0; i < s.length(); i++) {\n int index = circularSuffixArray.index(i);\n if (index == 0) {\n BinaryStdOut.write(s.charAt(s.length() - 1));\n }\n else {\n BinaryStdOut.write(s.charAt(index - 1));\n }\n }\n BinaryStdOut.flush();\n }", "public static void main(String[] args) {\n String input = \"Lukman\";\n StringBuilder input1 = new StringBuilder();\n\n // append a string into StringBuilder input1\n //input1.append(input);\n\n // reverse StringBuilder input1\n //input1 = input1.reverse();\n\n // print reversed String\n int len = input.length() - 1;\n for (int i = len; i >= 0; --i) {\n input1.append(input.charAt(i));\n }\n System.out.println(\"Reverse:\" + input1);\n }", "private static String flipEndChars(String str) {\n if (str.length() < 2) {\n return \"Incompatible.\";\n }\n char firstChar = str.charAt(0);\n char lastChar = str.charAt(str.length() - 1);\n if (firstChar == lastChar) {\n return \"Two\\'s a pair.\";\n }\n return lastChar + str.substring(1, str.length() - 1) + firstChar;\n }", "public String reconstructS(){\n char[] last = getBWT().toCharArray();\n char[] first = Arrays.copyOf(last, last.length);\n Arrays.sort(first);\n \n // Create wavelet trees out of first and last columns in order to perform quick ranks.\n WaveletTree firstWT = new WaveletTree(first.toString());\n \n String original = \"\";\n \n // Get first letter in S\n int lastIndex = 0;\n char firstLetter = 0;\n for (int i = 0; i < last.length; i++) {\n if(last[i] == '$'){\n firstLetter = first[i];\n original += firstLetter;\n lastIndex = i;\n break;\n }\n }\n \n for(int k = 0; k < last.length -1; k++){\n \n int count = 0;\n for (int i = 0; i <= lastIndex; i++) {\n if (first[i] == original.charAt(original.length()-1)) {\n count++;\n }\n }\n\n int count2 = 0;\n for (int i = 0; i < last.length; i++) {\n if (last[i] == original.charAt(original.length()-1)) {\n count2++;\n if(count2 == count){\n original += first[i];\n lastIndex = i;\n break;\n }\n }\n }\n }\n \n return original;\n }", "public void reverse()\n\t{\n\t\tSinglyLinkedListNode nextNode = head;\n\t\tSinglyLinkedListNode prevNode = null;\n\t\tSinglyLinkedListNode prevPrevNode = null;\n\t\twhile(head != null)\n\t\t{\n\t\t\tprevPrevNode = prevNode;\n\t\t\tprevNode = nextNode;\n\t\t\tnextNode = prevNode.getNext();\n\t\t\tprevNode.setNext(prevPrevNode);\n\t\t\tif(nextNode == null)\n\t\t\t{\n\t\t\t\thead = prevNode;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tStringBuilder sb = new StringBuilder(\"12345\");\n\t\t\n\t\t//inverte a posição dos caracteres da string de traz pra frente e imprime a mensagem\n\t\tSystem.out.println(sb.reverse());\n\t}", "public static void reverse(byte[] array) {\n if (array == null) {\n return;\n }\n int i = 0;\n int j = array.length - 1;\n byte tmp;\n while (j > i) {\n tmp = array[j];\n array[j] = array[i];\n array[i] = tmp;\n j--;\n i++;\n }\n }", "public static void transform() {\n String s = BinaryStdIn.readString();\n\n CircularSuffixArray csa = new CircularSuffixArray(s);\n\n for (int i = 0; i < csa.length(); i++) {\n \n if (csa.index(i) == 0) {\n BinaryStdOut.write(i);\n }\n }\n\n for (int i = 0; i < csa.length(); i++) {\n if (csa.index(i) == 0) {\n BinaryStdOut.write(s.charAt(csa.length() + csa.index(i) - 1));\n }\n else {\n BinaryStdOut.write(s.charAt(csa.index(i) - 1));\n }\n }\n BinaryStdOut.flush();\n }", "public DATATYPE reverse() {\n\t\tString[] lines = mLines;\n\t\t\n\t\tmLines = new String[lines.length];\n\t\t\n\t\tfor (int i=lines.length-1, x=0; i >= 0; i--, x++) {\n\t\t\tmLines[x] = lines[i];\n\t\t}\n\t\t\n\t\treturn (DATATYPE) this;\n\t}", "@Override\n\tpublic boolean reverseAccrualIt() {\n\t\treturn false;\n\t}", "public static String reverse(String st) {\n\t\t\n\t\tif(st == null || st ==\"\") {\n\t\t\treturn st;\n\t\t}\n\t\tStringBuffer br = new StringBuffer();\n\t\tfor(int i=st.length()-1; i>=0; i--) {\n\t\t\tbr.append(st.charAt(i));\n\t\t}\n\t\treturn br.toString();\n\t}", "public static void reverseUsingCustomizedLogic(String str) {\n\t\tint strLength = str.length();\n\n\t\tStringBuilder strBuilder = new StringBuilder();\n\n\t\tfor (int i = strLength - 1; i >= 0; i--) {\n\t\t\tstrBuilder = strBuilder.append(str.charAt(i));\n\t\t}\n\t\tSystem.out.println(\"str value after reverse using customized logic : \" + strBuilder.toString());\n\t}", "public String shortestPalindrome3Pointers(String s) {\n int i = 0;\n int j = s.length() - 1;\n int end = s.length() - 1;\n \n while (i < j) {\n if (s.charAt(i) == s.charAt(j)) {\n i++;\n j--;\n } else {\n i = 0;\n end--;\n j = end;\n }\n }\n \n return new StringBuilder(s.substring(end + 1)).reverse().append(s).toString();\n }", "public String reverse(String input) {\n \n // if there is no string, send it back\n if (input == null) {\n return input;\n }\n // string to return\n String output = \"\";\n // go from the back of input and put its last character at the front of the new string\n for (int i = input.length() - 1; i >= 0; i--) {\n output = output + input.charAt(i);\n }\n \n return output;\n}", "public static void main(String[] args)\r\n\t{\n\t\t\tString s;\r\n\t\t\tSystem.out.println(\"Enter a string\");\r\n\t\t\tScanner in=new Scanner(System.in);\r\n\t\t\ts=in.nextLine();\r\n\t\t\tStringBuffer s2=new StringBuffer(s);\r\n\t\t\tfor(int i=0;i<s.length();i++)\r\n\t\t\t{\r\n\t\t\t\ts2.setCharAt(i,s.charAt(s.length()-i-1));\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"Reverse is \"+s);\r\n\t}", "public void reverseDirection() {\n\t\tdirection *= -1;\n\t\ty += 10;\n\t}", "private void invertStreets() {\n this.canCross = !this.canCross;\n String calleAux = this.calleVerde;\n this.calleVerde = this.calleRojo;\n this.calleRojo = this.calleVerde;\n }", "public Reversal(Clue clue) {\n\t\tsuper(clue);\n\t}", "void reverseTurnOrder() {\n turnOrder *= -1;\n }", "public static String reverseAlternative(String str) {\n str = str.trim();\r\n // remove all extra white spaces in between words\r\n str = str.replaceAll(\"( )+\", \" \");\r\n\r\n char c[] = str.toCharArray();\r\n int n = c.length;\r\n\r\n int start = 0, count = 0;\r\n String res = \" \";\r\n\r\n for (int end = 0; end < n; end++) {\r\n\r\n if (c[end] == ' ') {\r\n count++;\r\n if (count == 1 || count % 2 == 1) {\r\n res = same(c, start, end - 1);\r\n start = end + 1;\r\n }\r\n if (count % 2 == 0) {\r\n res = reverse(c, start, end - 1);\r\n start = end + 1;\r\n }\r\n }\r\n }\r\n\r\n // condition will be change, becoz last space is not count.\r\n if (count % 2 == 1) {\r\n res = reverse(c, start, n - 1);\r\n }\r\n\r\n // if only one string contained in the whole line.\r\n if(res==\" \"){\r\n res=str;\r\n }\r\n \r\n return res;\r\n }", "public static void main(String[] args) \n\t{\n\t\t\n\t\tStringBuilder builder = new StringBuilder(\"citi 1\");\n\t\tSystem.out.println(\"initial value : \" +builder);\n\t\tbuilder.append(\", EON\");\n\t\tSystem.out.println(\"new value :\" +builder);\n\t\t\n\t\tSystem.out.println(\"reverse value :\"+builder.reverse());\n\t}", "protected void reversePath() {\n\t\t\n\t\tif(_reverse) {\n\t\t\t\n\t\t\tif(_nextMove + 1 > movingPattern.size() - 1)\n\t\t\t\t_nextMove = 0;\n\t\t\telse\n\t\t\t\t_nextMove++;\n\t\t\t\n\t\t\t_reverse = false;\n\t\t}\n\t\telse {\n\t\t\t\n\t\t\tif(_nextMove - 1 < 0)\n\t\t\t\t_nextMove = movingPattern.size() - 1;\n\t\t\telse\n\t\t\t\t_nextMove--;\n\t\t\t\n\t\t\t_reverse = true;\n\t\t}\n\t}", "public static String mirrorZ(char start) throws IllegalArgumentException {\r\n if ((start > 'Z') || (start < 'A')) {\r\n throw new IllegalArgumentException(\"must be an uppercase letter!\");\r\n }\r\n String palindrome = \"\";\r\n // System.out.println(start);\r\n if (start == 'Z') {\r\n return \"Z\";\r\n }\r\n palindrome = start + \" \" + mirrorZ((char) (start + 1)) + \" \" + start;\r\n // System.out.println(palindrome);\r\n return palindrome;\r\n\r\n }", "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 main(String[] args) {\n\t\tStringBuffer sb1=new StringBuffer(\" Java Programming\");\n\t\tStringBuffer sb2=null;\n\t\tsb2=sb1.reverse();\n\t\tSystem.out.println(\"sb2=\"+sb2);\n\t}", "private static void swapRight(final byte index, final String byte_, final StringBuilder builder)\n\t{\n\t\tchar swapped_char = byte_.charAt(index + 1);\n\t\tbuilder.setCharAt(index + 1, builder.charAt(index));\n\t\tbuilder.setCharAt(index, swapped_char);\n\t}", "public void reverse() {\n\t\tif(isEmpty()) {\n\t\t\treturn;\n\t\t}\n\t\tNodo <T> pri_n= fin;\n\t\t\n\t\tint cont= tamanio-1;\n\t\tNodo<T> nodo_act= pri_n;\n\t\twhile(cont >0) {\n\t\t\tNodo <T> aux= getNode(cont-1);\n\t\t\tnodo_act.setSiguiente(aux);\n\t\t\tnodo_act= aux;\n\t\t\tcont--;\n\t\t}\n\t\tinicio = pri_n;\n\t\tfin= nodo_act;\n\t\tfin.setSiguiente(null);\n\t}", "@NonNull\n ConsList<E> reverse();", "@Test\n\tvoid testReverseString() {\n\t\tReverseString tester = new ReverseString();\n\t\tchar[] input = new char[] { 'h', 'e', 'l', 'l', 'o' };\n\t\ttester.reverseString(input);\n\t\tassertArrayEquals(new char[] { 'o', 'l', 'l', 'e', 'h' }, input);\n\n\t\tinput = new char[] { 'H', 'a', 'n', 'n', 'a', 'h' };\n\t\ttester.reverseString(input);\n\t\tassertArrayEquals(new char[] { 'h', 'a', 'n', 'n', 'a', 'H' }, input);\n\n\t\tinput = new char[] { 'H' };\n\t\ttester.reverseString(input);\n\t\tassertArrayEquals(new char[] { 'H' }, input);\n\n\t\tinput = new char[0];\n\t\ttester.reverseString(input);\n\t\tassertArrayEquals(new char[0], input);\n\t}", "public String backwards()\n\t{\n\t\tString answer = \"\";\n\t\tDLLNode cursor = tail;\n\t\twhile (cursor != null)\n\t\t{\n\t\t\tanswer = \"<--\" + cursor.data + answer;\n\t\t\tcursor = cursor.prev;\n\t\t}\n\n\t\tanswer = \"(null)\" + answer;\n\t\treturn answer;\n\t}", "public static String reverse(String str){\n String result=\"\";//\"CBA\"\n\n for (int i = str.length()-1; i>=0; i--) {\n result+=str.charAt(i);\n }\n return result;\n }" ]
[ "0.71549964", "0.7082632", "0.681948", "0.66082865", "0.6422376", "0.6158668", "0.6124085", "0.6063682", "0.6017392", "0.5786377", "0.5786377", "0.5764836", "0.57403296", "0.57217395", "0.5656195", "0.5640009", "0.5637317", "0.563367", "0.5608486", "0.5604326", "0.5562884", "0.5555601", "0.5540038", "0.553261", "0.5477405", "0.54693806", "0.54515", "0.5429381", "0.5413784", "0.5409098", "0.5399685", "0.5365237", "0.53559804", "0.5313251", "0.5310721", "0.5286961", "0.52504754", "0.5235033", "0.522713", "0.5219963", "0.52102524", "0.52007145", "0.5196988", "0.5186647", "0.51858354", "0.518559", "0.51690817", "0.5167143", "0.5157435", "0.5156919", "0.51519257", "0.5147821", "0.51303226", "0.5120542", "0.5112832", "0.51107025", "0.51061726", "0.51008594", "0.5074127", "0.50726146", "0.5059796", "0.5059058", "0.5058205", "0.5058046", "0.5056718", "0.5052782", "0.505064", "0.50404596", "0.5026282", "0.50220454", "0.50211203", "0.5010825", "0.5004957", "0.50025976", "0.50021136", "0.50019455", "0.4999496", "0.49974334", "0.4992359", "0.49908882", "0.4973784", "0.4969088", "0.49674797", "0.49649796", "0.49640846", "0.4961059", "0.49578807", "0.49456036", "0.49412093", "0.49399874", "0.49398273", "0.49377024", "0.49373138", "0.4937038", "0.49332586", "0.4933235", "0.49296248", "0.4927702", "0.4926137", "0.49260992" ]
0.7100625
1
Changes nucleotides to uppercase representation in sequence.
public void toUpper() { ArrayList<Character> newSeq = new ArrayList<Character>(); for (char c : seq) { newSeq.add(Character.toUpperCase(c)); } seq = newSeq; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void write(char[] cbuf, int off, int len) throws IOException {\n for (int i = 0; i < cbuf.length; ++i)\n cbuf[i] = Character.toUpperCase(cbuf[i]);\n \n super.write(cbuf, off, len);\n \n }", "public static void printUpperCase() {\n\t\tString isExit= \"\";\n\t\twhile (!isExit.equals(\"N\")) {\n\t\t\tStringBuffer bf = readInput();\n\t\t\tStringBuffer result = new StringBuffer();\n\t\t\tString str = bf.toString();\n\t\t\tfor (int i = 0; i < str.length(); i++) {\n\t\t\t\tif (Character.isUpperCase(str.charAt(i))) {\n\t\t\t\t\tresult.append(String.valueOf(str.charAt(i)));\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"Chuỗi chữ hoa: \" + result);\n\t\t\tSystem.out.println(\"Bạn có muốn nhập tiếp không(0/1):\");\n\t\t\tisExit = scan.next().toString();\n\t\t}\n\t}", "public void setUpperCase() {\r\n\t\tCollection<Component> collection = groupboxEditar.getFellows();\r\n\t\tfor (Component abstractComponent : collection) {\r\n\t\t\tif (abstractComponent instanceof Textbox) {\r\n\t\t\t\tTextbox textbox = (Textbox) abstractComponent;\r\n\t\t\t\tif (!(textbox instanceof Combobox)) {\r\n\t\t\t\t\t((Textbox) abstractComponent)\r\n\t\t\t\t\t\t\t.setText(((Textbox) abstractComponent).getText()\r\n\t\t\t\t\t\t\t\t\t.trim().toUpperCase());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void setUpperCase() {\r\n\t\tCollection<Component> collection = groupboxEditar.getFellows();\r\n\t\tfor (Component abstractComponent : collection) {\r\n\t\t\tif (abstractComponent instanceof Textbox) {\r\n\t\t\t\tTextbox textbox = (Textbox) abstractComponent;\r\n\t\t\t\tif (!(textbox instanceof Combobox)) {\r\n\t\t\t\t\t((Textbox) abstractComponent)\r\n\t\t\t\t\t\t\t.setText(((Textbox) abstractComponent).getText()\r\n\t\t\t\t\t\t\t\t\t.trim().toUpperCase());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void printUpperCase()\n {\n for(char i = 'A'; i <= 'Z'; i++){\n System.out.print(i + \" \");\n }\n System.out.println();\n }", "public void toLower() {\n ArrayList<Character> newSeq = new ArrayList<Character>();\n for (char c : seq) {\n newSeq.add(Character.toLowerCase(c));\n }\n seq = newSeq;\n }", "void unsetCapital();", "public void firstToUpperCase() {\n \n }", "@Test\n public void makeUpperCase() {\n List<String> output = null; // TODO\n\n assertEquals( Arrays.asList(\n \"EVERY\", \"PROBLEM\", \"IN\", \"COMPUTER\", \"SCIENCE\",\n \"CAN\", \"BE\", \"SOLVED\", \"BY\", \"ADDING\", \"ANOTHER\",\n \"LEVEL\", \"OF\", \"INDIRECTION\", \"EXCEPT\", \"TOO\",\n \"MANY\", \"LEVELS\", \"OF\", \"INDIRECTION\"), output);\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 }", "public static void upperCaseFirst() {\n\t\tString isExit = \"\";\n\t\twhile (!isExit.equals(\"N\")) {\n\t\t\tStringBuffer bf = readInput();\n\t\t\tString str = bf.toString();\n\t\t\t// str=String.valueOf(str.charAt(0)).toUpperCase()+str.substring(1,\n\t\t\t// str.length());\n\t\t\tSystem.out.println(\"Chuỗi có chữ đầu viết hoa:\\n\"\n\t\t\t\t\t+ String.valueOf(str.charAt(0)).toUpperCase()\n\t\t\t\t\t+ str.substring(1, str.length()));\n\t\t\tSystem.out.println(\"Bạn có muốn nhập tiếp không(0/1):\");\n\t\t\tisExit = scan.next().toString();\n\t\t}\n\t}", "public String toUpperCase(String in)\n {\n return in;\n }", "public static void main(String[] args) {\n\t\tString test = \"changeme\";\r\n\t\tStringBuffer appendString= new StringBuffer();\r\n\t\tchar[] testToChar = test.toCharArray();\r\n\t\tfor (int i = 0; i < testToChar.length; i++) {\r\n\r\n\t\t\tchar upperString = testToChar[i];\r\n\t\t\tif (i % 2 != 0) {\r\n\t\t\t\tupperString = Character.toUpperCase(upperString);\r\n\t\t\t\t\r\n\t\t\t\tappendString.append(upperString);\r\n\t\t\t\tSystem.out.println(appendString.toString());\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\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 }", "public static void transform() {\n String s = BinaryStdIn.readString();\n\n CircularSuffixArray csa = new CircularSuffixArray(s);\n\n for (int i = 0; i < csa.length(); i++) {\n \n if (csa.index(i) == 0) {\n BinaryStdOut.write(i);\n }\n }\n\n for (int i = 0; i < csa.length(); i++) {\n if (csa.index(i) == 0) {\n BinaryStdOut.write(s.charAt(csa.length() + csa.index(i) - 1));\n }\n else {\n BinaryStdOut.write(s.charAt(csa.index(i) - 1));\n }\n }\n BinaryStdOut.flush();\n }", "private void switchToUpperCase() {\n for (int i = 0; i < mLetterButtons.length; i++) {\n mLetterButtons[i].setText((mQWERTYWithDot.charAt(i) + \"\").toUpperCase());\n }\n mIsShiftPressed = true;\n\n }", "public String convertToUpperCase(String word);", "public Builder<I> toUpperCase() {\n upperCase = true;\n return this;\n }", "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 }", "public void upperString() {\n\t\t\tString sentence = \"I am studying\";\n\t\t\t//have to assign it to new string with = to change string\n\t\t\tsentence = sentence.toLowerCase();\n\t\t\t//have to assign it to sentence\n\t\t\tSystem.out.println(\"lower case sentence \" + sentence);\n\t\t}", "public static void main(String[] args) {\n\r\n\t\tSystem.out.println(new c4().capitalize(\"aAC!00xsAAa\"));\r\n\t}", "public void setUpper(int value) {\n this.upper = value;\n }", "public XMLString toUpperCase() {\n/* 746 */ return new XMLStringDefault(this.m_str.toUpperCase());\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 }", "public static void transform() {\n String s = BinaryStdIn.readString();\n CircularSuffixArray circularSuffixArray = new CircularSuffixArray(s);\n for (int i = 0; i < s.length(); i++) {\n if (circularSuffixArray.index(i) == 0) {\n BinaryStdOut.write(i);\n }\n }\n for (int i = 0; i < s.length(); i++) {\n int index = circularSuffixArray.index(i);\n if (index == 0) {\n BinaryStdOut.write(s.charAt(s.length() - 1));\n }\n else {\n BinaryStdOut.write(s.charAt(index - 1));\n }\n }\n BinaryStdOut.flush();\n }", "public void setUpperCaseLettersCount(long value) {\n this.upperCaseLettersCount = value;\n }", "public String EndUp(String s) {\r\n if (s.length() >= 3) {\r\n return s.substring(0, s.length()-3)+s.substring(s.length()-3).toUpperCase();\r\n } else {\r\n return s.toUpperCase();\r\n }\r\n }", "public static String bytesToHex_UpperCase(byte[] txtInByte) {\n\t\treturn bytesToHex(txtInByte).toUpperCase();\n }", "public static void transform() {\r\n \tString str = BinaryStdIn.readString();;\r\n \tCircularSuffixArray suffixArr = new CircularSuffixArray(str);\r\n \tfor (int i = 0; i < suffixArr.length(); i++) {\r\n \t\tif (suffixArr.index(i) == 0) {\r\n \t\t\tBinaryStdOut.write(i);\r\n \t\t\tbreak;\r\n \t\t}\r\n \t}\r\n \tfor (int i = 0; i < suffixArr.length(); i++) {\r\n \t\tint pos = suffixArr.index(i);\r\n \t\tif (pos == 0) {\r\n \t\t\tpos = suffixArr.length();\r\n \t\t}\r\n \t\tBinaryStdOut.write(str.charAt(pos - 1), 8);\r\n \t}\r\n \tBinaryStdOut.close();\r\n }", "public MyString2 toUpperCase() {\n\t\tString upperCase = \"\";\n\t\tfor (int i = 0; i < this.s.length(); i++) {\n\t\t\tupperCase += this.s.toUpperCase().charAt(i);\n\t\t}\n\t\treturn new MyString2(upperCase);\n\t}", "public static void main(String[] args) {\n\n Changer scandiesAway = new Changer();\n scandiesAway.addChange(new Change('ä', 'a'));\n scandiesAway.addChange(new Change('ö', 'o'));\n System.out.println(scandiesAway.change(\"ääliö älä lyö, ööliä läikkyy\"));\n }", "public static void upperCaseFirstOfWord() {\n\t\tString isExit = \"\";\n\t\twhile (!isExit.equals(\"N\")) {\n\t\t\tStringBuffer bf = readInput();\n\t\t\tStringBuffer result = new StringBuffer();\n\t\t\tString str = bf.toString();\n\t\t\tString char_prev = \"\";\n\t\t\tString char_current = \"\";\n\t\t\tString key = \" ,.!?:\\\"\";\n\t\t\tresult.append(String.valueOf(str.charAt(0)).toUpperCase());\n\t\t\tfor (int i = 1; i < str.length(); i++) {\n\t\t\t\tchar_prev = String.valueOf(str.charAt(i - 1));\n\t\t\t\tchar_current = String.valueOf(str.charAt(i));\n\t\t\t\tif (key.contains(char_prev)) {\n\t\t\t\t\tchar_current = char_current.toUpperCase();//uppercase first letter each word\n\t\t\t\t}\n\t\t\t\tresult.append(char_current);\n\t\t\t}\n\t\t\tSystem.out.println(\"Chuỗi có chữ cái đầu viết hoa: \\n\" + result);\n\t\t\tSystem.out.println(\"Bạn có muốn nhập tiếp không(0/1):\");\n\t\t\tisExit= scan.next().toString();\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tString ausgang = \"wörter starten mit großbuchstaben. pause nicht\";\r\n\t\tString newausgang = \"\";\r\n\r\n\t\tfor (int i = 0; i < ausgang.length(); i++) {\r\n\r\n\t\t\tif (i == 0) {\r\n\t\t\t\tnewausgang = newausgang + Character.toUpperCase(ausgang.charAt(i));\r\n\r\n\t\t\t} else if (ausgang.charAt(i - 1) == ' ') {\r\n\t\t\t\tnewausgang = newausgang + Character.toUpperCase(ausgang.charAt(i));\r\n\t\t\t} else {\r\n\t\t\t\tnewausgang = newausgang + ausgang.charAt(i);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// normal dazu geben\r\n\t\t}\r\n\t\tSystem.out.println(ausgang);\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(newausgang);\r\n\r\n\t}", "public void setSequence(String seq) throws Exception {\n seq = seq.toUpperCase();\n seq = seq.trim();\n\n // Verify that the sequence does not contain invalid chars\n if (this.verifySequence(seq)) {\n this.sequence = seq;\n } else {\n throw new Exception(\"Invalid Sub Sequence\");\n }\n }", "public void changeDna(char[] c){\n dna = c;\n }", "private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }", "public ICase retourneLaCase() ;", "public String acronym(String phrase) {\n String accrStr = phrase.replaceAll(\"\\\\B.|\\\\P{L}\", \"\").toUpperCase();\n return accrStr;\n }", "public final void mT__49() throws RecognitionException {\n try {\n int _type = T__49;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // InternalMyDsl.g:47:7: ( 'uppercase' )\n // InternalMyDsl.g:47:9: 'uppercase'\n {\n match(\"uppercase\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "void unsetCapitalInKind();", "@SuppressWarnings(\"unused\")\r\n private static String camelCase2UpperCase(String camelCase) {\r\n return camelCase.replaceAll(\"(.)(\\\\p{Upper})\", \"$1_$2\").toUpperCase();\r\n }", "public String upperCase(String word){\n return word.toUpperCase();\n }", "public static void main(String[] args) {\n\t\t\n\t\tfor (int counter = 1; counter <= UPPER; counter++) {\n\t\t\tSystem.out.print(counter);\n\t\t\t\n\t\t\t// add a comma and space\n\t\t\t\n\t\t\tif (counter !=UPPER) {\n\t\t\t\tSystem.out.print(\", \");\n\t\t\t}\n\t\t}\n\t}", "private static String kebapToUpperCamel(String input) {\n return CaseFormat.LOWER_HYPHEN.to(CaseFormat.UPPER_CAMEL, input);\n }", "public static void main(String[] args) {\n String str = \"welcome to Programr!\";\n\n System.out.println(\"UpperCase: - \"+str.toUpperCase());\n }", "public static void main(String args[]) throws CloneNotSupportedException, ClassNotFoundException, IOException{\n\t\tchar xyz=Character.toUpperCase('a');\n\t\tSystem.out.println(xyz);\n\t \n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "private String fixupCase(String s) {\r\n boolean nextIsUpper = true;\r\n StringBuffer sb = new StringBuffer();\r\n\r\n for (int i = 0; i < s.length(); i++) {\r\n char c = s.charAt(i);\r\n if (nextIsUpper) {\r\n c = Character.toUpperCase(c);\r\n } else {\r\n c = Character.toLowerCase(c);\r\n }\r\n sb.append(c);\r\n nextIsUpper = Character.isWhitespace(c);\r\n }\r\n return sb.toString();\r\n }", "int upper();", "public static void main(String[] args) {\n\n String[] fruit = {\"Grape\", \"Mango\", \"Banana\", \"Apple\", \"Peach\", \"Orange\", \"Cherry\", \"Dragon Fruit\"};\n\n System.out.println(fruit[3] + \"'s are my favourite fruit\");\n\n for (String s : fruit) {\n System.out.println(s.toUpperCase());\n }\n\n System.out.println(\"\\n\");\n\n int j = 0;\n while(j<fruit.length) {\n System.out.println(fruit[j].toUpperCase());\n j++;\n }\n\n }", "private void useCapitalLettersFromType(String type, StringBuffer buffer) {\r\n for (int ndx = 0; ndx < type.length(); ndx++) {\r\n char ch = type.charAt(ndx);\r\n if (Character.isUpperCase(ch)) {\r\n buffer.append(Character.toLowerCase(ch));\r\n }\r\n }\r\n }", "public static String reverseCompDNA(String seq) {\n\t\tString reverse = new StringBuilder(seq).reverse().toString();\n\t\tStringBuilder rcRes = new StringBuilder();\n\n\t\tfor (int i=0; i < reverse.length(); i++) {\n\t\t\trcRes.append(getComplementBP(reverse.charAt(i)));\n\t\t}\n\n\t\treturn rcRes.toString();\n\t}", "private String capital() {\r\n\t\tString out=\"Companies Capital: \\n\\n\";\r\n\t\tint[] temp= tile.getCompanyCapital();\r\n\t\tint square=(int)Math.sqrt(temp.length);\r\n\t\tif(square*square<temp.length) {\r\n\t\t\tsquare++;\r\n\t\t}\r\n\t\tfor(int i=0; i<temp.length;) {\r\n\t\t\tfor(int j=0; j<square; j++) {\r\n\t\t\t\tif(i<temp.length) {\r\n\t\t\t\t\tout=out.concat(String.format(\"%4s\", temp[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(\"\\n\\nAgent Capital: \\n\\n\");\r\n\t\ttemp=tile.getAgentCapital();\r\n\t\tsquare=(int)Math.sqrt(temp.length);\r\n\t\tif(square*square<temp.length) {\r\n\t\t\tsquare++;\r\n\t\t}\r\n\t\tfor(int i=0; i<temp.length;i++) {\r\n\t\t\tfor(int j=0; j<square; j++) {\r\n\t\t\t\tif(i<temp.length) {\r\n\t\t\t\t\tout=out.concat(String.format(\"%4s\", temp[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\treturn out;\r\n\t}", "private String upperCaseFL(String in) {\n\t\treturn in.substring(0,1).toUpperCase() + in.substring(1,in.length());\n\t}", "@Override\r\n\tpublic String doSome() {\n\t\treturn super.doSome().toUpperCase();\r\n\t}", "public void remCamelCaseName(){\n ((MvwDefinitionDMO) core).remCamelCaseName();\n }", "public static void encode()\n {\n String s = BinaryStdIn.readString();\n CircularSuffixArray myCsa = new CircularSuffixArray(s);\n int first = 0;\n while (first < myCsa.length() && myCsa.index(first) != 0) {\n first++;\n }\n BinaryStdOut.write(first);\n int i = 0;\n while (i < myCsa.length()) {\n BinaryStdOut.write(s.charAt((myCsa.index(i) + s.length() - 1) % s.length()));\n i++;\n }\n BinaryStdOut.close();\n }", "public void modifySequence(String sequence) {\n this.sequence = sequence;\n }", "static String reverseSyllables(String nom) {\n String reversedNom = \"\";\n for(int i = 0; i < nom.length()-1; i += 2) {\n reversedNom += new StringBuilder(nom.substring(i, i+2)).reverse().toString();\n }\n if(nom.length() % 2 == 1) {\n reversedNom += nom.substring(nom.length() - 1);\n }\n return reversedNom;\n }", "public String endUp(String str) {\n if (str.length() <= 3) {\n return str.toUpperCase();\n } else {\n return str.substring(0, str.length()-3) + str.substring(str.length()-3).toUpperCase();\n }\n}", "public static String toHexStringUpperCase(byte[] b) {\r\n\t\tStringBuffer sb = new StringBuffer();\r\n\t\tfor (int i = 0; i < b.length; i++) {\r\n\t\t\tsb.append(hexCharsUpperCase[ (int)(((int)b[i] >> 4) & 0x0f)]);\r\n\t\t\tsb.append(hexCharsUpperCase[ (int)(((int)b[i]) & 0x0f)]);\r\n\t\t}\r\n\t return sb.toString(); \r\n\t}", "public final void mUPPER() throws RecognitionException {\n\t\ttry {\n\t\t\t// /Users/probst/workspace/MiniJava_A6/src/compiler/Frontend/MiniJava.g:312:16: ( ( 'A' .. 'Z' ) )\n\t\t\t// /Users/probst/workspace/MiniJava_A6/src/compiler/Frontend/MiniJava.g:\n\t\t\t{\n\t\t\tif ( (input.LA(1) >= 'A' && input.LA(1) <= 'Z') ) {\n\t\t\t\tinput.consume();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tMismatchedSetException mse = new MismatchedSetException(null,input);\n\t\t\t\trecover(mse);\n\t\t\t\tthrow mse;\n\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t}", "int getUpper();", "public static String upperCase(String s) {\n\t\tString upper= \" \";\n\t\tfor (int i=0; i<s.length(); i++){\n\t\t\tString letter=s.substring(i, i+1);\n\t\t\tif (Constants.LOWER_CASE.indexOf(letter)!=-1){\n\t\t\t\tint indexLetter= Constants.LOWER_CASE.indexOf(letter);\n\t\t\t\tString upperLetter= Constants.UPPER_CASE.substring(indexLetter, indexLetter+1);\n\t\t\t\tupper=upper+upperLetter;\n\t\t\t} else {\n\t\t\t\tupper=upper+letter;\n\t\t\t}\n\t\t}\n\t\treturn upper;\n\n\t}", "public String smartUpperCase(String s) {\n\t\t\t \ts = s.substring(0, 1).toUpperCase() + s.substring(1, (s.length()));\n\t s = s.replace(\".\", \"_\");\n\t while (s.contains(\"_ \")) {\n\t \ts = s.replace( s.substring(s.indexOf(\"_ \"), s.indexOf(\"_ \") + 3),\n\t \t\t \". \" + (s.substring(s.indexOf(\"_ \") + 2, s.indexOf(\"_ \") + 3)).toUpperCase()\n\t \t\t );\n\t \t}\n\t s = s.replace(\"_\", \".\");\n\t return s;\n\t\t\t }", "public static void main(String[] args) {\n\t\tString str = \"Bangalore is capital of Karnataka where\";\n\t\tString[] words = str.split(\" \");\n\t\tString newString=\"\";\n\t\t\t\n\t\tfor(String word: words) {\n\t\n\t\t\t\tnewString= newString+reverse(word);\n\t\t}\n\t\t\n\t\tSystem.out.println(newString);\n\t}", "private static String cup(String str) {\n\t\treturn str.substring(0,1).toLowerCase() + str.substring(1); \n\t}", "public char consensus_nucleotide (int offset) {\n return current_contig.consensus.sequence.charAt(offset - 1);\r\n }", "UpperCaseDocument(final int ml) {\n maximumLength = ml;\n }", "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 void f5(List<Book> a) {\r\n for (Book o : a) {\r\n String code = o.getCode();\r\n String result = \"\";\r\n for (int i = 0; i < code.length(); i++) {\r\n char c = code.charAt(i);\r\n if (Character.isLetter(c)) {\r\n if (Character.isUpperCase(c)) {\r\n c = Character.toLowerCase(c);\r\n } else {\r\n c = Character.toUpperCase(c);\r\n }\r\n }\r\n result += c;\r\n }\r\n o.setCode(result);\r\n }\r\n }", "public static ArrayList<Line> capitalizeLines(ArrayList<Line> lines) {\n for(Line line: lines) {\n line.setChar(0, 0, Character.toUpperCase(line.getChar(0, 0)));\n }\n return lines;\n }", "public static String initialUpper(String... strings){\n String compoundStr = \"\";\n for(int i = 0; i < strings.length; i++){\n compoundStr += strings[i];\n if(i != strings.length-1)\n compoundStr += \" \";\n }\n\n compoundStr = compoundStr.substring(0, 1).toUpperCase() + compoundStr.substring(1).toLowerCase();\n\n return compoundStr;\n }", "public static void main(String arg[]) {\n String nombres[] = {\"Pepe\", \"Juan\", \"María\", \"Antonio\", \"Luisa\"};\n\n String inter;\n for (int x = 0; x < nombres.length - 1; x++) {\n for (int i = nombres.length - 1; i > x; i--) {\n if (nombres[i].compareTo(nombres[i - 1]) < 0) {\n inter = nombres[i];\n nombres[i] = nombres[i - 1];\n nombres[i - 1] = inter;\n }\n }\n }\n for (int i = 0; i < nombres.length; i++) {\n System.out.println(nombres[i]);\n }\n }", "public static char[] generateAZUpperRange(int length) {\n charArray = new char[length];\n for (int i = 0; i < length; i++) {\n charArray[i] = RandomChar.generateAZUpperRangeChar();\n }\n return charArray;\n }", "public static String getFieldUpperCase(String name) {\r\n\t\tString aux = name.substring(0, 1);\r\n\t\tString mayus = aux.toUpperCase()+name.substring(1);\r\n\t\treturn mayus;\r\n\t}", "public static void main(String[] args) {\n\t\tString name=\"BEGMYRAT\";\r\n\t\tString reversed=\"\";\r\n\t\t\r\n\t\tfor(int idx=name.length()-1; idx>=0; idx--) {\r\n\t\t\treversed=reversed+name.charAt(idx);\r\n\t\t}System.out.println(reversed);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n\n for(char ch='A'; ch<='Z'; ch++){\n System.out.print(ch+\" \");\n }\n System.out.println();\n\n //backword--descending\n for (char ch='Z'; ch>='A'; ch--){\n System.out.print(ch+\" \");\n }\n System.out.println();\n\n //lower case\n for(char ch ='a'; ch<='z'; ch++){\n System.out.print(ch+ \" \");\n }\n\n\n\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 void printSecondHalfAlphabetLowerCaseThenSecondHalfAlphabetUpperCase(ByteArrayInputStream inputStream) {\n int condition = inputStream.available();\n for (int i = 0; i < condition; ++i) {\n System.out.print((char) inputStream.read());\n }\n\n System.out.println(\"\");\n inputStream.reset(); // back to the mark()ed position\n\n for (int i = 0; i < condition; ++i) {\n System.out.print(Character.toUpperCase((char) inputStream.read()));\n }\n System.out.println(\"\");\n }", "public static void main(String[] args){\r\n String first = \"jin\";\r\n String last = \"jung\";\r\n String ay = \"ay\";\r\n/*\r\n use substring() and toUpperCase methods to reorder and capitalize\r\n*/\r\n\r\n String letFirst = first.substring(0,1);\r\n String capFirst = letFirst.toUpperCase();\r\n String letLast = last.substring(0,1);\r\n String capLast = letLast.toUpperCase();\r\n\r\n String nameInPigLatin = first.substring(1,3) + capFirst + ay + \" \" + last.substring(1,4) + capLast + ay;\r\n\r\n/*\r\n output resultant string to console\r\n*/\r\n\r\n System.out.println(nameInPigLatin);\r\n\r\n }", "public static String checkUpperCase(String city) {\n\t\tboolean b = false;\n\t\tif(!Character.isUpperCase(city.charAt(0))) {\n\t\t\tString temp = city;\n\t\t\tchar c = Character.toUpperCase(city.charAt(0));\n\t\t\tcity = c + temp.substring(1,temp.length());\n\t\t}\n\t\t\n\t\tfor(int i = 1; i < city.length(); i++) {\n\t\t\tif(b) {\n\t\t\t\tif(!Character.isUpperCase(city.charAt(i))) {\n\t\t\t\t\tString temp = city;\n\t\t\t\t\tchar c = Character.toUpperCase(city.charAt(i));\n\t\t\t\t\tcity = temp.substring(0, i) + c + temp.substring(i+1,temp.length());\n\t\t\t\t}\n\t\t\t\tb = false;\n\t\t\t}\n\t\t\tif(city.charAt(i) == ' ')\n\t\t\t\tb = true;\n\t\t}\n\t\treturn city;\n\t}", "public void setUpperCase(boolean upperCase)\n\t{\n\t\tthis.upperCase = upperCase;\n\t}", "@Override\n\t\t\tpublic void changed(ObservableValue<? extends String> observable, String oldValue, String newValue) {\n\t\t\t\tString cadena = txtCodigo.getText().toUpperCase();\n\t\t\t\ttxtCodigo.setText(cadena);\n\t\t\t}", "public XMLString toUpperCase(Locale locale) {\n/* 715 */ return new XMLStringDefault(this.m_str.toUpperCase(locale));\n/* */ }", "public static void main(String[] args) {\n\t\tScanner scan= new Scanner(System.in);\n\t\tString word=scan.next();\n\t\tchar [] split= word.toCharArray();\n\t\tString x=String.valueOf(split[0]).toUpperCase();\n\t\tx.concat(String.copyValueOf(split, 1, split.length-1));\n\t\tSystem.out.println(x.concat(String.copyValueOf(split, 1, split.length-1)));\n\n\t}", "public int getUpper() {\n return upper;\n }", "public static void capitalizeNames(String[] name) {\n \tfor(int a = 0; a < name.length; a++) {\n \t\tname[a] = name[a].toUpperCase();\n \t}\n \t\n return;\n }", "public static void main(String[] args)\n {\n String fruit = \"strawberry\";\n String s = fruit.substring(0, 5);\n System.out.println(s);\n \n // Extract the string \"berry\"\n String u = fruit.substring(5, 10);\n System.out.println(u);\n \n String v = fruit.substring(5);\n System.out.println(v);\n \n // Extract the first character\n String w = fruit.substring(0, 1);\n System.out.println(w);\n \n // Extract the last character\n String x = fruit.substring(9, 10);\n System.out.println(x);\n \n String z = fruit.substring(9);\n System.out.println(z);\n \n // We want to turn the inital \"s\" in\n // \"strawberry\" to an uppercase \"S\"\n \n String uc = \"S\" + fruit.substring(1, 10);\n System.out.println(uc);\n \n String ud = \"S\" + fruit.substring(1);\n System.out.println(ud);\n \n String ue = \"S\" + fruit.substring(1, fruit.length());\n System.out.println(ue);\n }", "public static String randUpper(){\n int n = rand.nextInt(26)*2;\n return String.valueOf(KEYBOARD.charAt(n));\n }", "protected String alterCase(String value) {\n\t\tswitch (getCase()) {\n\t\tcase UPPERCASE:\n\t\t\treturn value.toUpperCase();\n\t\tcase LOWERCASE:\n\t\t\treturn value.toLowerCase();\n\t\tdefault:\n\t\t\treturn value;\n\t\t}\n\t}", "private String m34491a(byte[] bArr) {\n StringBuilder sb = new StringBuilder(bArr.length);\n for (byte b : bArr) {\n String hexString = Integer.toHexString(((char) b) & 255);\n if (hexString.length() < 2) {\n sb.append(0);\n }\n sb.append(hexString.toUpperCase());\n }\n return sb.toString();\n }", "public static String normalizeUpper(String name) {\n String nName = normalizeString(name);\n // Do not convert delimited names to upper case. They may have\n // been delimited to preserve case.\n if (!isDelimited(nName)) {\n nName = name.toUpperCase();\n }\n return nName;\n }", "static String toMixedCase(String name) {\r\n\t\tStringBuilder sb = new StringBuilder(name.toLowerCase());\r\n\t\tsb.replace(0, 1, sb.substring(0, 1).toUpperCase());\r\n\t\treturn sb.toString();\r\n\r\n\t}", "public static char getRandomUpperCaseLetter(){\n\t\treturn getRandomCharacter('A','Z');\n\t}", "String nombreDeClase(String s) {\n return s.substring(0, 1).toUpperCase() + s.substring(1).toLowerCase();\n }", "public static String ucase(String s) {\n return xcase(s, Character::toUpperCase);\n }", "@Override\r\n\tprotected Integer deriveUpper() {\r\n\t return -1;\r\n\t}", "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}", "public ToHexString(boolean useUpperCase) {\n this.useUpperCase = useUpperCase;\n }", "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}" ]
[ "0.5916489", "0.57728475", "0.57571524", "0.57571524", "0.57519615", "0.5659632", "0.5632625", "0.5604844", "0.55134636", "0.55075586", "0.5492984", "0.54752487", "0.5471911", "0.5465142", "0.5460659", "0.5447085", "0.54319173", "0.53450197", "0.5284711", "0.52644336", "0.52402675", "0.5227928", "0.51945627", "0.51898587", "0.5183653", "0.51782596", "0.51730144", "0.51357675", "0.5135462", "0.50967854", "0.50891846", "0.50628054", "0.50482035", "0.5013838", "0.5011565", "0.50022525", "0.49859208", "0.49440563", "0.4931806", "0.49059358", "0.4902912", "0.48876226", "0.48850167", "0.4884977", "0.48758236", "0.48686358", "0.4860054", "0.4854116", "0.4851176", "0.4846926", "0.48408592", "0.48363197", "0.48243237", "0.48177698", "0.48012403", "0.4793511", "0.47891206", "0.4788961", "0.47858587", "0.47711828", "0.47647524", "0.4758082", "0.4757133", "0.47539064", "0.47437382", "0.47399822", "0.47383618", "0.47223464", "0.4718736", "0.47173387", "0.47103176", "0.47017083", "0.46973053", "0.46890256", "0.46787196", "0.4668848", "0.46614495", "0.46578994", "0.4657356", "0.46516043", "0.46514586", "0.4642266", "0.4641111", "0.46408913", "0.46364298", "0.46314877", "0.46292585", "0.462089", "0.46120584", "0.4598849", "0.4577578", "0.45770288", "0.45686385", "0.4567244", "0.45606673", "0.45537284", "0.4552876", "0.4547851", "0.45373172", "0.45355606" ]
0.77023154
0
Changes nucleotides to lowercase representation in sequence.
public void toLower() { ArrayList<Character> newSeq = new ArrayList<Character>(); for (char c : seq) { newSeq.add(Character.toLowerCase(c)); } seq = newSeq; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void makeLowerCase () {\n tags = new StringBuilder (tags.toString().toLowerCase());\n }", "private void toLower() {\n System.out.print(\"ToLower(\");\n text.print();\n System.out.print(\")\");\n }", "public void toUpper() {\n ArrayList<Character> newSeq = new ArrayList<Character>();\n for (char c : seq) {\n newSeq.add(Character.toUpperCase(c));\n }\n seq = newSeq;\n }", "private void switchToLowerCase() {\n for (int i = 0; i < mLetterButtons.length; i++) {\n mLetterButtons[i].setText((mQWERTYWithDot.charAt(i) + \"\").toLowerCase());\n }\n mIsShiftPressed = false;\n }", "private CharSequence toLowercase(CharSequence chs) {\n final int length = chs.length();\n scratch.setLength(length);\n scratch.grow(length);\n\n char[] buffer = scratch.chars();\n for (int i = 0; i < length; ) {\n i += Character.toChars(Character.toLowerCase(Character.codePointAt(chs, i)), buffer, i);\n }\n\n return scratch.get();\n }", "public static void main(String[] args) {\n String S1=\"THE QUICK BROWN FOR JUMPS OVER THE LAZY DOG.\";//convert into lowercase\n String result = S1.toLowerCase();//formula to convert\n System.out.println(result);//print the outcome\n }", "public void print() {\n toLower();\n }", "public static void main(String[] args) {\nString s = \"HElLo WoRlD WelCOMe To JaVa\";\nSystem.out.println(s.toLowerCase());\n\t}", "@Override\n public String toString(){\n return super.toString().substring(0,1) + super.toString().substring(1).toLowerCase();\n }", "private static String cup(String str) {\n\t\treturn str.substring(0,1).toLowerCase() + str.substring(1); \n\t}", "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 }", "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 }", "public static void printLowerCase()\n {\n for(char i = 'a'; i <= 'z'; i++){\n System.out.print(i + \" \");\n }\n System.out.println();\n }", "public List<String> lowercase(List<String> terms) {\r\n\t\tfor(String i : terms)\r\n\t\t\ti.toLowerCase();\r\n\t\treturn terms;\r\n\t}", "public Builder<I> toLowerCase() {\n upperCase = false;\n return this;\n }", "public ICase retourneLaCase() ;", "public static void transform() {\n String s = BinaryStdIn.readString();\n\n CircularSuffixArray csa = new CircularSuffixArray(s);\n\n for (int i = 0; i < csa.length(); i++) {\n \n if (csa.index(i) == 0) {\n BinaryStdOut.write(i);\n }\n }\n\n for (int i = 0; i < csa.length(); i++) {\n if (csa.index(i) == 0) {\n BinaryStdOut.write(s.charAt(csa.length() + csa.index(i) - 1));\n }\n else {\n BinaryStdOut.write(s.charAt(csa.index(i) - 1));\n }\n }\n BinaryStdOut.flush();\n }", "public XMLString toLowerCase() {\n/* 702 */ return new XMLStringDefault(this.m_str.toLowerCase());\n/* */ }", "public void AddLowercase(Locale culture)\n\t{\n\t\tint i;\n\t\tint origSize;\n\t\tSingleRange range;\n\n\t\t_canonical = false;\n\n\t\tfor (i = 0, origSize = _rangelist.size(); i < origSize; i++)\n\t\t{\n\t\t\trange = _rangelist.get(i);\n\t\t\tif (range._first == range._last)\n\t\t\t{\n\t\t\t\trange._first = range._last = Character.toLowerCase(range._first);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tAddLowercaseRange(range._first, range._last, culture);\n\t\t\t}\n\t\t}\n\t}", "public void changeDna(char[] c){\n dna = c;\n }", "@Override\n int lower() {\n return lower;\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 }", "static String toMixedCase(String name) {\r\n\t\tStringBuilder sb = new StringBuilder(name.toLowerCase());\r\n\t\tsb.replace(0, 1, sb.substring(0, 1).toUpperCase());\r\n\t\treturn sb.toString();\r\n\r\n\t}", "private static void alphabetize() {\r\n Collections.sort(kwicIndex, String.CASE_INSENSITIVE_ORDER);\r\n }", "public static void transform() {\n String s = BinaryStdIn.readString();\n CircularSuffixArray circularSuffixArray = new CircularSuffixArray(s);\n for (int i = 0; i < s.length(); i++) {\n if (circularSuffixArray.index(i) == 0) {\n BinaryStdOut.write(i);\n }\n }\n for (int i = 0; i < s.length(); i++) {\n int index = circularSuffixArray.index(i);\n if (index == 0) {\n BinaryStdOut.write(s.charAt(s.length() - 1));\n }\n else {\n BinaryStdOut.write(s.charAt(index - 1));\n }\n }\n BinaryStdOut.flush();\n }", "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 }", "public String toString(){\n\t\treturn super.toString().toLowerCase();\n\t}", "public static void main(String arg[]) {\n String nombres[] = {\"Pepe\", \"Juan\", \"María\", \"Antonio\", \"Luisa\"};\n\n String inter;\n for (int x = 0; x < nombres.length - 1; x++) {\n for (int i = nombres.length - 1; i > x; i--) {\n if (nombres[i].compareTo(nombres[i - 1]) < 0) {\n inter = nombres[i];\n nombres[i] = nombres[i - 1];\n nombres[i - 1] = inter;\n }\n }\n }\n for (int i = 0; i < nombres.length; i++) {\n System.out.println(nombres[i]);\n }\n }", "public static void encode()\n {\n String s = BinaryStdIn.readString();\n CircularSuffixArray myCsa = new CircularSuffixArray(s);\n int first = 0;\n while (first < myCsa.length() && myCsa.index(first) != 0) {\n first++;\n }\n BinaryStdOut.write(first);\n int i = 0;\n while (i < myCsa.length()) {\n BinaryStdOut.write(s.charAt((myCsa.index(i) + s.length() - 1) % s.length()));\n i++;\n }\n BinaryStdOut.close();\n }", "private String fixupCase(String s) {\r\n boolean nextIsUpper = true;\r\n StringBuffer sb = new StringBuffer();\r\n\r\n for (int i = 0; i < s.length(); i++) {\r\n char c = s.charAt(i);\r\n if (nextIsUpper) {\r\n c = Character.toUpperCase(c);\r\n } else {\r\n c = Character.toLowerCase(c);\r\n }\r\n sb.append(c);\r\n nextIsUpper = Character.isWhitespace(c);\r\n }\r\n return sb.toString();\r\n }", "protected void uniteGenitive(Sentences sent) {\n\t\tint i = 0;\n\t\twhile (i < sent.getTokens().size()) {\n\t\t\tListIterator<Token> tokens = sent.getTokens().subList(i, sent.getTokens().size()).listIterator();\n\t\t\twhile (tokens.hasNext()) {\n\t\t\t\tToken token = tokens.next();\n\t\t\t\t++i;\n\n\t\t\t\tif (token.isLineBreak() && i + 2 <= sent.getTokens().size()) {\n\t\t\t\t\tList<Token> next = sent.getTokens().subList(i - 1, i + 2);\n\t\t\t\t\tif (next.size() == 3 && next.get(1).getValue().equals(\"'\") && next.get(2).getValue().equals(\"s\")) {\n\t\t\t\t\t\tnext.add(next.remove(0));\n\t\t\t\t\t\ti += 2;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private static String toStartCase(String words) {\n String[] tokens = words.split(\"\\\\s+\");\n StringBuilder builder = new StringBuilder();\n for (String token : tokens) {\n builder.append(capitaliseSingleWord(token)).append(\" \");\n }\n return builder.toString().stripTrailing();\n }", "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 void normalize() {}", "public static String toLower(String s) {\n if(s.length() <= 1) {\n return s.toLowerCase();\n }\n char first = s.charAt(0);\n if((first == 'n' || first == 't') && isIrishUpperVowel(s.charAt(1))) {\n return first + \"-\" + s.substring(1).toLowerCase();\n } else {\n return s.toLowerCase();\n }\n }", "private String derivePrefixFromClassName(String className) {\n int prefixIdx = 0;\n int lastUpperIndex = 0;\n char[] prefix = new char[PREFIX_LENGTH];\n char[] src = className.toCharArray();\n\n prefix[prefixIdx++] = Character.toLowerCase(src[0]);\n\n for (int i = 1; i < src.length; i++) {\n char c = src[i];\n if (Character.isUpperCase(c)) {\n prefix[prefixIdx++] = Character.toLowerCase(c);\n if (prefixIdx == PREFIX_LENGTH) {\n return new String(prefix);\n }\n lastUpperIndex = i;\n }\n }\n\n while (prefixIdx < PREFIX_LENGTH) {\n prefix[prefixIdx++] = Character.toLowerCase(src[++lastUpperIndex]);\n }\n\n return new String(prefix);\n }", "public static void transform() {\r\n \tString str = BinaryStdIn.readString();;\r\n \tCircularSuffixArray suffixArr = new CircularSuffixArray(str);\r\n \tfor (int i = 0; i < suffixArr.length(); i++) {\r\n \t\tif (suffixArr.index(i) == 0) {\r\n \t\t\tBinaryStdOut.write(i);\r\n \t\t\tbreak;\r\n \t\t}\r\n \t}\r\n \tfor (int i = 0; i < suffixArr.length(); i++) {\r\n \t\tint pos = suffixArr.index(i);\r\n \t\tif (pos == 0) {\r\n \t\t\tpos = suffixArr.length();\r\n \t\t}\r\n \t\tBinaryStdOut.write(str.charAt(pos - 1), 8);\r\n \t}\r\n \tBinaryStdOut.close();\r\n }", "static String canonicalize(String column)\n {\n return column.toLowerCase();\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 }", "public void remCamelCaseName(){\n ((MvwDefinitionDMO) core).remCamelCaseName();\n }", "public void modifySequence(String sequence) {\n this.sequence = sequence;\n }", "public String toString() {return name().charAt(0) + name().substring(1).toLowerCase();}", "private void normalize()\n {\n if (m_unnormalized_ == null) {\n m_unnormalized_ = new StringBuilder();\n m_n2Buffer_ = new Normalizer2Impl.ReorderingBuffer(m_nfcImpl_, m_buffer_, 10);\n } else {\n m_unnormalized_.setLength(0);\n m_n2Buffer_.remove();\n }\n int size = m_FCDLimit_ - m_FCDStart_;\n m_source_.setIndex(m_FCDStart_);\n for (int i = 0; i < size; i ++) {\n m_unnormalized_.append((char)m_source_.next());\n }\n m_nfcImpl_.decomposeShort(m_unnormalized_, 0, size, m_n2Buffer_);\n }", "public void firstToUpperCase() {\n \n }", "public String getLowerCaseName() {\n\t\treturn getName().toLowerCase();\n\t}", "public static void lNormalize(String arr[], char c)\n {\n int maxL = maxLength(arr);\n for(int i=0;i< arr.length;i++){\n arr[i]=lpad(arr[i],maxL,c);\n }\n }", "public static void main(String[] args) {\n\t\tString ausgang = \"wörter starten mit großbuchstaben. pause nicht\";\r\n\t\tString newausgang = \"\";\r\n\r\n\t\tfor (int i = 0; i < ausgang.length(); i++) {\r\n\r\n\t\t\tif (i == 0) {\r\n\t\t\t\tnewausgang = newausgang + Character.toUpperCase(ausgang.charAt(i));\r\n\r\n\t\t\t} else if (ausgang.charAt(i - 1) == ' ') {\r\n\t\t\t\tnewausgang = newausgang + Character.toUpperCase(ausgang.charAt(i));\r\n\t\t\t} else {\r\n\t\t\t\tnewausgang = newausgang + ausgang.charAt(i);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// normal dazu geben\r\n\t\t}\r\n\t\tSystem.out.println(ausgang);\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(newausgang);\r\n\r\n\t}", "private void Canonicalize()\n\t{\n\t\tSingleRange CurrentRange;\n\t\tint i;\n\t\tint j;\n\t\tchar last;\n\t\tboolean Done;\n\n\t\t_canonical = true;\n\t\t//java.util.Collections.sort(_rangelist, 0, _rangelist.size(), new SingleRangeComparer());\n\t\tjava.util.Collections.sort(_rangelist, new SingleRangeComparer());\n\n\t\t//\n\t\t// Find and eliminate overlapping or abutting ranges\n\t\t//\n\n\t\tif (_rangelist.size() > 1)\n\t\t{\n\t\t\tDone = false;\n\n\t\t\tfor (i = 1, j = 0; ; i++)\n\t\t\t{\n\t\t\t\tfor (last = _rangelist.get(j)._last; ; i++)\n\t\t\t\t{\n\t\t\t\t\tif (i == _rangelist.size() || last == Lastchar)\n\t\t\t\t\t{\n\t\t\t\t\t\tDone = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((CurrentRange = _rangelist.get(i))._first > last + 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (last < CurrentRange._last)\n\t\t\t\t\t{\n\t\t\t\t\t\tlast = CurrentRange._last;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t_rangelist.get(j)._last = last;\n\n\t\t\t\tj++;\n\n\t\t\t\tif (Done)\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif (j < i)\n\t\t\t\t{\n\t\t\t\t\t_rangelist.set(j, _rangelist.get(i));\n\t\t\t\t}\n\t\t\t}\n\t\t\t//_rangelist.removeRange(j, _rangelist.size() - j + j);\n\t\t\t//@czc\n\t\t\tArrayExt.removeRange(_rangelist, j, _rangelist.size() - j + j);\n\t\t}\n\t}", "private Vector<String> separateLineup(){\n Vector<String> lineup = new Vector<String>();\n StringTokenizer st = new StringTokenizer(masterLineup, \",\");\n\n while(st.hasMoreTokens()){\n lineup.add(st.nextToken().toLowerCase());\n }\n\n return lineup;\n\t\t\n\t}", "private void exercise1() {\n final List<String> list = asList(\n \"The\", \"Quick\", \"BROWN\", \"Fox\", \"Jumped\", \"Over\", \"The\", \"LAZY\", \"DOG\");\n\n final List<String> lowerList = list.stream()\n .map(String::toLowerCase)\n .peek(System.out::println)\n .collect(toList());\n }", "int lower();", "@Override\n public String makeLatinWord(DatabaseAccess databaseAccess, String number, String noun_Case) {\n return makeLatinWord(databaseAccess, number, noun_Case, mGender);\n }", "public static void main(String[] args) {\n\n\n String ad=\"erdogan\";\n String soyad= \"HOZAN\";\n\n System.out.println(\"ad: \"+ ad.toUpperCase());\n System.out.println(\"soyad:\" + soyad.toLowerCase());\n\n }", "public String convertLowercase(String str)\r\n {\r\n return str.toLowerCase();\r\n }", "public String getLowercaseFunction() {\n \t\treturn \"lower\";\n \t}", "public static void main(String[] args) {\n\r\n\t\tSystem.out.println(new c4().capitalize(\"aAC!00xsAAa\"));\r\n\t}", "public void kickToLowerDesiredCircuit(int jugglerBeingKicked, int circuitJugglerIsCurrentlyIn) {\n circuits.get(circuitJugglerIsCurrentlyIn).getJugglersInCircuit().remove(\n circuits.get(circuitJugglerIsCurrentlyIn).getJugglersInCircuit().indexOf(jugglerBeingKicked));\n\n\n }", "public XMLString toLowerCase(Locale locale) {\n/* 687 */ return new XMLStringDefault(this.m_str.toLowerCase(locale));\n/* */ }", "protected String normalize(String text) {\r\n\t\tString normalized = text.toLowerCase();\r\n\t\treturn normalized;\r\n\t}", "@Test\n\tpublic void simpleNameNormalizationTest() {\n\t\tSystem.out.println(NDLDataUtils.normalizeSimpleName(\"MacMillan, Don\"));\n\t\tSystem.out.println(NDLDataUtils.normalizeSimpleName(\"Jana, DK\"));\n\t\tSystem.out.println(NDLDataUtils.normalizeSimpleName(\"A. Kruger\"));\n\t\tSystem.out.println(NDLDataUtils.normalizeSimpleName(\"Peter axyz ac\"));\n\t\tSystem.out.println(NDLDataUtils.normalizeSimpleName(\"Peter Ãac\"));\n\t\tSystem.out.println(NDLDataUtils.normalizeSimpleName(\"Gestionnaire HAL-SU\"));\n\t\tSystem.out.println(NDLDataUtils.normalizeSimpleName(\"Christophe Penkerc'h\"));\n\t\t\n\t\tSet<String> wrongNameTokens = new HashSet<String>(2);\n\t\twrongNameTokens.add(\"phd\");\n\t\twrongNameTokens.add(\"professor\");\n\t\twrongNameTokens.add(\"of\");\n\t\twrongNameTokens.add(\"nutrition\");\n\t\tSystem.out.println(NDLDataUtils.normalizeSimpleNameByWrongNameTokens(\"A. Kruger PhD, Professor Of Nutrition\",\n\t\t\t\twrongNameTokens));\n\t}", "public boolean getCaseSesitive() {\n\t\treturn this.caseSensitive;\n\t}", "public Set<String> nouns() {\n HashSet<String> set = new HashSet<String>();\n for (TreeSet<String> hs: synsets.values()) {\n for (String s: hs) {\n set.add(s);\n }\n }\n return set;\n }", "@Override\n\t\t\tpublic void onTextChanged(CharSequence s, int start, int before, int count) {\n\t\t\t\tu.setLname(s.toString());\n\t\t\t\n\t\t\t}", "public void lower() {\n fangSolenoid.set(DoubleSolenoid.Value.kForward);\n }", "void unsetCapital();", "public void setWordSearchedLower(String wordSearched){\r\n wordSearched = wordSearched.toLowerCase();\r\n this.wordSearched = wordSearched;\r\n }", "public static void main(String[] args) {\n\n Changer scandiesAway = new Changer();\n scandiesAway.addChange(new Change('ä', 'a'));\n scandiesAway.addChange(new Change('ö', 'o'));\n System.out.println(scandiesAway.change(\"ääliö älä lyö, ööliä läikkyy\"));\n }", "public Iterable<String> nouns() {\n Stack<String> iter = new Stack<>();\n for (String ss : synsetsStrToNum.keySet())\n iter.push(ss);\n return iter;\n }", "public void setNoms(){\r\n\t\tDSElement<Verbum> w = tempWords.first;\r\n\t\tint count = tempWords.size(); // failsafe counter\r\n\t\twhile(count > 0){\r\n\t\t\tGetNom(w.getItem());\r\n\t\t\t//System.out.println(w.getItem().nom);\r\n\t\t\tw = w.getNext();\r\n\t\t\tif(w == null)\r\n\t\t\t\tw = tempWords.first;\r\n\t\t\tcount--;\r\n\t\t}\r\n\t}", "private ArrayList<String> normaliseTokens(ArrayList<String> tokens) {\n ArrayList<String> normalisedTokens = new ArrayList<>();\n\n // Normalise to lower case and add\n for (String token : tokens) {\n token = token.toLowerCase();\n normalisedTokens.add(token);\n }\n\n return normalisedTokens;\n }", "public void normalize() {\n \n System.out.println(\"CaseListMem: Not implemented\");\n}", "private static String getLower(MultiplicityInterval occ) {\n return Integer.toString(getLowerNumber(occ));\n }", "public String normalize(String word);", "public void normalize(){\n\tstrength = 50;\n\tdefense = 55;\n\tattRating = 0.4\t;\n }", "private String toLowerCyrillic(String word) {\n StringBuilder stringBuilder = new StringBuilder();\n for (int i = 0; i < word.length(); i++) {\n char curChar = word.charAt(i);\n if (curChar >= 'А' && curChar <= 'Я') {\n curChar += 0x20;\n } else if (curChar == 'Ё') {\n curChar = 'ё';\n }\n stringBuilder.append(curChar);\n }\n return stringBuilder.toString();\n }", "public void normalize(){\n\t_defense = originalDefense;\n\t_strength = originalStrength;\n }", "@Override\n protected IData normalize(IData document) {\n return new CaseInsensitiveElementList<Object>(document);\n }", "public ArrayList<Character> charToLower(ArrayList<Character> list){\n ArrayList<Character> lower = new ArrayList<>();\n for(Character x: list){\n x = Character.toLowerCase(x);\n lower.add(x);\n }\n return lower;\n }", "@Override\n protected Element<String, V> normalize(Element<String, V> element) {\n return new CaseInsensitiveElement<V>(element, locale);\n }", "@Override\r\n\t\tpublic void normalize()\r\n\t\t\t{\n\t\t\t\t\r\n\t\t\t}", "private LowercaseWordList() {\n\n }", "public void f5(List<Book> a) {\r\n for (Book o : a) {\r\n String code = o.getCode();\r\n String result = \"\";\r\n for (int i = 0; i < code.length(); i++) {\r\n char c = code.charAt(i);\r\n if (Character.isLetter(c)) {\r\n if (Character.isUpperCase(c)) {\r\n c = Character.toLowerCase(c);\r\n } else {\r\n c = Character.toUpperCase(c);\r\n }\r\n }\r\n result += c;\r\n }\r\n o.setCode(result);\r\n }\r\n }", "private static void circularShift() {\r\n for (String inputSentence : inputSentences) {\r\n List<String> words = splitSentenceIntoWords(inputSentence);\r\n for (int i = 0; i < words.size(); i++) {\r\n String word = words.get(i);\r\n String shiftedSentence = formSentenceFromWords(words, i);\r\n kwicIndex.add(shiftedSentence);\r\n }\r\n }\r\n }", "public char consensus_nucleotide (int offset) {\n return current_contig.consensus.sequence.charAt(offset - 1);\r\n }", "public void upperString() {\n\t\t\tString sentence = \"I am studying\";\n\t\t\t//have to assign it to new string with = to change string\n\t\t\tsentence = sentence.toLowerCase();\n\t\t\t//have to assign it to sentence\n\t\t\tSystem.out.println(\"lower case sentence \" + sentence);\n\t\t}", "public void setLowerCaseLettersCount(long value) {\n this.lowerCaseLettersCount = value;\n }", "public static final String lowercase(String s) {\n StringBuffer n = new StringBuffer(s);\n for (int i = 0; i < s.length(); ++i) {\n if (!Character.isLetterOrDigit(n.charAt(i))) \n\tn.setCharAt(i, '_');\n else\n\tn.setCharAt(i, Character.toLowerCase(n.charAt(i)));\n }\n return n.toString();\n }", "public void adjustName() {\n Item item = getItem();\n if (!item.isFixedName()) {\n if (item.getSchemaComponent().type() == SchemaBase.SEQUENCE_TYPE) {\n if (m_values.size() > 0) {\n Item childitem = ((DataNode)m_values.get(0)).getItem();\n if (item != childitem) {\n item.setName(childitem.getEffectiveName());\n }\n }\n }\n }\n }", "public void contractTransverseMuscle(int i, double force);", "public static void main(String[] args) {\n Pattern pattern = Pattern.compile(\"\\\\b(\\\\w+)(\\\\W+\\\\1\\\\b)+\",Pattern.CASE_INSENSITIVE);\r\n\r\n Scanner in = new Scanner(System.in);\r\n int numSentences = Integer.parseInt(in.nextLine());\r\n \r\n while (numSentences-- > 0) {\r\n String input = in.nextLine();\r\n \r\n Matcher matcher = pattern.matcher(input);\r\n \r\n while (matcher.find()) \r\n input = input.replaceAll(matcher.group(),matcher.group(1));\r\n // Prints the modified sentence.\r\n System.out.println(input);\r\n }\r\n \r\n in.close();\r\n }", "public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n System.out.println(\"Enter your word :\");\n String word = scanner.nextLine();\n word = word.toUpperCase();\n// word = Character.toString((char)(word.charAt(0)-32));\n String word1 =Character.toString(word.charAt(0));\n word = word.toLowerCase();\n for (int i = 1; i <word.length() ; i++) {\n word1 += Character.toString(word.charAt(i));\n }\n System.out.println(word1);\n }", "protected Node<T> removeFixupCase1(Node<T> u) {\n\t\tflipRight(u.parent);\n\t\treturn u;\n\t}", "@Test\n public void Exercitiu14() {\n\n String[] instruments = new String[6];\n instruments[0] = \"cello\";\n instruments[1] = \"piano\";\n instruments[2] = \"clapsticks\";\n instruments[3] = \"steelpan\";\n instruments[4] = \"triangle\";\n instruments[5] = \"xylophone\";\n\n String[] instrumentsNew = new String[6];\n\n String[] vowels = new String[5];\n vowels[0] = \"a\";\n vowels[1] = \"e\";\n vowels[2] = \"i\";\n vowels[3] = \"o\";\n vowels[4] = \"u\";\n\n String temp = \"\";\n String temporary = \"\";\n boolean status = true;\n\n for (int i = 0; i <= instruments.length-1; i++) {\n temp = instruments[i];\n for (int j = 0; j <= (temp.length()-1); j++) {\n status = true;\n for (int k = 0; k <= (vowels.length-1); k++) {\n if (temp.charAt(j) == vowels[k].charAt(0)) {\n status = false;\n }\n }\n if (status) {\n temporary += temp.charAt(j);\n }\n }\n instruments[i] = temporary;\n temporary = \"\";\n }\n System.out.println(Arrays.toString(instruments));\n }", "public static String toggleCase(String str){\n\t\tStringBuilder sb = new StringBuilder(str);\n\t\tfor(int i=0;i<str.length() ;i++ ){\n\t\t char ch = str.charAt(i);\n\t\t if(ch>='a' && ch<='z')\n\t\t {\n\t\t char upr = (char)('A'+ch-'a');\n\t\t sb.setCharAt(i,upr);\n\t\t }\n\t\t else if(ch>='A' && ch<='Z')\n\t\t {\n\t\t char upr = (char)('a'+ch-'A');\n\t\t sb.setCharAt(i,upr);\n\t\t }\n\t\t}\n\t\t\n\n\t\treturn sb.toString();\n\t}", "public void ordenarXNombreInsercion() {\r\n\t\tfor (int i = 1; i < datos.size(); i++) {\r\n\t\t\tfor (int j = i; j>0 && ( (datos.get(j-1).compare(datos.get(j-1), datos.get(j)))==(1) ); j--) {\r\n\t\t\t\tJugador temp = datos.get(j);\r\n\t\t\t\tdatos.set(j, datos.get(j-1));\r\n\t\t\t\tdatos.set(j-1, temp);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "protected StringNormalizer stringNormalizer()\r\n {\r\n return sn;\r\n }", "private void handleNonFrameShiftCaseStartsWithNoStopCodon() {\n\t\t\tif (aaChange.getPos() == 0) {\n\t\t\t\t// The mutation affects the start codon, is start loss (in the case of keeping the start codon\n\t\t\t\t// intact, we would have jumped into a shifted duplication case earlier.\n\t\t\t\tproteinChange = ProteinMiscChange.build(true, ProteinMiscChangeType.NO_PROTEIN);\n\t\t\t\tvarTypes.add(VariantEffect.START_LOST);\n\t\t\t\tvarTypes.add(VariantEffect.INFRAME_INSERTION);\n\t\t\t} else {\n\t\t\t\t// The start codon is not affected. Since it is a non-FS insertion, the stop codon cannot be\n\t\t\t\t// affected.\n\t\t\t\tif (varAAStopPos == varAAInsertPos) {\n\t\t\t\t\t// The insertion directly starts with a stop codon, is stop gain.\n\t\t\t\t\tproteinChange = ProteinSubstitution.build(true, toString(wtAASeq.charAt(varAAInsertPos)),\n\t\t\t\t\t\tvarAAInsertPos, \"*\");\n\t\t\t\t\tvarTypes.add(VariantEffect.STOP_GAINED);\n\n\t\t\t\t\t// Differentiate the case of disruptive and non-disruptive insertions.\n\t\t\t\t\tif (insertPos.getPos() % 3 == 0)\n\t\t\t\t\t\tvarTypes.add(VariantEffect.INFRAME_INSERTION);\n\t\t\t\t\telse\n\t\t\t\t\t\tvarTypes.add(VariantEffect.DISRUPTIVE_INFRAME_INSERTION);\n\t\t\t\t} else {\n\t\t\t\t\tif (varAAStopPos != -1 && wtAAStopPos != -1\n\t\t\t\t\t\t&& varAASeq.length() - varAAStopPos != wtAASeq.length() - wtAAStopPos) {\n\t\t\t\t\t\t// The insertion does not directly start with a stop codon but the insertion leads to a stop\n\t\t\t\t\t\t// codon in the affected amino acids. This leads to an \"delins\" protein annotation.\n\t\t\t\t\t\tproteinChange = ProteinIndel.buildWithSeqDescription(true,\n\t\t\t\t\t\t\ttoString(wtAASeq.charAt(varAAInsertPos)), varAAInsertPos,\n\t\t\t\t\t\t\ttoString(wtAASeq.charAt(varAAInsertPos + 1)), varAAInsertPos + 1,\n\t\t\t\t\t\t\tnew ProteinSeqDescription(),\n\t\t\t\t\t\t\tnew ProteinSeqDescription(varAASeq.substring(varAAInsertPos, varAAStopPos)));\n\t\t\t\t\t\tvarTypes.add(VariantEffect.STOP_GAINED);\n\n\t\t\t\t\t\taddNonFrameshiftInsertionEffect();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// The changes on the amino acid level do not lead to a new stop codon, is non-FS insertion.\n\n\t\t\t\t\t\t// Differentiate the ins and the delins case.\n\t\t\t\t\t\tif (aaChange.getRef().equals(\"\")) {\n\t\t\t\t\t\t\t// Clean insertion.\n\t\t\t\t\t\t\tif (DuplicationChecker.isDuplication(wtAASeq, aaChange.getAlt(), varAAInsertPos)) {\n\t\t\t\t\t\t\t\t// We have a duplication, can only be duplication of AAs to the left because of\n\t\t\t\t\t\t\t\t// normalization in CDSExonicAnnotationBuilder constructor.\n\t\t\t\t\t\t\t\tif (aaChange.getAlt().length() == 1) {\n\t\t\t\t\t\t\t\t\tproteinChange = ProteinDuplication.buildWithSeqDescription(true,\n\t\t\t\t\t\t\t\t\t\ttoString(wtAASeq.charAt(varAAInsertPos - 1)), varAAInsertPos - 1,\n\t\t\t\t\t\t\t\t\t\ttoString(wtAASeq.charAt(varAAInsertPos - 1)), varAAInsertPos - 1,\n\t\t\t\t\t\t\t\t\t\tnew ProteinSeqDescription());\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tproteinChange = ProteinDuplication.buildWithSeqDescription(true,\n\t\t\t\t\t\t\t\t\t\ttoString(wtAASeq.charAt(varAAInsertPos - aaChange.getAlt().length())),\n\t\t\t\t\t\t\t\t\t\tvarAAInsertPos - aaChange.getAlt().length(),\n\t\t\t\t\t\t\t\t\t\ttoString(wtAASeq.charAt(varAAInsertPos - 1)), varAAInsertPos - 1,\n\t\t\t\t\t\t\t\t\t\tnew ProteinSeqDescription());\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\taddNonFrameshiftInsertionEffect();\n\t\t\t\t\t\t\t\tvarTypes.add(VariantEffect.DIRECT_TANDEM_DUPLICATION);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// We have a simple insertion.\n\t\t\t\t\t\t\t\tproteinChange = ProteinInsertion.buildWithSequence(true,\n\t\t\t\t\t\t\t\t\ttoString(wtAASeq.charAt(varAAInsertPos - 1)), varAAInsertPos - 1,\n\t\t\t\t\t\t\t\t\ttoString(wtAASeq.charAt(varAAInsertPos)), varAAInsertPos, aaChange.getAlt());\n\n\t\t\t\t\t\t\t\taddNonFrameshiftInsertionEffect();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// The delins/substitution case.\n\t\t\t\t\t\t\tproteinChange = ProteinIndel.buildWithSeqDescription(true, aaChange.getRef(),\n\t\t\t\t\t\t\t\tvarAAInsertPos, aaChange.getRef(), varAAInsertPos, new ProteinSeqDescription(),\n\t\t\t\t\t\t\t\tnew ProteinSeqDescription(aaChange.getAlt()));\n\t\t\t\t\t\t\taddNonFrameshiftInsertionEffect();\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}", "public static String encode (String original){\n\n // WRITE YOUR CODE HERE\n String encodeString = new String();\n int n = original.length();\n for (int i = 0; i < n; i++){\n int count = 1;\n while (i < n - 1 && original.charAt(i) == original.charAt(i + 1)){\n count++;\n i++;\n }\n if (count != 1) {\n \tencodeString = encodeString + count;\n }\n encodeString = encodeString + original.charAt(i);\n }\n return encodeString;\n\n }", "public static String lowerCase(String s){\n\t\tString lower= \" \";\n\t\tfor (int i=0; i<s.length(); i++){\n\t\t\tString letter=s.substring(i, i+1);\n\t\t\tif (Constants.UPPER_CASE.indexOf(letter)!= -1){\n\t\t\t\tint indexLetter=Constants.UPPER_CASE.indexOf(letter);\n\t\t\t\tString lowerLetter= Constants.UPPER_CASE.substring(indexLetter, indexLetter+1);\n\t\t\t\tlower=lower+lowerLetter;\n\t\t\t} else {\n\t\t\t\tlower=lower+letter;\n\t\t\t}\n\t\t}\n\t\treturn lower;\n\t}", "public void setLower(int value) {\n this.lower = value;\n }" ]
[ "0.6496335", "0.5925674", "0.5616072", "0.5484125", "0.5475472", "0.54463726", "0.5418806", "0.53479195", "0.5283033", "0.52799463", "0.5264549", "0.5258946", "0.5258709", "0.523987", "0.5233676", "0.52298295", "0.52231294", "0.51935554", "0.51414514", "0.506774", "0.5045049", "0.50434935", "0.5036179", "0.4923352", "0.4882228", "0.4815921", "0.48080945", "0.48057508", "0.480542", "0.47626942", "0.47534326", "0.47431007", "0.4725834", "0.4724316", "0.46975482", "0.4691757", "0.46827322", "0.46762085", "0.46704283", "0.4669057", "0.46474883", "0.4636533", "0.46281183", "0.46104437", "0.458429", "0.45776647", "0.4561278", "0.45592162", "0.45403358", "0.45400453", "0.45297053", "0.45234782", "0.45098045", "0.45080784", "0.45052785", "0.4504183", "0.45019832", "0.44999287", "0.44962674", "0.44955644", "0.44899565", "0.44880074", "0.44780865", "0.44770563", "0.44684857", "0.4466393", "0.4460401", "0.44597834", "0.44592813", "0.44570053", "0.44552168", "0.44435984", "0.44416857", "0.44365624", "0.44352716", "0.4431163", "0.44308048", "0.44291517", "0.44261858", "0.4413776", "0.44080716", "0.44050664", "0.44003767", "0.43989158", "0.43963546", "0.43920812", "0.43887097", "0.43802866", "0.43795705", "0.4378503", "0.4374735", "0.4373118", "0.43682516", "0.43566942", "0.4353606", "0.43532893", "0.43526697", "0.4351194", "0.4348984", "0.43375215" ]
0.7736918
0
Numeric representation of sequence for dfa array construction in string matching.
public int[] toIntArray(){ int[] array = new int[getSeq().size()]; for (int i = 0; i < array.length; i++) { char c = Character.toUpperCase(getSeq().get(i)); array[i] = Sequence.convert(c); } return array; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double[] sequence()\n\t{\n\t\treturn _adblSequence;\n\t}", "java.lang.String getNumb();", "java.lang.String getNum2();", "private void convertToNum(String s)\n\t{\n\t\tchar charArray[] = s.toCharArray();\n\t\tmyMessage = new BigInteger[(int)Math.ceil(s.length()/(double)BLOCK_SIZE)];\n\t\tfor(int i = 0; i < myMessage.length; i++)\n\t\t{\n\t\t\tString chars = \"\";\n\t\t\tfor(int j = 0; j < BLOCK_SIZE; j++)\n\t\t\t{\n\t\t\t\tif(charArray.length > j+(i*BLOCK_SIZE))\n\t\t\t\t{\n\t\t\t\t\tchars += (int)charArray[j+(i*BLOCK_SIZE)];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tchars += \"256\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tmyMessage[i] = new BigInteger(chars);\n\t\t}\n\t}", "public int normalizedLength(List<String> sequence);", "java.lang.String getNum1();", "public BigNum( String s)\r\n { \r\n int i = 0;\r\n myArray = new int[SIZE];\r\n for ( int j = s.length()-1; j >= 0 ; j--)\r\n {\r\n \r\n myArray[i] = s.charAt(j)- '0';\r\n i++;\r\n }\r\n }", "public double cantidadGC(String seq){\n int countErrorInt=0;\n nG = 0;\n nC = 0;\n nA = 0;\n nT = 0;\n int tam=0;\n for (int i=0;i<seq.length();i++){\n char n= seq.charAt(i);\n if (n=='G')\n nG++;\n else if (n=='C')\n nC++;\n else if ((n=='T'))\n nT++;\n else if ((n=='A'))\n nA++;\n else\n countErrorInt++;\n }\n tam+=seq.length();\n error.add(countErrorInt);\n\t\t/*\n\t\t * nucleotido[0]=\"A\";\n\t\tnucleotido[1]=\"T\";\n\t\tnucleotido[2]=\"G\";\n\t\tnucleotido[3]=\"C\";\n\t\t */\n double total= (double)(nA+nG+nC+nT);\n nucCant[0]=nA/total;\n nucCant[1]=nT/total;\n nucCant[2]=nG/total;\n nucCant[3]=nC/total;\n return ((double)(nG+nC)/(double)(nA+nG+nC+nT))*100;\n\n }", "public final synchronized void mo12514a(String str) {\n long j;\n this.f5341c = true;\n if (this.f5340b.size() == 0) {\n j = 0;\n } else {\n j = this.f5340b.get(this.f5340b.size() - 1).f5362c - this.f5340b.get(0).f5362c;\n }\n if (j > 0) {\n long j2 = this.f5340b.get(0).f5362c;\n C1264ee.m6817b(\"(%-4d ms) %s\", Long.valueOf(j), str);\n for (C1290fc next : this.f5340b) {\n long j3 = next.f5362c;\n C1264ee.m6817b(\"(+%-4d) [%2d] %s\", Long.valueOf(j3 - j2), Long.valueOf(next.f5361b), next.f5360a);\n j2 = j3;\n }\n }\n }", "@Test\n public void testAnyDigitSequences() {\n assertThat(regex(seq(e(\"0\"), e(\"1\"), X))).isEqualTo(\"01\\\\d\");\n // \"\\d\\d\" is shorter than \"\\d{2}\"\n assertThat(regex(seq(X, X))).isEqualTo(\"\\\\d\\\\d\");\n assertThat(regex(seq(X, X, X))).isEqualTo(\"\\\\d{3}\");\n // Top level optional groups are supported.\n assertThat(regex(opt(seq(X, X)))).isEqualTo(\"(?:\\\\d{2})?\");\n // Optional parts go at the end.\n assertThat(regex(\n seq(\n opt(seq(X, X)),\n X, X)))\n .isEqualTo(\"\\\\d\\\\d(?:\\\\d{2})?\");\n // \"(x(x(x)?)?)?\"\n Edge anyGrp = opt(seq(\n X,\n opt(seq(\n X,\n opt(X)))));\n // The two cases of a group on its own or as part of a sequence are handled separately, so\n // must be tested separately.\n assertThat(regex(anyGrp)).isEqualTo(\"\\\\d{0,3}\");\n assertThat(regex(seq(e(\"1\"), e(\"2\"), anyGrp))).isEqualTo(\"12\\\\d{0,3}\");\n // xx(x(x(x)?)?)?\"\n assertThat(regex(seq(X, X, anyGrp))).isEqualTo(\"\\\\d{2,5}\");\n // Combining \"any digit\" groups produces minimal representation\n assertThat(regex(seq(anyGrp, anyGrp))).isEqualTo(\"\\\\d{0,6}\");\n }", "public int getLength(){\n return sequence.length(); \n\t}", "public int mo41471a() {\n return this.f11339a.length;\n }", "private static String[] getValidMiniFloatBitSequences(){\r\n int nbrValues = (int)Math.pow(2, MINI_FLOAT_SIZE);\r\n\r\n String[] result = new String[nbrValues];\r\n for(int i = 0; i < nbrValues; i++){\r\n\r\n String full = String.format(\"%\" + Integer.SIZE + \"s\", Integer.toBinaryString(i))\r\n .replace(' ', '0');\r\n result[i] = full.substring(Integer.SIZE - MINI_FLOAT_SIZE, Integer.SIZE);\r\n }\r\n return result;\r\n }", "public static int numDecodings_orig(String s) {\n\n if (s == null || s.length() == 0) {\n return 0;\n }\n\n char[] nums = s.toCharArray();\n int[] memos = new int[nums.length];\n memos[nums.length-1] = nums[nums.length-1] != '0' ? 1 : 0;\n for (int i = nums.length-2; i >= 0; i--) {\n int numAtI = nums[i+0]-'0';\n int numAtI_1 = nums[i+1]-'0';\n\n if (numAtI > 2 || (numAtI == 2 && numAtI_1 > 6)) {\n memos[i] = memos[i+1];\n } else if (numAtI == 1 || (numAtI == 2 && numAtI_1 <= 6)) {\n if (i < nums.length-2) {\n memos[i] = memos[i+1] + memos[i+2];\n } else {\n memos[i] = memos[i+1] + 1;\n }\n }\n }\n\n return memos[0];\n }", "private static int m1645a(CharSequence charSequence) {\n return new C0510a(charSequence, false).mo4451d();\n }", "public int[] Version1(int[] seq){\n \n return seq;\n \n }", "public static int[] makeSequence(String str) {\n\t\tint[] path = new int[str.length()];\n\t\t\n\t\tfor(int i = 0; i < path.length; i++)\n\t\t\tpath[i] = Integer.parseInt(Character.toString(str.charAt(i)));\n\t\treturn path;\n }", "private static String[] getValidMiniFloatBitSequences() {\r\n int nbrValues = (int) Math.pow(2, MINI_FLOAT_SIZE);\r\n\r\n String[] result = new String[nbrValues];\r\n for (int i = 0; i < nbrValues; i++) {\r\n\r\n String full = String.format(\"%\" + Integer.SIZE + \"s\", Integer.toBinaryString(i)).replace(' ', '0');\r\n result[i] = full.substring(Integer.SIZE - MINI_FLOAT_SIZE, Integer.SIZE);\r\n }\r\n return result;\r\n }", "public int getSeqNumber() {\n return buffer.getShort(2) & 0xFFFF;\n }", "public int numDecodings(String s) {\r\n\t\tif ((s==null)||(s.length()<1)||(s.charAt(0)=='0')){\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tint index = 0;\r\n\t\tMap<Integer,Integer> c = new HashMap<Integer,Integer>();\r\n\t\tc.put(index, 1);\r\n\t\tindex++;\r\n\t\twhile(index <s.length()) {\r\n\t\t\tint value = 0;\r\n\t\t\tchar pre = s.charAt(index-1);\r\n\t\t\tchar cur = s.charAt(index);\r\n\t\t\tint preprevalue = 0;\r\n\t\t\tif(index==1) {\r\n\t\t\t\tpreprevalue = 1;\r\n\t\t\t}else {\r\n\t\t\t\tpreprevalue = c.get(index- 2);\r\n\t\t\t}\r\n\t\t\tif (cur=='0') {\r\n\t\t\t\tif((pre!='1')&&(pre!='2')) {\r\n\t\t\t\t\treturn 0;\r\n\t\t\t\t}else {\r\n\t\t\t\t\tvalue = preprevalue;\t\r\n\t\t\t\t}\t\t\t\r\n\t\t\t}else {\r\n\t\t\t\tif(((pre!='1')&&(pre!='2')) || ((cur-'0')>6)&& (pre!='1') ) {\r\n\t\t\t\t\tvalue = c.get(index-1);\t\r\n\t\t\t\t}else {\r\n\t\t\t\t\tvalue = c.get(index-1) + preprevalue;\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tc.put(index, value);\r\n\t\t\tindex++;\r\n\t\t}\r\n\t\treturn c.get(s.length()-1);\r\n\t}", "@Test\n public void longerNumberSerializerTest(){\n int[] input3 = {0,1,2,3,4,5,6};\n \n // Want to map 0 -> \"z\", 1 -> \"e\", 2 -> \"d\", 3 -> \"r\",\n // 4 -> \"o\", 5 -> \"a\", 6 -> \"t\"\n char[] alphabet3 = {'z', 'e', 'd', 'r','o','a','t'};\n \n String expectedOutput3 = \"zedroat\";\n assertEquals(expectedOutput3,\n DigitsToStringConverter.convertDigitsToString(\n input3, 7, alphabet3));\n }", "private void processNumeric() {\n\n Token token = tokens.get(currentTokenPointer);\n\n String tokenString = string(token);\n\n pushIt(new ReplacementTransformer(tokenString));\n\n }", "public BigInteger getSeqNextVal(String sequence) {\r\n\t\treturn this.crudDAO.getSeqNextVal(sequence);\r\n\t}", "private long getSeqNum() throws Exception {\n\t\tSystem.out.println(\"seq: \" + seq);\n\t\tif (seq == 256) {\n\t\t\tseq = 0;\n\t\t}\n\t\treturn seq++;\n\t}", "public Number[] stringToArrayNumberParser(String string) {\n int stringLength = string.length();\n int arrayLength = (int) (stringLength / 3 * 2 + 5);\n Number[] array = new Number[arrayLength];\n int lastFreeArrayIndex = 0;\n int numberBeginIndex = 0;\n int numberEndIndex = 0;\n char currentCharacter;\n Number number;\n int index;\n boolean isFoundNumber = false;\n for (index = 0; index < stringLength; index++) {\n boolean isSeparator = false;\n currentCharacter = string.charAt(index);\n for (int separatorIndex = 0; separatorIndex < allowedSeparators.length; separatorIndex++) {\n if (currentCharacter == allowedSeparators[separatorIndex]) {\n isSeparator = true;\n }\n }\n if (!isSeparator && !isFoundNumber) {\n isFoundNumber = true; //if not a separator and the first digit of the number\n numberBeginIndex = index;\n } else if (isSeparator && isFoundNumber) {\n isFoundNumber = false; //if separator, after the start of the number\n numberEndIndex = index - 1;\n System.out.println(\"length \" + string.length());\n System.out.println(\"begin: \" + numberBeginIndex);\n System.out.println(\"end \" + (numberEndIndex + 1));\n number = Double.parseDouble(string.substring(numberBeginIndex, numberEndIndex + 1));\n addNumberToArrayByIndex(array, number, lastFreeArrayIndex);\n lastFreeArrayIndex++;\n }\n }\n if (isFoundNumber) {\n numberEndIndex = index - 1;\n number = Double.parseDouble(string.substring(numberBeginIndex, numberEndIndex + 1));\n addNumberToArrayByIndex(array, number, lastFreeArrayIndex); //case, where the number is the last element of the string\n lastFreeArrayIndex++;\n }\n return arrayFinalFormation(array, lastFreeArrayIndex);\n }", "public int[] mo110213a(String str) {\n return f89786a.mo110197a().mo110207a(str);\n }", "public int size() { return seq.size(); }", "Sequence(String inString) {\r\n // Allocate bytes for the sequence\r\n seqArray = new byte[(int)Math.ceil(inString.length() / 4.0)];\r\n seqLength = inString.length();\r\n\r\n for (int i = 0; i < inString.length(); i++) {\r\n // Begin at the start of byte minus 2, then subtract\r\n // the number of bits into the byte we are\r\n int bytePos = 6 - (i % 4) * 2;\r\n // Divide by the current position in string to find current byte\r\n int currByte = i / 4;\r\n char currChar = inString.charAt(i);\r\n if (currChar == 'A') {\r\n seqArray[currByte] |= 0 << bytePos;\r\n }\r\n else if (currChar == 'C') {\r\n seqArray[currByte] |= 1 << bytePos;\r\n }\r\n else if (currChar == 'G') {\r\n seqArray[currByte] |= 2 << bytePos;\r\n }\r\n else if (currChar == 'T') {\r\n seqArray[currByte] |= 3 << bytePos;\r\n }\r\n else {\r\n System.out.print(\"Could not create sequence!\");\r\n }\r\n }\r\n }", "private float m33239a(@C0195i0 CharSequence charSequence) {\n if (charSequence == null) {\n return 0.0f;\n }\n return this.f19383a.measureText(charSequence, 0, charSequence.length());\n }", "short digits();", "@Test\n public void basicNumberSerializerTest() {\n int[] input = {0, 1, 2, 3};\n\n // Want to map 0 -> \"d\", 1 -> \"c\", 2 -> \"b\", 3 -> \"a\"\n char[] alphabet = {'d', 'c', 'b', 'a'};\n\n String expectedOutput = \"dcba\";\n assertEquals(expectedOutput,\n DigitsToStringConverter.convertDigitsToString(\n input, 4, alphabet));\n }", "public static void main(String[] args) {\n \tString s = \"[94,93,95,92,94,96,94,93,93,93,95,97,97,95,95,92,94,94,94,92,94,94,96,98,98,96,98,96,94,94,96,91,91,93,95,93,95,95,95,91,93,93,95,95,93,97,97,97,97,97,99,95,97,97,99,95,97,93,95,null,95,95,95,90,92,90,92,92,94,94,96,94,null,96,94,94,94,96,null,90,92,null,null,94,null,94,96,null,null,null,null,96,null,null,null,96,98,96,96,96,96,100,100,94,94,98,96,96,96,98,100,94,96,98,98,94,94,94,96,null,null,94,96,94,94,89,91,null,93,91,91,91,91,null,91,null,null,null,null,null,null,93,95,95,95,93,95,null,null,95,93,null,null,null,null,null,93,null,95,93,95,null,97,95,97,95,95,97,99,97,97,null,97,95,null,95,97,101,101,99,99,95,null,93,null,97,99,95,97,97,97,95,95,99,97,101,99,93,93,95,97,97,99,99,null,null,null,null,95,95,95,97,95,null,null,95,null,null,95,null,null,88,88,92,null,null,94,90,92,92,92,90,90,90,92,90,92,null,null,null,94,94,96,null,null,null,94,null,null,null,null,94,null,null,null,94,null,null,null,96,null,96,96,94,94,null,null,null,96,96,94,96,96,100,100,96,98,96,96,null,96,94,null,94,96,null,null,100,102,100,null,null,100,98,98,94,96,92,94,96,98,98,98,94,94,96,98,96,98,96,98,null,96,96,94,98,98,96,98,100,102,98,null,92,94,92,94,96,null,null,null,96,98,98,100,100,100,94,96,94,null,null,96,96,98,null,null,null,null,96,94,null,null,87,89,91,null,null,null,89,89,null,91,93,93,null,93,89,91,89,91,91,89,93,null,91,null,null,null,null,93,null,null,null,null,null,null,null,null,null,null,null,null,null,95,97,null,95,null,null,95,95,97,95,97,95,null,95,95,97,97,101,101,101,101,95,95,97,99,95,null,95,97,97,null,95,null,93,95,null,null,null,null,101,103,99,null,null,101,null,null,null,null,null,93,97,97,null,91,null,95,97,97,97,null,97,null,97,99,95,95,93,null,null,97,97,null,95,null,null,99,95,97,97,99,95,97,95,97,93,95,99,97,97,99,95,97,97,99,99,99,101,101,null,99,91,null,null,null,null,null,null,93,null,97,95,95,97,null,97,97,101,99,null,99,99,null,null,null,97,97,null,null,null,null,97,97,null,null,null,95,null,null,null,null,null,null,null,null,null,null,null,null,92,null,null,null,null,null,null,94,88,null,null,null,90,90,null,null,null,null,88,88,null,null,null,90,null,null,null,null,null,null,null,null,96,96,96,96,96,96,96,94,null,null,96,96,94,null,94,96,96,null,98,96,100,102,null,null,102,102,null,100,94,96,94,null,96,98,98,null,94,96,96,null,98,null,null,null,96,94,null,null,null,94,null,null,null,104,null,100,null,102,null,null,96,96,96,96,null,92,null,96,null,96,null,null,96,null,null,null,null,null,98,null,null,null,94,94,null,null,null,98,null,96,null,null,100,null,96,96,96,98,96,98,98,100,94,null,null,null,null,null,null,98,94,92,96,96,null,100,96,null,98,null,98,100,94,94,96,98,null,96,98,100,98,98,100,100,102,100,100,null,null,null,null,92,92,null,null,null,96,94,null,96,98,98,96,98,96,null,102,null,98,null,null,null,100,100,null,null,null,null,96,98,96,98,null,94,null,null,95,null,87,null,null,91,91,91,87,null,null,89,91,null,null,null,null,null,null,null,null,null,97,95,95,97,null,null,null,null,97,95,null,null,93,null,95,93,null,null,95,null,97,99,95,95,99,null,null,103,101,null,null,103,null,99,95,95,null,95,95,93,null,97,null,null,null,null,93,95,95,97,null,null,null,null,97,null,null,null,null,null,null,null,101,null,101,103,97,97,95,null,null,null,null,97,null,null,95,null,null,null,null,97,null,null,93,93,null,null,97,null,null,null,99,null,95,95,null,null,97,95,null,null,95,null,97,null,97,99,99,null,null,null,null,99,93,95,91,93,97,97,95,95,101,99,null,null,null,null,99,null,null,null,93,null,93,95,97,95,97,99,95,95,97,99,99,101,97,null,null,99,99,99,null,null,103,103,101,101,null,101,null,93,null,91,null,95,null,95,null,97,99,99,97,99,97,97,97,null,95,95,null,null,null,97,101,99,99,101,null,null,null,null,95,null,null,null,93,null,null,null,null,88,null,null,null,null,null,null,null,null,88,null,90,92,null,null,94,96,null,null,96,96,98,null,96,96,null,null,94,96,92,null,94,null,96,98,100,100,null,96,94,null,null,null,102,null,null,null,null,102,null,null,94,94,94,96,null,96,null,null,92,94,96,null,94,null,94,94,null,96,null,98,null,null,null,100,100,102,null,null,98,null,96,98,null,null,null,null,null,null,null,null,94,94,null,94,null,null,null,null,94,96,96,96,96,96,null,96,null,null,96,96,98,98,null,100,98,100,null,null,null,94,94,96,92,92,92,94,null,98,null,98,94,96,94,96,null,null,null,100,null,null,92,null,92,94,null,96,98,96,96,null,98,98,98,null,96,null,96,96,null,null,null,100,98,null,null,100,96,98,null,null,98,98,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,96,96,98,null,null,100,100,96,98,100,98,null,null,96,98,98,98,96,null,94,null,null,null,null,100,98,null,100,null,null,102,null,null,null,null,null,null,87,null,null,null,null,null,95,95,null,97,null,null,null,97,97,null,95,97,95,97,95,null,null,null,null,null,null,null,95,null,null,null,null,null,null,101,97,null,93,null,null,null,null,103,null,null,95,null,95,93,95,95,95,null,null,93,null,93,null,null,null,null,95,95,null,null,95,97,97,99,null,null,null,null,103,null,null,null,95,95,99,null,93,null,null,null,null,null,93,95,97,95,95,97,null,97,97,null,95,null,null,null,null,null,95,97,99,97,97,99,null,null,99,97,101,null,95,null,null,93,97,97,91,93,91,93,93,91,93,93,null,null,99,97,93,93,95,97,93,null,null,95,null,null,null,93,91,93,95,95,95,97,null,null,null,null,null,null,99,null,null,null,null,null,97,null,95,null,null,null,null,null,99,null,null,null,95,95,null,97,97,null,99,99,95,null,null,null,null,null,null,101,99,null,95,95,null,null,null,null,97,99,null,95,99,null,97,null,null,null,97,null,null,null,101,null,99,null,null,null,103,null,null,null,null,null,94,94,null,null,null,null,null,98,94,94,null,null,null,null,96,null,96,null,null,96,null,102,null,98,null,null,null,null,null,null,null,null,94,94,null,94,96,94,null,null,null,null,null,null,null,94,94,null,null,null,null,null,null,null,null,100,null,null,96,94,null,96,null,null,null,null,94,null,null,null,null,96,null,null,94,null,null,96,null,null,96,null,null,null,null,null,96,null,null,null,96,96,null,98,null,null,98,null,null,null,null,102,null,null,92,94,96,null,96,96,null,90,null,null,92,92,null,92,92,null,null,92,null,92,94,92,null,100,96,null,94,null,null,94,96,null,98,null,92,94,94,96,null,null,92,90,null,null,94,null,94,96,94,96,98,96,null,null,null,null,94,96,null,null,94,null,94,94,null,null,null,98,98,null,null,100,null,null,null,102,null,null,96,null,null,96,null,null,null,null,96,null,100,null,null,null,null,null,null,102,null,null,104,104,null,null,null,null,null,97,null,95,95,null,95,97,null,null,95,null,null,103,null,97,95,95,null,null,93,93,null,null,null,95,null,null,null,93,null,null,97,null,93,null,null,null,null,null,95,null,null,null,null,null,null,null,95,97,95,null,95,null,97,99,null,null,null,null,91,93,null,95,null,null,null,97,95,null,89,null,null,91,null,null,null,null,null,null,null,null,91,null,93,95,93,91,null,null,95,null,93,null,95,null,null,null,null,null,null,93,null,null,null,95,null,null,null,null,89,null,null,95,null,null,95,null,95,93,null,null,null,97,95,null,null,null,95,null,null,null,null,95,null,95,99,null,97,null,null,null,null,103,95,null,95,null,null,97,null,null,null,null,null,null,null,null,null,null,null,96,94,null,null,null,98,null,null,null,104,null,null,null,null,null,null,null,null,null,94,94,null,null,null,94,null,98,94,null,null,96,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,94,null,null,null,null,null,null,null,null,null,92,null,null,null,null,94,null,94,null,92,null,94,92,94,94,96,94,92,null,null,null,null,94,94,null,null,96,null,92,null,96,null,null,null,null,null,null,null,94,null,null,null,96,null,null,102,null,null,null,null,null,null,null,null,null,null,null,null,null,null,93,null,93,null,null,null,99,null,null,null,null,null,null,null,null,null,null,null,null,null,null,91,null,null,null,91,null,null,null,null,null,97,null,null,null,91,null,95,null,null,null,null,null,null,null,97,null,null,null,null,101,null,94,null,null,null,null,null,null,92,null,null,null,96,null,null,94,null,null,96,null,null,93,null,null,null,null,null,null,null,97]\";\r\n\t\tTreeNode one = TreeNode.str2tree(s);\r\n \tFindDuplicateSubtrees3 findDuplicateSubtrees = new FindDuplicateSubtrees3();\r\n\t\tList<TreeNode> result = findDuplicateSubtrees.findDuplicateSubtrees(one);\r\n\t\tfor (TreeNode treeNode : result) {\r\n\t\t\tSystem.out.println(treeNode);\r\n\t\t}\r\n\t}", "public int getLength()\n {\n return seq.length;\n }", "public static int size_seqnum() {\n return (8 / 8);\n }", "Num\t\tgetNumValue();", "public String get_sequence() {\n return m_aa_sequence;\n }", "java.lang.String getSeq();", "public int palsubsequence2(String str) {\r\n\t\tint m = str.length();\r\n\t\tint[][] mem = new int[m + 1][m + 1];\r\n\r\n\t\tfor (int i = 1; i <= m; ++i) {\r\n\t\t\tmem[i][i] = 1;\r\n\t\t}\r\n\t\t// Bottom-up row-wise filling\r\n\t\tfor (int i = m - 1; i >= 1; --i) {\r\n\t\t\tfor (int j = i + 1; j <= m; ++j) {\r\n\r\n\t\t\t\tif (str.charAt(i - 1) == str.charAt(j - 1))\r\n\t\t\t\t\tmem[i][j] = mem[i + 1][j - 1] + 2;\r\n\t\t\t\telse {\r\n\t\t\t\t\tint incr = mem[i + 1][j];\r\n\t\t\t\t\tint decr = mem[i][j - 1];\r\n\t\t\t\t\tmem[i][j] = Math.max(incr, decr);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tprintMemory(mem);\r\n\t\t// printSequence(mem, 1, m, str);\r\n\t\tSystem.out.println();\r\n\t\treturn mem[1][m];\r\n\r\n\t}", "public final int mo40473a() {\n int a = super.mo40473a() + bbf.m48355b(1, this.f41423c.intValue());\n if (this.f41424d != null) {\n a += bbf.m48357b(2, this.f41424d);\n }\n if (this.f41425e != null) {\n a += bbf.m48356b(3, (bbl) this.f41425e);\n }\n if (this.f41430k != null && this.f41430k.length > 0) {\n int i = 0;\n for (int a2 : this.f41430k) {\n i += bbf.m48348a(a2);\n }\n a = a + i + (this.f41430k.length * 1);\n }\n if (this.f41426f != null) {\n a += bbf.m48355b(8, this.f41426f.intValue());\n }\n if (this.f41427g == null || this.f41427g.length <= 0) {\n return a;\n }\n int i2 = 0;\n int i3 = 0;\n for (String str : this.f41427g) {\n if (str != null) {\n i3++;\n i2 += bbf.m48350a(str);\n }\n }\n return a + i2 + (i3 * 1);\n }", "private static int m14199a(String str, String str2) {\n String str3 = \"0\";\n if (str == null) {\n str = str3;\n }\n if (str2 == null) {\n str2 = str3;\n }\n String str4 = \"\\\\.\";\n String[] split = str.split(str4);\n String[] split2 = str2.split(str4);\n int max = Math.max(split.length, split2.length);\n int i = 0;\n while (i < max) {\n int parseInt = i < split.length ? Integer.parseInt(split[i]) : 0;\n int parseInt2 = i < split2.length ? Integer.parseInt(split2[i]) : 0;\n if (parseInt < parseInt2) {\n return -1;\n }\n if (parseInt > parseInt2) {\n return 1;\n }\n i++;\n }\n return 0;\n }", "public void testSequenceNumWrapAround() {\n\t\tByteStreamNALUnit[] stream = new ByteStreamNALUnit[70000];\n\t\tfor (int i = 0; i < stream.length; i++) {\n\t\t\tstream[i] = new ByteStreamNALUnit(START_CODE_4, SAMPLE_STREAM[3].nalUnit, i);\n\t\t}\n\n\t\tStreamVerifier verifier = new StreamVerifier(stream);\n\t\tSdlSession session = createTestSession();\n\t\tRTPH264Packetizer packetizer = null;\n\t\ttry {\n\t\t\tpacketizer = new RTPH264Packetizer(verifier, SessionType.NAV, SESSION_ID, session);\n\t\t} catch (IOException e) {\n\t\t\tfail();\n\t\t}\n\t\tMockVideoApp encoder = new MockVideoApp(packetizer);\n\n\t\ttry {\n\t\t\tpacketizer.start();\n\t\t} catch (IOException e) {\n\t\t\tfail();\n\t\t}\n\n\t\tencoder.inputByteStreamWithArray(stream);\n\t\ttry {\n\t\t\tThread.sleep(2000, 0);\n\t\t} catch (InterruptedException e) {}\n\n\t\tpacketizer.stop();\n\t\tassertEquals(stream.length, verifier.getPacketCount());\n\t}", "@Test\n public void subSequencesTest3() {\n String text = \"wnylazlzeqntfpwtsmabjqinaweaocfewgpsrmyluadlybfgaltgljrlzaaxvjehhygggdsrygvnjmpyklvyilykdrphepbfgdspjtaap\"\n + \"sxrpayholutqfxstptffbcrkxvvjhorawfwaejxlgafilmzrywpfxjgaltdhjvjgtyguretajegpyirpxfpagodmzrhstrxjrpirlbfgkhhce\"\n + \"wgpsrvtuvlvepmwkpaeqlstaqolmsvjwnegmzafoslaaohalvwfkttfxdrphepqobqzdqnytagtrhspnmprtfnhmsrmznplrcijrosnrlwgds\"\n + \"bylapqgemyxeaeucgulwbajrkvowsrhxvngtahmaphhcyjrmielvqbbqinawepsxrewgpsrqtfqpveltkfkqiymwtqssqxvchoilmwkpzermw\"\n + \"eokiraluaammkwkownrawpedhcklrthtftfnjmtfbftazsclmtcssrlluwhxahjeagpmgvfpceggluadlybfgaltznlgdwsglfbpqepmsvjha\"\n + \"lwsnnsajlgiafyahezkbilxfthwsflgkiwgfmtrawtfxjbbhhcfsyocirbkhjziixdlpcbcthywwnrxpgvcropzvyvapxdrogcmfebjhhsllu\"\n + \"aqrwilnjolwllzwmncxvgkhrwlwiafajvgzxwnymabjgodfsclwneltrpkecguvlvepmwkponbidnebtcqlyahtckk\";\n\n String[] expected = new String[6];\n expected[0] = \"wlfaafrdarvgypipgaputcjflmftgepfmrrhpvwllnfofdqqtmhnjlyeewvxhceqpgftysopelkrhhjtmlapcagllpasazflfthohdtrrvobliwnhazafeevpnlk\";\n expected[1] = \"nzpbwemllljggylhdaatprhwgzxdttypzxlhslksmeohkronrpmprwlmubovmylispqkmqizouwactmatlhmedagfmlafktgmfhcjlhxoagjullcrfxbslceoeyk\";\n expected[2] = \"yewjewyytzegvkyespyqtkoaarjhyaiarjbcrvptsgsatpbyhrslogaycawnajvnxspfwxlekakwkftzcujgglldbswjybhktxcizpypppchanlxwawjctgpnba\";\n expected[3] = \"lqtqaglbgahdnlkppshffxrefygjgjrghrfeveaavmllthqtstrrsdpxgjsgprqarrvktvmriaopltfsswevgytwpvslaiwirjfricwgzxmhqjzvljnglrumbth\";\n expected[4] = \"ansiopuflahsjvdbjxoxfvajiwavuepospgwtpeqjzavfezapfmcnsqeurrthmbweqeqqcwmrmwerfbcshaflbzsqjnghlswabsbibwvvdfsrowgwvyowpvwict\";\n expected[5] = \"ztmncsagjxyrmyrftrlsbvwxlpljrgxdtikgumqowaawxpdgnnzirbgalkhahibewtlishkwamndtnflrxgpufngehniexfgwbykxcncyrelwlmkigmdnklkdqc\";\n int keyLen = 6;\n String[] owns = this.ic.subSequences(text, keyLen);\n for (int i = 0; i < expected.length; i++) {\n assertEquals(expected[i], owns[i]);\n }\n }", "static long fromRomanNumeral(String s) {\n long total = 0;\n long a = 0;\n RomanNumeral prev = null;\n\n for (String numeral : s.split(\"\")) {\n RomanNumeral curr = RomanNumeral.of(numeral);\n\n if (prev == null || (curr.compareTo(prev) == 0)) {\n a += curr.getValue();\n } else if (curr.compareTo(prev) < 0) {\n total += a;\n a = curr.getValue();\n } else if (curr.compareTo(prev) > 0) {\n total += curr.getValue() - a;\n a = 0;\n }\n\n prev = curr;\n }\n\n return total + a;\n }", "public int[] getnGramNumbers(){\r\n\t\treturn nGramPerLen;\r\n\t}", "public int numDecodings(String s) {\n if(s==null||s.length()==0){\n return 0;\n }\n\n int n=s.length();\n int[] mem=new int[n+1];\n\n mem[n]=1;\n if(Integer.parseInt(s.substring(n-1))!=0){\n mem[n-1]=1;\n }\n\n for(int i=n-2;i>=0;i--){\n if(Integer.parseInt(s.substring(i,i+1))==0){\n continue;\n }\n if(Integer.parseInt(s.substring(i,i+2))<26){\n mem[i]=mem[i+1]+mem[i+2];\n }else{\n mem[i]=mem[i+1];\n }\n }\n\n return mem[0];\n }", "public void formNumber(String[] arr1) {\r\n\t\tArrayList<String> list = new ArrayList<String>();\r\n\t\t\r\n\t\tSystem.out.println(Arrays.toString(arr1));\r\n\t\tfor (int i = 0; i < arr1.length; i++) {\r\n\t\t\tlist.add(arr1[i]);\r\n\t\t}\r\n\t\t\r\n\t\tCollections.sort(list, new Compare());\r\n\t\tprintNumber(list);\r\n\t}", "public static void main(String[] args) {\n String s = \"**********1111111111\";\n Solution solution = new Solution();\n System.out.println(solution.numDecodings(s));\n }", "private Integer getNGramLength(Long[][] pasMat){\n\t\tInteger result = 0;\n\t\tfor(int i=0; i<pasMat.length; i++){\n\t\t\tif(pasMat[i] != null)\n\t\t\t\tresult++;\n\t\t}\n\t\treturn result;\n\t}", "public int mo34764e() {\n return C13485b2.m41537a(this.f30369c.length) + 1 + this.f30369c.length;\n }", "private String extractNumber() {\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\r\n\t\twhile (currentIndex < expression.length && Character.isDigit(expression[currentIndex])) {\r\n\t\t\tsb.append(expression[currentIndex]);\r\n\t\t\tcurrentIndex++;\r\n\t\t}\r\n\r\n\t\treturn sb.toString();\r\n\t}", "public A339355() {\n super(1, \"[[0],[35,32,10,1],[2,8,2],[3,0,-2,-1]]\",\"8\", 0);\n }", "public long getSequenceNum() {\n return sequenceNum;\n }", "private int[] ConvertirPolinomio(String cadena) {\n match = patron.matcher(cadena);//validacion de expresion regular , captura coeficiente y exponente\n int count = 1;\n\n if (match.lookingAt()) {\n //contador de monomios , para saber el tamaño del vector forma 2 \n while (match.find()) {\n count++;\n }\n //cantidad de monomios multiplicado por 2 , para almacenar\n //coeficiente y exponente .\n int[] tempPolinomio = new int[(count * 2) + 1];\n match.reset();//se reinicia el contador para recorrer cada termino (coeficiente y exponente)\n\n tempPolinomio[0] = count;//numero de terminos\n\n try {\n //se recorre cada monomio extrayendo el coeficiente y exponente\n for (int i = 1; i < count * 2; i = i + 2) {\n\n match.find();\n tempPolinomio[i + 1] = Integer.parseInt(match.group(1));//coeficiente\n tempPolinomio[i] = Integer.parseInt(match.group(2));//exponente\n }\n\n } catch (Exception ex) {\n System.err.println(ex);\n return null;\n }\n return tempPolinomio;\n } else {\n return null;\n }\n\n }", "java.math.BigInteger getNcbi8Aa();", "public int numDecodingsDP(String s) {\n int n=s.length();\n int[] dp = new int[n+1];\n\n dp[0]=1;\n //since we have guaranteed first char will never be\n dp[1]=s.charAt(0)=='0'? 0:1;\n //start with 2 and go 2 characters behind\n for(int i=2;i<=n;i++){\n //if single digit decode is possible\n //i'th character of dp is i-1th of string\n\n if(s.charAt(i-1)!='0')\n dp[i]=dp[i-1];\n\n String twoDigit=s.substring(i-2,i);\n if(Integer.parseInt(twoDigit)>=10 && Integer.parseInt(twoDigit) <=26)\n dp[i]+=dp[i-2];\n\n }\n\n return dp[n];\n }", "public int getLength() {\r\n return this.seqLength;\r\n }", "int getSeq();", "int getSeq();", "int getSeq();", "public int mo5673a(String str) {\n for (C1271j a : this.f5175b) {\n int a2 = a.mo5673a(str);\n if (a2 != 0) {\n return a2;\n }\n }\n if (m6892b()) {\n return mo5673a(str);\n }\n return 0;\n }", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tString arr[]= {\"2\",\"22\",\"222\",\"3\",\"33\",\"333\",\"4\",\"44\",\"444\",\"5\",\"55\",\"555\",\"6\",\"66\",\"666\",\"7\",\"77\",\"777\",\"7777\",\"8\",\"88\",\"888\",\"9\",\"99\",\"999\",\"9999\"};\r\n\t\tString input=sc.next();\r\n\t\tSystem.out.println(printsequence(arr,input));\r\n\r\n}", "public SequenceNumberTest() {}", "public int getCount(){\r\n return sequence.getValue();\r\n }", "private static char[] initNum() {\n\t\tchar[] values = {'0', '1', '2', '3', '4', '5',\n\t\t\t\t'6', '7', '8', '9'};\n\t\tchar[] answer = new char[4];\n\t\t\n\t\tint countReady = 0;\n\t\t\n\t\twhile(countReady != 4) {\n\t\t\tint tempChar = rndChar();\n\t\t\tif(values[tempChar] != 'x') {\n\t\t\t\tanswer[countReady] = values[tempChar];\n\t\t\t\tvalues[tempChar] = 'x';\n\t\t\t\tcountReady++;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn answer;\n\t}", "@Override\n\tpublic int compareTo(SequenceFasta other){\n return sequence.length() - other.sequence.length();\n\t}", "public static int numDecodings2(String s) {\r\n\t\tif(s == null || s.length() == 0)\r\n\t\t\treturn 0;\r\n\t\tint len = s.length();\r\n\t\tint prev1 = 1;\r\n\t\tint prev2 = s.charAt(0) == '0' ? 0 : 1;\r\n\t\t\r\n\t\tfor(int i = 2; i <= len; i++) {\r\n\t\t\tint code1 = Integer.valueOf(s.substring(i - 1, i)); // 1 digit\r\n\t\t\tint code2 = Integer.valueOf(s.substring(i - 2, i)); // 2 digit\r\n\t\t\tint temp = prev2;\r\n\t\t\tprev2 = (code1 != 0 ? prev2 : 0) + (code2 <= 26 && code2 > 9 ? prev1 : 0);\r\n\t\t\tprev1 = temp;\r\n\t\t}\r\n\t\t\r\n\t\treturn prev2;\r\n\t}", "org.hl7.fhir.String getObservedSeq();", "private String mo92790p(int i) {\n String str = \"\";\n if (this.f94516A == null || this.f94516A.size() == 0 || i >= this.f94516A.size()) {\n return str;\n }\n return C43105eq.m136725a(((Integer) this.f94516A.get(i)).intValue());\n }", "public Integer getSeq() {\n return seq;\n }", "public Integer getSeq() {\n return seq;\n }", "public Integer getSeq() {\n return seq;\n }", "public int numDecodings(String s) {\n if (s == null || s.length() == 0)\n return 0;\n \n int arr[] = new int[s.length()];\n \n for(int i = 0; i < arr.length; i++)\n arr[i] = -1;\n \n return recur(s, 0, arr);\n }", "static int getNumPatterns() { return 64; }", "public int[] numberToArray(String n) {\n\t\tint arr[] = new int[n.length()];\n\t\tfor(int i = 0; i < n.length(); i++) {\n\t\t\tarr[i] = Character.getNumericValue(n.charAt(i));\n\t\t}\n\t\treturn arr;\n\t}", "Exp getArrayExp();", "@Override\n\tpublic int sequence() {\n\t\treturn 0;\n\t}", "@MavlinkFieldInfo(\n position = 1,\n unitSize = 2,\n description = \"sequence number (starting with 0 on every transmission)\"\n )\n public final int seqnr() {\n return this.seqnr;\n }", "public java.lang.String getNumb() {\n java.lang.Object ref = numb_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n numb_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public int[] convertNumToDigitArray(String strNum) {\r\n \r\n //Declare Variables\r\n int strLength = strNum.length();\r\n int[] intArray = new int[strLength];\r\n \r\n //Parse Through String Input & Put Into Integer Array\r\n for (int i = 0; i < strLength; i++) {\r\n \r\n intArray[i] = (int)(strNum.charAt(i));\r\n \r\n }\r\n \r\n //Return Value\r\n return intArray;\r\n \r\n }", "public IntColumn getSeqNum() {\n return (IntColumn) (isText ? textFields.computeIfAbsent(\"seq_num\", IntColumn::new) :\n getBinaryColumn(\"seq_num\"));\n }", "public int [] covertirInt(String [] a) {\n\t\n\t\n\t int [] temporal = new int [a.length-1];\n\t\n\t\n\t for (int i =0; i<temporal.length;i++) {\n\t \n\t\t temporal[i]=Integer.parseInt(a[i+1]);\n\t }\n \n \n\t return temporal;\n\t\n}", "public static Value makeAnyStrNumeric() {\n return theStrNumeric;\n }", "private static int m1646b(CharSequence charSequence) {\n return new C0510a(charSequence, false).mo4452e();\n }", "public Integer getSequence()\n {\n return sequence;\n }", "public BigInteger getSeqCurrentVal(String sequence) {\r\n\t\treturn this.crudDAO.getSeqCurrentVal(sequence);\r\n\t}", "public final void mo1308a() {\n int i = this.f2309d;\n int i2 = i != Integer.MIN_VALUE ? i + this.f2308c : this.f2307b;\n this.f2309d = i2;\n String str = this.f2306a;\n StringBuilder sb = new StringBuilder(String.valueOf(str).length() + 11);\n sb.append(str);\n sb.append(i2);\n this.f2310e = sb.toString();\n }", "public java.lang.String getNumb() {\n java.lang.Object ref = numb_;\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 numb_ = s;\n }\n return s;\n }\n }", "public String toString(){\r\n return \"(\" + num + \")\";\r\n }", "public int distinctSubseqII(String S) {\n int[] end = new int[26]; // 本字符添加之前的长度\n int res = 0;\n int added; // 当前额外增加的数量\n int mod = (int) 1e9 + 7;\n\n System.out.println('\\n' + S);\n for (char c : S.toCharArray()) {\n // 额外增加的数量等于前面的数量加上1(当前字符串)减去最后一次相同字符添加之前的数量\n added = (res + 1 - end[c - 'a']) % mod;\n\n end[c - 'a'] = (res + 1) % mod; // 影响的为前一个字符的数量加上单字符的数量\n\n res = (res + added) % mod;\n System.out.printf(\"%2c, %2d, %2d\\n\", c, res, end[c - 'a']);\n }\n return (res + mod) % mod;\n }", "public static void main(String[] args) {\nScanner sc=new Scanner(System.in);\r\nString input1=sc.nextLine();\r\ninput1=input1.toLowerCase();\r\nint l=input1.length();\r\nchar a[]=input1.toCharArray();\r\nint d[]=new int[1000];\r\nString str=\"\";\r\nint i=0,k1=0,k2=0,m=0,c1=0,c2=0,c3=0,l1=0,u=0,u1=0;\r\nchar b[]={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};\r\nfor(i=0;i<l;i++)\r\n{ c3=0;\r\n\tif(a[i]==' ')\r\n\t{u=i;c3=0;\r\n\t\tfor(k1=u1,k2=i-1;k1<k2 && k2>k1;k1++,k2--)\r\n\t\t{ c1=0;c2=0;\r\n\t\t\tfor(m=0;m<26;m++)\r\n\t\t\t{\r\n\t\t\t\tif(b[m]==a[k1]) {\r\n\t\t\t\tc1=m+1;}\t\r\n\t\t\t\tif(b[m]==a[k2]) {\r\n\t\t\t\t\tc2=m+1;}\t\r\n\t\t\t}\r\n\t\t\tc3=c3+Math.abs(c1-c2);\r\n\t\t}\r\n\t\tif(k1==k2) {\r\n\t\t\tfor(m=0;m<26;m++) {\r\n\t\t\t\tif(b[m]==a[k1])\r\n\t\t\t\t\tc3=c3+(m+1);\r\n\t\t\t }\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\td[l1]=c3;\r\n\t\tl1++;\r\n\t\tu1=i+1;\r\n\t\tc3=0;\r\n\t}\r\n\tif(i==l-1)\r\n\t{\r\n\t\tfor(k1=u+1,k2=i;k1<k2 && k2>k1;k1++,k2--)\r\n\t\t{ c1=0;c2=0;\r\n\t\t\tfor(m=0;m<26;m++)\r\n\t\t\t{\r\n\t\t\t\tif(b[m]==a[k1]) {\r\n\t\t\t\tc1=m+1;}\t\r\n\t\t\t\tif(b[m]==a[k2]) {\r\n\t\t\t\t\tc2=m+1;}\t\r\n\t\t\t}\r\n\t\t\tc3=c3+Math.abs(c1-c2);\r\n\t\t}\r\n\t\tif(k1==k2) {\r\n\t\t\tfor(m=0;m<26;m++) {\r\n\t\t\t\tif(b[m]==a[k1])\r\n\t\t\t\t\tc3=c3+(m+1);\r\n\t\t\t }\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\td[l1]=c3;\r\n\t\tl1++;\r\n\t\tk1=i+1;\r\n\t}\r\n}\r\n\r\n for(i=0;i<l1;i++)\r\n {\r\n\t str=str+Integer.toString(d[i]);\r\n }\r\n int ans=Integer.parseInt(str);\r\n System.out.print(ans);\r\n}", "public Integer getSequence() {\n return sequence;\n }", "public abstract void mo2153a(CharSequence charSequence);", "public int pid_0101(String str) \n {\n \n int num_of_TC; \n char ON_OFF; \n String first_byte;\n first_byte=new String(str.substring(0,1));\n MathLib operations= new MathLib(); \n ON_OFF=operations.HexToBin(first_byte).charAt(0);//Bit 0\n if (ON_OFF=='1')//Then the lamp is ON\n {\n double d = Double.valueOf(operations.calculatorXF(str,\"AA\",\"A-128\"));\n num_of_TC= (int)d;\n if (num_of_TC<0) num_of_TC=0;\n }\n else \n num_of_TC=0; \n \n return num_of_TC;\n }", "public String getSequence()\r\n\t{\r\n\t\treturn sequence;\r\n\t}", "@Test\n public void aminoCountsTest2(){\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(b);\n int[] expected = {2,1,1,1};\n assertArrayEquals(expected, first.aminoAcidCounts());\n }", "protected void incrementSeqNum() {\n intToNetworkByteOrder(mySeqNum++, sequenceNum, 0, 4);\n }", "@Test\n public void rnatest2(){\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(b);\n char[] firstArr = new char[4];\n char[] answer = {'T','S', 'V', 'F'};\n for(int i = 0; i < firstArr.length; i++){\n firstArr[i] = first.aminoAcid;\n System.out.println(first.aminoAcid);\n first = first.next;\n }\n assertArrayEquals(answer,firstArr);\n }", "@Override\n\tpublic String getNextSequenceValue(String sequence) {\n\t\treturn \"\";\n\t}", "@Test\n\tpublic void testSquareIndexToSequence(){\n\t\t\n\t\tRow row = TestUtils.buildRow(\"3,1,2,1|-...-.....-....-.....-.-\");\n\t\tRowDecomposition decomposition = row.getDecomposition();\n\t\t\n\t\tAssert.assertEquals(18, decomposition.getTotalLength());\n\t\tAssert.assertEquals(decomposition.getSequence(0), decomposition.getSequenceContaining(0));\n\t\tAssert.assertEquals(decomposition.getSequence(0), decomposition.getSequenceContaining(2));\n\t\tAssert.assertEquals(decomposition.getSequence(1), decomposition.getSequenceContaining(3));\n\t\tAssert.assertEquals(decomposition.getSequence(1), decomposition.getSequenceContaining(7));\n\t\tAssert.assertEquals(decomposition.getSequence(2), decomposition.getSequenceContaining(8));\n\t\tAssert.assertEquals(decomposition.getSequence(2), decomposition.getSequenceContaining(11));\n\t\tAssert.assertEquals(decomposition.getSequence(3), decomposition.getSequenceContaining(12));\n\t\tAssert.assertEquals(decomposition.getSequence(3), decomposition.getSequenceContaining(16));\n\t\tAssert.assertEquals(decomposition.getSequence(4), decomposition.getSequenceContaining(17));\n\t\t\n\t}", "public int n_()\r\n/* 429: */ {\r\n/* 430:442 */ return this.a.length + 4;\r\n/* 431: */ }" ]
[ "0.5652331", "0.5508911", "0.55077153", "0.5412415", "0.5342746", "0.5298647", "0.5241931", "0.5146469", "0.5143936", "0.5142026", "0.5122155", "0.51142395", "0.5109427", "0.50976455", "0.5090994", "0.509048", "0.5086241", "0.5067182", "0.4992531", "0.49801514", "0.4977665", "0.4976383", "0.49701154", "0.49629402", "0.49527478", "0.4952566", "0.4950639", "0.4928135", "0.49241838", "0.48929685", "0.48923776", "0.48872226", "0.48681146", "0.48660496", "0.48649737", "0.4843956", "0.4824314", "0.48231456", "0.4822782", "0.48198655", "0.48013762", "0.47948873", "0.47840446", "0.47820047", "0.4766526", "0.4757453", "0.4732655", "0.47296774", "0.47198606", "0.4713784", "0.47077328", "0.47062877", "0.4703993", "0.469755", "0.46970317", "0.46960276", "0.469472", "0.469472", "0.469472", "0.46816415", "0.4675947", "0.4674328", "0.46701404", "0.46697837", "0.466649", "0.46642387", "0.46402913", "0.4637419", "0.46373263", "0.46373263", "0.46373263", "0.46317202", "0.46227407", "0.46177667", "0.4605218", "0.4595771", "0.45931292", "0.4592213", "0.45866615", "0.45844644", "0.45826367", "0.4576675", "0.45726526", "0.45698643", "0.45697227", "0.45679563", "0.4566289", "0.45635808", "0.45633283", "0.4561497", "0.4561271", "0.4557715", "0.45552775", "0.45544976", "0.4553499", "0.4547226", "0.45467708", "0.45432833", "0.454294", "0.45425105" ]
0.48329836
36
Converts a nucleotide character to a integer used for string matching.
public static int convert(char c) { switch (c) { case 'A': return 0; case 'T': return 1; case 'G': return 2; case 'C': return 3; default: return 4; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int convertCharNumtoNum(char charIn){\n\t\tint number = -1;\n\t\tint convertedNum = Character.getNumericValue(charIn);\n\t\t\n\t\tfor(int i: Seats.SEAT_NUMS){\n\t\t\tif(i == convertedNum){\n\t\t\t\tnumber = convertedNum; \n\t\t\t}\n\t\t}\n\t\treturn number;\n\t}", "private static int characterToIntegerDigit(char c) {\n\t\t// since all characters are integers in UTF-16\n\t\tif (c >= 48 && c <= 57) {\n\t\t\treturn (c - 48);\n\t\t}\n\t\treturn -1;\n\t}", "int toInt(char ch) {\n return _letters.indexOf(ch);\n }", "int toInt(char c) {\n for (int i = 0; i < size(); i += 1) {\n if (_chars[i] == c) {\n return i;\n }\n }\n throw new EnigmaException(\"Character \" + c + \" not found.\");\n }", "private int char2Int(char _char){\n \tswitch(_char){\r\n \tcase 'A': case 'a': return 0; \r\n \tcase 'R': case 'r': return 1;\r\n \tcase 'N': case 'n': return 2; \t\r\n \tcase 'D': case 'd': return 3;\r\n \tcase 'C': case 'c': return 4;\r\n \tcase 'Q': case 'q': return 5;\r\n \tcase 'E': case 'e': return 6;\r\n \tcase 'G': case 'g': return 7;\r\n \tcase 'H': case 'h': return 8;\r\n \tcase 'I': case 'i': return 9;\r\n \tcase 'L': case 'l': return 10;\r\n \tcase 'K': case 'k': return 11;\r\n \tcase 'M': case 'm': return 12;\r\n \tcase 'F': case 'f': return 13;\r\n \tcase 'P': case 'p': return 14;\r\n \tcase 'S': case 's': return 15;\r\n \tcase 'T': case 't': return 16;\r\n \tcase 'W': case 'w': return 17;\r\n \tcase 'Y': case 'y': return 18;\r\n \tcase 'V': case 'v': return 19;\r\n \tcase 'B': case 'b': return 20;\r\n \tcase 'Z': case 'z': return 21;\r\n \tcase 'X': case 'x': return 22; \t\r\n \tdefault: return 23;\r\n \t}\r\n \t//\"A R N D C Q E G H I L K M F P S T W Y V B Z X *\"\r\n }", "private int getCharNumber(char c) {\n int myReturn = -1;\n int a = Character.getNumericValue('a');\n int z = Character.getNumericValue('z');\n int val = Character.getNumericValue(c);\n if (a <= val && val <= z) {\n myReturn = val - a;\n }\n return myReturn;\n }", "int toInt(char ch) {\n for (int i = 0; i < _chars.length(); i += 1) {\n if (_chars.charAt(i) == ch) {\n return i;\n }\n }\n return -1;\n }", "private static int convertCharToInt(char charAt) {\n\t\tif(charAt == 48) {\t\n\t\t\treturn 0;\n\t\t}else {\n\t\t\treturn 1;\n\t\t}\n\t}", "public static int toIntValue(Character ch) {\n/* 263 */ if (ch == null) {\n/* 264 */ throw new IllegalArgumentException(\"The character must not be null\");\n/* */ }\n/* 266 */ return toIntValue(ch.charValue());\n/* */ }", "public int convertToInteger(char letterToEncode)\n\t{\n\t\tfor (int i = 0; i<characters.length; i++)\n\t\t{\n\t\t\tif(letterToEncode == characters[i])\n\t\t\t{\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t\t\n\t\t\n\t}", "public static int toIntValue(char ch, int defaultValue) {\n/* 240 */ if (!isAsciiNumeric(ch)) {\n/* 241 */ return defaultValue;\n/* */ }\n/* 243 */ return ch - 48;\n/* */ }", "private int getCharNumber(Character letter) {\n\t\tint integerA = Character.getNumericValue('a');\n\t\tint integerZ = Character.getNumericValue('z');\n\t\tint integerLetter = Character.getNumericValue(letter);\n\t\tif (integerLetter >= integerA && integerLetter <= integerZ) {\n\t\t\treturn integerLetter - integerA; //a -> 0, b -> 1, c -> 2, etc\n\t\t}\n\t\treturn -1;\n\t}", "public static int toIntValue(char ch) {\n/* 218 */ if (!isAsciiNumeric(ch)) {\n/* 219 */ throw new IllegalArgumentException(\"The character \" + ch + \" is not in the range '0' - '9'\");\n/* */ }\n/* 221 */ return ch - 48;\n/* */ }", "public static int charToNybbl(char c) {\n int val;\n switch (c) {\n case '0':\n val = 0;\n break;\n case '1':\n val = 1;\n break;\n case '2':\n val = 2;\n break;\n case '3':\n val = 3;\n break;\n case '4':\n val = 4;\n break;\n case '5':\n val = 5;\n break;\n case '6':\n val = 6;\n break;\n case '7':\n val = 7;\n break;\n case '8':\n val = 8;\n break;\n case '9':\n val = 9;\n break;\n case 'A':\n case 'a':\n val = 10;\n break;\n case 'B':\n case 'b':\n val = 11;\n break;\n case 'C':\n case 'c':\n val = 12;\n break;\n case 'D':\n case 'd':\n val = 13;\n break;\n case 'E':\n case 'e':\n val = 14;\n break;\n case 'F':\n case 'f':\n val = 15;\n break;\n default:\n throw new NumberFormatException(\"Invalid character '\" + c\n + \"' is not hex\");\n }\n return val;\n }", "public static int charToInt(char ch) {\n int i;\n switch (ch) {\n case 'P':\n case 'p':\n i = PAWN;\n break;\n case 'N':\n case 'n':\n i = KNIGHT;\n break;\n case 'B':\n case 'b':\n i = BISHOP;\n break;\n case 'R':\n case 'r':\n i = ROOK; \n break;\n case 'Q':\n case 'q':\n i = QUEEN;\n break;\n case 'K':\n case 'k':\n i = KING;\n break;\n default:\n i = 0;\n }\n return i;\n }", "public static int asInt(char c) {\n int temp = 0;\n switch (c) {\n case '2':\n temp = 2;\n break;\n case '3':\n temp = 3;\n break;\n case '4':\n temp = 4;\n break;\n case '5':\n temp = 5;\n break;\n case '6':\n temp = 6;\n break;\n case '7':\n temp = 7;\n break;\n case '8':\n temp = 8;\n break;\n case '9':\n temp = 9;\n break;\n case 'T':\n temp = 10;\n break;\n case 'J':\n temp = 11;\n break;\n case 'Q':\n temp = 12;\n break;\n case 'K':\n temp = 13;\n break;\n case 'A':\n temp = 14;\n break;\n\n default:\n throw new AssertionFailedError(\n \"Invalid Character \" + c + \" in card number column: Expected 1-9,J,Q,K,A\");\n\n }\n return temp;\n }", "private int c2i(char c) {\n if (c >= 'A' && c <= 'Z')\n return c - 'A';\n else\n throw new BadCharException(c);\n }", "public static int char_to_int(char c){\n\t\tswitch(c){\n\t\t\tcase '1':\n\t\t\t\treturn 1;\n\t\t\tcase '2':\n\t\t\t\treturn 2;\n\t\t\tcase '3':\n\t\t\t\treturn 3;\n\t\t\tcase '4':\n\t\t\t\treturn 4;\n\t\t\tcase '5':\n\t\t\t\treturn 5;\n\t\t\tcase '6':\n\t\t\t\treturn 6;\n\t\t\tcase '7':\n\t\t\t\treturn 7;\n\t\t\tcase '8':\n\t\t\t\treturn 8;\n\t\t\tcase '9':\n\t\t\t\treturn 9;\n\t\t\tcase '0':\n\t\t\t\treturn 0;\n\t\t\tcase 'a':\n\t\t\t\treturn 10;\n\t\t\tcase 'b':\n\t\t\t\treturn 11;\n\t\t\tcase 'c':\n\t\t\t\treturn 12;\n\t\t\tcase 'd':\n\t\t\t\treturn 13;\n\t\t\tcase 'e':\n\t\t\t\treturn 14;\n\t\t\tcase 'f':\n\t\t\t\treturn 15;\n\t\t}\n\t\treturn 0;\n\t}", "int toInt(char ch) {\n if (!contains(ch)) {\n throw new EnigmaException(\"Alpha.toInt: Char not in Alpha.\" + ch);\n }\n return _chars.indexOf(ch);\n }", "static int charToInt(char c) {\n if (c >= 'A' && c <= 'Z') return c - 'A';\n else if (c >= 'a' && c <= 'z') return c - 'a' + 26;\n else return -1;\n }", "static int getValue(char c) {\n\t\tswitch(c) {\n\t\tcase 'A': return 0;\n\t\tcase 'C': return 1;\n\t\tcase 'G': return 2;\n\t\tcase 'T': return 3;\n\t\tdefault: return -1;\n\t\t}\n\t}", "private static int fromDigit(char ch) {\n if (ch >= '0' && ch <= '9')\n return ch - '0';\n if (ch >= 'A' && ch <= 'F')\n return ch - 'A' + 10;\n if (ch >= 'a' && ch <= 'f')\n return ch - 'a' + 10;\n throw new IllegalArgumentException(\"invalid hex digit '\" + ch + \"'\");\n }", "public static long getCharsAsNumber(String chars) {\n\t\tchars = chars.replaceAll(\"'\", \"\");\n\t\tlong result = 0;\n\t\tfor (int i = 0; i < chars.length(); i++) {\n\t\t\tresult |= ((chars.charAt(i)) << (8 * i));\n\t\t}\n\t\treturn result;\n\t}", "public static int toIntValue(Character ch, int defaultValue) {\n/* 286 */ if (ch == null) {\n/* 287 */ return defaultValue;\n/* */ }\n/* 289 */ return toIntValue(ch.charValue(), defaultValue);\n/* */ }", "int toInt(String a){\n\t\tint name=0;\r\n\t\tfor(int i=0;i<a.length();i++){\r\n\t\t\tname+=(int)a.charAt(i);\r\n\t\t}\r\n\t\treturn name;\r\n\t}", "static int baseToInt(char c)\n\t{\n\t\tif(c == 'a' || c == 'A')\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\t\tif(c == 'c' || c == 'C')\n\t\t{\n\t\t\treturn 1;\n\t\t}\n\t\tif(c == 'g' || c == 'G')\n\t\t{\n\t\t\treturn 2;\n\t\t}\n\t\treturn 3;\n\t}", "private static int letterToNumber(String str) {\n return (\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\".indexOf(str))%26+1;\n }", "public static int lookup(char letter) {\n\t\tswitch (letter) {\n\t\tcase 'A':\n\t\t\treturn 0;\n\t\tcase 'R':\n\t\t\treturn 1;\n\t\tcase 'N':\n\t\t\treturn 2;\n\t\tcase 'D':\n\t\t\treturn 3;\n\t\tcase 'C':\n\t\t\treturn 4;\n\t\tcase 'Q':\n\t\t\treturn 5;\n\t\tcase 'E':\n\t\t\treturn 6;\n\t\tcase 'G':\n\t\t\treturn 7;\n\t\tcase 'H':\n\t\t\treturn 8;\n\t\tcase 'I':\n\t\t\treturn 9;\n\t\tcase 'L':\n\t\t\treturn 10;\n\t\tcase 'K':\n\t\t\treturn 11;\n\t\tcase 'M':\n\t\t\treturn 12;\n\t\tcase 'F':\n\t\t\treturn 13;\n\t\tcase 'P':\n\t\t\treturn 14;\n\t\tcase 'S':\n\t\t\treturn 15;\n\t\tcase 'T':\n\t\t\treturn 16;\n\t\tcase 'W':\n\t\t\treturn 17;\n\t\tcase 'Y':\n\t\t\treturn 18;\n\t\tcase 'V':\n\t\t\treturn 19;\n\t\tcase 'B':\n\t\t\treturn 20;\n\t\tcase 'Z':\n\t\t\treturn 21;\n\t\tcase 'X':\n\t\t\treturn 22;\n\t\tcase '*':\n\t\t\treturn 23;\n\t\tcase '|':\n\t\t\treturn 24;\n\t\tcase '.':\n\t\t\treturn 25;\n\n\t\tdefault:\n\t\t\treturn -1;\n\t\t}\n\n\t}", "private static int fromHexChar(final char c) {\n\t\tif (c >= 0x30 && c <= 0x39) {\n\t\t\t// ASCII codes from 0 to 9\n\t\t\treturn c - 0x30;\n\t\t} else if (c >= 0x61 && c <= 0x66) {\n\t\t\t// ASCII codes from 'a' to 'f'\n\t\t\treturn c - 0x57;\n\t\t} else if (c >= 0x41 && c <= 0x46) {\n\t\t\t// ASCII codes from 'A' to 'F'\n\t\t\treturn c - 0x37;\n\t\t}\n\t\treturn 0;\n\t}", "public static int toValue(char symbol) {\n int value;\n if (Character.isDigit(symbol)) {\n value = Character.getNumericValue(symbol);\n } else if (symbol == 'T') {\n value = 10;\n } else if (symbol == 'J') {\n value = 11;\n } else if (symbol == 'Q') {\n value = 12;\n } else if (symbol == 'K') {\n value = 13;\n } else if (symbol == 'A') {\n value = 14;\n } else {\n System.err.println(\"Error: Invalid symbol\");\n value = 0;\n }\n \n return value;\n }", "public static byte getNumForChar(char c) {\n if (c < 48 || c > 57) {\n throw new IndexOutOfBoundsException(\"not 0-9\");\n }\n // the ascii offset for numbers is 48, subtracting 48 gets the right\n // byte\n return (byte) (c - 48);\n }", "public static int convertIntCharToInteger(String input) {\n\t\tint convertedInt = \tinput.charAt(0)-'0';\n\t\tSystem.out.println(convertedInt);\n\t\treturn convertedInt;\n\t}", "public static int intForChar(char c) {\n for (int i = 0; i < DICT.length; i++) {\n if (DICT[i] == c) {\n return i;\n }\n }\n //Return 0 if character can't be found.\n return 0;\n }", "private int parseInt(char charAt) {\n\t\treturn 0;\n\t}", "public static char posLetterToNumber(char POS)\n\t{\n\t\tswitch (POS)\n\t\t{\n\t\t\tcase 'n':\n\t\t\t\treturn '1';\n\t\t\tcase 'v':\n\t\t\t\treturn '2';\n\t\t\tcase 'a':\n\t\t\t\treturn '3';\n\t\t\tcase 'r':\n\t\t\t\treturn '4';\n\t\t\tcase 's':\n\t\t\t\treturn '5';\n\t\t}\n\t\tSystem.err.println(\"ERROR in WordNetUtilities.posLetterToNumber(): bad letter: \" + POS);\n\t\treturn '1';\n\t}", "public static final int getDigit(char ch) {\n return isDigit(ch) ? ch - '0' : -1;\n }", "abstract public int getFromU16SingleLead(char c);", "public static int charToInt(char c) \n\t{\n\t\tswitch (c) \n\t\t{\n\t\tcase '0':\n\t\t\treturn 0;\n\t\tcase '1':\n\t\t\treturn 1;\n\t\tcase '2':\n\t\t\treturn 2;\n\t\tcase '3':\n\t\t\treturn 3;\n\t\tcase '4':\n\t\t\treturn 4;\n\t\tcase '5':\n\t\t\treturn 5;\n\t\tcase '6':\n\t\t\treturn 6;\n\t\tcase '7':\n\t\t\treturn 7;\n\t\tcase '8':\n\t\t\treturn 8;\n\t\tcase '9':\n\t\t\treturn 9;\n\t\tcase 'A':\n\t\t\treturn 10;\n\t\tcase 'B':\n\t\t\treturn 11;\n\t\tcase 'C':\n\t\t\treturn 12;\n\t\tcase 'D':\n\t\t\treturn 13;\n\t\tcase 'E':\n\t\t\treturn 14;\n\t\tcase 'F':\n\t\t\treturn 15;\n\t\tcase 'G':\n\t\t\treturn 16;\n\t\tcase 'H':\n\t\t\treturn 17;\n\t\tcase 'I':\n\t\t\treturn 18;\n\t\tcase 'J':\n\t\t\treturn 19;\n\t\tcase 'K':\n\t\t\treturn 20;\n\t\tcase 'L':\n\t\t\treturn 21;\n\t\tcase 'M':\n\t\t\treturn 22;\n\t\tcase 'N':\n\t\t\treturn 23;\n\t\tcase 'O':\n\t\t\treturn 24;\n\t\tcase 'P':\n\t\t\treturn 25;\n\t\tcase 'Q':\n\t\t\treturn 26;\n\t\tcase 'R':\n\t\t\treturn 27;\n\t\tcase 'S':\n\t\t\treturn 28;\n\t\tcase 'T':\n\t\t\treturn 29;\n\t\tcase 'U':\n\t\t\treturn 30;\n\t\tcase 'V':\n\t\t\treturn 31;\n\t\tcase 'W':\n\t\t\treturn 32;\n\t\tcase 'X':\n\t\t\treturn 33;\n\t\tcase 'Y':\n\t\t\treturn 34;\n\t\tcase 'Z':\n\t\t\treturn 35;\n\t\tcase '-':\n\t\t\treturn 36;\n\t\tdefault:\n\t\t\treturn -1;\n\t\t}\n\t}", "private static int charToNibble( char c ) \r\n { \r\n if ( c > 'f' ) \r\n { \r\n throw new IllegalArgumentException( \"Invalid hex character: \" + c ); \r\n } \r\n int nibble = correspondingNibble[ c ]; \r\n if ( nibble < 0 ) \r\n { \r\n throw new IllegalArgumentException( \"Invalid hex character: \" + c ); \r\n } \r\n return nibble; \r\n }", "public int letterToInt(char letter){\n\t\t\treturn letters_to_num.get(letter);\n\t\t}", "@Override\n\tpublic int func1(String s) {\n\t\tfor(int i=0; i<=s.length()-1; i++) {\n\t\t\tif(s.charAt(i)>=48 && s.charAt(i)<=57) {\n\t\t\t\treturn Integer.parseInt(\"\"+s.charAt(i));\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "@Override\n\tpublic int func1(String s) {\n\t\tfor(int i=s.length()-1; i>=0; i--) {\n\t\t\tif(s.charAt(i)>=48 && s.charAt(i)<=57) {\n\t\t\t\treturn Integer.parseInt(\"\"+s.charAt(i));\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "public int charNumber(String string, char ch){\n\t\tint num=0;\n\t\tint length=string.length();\n\n\t\tfor(int i=0; i<length; i++){\n\t\t\tif(string.charAt(i)==ch) num++;\n\t\t}\n\t\t\n\t\treturn num;\n\t}", "public static int ascii(char c) {\n \treturn (int)c;\n }", "protected int toInt(char character, int leftPos, int rightPos) {\n if (isDigit(character)) {\n return getNumericValue(character);\n }\n throw new IllegalArgumentException(\"Invalid Character[\" + leftPos + \"] = '\" + character + \"'\");\n }", "private int getValueFromBase64Alphabet(char character)\r\n {\r\n if (character >= 'A' && character <= 'Z')\r\n {\r\n return character - 'A';\r\n }\r\n if (character >= 'a' && character <= 'z')\r\n {\r\n return character - 'a' + 26;\r\n }\r\n if (character >= '0' && character <= '9')\r\n {\r\n return character - '0' + 52;\r\n }\r\n if (character == '+')\r\n {\r\n return 62;\r\n }\r\n if (character == '/')\r\n {\r\n return 63;\r\n }\r\n if (character == '=')\r\n {\r\n return 0;\r\n }\r\n return -1;\r\n }", "private static void task41() {\n System.out.println(\"Enter character: \");\n char ch = scanStr().charAt(0);\n\n System.out.println(\"ASCII value of \" + ch + \" is \" + (int)ch);\n }", "public Object visitCharacterConstant(GNode n) {\n xtc.type.Type result;\n \n result = cops.typeCharacter(n.getString(0));\n \n return result.getConstant().bigIntValue().longValue();\n }", "private char computeCheckDigit(final String taxId) {\n final int lettersInAlphabet = 26;\n final int maxOdd = 13, maxEven = 14;\n final int[] setdisp = { 1, 0, 5, 7, 9, 13, 15, 17, 19, 21, 2, 4, 18, 20, 11, 3, 6, 8, 12,\n 14,\n 16, 10, 22, 25, 24, 23 };\n int charWeight = 0, aChar;\n for (int i = 1; i <= maxOdd; i += 2) {\n aChar = taxId.charAt(i);\n if (aChar >= '0' && aChar <= '9') {\n charWeight = charWeight + aChar - '0';\n } else {\n charWeight = charWeight + aChar - 'A';\n }\n }\n for (int i = 0; i <= maxEven; i += 2) {\n aChar = taxId.charAt(i);\n if (aChar >= '0' && aChar <= '9') {\n aChar = aChar - '0' + 'A';\n }\n charWeight = charWeight + setdisp[aChar - 'A'];\n }\n return (char) (charWeight % lettersInAlphabet + 'A');\n }", "public static char getDigitCharacter(){\n\t\treturn getRandomCharacter('0','9');\n\t}", "public int letter2index(char c) { \t\n \treturn (int)(c - 'A')%26 ;\n }", "private static int value(char r) {\n if (r == 'I')\n return 1;\n if (r == 'V')\n return 5;\n if (r == 'X')\n return 10;\n if (r == 'L')\n return 50;\n if (r == 'C')\n return 100;\n if (r == 'D')\n return 500;\n if (r == 'M')\n return 1000;\n return -1;\n }", "private static int slowCharToNibble( char c ) \r\n { \r\n if ( '0' <= c && c <= '9' ) \r\n { \r\n return c - '0'; \r\n } \r\n else if ( 'a' <= c && c <= 'f' ) \r\n { \r\n return c - 'a' + 0xa; \r\n } \r\n else if ( 'A' <= c && c <= 'F' ) \r\n { \r\n return c - 'A' + 0xa; \r\n } \r\n else \r\n { \r\n throw new IllegalArgumentException( \"Invalid hex character: \" + c ); \r\n } \r\n }", "public static final int m23675a(char c, int i) {\n return Character.digit(c, i);\n }", "private int getNucIndex(char c) {\n\t\tswitch(c) {\n\t\tcase 'A':\n\t\t\treturn 0;\n\t\tcase 'C':\n\t\t\treturn 1;\n\t\tcase 'G':\n\t\t\treturn 2;\n\t\tcase 'T':\n\t\t\treturn 3;\n\t\tcase '-':\n\t\t\treturn 4;\n\t\tdefault:\n\t\t\treturn 4;\n\t\t}\n\t}", "static int chara(String a) {\n int character = 0;\n while ((16 * character) < a.length()) {\n character++;\n }\n return character;\n }", "public int charNum() {\n return myCharNum;\n }", "private static int specialChar(char ch) {\n if ((ch > '\\u0621' && ch < '\\u0626') ||\n (ch == '\\u0627') ||\n (ch > '\\u062E' && ch < '\\u0633') ||\n (ch > '\\u0647' && ch < '\\u064A') ||\n (ch == '\\u0629')) {\n return 1;\n } else if (ch >= '\\u064B' && ch<= '\\u0652') {\n return 2;\n } else if (ch >= 0x0653 && ch <= 0x0655 ||\n ch == 0x0670 ||\n ch >= 0xFE70 && ch <= 0xFE7F) {\n return 3;\n } else {\n return 0;\n }\n }", "int getIndex(Character c)\n{\n int a = Character.getNumericValue('a');\n int z = Character.getNumericValue('z');\n int val = Character.getNumericValue(c);\n \n if (a <= val && val <= z) return val - a;\n return -1;\n}", "public int letterValue(char letter){\n int val;\n\n switch(letter){\n case 'a':\n case 'e':\n case 'i':\n case 'o':\n case 'u':\n case 'l':\n case 'n':\n case 's':\n case 't':\n case 'r': val =1;\n break;\n\n case 'd':\n case 'g': val =2;\n break;\n\n case 'b':\n case 'c':\n case 'm':\n case 'p': val =3;\n break;\n\n case 'f':\n case 'h':\n case 'v':\n case 'w':\n case 'y': val =4;\n break;\n\n case 'k': val =5;\n break;\n\n case 'j':\n case 'x': val =8;\n break;\n\n case 'q':\n case 'z': val =10;\n break;\n\n default: val =0;\n }\n return val;\n }", "public static int shortStringToInt(String s) {\n int retval = 0;\n for (int i = 0; i < s.length(); i++) {\n int j = intForChar(s.charAt(i));\n //If the character can't be found (is not a keyboard character), then don't include.\n if (j != 0) {\n retval *= 100;\n retval += j;\n }\n }\n return retval;\n }", "public String digit(String digit);", "public static int m66070c(String str) {\n int length = str.length();\n for (int i = 0; i < length; i++) {\n char charAt = str.charAt(i);\n if (charAt <= 31 || charAt >= 127) {\n return i;\n }\n }\n return -1;\n }", "public int convertToInt(String i) {\n\t\tswitch (i) {\n\t\t\tcase \".\": return 0;\n\t\t\tcase \"1\": return 1;\n\t\t\tcase \"2\": return 2;\n\t\t\tcase \"3\": return 3;\n\t\t\tcase \"4\": return 4;\n\t\t\tcase \"5\": return 5;\n\t\t\tcase \"6\": return 6;\n\t\t\tcase \"7\": return 7;\n\t\t\tcase \"8\": return 8;\n\t\t\tcase \"9\": return 9;\n\t\t\tcase \"A\": return 10;\n\t\t\tcase \"B\": return 11;\n\t\t\tcase \"C\": return 12;\n\t\t\tcase \"D\": return 13;\n\t\t\tcase \"E\": return 14;\n\t\t\tcase \"F\": return 15;\n\t\t\tcase \"G\": return 16;\n\t\t\tcase \"H\": return 17;\n\t\t\tcase \"I\": return 18;\n\t\t\tcase \"J\": return 19;\n\t\t\tcase \"K\": return 20;\n\t\t\tcase \"L\": return 21;\n\t\t\tcase \"M\": return 22;\n\t\t\tcase \"N\": return 23;\n\t\t\tcase \"O\": return 24;\n\t\t\tcase \"P\": return 25;\n\t\t\tcase \"Q\": return 26;\n\t\t\tcase \"R\": return 27;\n\t\t\tcase \"S\": return 28;\n\t\t\tcase \"T\": return 29;\n\t\t\tcase \"U\": return 30;\n\t\t\tcase \"V\": return 31;\n\t\t\tcase \"W\": return 32;\n\t\t\tcase \"X\": return 33;\n\t\t\tcase \"Y\": return 34;\n\t\t\tcase \"Z\": return 35;\n\t\t\tdefault: System.out.println(\"The number is too high.\");\n\t\t\t return 9000;\n\t\t}\n }", "static int getIdx(char ch)\n {\n return (ch - 'a');\n }", "public static int m2197ao(String str) {\n try {\n return Integer.valueOf(str).intValue();\n } catch (Exception e) {\n return -1;\n }\n }", "private int queryNumberChar() throws IOException {\n\t\tbrin.mark(2);\n\t\treturn brin.read();\n\t}", "public static int binary_to_int(String chars){\n\t\tint decimal_number=0,i,j=1;\n\t\tfor(i=(chars.length()-1);i>=0;i--){\n\t\t\tdecimal_number+=(j*char_to_int(chars.charAt(i)));\n\t\t\tj=j*2;\n\t\t}\n\t\treturn decimal_number;\n\t}", "public int charNum() {\n return myId.charNum();\n }", "public char convertToCharacter(int letterThatIsNumber)\n\t{\n\t\treturn characters[letterThatIsNumber];\n\t}", "public static int fromHex(char c)\n {\n if (c >= '0' && c <= '9')\n {\n return c - '0';\n }\n\n if (c >= 'a' && c <= 'f')\n {\n return c - 'a' + 10;\n }\n\n if (c >= 'A' && c <= 'F')\n {\n return c - 'A' + 10;\n }\n\n return -1;\n }", "public int titleToNumber(String s) {\n int val = 0;\n //go thru string\n for (int i = 0; i < s.length(); i++){\n \t//26 letts of alph add the int val of that character \n val = val * 26 + (int) s.charAt(i) - (int) 'A' + 1;\n }\n return val;\n }", "public static int stringToInt(String aKey){\r\n\t\t\r\n\t\tint pseudoKey = 0;\r\n\t\tint n = 1;\r\n\t\tint cn = 0;\r\n\t\tchar c[] = aKey.toCharArray();\r\n\t\tint grouping = 0;\r\n\t\t\r\n\t\twhile(cn < aKey.length()){\r\n\t\t\t\r\n\t\t\tgrouping = grouping << 8;\r\n\t\t\tgrouping += c[cn];\r\n\t\t\tcn++;\r\n\t\t\t\r\n\t\t\tif(n == 4 || cn == aKey.length()){\r\n\t\t\t\tpseudoKey += grouping;\r\n\t\t\t\tn = 0;\r\n\t\t\t\tgrouping = 0;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tn++;\r\n\t\t\t\r\n\t\t}// End of while loop\r\n\t\treturn Math.abs(pseudoKey);\r\n\t\t\r\n\t}", "private static byte charToByte(char c) {\r\n\t\treturn (byte) \"0123456789ABCDEF\".indexOf(c);\r\n\t}", "public int mo33889nt(String str) {\n return -1;\n }", "private static byte charToByte(char c) {\n return (byte) \"0123456789ABCDEF\".indexOf(c);\n }", "private static byte charToByte(char c) {\n return (byte) \"0123456789ABCDEF\".indexOf(c);\n }", "private static byte charToByte(char c) {\n return (byte) \"0123456789ABCDEF\".indexOf(c);\n }", "static int hexa_to_deci(String hexa_address){\n\t\tint deci_val = 0;\n\t\tint multiply = 1;\n\t\tfor(int i=hexa_address.length()-1;i>=0;i--){\n\t\t\tint j=0;\n\t\t\tfor(;j<16;j++)\n\t\t\t\tif(hexa_address.charAt(i)==hexa[j])\n\t\t\t\t\tbreak;\n\t\t\tdeci_val+=(multiply*j);\n\t\t\tmultiply*=16;\n\t\t}\n\t\treturn deci_val;\n\t}", "private static int getIntValue(String s) {\n try {\n return Integer.parseInt(s, 16);\n } catch (NumberFormatException e) {\n e.printStackTrace();\n return -1;\n }\n }", "private static byte charToByte(char c) {\n\t\treturn (byte) \"0123456789ABCDEF\".indexOf(c);\n\t}", "private static int getNumber(char uppercaseLetter) {\n\t\tint res=0;\n\t\tString a=\"\";\n\t\t\n\t\tif (uppercaseLetter =='A' ||uppercaseLetter =='B' ||uppercaseLetter =='C') {\n\t\t\ta=\"2\";\n\t\t}\n\t\telse if (uppercaseLetter =='D' ||uppercaseLetter =='E' ||uppercaseLetter =='F') {\n\t\t\ta=\"3\";\n\t\t}\n\t\telse if (uppercaseLetter =='G' ||uppercaseLetter =='H' ||uppercaseLetter =='I' ) {\n\t\t\ta=\"4\";\n\t\t}\n\t\telse if(uppercaseLetter =='J' ||uppercaseLetter =='K' ||uppercaseLetter =='L' ) {\n\t\t\ta=\"5\";\n\t\t}\n\t\telse if(uppercaseLetter =='M' ||uppercaseLetter =='N' ||uppercaseLetter =='O' ) {\n\t\t\ta=\"6\";\n\t\t}\n\t\telse if (uppercaseLetter =='P' ||uppercaseLetter =='Q' ||uppercaseLetter =='R'|| uppercaseLetter=='S') {\n\t\t\ta=\"7\";\n\t\t}\n\t\telse if (uppercaseLetter =='T' ||uppercaseLetter =='U' ||uppercaseLetter =='V' ) {\n\t\t\ta=\"8\";\n\t\t}\n\t\telse if(uppercaseLetter =='W' ||uppercaseLetter =='X' ||uppercaseLetter =='Y' ||uppercaseLetter=='Z') {\n\t\t\ta=\"9\";\n\t\t}\n\t\telse \n\t\t\tSystem.out.print(\"Invalid input\");\n\t\t\n\t\treturn res;\n\t}", "private static int hexToInt(char c) throws ParseException {\n if ('0' <= c && c <= '9') {\n return c - '0';\n } else if ('a' <= c && c <= 'f') {\n return c - 'a' + 10;\n } else if ('A' <= c && c <= 'F') {\n return c - 'A' + 10;\n } else {\n throw new ParseException(\"Non-hex character in Unicode escape sequence: \" + c);\n }\n }", "public static int convert3(String a)\r\n {\r\n HashMap<String,Integer> map = new HashMap<String,Integer>();\r\n \r\n map.put(\"ORADEA\", 0);\r\n\t\tmap.put(\"SIBIU\", 1);\r\n\t\tmap.put(\"ZERIND\", 2);\r\n\t\tmap.put(\"ARAD\", 3);\r\n\t\tmap.put(\"TIMISOARA\", 4);\r\n\t\tmap.put(\"LUGOJ\", 5);\r\n\t\tmap.put(\"MEHADIA\", 6);\r\n\t\tmap.put(\"DROBETA\", 7);\r\n\t\tmap.put(\"FAGARAS\", 8);\r\n\t\tmap.put( \"PITESTI\", 9);\r\n\t\tmap.put(\"CRAIOVA\", 10);\r\n\t\tmap.put(\"Giugiu\", 11);\r\n\t\tmap.put(\"Neamt\", 12);\r\n\t\tmap.put(\"Pitesti\", 13);\r\n\t\tmap.put(\"Rimnicu_Vikea\", 14);\r\n\t\tmap.put(\"Urziceni\", 15);\r\n\t\tmap.put(\"Valsui\", 16);\r\n\t\tmap.put( \"BUCHAREST\", 17);\r\n\t\tmap.put(\"LASI\",18);\r\n\t\tmap.put(\"EFORIE\", 19);\r\n\t\tmap.put(\"HIRSOVA\",20);\r\n \r\n return(map.get(a));\r\n \r\n }", "private char getMappingCode(char c) {\n if (!Character.isLetter(c)) {\n return 0;\n } \n else {\n return soundexMapping[Character.toUpperCase(c) - 'A'];\n }\n }", "public static String posLettersToNumber(String pos)\n\t{\n\t\tassert pos != null && !pos.isEmpty() : \"Error in WordNetUtilities.posLettersToNumber(): empty string\";\n\t\tif (pos.equalsIgnoreCase(\"NN\"))\n\t\t\treturn \"1\";\n\t\tif (pos.equalsIgnoreCase(\"VB\"))\n\t\t\treturn \"2\";\n\t\tif (pos.equalsIgnoreCase(\"JJ\"))\n\t\t\treturn \"3\";\n\t\tif (pos.equalsIgnoreCase(\"RB\"))\n\t\t\treturn \"4\";\n\t\tassert false : \"Error in WordNetUtilities.posLettersToNumber(): bad letters: \" + pos;\n\t\treturn \"1\";\n\t}", "private int getIndex(char c) {\n // if the character is a-z then return 0-25 based on position in alphabet\n if (c >= 'a' && c <= 'z') {\n return c - 'a';\n }\n // if the character is an appostrophe return 26 (last element in node array)\n else if (c == '\\'') {\n return 26;\n }\n // if the character is not a-z nor an apostrophe, return -1 to signify error\n else {\n return -1;\n }\n }", "public static void main(String[] args) {\r\n\t\t\r\n\t\tString s = \"9123401\";\r\n\tint a =\tInteger.parseInt(String.valueOf(s.charAt(0)));\r\n\t\r\n\tint b = s.charAt(0) -'0';\r\n//\tSystem.out.println((int)'0');\r\n\tSystem.out.println(b);\r\n//\tSystem.out.println(a);\r\n\r\n\t}", "private static int transformHexCharToInt(byte val) throws HyracksDataException {\n switch (val) {\n case '0':\n return 0;\n case '1':\n return 1;\n case '2':\n return 2;\n case '3':\n return 3;\n case '4':\n return 4;\n case '5':\n return 5;\n case '6':\n return 6;\n case '7':\n return 7;\n case '8':\n return 8;\n case '9':\n return 9;\n case 'a':\n case 'A':\n return 10;\n case 'b':\n case 'B':\n return 11;\n case 'c':\n case 'C':\n return 12;\n case 'd':\n case 'D':\n return 13;\n case 'e':\n case 'E':\n return 14;\n case 'f':\n case 'F':\n return 15;\n default:\n throw new RuntimeDataException(ErrorCode.INVALID_FORMAT);\n }\n }", "public Integer getCharNum() {\n return charNum;\n }", "private int toInt(String binary){\n if (bitToInt(binary.charAt(0)) == 0){\n return positiveBinToInt(binary);\n }\n else{\n return negativeBinaryToInt(binary);\n }\n }", "protected int charIndex(char c) {\r\n\t\ttry {\r\n\t\t\treturn characterMap.indexOf(c);\r\n\t\t} catch (IndexOutOfBoundsException e) {\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t}", "public int convert(String str) {\n if(str == null || str.length() == 0)\n return 0;\n// Integer pre = null;\n int i = str.length() - 1;\n int res = 0; // assume there will not be overflow\n while(i >= 0) {\n Character cur = str.charAt(i);\n Character pre = i - 1 > 0 ? str.charAt(i-1) : null;\n if(pre != null && pre <= cur) {\n res += map.get(cur) - map.get(pre);\n i--;\n }\n else {\n res += map.get(cur);\n }\n i--;\n }\n return res;\n }", "static Integer stringToInt(String s){\n int result = 0;\n for(int i = 0; i < s.length(); i++){\n //If the character is not a digit\n if(!Character.isDigit(s.charAt(i))){\n return null;\n }\n //Otherwise convert the digit to a number and add it to result\n result += (s.charAt(i) - '0') * Math.pow(10, s.length()-1-i);\n }\n return result;\n }", "public static int getAtChar(){\r\n\t\treturn atChar;\r\n\t}", "public int stringIntegerEncoding(String str) {\n if (!str.matches(\"[0-9-]+\"))\n return -1;\n\n char[] strArr = str.toCharArray();\n int number = (strArr[0] != '-') ? Character.getNumericValue(strArr[0]) : 0;\n for (int i =1; i < strArr.length; i++) {\n number = 10*number + Character.getNumericValue(strArr[i]);\n }\n return (strArr[0] == '-')? -number : number;\n }", "private int dropLocationToCharacterNumber(DropLocation location) {\r\n\t\t\tTreePath path = location.getPath();\r\n\r\n\t\t\tif (path.getPathCount() == 2) {\r\n\t\t\t\treturn pathToCharacterNumber(path);\r\n\t\t\t} else {\r\n\t\t\t\treturn location.getChildIndex() + 1;\r\n\t\t\t}\r\n\t\t}", "public static int querProdukt(int n) {\n\t\t// wandelt die nummer in einen String und diesen in ein Char Array\n\t char[] number = Integer.toString(n).toCharArray();\n\t int ret = 1;\n for (char c : number) {\n \t/* Char nach int gecasted ergibt den ASCII-Wert des Chars.\n \t Die ASII werte der Zahlen 0, 1,...,9 sind auf 48, 49,...,57,\n \t also gilt (ASCIIwertDerZahl)-48=Zahl\n \t */\n ret *= (int)c-48;\n }\n return ret;\n\t}", "public int digitOnly(String input) {\n int digit = 0;\n String digitInString= input.replaceAll(\"[^0-9]\", \"\");\n digit = Integer.valueOf(digitInString);\n return digit;\n }", "public static Nucleotide get(char b) {\n switch (Character.toUpperCase(b)) {\n case 'A':\n return A;\n case 'B':\n return B;\n case 'C':\n return C;\n case 'D':\n return D;\n case 'G':\n return G;\n case 'H':\n return H;\n case 'K':\n return K;\n case 'M':\n return M;\n case 'N':\n return N;\n case 'R':\n return R;\n case 'S':\n return S;\n case 'T':\n return T;\n case 'U':\n return U;\n case 'V':\n return V;\n case 'W':\n return W;\n case 'Y':\n return Y;\n default:\n return NONE;\n }\n }" ]
[ "0.7338942", "0.6941179", "0.69317234", "0.6879667", "0.68521684", "0.68340653", "0.6823756", "0.6813323", "0.6802743", "0.67956847", "0.6765887", "0.6714141", "0.67019016", "0.66155136", "0.65548795", "0.65477914", "0.65257245", "0.6524432", "0.6456057", "0.64264315", "0.6419916", "0.63726515", "0.6330149", "0.62861633", "0.6271991", "0.62540036", "0.625074", "0.6236706", "0.621548", "0.6192617", "0.618564", "0.6183941", "0.61817324", "0.61392623", "0.61239153", "0.60956985", "0.6094277", "0.6077516", "0.6072968", "0.6066355", "0.6042505", "0.6018759", "0.60072714", "0.60005355", "0.5995178", "0.5988672", "0.59883106", "0.5977021", "0.59701604", "0.5963835", "0.59591776", "0.5958098", "0.5951834", "0.5942112", "0.5940438", "0.59304714", "0.5921828", "0.5916043", "0.5915662", "0.58814436", "0.5827143", "0.5821141", "0.5811984", "0.57874995", "0.5780474", "0.5757574", "0.5755287", "0.5753253", "0.57506424", "0.5742204", "0.5733654", "0.5730795", "0.57258207", "0.5724237", "0.5703432", "0.56959015", "0.56959015", "0.56959015", "0.5693739", "0.56930536", "0.56877", "0.5680689", "0.56660455", "0.56614864", "0.5655317", "0.56514156", "0.5651414", "0.5641921", "0.5626178", "0.56177384", "0.5601679", "0.5592319", "0.5589369", "0.5586124", "0.55819315", "0.5579485", "0.55620956", "0.5557572", "0.5554546", "0.5534118" ]
0.6752372
11
Gets the package name.
public static String getPackageName() { return mPackageName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getName() {\n return Utility.getInstance().getPackageName();\n }", "public String getPackageName() {\n final var lastDotIdx = name.lastIndexOf('.');\n\n if (lastDotIdx > 0) {\n return name.substring(0, lastDotIdx);\n } else {\n throw new CodeGenException(String.format(\"Couldn't determine package name of '%s'\", name));\n }\n }", "public String getPackageName() {\n return packageName.get();\n }", "private String getPkgName () {\n return context.getPackageName();\n }", "java.lang.String getPackageName();", "String packageName() {\n return name;\n }", "java.lang.String getPackage();", "public String getPackageName() {\n Object ref = packageName_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n packageName_ = s;\n }\n return s;\n } else {\n return (String) ref;\n }\n }", "public String getPackageName() {\n Object ref = packageName_;\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 packageName_ = s;\n }\n return s;\n }\n }", "String getPackageName() {\n final int lastSlash = name.lastIndexOf('/');\n final String parentPath = name.substring(0, lastSlash);\n return parentPath.replace('/', '.');\n }", "public String getPackageName() {\n\t\treturn pkgField.getText();\n\t}", "public String getPackageName() {\n return mAppEntry.info.packageName;\n }", "String getPackageName();", "public static String getPackageName() {\n return CELibHelper.sPackageName;\n }", "public String getRuntimeName() {\r\n\t\tfinal StringBuffer runtimeName = new StringBuffer();\r\n\t\tfinal String name = this.getName();\r\n\t\tfinal Package packagee = this.getPackage();\r\n\t\tfinal String packageName = null == packagee ? null : packagee.getName();\r\n\t\tString nameLessPackageName = name;\r\n\r\n\t\tif (false == Tester.isNullOrEmpty(packageName)) {\r\n\t\t\truntimeName.append(packageName);\r\n\t\t\truntimeName.append('.');\r\n\r\n\t\t\tnameLessPackageName = name.substring(packageName.length() + 1);\r\n\t\t}\r\n\r\n\t\tnameLessPackageName = nameLessPackageName.replace('.', '$');\r\n\t\truntimeName.append(nameLessPackageName);\r\n\r\n\t\treturn runtimeName.toString();\r\n\t}", "public DsByteString getFullPackageName() {\n if (m_subPackages == null || m_subPackages.size() == 0) {\n return m_strPackage;\n }\n\n DsByteString fullName = m_strPackage.copy();\n Iterator iter = m_subPackages.listIterator(0);\n // GOGONG 09/08/05 should not append \".\" to the pacakge name if sub-package is null\n DsByteString nextSubPkg;\n while (iter.hasNext()) {\n nextSubPkg = (DsByteString) iter.next();\n if (nextSubPkg != null) {\n fullName.append(BS_PERIOD);\n fullName.append(nextSubPkg);\n }\n }\n\n return fullName;\n }", "@Override\n public String toString() {\n return packageName;\n }", "default String getPackageName() {\n return declaringType().getPackageName();\n }", "public String getPackageName() {\n return pkg;\n }", "public String getPackageName() {\n JavaType.FullyQualified fq = TypeUtils.asFullyQualified(qualid.getType());\n if (fq != null) {\n return fq.getPackageName();\n }\n String typeName = getTypeName();\n int lastDot = typeName.lastIndexOf('.');\n return lastDot < 0 ? \"\" : typeName.substring(0, lastDot);\n }", "public String getPackageName();", "public String getPackageName() {\n return packageName;\n }", "public String getPackageName() {\n return packageName;\n }", "public String getPackageName() {\n\t\treturn packageName;\n\t}", "public String getAppName(PackageInfo packageInfo) {\n return (String) packageInfo.applicationInfo.loadLabel(packageManager);\n }", "public String getPackageName() {\n if (mPackageName == null) {\n try {\n mPackageName = mSessionBinder.getPackageName();\n } catch (RemoteException e) {\n Log.d(TAG, \"Dead object in getPackageName.\", e);\n }\n }\n return mPackageName;\n }", "public static String getPackageName(Context ctx) {\n return packageName = ctx.getPackageName();\n }", "public static String getBukkitPackage() {\n return Bukkit.getServer().getClass().getPackage().getName().split(\"\\\\.\")[3];\n }", "@NonNull\n public String getPackageName() {\n return mPackageName;\n }", "public String getModelPackageStr() {\n\t\tString thepackage = getModelXMLTagValue(\"package\");\n\t\treturn thepackage != null ? thepackage + \".\" : \"\";\n\t}", "public String getPackageName() {\n\t\treturn this.PackageName;\n\t}", "public abstract String packageName();", "public String getReadableName(String packageName){\n ApplicationInfo applicationInfo;\n try{\n applicationInfo = packageManager.getApplicationInfo(packageName, 0);\n }\n catch (Exception e){\n applicationInfo = null;\n }\n if(packageNameReadableNameMap.containsKey(packageName))\n return packageNameReadableNameMap.get(packageName);\n else if (applicationInfo != null)\n return (String)packageManager.getApplicationLabel(applicationInfo);\n else\n return packageName;\n }", "String getPackage() {\n return mPackage;\n }", "public String getAppPackage() {\n\t\treturn fnh.getOutputAppPackage();\n\t}", "public com.google.protobuf.ByteString\n getPackageNameBytes() {\n Object ref = packageName_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n packageName_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public StringProperty packageNameProperty() {\n return packageName;\n }", "public String getBasePackage() {\n\t\treturn this.basePackage;\n\t}", "public com.google.protobuf.ByteString\n getPackageNameBytes() {\n Object ref = packageName_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n packageName_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@Override\n public String getLocalPackageName() {\n return Name.from(getApiWrapperModuleName().split(\"[^a-zA-Z0-9']+\")).toLowerCamel();\n }", "protected abstract String getPackageName();", "@Override\n\tpublic String getName() {\n\t\tfinal String name = super.getName();\n\t\ttry {\n\t\t\treturn name.substring(namespace.length()+1);\n\t\t} catch (Exception e) {\n\t\t\treturn name;\n\t\t}\n\t}", "String pkg();", "public String getProjectPackageName() {\n\t\treturn projectPackageName;\n\t}", "private String getModuleName() {\n \t\t// If there is an autoconnect page then it has the module name\n \t\tif (autoconnectPage != null) {\n \t\t\treturn autoconnectPage.getSharing().getRepository();\n \t\t}\n \t\tString moduleName = modulePage.getModuleName();\n \t\tif (moduleName == null) moduleName = project.getName();\n \t\treturn moduleName;\n \t}", "protected String getPackageName(Class<?> type) {\n return type.getPackage().getName();\n }", "public String getName() {\n // defaults to class name\n String className = getClass().getName();\n return className.substring(className.lastIndexOf(\".\")+1);\n }", "private static String getPackage() {\n\t\tPackage pkg = EnergyNet.class.getPackage();\n\n\t\tif (pkg != null) {\n\t\t\tString packageName = pkg.getName();\n\n\t\t\treturn packageName.substring(0, packageName.length() - \".api.energy\".length());\n\t\t}\n\n\t\treturn \"ic2\";\n\t}", "public DsByteString getPackage() {\n return m_strPackage;\n }", "@ApiModelProperty(example = \"conan_package.tgz\", value = \"The name of this package.\")\n public String getName() {\n return name;\n }", "public String getPackageInfomartion() {\n\t\treturn packageInfomartion;\n\t}", "public static String getPackageFromName(String name)\n \t{\n \t\tif (name.lastIndexOf('/') != -1)\n \t\t\tname = name.substring(0, name.lastIndexOf('/'));\n \t\tif (name.startsWith(\"/\"))\n \t\t\tname = name.substring(1);\n \t\treturn name.replace('/', '.');\t\t\n \t}", "public PackageName() {\n setFullyQualified(\"\");\n setShortName(\"\");\n }", "private String getVersionName() {\n\n\t\tString versionName = \"\";\n\t\tPackageManager packageManager = getPackageManager();\n\t\ttry {\n\t\t\tPackageInfo packageInfo = packageManager\n\t\t\t\t\t.getPackageInfo(getPackageName(), 0);// 获取包的内容\n\t\t\t// int versionCode = packageInfo.versionCode;\n\t\t\tversionName = packageInfo.versionName;\n\t\t\tSystem.out.println(\"versionName = \" + versionName);\n\t\t} catch (NameNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn versionName;\n\t}", "public String getModuleName() {\n if (repository == null) {\n return baseName;\n } else {\n StringBuffer b = new StringBuffer();\n repository.getRelativePath(b);\n b.append(baseName);\n return b.toString();\n }\n }", "public static String getName() {\n\t\treturn ProjectMain._name;\n\t}", "public String getName()\r\n \t{\n \t\treturn (explicit ? (module.length() > 0 ? module + \"`\" : \"\") : \"\")\r\n \t\t\t\t+ name + (old ? \"~\" : \"\"); // NB. No qualifier\r\n \t}", "public static String getPackageVersion() {\n return mPackageName + \" V\" + mVersion + \" [\" + mBuildDate + \"]\";\n }", "public String getBasePackage() {\n\t\treturn DataStore.getInstance().getBasePackage();\n\t}", "public static String m21401e(Context context) {\n return context.getApplicationInfo().packageName;\n }", "default String getPackageId() {\n return getIdentifier().getPackageId();\n }", "public PackageName getRootPackageName() {\n return rootPackageName;\n }", "@Override\n public String getApiWrapperModuleName() {\n List<String> names = Splitter.on(\".\").splitToList(packageName);\n return names.get(0);\n }", "@NotNull\n public static String getFirstPackage(@NotNull String packageName) {\n int idx = packageName.indexOf('.');\n return idx >= 0 ? packageName.substring(0, idx) : packageName;\n }", "public final String getAppName( )\n\t{\n\t\treturn this.data.getString( \"applicationName\" );\n\t}", "private static String packageName(String cn) {\n int index = cn.lastIndexOf('.');\n return (index == -1) ? \"\" : cn.substring(0, index);\n }", "public static String getFormattedBukkitPackage() {\n final String version = getBukkitPackage().replace(\"v\", \"\").replace(\"R\", \"\");\n return version.substring(2, version.length() - 2);\n }", "public static String getAppName(){\r\n return getProperty(\"name\", \"Jin\");\r\n }", "public static String getPackageName(String className) {\n String packageName = getQualifier(className);\n return packageName != null ? packageName : \"\";\n }", "public static String getPackageName(Class<?> c) {\n\t\tString fullyQualifiedName = c.getName();\n\t\tint lastDot = fullyQualifiedName.lastIndexOf('.');\n\t\tif (lastDot == -1)\n\t\t\treturn \"\";\n\t\t\n\t\treturn fullyQualifiedName.substring(0, lastDot);\n\t}", "public static String getName()\n {\n read_if_needed_();\n \n return _get_name;\n }", "public String getName()\n {\n return MODULE_NAME;\n }", "String getResourceBundleName() {\n return getPackageName() + \".\" + getShortName();\n }", "public static String getAppPackageName(Context context) {\n\n\t\treturn context.getApplicationContext().getPackageName();\n\t}", "java.lang.String getAppName();", "java.lang.String getAppName();", "java.lang.String getAppName();", "public final String getName() {\n if (name == null) {\n name = this.getClass().getSimpleName().substring(3);\n }\n return name;\n }", "com.google.protobuf.ByteString\n getPackageNameBytes();", "com.google.protobuf.ByteString\n getPackageNameBytes();", "private static String getPackage(final String fullName) {\n \t\treturn fullName.substring(0, fullName.lastIndexOf(\".\"));\n \t}", "public String getName() {\r\n\t\treturn libraryName;\r\n\t}", "public String getName()\n {\n return groupService.getName(this);\n }", "public String getFullyQualifiedName() {\n\t\treturn this.getPackageName() + \".\" + this.getClassName();\n\t}", "public String getFullName() {\n return group + \".\" + name;\n }", "public static String getServicePackageName(String packagePrefix) {\n List<String> split = Splitter.on('/').splitToList(packagePrefix);\n String localName = \"\";\n if (split.size() < 2) {\n throw new IllegalArgumentException(\"expected packagePrefix to have at least 2 segments\");\n }\n // Get the second to last value.\n // \"google.golang.org/api/logging/v2beta1\"\n // ^^^^^^^\n localName = split.get(split.size() - 2);\n return localName;\n }", "public static String packageName(TableModel table) {\n return instance.getPackageName(table);\n }", "public static String getAppName()\n\t{\n\t\treturn APP_NAME;\n\t}", "public String getName() {\n\t\tSharedPreferences settings = parentContext.getSharedPreferences(PREFERENCE_FILE,\n\t\t\t\tContext.MODE_PRIVATE);\n\t\treturn settings.getString(USERNAME_KEY, null);\n\t}", "private String getLauncherPackageName() {\n // Create launcher Intent\n final Intent intent = new Intent(Intent.ACTION_MAIN);\n intent.addCategory(Intent.CATEGORY_HOME);\n\n // Use PackageManager to get the launcher package name\n PackageManager pm = InstrumentationRegistry.getContext().getPackageManager();\n ResolveInfo resolveInfo = pm.resolveActivity(intent, PackageManager.MATCH_DEFAULT_ONLY);\n return resolveInfo.activityInfo.packageName;\n }", "public static String getPackageName(String longClassName) {\r\n\t\tfinal StringTokenizer tk = new StringTokenizer(longClassName, \".\");\r\n\t\tfinal StringBuilder sb = new StringBuilder();\r\n\t\tString last = longClassName;\r\n\t\twhile (tk.hasMoreTokens()) {\r\n\t\t\tlast = tk.nextToken();\r\n\t\t\tif (tk.hasMoreTokens()) {\r\n\t\t\t\tsb.append(last);\r\n\t\t\t\tsb.append(\".\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn sb.toString().substring(0, sb.toString().length() - 1);\r\n\t}", "public static String getCraftBukkitPackage() {\n \t\t// Ensure it has been initialized\n \t\tgetMinecraftPackage();\n \t\treturn CRAFTBUKKIT_PACKAGE;\n \t}", "public String getAPP_NAME() {\r\n return APP_NAME;\r\n }", "public String getAPP_NAME() {\r\n return APP_NAME;\r\n }", "protected static String getModelPackageName (Context context){\r\n\t\tString packageName = getMetaDataString(context, METADATA_MODEL_PACKAGE_NAME);\r\n\t\tif (packageName == null)\r\n\t\t\treturn \"\";\r\n\t\treturn packageName;\r\n\t}", "public String getFQN(){\n\t\treturn this.tsApp.getFQN()+\"_\"+this.tsName;\n\t}", "public String getName() {\n\t\treturn name != null ? name : getDirectory().getName();\n\t}", "public String getPackagedJava();", "public String getNiceName()\n {\n String name = getBuildFile().getName();\n\n return Utility.replaceBadChars(name);\n }", "java.lang.String getProjectName();" ]
[ "0.808132", "0.7953729", "0.7952443", "0.79294723", "0.7899135", "0.7880084", "0.78707755", "0.7801152", "0.7766416", "0.7710941", "0.7691799", "0.7642725", "0.76370466", "0.7614245", "0.7510091", "0.73595136", "0.73238593", "0.7317986", "0.7294862", "0.72914755", "0.7291317", "0.7279294", "0.7279294", "0.7274125", "0.72710663", "0.7226157", "0.7203905", "0.712155", "0.7099258", "0.70859414", "0.7045096", "0.7021396", "0.69718915", "0.6949168", "0.6945841", "0.69418067", "0.6890462", "0.6881476", "0.6881237", "0.6879638", "0.68303084", "0.6816938", "0.6779339", "0.67749566", "0.6728182", "0.6711989", "0.6682128", "0.6675641", "0.6673853", "0.66716844", "0.6667653", "0.6665465", "0.66490036", "0.66294134", "0.66166884", "0.6606164", "0.66003996", "0.6593485", "0.6590316", "0.6585616", "0.6582836", "0.6558477", "0.6555995", "0.6552938", "0.653916", "0.6530242", "0.6517375", "0.65164375", "0.6506725", "0.65032744", "0.6498081", "0.6491308", "0.6466352", "0.64592373", "0.6459213", "0.6459213", "0.6459213", "0.6439316", "0.64312965", "0.64153504", "0.64140624", "0.6411038", "0.6398194", "0.63808036", "0.63744754", "0.6361745", "0.6351763", "0.6350682", "0.63223654", "0.6322261", "0.6319958", "0.63128275", "0.63040864", "0.63040864", "0.62874717", "0.62867594", "0.62752455", "0.6271474", "0.6270438", "0.62486374" ]
0.74328244
15
Gets the package version.
public static String getPackageVersion() { return mPackageName + " V" + mVersion + " [" + mBuildDate + "]"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String getVersion() {\n return version;\n }", "public static String getVersion() {\n return version;\n }", "public String getVersion() {\n\t\tString version = \"0.0.0\";\n\n\t\tPackageManager packageManager = getPackageManager();\n\t\ttry {\n\t\t\tPackageInfo packageInfo = packageManager.getPackageInfo(\n\t\t\t\t\tgetPackageName(), 0);\n\t\t\tversion = packageInfo.versionName;\n\t\t} catch (NameNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn version;\n\t}", "public String getVersion() {\n\t\tString version = \"0.0.0\";\n\n\t\tPackageManager packageManager = getPackageManager();\n\t\ttry {\n\t\t\tPackageInfo packageInfo = packageManager.getPackageInfo(\n\t\t\t\t\tgetPackageName(), 0);\n\t\t\tversion = packageInfo.versionName;\n\t\t} catch (NameNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn version;\n\t}", "public static String getVersion() {\n\t\treturn version;\r\n\t}", "public static String getVersion() {\n\t\treturn version;\n\t}", "public static final String getVersion() { return version; }", "public static final String getVersion() { return version; }", "public static String getVersion() {\r\n\t\treturn VERSION;\r\n\t}", "public final String getVersion() {\n return version;\n }", "public java.lang.String getVersion() {\r\n return version;\r\n }", "public String getVersion()\n {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion () {\r\n return version;\r\n }", "public static String getVersion() {\n if (version != null) {\n return version;\n }\n\n Package p = MCBouncer.class.getPackage();\n\n if (p == null) {\n p = Package.getPackage(\"com.mcbouncer\");\n }\n\n if (p == null) {\n version = \"(unknown)\";\n } else {\n version = p.getImplementationVersion();\n\n if (version == null) {\n version = \"(unknown)\";\n }\n }\n\n return version;\n }", "public String getVersion() {\r\n return version;\r\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion()\n {\n return version;\n }", "public String getVersion()\n {\n return version;\n }", "public String getVersion() {\n\t\treturn version;\n\t}", "int getPackageVersion(String packageName);", "public String getVersion() {\r\n\t\treturn version;\r\n\t}", "public Version getVersion();", "public String getVersion();", "public String getVersion();", "public String getVersion();", "public String getVersion();", "public java.lang.String getVersion() {\n return version_;\n }", "public String getVersion()\n {\n return ver;\n }", "public static String getAppVersion(){\r\n return getProperty(\"version\");\r\n }", "public String getVersion () {\n return this.version;\n }", "public String getVersion() {\n return _version;\n }", "public static String getVersion() {\n\t\treturn \"0.9.4-SNAPSHOT\";\n\t}", "public String getVersion() {\n\t\treturn (VERSION);\n\t}", "String getVersion();", "String getVersion();", "String getVersion();", "String getVersion();", "String getVersion();", "String getVersion();", "String getVersion();", "String getVersion();", "String getVersion();", "String getVersion();", "String getVersion();", "public long getVersion() {\n return version;\n }", "public long getVersion() {\n return version;\n }", "public static String getVersion() {\n\t\treturn \"1.0.3\";\n\t}", "public final int getVersion() {\n return version;\n }", "public String getVersion() {\n\t\treturn _version;\n\t}", "public String getVersion(){\r\n return version;\r\n }", "java.lang.String getApplicationVersion();", "public int getVersion()\n {\n return info.getVersion().intValueExact();\n }", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "public int getVersion() {\n return version;\n }", "public int getVersion() {\n return version;\n }", "public int getVersion() {\n return version;\n }", "public int getVersion() {\n return version;\n }", "public int getVersion() {\n return version;\n }", "public String getVersion() {\n return this.version;\n }", "public String getProductVersion();", "public String version() {\n return this.version;\n }", "public String version() {\n return this.version;\n }", "public String version() {\n return this.version;\n }", "public String version() {\n return this.version;\n }", "Version getVersion();", "Version getVersion();", "Version getVersion();", "Version getVersion();", "public Long getVersion() {\n return version;\n }", "public Long getVersion() {\n return version;\n }", "public Long getVersion() {\n return version;\n }", "public Long getVersion() {\n return version;\n }", "int getCurrentVersion();", "@CheckForNull\n String getVersion();", "public Version getVersion() {\n return version;\n }", "public String getVersion() {\n return \"1.0.4-SNAPSHOT\";\n }", "public BigDecimal getVersion() {\n\t\tBigDecimal bd = (BigDecimal) get_Value(\"Version\");\n\t\tif (bd == null)\n\t\t\treturn Env.ZERO;\n\t\treturn bd;\n\t}", "public Version version()\n/* */ {\n/* 518 */ return PackageVersion.VERSION;\n/* */ }", "public String getVersion() {\n return GemFireVersion.asString();\n }", "public String version() throws CallError, InterruptedException {\n return (String)service.call(\"version\").get();\n }" ]
[ "0.79208875", "0.79208875", "0.79159707", "0.79159707", "0.78730637", "0.7864253", "0.78560835", "0.78560835", "0.7745507", "0.77148646", "0.7684717", "0.7613515", "0.76071554", "0.76071554", "0.76071554", "0.76071554", "0.76071554", "0.76071554", "0.76071554", "0.76071554", "0.76071554", "0.76071554", "0.76071554", "0.7604415", "0.75955933", "0.7589869", "0.7576341", "0.7576341", "0.7574738", "0.75722545", "0.75722545", "0.75068307", "0.74941796", "0.7478668", "0.74751985", "0.74751407", "0.74751407", "0.74751407", "0.74751407", "0.74704105", "0.7464258", "0.74288046", "0.7406219", "0.74009967", "0.73982096", "0.7387168", "0.737309", "0.737309", "0.737309", "0.737309", "0.737309", "0.737309", "0.737309", "0.737309", "0.737309", "0.737309", "0.737309", "0.73668337", "0.73668337", "0.73565096", "0.73552537", "0.7354191", "0.7326605", "0.73208356", "0.73190427", "0.7315518", "0.7315518", "0.7315518", "0.7315518", "0.7315518", "0.7315518", "0.7315518", "0.7315518", "0.73096347", "0.73096347", "0.73096347", "0.73096347", "0.73096347", "0.7296418", "0.7289016", "0.72795093", "0.72795093", "0.72795093", "0.72795093", "0.72748715", "0.72748715", "0.72748715", "0.72748715", "0.72608966", "0.72608966", "0.72608966", "0.72608966", "0.7250798", "0.7247126", "0.721591", "0.7211181", "0.72031975", "0.7188319", "0.7188035", "0.71693766" ]
0.7903109
4
Gets the build date.
public static String getBuildDate() { return mBuildDate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static final Date getBuildDate() { return buildDate; }", "public static final Date getBuildDate() { return buildDate; }", "public static String getBuildDate() {\r\n return getJarInfo(\"BuildDate\");\r\n }", "public Instant getBuildDate() {\r\n\t\treturn buildDate;\r\n\t}", "public String getBuildTime() {\n \t\treturn buildTime;\n \t}", "@Deprecated\n\tpublic static String getBuildDate() {\n\t\treturn JacobReleaseInfo.getBuildDate();\n\t}", "public final int getBuildTime()\n{\n\treturn _buildTime;\n}", "public String getBuildDay() {\n return buildDay;\n }", "public static String getBuildDateMF() {\n return getBuildDateMF(getJarPathFromClassPath(getAppJarName()));\n }", "public synchronized int getBuildFrom()\n {\n return buildFrom;\n }", "public String getReleaseDate() {\n return dateFormatter.format(release);\n }", "public static String getDate() {\n return getDate(System.currentTimeMillis());\n }", "@SimpleProperty(description = \"iSENSE Project Creation Date\", \n category = PropertyCategory.BEHAVIOR)\n public String ProjectDateCreated() {\n if(this.project == null || this.fields == null) {\n Log.e(\"iSENSE\", \"Couldn't get project information!\");\n return \"DNE\";\n }\n return project.timecreated;\n }", "@java.lang.Override\n public long getBuild() {\n return build_;\n }", "public String getDateOfRelease() {\n return dateOfRelease;\n }", "public String getProjectDate()\n\t{\n\t\treturn m_projectDate;\n\t}", "public static String getBuildDateMF(String jarFile) {\n \treturn getCommonManifestEntry(jarFile, \"Date\");\n }", "public String getBuildVersion() {\n return buildVersion;\n }", "public static BuildInfo getBuildInfo() {\n return BUILD_INFO;\n }", "public String Get_date() \n {\n \n return date;\n }", "public File getBuildFile() {\n return _build_file;\n }", "public static String getDate() {\n return annotation != null ? annotation.date() : \"Unknown\";\n }", "public String getBuildNumber()\n\t{\n\t\treturn getProperty(ConfigurationManager.BUILD_PROPERTY);\n\t\t// return \"26\";\n\t}", "public File getBuildFile()\n {\n return buildFile;\n }", "public synchronized int getBuildTo()\n {\n return buildTo;\n }", "public String getReleaseDate() {\r\n return releaseDate;\r\n }", "public java.lang.String getCreateDate() {\n java.lang.Object ref = createDate_;\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 createDate_ = s;\n return s;\n }\n }", "public String getDate() {\n\t\treturn logInfoSplit[0] + \"_\" + logInfoSplit[1];\n\t}", "java.lang.String getDate();", "@Override\n public BuildInfo get() {\n return BUILD_INFO;\n }", "@java.lang.Override\n public long getBuild() {\n return instance.getBuild();\n }", "public java.lang.String getCreateDate() {\n java.lang.Object ref = createDate_;\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 createDate_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getBuildVersion() {\n try {\n Properties versionFileProperties = new Properties();\n InputStream inputStream = getClass().getClassLoader().getResourceAsStream(\"version.properties\");\n if (inputStream != null) {\n versionFileProperties.load(inputStream);\n return versionFileProperties.getProperty(\"version\", \"\") + \" \" + versionFileProperties.getProperty(\"timestamp\", \"\");\n }\n } catch (IOException e) {\n Logger.getLogger(OnStartup.class.getName()).log(Level.SEVERE, null, e);\n }\n return \"\";\n }", "public double getBuild() {\r\n return build;\r\n }", "public String getDate()\n\t\t{\n\t\t\treturn date;\n\t\t}", "public Date getdate() {\n\t\treturn new Date(date.getTime());\n\t}", "public String getDate()\r\n\t{\r\n\t\treturn date;\r\n\t}", "public String getDate()\r\n\t{\r\n\t\treturn date;\r\n\t}", "public Date getMakeCheckDate() {\n return makeCheckDate;\n }", "public Date getReleaseDate() {\n\t\treturn releaseDate;\n\t}", "public String getBuiltOnStr() {\n return builtOn;\n }", "public long getDate() {\n return date_;\n }", "public String getDate() {\r\n\t\treturn date;\r\n\t}", "public String getDate() {\n\t\treturn date;\n\t}", "public String getDate() {\n\t\treturn date;\n\t}", "public Date getReleaseDate() {\n return releaseDate;\n }", "public java.lang.String getDate() {\n return date;\n }", "long getBuild();", "public long getDate() {\n return date_;\n }", "public static String getDate() {\n return getDate(DateUtils.BASE_DATE_FORMAT);\n }", "public String getdate() {\n\t\treturn date;\n\t}", "public String getDate() {\r\n return date;\r\n }", "public long getDate() {\n\t\treturn date;\n\t}", "public long getDate() {\n\t\treturn date;\n\t}", "public long getDate() {\n return date;\n }", "final public synchronized Date getDate() {\n return new Date(crtime) ;\n }", "private static String getDate()\n\t{\n\t\tString dateString = null;\n\t\tDate sysDate = new Date( System.currentTimeMillis() );\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"dd-MM-yy HH:mm:ss\");\n\t\tdateString = sdf.format(sysDate);\n\t\treturn dateString;\n\t}", "public String getDate(){\n\t\t\n\t\treturn this.date;\n\t}", "public String getDate() {\n\t\treturn this.mDate;\n\t}", "public String getDate() {\n return date;\n }", "public String getDate() {\n return date;\n }", "public String getDate() {\n return date;\n }", "public String getDate() {\n return date;\n }", "public String getDate() {\n return date;\n }", "public String getSystemDate() {\n\t\tDate date = new Date();\n\t\treturn date.toString();\n\t}", "public String getDate() {\n return date;\n }", "public long getDate() {\n return date;\n }", "public String getDate() {\r\n\t\treturn this.date;\r\n\t}", "public String getDate() {\n\t\treturn this.date;\n\t}", "@NotNull\r\n public String getDate() {\r\n return date;\r\n }", "public static String getCurrentDate()\n\t{\n\t\treturn getDate(new Date());\n\t}", "public String getDate() {\n if (MetadataUGWD_Type.featOkTst && ((MetadataUGWD_Type)jcasType).casFeat_date == null)\n jcasType.jcas.throwFeatMissing(\"date\", \"de.aitools.ie.uima.type.argumentation.MetadataUGWD\");\n return jcasType.ll_cas.ll_getStringValue(addr, ((MetadataUGWD_Type)jcasType).casFeatCode_date);}", "public String getDate()\n {\n return day + \"/\" + month + \"/\" + year;\n }", "public String getBuildVersion() {\n return Build.VERSION.RELEASE;\n }", "String getDate();", "String getDate();", "java.lang.String getFoundingDate();", "public static String getBuildVersionMF() {\n return getBuildDateMF(getJarPathFromClassPath(getAppJarName()));\n }", "public String getVersionDate();", "public static String getBuiltBy() {\r\n return getJarInfo(\"Built-By\");\r\n }", "public Date getReleaseDate(){\n return releaseDate;\n }", "public String getVersion()\n\t{\n\t\treturn \"$Date$\";\n\t}", "public String getDate() {\t\n\t\treturn mDate;\n\t}", "public java.lang.String getPOSTNG_DATE() {\r\n return POSTNG_DATE;\r\n }", "public int getBuilt() {\n return built;\n }", "public static String getAppBuild() {\n \t\tif (props.containsKey(\"app.build\")) {\n \t\t\treturn props.getProperty(\"app.build\");\n \t\t} else {\n \t\t\treturn \"unspecified\";\n \t\t}\n \t}", "public java.util.Date getCreated()\r\n {\r\n return getSemanticObject().getDateProperty(swb_created);\r\n }", "public java.util.Date getCreated()\r\n {\r\n return getSemanticObject().getDateProperty(swb_created);\r\n }", "public java.util.Date getCreated()\r\n {\r\n return getSemanticObject().getDateProperty(swb_created);\r\n }", "public Date getCreationDate() {\n return m_module.getConfiguration().getCreationDate();\n }", "java.lang.String getToDate();", "private static String getDate() {\n return new SimpleDateFormat(\"yyyyMMddHHmmss\").format\n (new Date(System.currentTimeMillis()));\n }", "public Date getDate() {\n\t\treturn date_;\n\t}", "public String getDate() {\n\t\treturn mDate;\n\t}", "protected String getDateString() {\n String result = null;\n if (!suppressDate) {\n result = currentDateStr;\n }\n return result;\n }", "public static String getDate() {\n\t\tDate date = new Date();\n\t\tSimpleDateFormat formatter = new SimpleDateFormat(\"ddMMYYYY\");\n\t\tString strDate = formatter.format(date);\n\t\treturn strDate;\n\t}", "public String getDate() {\n return this.date;\n }", "public String getDate() {\n return this.date;\n }", "public String getEventDate()\n {\n EventDate = createEvent.getText();\n return EventDate;\n }", "public static final int getBuildNumber() { return 0; }" ]
[ "0.8947983", "0.8947983", "0.8535044", "0.818111", "0.7860083", "0.77891576", "0.7702291", "0.76972824", "0.7088673", "0.6933143", "0.68500495", "0.677668", "0.6764119", "0.67516255", "0.66916955", "0.6668127", "0.66357756", "0.65932006", "0.65853596", "0.6583365", "0.6546566", "0.6540507", "0.6496453", "0.64832926", "0.6468725", "0.6465446", "0.6457349", "0.64363223", "0.642115", "0.6419201", "0.64162827", "0.6408812", "0.640468", "0.63788784", "0.63780165", "0.6374386", "0.63725555", "0.63725555", "0.63163215", "0.6311404", "0.6310973", "0.63107467", "0.62998474", "0.62984663", "0.62984663", "0.6293769", "0.62831026", "0.62819946", "0.62722975", "0.626649", "0.6263539", "0.62541765", "0.62414634", "0.62414634", "0.6237603", "0.6235672", "0.62082386", "0.62067175", "0.6196638", "0.61845833", "0.61845833", "0.61845833", "0.61845833", "0.61845833", "0.617995", "0.61786747", "0.61783516", "0.61686945", "0.6159094", "0.6153104", "0.6151392", "0.61498016", "0.6148704", "0.614702", "0.61456645", "0.61456645", "0.6144588", "0.6129765", "0.6127095", "0.6121761", "0.61039966", "0.6103602", "0.6100866", "0.6094001", "0.60907245", "0.6086389", "0.60836583", "0.60836583", "0.60836583", "0.607388", "0.60693026", "0.60689086", "0.6064932", "0.6064478", "0.6063919", "0.6060919", "0.6058654", "0.6058654", "0.605308", "0.6039041" ]
0.89291024
2
a is times, b is sides
public static int rollDice (int a, int b) { int count=0; int total=0; while(count<a) { int roll=(int)((Math.random()*b)+1); total=total+roll; count++; } return total; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int main()\n{\n cin>>a.h>>a.m>>a.s>>b.h>>b.m>>b.s;\n int x=a.s-b.s;\n int y=a.m-b.m;\n int z=a.h-b.h;\n if(y<0){\n y+=60;\n z--;\n }\n if(x<0){\n x+=60;\n y--;\n }\n cout<<z<<\":\"<<y<<\":\"<<x;\n}", "public static double side(double[] a, double[] b, double[] p)\n {\n double d = ( ( (p[0] - a[0]) * (b[1] - a[1]) ) - ( (p[1] - a[1]) * (b[0]-a[0]) ) );\n return d;\n }", "public static double sideFromLawOfSines(double a, double sinA, double sinB) {\n\t\treturn (a * sinB / sinA);\n\t}", "public int soustraire(int a, int b){\r\n\t\treturn a-b;\r\n\t}", "public static void drawRectangle(int a, int b) {\n for(int i = 0; i < a; i++) {\n if(i == 0 || i == (a - 1)) {\n for (int o = 0; o < b; o++) {\n System.out.print(\"*\");\n }\n System.out.print(\"\\n\");\n } else {\n System.out.print(\"*\");\n for (int o = 0; o < (b - 2); o++) {\n System.out.print(\" \");\n }\n System.out.print(\"*\\n\");\n }\n }\n }", "int test(S2Point a0, S2Point ab1, S2Point a2, S2Point b0, S2Point b2);", "public static int[] middleWay(int[] a, int[] b) {\n int[] c = new int[2];\n int temp = 0;\n c[0] = a[a.length / 2];\n c[1] = b[b.length / 2];\n return c;\n\n }", "public static double pythagoras(int a, int b) {\n return Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2));\n }", "public double resta(double a, double b) {\n\t\treturn a-b;\n\t}", "void doubleBox(int sides, float x1, float y1, float z1, float x2, float y2, float z2)\r\n/* 100: */ {\r\n/* 101: 99 */ int s2 = sides << 1 & 0x2A | sides >> 1 & 0x15;\r\n/* 102: */ \r\n/* 103:101 */ this.context.renderBox(sides, x1, y1, z1, x2, y2, z2);\r\n/* 104:102 */ this.context.renderBox(s2, x2, y2, z2, x1, y1, z1);\r\n/* 105: */ }", "private double calcG(int a, int b) {\n return a % 2 == 0 && b % 2 == 0 ? 20 : a % 2 == 1 && b % 2 == 1 ? 1 : 5;\n }", "int kelilingPP(int a, int b){\r\n return 2*(a+b);\r\n }", "private static int wrap(int a, int b)\n {\n return (a < 0) ? (a % b + b) : (a % b);\n }", "static void linearTimeTwoParams(int[] a, int[] b) {\n if(a == null || b == null || a.length == 0 || b.length == 0) return;\n\n for(int i = 0; i < a.length; ++i) {\n System.out.println(a[i]);\n }\n\n for(int i = 0; i < b.length; ++i) {\n System.out.println(b[i]);\n }\n }", "public static double SideCalculator(float x1, float y1, float x2, float y2){\r\n double coord1 = Math.pow((x1 - x2), 2);\r\n double coord2 = Math.pow((y1 - y2), 2);\r\n double side = Math.pow((coord1 + coord2), 0.5);\r\n return side;\r\n }", "public static double areaRec (double a,double b) {\n\t\tdouble area = a * b;\n\t\treturn area;\n\t}", "private double getWinkel(Vector a, Vector b) {\n\t\tdouble zaehler = a.multiply(b);\n\t\tdouble nenner = a.getNorm() * b.getNorm();\n\t\t// nenner += 0.0001;\n\t\tdouble returnvalue = zaehler / nenner;\n\t\treturnvalue = Math.acos(returnvalue);\n\t\treturnvalue = Math.toDegrees(returnvalue);\n\n\t\treturn returnvalue;\n\t}", "@Override\r\n\tpublic int calculate(int a, int b) {\n\t\treturn (a + b) * 2;\r\n\t}", "@Override\n\tpublic int arithmetical(int first, int second) {\n\t\treturn first - second;\n\t}", "@Override\n\tpublic int calculation(int a, int b) {\n\t\treturn b/a;\n\t}", "private double calcSide(int x1,int y1, int x2, int y2){\n \n double distance1 = Math.sqrt(Math.pow(x2 - x1,2) + Math.pow(y2-y1,2));\n \n return distance1;\n \n \n \n }", "private int[] fader(int[] a, int[] b) {\n\t\tfor(int i = 0; i < 3; i++) {\n\t\t\tif(a[i] > b[i]) {\n\t\t\t\ta[i] = a[i]-1;\n\t\t\t} else if(a[i] < b[i]) {\n\t\t\t\ta[i] = a[i]+1;\n\t\t\t}\n\t\t}\n\n\t\treturn a;\n\t}", "public static void main(String[] args) {\n int a = 15;\n int b = 17;\n\n System.out.println(\"a = \"+a+\" b = \"+b);\n\n a = a^b;\n b = a^b;\n a = a^b;\n\n System.out.println(\"a = \"+a+\" b = \"+b);\n }", "public int subwith2Para(int a, int b) {\r\n\t\tint result = a - b;\r\n\t\treturn result;\r\n\t}", "private double d(Point a, Point b){\n\t\treturn Math.sqrt(Math.pow(b.getX()-a.getX(),2) + Math.pow(a.getY() - b.getY(), 2));\r\n\t}", "public static void main(String[] args) {\n\n double x = 34.56;\n double y = 2.45;\n\n System.out.println(x + y);\n System.out.println(x - y);\n System.out.println(x * y);\n System.out.println(x / y);\n\n var a = 5;\n int b = 9;\n\n System.out.println(a + b);\n System.out.println(a - b);\n System.out.println(a * b);\n System.out.println(a / b);\n System.out.println(a / (double)b);\n\n System.out.println(a % b);\n\n }", "private void computePythagorean(int a, int b){\n\t\tdouble c = Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2));\n\t\toutputAnswer(c);\n\t}", "public Fraction times(Fraction rightOperand){\n\t\t// top times top, and bottom times bottom\n\t\tint num = myNumerator * rightOperand.getNumerator();\n\t\tint denom = myDenominator * rightOperand.getDenominator();\n\t\n\t\treturn new Fraction(num, denom);\n }", "public static boolean passed(double a, double t, double b) {\n return ((a <= t && t <= b) || (b <= t && t <= a));\n }", "public static void main(String[] args) {\n\t\t\r\n\t\ta= a*b;//36\r\n\t\tb=a/b;//9\r\n\t\ta=a/b;//4\r\n\t\t\r\n\t\tSystem.out.println(\"a=\"+a);\r\n\t\t\r\n\t\tSystem.out.println(\"b=\"+b);\r\n\t}", "public static int magnitude(int a, int b) {\n int abso = Math.max(Math.abs(a), Math.abs(b));\n if (abso == (Math.abs(a))){\n return a; \n }\n else {\n return b;\n }\n\n }", "private Ray3D geradeAusPunkten(Vector a, Vector b) {\n\t\tVector verbindung = b.subtract(a);\n\t\tRay3D ray = new Ray3D(a, verbindung);\n\t\treturn ray;\n\t}", "public int resta(){\r\n return x-y;\r\n }", "public void jumlah(double a, int b) {\n\t\tSystem.out.println(\"Jumlah 2 angka (double+int) = \" + (a + b));\n\t}", "public static void areatriangle(double b, double h, int x) {\n double result =(b * h) / x;\n System.out.println(result);\n }", "private static int pair_GCF(int a, int b) {\n int t;\n while (b != 0) {\n t = a;\n a = b;\n b = t % b;\n }\n return a;\n }", "private int bresA(int a, int b, int d) { //A as in Axis\n int add = 0;\n err += b;\n if(2*err >= a) {\n add = d;\n err -= a;\n }\n return add;\n }", "static int soma2(int a, int b) {\n\t\tint s = a + b;\r\n\t\treturn s;\r\n\t}", "public void switchSides() {\n\t\tint temp = 0;\r\n\t\ttemp = leftValue;\r\n\t\tleftValue = rightValue;\r\n\t\trightValue = temp;\r\n\t}", "static void mostrar(int a, int b){\n\tint mayor = a > b ? a : b; //asignamos a mayor el mayor entre a y b\n\tint menor = a < b ? a : b; //y en menor el mas pequeños entre a y b\n\t\t\n\tfor (int i = menor; i <= mayor; i++) { //siempre iremos del menor al mayor\n \tSystem.out.println(i);\n\t}\n\t\t\n\t}", "@Override\n public int test(S2Point a0, S2Point ab1, S2Point a2, S2Point b0, S2Point b2) {\n // For A to contain B (where each loop interior is defined to be its left\n // side), the CCW edge order around ab1 must be a2 b2 b0 a0. We split\n // this test into two parts that test three vertices each.\n return orderedCCW(a2, b2, b0, ab1) && orderedCCW(b0, a0, a2, ab1) ? 1 : 0;\n }", "public static void numberTwo(){\n\n\n short x = 40; // 1 side side of cube 40 cm\n short y = 12; // cube has 12 edges\n short perimetercube = 40 * 12;\n System.out.println(\" Perimeter cube:\" + perimetercube);\n // Piramida - rectangle\n int a1 = 20;\n int b2 = 30;\n int c3 = 20;\n int d4 = 30;\n int perimeter = a1 + b2 + c3 + d4;\n System.out.println(\" Perimeter rectangle : \" + perimeter);\n final double PI = 3.14;\n\n\n\n double veryDouble = 3.14;\n double r = 58;\n\n System.out.println(PI);\n\n }", "public static int twoNumbers(int a, int b) {\n if ( a == b) {\n return ((a+2)+(b+2));\n }\n else {\n return ((a+1)+(b+1));\n }\n\n }", "public void jumlah(int b, double a) {\n\t\tSystem.out.println(\"Jumlah 2 angka (int+double) = \" + (a + b));\n\t}", "public double betweenAngle(Coordinates a, Coordinates b, Coordinates origin);", "Matrix timesT( Matrix b )\n {\n return new Matrix( b.timesV(x), b.timesV(y), b.timesV(z) );\n }", "private static Turn getTurn(Coordinate a, Coordinate b, Coordinate c) {\n long crossProduct = (((long)b.getX() - a.getX()) * ((long)c.getY() - a.getY())) -\n (((long)b.getY() - a.getY()) * ((long)c.getX() - a.getX()));\n\n if(crossProduct > 0) {\n return Turn.COUNTER_CLOCKWISE;\n }\n else if(crossProduct < 0) {\n return Turn.CLOCKWISE;\n }\n else {\n return Turn.COLLINEAR;\n }\n }", "public static void sign(double a, double b) {\n\t\tif (a >= 0 && b >= 0 || a <= 0 && b <= 0) {\n\t\t\tSystem.out.println(\"+\");\n\t\t} else {\n\t\t\tSystem.out.println(\"-\");\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tint a = 2;\n\t\tint b = 10;\n\t\tint c = a-(a/b)*b;\n\t\tSystem.out.println(c);\n\t\tint result = a;\n\t\twhile(result-b>=0){\n\t\t\tresult-=b;\n\t\t\tSystem.out.println(result);\n\t\t}\n\t\t\n\t\tSystem.out.println(\"result:\"+result);\n\t}", "private void wisselPunten(Speler a, Speler b, int score){\n a.veranderScore(score);\n b.veranderScore(-score);\n }", "private static BigInteger multiplyKaratsuba(BigInteger x, BigInteger y) {\n int xlen = x.mag.length;\n int ylen = y.mag.length;\n\n // The number of ints in each half of the number.\n int half = (Math.max(xlen, ylen)+1) / 2;\n\n // xl and yl are the lower halves of x and y respectively,\n // xh and yh are the upper halves.\n BigInteger xl = x.getLower(half);\n BigInteger xh = x.getUpper(half);\n BigInteger yl = y.getLower(half);\n BigInteger yh = y.getUpper(half);\n\n BigInteger p1 = xh.multiply(yh); // p1 = xh*yh\n BigInteger p2 = xl.multiply(yl); // p2 = xl*yl\n\n // p3=(xh+xl)*(yh+yl)\n BigInteger p3 = xh.add(xl).multiply(yh.add(yl));\n\n // result = p1 * 2^(32*2*half) + (p3 - p1 - p2) * 2^(32*half) + p2\n BigInteger result = p1.shiftLeft(32*half).add(p3.subtract(p1).subtract(p2)).shiftLeft(32*half).add(p2);\n\n if (x.signum != y.signum) {\n return result.negate();\n } else {\n return result;\n }\n }", "public static void main(String[] args) {\n\t\tScanner obj=new Scanner(System.in);\r\n\t\tint a=0;\r\n\t\tint count=0;\r\n System.out.println(\"enter size\");\r\n\t\ta=obj.nextInt();\r\n\t\tint m=2*a+1;\r\n\t\tint n=2*a+2;\r\n\t\tint mid=(m+1)/2;\r\n\t\tfor(int i=1;i<=m;i++)\r\n\t\t{\r\n\t\t\tcount=0;\r\n\t\t\tfor(int j=1;j<=n;j++)\r\n\t\t\t{\r\n\t\t\t\tcount++;\r\n\t\t\t\tif((i==1)||(i==m)||(j==1)||(j==n))//frame begin\r\n\t\t\t\t{\r\n\t\t\t\t\tif((i==1)||(i==m))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif((j==1)||(j==n))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"+\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"-\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif((j==1)||(j==n))\r\n\t {\r\n\t\t\t\t\t\t\tSystem.out.print(\"|\");//frame left and right\r\n\t }\r\n\t\t\t\t\t}\r\n\t\t\t\t}//frame end\r\n\t\t\t\telse if (i<mid)//upper-half\r\n\t\t\t\t{\r\n\t\t\t\t\tif(count<=2)\r\n\t\t\t\t\t{\r\n\t\t\t\t for(int k=mid;k>i;k--)\r\n\t\t\t\t {\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t }\r\n\t\t\t\t System.out.print(\"/\");\r\n\t\t\t\t for(int l=1;l<=2*i-4;l++)\r\n\t\t\t\t {\r\n\t\t\t\t\t if(i%2==0)\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t System.out.print(\"=\");\r\n\t\t\t\t\t }\r\n\t\t\t\t\t else\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t\t }\r\n\t\t\t\t }\r\n\t\t\t\tSystem.out.print(\"\\\\\");\r\n\t\t\t\t for(int k=mid;k>i;k--)\r\n\t\t\t\t {\r\n\t\t\t\t\t System.out.print(\" \");\r\n\t\t\t\t }\r\n\t\t\t\t\t}\r\n\t\t\t\t}//end of upper half\r\n\t\t\t\telse if(i>mid)//lower half\r\n\t\t\t\t{\r\n\t\t\t\t\tif(count<=2)\r\n\t\t\t\t\t{\r\n\t\t\t\t\tfor(int k=mid;k<i;k++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t System.out.print(\"\\\\\");\r\n\t\t\t\t\t for(int l=2*m-6;l>2*i-4;l--)\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t if(i%2==0)\r\n\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t System.out.print(\"=\");\r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t\t else\r\n\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t\t\t } \r\n\t\t\t\t\t }\r\n\t\t\t\t\t System.out.print(\"/\");\r\n\t\t\t\t\t for(int k=mid;k<i;k++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t\t}\r\n\t\t\t }\r\n\t\t\t\t\t}//end of lower half\r\n\t\t\t\telse if(i==mid)//middle part\r\n\t\t\t\t{\r\n\t\t\t\t\tif(j==2)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\"<\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(j==n-1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\">\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(i%2==0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"=\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"-\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}//end\r\n\t\t\t}//end-of-j\r\n\t\t\tSystem.out.println();\r\n\t\t}//end\r\n\r\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tint a = (20-3)*(3-9)/3;\n\t\tint b = 20-3*3-9/3;\n\t\t\n\t\tSystem.out.println(a);\n\t\tSystem.out.println(b);\n\n\t}", "protected static Turn getTurn(Point2D.Float a, Point2D.Float b,\n\t\t\tPoint2D.Float c) {\n\n\t\t// use longs to guard against int-over/underflow\n\t\tfloat crossProduct = (((long) b.x - a.x) * ((long) c.y - a.y))\n\t\t\t\t- (((long) b.y - a.y) * ((long) c.x - a.x));\n\n\t\tif (crossProduct > 0) {\n\t\t\treturn Turn.COUNTER_CLOCKWISE;\n\t\t} else if (crossProduct < 0) {\n\t\t\treturn Turn.CLOCKWISE;\n\t\t} else {\n\t\t\treturn Turn.COLLINEAR;\n\t\t}\n\t}", "public static double ver4(int a[], int aLen, int b[], int bLen) {\n int k = (aLen + bLen + 1) / 2;\n double left = (double) findKth(a, 0, aLen - 1, b, 0, bLen - 1, k);\n\n if ((aLen + bLen) % 2 == 0) {\n k++;\n double right = (double) findKth(a, 0, aLen - 1, b, 0, bLen - 1, k);\n return (left + right) / 2;\n }\n\n return left;\n }", "static double sol4(int[] a,int[] b){\r\n \tint mid1=0,mid2= 0;\r\n \tif((a.length+b.length)%2==0) {\r\n \t\tmid1 = (a.length+b.length)/2 -1;\r\n \t\tmid2 = mid1 + 1;\r\n \t\t}else {\r\n \t\t\tmid1 = mid2 = (a.length+b.length)/2;\r\n \t\t}\r\n \t\tint[] ab = new int[a.length+b.length];\r\n \t\tint i=0,j=0,count=0;\r\n\t\twhile (i<a.length && j<b.length){\r\n\t\t\tif (a[i]<b[j]){ \r\n\t\t\t\tab[count++]=a[i++];\r\n\t\t\t}else{\r\n\t\t\t\tab[count++]=b[j++];\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (i==a.length){\r\n\t\t\twhile (j<b.length){\r\n\t\t\t\tab[count++]=b[j++];\r\n\t\t\t}\r\n\t\t}else {\r\n\t\t\twhile (i<a.length){\r\n\t\t\t\tab[count++]=a[i++];\r\n\t\t\t}\r\n\t\t}\r\n\t\t//for (int n =0; n< ab.length;n++){\r\n\t\t//\tSystem.out.println(ab[n]);\r\n\t\t//}\r\n\t\tdouble ans = -1;\r\n\t\tif (mid1 == mid2){\r\n\t\t\tans = (double) ab[mid1];\r\n\t\t\treturn ans;\r\n\t\t}\r\n\t\tans = (double) (ab[mid1]+ab[mid2])/2;\r\n\t\treturn ans;\r\n\r\n }", "static double cross(Vec a, Vec b) {\n return a.x * b.y - a.y * b.x;\n }", "private static boolean isPointRightOfLine(LineSegment a, Point2D b) {\r\n\t // Move the image, so that a.first is on (0|0)\r\n\t LineSegment aTmp = new LineSegment(new PointDouble(0, 0), new PointDouble(\r\n\t a.endPoint.getX() - a.startPoint.getX(), a.endPoint.getY() - a.startPoint.getY()));\r\n\t PointDouble bTmp = new PointDouble(b.getX() - a.startPoint.getX(), b.getY() - a.startPoint.getY());\r\n\t return crossProduct(aTmp.endPoint, bTmp) < 0;\r\n\t}", "boolean move(int a, int b, int ring) {//TODO: effizienter schreiben\t\n\t\tif(this.Ring == ring) {\n\t\t\t//interring bewegung\n\t\t\t\t//Bedingung1: Abstand=1\n\t\t\t\tif(Math.abs(X-a)+Math.abs(Y-b) == 1)return true;\n\t\t}\n\t\t//extraring bewegung\n\t\tif(this.Ring != ring) { \n\t\t\tif(Math.abs(Ring-ring) == 1 && X==a && Y==b)return true;\n\t\t}\n\t\treturn false;\n\t}", "public LargeNumber execute(LargeNumber x, LargeNumber y) {\n if (x.size() == 1 && y.size() == 1) {\n return x.times(y);\n }\n // Compute the sign\n Sign sign = Sign.POSITIVE;\n if (x.getSign() != y.getSign()) {\n sign = Sign.NEGATIVE;\n }\n\n // Karatsuba works better if we just set the sign to positive\n x.setSign(Sign.POSITIVE);\n y.setSign(Sign.POSITIVE);\n\n // Make sure the numbers have the same word size.\n while (x.size() > y.size()) {\n y.getDigits().add(0, 0);\n }\n while (x.size() < y.size()) {\n x.getDigits().add(0, 0);\n }\n\n // First we split the input numbers in two, if the length is odd,\n // we add a leading zero and split.\n Pair<LargeNumber, LargeNumber> xsplit = x.split();\n Pair<LargeNumber, LargeNumber> ysplit = y.split();\n\n // Store the numbers\n LargeNumber x1 = xsplit.getFirst();\n LargeNumber x0 = xsplit.getSecond();\n LargeNumber y1 = ysplit.getFirst();\n LargeNumber y0 = ysplit.getSecond();\n\n // Set n to be the original word length\n int n = x1.size() * 2;\n\n // Because of Karatsuba: xy = x1y1*b^n+(x1y0+x0y1)*b^(n/2)+x0y0\n\n // Compute 3 half length multiplications\n LargeNumber z2 = x1.karatsuba(y1); // z2 = xhi * yhi\n LargeNumber z0 = x0.karatsuba(y0); // z0 = xlo * ylo\n LargeNumber z1 = (x1.plus(x0)).karatsuba(y1.plus(y0)).minus(z0).minus(z2); // z1 = (xhi +xlo)(yhi +ylo) - xhiyhi - xloylo\n\n // Compose results by shifitng and additions\n z2.shift(n);\n z1.shift(n / 2);\n LargeNumber result = z2.plus(z0).plus(z1);\n\n result.setSign(sign);\n\n // Uncomment to show karatsuba process\n //System.out.println(x + \" * \" + y + \" = \" + result);\n return result;\n\n }", "public double betweenAngle(Coordinates vectorA, Coordinates vectorB);", "@Override\n\tpublic float subtrair(float op1, float op2) {\n\t\treturn op1 - op2;\n\t}", "public static int telop(int x, int y){\r\n return x + y;\r\n }", "public Complex times(Complex a) {\n float real = this.re * a.re - this.im * a.im;\n float imag = this.re * a.im + this.im * a.re;\n return new Complex(real, imag);\n }", "private int calculamenos(String a, String b) {\n int res=0;\n res= Integer.valueOf(a) - Integer.valueOf(b);\n return res;\n \n }", "@Override\n public int test(S2Point a0, S2Point ab1, S2Point a2, S2Point b0, S2Point b2) {\n // For A not to intersect B (where each loop interior is defined to be\n // its left side), the CCW edge order around ab1 must be a0 b2 b0 a2.\n // Note that it's important to write these conditions as negatives\n // (!OrderedCCW(a,b,c,o) rather than Ordered(c,b,a,o)) to get correct\n // results when two vertices are the same.\n return (orderedCCW(a0, b2, b0, ab1) && orderedCCW(b0, a2, a0, ab1) ? 0 : -1);\n }", "public void getArea(int a, int b) {\n\n\t\tSystem.out.println(\"the area of a rectangle is \" + (a * b));\n\n\t}", "int luasPP(int a, int b){\r\n return a*b;\r\n }", "public static double sub(double a, double b){\r\n\t\treturn a-b;\r\n\t}", "static int calculate(int a, int b, String op) {\n switch (op) {\n case \"+\":\n return a + b;\n case \"-\":\n return a - b;\n case \"*\":\n return a * b;\n case \"/\":\n return a / b;\n default:\n break;\n }\n return 0;\n }", "public double multiplica(double a, double b) {\n\t\treturn a*b;\n\t}", "public static void main(String[] args) {\n Scanner sc=new Scanner(System.in);\n int n= sc.nextInt();\n for(int i=0;i<n;i++)\n {\n int x=sc.nextInt();\n int a=sc.nextInt();\n int b=sc.nextInt();\n if(a==b)\n System.out.print((x-1)*a);\n else\n { if(b<a)\n {\n int p=a;\n a=b;\n b=p;\n }\n for(int j=0;j<x;j++)\n {\n int t= j*b+(x-1-j)*a;\n System.out.print(t + \" \");\n }\n }\n System.out.println();\n }\n }", "private boolean compareMomenta(int[] a, int[] b){\n return ((a[0] == b[0]) &&\n (a[1]) == b[1]) ;\n }", "public void area()\n {\n float s= (float) (0.5 * a * b);\n double areaOfTraingle = (float)Math.sqrt((s - a) * (s - b) * (s - c));\n //using math function for square root operation\n System.out.println(\"Area of traiangle : \"+ areaOfTraingle);\n }", "static double angle(PointDouble a, PointDouble o, PointDouble b) {\n Vec oa = vector(o, a), ob = vector(o, b);\n return Math.acos(dot(oa, ob) / (norm(oa) * norm(ob)));\n }", "public void zeichneQuadrate(){\n for (int i=0; i<10;i++)\n rect (50+i*25,50,25,25);\n }", "public static <T extends Vector> T Divide(T a, T b,T result){\n if(Match(a,b)) {\n for (int i = 0; i < result.axis.length; i++) {\n result.axis[i] = a.axis[i] / b.axis[i];\n }\n return result;\n }\n return result;\n }", "static int makeAnagram(String a, String b) {\n int[] arr1 = new int[26];\n int[] arr2 = new int[26];\n\n for (int i = 0; i < a.length() ; i++) {\n arr1[a.charAt(i) - 'a']++;\n }\n\n for (int i = 0; i < b.length(); i++)\n arr2[b.charAt(i) - 'a']++;\n\n int times = 0;\n for (int i = 0; i < 26; i++)\n times += Math.abs(arr1[i] - arr2[i]);\n\n\n return times;\n }", "public static int mod(int a,int b) {\n\t\tif (b == 0) return 0;\n\t\tif (b<0) {\n\t\t\treturn -mod(-a,-b);\n\t\t} else if(a<0) {\n\t\t\twhile (Math.abs(a-b)>b)a+=b;\n\t\t\treturn a;\n\t\t} else {\n\t\t\twhile (a-b>=0) a-=b;\n\t\t\treturn a;\n\t\t}\n\t\t\n\t}", "public arm a(int paramInt1, int paramInt2)\r\n/* 18: */ {\r\n/* 19:32 */ return this.b[(paramInt1 & 0xF | (paramInt2 & 0xF) << 4)];\r\n/* 20: */ }", "public Coordinates midPoint(Coordinates a, Coordinates b);", "public Vector3 times(Vector3 multiplicand) {\n\t\treturn new Vector3(multiplicand.x * this.x, multiplicand.y * this.y, multiplicand.z * this.z);\n\t}", "private static int sign(S2Point a, S2Point b, S2Point c, S2Point aCrossB) {\n // assert (isUnitLength(a) && isUnitLength(b) && isUnitLength(c));\n int ccw = triage(aCrossB, c);\n if (ccw == 0) {\n ccw = S2Predicates.Sign.expensive(a, b, c, true);\n }\n return ccw;\n }", "private Point2D.Double calcVec(Point2D.Double a, Point2D.Double b)\n\t{\n\t\treturn new Point2D.Double((b.getX() - a.getX()), (b.getY() - a.getY()));\n\t}", "void mo16690b(T t, T t2);", "private static double angulo(Point2D.Double p2,Point2D.Double p1){\n \t\n return Math.atan2(p2.x - p1.x, p2.y - p1.y);\n }", "@Override\n\tpublic double substract(double a, double b) {\n\t\treturn (a-b);\n\t}", "@Override\n\tdouble dienTich() {\n\t\treturn canhA * canhB;\n\t}", "@Override\r\n\tpublic int call(int a, int b) {\n\t\treturn a-b;\r\n\t}", "static void area(int l, int b) {\r\n\t\t\r\n\t\tint ar = l * b;\r\n\t\tSystem.out.println(ar);\r\n\t}", "Matrix( Vector a, Vector b )\n {\n x = b.times(a.x);\n y = b.times(a.y);\n z = b.times(a.z);\n }", "private static double operate(Double a, Double b, String op){\n\t switch (op){\r\n\t case \"+\": return Double.valueOf(a) + Double.valueOf(b);\r\n\t case \"-\": return Double.valueOf(a) - Double.valueOf(b);\r\n\t case \"*\": return Double.valueOf(a) * Double.valueOf(b);\r\n\t case \"/\": try{\r\n\t return Double.valueOf(a) / Double.valueOf(b);\r\n\t }catch (Exception e){\r\n\t e.getMessage();\r\n\t }\r\n\t default: return -1;\r\n\t }\r\n\t }", "@Test\n\tpublic void testB() {\n\t\tActorWorld world = new ActorWorld();\n\t\tworld.add(new Location(1, 1), alice);\n\t\tint olddir = alice.getDirection();\n\t\talice.act();\n\t\tassertEquals((olddir + Location.RIGHT) % 360, alice.getDirection());\n\t}", "public static boolean Match(Vector a, Vector b){\n return a.axis.length == b.axis.length;\n }", "private static double crossProduct(Point2D a, Point2D b) {\r\n return a.getX() * b.getY() - b.getX() * a.getY();\r\n }", "public static long pair(long a, long b) {\n if (a > -1 || b > -1) {\n //Creating an array of the two inputs for comparison later\n long[] input = {a, b};\n\n //Using Cantors paring function to generate unique number\n long result = (long) (0.5 * (a + b) * (a + b + 1) + b);\n\n /*Calling depair function of the result which allows us to compare\n the results of the depair function with the two inputs of the pair\n function*/\n if (Arrays.equals(depair(result), input)) {\n return result; //Return the result\n } else {\n return -1; //Otherwise return rouge value\n }\n } else {\n return -1; //Otherwise return rouge value\n }\n }", "public static void main(String[] args) throws Exception {\n \n Scanner scn = new Scanner(System.in);\n int n = scn.nextInt();\n \n long[] sp = new long[n+1];\n long[] bl = new long[n+1];\n \n sp[1] = 1;\n bl[1] =1;\n \n \n for(int i = 2; i < n+1; i++){\n sp[i] = sp[i-1] + bl[i-1];\n bl[i] = sp[i-1];\n }\n \n long way = sp[n] + bl[n];\n long bothWay = way*way;\n \n System.out.println(bothWay);\n \n }", "public Linea2D(Punto a, Punto b)\n {\n this.a=a;\n this.b=b;\n }", "public static void main(String[] Args){\r\n\t\tint a=60;\r\n\t\tint b=51;\r\n\t\tint sum= a + b;\r\n\t\tint sub= a-b;\r\n\t\tint mut=a*b;\r\n\t\tdouble div= (double)a/b;\r\n\t\tint rem=a%b;\r\n\t\t// 30 + 20 = 50\r\n\t\tSystem.out.println(a +\" + \" + b+ \" = \" + sum);\r\n\t\tSystem.out.println(a +\" - \" + b+ \" = \" + sub);\r\n\t\tSystem.out.println(a +\" x \" + b+ \" = \" + mut);\r\n\t\tSystem.out.println(a +\" / \" + b+ \" = \" + div);\r\n\t\tSystem.out.println(a +\" % \" + b+ \" = \" + rem);\r\n\t\t\r\n\t\t\t\t\r\n\t}", "static Vec vector(PointDouble a, PointDouble b) {\n return new Vec(b.x - a.x, b.y - a.y);\n }", "public static double angle(Point2D a, Point2D b) {\n\t\t// TODO use dot product instead\n\t\tdouble ang = angle(b) - angle(a);\n\t\tif (ang <= Math.PI)\n\t\t\tang += 2 * Math.PI;\n\t\tif (ang >= Math.PI)\n\t\t\tang -= 2 * Math.PI;\n\t\treturn ang;\n\t}" ]
[ "0.6241819", "0.6241201", "0.58222574", "0.5652164", "0.56333333", "0.5595609", "0.5518459", "0.54991263", "0.5407667", "0.5387036", "0.5374568", "0.535038", "0.5346547", "0.5344117", "0.5291036", "0.5268987", "0.5256814", "0.52421665", "0.5216983", "0.5209914", "0.5207608", "0.5176749", "0.51725876", "0.5165943", "0.5160479", "0.5153179", "0.51479656", "0.5142053", "0.5135563", "0.51326287", "0.5131621", "0.5116427", "0.51094025", "0.51070935", "0.5103814", "0.510261", "0.51007587", "0.50896555", "0.50813466", "0.50753015", "0.5063734", "0.5059607", "0.5046322", "0.50396854", "0.5020908", "0.5013662", "0.50104314", "0.49949408", "0.49875948", "0.49872088", "0.49609947", "0.4953701", "0.494703", "0.49443904", "0.49261194", "0.49241883", "0.49190027", "0.4914219", "0.4888106", "0.4885531", "0.48836783", "0.48777825", "0.48738575", "0.4871904", "0.48712328", "0.4870621", "0.48679695", "0.48678008", "0.48525268", "0.48484105", "0.4845017", "0.48399276", "0.4838696", "0.48315746", "0.48286107", "0.48267394", "0.48256674", "0.4823893", "0.48230493", "0.48202068", "0.48190835", "0.48084757", "0.48048574", "0.4804581", "0.48039117", "0.479998", "0.47989243", "0.47936094", "0.4784293", "0.4782018", "0.47817835", "0.47755513", "0.47753057", "0.47714293", "0.4771261", "0.47608876", "0.47514147", "0.47472847", "0.47450292", "0.4741782", "0.47404784" ]
0.0
-1
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container,Bundle savedInstanceState) { return inflater.inflate(R.layout.fragment_fragment_african, container, false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.wallpager_layout, null);\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_invit_friends, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_zhuye, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_posts, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n return inflater.inflate(R.layout.ilustration_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_sow_drug_cost_per_week, container, false);\n\n db = new DataBaseAdapter(getActivity());\n hc = new HelperClass();\n pop = new FeedSowsFragment();\n\n infltr = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n parent = (LinearLayout) v.findViewById(R.id.layout_for_add);\n tvTotalCost = (TextView) v.findViewById(R.id.totalCost);\n\n getData();\n setData();\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_stream_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_event, container, false);\n\n\n\n\n\n\n\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_feed, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.screen_select_list_student, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_overall, container, false);\n mNamesLayout = (LinearLayout) rootView.findViewById(R.id.fragment_overall_names_layout);\n mOverallView = (OverallView) rootView.findViewById(R.id.fragment_overall_view);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState)\n {\n\n\n view = inflater.inflate(R.layout.fragment_earning_fragmant, container, false);\n ini(view);\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n super.onCreateView(inflater, container, savedInstanceState);\n final View rootview = inflater.inflate(R.layout.activity_email_frag, container, false);\n ConfigInnerElements(rootview);\n return rootview;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\trootView = inflater.inflate(R.layout.fragment_attack_armor, container, false);\r\n\r\n\t\tfindInterfaceElements();\r\n\t\taddRangeSelector();\r\n\t\tupdateHeadings();\r\n\t\tsetListeners();\r\n\r\n\t\tsetFromData();\r\n\r\n\t\treturn rootView;\r\n\t}", "@SuppressLint(\"InflateParams\")\r\n\t@Override\r\n\tpublic View initLayout(LayoutInflater inflater) {\n\t\tView view = inflater.inflate(R.layout.frag_customer_all, null);\r\n\t\treturn view;\r\n\t}", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_fore_cast, container, false);\r\n initView();\r\n mainLayout.setVisibility(View.GONE);\r\n apiInterface = RestClinet.getClient().create(ApiInterface.class);\r\n loadData();\r\n return view;\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_friend, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_detail, container, false);\n image = rootView.findViewById(R.id.fr_image);\n name = rootView.findViewById(R.id.fr_name);\n phoneNumber = rootView.findViewById(R.id.fr_phone_number);\n email = rootView.findViewById(R.id.fr_email);\n street = rootView.findViewById(R.id.fr_street);\n city = rootView.findViewById(R.id.fr_city);\n state = rootView.findViewById(R.id.fr_state);\n zipcode = rootView.findViewById(R.id.fr_zipcode);\n dBrith = rootView.findViewById(R.id.date_brith);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_pm25, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_kkbox_playlist, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_feed_pager, container, false);\n\n// loadData();\n\n findViews(rootView);\n\n setViews();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n layout = (FrameLayout) inflater.inflate(R.layout.fragment_actualites, container, false);\n\n relLayout = (RelativeLayout) layout.findViewById(R.id.relLayoutActus);\n\n initListView();\n getXMLData();\n\n return layout;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.frag_post_prayer_video, container, false);\n setCustomDesign();\n setCustomClickListeners();\n return rootView;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.lf_em4305_fragment, container, false);\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_recordings, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_category, container, false);\n initView(view);\n bindRefreshListener();\n loadParams();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_cm_box_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_layout12, container, false);\n\n iniv();\n\n init();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_details, container, false);\n //return inflater.inflate(R.layout.fragment_details, container, false);\n getIntentValues();\n initViews();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_mem_body_blood, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_qiugouxiaoxi, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_coll_blank, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_attendance_divide, container, false);\n\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.show_program_fragment, parent, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,\n @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.visualization_fragment, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_category_details_page, container, false);\n initializeAll();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View v = inflater.inflate(R.layout.fragemnt_reserve, container, false);\n\n\n\n\n return v;\n }", "protected int getLayoutResId() {\n return R.layout.activity_fragment;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_quizs, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n role = getArguments().getInt(\"role\");\n rootview = inflater.inflate(R.layout.fragment_application, container, false);\n layout = rootview.findViewById(R.id.patentDetails);\n progressBar = rootview.findViewById(R.id.progressBar);\n try {\n run();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return rootview;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tview = inflater.inflate(R.layout.fragment_zhu, null);\n\t\tinitView();\n\t\tinitData();\n\t\treturn view;\n\t}", "@Override\n\t\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)\n\t\t{\n\t\t\tView rootView = inflater.inflate(R.layout.maimfragment, container, false);\n\t\t\treturn rootView;\n\t\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n // Inflate the layout for this fragment\n return inflater.inflate(R.layout.fragment__record__week, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_porishongkhan, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_dashboard, container, false);\n resultsRv = view.findViewById(R.id.db_results_rv);\n resultText = view.findViewById(R.id.db_search_empty);\n progressBar = view.findViewById(R.id.db_progressbar);\n lastVisitText = view.findViewById(R.id.db_last_visit);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(getLayoutId(), container, false);\n init(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_feedback, container, false);\n self = getActivity();\n initUI(view);\n initControlUI();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_service_summery, container, false);\n tvVoiceMS = v.findViewById(R.id.tvVoiceValue);\n tvDataMS = v.findViewById(R.id.tvdataValue);\n tvSMSMS = v.findViewById(R.id.tvSMSValue);\n tvVoiceFL = v.findViewById(R.id.tvVoiceFLValue);\n tvDataBS = v.findViewById(R.id.tvDataBRValue);\n tvTotal = v.findViewById(R.id.tvTotalAccountvalue);\n return v;\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_clan_rank_details, container, false);\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_star_wars_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_lei, container, false);\n\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_quotation, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_wode_ragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n\n\n\n\n\n return inflater.inflate(R.layout.fragment_appoint_list, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n if (rootView == null) {\n rootView = inflater.inflate(R.layout.fragment_ip_info, container, false);\n initView();\n }\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_offer, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_rooms, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\n View view = inflater.inflate(R.layout.fragment_img_eva, container, false);\n\n getSendData();\n\n initView(view);\n\n initData();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_project_collection, container, false);\n ButterKnife.bind(this, view);\n fragment = this;\n initView();\n getCollectionType();\n // getCategoryList();\n initBroadcastReceiver();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_yzm, container, false);\n initView(view);\n return view;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tmainLayout = inflater.inflate(R.layout.fragment_play, container, false);\r\n\t\treturn mainLayout;\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_invite_request, container, false);\n initialiseVariables();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n getLocationPermission();\n return inflater.inflate(R.layout.centrum_fragment, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_habit_type_details, container, false);\n\n habitTitle = rootView.findViewById(R.id.textViewTitle);\n habitReason = rootView.findViewById(R.id.textViewReason);\n habitStartDate = rootView.findViewById(R.id.textViewStartDate);\n habitWeeklyPlan = rootView.findViewById(R.id.textViewWeeklyPlan);\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_information_friends4, container, false);\n\n if (getArguments() != null) {\n FriendsID = getArguments().getString(\"keyFriends\");\n }\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_post_details, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hotel, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_bus_inquiry, container, false);\n initView();\n initData();\n initDialog();\n getDataFromNet();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_weather, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_srgl, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_ground_detail_frgment, container, false);\n init();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_book_appointment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_wheretogo, container, false);\n ids();\n setup();\n click();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n binding = DataBindingUtil\n .inflate(inflater, R.layout.fragment_learning_leaders, container, false);\n init();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_end_game_tab, container, false);\n\n setupWidgets();\n setupTextFields(view);\n setupSpinners(view);\n\n // Inflate the layout for this fragment\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.memoir_fragment, container, false);\n\n getUserIdFromSharedPref();\n configureUI(view);\n configureSortSpinner();\n configureFilterSpinner();\n\n networkConnection = new NetworkConnection();\n new GetAllMemoirTask().execute();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_jadwal, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_delivery_detail, container, false);\n initialise();\n\n\n\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_4, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_product, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_group_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment06_7, container, false);\n initView(view);\n setLegend();\n setXAxis();\n setYAxis();\n setData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_downloadables, container, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.movie_list_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_like, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hall, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_unit_main, container, false);\n TextView mTxvBusinessAassistant = (TextView) view.findViewById(R.id.txv_business_assistant);\n TextView mTxvCardINformation = (TextView) view.findViewById(R.id.txv_card_information);\n RelativeLayout mRelOfficialWebsite = (RelativeLayout) view.findViewById(R.id.rel_official_website);\n RelativeLayout mRelPictureAblum = (RelativeLayout) view.findViewById(R.id.rel_picture_album);\n TextView mTxvQrCodeCard = (TextView) view.findViewById(R.id.txv_qr_code_card);\n TextView mTxvShareCard = (TextView) view.findViewById(R.id.txv_share_card);\n mTxvBusinessAassistant.setOnClickListener(this.mOnClickListener);\n mTxvCardINformation.setOnClickListener(this.mOnClickListener);\n mRelOfficialWebsite.setOnClickListener(this.mOnClickListener);\n mRelPictureAblum.setOnClickListener(this.mOnClickListener);\n mTxvQrCodeCard.setOnClickListener(this.mOnClickListener);\n mTxvShareCard.setOnClickListener(this.mOnClickListener);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_moviespage, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_s, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_overview, container, false);\n\n initOverviewComponents(view);\n registerListeners();\n initTagListener();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_bahan_ajar, container, false);\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n root = (ViewGroup) inflater.inflate(R.layout.money_main, container, false);\n context = getActivity();\n initHeaderView(root);\n initView(root);\n\n getDate();\n initEvetn();\n return root;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_historical_event, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_event_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_video, container, false);\n unbinder = ButterKnife.bind(this, view);\n initView();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n v= inflater.inflate(R.layout.fragment_post_contacts, container, false);\n this.mapping(v);\n return v;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_measures, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_feed, container, false);\n findViews(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_surah_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_data_binded, container, false);\n }" ]
[ "0.6739604", "0.67235583", "0.6721706", "0.6698254", "0.6691869", "0.6687986", "0.66869223", "0.6684548", "0.66766286", "0.6674615", "0.66654444", "0.66654384", "0.6664403", "0.66596216", "0.6653321", "0.6647136", "0.66423255", "0.66388357", "0.6637491", "0.6634193", "0.6625158", "0.66195583", "0.66164845", "0.6608733", "0.6596594", "0.65928894", "0.6585293", "0.65842897", "0.65730995", "0.6571248", "0.6569152", "0.65689117", "0.656853", "0.6566686", "0.65652984", "0.6553419", "0.65525705", "0.65432084", "0.6542382", "0.65411425", "0.6538022", "0.65366334", "0.65355957", "0.6535043", "0.65329415", "0.65311074", "0.65310687", "0.6528645", "0.65277404", "0.6525902", "0.6524516", "0.6524048", "0.65232015", "0.65224624", "0.65185034", "0.65130377", "0.6512968", "0.65122765", "0.65116245", "0.65106046", "0.65103024", "0.6509013", "0.65088093", "0.6508651", "0.6508225", "0.6504662", "0.650149", "0.65011525", "0.6500686", "0.64974767", "0.64935696", "0.6492234", "0.6490034", "0.6487609", "0.6487216", "0.64872116", "0.6486594", "0.64861935", "0.6486018", "0.6484269", "0.648366", "0.6481476", "0.6481086", "0.6480985", "0.6480396", "0.64797544", "0.647696", "0.64758915", "0.6475649", "0.6474114", "0.6474004", "0.6470706", "0.6470275", "0.64702207", "0.6470039", "0.6467449", "0.646602", "0.6462256", "0.64617974", "0.6461681", "0.6461214" ]
0.0
-1
modified by hanchunliang 20131227
@Override public void run() { try { //获取可用性结果 boolean result = ResponseUtil.getResponseCode(createHttpUrl())!= 404; //可用性记录 recordEnum(application,result); } catch (Throwable t){ logger.error("[扫描URL出错] there is an error occurred on Scanning URL or recordEnum..."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void cajas() {\n\t\t\n\t}", "private void strin() {\n\n\t}", "private void poetries() {\n\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "private void kk12() {\n\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n public void func_104112_b() {\n \n }", "protected boolean func_70814_o() { return true; }", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "public void mo38117a() {\n }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public void mo4359a() {\n }", "private void parseData() {\n\t\t\r\n\t}", "public void method_4270() {}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public void mo12628c() {\n }", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\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 }", "public void skystonePos4() {\n }", "public final void mo51373a() {\n }", "@Override\n\tpublic void emprestimo() {\n\n\t}", "protected boolean func_70041_e_() { return false; }", "public void mo55254a() {\n }", "private stendhal() {\n\t}", "public void baocun() {\n\t\t\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "private void m50366E() {\n }", "public void skystonePos6() {\n }", "@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "public abstract void mo70713b();", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "static void feladat9() {\n\t}", "public void mo6081a() {\n }", "public void mo9848a() {\n }", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "public void Tyre() {\n\t\t\r\n\t}", "public void Exterior() {\n\t\t\r\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "public void mo21877s() {\n }", "static void feladat4() {\n\t}", "public void mo12930a() {\n }", "private void getStatus() {\n\t\t\n\t}", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "protected void mo6255a() {\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}", "private zza.zza()\n\t\t{\n\t\t}", "@Override\n\tprotected void parseResult() {\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 func02() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void func02() {\n\t\t\r\n\t}", "private static void iterator() {\n\t\t\r\n\t}", "private void init() {\n\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "public static void listing5_14() {\n }", "public abstract void mo6549b();", "private void searchFunction() {\n\t\t\r\n\t}", "public void stg() {\n\n\t}", "@Override\n\tprotected void prepare() {\n\t\t\n\t}", "public abstract void mo27385c();", "@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}" ]
[ "0.5795901", "0.57376844", "0.5619758", "0.55281776", "0.54902756", "0.5479072", "0.5459511", "0.5449743", "0.5441648", "0.5417895", "0.5417895", "0.53716445", "0.5369456", "0.53643364", "0.5343688", "0.53388715", "0.53313464", "0.53305775", "0.53280395", "0.53125536", "0.53114", "0.52833843", "0.526424", "0.5259753", "0.52362007", "0.5228857", "0.5223882", "0.52093565", "0.5208136", "0.5181862", "0.51751536", "0.5173131", "0.51698124", "0.5166358", "0.5160839", "0.5157344", "0.51558334", "0.51546746", "0.5100621", "0.50920427", "0.5091302", "0.5091302", "0.5091302", "0.5091302", "0.5091302", "0.5091302", "0.5091302", "0.50880176", "0.5084911", "0.50772613", "0.5050693", "0.5040335", "0.50349766", "0.5024173", "0.50194293", "0.50142175", "0.50051504", "0.4992305", "0.49830988", "0.49800086", "0.4975619", "0.49730125", "0.49675682", "0.49627155", "0.49571183", "0.49564034", "0.49549752", "0.4949186", "0.4944251", "0.494266", "0.4936395", "0.49327993", "0.4928355", "0.49276614", "0.49226347", "0.4921166", "0.4920622", "0.49135825", "0.4901826", "0.4901826", "0.489721", "0.48849267", "0.48838508", "0.48838508", "0.48838508", "0.48838508", "0.48838508", "0.4879914", "0.4879914", "0.48728266", "0.48713154", "0.4857831", "0.48491314", "0.48478737", "0.48461026", "0.48373294", "0.48288274", "0.48283803", "0.48212242", "0.48212242", "0.48212242" ]
0.0
-1
Pass the event to ActionBarDrawerToggle If it returns true, then it has handled the nav drawer indicator touch event
@Override public boolean onOptionsItemSelected(MenuItem item) { if (mDrawerToggle.onOptionsItemSelected(item)) { return true; } // Handle your other action bar items... return super.onOptionsItemSelected(item); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Pass the event to ActionBarDrawerToggle, if it returns\n // true, then it has handled the app icon touch event\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n\n // Handle your other action bar items...\n return super.onOptionsItemSelected(item);\n }", "@Override\n\tpublic boolean onTouchEvent(MotionEvent event) {\n\t\tint action = event.getAction();\n\t\tswitch (action) {\n\t\t\tcase MotionEvent.ACTION_DOWN:\n\t\t\t\t//Log.i(\"MainActivity\", \"MainActivity-onTouchEvent action = action down\");\n\t\t\t\tbreak;\n\n\t\t\tcase MotionEvent.ACTION_UP:\n\t\t\t\t//Log.i(\"MainActivity\", \"MainActivity-onTouchEvent action = action up\");\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn super.onTouchEvent(event);\n\t}", "public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n handleEvent_onDrawerOpened(drawerView);\n }", "@Override\n public boolean onTouch(View v, MotionEvent event) {\n if(event.getY() < header.getHeight()\n && listen != null)\n {\n listen.onHeaderClicked( HeaderListView.this );\n return true;\n }\n\n // handle touch normally\n else\n return onTouchEvent(event);\n }", "@Override\r\n\tpublic boolean onTouchEvent(MotionEvent event) {\n\t\tsuper.onTouchEvent(event);\r\n\t\tif (event.getAction() == MotionEvent.ACTION_UP) {\r\n\t\t\ttriggerClick(event.getX(), event.getY());\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "private void toggleListener() {\n actionBarDrawerToggle = new ActionBarDrawerToggle(this, drawerLayout, toolbar,\n R.string.drawerOpened, R.string.drawerClosed) {\n\n @Override\n public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n invalidateOptionsMenu();\n }\n\n @Override\n public void onDrawerClosed(View drawerView) {\n super.onDrawerClosed(drawerView);\n invalidateOptionsMenu();\n }\n };\n drawerLayout.addDrawerListener(actionBarDrawerToggle);\n }", "@SuppressLint(\"ClickableViewAccessibility\")\n @Override\n public boolean onTouchEvent(MotionEvent event) {\n return true;\n }", "@Override\n public boolean onTouchEvent( MotionEvent event )\n {\n if ( gesture_detector.onTouchEvent( event ) )\n {\n return true;\n }\n else\n {\n return super.onTouchEvent( event );\n }\n }", "@Override\n\t\t\tpublic boolean onTouch(View v, MotionEvent event) {\n\t\t\t\treturn DetailTreasureChestActivity.this.detector.onTouchEvent(event);\n\t\t\t}", "public boolean onTouch(View view, MotionEvent event) {\n \tswitch (mViewFlipper.getDisplayedChild()) {\n \tcase 0:\n \t\treturn mMainPage.getGestureDetector().onTouchEvent(event);\n \tcase 1:\n \t\treturn mBrowPage.getGestureDetector().onTouchEvent(event);\n \tcase 2:\n \t\tbreak;\n \t}\n \t\treturn true;\n }", "@Override\n\tpublic boolean onTouchEvent(MotionEvent ev) {\n\t\tLog.i(\"TestEvent\", \"activity->onTouchEvent \" + TouchEventUtil.getTouchAction(ev.getAction()));\n\t\treturn super.onTouchEvent(ev);\n\t}", "@Override\n public boolean onTouchEvent(MotionEvent event) {\n // Pass activity on touch event to the gesture detector.\n gestureDetectorCompat.onTouchEvent(event);\n // Return true to tell android OS that event has been consumed, do not pass it to other event listeners.\n return true;\n }", "public void onDrawerClosed(View view) {\n }", "@SuppressLint(\"ClickableViewAccessibility\")\n @Override\n public boolean onTouchEvent(MotionEvent event) {\n return gestureHandler.onTouchEvent(event);\n }", "@Override\n public boolean onTouchEvent(MotionEvent event) {\n if (MotionEvent.ACTION_OUTSIDE == event.getAction()) {\n return true;\n }\n\n // Delegate everything else to Activity.\n return super.onTouchEvent(event);\n }", "@Override\n public boolean onSingleTapConfirmed(MotionEvent event) {\n return PickNavigateController.this.onSingleTapHandler(event);\n }", "@Override\r\n public boolean onGenericMotionEvent(MotionEvent event) {\r\n if(loading) {\r\n //open up the general menu\r\n setContentView(menuCards.get(0).getView());\r\n loading = false;\r\n return true;\r\n }\r\n else{\r\n if (mGestureDetector != null) {\r\n return mGestureDetector.onMotionEvent(event);\r\n }\r\n return false;\r\n }\r\n }", "@Override\r\n public boolean onTouch(View v, MotionEvent event) {\n\treturn mGestureDetector.onTouchEvent(event);\r\n }", "@Override\n public void onDrawerStateChanged(int newState) {\n }", "@Override\n public void onDrawerStateChanged(int newState) {\n }", "@Override\n public void onDrawerStateChanged(int newState) {\n }", "@Override\n public void onDrawerStateChanged(int newState) {\n }", "@Override\n public void onDrawerStateChanged(int newState) {\n }", "@Override\r\n\tpublic boolean onTouchEvent(final MotionEvent e) {\n\t\t\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n // Handle your other action bar items...\n return super.onOptionsItemSelected(item);\n }", "void toggled(ToggledEvent event);", "public void onDrawerOpened(View drawerView) {\n\n }", "public boolean onDown(MotionEvent e) { return true; }", "@Override\n public boolean onTouchEvent(MotionEvent event) {\n gestureDetectorCompat.onTouchEvent(event);\n // Return true to tell android OS that event has been consumed, do not pass it to other event list\n // eners.\n return true;\n }", "@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tmCallbacks.openDrawerExhi();\r\n\t\t\t}", "@Override\n public boolean onTouchEvent(MotionEvent event)\n {\n return gestureDetector.onTouchEvent(event);\n }", "@Override\r\n\t\t\tpublic boolean onTouch(View arg0, MotionEvent event) {\n\t\t\t\tint action = event.getAction();\r\n\t\t\t\tswitch (action) {\r\n\t\t\t\tcase MotionEvent.ACTION_DOWN:\r\n\t\t\t\t\tmLastDownY = (int) event.getY();\r\n\t\t\t\t\tSystem.err.println(\"ACTION_DOWN=\" + mLastDownY);\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t\t\r\n\t\t\t\tcase MotionEvent.ACTION_UP:\r\n\t\t\t\t\tmCurryY = (int) event.getY();\r\n\t\t\t\t\tmDelY = mCurryY - mLastDownY;\r\n\t\t\t\t\tif (mDelY > 0) {\r\n\t\t\t\t\t\tpullDoorView.setVisibility(View.VISIBLE);\r\n\t\t\t\t\t\tstartBounceAnim(pullDoorView.getmScreenHeigh(), -pullDoorView.getmScreenHeigh(), 1000);\r\n\t\t\t\t\t\tpullDoorView.setmCloseFlag(false);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\treturn false;\r\n\t\t\t}", "@Override\n\tpublic boolean onTouchEvent(MotionEvent event) {\n\n\t\treturn super.onTouchEvent(event);\n\t}", "@Override\n public boolean onTouchEvent(MotionEvent ev) {\n return mDetector.onTouchEvent(ev) || super.onTouchEvent(ev);\n }", "@Override\n public boolean onTouchEvent(MotionEvent event) {\n return mHandleView.dispatchTouchEvent(event);\n }", "@Override\r\n public boolean onTouchEvent(MotionEvent event) {\n return super.onTouchEvent(event);\r\n }", "@Override\r\n\t\tpublic boolean onTouchEvent(MotionEvent event) {\n\r\n\t\t\treturn true;\r\n\t\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n if (mDrawerToggle.onOptionsItemSelected(item)) {\r\n return true;\r\n }\r\n // Handle your other action bar items...\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override public boolean onTouchEvent(MotionEvent event) {\n super.onTouchEvent(event);\n boolean clickCaptured = processTouchEvent(event);\n boolean scrollCaptured = scroller != null && scroller.onTouchEvent(event);\n boolean singleTapCaptured = getGestureDetectorCompat().onTouchEvent(event);\n return clickCaptured || scrollCaptured || singleTapCaptured;\n }", "@Override\n\tpublic boolean dispatchTouchEvent(MotionEvent ev) {\n\t\tLog.i(\"TestEvent\", \"activity->dispatchTouchEvent \" + TouchEventUtil.getTouchAction(ev.getAction()));\n\t\treturn super.dispatchTouchEvent(ev);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (actionBarDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (actionBarDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onTouch(View v, MotionEvent event) {\n\t\t\r\n\t\treturn this.mGestureDetector.onTouchEvent( event );\r\n\t}", "@Override\n public boolean onTouchEvent(MotionEvent e) {\n return gestureDetector.onTouchEvent(e);\n }", "@Override\n public boolean dispatchTouchEvent(MotionEvent event){\n checkGestureForSwipe(event);\n return super.dispatchTouchEvent(event);\n }", "@Override\n public void onDrawerOpened(View drawerView) {\n }", "@Override\n\tpublic boolean dispatchTouchEvent(MotionEvent ev) {\n\t\tsuper.dispatchTouchEvent(ev);\n\t\treturn gdDetector.onTouchEvent(ev);\n\t}", "@Override\n\tpublic boolean onTouch(View view, MotionEvent event) {\n\t\treturn this._gestureDetector.onTouchEvent(event);\n\t}", "@Override\n\t public boolean onOptionsItemSelected(MenuItem item) {\n\t if (mDrawerToggle.onOptionsItemSelected(item)) {\n\t return true;\n\t }\n\t else{\n\t return super.onOptionsItemSelected(item);\n\t }\n\t }", "public boolean onTouchEvent(MotionEvent event) {\n\tif(state==MAIN_MENU || state==RESUME)\n\t{ags.onTouchEvent(event);}\n\t\n\telse if(state==GAME_SCREEN){\n\t//\tat= new AndroidTouch(ag);\n\t\tag.onTouchEvent(event);\n\t}\n\t\n\t\n\treturn super.onTouchEvent(event);\n\t\n}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (drawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (drawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item)\n {\n if (mDrawerToggle.onOptionsItemSelected(item))\n {\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public void onDrawerOpened(View drawerView) {\n }", "public void onDrawerOpened(View drawerView) {\n menuvalue = 1;\n getSupportActionBar().setHomeAsUpIndicator(R.mipmap.back_arrow);\n }", "public boolean onTouchEvent(MotionEvent event) {\n if (gestureDetector.onTouchEvent(event))\n return true;\n else\n return false;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n // Handle your other action bar items...\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n // Handle your other action bar items...\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n // Handle your other action bar items...\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n // Handle your other action bar items...\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n // Handle your other action bar items...\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n // Handle your other action bar items...\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n // Handle your other action bar items...\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\tpublic boolean onTouchEvent(MotionEvent event) {\n\t\treturn this.gdDetector.onTouchEvent(event);\n\t}", "@Override\r\n\tpublic boolean dispatchTouchEvent(MotionEvent ev) {\n\t\tmGestureDetector.onTouchEvent(ev);\r\n\t\treturn super.dispatchTouchEvent(ev);\r\n\t}", "@Override\n public boolean onSingleTapConfirmed(MotionEvent e) {\n return true;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n \tLog.d(\"MainActivity\", \"onOptionsItemSelected\");\r\n if (mDrawerToggle.onOptionsItemSelected(item)) {\r\n \tLog.d(\"MainActivity\", \"======\");\r\n// \treturn true;\r\n }\r\n debugMemory(\"title:\"+item.getTitle()+\"--itemId:\"+item.getItemId()+\" android.id\"+android.R.id.home);\r\n \r\n switch (item.getItemId()) {\r\n\t\tcase R.id.action_search:\r\n\t\t\tLog.d(\"MainActivity\", \"===action_search==\");\r\n\t\t\tgetActionBar().setIcon(R.drawable.search_white);\r\n\t\t\tmDrawerToggle.setDrawerIndicatorEnabled(false);\r\n\t\t\tbreak;\r\n\t\tcase R.id.action_alarm:\r\n\t\t\tmDrawerToggle.setDrawerIndicatorEnabled(false);\r\n\t\t\tLog.d(\"MainActivity\", \"===action_alarm==\");\r\n\t\t\tbreak;\r\n\t\tcase android.R.id.home:\r\n\t\t\tif (mDrawerToggle.isDrawerIndicatorEnabled() == false) {\r\n\t\t\t\tgetActionBar().setIcon(null);\r\n\t\t\t\tmDrawerToggle.setDrawerIndicatorEnabled(true);\r\n\t\t\t\tdebugMemory(\"android.R.id.home\");\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\r\n \r\n // Handle your other action bar items...\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (drawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n // Handle your other action bar items...\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (drawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n // Handle your other action bar items...\n\n return super.onOptionsItemSelected(item);\n }", "void onNavigationDrawerItemSelected(int position);", "void onNavigationDrawerItemSelected(int position);", "@Override\r\n\tpublic boolean onTouchEvent(MotionEvent event) {\n\t\tthis.mGestureDetector.onTouchEvent( event );\r\n\t\t\r\n\t\t\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onDown(MotionEvent e) {\n return true;\n }", "@Override\n public boolean dispatchTouchEvent(MotionEvent event)\n {\n \tswitch(event.getAction())\n\t\t{\n\t\tcase MotionEvent.ACTION_DOWN:\n\t\t\tgesture_xa=event.getX();\n\t\t\tgesture_ya=event.getY();\n\t\t\tbreak;\n\t\tcase MotionEvent.ACTION_UP:\n\t\t\tgesture_xe=event.getX();\n\t\t\tgesture_ye=event.getY();\n\t\t\t//Toast.makeText(SpecialsActivity.this, String.valueOf(gesture_xe-gesture_xa)+\"/\"+String.valueOf(gesture_ye-gesture_ya)+\"/\"+String.valueOf(displayWidth/2)+\"/\"+String.valueOf(displayHeight*0.1), Toast.LENGTH_SHORT).show();\n\t\t\tif(Math.abs(gesture_ye-gesture_ya) < displayHeight*0.1)\n\t\t\t{\n\t\t\t\tif( gesture_xe-gesture_xa > displayWidth/2 )\n\t\t\t\t{\n\t\t\t\t\t// wipe from left to right\n\t\t\t\t\tIntent intent = new Intent(Callbacksplit.getMainActivity(), ConfigActivity.class);\n\t\t\t\t\tfinish();\n\t\t\t\t\tstartActivity(intent);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\telse if( -(gesture_xe-gesture_xa) > displayWidth/2 )\n\t\t\t\t{\n\t\t\t\t\t// wipe from right to left\n\t\t\t\t\tfinish();\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n \tsuper.dispatchTouchEvent(event);\n \treturn true;\n }", "public void onDrawerClosed(View view) {\n super.onDrawerClosed(view);\n // Do whatever you want here\n }", "@Override\n public boolean onTouch(View view, MotionEvent motionEvent) {\n return true;\n }", "@Override\n public boolean onTouch(View view, MotionEvent motionEvent) {\n return true;\n }", "@Override\n public void onDrawerOpened(View drawerView) {\n\n super.onDrawerOpened(drawerView);\n }", "@Override\n public void onDrawerOpened(View drawerView) {\n\n super.onDrawerOpened(drawerView);\n }", "@Override\n public void onDrawerOpened(View drawerView) {\n\n super.onDrawerOpened(drawerView);\n }", "@Override\n\t\t\tpublic void onTouch(MotionEvent arg0) {\n\t\t\t\tnavigation.setVisibility(View.GONE);\n\t\t\t}", "@Override\n public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n }", "@Override\n public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n }", "@Override\n public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n }", "@Override\n public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n }", "@Override\n public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n }", "@Override\n public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n }", "@Override\n public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n }", "@Override\n public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n }", "@Override\n public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n }", "@Override\n public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n }", "@Override\n public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n }", "@Override\n\t\t\tpublic void onDrawerOpened() {\n\t\t\t\tshowDown();\n\t\t\t}", "public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n }", "public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n }", "public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n }", "public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n }", "@Override\n\tpublic boolean onTouchEvent(MotionEvent ev) {\n\t\tint action = ev.getAction();\n\t\tswitch (action) {\n\t\tcase MotionEvent.ACTION_UP:\n\t\t\t//content隐藏在左边的宽度\n\t\t\tint scrollX = getScrollX();\n\t\t\tif(scrollX>=mMenuWidth/2){\n\t\t\t\tthis.smoothScrollTo(mMenuWidth, 0);\n\t\t\t\tisOpen = false;\n\t\t\t}else{\n\t\t\t\tthis.smoothScrollTo(0, 0);\n\t\t\t\tisOpen = true;\n\t\t\t}\n\t\t\treturn true;\n\t\t\t\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\treturn super.onTouchEvent(ev);\n\t}" ]
[ "0.6615875", "0.6346448", "0.6306857", "0.62861", "0.6216746", "0.6168509", "0.61681294", "0.61631215", "0.614391", "0.6106668", "0.6101666", "0.60972226", "0.60957307", "0.6091946", "0.60773927", "0.60588026", "0.60506415", "0.6034071", "0.6032598", "0.6032598", "0.6032598", "0.6032598", "0.6030892", "0.6015854", "0.6009945", "0.6007706", "0.6000777", "0.59936017", "0.59920174", "0.5981844", "0.59772617", "0.59651697", "0.596424", "0.59562445", "0.5956149", "0.59488845", "0.5942128", "0.5940228", "0.5934099", "0.5932119", "0.5918035", "0.5918035", "0.5916539", "0.5910319", "0.59010345", "0.58949846", "0.5894884", "0.5891902", "0.58868855", "0.5877685", "0.58697", "0.58697", "0.5869328", "0.58622515", "0.5858404", "0.58554816", "0.5843218", "0.5843218", "0.5843218", "0.5843218", "0.5843218", "0.5843218", "0.5843218", "0.58411235", "0.58407426", "0.5839302", "0.5837012", "0.5832989", "0.5830289", "0.5830289", "0.5826685", "0.5826685", "0.58196694", "0.58186734", "0.5813729", "0.5812752", "0.5812558", "0.5812558", "0.5809241", "0.5809241", "0.5809241", "0.58054936", "0.58030975", "0.58030975", "0.58030975", "0.58030975", "0.58030975", "0.58030975", "0.58030975", "0.58030975", "0.58030975", "0.58030975", "0.58030975", "0.579853", "0.5796476", "0.5796476", "0.5796476", "0.5796476", "0.5791889" ]
0.58926386
48
link to the model which will be displayed. View's construction which recieves the model as a parameter.
public View(Model m) { super(); setBackground(Color.black); // Setting background color. this.model = m; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@RequestMapping(method=RequestMethod.GET, path=\"/l\")\n\tpublic String goToRssView(Model model){\n\t\treturn \"bean/rss\";\n\t}", "@RequestMapping(\"/reply_view\")\n\tpublic String reply_view(HttpServletRequest request, Model model) {\n\t\tBDto dto = dao.reply_view(request.getParameter(\"bId\"));\n\t\tmodel.addAttribute(\"reply_view\", dto);\n\t\treturn \"reply_view\";\n\t}", "void updateViewFromModel();", "@Override\n public void onClick(View view) {\n final Intent intent = new Intent(context, ArticleViewActivity.class);\n intent.putExtra(\"link\", model.link);\n context.startActivity(intent);\n }", "public LinkPanel(String id, String Label, IModel<I> model)\n {\n super(id, model);\n label = Label;\n }", "@RequestMapping(value = \"view/{menuId}\", method = RequestMethod.GET)\n public String viewMenu(Model model, @PathVariable int menuId) {\n\n\n\n Menu menu = menuDao.findOne(menuId);\n model.addAttribute(\"title\", menu.getName());\n model.addAttribute(\"cheeses\", menu.getCheeses());\n model.addAttribute(\"menuId\", menu.getId());\n\n\n\n return \"menu/view\";\n }", "protected abstract void populateView(View v, T model);", "public LinkDisplay()\n\t{\n\t\treturn;\n\t}", "@RequestMapping(\"/showForm\")\n\tpublic String showForm(final Model model)\n\t{\n\t\tfinal Student theStudent = new Student();\n\n\t\t// --- add student object to the model ---\n\t\tmodel.addAttribute(\"student\", theStudent);\n\n\t\treturn \"student-form\";\n\t}", "void updateModelFromView();", "@RequestMapping(\"showForm\")\n\tpublic String showForm( Model theModel) {\n\t\t\n\t\t//create a student\n\t\tStudent theStudent = new Student();\n\t\t\n\t\t//add student to the model\n\t\ttheModel.addAttribute(\"student\", theStudent);\n\t\t\n\t\treturn \"student-form\";\n\t}", "Model getModel();", "Model getModel();", "Model getModel();", "public Object getModel();", "@RequestMapping(value = \"/createentry\", method = RequestMethod.GET)\n\tpublic String navigateCreateEntry(Model model){\n\t\tmodel.addAttribute(\"entry\", new Entry());\t\n\t\treturn \"entry/createEntry\";\n\t}", "public abstract URI getModelURI();", "@RequestMapping(\"viewPublisher/{id}\")\n\tpublic String viewPublisher(@PathVariable long id, Model model) {\n\t\t/*model.addAttribute(\"publisher\", publisherDao.findById(id));\n\t\treturn \"viewPublisher\";*/\n\t\t\n\t\tList<Publisher> list = new ArrayList<>();\n\t\tlist.add(publisherDao.findById(id));\n\t\tmodel.addAttribute(\"publisherItems\", list);\n\t\treturn \"publisherList\";\n\t}", "@RequestMapping(value = \"/{objectid}\", method = RequestMethod.GET)\n public String object(@PathVariable String objectid, Model model) {\n DataObject object = dataObjectRepository.findOne(Long.valueOf(objectid));\n return \"redirect:/manage/\" + object.getClass().getSimpleName().toLowerCase() + \"/\" + objectid;\n// model.addAttribute(\"object\", object);\n// return \"object/object\";\n }", "public void setModel(Model m){\r\n model = m;\r\n }", "@RequestMapping(\"/admin/viewClientUserSites\")\r\n\tpublic String viewClientUserSite(Model model){\n\t\tmodel.addAttribute(\"formObject\",new ClientUserSite());\r\n\t\tmakeUIData(entityManager,model,\"ClientUserSite\");\r\n\t\treturn DefaultService.ADMIN+\"viewClientUserSites\";\r\n\t}", "@RequestMapping(\"/showForm\")\n\tpublic String showForm(Model theModel) {\n\t\tCustomer customer = new Customer();\n\n\t\t// add Customer object to the model\n\t\ttheModel.addAttribute(\"customer\", customer);\n\t\t\n\t\treturn \"customer-form\";\n\t}", "java.lang.String getModel();", "public void setModel(Model model) {\n this.model = model;\n }", "public void setModel(Model model) {\n this.model = model;\n }", "public void setModel(Model model) {\n this.model = model;\n }", "public View(final IModel model) throws HeadlessException {\r\n\t\tthis.model=model;\r\n\t\tthis.viewFrame = new ViewFrame(model, this);\r\n\t\tSwingUtilities.invokeLater(this);\r\n\t\tthis.viewFrame.setVisible(true);\r\n\t}", "public void setModel(String model)\n {\n this.model = model;\n }", "public void setModel(String model) {\r\n this.model = model;\r\n }", "public Model getModel () { return _model; }", "@GetMapping(\"/viewContact\")\r\n\tpublic String handleViewContactsLink(Model model) {\r\n\t\tList<Contact> contactList = service.getAllContacts();\r\n\t\tmodel.addAttribute(\"contact\", contactList);\r\n\t\treturn \"viewContact\";\r\n\t}", "public TopView(TopModel topModel) {\r\n this.topModel = topModel;\r\n }", "public static void displaySingleModel(String model) {\n\t\tSystem.out.println(model);\n\t}", "public void setModel(String model) {\n this.model = model;\n }", "public ConnectFourController(ConnectFourModelInterface model){\n this.model = model;\n view = new ConnectFourView(model, this);\n }", "@RequestMapping(value = \"/newsAdmin\", method = RequestMethod.GET)\n public String loadFormPage(final Model model) {\n LOGGER.log(Level.INFO, \"in loadFormPage\");\n model.addAttribute(NEWS_ARTICLE, new NewsArticle());\n return NEWS_ADMIN_PAGE;\n }", "public String getModel();", "A getModel();", "@Override\r\n\tpublic LinkMan getModel() {\n\t\treturn linkman;\r\n\t}", "@RequestMapping(method=RequestMethod.GET, path=\"/p\")\n\tpublic String goToContentNegotiation(Model model){\n\t\t\n\t\tList<String> books = new ArrayList<>();\n\t\tbooks.add(\"Las mil y una noches\");\n\t\tbooks.add(\"Divina Comedia\");\n\t\tbooks.add(\"Don Quijote de la Mancha\");\n\t\tbooks.add(\"Cien años de soledad\");\n\t\tbooks.add(\"Odisea\");\n\t\tmodel.addAttribute(books);\n\t\t\n\t\treturn \"simple/contentNegotiationView\";\n\t}", "public WindowHandle( ModelControllable model, ViewControllable view ) {\r\n\r\n this.model = model;\r\n this.view = view;\r\n }", "@RequestMapping(value = \"/view\", method = RequestMethod.GET)\n\tpublic ModelAndView view(HttpServletRequest req, HttpServletResponse resp, Model model) {\n\t\tModelAndView mav = new ModelAndView(\"adminHome\");\n\t\tmav.addObject(\"allUsers\", userDao.findAllUsers());\n\t\tmav.addObject(\"allItems\", itemDao.findAllItems());\n\t\tmav.addObject(\"allTransactions\", transactionDao.findAllTransactions());\n\t\tmav.addObject(\"allFeedback\", feedbackDao.findAllFeedback());\n\t\tmav.addObject(\"allFacts\", factDao.findAllFacts());\n\t\tmodel.addAttribute(\"fact\", factDao.generateRandomFact());\n\t\tmodel.addAttribute(\"pageTitle\",\"Admin Home\");\n\t\treturn mav;\n\t}", "void render(IViewModel model);", "@Override\n\tpublic void setModel(Object o) {\n\t\t\n\t}", "ModelData getModel();", "public TopAbstractView(TopModel topModel) {\r\n this.topModel = topModel;\r\n }", "@Override\r\n\tpublic String getViewIdentifier() {\n\t\treturn ClassUtils.getUrl(this);\r\n\t}", "@Override\r\n\tpublic void setModel() {\n\t}", "public void createOnClick(MainViewModel model){\n this.mainViewModel = model;\n }", "void setModel(Model model);", "@RequestMapping(value = \"/enrollment.html\", method = RequestMethod.GET)\n public String displayForm(Model model) {\n model.addAttribute(\"fixture\", new FixtureModel());\n return \"fixtures/enrollment\";\n }", "@Override\n\tpublic String getViewIdentifier() {\n\t\treturn ClassUtils.getUrl(this);\n\t}", "@Override\n\tpublic String getViewIdentifier() {\n\t\treturn ClassUtils.getUrl(this);\n\t}", "public ModelBean provideModel();", "@GetMapping\r\n\tpublic String viewForm(Model model) {\n\t\tif (model == null) {\r\n\t\t\treturn \"error\";\r\n\t\t} else {\r\n\t\t\treturn \"bikelistsaveform\";\r\n\t\t}\r\n\t\t\r\n\t}", "@RequestMapping(value = \"/friendlink_view.jspx\", method = RequestMethod.GET)\r\n\tpublic void view(Integer id, HttpServletRequest request, HttpServletResponse response, ModelMap model) {\r\n\t\tif (id != null) {\r\n\t\t\tcmsFriendlinkMng.updateViews(id);\r\n\t\t\tResponseUtils.renderJson(response, \"true\");\r\n\t\t} else {\r\n\t\t\tResponseUtils.renderJson(response, \"false\");\r\n\t\t}\r\n\t}", "public void leseViewAusModel() {\r\n Model model = Model.getInstanz();\r\n\r\n ATab aktuellerTab = model.getRoot();\r\n\r\n while (aktuellerTab.getNext() != null) {\r\n ArrayList<ATab> next = aktuellerTab.getNext();\r\n\r\n for (int j = 0; j < next.size(); j++) {\r\n if (next.get(j) instanceof Inhalt) {\r\n\r\n Inhalt tmpNext = (Inhalt) next.get(j);\r\n\r\n setInhalt(tmpNext.getName(), tmpNext.getInhalt());\r\n }\r\n }\r\n\r\n for (int j = 0; j < next.size(); j++) {\r\n\r\n if (next.get(j) instanceof Tab || next.get(j) instanceof Inhalt) {\r\n aktuellerTab = next.get(j);\r\n }\r\n }\r\n }\r\n }", "@GetMapping(path = \"/view/{id}\")\n public String showById(@PathVariable(\"id\") Long id, Model model) {\n log.info(\"READ itinerary by ID : {}\", id);\n \n Itinerary itinerary = itineraryService.findById(id);\n \n if (Objects.isNull(itinerary)) {\n log.info(\"Any sector found with ID : {}\", id);\n return \"redirect:/itineraries/view\";\n }\n \n TreeSet<Comment> comments = new TreeSet<>(itinerary.getComments());\n \n model.addAttribute(\"itinerary\", itinerary);\n model.addAttribute(\"comment\", new Comment());\n model.addAttribute(\"comments\", comments);\n \n return VIEW;\n }", "String getT_modelUri();", "@RequestMapping(\"/cabaretier/toevoegen\")\n public String showNewProductPage(Model model) {\n Cabaretier cabaretier = new Cabaretier();\n model.addAttribute(\"cabaretier\", cabaretier);\n\n return \"CabaretierToevoegen\";\n }", "@RequestMapping(\"/viewRoute\") \n\t\t public String viewShip(Model m){ \n\t\t List<Route> list=dao.getRoute(); \n\t\t m.addAttribute(\"list\",list); \n\t\t return \"viewRoute\"; \n\t\t }", "@RequestMapping(\"mall/mall_view.do\")\n\tpublic String mall_view(\n\t\t\tHttpServletRequest request,\n\t\t\tModel model\n\t\t\t) throws UnknownHostException {\n\t\tMap<String, Object> map = topInfo(request);\n\t\tint no = (int) map.get(\"no\");\n\t\tString search_option = (String) map.get(\"search_option\");\n\t\tString search_data = (String) map.get(\"search_data\");\n\t\t\n\t\tProductDTO dto = dao.getView(no);\n\t\t\n\t\tmodel.addAttribute(\"menu_gubun\", \"member_view\");\n\t\tmodel.addAttribute(\"dto\", dto);\n\t\treturn \"shop/mall/mall_view\";\n\t}", "public VisualView(Model model, JFrame frame, Controller controller) {\n\n this.model = model;\n this.frame = frame;\n this.controller = controller;\n this.localRoutes = new ArrayList<>();\n\n this.animate = new JButton();\n this.animate.addActionListener(this);\n this.animate.setText(\"Animate\");\n this.animate.setAlignmentY(Component.CENTER_ALIGNMENT);\n this.add(this.animate);\n\n this.back = new JButton();\n this.back.addActionListener(this);\n this.back.setText(\"Go Back\");\n this.back.setAlignmentY(Component.CENTER_ALIGNMENT);\n this.add(this.back);\n }", "@RequestMapping(value = \"\", method = RequestMethod.GET)\n\tpublic String viewList(Model model) {\n\t\t;\n\t\t/* return list of all genres for the list */\n\t\tList<Comic> comics = comicService.find();\n\t\t\n\t\t//contenuti dei selectbox\n\t\tmodel.addAttribute(\"comics\", comics);\n\t\tmodel.addAttribute(\"authors\", authorService.restart().find());\n\t\tmodel.addAttribute(\"genres\", genreService.restart().find());\n\t\t\n\t\t//chiama la pagina di listaggio\n\t\treturn \"admin/comic/comic\";\n\t}", "public void initView() {\n\t\t view.initView(model);\t \n\t }", "@GetMapping\n public String displayUser(Model model) {\n User newUser = new User(\"Sven Svennis\",\"Svennegatan 2\", new ArrayList<Loan>());\n userRepository.save(newUser);\n\n //TODO this is where we need to fetch the current user instead!\n User user = userRepository.getOne(1l);\n\n model.addAttribute(\"user\", user);\n\n return \"displayUser\";\n }", "@RequestMapping(\"/user/{id}/view\")\n public String viewUser(@PathVariable String id, ModelMap theModel) {\n\n User theUserService = userService.findById(Integer.valueOf(id));\n Set<Sensor> sensors = theUserService.getSensor();\n\n theModel.addAttribute(\"theSensors\", sensors);\n return \"sensor/viewUserSensor\";\n }", "public abstract M getModel();", "@Override\n\tpublic void setModel(String model) {\n\t\tthis.model = model;\n\t}", "public Model getModel(){\r\n return model;\r\n }", "public void setModel(Model model) {\n petal_model = model;\n }", "@RequestMapping(value=\"viewPeson\")\r\n\tpublic ModelAndView viewPersons(Model model) {\n\t\tModelAndView mav = new ModelAndView();\r\n\t\tmav.setViewName(\"personList\");\r\n\t\tmav.addObject(\"persons\", Person.createPersons());\r\n\t\tmav.addObject(\"Pagetitle\",\"viewperson page...\");\r\n\t\t//return new ModelAndView(\"personList\", persons);\r\n\t\treturn mav;\r\n\t}", "@RequestMapping(method=RequestMethod.GET, path=\"/k\")\n\tpublic String goToXmlViewRsolverRedirect(Model model){\n\t\treturn \"bean/defined_xml_redirect\";\n\t}", "@RequestMapping(\"/result\")\n\tpublic String display(Model model, HttpSession session) {\n\t\tString name = (String) session.getAttribute(\"name\");\n\t\tString location = (String) session.getAttribute(\"location\");\n\t\tString language = (String) session.getAttribute(\"language\");\n\t\tString comment = (String) session.getAttribute(\"comment\");\n\t\t\n\t\t// add attributes to model\n\t\tmodel.addAttribute(\"name\", name);\n\t\tmodel.addAttribute(\"location\", location);\n\t\tmodel.addAttribute(\"language\", language);\n\t\tmodel.addAttribute(\"comment\", comment);\n\t\tif (language.equals(\"Java\")) {\n\t\t\treturn \"java.jsp\";\n\t\t} else {\n\t\treturn \"result.jsp\";\n\t\t}\n\t}", "public Controlador(Vista view, Modelo model){\r\n \r\n //Se igualan las propiedades\r\n this.view = view;\r\n this.model = model;\r\n this.view.btnGuardar.addActionListener(this);\r\n \r\n //se iguala el modelo de la tabla\r\n table = new DefaultTableModel();\r\n view.tablaResultado.setModel(table);\r\n \r\n //nombre para la columna de la tabla\r\n table.addColumn(\"Listado\"); \r\n \r\n }", "@RequestMapping(\"/{invoice}\")\n public String viewInvoice(@PathVariable Invoice invoice, Model model){\n model.addAttribute(\"invoice\", invoice);\n return \"invoice/invoice\";\n }", "private String prepareAndReturnEditPage(Model model) {\n this.populateDentistVisitFormModel(model);\n return \"editForm\";\n }", "@RequestMapping(value = \"/\", method = RequestMethod.GET)\n\tpublic String home(Model model) {\n\t\tlogger.info(\"Welcome home!\");\n\t\tmodel.addAttribute(\"controllerMessage\",\n\t\t\t\t\"This is the message from the controller!\");\n\t\t\n\t\tAuthor author = new Author();\n\t\tauthor.setFirstName(\"fisseha\");\n\t\tauthor.setLastName(\"chari\");\n\t\treturn \"home\";\n\t}", "@Override\n\tpublic String getModel() {\n\t\treturn model;\n\t}", "@GetMapping(value = \"/showForm\")\n\tpublic String showForm(Model model) {\n\t\tmodel.addAttribute(\"person\", new Person());\n\n\t\t// In order to test 500 internal server error\n\t\t// int g = 7/0;\n\n\t\treturn FORM_VIEW;\n\t}", "@RequestMapping(value = \"/Contacto\", method = RequestMethod.GET)\n\tpublic String Contacto( Model model) {\n\t\t\n\t\treturn \"Dependencia/contacto\";\n\t}", "@RequestMapping(\"/\")\n\tpublic String showHome(Model model) {\n\t\tList<Employee> list=employeeService.fetchAllEmployee();\n\t\t//to pass data from ctrl to jsp we use Model Interface\n\t\tmodel.addAttribute(\"list\",list);\n\t\treturn \"index\"; \n\t}", "@RequestMapping(value = \"/download\", method = RequestMethod.GET)\n public PdfView download(final Model model) {\n final PdfView view = new PdfView();\n return view;\n }", "public void modelShow() {\n\t\tSystem.out.println(\"秀衣服\");\n\t}", "void setModel(Model m);", "public void setModel(OntModel model) {\n\t\tthis.model = model;\n\t}", "@RequestMapping(value = \"/displayUserForm\", method = RequestMethod.GET)\n public String displayUserForm(Model model) {\n User user = new User();\n model.addAttribute(\"user\", user);\n return \"admin/addUser\";\n }", "@Override\n public void modelView(Model m) {\n Aluno a = (Aluno) m;\n this.jCurso.setSelectedItem(a.getCurso());\n this.jAno.setSelectedItem(a.getAno());;\n this.jNome.setText(a.getNome());\n this.jIdade.setText(a.getIdade());\n }", "@Override\n\tpublic String getModel() {\n\t\treturn \"cool model\";\n\t}", "public EAEditorView(ReadOnlyEAOperations model) {\n\n super();\n setTitle(\"The Easy Animator\");\n\n // check for null\n if (model == null) {\n throw new IllegalArgumentException(\"Model can't be null\");\n }\n this.model = model;\n\n // initialize the main panel\n constructMainPanel();\n constructAnimationPanel();\n generateLabelPanel();\n generateButtonPanel();\n constructPopup();\n createOKButtons();\n\n this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n this.pack();\n }", "public BuilderView(Model model, JPanel parent, BuilderApplication app) {\n\t\tsuper();\n\t\tthis.model = model;\n\t\tthis.cardLayoutPanel = parent;\n\t\tthis.bgColor = new Color(178, 34, 34);\n\t\tthis.app = app;\n\t\tthis.labelFont = new Font(\"Times New Roman\", Font.BOLD, 18);\n\t\tsetBackground(new Color(102,255,102));\n\t\tinitialize();\n\t}", "M getModel();", "@RequestMapping(value=\"admin/reports/reservationdetail\", method=RequestMethod.GET)\n public String openReservationDetailReport(Model model){\n return \"admin/roomreservationdetail\";\n }", "void view();", "protected Object resolveModel(Object model) {\n\t\treturn model;\n\t}", "@RequestMapping(\"/showForm\")\n\tpublic String showForm(Model theModel) {\n\t\tRegister theRegister = new Register();\n\t\t\n\t // add register object to the model\n\t\ttheModel.addAttribute(\"register\", theRegister);\n\t\t\n\t\treturn \"register-form\";\n\t}", "Object getViewDetails();", "@Override\r\n public void setModel(String model) {\n }", "public void _linkClient(ModelElement client1);", "private String renderEditPage(Model model, VMDTO vmdto) {\n\t\tmodel.addAttribute(\"vmDto\", vmdto);\n\t\tmodel.addAttribute(\"availableProviders\", providerService.getAllProviders());\n\t\treturn \"vm/edit\";\n\t}" ]
[ "0.6573206", "0.6500519", "0.6281875", "0.6209135", "0.6195151", "0.6120459", "0.60575175", "0.60301036", "0.60114396", "0.59895825", "0.5978108", "0.59779257", "0.59779257", "0.59779257", "0.5955391", "0.5949246", "0.5947242", "0.59462994", "0.5934391", "0.593017", "0.59122944", "0.5894646", "0.58768904", "0.5875707", "0.5875707", "0.5875707", "0.5869772", "0.5864108", "0.58526427", "0.584397", "0.5835781", "0.5832013", "0.58236057", "0.5816629", "0.58096033", "0.57945657", "0.57792616", "0.5776106", "0.57748294", "0.57475215", "0.57419395", "0.57308894", "0.5729163", "0.5721175", "0.57061493", "0.5703433", "0.57026535", "0.5700421", "0.56860566", "0.5684726", "0.56809205", "0.56791097", "0.56791097", "0.567006", "0.5664126", "0.566064", "0.5648562", "0.5631041", "0.5626514", "0.5625082", "0.56133217", "0.56120753", "0.5610347", "0.5603309", "0.5597296", "0.5589158", "0.5588271", "0.55876666", "0.5582773", "0.5581325", "0.557304", "0.55715436", "0.55674696", "0.5562456", "0.5561982", "0.5558832", "0.5551933", "0.55511963", "0.55458736", "0.5542886", "0.5539781", "0.5536635", "0.5535639", "0.55330986", "0.5516963", "0.5515968", "0.55149066", "0.5510949", "0.5509171", "0.5507751", "0.55046165", "0.5503258", "0.54900885", "0.54896605", "0.54649127", "0.54614025", "0.5457844", "0.5446569", "0.5446171", "0.54452026" ]
0.5820349
33
Drawings inside the view.
public void paintComponent(Graphics g) { super.paintComponent(g); // Setting drawings the global color. g.setColor( this.model.defaultV.movingColor ); //Painting all of the particles. for(int i = 0; i < this.model.particleArray.size(); i++) { Particle p = (Particle) this.model.particleArray.get(i); int x = (int) p.x; int y = (int) p.y; // Changing the color accordingly. if( p.isMoving ) { g.setColor( p.color ); } else { g.setColor( this.model.defaultV.stuckColor ); } // Painting each particle. g.fillRect(x, y, this.model.defaultV.particleSize, this.model.defaultV.particleSize); if (p.isTracking && p.trackingPath.size() > 1) { Particle firstPos = p.trackingPath.get(0); // Our very first particle position. for(int j = 1; j < p.trackingPath.size() - 1; j++) { Particle secondPos = p.trackingPath.get(j); // draw line from first to second. Graphics2D g2 = (Graphics2D) g; Line2D lin = new Line2D.Float((int) firstPos.x, (int) firstPos.y, (int) secondPos.x, (int) secondPos.y); g.setColor( p.color ); g2.draw(lin); // Set our first to the next. firstPos = secondPos; } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static void draw()\n {\n for (Viewport viewport : viewports)\n viewport.draw(renderers);\n }", "public void draw() {\n draw(clientController.getUser().getShows());\n }", "public void draw() {\n \n // TODO\n }", "@Override\n\tprotected synchronized void onDraw(Canvas canvas){\n//\t\tdata.add(49);\n//\t\tdata.add(40);\n//\t\tdata.add(36);\n//\t\tdata.add(20);\n//\t\tdata.add(10);\n//\t\tdata.add(50);\n//\t\tdata.add(40);\n//\t\tdata.add(38);\n//\t\tdata.add(20);\n//\t\tdata.add(10);\n\n\t\tmAnalysts.pre();\n\t\twidth = this.getWidth();\n\t\theight = this.getHeight();\n\t\tline0_x1 = (float)width*0.1f;\n\t\tline0_x2 = (float)width;\n\t\tline0_y = (float)height*0.9f;\n\t\tline50_x1 = line0_x1;\n\t\tline50_x2 = line0_x2;\n\t\tline50_y = (float)height*0.1f;\n\t\tline37_x1 = line0_x1;\n\t\tline37_x2 = line0_x2;\n\t\tline37_y = (float)height*0.8f*(50-37)/50.0f+line50_y;\n\t\tif(layoutLand){//show all item\n\t\t\tint num = data.size();\n\t\t\tif(0==num){\n\t\t\t\tpadding = 0;\n\t\t\t\tsub_width = 0;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif(num<10)\n\t\t\t\t\tnum = 10;\n\t\t\t\tpadding = (float)width*0.9f*0.1f/(num+1);\n\t\t\t\tsub_width = (float)width*0.9f*0.9f/num;\n\t\t\t}\n\t\t}\n\t\telse{//only show 10 item\n\t\t\tpadding = (float)width*0.9f*0.1f/11;\n\t\t\tsub_width = (float)width*0.9f*0.9f/10;\n\t\t}\n\t\tdrawBackground(canvas, width, height);\n\t\tdrawValues(canvas);\n\t\tmAnalysts.post();\n\t}", "static synchronized List<Drawing> getAllDrawings() {\r\n return new ArrayList(drawings.values());\r\n }", "public boolean isDrawn();", "public void draw() {\n\t\t/* Clear Screen */\n\t\tGdx.graphics.getGL20().glClearColor(1,1,1,0);\n\t\tGdx.graphics.getGL20().glClear( GL20.GL_COLOR_BUFFER_BIT | GL20.GL_DEPTH_BUFFER_BIT );\n\n\t\t/* Iterate through draw list */\n\t\tIterator<ArrayList<Drawable>> iter = this.drawlist.iterator();\n\t\twhile(iter.hasNext()) {\n\t\t\tArrayList<Drawable> layer = iter.next();\n\t\t\t/* Sort the layer. */\n\t\t\tCollections.sort(layer, new DrawableComparator());\n\t\t\t/* Iterate through the layer. */\n\t\t\tIterator<Drawable> jter = layer.iterator();\n\t\t\twhile(jter.hasNext()) {\n\t\t\t\tDrawable drawable = jter.next();\n\t\t\t\tif (drawable.isDead()) {\n\t\t\t\t\tjter.remove(); //Remove if dead.\n\t\t\t\t}//fi\n\t\t\t\telse {\n\t\t\t\t\tdrawable.draw(this, this.scalar); //Draw the drawable.\n\t\t\t\t}//else\n\t\t\t}//elihw\n\t\t}//elihw\n\t}", "private void createDrawingView() {\r\n mDrawingView = new DrawingView(mContext);\r\n LinearLayout mDrawingPad = (LinearLayout) findViewById(R.id.drawing_pad);\r\n mDrawingPad.addView(mDrawingView);\r\n }", "@Override\r\n\tpublic void draw() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void draw() {\n\t\t\r\n\t}", "public int getDraws() {\n return draws;\n }", "@Override\r\n public void draw() {\n }", "public int getDraws() {\n return draws;\n }", "void draw(IViewShapes shape);", "@Override\n\tpublic void draw() {\n\n\t}", "@Override\n\tpublic void draw() {\n\n\t}", "@Override\n public void draw() {\n }", "@Override\n public void draw()\n {\n }", "@Override\r\n\tprotected void onDraw() {\n\t\t\r\n\t}", "public void draw() {\r\n if(isVisible()) {\r\n Canvas canvas = Canvas.getCanvas();\r\n canvas.draw(this,getColor(),\r\n new Rectangle(\r\n (int)round(getXposition()),\r\n (int)round(getYposition()),\r\n (int)round(size),\r\n (int)round(size)));\r\n canvas.wait(10);\r\n }\r\n }", "@Override\n\tpublic void draw() {\n\t}", "@Override\n\tpublic void draw() {\n\t\t\n\t}", "@Override\n\tpublic void draw() {\n\t\t\n\t}", "public void draw() {\n }", "public boolean isDrawingViews() {\n return drawViews;\n }", "public void draw() {\n \n }", "public void draw()\r\n {\r\n drawn = true;\r\n }", "void updateDrawing() {\n filling = modelRoot.getCDraw().getFilling(this);\n dirtyBufF = true;\n tooltip = modelRoot.getCDraw().getTooltip(this);\n dirtyBufT = true;\n title = modelRoot.getCDraw().getTitle(this);\n dirtyBufTitle = true;\n colorTitle = modelRoot.getCDraw().getTitleColor(this);\n dirtyBufCT = true;\n }", "public int getDraws() {\n return drawRound;\n }", "private void draw(){\n GraphicsContext gc = canvasArea.getGraphicsContext2D();\n canvasDrawer.drawBoard(canvasArea, board, gc, currentCellColor, currentBackgroundColor, gridToggle);\n }", "public int getF_Draws() {\n return f_draws;\n }", "public void withdraw() {\n\t\t\t\n\t\t}", "@Override\n public void onLayerDrawn(Canvas canvas, float pageWidth, float pageHeight, int displayedPage) {\n }", "void draw() {\n\t\tSystem.out.println(\"Drawing the Rectange...\");\n\t\t}", "public void withdraw() {\n\t\t}", "@Override\r\n\tpublic void draw() {\n\t\tSystem.out.println(\"Draw all shapes\");\r\n\t\t\r\n\t}", "@Override\r\n\tpublic void draw() {\n\t\tSystem.out.println(\"Draw all shapes\");\r\n\t\t\r\n\t}", "@Override\r\n\tpublic void draw() {\n\t\tSystem.out.println(\"Draw all shapes\");\r\n\t\t\r\n\t}", "void computeDrawing() {\n if (dirtyD) {\n filling = modelRoot.getCDraw().getFilling(this);\n dirtyBufF = true;\n tooltip = modelRoot.getCDraw().getTooltip(this);\n dirtyBufT = true;\n title = modelRoot.getCDraw().getTitle(this);\n dirtyBufTitle = true;\n colorTitle = modelRoot.getCDraw().getTitleColor(this);\n dirtyBufCT = true;\n modelRoot.decrementNumberOfDirtyDNodes();\n dirtyD = false;\n }\n }", "private void draw() {\n\t\tCanvas c = null;\n\t\ttry {\n\t\t\t// NOTE: in the LunarLander they don't have any synchronization here,\n\t\t\t// so I guess this is OK. It will return null if the holder is not ready\n\t\t\tc = mHolder.lockCanvas();\n\t\t\t\n\t\t\t// TODO this needs to synchronize on something\n\t\t\tif (c != null) {\n\t\t\t\tdoDraw(c);\n\t\t\t}\n\t\t} finally {\n\t\t\tif (c != null) {\n\t\t\t\tmHolder.unlockCanvasAndPost(c);\n\t\t\t}\n\t\t}\n\t}", "public void draw() {\n for (Point2D i : pointsSet)\n i.draw();\n }", "public void draw(){\n if(isVisible) {\n double diameter = calcularLado(area);\n double side = 2*diameter;\n Canvas circle = Canvas.canvas;\n circle.draw(this, color, \n new Ellipse2D.Double(xPosition, yPosition, \n (int)diameter, side));\n }\n }", "public void draw() {\n final int columns = (int) (2 * Math.ceil(Math.max(-minx, maxx)));\n final int rows = (int) (2 * Math.ceil(Math.max(-miny, maxy)));\n\n final int drawColumns;\n final int drawRows;\n drawColumns = drawRows = Math.max(columns, rows);\n\n double leftOffsetPx = BORDER;\n double rightOffsetPx = BORDER;\n double topOffsetPx = BORDER;\n double bottomOffsetPx = BORDER;\n\n final double availableWidth = view.getWidth() - leftOffsetPx - rightOffsetPx;\n final double availableHeight = view.getHeight() - topOffsetPx - bottomOffsetPx;\n\n final double drawWidth;\n final double drawHeight;\n drawWidth = drawHeight = Math.min(availableWidth, availableHeight);\n\n leftOffsetPx = rightOffsetPx = (view.getWidth() - drawWidth) / 2;\n topOffsetPx = bottomOffsetPx = (view.getHeight() - drawHeight) / 2;\n\n // Adjust for aspect ratio\n columnWidth = rowHeight = drawHeight / columns;\n\n centerX = (drawColumns / 2.0) * columnWidth + leftOffsetPx;\n centerY = (drawRows / 2.0) * rowHeight + topOffsetPx;\n\n drawVerticalLine((float) centerX, topOffsetPx, bottomOffsetPx);\n drawHorizontalLine((float) centerY, leftOffsetPx, rightOffsetPx);\n\n int yTick = (int) (-drawRows / 2.0 / TICK_INTERVAL) * TICK_INTERVAL;\n while (yTick <= drawRows / 2.0) {\n if (yTick != 0) {\n final String label = yTick % (TICK_INTERVAL * 2) == 0 ? String.format(\"%d\", yTick) : null;\n drawYTick(-yTick * rowHeight + centerY, centerX, label);\n }\n yTick += TICK_INTERVAL;\n }\n\n int xTick = (int) (-drawColumns / 2.0 / TICK_INTERVAL) * TICK_INTERVAL;\n while (xTick <= drawColumns / 2.0) {\n if (xTick != 0) {\n final String label = xTick % (TICK_INTERVAL * 2) == 0 ? String.format(\"%d\", xTick) : null;\n drawXTick(xTick * columnWidth + centerX, centerY, label);\n }\n xTick += TICK_INTERVAL;\n }\n\n double adaptiveTextSize = getAdaptiveTextSize();\n\n final Paint paint = new Paint();\n final float textSize = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP, (float)adaptiveTextSize, view.getResources().getDisplayMetrics());\n paint.setTextSize(textSize);\n paint.setTypeface(Typeface.create(Typeface.MONOSPACE, Typeface.NORMAL));\n for (Entry entry : data.getEntries()) {\n final double x = entry.getX();\n final double y = entry.getY();\n\n final double xDraw = x * columnWidth + centerX;\n final double yDraw = -y * rowHeight + centerY;\n\n CharSequence dispStr = entry.getStringLabel();\n if (dispStr == null) {\n dispStr = String.format(\"%.0f\", entry.getValue());\n }\n\n\n\n\n Rect bounds = getTextRectBounds(dispStr, paint);\n int textHeight = bounds.height();\n int textWidth = bounds.width();\n canvas.drawText(dispStr, 0, dispStr.length(),\n (float) xDraw - textWidth * 0.5f, (float) yDraw + textHeight * 0.5f,\n paint);\n }\n\n }", "public void draw() {\n for (Point2D point : pointSet) {\n point.draw();\n }\n }", "@Override\n\tpublic void withdraw() {\n\t\t\n\t}", "public void drawAllGraphics(){\r\n\t\t \r\n\t}", "@Override\n public void handlePaint()\n {\n for(GraphicObject obj : this.graphicObjects)\n {\n obj.draw();\n }\n \n }", "public void drawAll(){\n for (Triangle triangle : triangles) {\n triangle.draw();\n }\n for (Circle circle : circles) {\n circle.draw();\n }\n for(Rectangle rectangle : rectangles){\n rectangle.draw();\n }\n }", "@Override\n protected void onDraw(Canvas canvas) {\n super.onDraw(canvas);\n\n if (gameOver) {\n // end game - loss\n gameOverDialog();\n } else if (gameWon) {\n // end game - win\n gameWonDialog();\n }\n\n //Convert dp to pixels by multiplying times density.\n canvas.scale(density, density);\n\n // draw horizon\n paint.setColor(Color.GREEN);\n paint.setStyle(Paint.Style.FILL);\n canvas.drawRect(0, horizon, getWidth() / density, getHeight() / density, paint);\n\n // draw cities\n paint.setColor(Color.BLACK);\n paint.setStyle(Paint.Style.FILL);\n textPaint.setColor(Color.WHITE);\n textPaint.setTextSize(10);\n\n for (int i = 0; i < cityCount; ++i) {\n canvas.drawRect(cityLocations[i].x - citySize, cityLocations[i].y - citySize, cityLocations[i].x + citySize, cityLocations[i].y + citySize, paint);\n canvas.drawText(cityNames[i], cityLocations[i].x - (citySize / 2) - 5, cityLocations[i].y - (citySize / 2) + 10, textPaint);\n }\n\n // draw rocks\n for (RockView rock : rockList) {\n PointF center = rock.getCenter();\n String color = rock.getColor();\n\n paint.setColor(Color.parseColor(color));\n\n paint.setStyle(Paint.Style.FILL);\n //Log.d(\"center.x\", center.x + \"\");\n //Log.d(\"center.y\", center.y + \"\");\n canvas.drawCircle(center.x, center.y, rockRadius, paint);\n }\n\n // draw MagnaBeam circle\n if (touchActive) {\n canvas.drawCircle(touchPoint.x, touchPoint.y, touchWidth, touchPaint);\n }\n }", "public void draw() {\n for (Point2D p: mPoints) {\n StdDraw.filledCircle(p.x(), p.y(), 0.002);\n }\n }", "@Override\n public void draw(GraphicsContext gc, int sides){}", "public void draw() {\n\t\tp.pushStyle();\n\t\t{\n\t\t\tp.rectMode(PConstants.CORNER);\n\t\t\tp.fill(360, 0, 70, 180);\n\t\t\tp.rect(60f, 50f, p.width - 110f, p.height * 2f * 0.33f - 50f);\n\t\t\tp.rect(60f, p.height * 2f * 0.33f + 50f, p.width - 110f, p.height * 0.33f - 130f);\n\t\t}\n\t\tp.popStyle();\n\n\t\tlineChart.draw(40f, 40f, p.width - 80f, p.height * 2f * 0.33f - 30f);\n\t\tlineChart2.draw(40f, p.height * 2f * 0.33f + 45f, p.width - 80f, p.height * 0.33f - 110f);\n\t\t//p.line(x1, y1, x2, y2);\n\n\t}", "public void draw(){\n\t\t int startRX = 100;\r\n\t\t int startRY = 100;\r\n\t\t int widthR = 300;\r\n\t\t int hightR = 300;\r\n\t\t \r\n\t\t \r\n\t\t // start points on Rectangle, from the startRX and startRY\r\n\t\t int x1 = 0;\r\n\t\t int y1 = 100;\r\n\t\t int x2 = 200;\r\n\t\t int y2 = hightR;\r\n\t\t \r\n //direction L - false or R - true\r\n\t\t \r\n\t\t boolean direction = true;\r\n\t\t \t\r\n\t\t\r\n\t\t //size of shape\r\n\t\t int dotD = 15;\r\n\t\t //distance between shapes\r\n\t int distance = 30;\r\n\t\t \r\n\t rect(startRX, startRY, widthR, hightR);\r\n\t \r\n\t drawStripesInRectangle ( startRX, startRY, widthR, hightR,\r\n\t \t\t x1, y1, x2, y2, dotD, distance, direction) ;\r\n\t\t \r\n\t\t super.draw();\r\n\t\t}", "public void draw() {\n\n // Make sure our drawing surface is valid or we crash\n if (ourHolder.getSurface().isValid()) {\n // Lock the canvas ready to draw\n canvas = ourHolder.lockCanvas();\n // Draw the background color\n paint.setTypeface(tf);\n canvas.drawColor(Color.rgb(178,223,219));\n paint.setColor(Color.rgb(255,255,255));\n canvas.drawRect(offsetX, offsetY, width-offsetX, (height-100)-offsetY, paint);\n // Choose the brush color for drawing\n paint.setColor(Color.argb(50,0,0,0));\n paint.setFlags(Paint.ANTI_ALIAS_FLAG);\n // Make the text a bit bigger\n paint.setTextSize(40);\n paint.setStrokeWidth(5);\n paint.setStrokeCap(Paint.Cap.ROUND);\n // Display the current fps on the screen\n canvas.drawText(\"FPS:\" + fps, 20, 40, paint);\n paint.setTextSize(400);\n if(hasTouched == true) {\n if (count < 0) {\n canvas.drawText(0 + \"\", (width / 2) - 100, height / 2, paint);\n } else if(count<=numLines) {\n canvas.drawText(count + \"\", (width / 2) - 100, height / 2, paint);\n }\n } else {\n paint.setTextSize(100);\n canvas.drawText(\"TAP TO START\", (width / 2) - 300, height / 2, paint);\n }\n paint.setColor(Color.rgb(0,150,136));\n\n paint.setColor(color);\n\n canvas.drawCircle(xPosition, yPosition, radius, paint);\n\n paint.setColor(lineColor);\n\n if(isMoving==true && hasHit == false && count>=0) {\n canvas.drawLine(initialX, initialY, endX, endY, paint);\n }\n paint.setColor(Color.rgb(103,58,183));\n\n for(int i=0; i<verts.length; i++) {\n canvas.drawVertices(Canvas.VertexMode.TRIANGLES, verts[0].length, verts[i], 0, null, 0, verticesColors, 0, null, 0, 0, new Paint());\n }\n for (int i=0; i<innerVerts.length; i++) {\n canvas.drawVertices(Canvas.VertexMode.TRIANGLES, innerVerts[0].length, innerVerts[i], 0, null, 0, verticesColors, 0, null, 0, 0, new Paint());\n }\n // Draw everything to the screen\n ourHolder.unlockCanvasAndPost(canvas);\n\n //Display size and width\n\n }\n\n }", "public Drawing drawing() {\n return fDrawing;\n }", "void draw() {\n\t\t// display debug information\n\t\t// if (debugMode)\n\t\t// displayDebugInformation();\n\n\t\tupdate();\n\t\trender(); // display freetransform points, lines and colorings\n\n\t\t// display opposite objects\n\t\t// displayOppositeObject();\n\t}", "public void draw(){\n }", "public void incDraws() {\n draws++;\n }", "public void showDraw(){\n\t\tdraw = new Document( drawFilePath);\n\t}", "public void draw() {\n\t\t\r\n\t\tSystem.out.println(\"drawing...\");\r\n\t\t\r\n\t}", "public void draw() {\n\n }", "void draw() {\n canvas.drawColor(Color.BLACK);\n insertSort(vstar);\n for( int i=0; i<NUMSTARS; i++){\n vstar[i].draw();\n }\n }", "@Override\r\n public void drawOn(DrawSurface d) {\r\n d.setColor(Color.decode(\"#298A1C\"));\r\n d.fillRectangle(0, 0, d.getWidth(), d.getHeight());\r\n\r\n // draw building:\r\n d.setColor(Color.decode(\"#414142\"));\r\n d.fillRectangle(100, 200, 10, 200);\r\n d.setColor(Color.decode(\"#171017\"));\r\n d.fillRectangle(90, 400, 30, 200);\r\n d.setColor(Color.decode(\"#170F12\"));\r\n d.fillRectangle(55, 450, 100, 200);\r\n d.setColor(Color.decode(\"#FFD149\"));\r\n d.fillCircle(105, 200, 11);\r\n d.setColor(Color.decode(\"#B86731\"));\r\n d.fillCircle(105, 200, 7);\r\n d.setColor(Color.WHITE);\r\n d.fillCircle(105, 200, 3);\r\n\r\n // draw windows:\r\n int width = 10;\r\n int height = 25;\r\n int space = 8;\r\n int rowHeight = 460;\r\n drawWindows(rowHeight, d);\r\n drawWindows(rowHeight + height + space, d);\r\n drawWindows(rowHeight + height * 2 + space * 2, d);\r\n drawWindows(rowHeight + height * 3 + space * 3, d);\r\n drawWindows(rowHeight + height * 4 + space * 4, d);\r\n drawWindows(rowHeight + height * 5 + space * 5, d);\r\n }", "public void updateDrawing() {\n\n\t\tdrawingContainer.setDrawing(controller.getDrawing());\n\t\tscrollpane.setPreferredSize(new Dimension(drawingContainer\n\t\t\t\t.getPreferredSize().width + 100, drawingContainer\n\t\t\t\t.getPreferredSize().height + 100));\n\t\tpack();\n\t\trepaint();\n\t}", "public DrawingView(Context context, AttributeSet attrs){\n super(context, attrs);\n setupDrawing();\n }", "public void draw(DrawingContext context) {\n\t\t\t\t}", "public void draw() {\n // Default widget draws nothing.\n }", "private void flushElements() {\n if (elements != null) {\n TopItemList smallModel = new TopItemList();\n smallModel.addAll(elements);\n\n SimpleViewBuilder builder = new SimpleViewBuilder();\n\n // scale Compute\n double scale = (double) lineHeight\n / drawingSpecifications.getMaxCadratHeight();\n\n MDCView view = builder.buildView(smallModel,\n drawingSpecifications);\n\n if (view.getWidth() == 0 || view.getHeight() == 0) {\n return;\n }\n ViewDrawer drawer = new ViewDrawer();\n\n BufferedImage image = new BufferedImage((int) Math.ceil(view\n .getWidth()\n * scale + 1), (int) Math.ceil(view.getHeight() * scale\n + 2 * pictureMargin + 1), BufferedImage.TYPE_INT_ARGB);\n\n Graphics2D g = image.createGraphics();\n GraphicsUtils.antialias(g);\n\n g.setColor(backgroundColor);\n g.fillRect(0, 0, image.getWidth(), image.getHeight());\n g.setColor(drawingSpecifications.getBlackColor());\n g.translate(1, 1 + pictureMargin);\n\n g.scale(scale, scale);\n drawer.draw(g, view, drawingSpecifications);\n g.dispose();\n\n File fic = getImageFile(imageNumber);\n try {\n ImageIO.write(image, \"png\", fic); //$NON-NLS-1$\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n String center = \"\"; //$NON-NLS-1$\n\n if (centerPictures) {\n center = \" align='center' \"; //$NON-NLS-1$\n }\n if (pictureScale != 100) {\n write(\"<img \" + center + \" src='\" + fic.getName() //$NON-NLS-1$ //$NON-NLS-2$\n + \"' width='\" + pictureScale + \"%' height='\" //$NON-NLS-1$ //$NON-NLS-2$\n + pictureScale + \"%'>\"); //$NON-NLS-1$\n\n } else if (generatePictureSize) {\n write(\"<img \" + center + \" src='\" + fic.getName() //$NON-NLS-1$ //$NON-NLS-2$\n + \"' width='\" + image.getWidth() + \"' height='\" //$NON-NLS-1$ //$NON-NLS-2$\n + image.getHeight() + \"'>\"); //$NON-NLS-1$\n } else {\n write(\"<img \" + center + \"src='\" + fic.getName() + \"'>\"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$\n }\n imageNumber++;\n image.flush();\n elements = null;\n }\n }", "private void draw(View view){\r\n\t\tif(mHolder == null){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tCanvas canvas;\r\n\t\ttry{\r\n\t\t\tcanvas = mHolder.lockCanvas();\r\n\t\t} catch (Exception e){\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tif(canvas != null){\r\n\t\t\t//We can draw the view\r\n\t\t\tview.draw(canvas);\r\n\t\t\tmHolder.unlockCanvasAndPost(canvas);\r\n\t\t}\r\n\t}", "public void draw()\n\t{\n\t\tdrawWalls();\n\n\t\tfor( Zombie z: zombies )\n\t\t{\n\t\t\tz.draw();\n\t\t}\n\t\tfor( Entity h: humans )\n\t\t{\n\t\t\th.draw();\n\t\t}\n\n\t\tdp.repaintAndSleep(rate);\n\t}", "@Override\n protected void onDraw(Canvas canvas) {\n if(face == null) {\n super.onDraw(canvas);\n return;\n }\n Paint paint = new Paint();\n\n paint.setStyle(Paint.Style.STROKE);\n paint.setStrokeWidth(2);\n paint.setColor(Color.RED);\n\n canvas.drawRect(bounds, paint);\n //canvas.drawRect(100, 100, 200, 200, paint);\n\n }", "public void drawEdges(){\n for (Edge edge : primsAlg.getEdges()){\n //DRAW VIEW\n drawView = new DrawView(this);\n drawView.setVertex1(edge.getVertex1());\n drawView.setVertex2(edge.getVertex2());\n primsLayout.addView(drawView);\n\n addEdge(drawView);\n\n showWeight(edge);\n\n }\n }", "private void drawImages() {\n\t\t\r\n\t}", "public DrawingView view() {\n return fView;\n }", "public void draw()\r\n\t{\r\n\t\tsynchronized (lines)\r\n\t\t{\r\n\t\t\tfor(int i = lines.size()-1; i >= 0; i--)\r\n\t\t\t{\r\n\t\t\t\tlines.get(i).draw();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void draw() {\n\t\tfor (Link link : links)\n\t\t\tlink.draw();\n\t}", "@Override\r\n\tprotected void onDraw(LRenderSystem rs) {\n\r\n\t}", "public void draw()\r\n\t\t{\r\n\t\tfor(PanelStationMeteo graph: graphList)\r\n\t\t\t{\r\n\t\t\tgraph.repaint();\r\n\t\t\t}\r\n\t\t}", "protected boolean isChartViewDrawn()\n {\n return mChartViewDrawn;\n }", "@Override\r\n public void draw()\r\n {\n\r\n }", "public void draw() {\n draw(root, true);\n }", "public void draw() {\n\t\tsuper.repaint();\n\t}", "public void draw() {\n if (r.isVisible()) {\n Canvas canvas = Canvas.getCanvas();\n canvas.draw(r, new java.awt.Rectangle(r.getX(), r.getY(), \n width, height));\n canvas.wait(10);\n }\n }", "private void draw() {\n\n // Current generation (y-position on canvas)\n int generation = 0;\n\n // Looping while still on canvas\n while (generation < canvasHeight / CELL_SIZE) {\n\n // Next generation\n cells = generate(cells);\n\n // Drawing\n for (int i = 0; i < cells.length; i++) {\n gc.setFill(colors[cells[i]]);\n gc.fillRect(i * CELL_SIZE, generation * CELL_SIZE, CELL_SIZE, CELL_SIZE);\n }\n\n // Next line..\n generation++;\n }\n }", "@Override\n\tpublic void onDraw(Canvas c)\n\t{\n\t\t//do stuff for not drawable items yeah i just exploit this loop\n\t\tnotdrawy();\n\t\t//draw are buttons to screen\n\t\tfor (int i =0; i < GUIItem.size();i++)\n\t\t\tGUIItem.get(i).onDraw(c);\n\t\t\n\t\t//draw are little seperater from the buttons\n\t\tc.drawLine(0, Statics.getScreenHeight() - 60, Statics.getScreenWidth(), Statics.getScreenHeight() - 60, p);\n\t\t//print stats\n\t\tc.drawText(\"Score : \" + (int)score, 10, 20, p);\n\t\tc.drawText(\"Health : \" + (int)player.getHealth() + \"%\", 10, 40, p);\n\t\tc.drawText(\"ClipRemaining : \" + (int)player.getGun().getClipsize(), 10, 60, p);\n\t\t//draw any drawable entitie to screen\n\t\tfor (int i =0; i < drawableItems.size();i++)\n\t\t\tdrawableItems.get(i).onDraw(c);\n\t\t//then we invalidate what we just drawn so it can be redrawn on a update\n\t\tinvalidate();\n\t}", "public void draw()\n\t{\t\t\n\t\tArrayList<Segment> seg = new ArrayList<Segment>();\n\t\tfor(int i = 0; i < hullVertices.length - 1; i++)\n\t\t{\n\t\t\tSegment s = new Segment(hullVertices[i], hullVertices[i+1]);\n\t\t\tseg.add(s);\n\t\t}\n\t\tSegment s1 = new Segment(hullVertices[hullVertices.length-1], hullVertices[0]);\n\t\tseg.add(s1);\n\t\t// Based on Section 4.1, generate the line segments to draw for display of the convex hull.\n\t\t// Assign their number to numSegs, and store them in segments[] in the order.\n\t\tSegment[] segments = new Segment[seg.size()];\n\t\tfor(int i = 0; i < seg.size(); i++)\n\t\t{\n\t\t\tsegments[i] = seg.get(i);\n\t\t}\n\t\t// The following statement creates a window to display the convex hull.\n\t\tPlot.myFrame(pointsNoDuplicate, segments, getClass().getName());\n\t}", "@Override\n protected void onDraw(Canvas canvas) {\n super.onDraw(canvas);\n\n int width = getWidth();\n int height = getHeight();\n float pieceWidth = width/5.0f-5;\n float pieceHeight = height/3.0f-20;\n Log.d(\"hello\", \"DRAWINGGGGGGG\");\n\n //this.paint.setColor(Color.WHITE);\n this.paint.setStyle(Paint.Style.FILL);\n //canvas.drawPaint(this.paint);\n canvas.drawColor(0x00000000);\n\n this.paint.setColor(Color.WHITE);\n //canvas.drawRect(0, 0, 100, 100, this.paint);\n\n\n for(int i = 0; i < 5; i++)\n for(int j = 0; j<3; j++){\n Cell cell = grid.getCellAt(i, j);\n if(cell!=null){\n //Before you can call any drawing methods, though, it's necessary to create a Paint object.\n\n this.paint.setColor(cell.getColor());\n canvas.drawRect(i*pieceWidth, j*pieceHeight, i*pieceWidth + pieceWidth, j*pieceHeight + pieceHeight, this.paint);\n\n this.paint.setColor(Color.WHITE);\n this.paint.setStrokeWidth(4);\n //Lines on window\n canvas.drawLine(i*pieceWidth, j*pieceHeight, i*pieceWidth, j*pieceHeight + pieceHeight, this.paint);\n canvas.drawLine(i*pieceWidth, j*pieceHeight, i*pieceWidth + pieceWidth, j*pieceHeight, this.paint);\n canvas.drawLine(i*pieceWidth + pieceWidth, j*pieceHeight, i*pieceWidth + pieceWidth, j*pieceHeight + pieceHeight, this.paint);\n canvas.drawLine(i*pieceWidth, j*pieceHeight + pieceHeight, i*pieceWidth + pieceWidth, j*pieceHeight + pieceHeight, this.paint);\n\n }\n }\n\n\n\n }", "@Override\n\tpublic void draw(Graphics canvas) {}", "public void onDraw(Displayer displayer) {\n // Do nothing\n }", "public void draw() {\n draw(root, false);\n }", "private void draw() {\n this.player.getMap().DrawBackground(this.cameraSystem);\n\n //Dibujamos al jugador\n player.draw();\n\n for (Character character : this.characters) {\n if (character.getMap() == this.player.getMap()) {\n character.draw();\n }\n }\n\n //Dibujamos la parte \"superior\"\n this.player.getMap().DrawForeground();\n\n //Sistema de notificaciones\n this.notificationsSystem.draw();\n\n this.player.getInventorySystem().draw();\n\n //Hacemos que la cámara se actualice\n cameraSystem.draw();\n }", "private void draw() {\n gsm.draw(g);\n }", "public void draw() {\n StdDraw.setPenColor(StdDraw.BLACK);\n StdDraw.setPenRadius(0.01);\n for (Point2D point : points) {\n StdDraw.point(point.x(), point.y());\n }\n StdDraw.setPenRadius();\n }", "@Override\n\tpublic void draw() {\n\t\tSystem.out.println(\"draw method\");\n\t}", "@Override\r\n\tpublic void withDraw(int x) {\n\t\t\r\n\t}", "public void draw(float delta) {\n\t\tcanvas.clear();\n\t\tcanvas.begin();\n\t\tcw = canvas.getWidth();\n\t\tch = canvas.getHeight();\n\t\tfor (int i = -5; i < 5; i++) {\n\t\t\tfor (int j = -5; j < 5; j++) {\n\t\t\t\tcanvas.draw(getBackground(dayTime), Color.WHITE, cw*i * 2, ch*j * 2, cw * 2, ch * 2);\n\t\t\t\tif(dayTime == 0 || dayTime == 1){\n\t\t\t\t\tcanvas.draw(getBackground(dayTime + 1), levelAlpha, cw*i * 2, ch*j * 2, cw * 2, ch * 2);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcanvas.end();\n\t\tif (walls.size() > 0){ \n\t\t\tfor (ArrayList<Float> wall : walls) canvas.drawPath(wall);\n\t\t}\n\t\tcanvas.begin();\n\t\t//\t\tcanvas.draw(background, Color.WHITE, 0, 0, canvas.getWidth(), canvas.getHeight());\n\t\t//canvas.draw(rocks, Color.WHITE, 0, 0, canvas.getWidth(), canvas.getHeight());\n\t\t\n\t\t\n//\t\tfor (ArrayList<Float> wall : walls) canvas.drawPath(wall);\n\t\t\n\t\tfor(Obstacle obj : objects) {\n\t\t\tobj.draw(canvas);\n\t\t}\n\t\t\n\n\t\tfor (int i = -5; i < 5; i++) {\n\t\t\tfor (int j = -5; j < 5; j++) {\n\t\t\t\tcanvas.draw(overlay, referenceC, cw*i, ch*j, cw, ch);\n\t\t\t}\n\t\t}\n\n\t\tcanvas.end();\n\n\t\tif (debug) {\n\t\t\tcanvas.beginDebug();\n\t\t\tfor(Obstacle obj : objects) {\n\t\t\t\tobj.drawDebug(canvas);\n\t\t\t}\n\t\t\tcanvas.endDebug();\n\t\t}\n\n\n\n//\t\t// Final message\n//\t\tif (complete && !failed) {\n//\t\t\tdisplayFont.setColor(Color.BLACK);\n//\t\t\tcanvas.begin(); // DO NOT SCALE\n//\t\t\tcanvas.drawTextCentered(\"VICTORY!\", displayFont, 0.0f);\n//\t\t\tcanvas.end();\n//\t\t\tdisplayFont.setColor(Color.BLACK);\n//\t\t} else if (failed) {\n//\t\t\tdisplayFont.setColor(Color.RED);\n//\t\t\tcanvas.begin(); // DO NOT SCALE\n//\t\t\tcanvas.drawTextCentered(\"FAILURE!\", displayFont, 0.0f);\n//\t\t\tcanvas.end();\n//\t\t}\n\t}", "@Override\n public void draw(IPainter painter) {\n\n // Turn on stenciling\n painter.glEnable_Stencil();\n\n // Set stencil function to always pass\n painter.glStencilFunc(StencilFunc.GL_ALWAYS, 1, 1);\n\n // Set stencil op to set 1 if depth passes, 0 if it fails\n painter.glStencilOp(StencilOp.GL_KEEP, StencilOp.GL_ZERO, StencilOp.GL_REPLACE);\n\n // Draw the base polygons that should be covered by outlines\n plane.draw(painter);\n\n // Set stencil function to pass when stencil is 1\n painter.glStencilFunc(StencilFunc.GL_EQUAL, 1, 1);\n\n // Disable writes to stencil buffer\n painter.glStencilMask_False();\n\n // Turn off depth buffering\n painter.glDisable_DepthTest();\n\n // Render the overlying drawables\n for (Drawable d : outlines) {\n d.draw(painter);\n }\n\n // Reset states\n if (!painter.getQuality().isAlphaActivated()) {\n if (painter.getQuality().isDepthActivated()) {\n painter.glEnable_DepthTest();\n }\n } else if (!painter.getQuality().isDisableDepthBufferWhenAlpha()) {\n painter.glEnable_DepthTest();\n }\n\n painter.glDisable_Stencil();\n\n // could also try\n // https://www.khronos.org/opengl/wiki/Drawing_Coplanar_Primitives_Widthout_Polygon_Offset\n }", "public void draw() \r\n\t{\r\n\t\tdraw(root, new RectHV(0,0,1,1) );\r\n\t}", "@Override\n\tpublic String draw() {\n\t\treturn \"Geometry Draws\";\n\t}", "private void handleDrawRequest(PaintEvent event) {\n \n \t\tif (fTextWidget == null) {\n \t\t\t// is already disposed\n \t\t\treturn;\n \t\t}\n \n \t\tIRegion clippingRegion= computeClippingRegion(event);\n \t\tif (clippingRegion == null)\n \t\t\treturn;\n \t\t\n \t\tint vOffset= clippingRegion.getOffset();\n \t\tint vLength= clippingRegion.getLength();\n \t\t\n \t\tfinal GC gc= event != null ? event.gc : null;\n \n \t\t// Clone decorations\n \t\tCollection decorations;\n \t\tsynchronized (fDecorationMapLock) {\n \t\t\tdecorations= new ArrayList(fDecorationsMap.size());\n \t\t\tdecorations.addAll(fDecorationsMap.entrySet());\n \t\t}\n \n \t\t/*\n \t\t * Create a new list of annotations to be drawn, since removing from decorations is more\n \t\t * expensive. One bucket per drawing layer. Use linked lists as addition is cheap here.\n \t\t */\n \t\tArrayList toBeDrawn= new ArrayList(10);\n \t\tfor (Iterator e = decorations.iterator(); e.hasNext();) {\n \t\t\tMap.Entry entry= (Map.Entry)e.next();\n \t\t\t\n \t\t\tAnnotation a= (Annotation)entry.getKey();\n \t\t\tDecoration pp = (Decoration)entry.getValue();\n \t\t\t// prune any annotation that is not drawable or does not need drawing\n \t\t\tif (!(a.isMarkedDeleted() || pp.fPainter == fgNullDrawer || pp.fPainter instanceof NullStrategy || skip(a) || !pp.fPosition.overlapsWith(vOffset, vLength))) {\n \t\t\t\t// ensure sized appropriately\n \t\t\t\tfor (int i= toBeDrawn.size(); i <= pp.fLayer; i++)\n \t\t\t\t\ttoBeDrawn.add(new LinkedList());\n \t\t\t\t((List) toBeDrawn.get(pp.fLayer)).add(entry);\n \t\t\t}\n \t\t}\n \t\t\n \t\tReusableRegion range= new ReusableRegion();\n \t\tfor (Iterator it= toBeDrawn.iterator(); it.hasNext();) {\n \t\t\tList layer= (List) it.next();\n \n \t\t\tfor (Iterator e = layer.iterator(); e.hasNext();) {\n \t\t\t\tMap.Entry entry= (Map.Entry)e.next();\n \n \t\t\t\tDecoration pp = (Decoration)entry.getValue();\n \t\t\t\tPosition p= pp.fPosition;\n \t\t\t\tIDocument document= fSourceViewer.getDocument();\n \t\t\t\ttry {\n \n \t\t\t\t\tint startLine= document.getLineOfOffset(p.getOffset());\n \t\t\t\t\tint lastInclusive= Math.max(p.getOffset(), p.getOffset() + p.getLength() - 1);\n \t\t\t\t\tint endLine= document.getLineOfOffset(lastInclusive);\n \n \t\t\t\t\tfor (int i= startLine; i <= endLine; i++) {\n \t\t\t\t\t\tint lineOffset= document.getLineOffset(i);\n \t\t\t\t\t\tint paintStart= Math.max(lineOffset, p.getOffset());\n \t\t\t\t\t\tString lineDelimiter= document.getLineDelimiter(i);\n \t\t\t\t\t\tint delimiterLength= lineDelimiter != null ? lineDelimiter.length() : 0;\n \t\t\t\t\t\tint paintLength= Math.min(lineOffset + document.getLineLength(i) - delimiterLength, p.getOffset() + p.getLength()) - paintStart;\n \t\t\t\t\t\tif (paintLength >= 0 && overlapsWith(paintStart, paintLength, vOffset, vLength)) {\n \t\t\t\t\t\t\t// otherwise inside a line delimiter\n \t\t\t\t\t\t\trange.setOffset(paintStart);\n \t\t\t\t\t\t\trange.setLength(paintLength);\n \t\t\t\t\t\t\tIRegion widgetRange= getWidgetRange(range);\n \t\t\t\t\t\t\tif (widgetRange != null) {\n \t\t\t\t\t\t\t\tAnnotation a= (Annotation)entry.getKey();\n \t\t\t\t\t\t\t\tpp.fPainter.draw(a, gc, fTextWidget, widgetRange.getOffset(), widgetRange.getLength(), pp.fColor);\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \n \t\t\t\t} catch (BadLocationException x) {\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}", "private void drawGrid(){\r\n\r\n\t\tdrawHorizontalLines();\r\n\t\tdrawVerticalLines();\r\n\t}" ]
[ "0.6771393", "0.6686484", "0.6615428", "0.6598127", "0.65457046", "0.65002286", "0.64982283", "0.64908445", "0.6424771", "0.6424771", "0.63896585", "0.63535625", "0.6333532", "0.6329178", "0.6323425", "0.6323425", "0.6310429", "0.6307023", "0.6267634", "0.62208813", "0.621985", "0.6215538", "0.6215538", "0.6210455", "0.620818", "0.6201199", "0.6198472", "0.6185393", "0.6182235", "0.61768883", "0.6162881", "0.6149519", "0.614557", "0.61447096", "0.6141345", "0.6134342", "0.6134342", "0.6134342", "0.6122963", "0.6118746", "0.61172175", "0.61123675", "0.611095", "0.6106554", "0.60959387", "0.60845894", "0.6084284", "0.6075086", "0.60663116", "0.6062423", "0.60519475", "0.60489976", "0.6040743", "0.60399157", "0.603452", "0.6025893", "0.60144144", "0.6009698", "0.6009012", "0.60025805", "0.5992822", "0.5989699", "0.5986425", "0.5985485", "0.5984555", "0.598208", "0.5957856", "0.59541935", "0.5952315", "0.59479624", "0.5938561", "0.5938427", "0.5934362", "0.59313637", "0.59297496", "0.5924244", "0.5923255", "0.59216285", "0.59191704", "0.5918447", "0.589438", "0.5890772", "0.5886536", "0.58822125", "0.5876367", "0.58702147", "0.5868709", "0.5868394", "0.586745", "0.58664685", "0.5864559", "0.5854414", "0.5849825", "0.58491373", "0.5844427", "0.584044", "0.5833746", "0.58308953", "0.5830647", "0.5830154", "0.5821435" ]
0.0
-1
Returns the HTML response with a title, input and button aka HERO
public static String heroWithPastMessages(ArrayList<String> listOfSentMessages) { return Html.build(Styles.css, hero + Common.sentMessages(listOfSentMessages)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic String getResponse() {\n\n\t\tString[] css = { Resource.CSS_COMMON, Resource.CSS_HEADER, Resource.CSS_CARD, Resource.CSS_TITLE_BANNER,\n\t\t\t\tResource.CSS_MODAL_IMAGE, Resource.CSS_BUTTON, Resource.CSS_FORMS};\n\t\tString[] js = { Resource.JS_HEADER, Resource.JS_FORMS };\n\n\t\tm.addHead(css, js, \"View Window\");\n\n\t\tm.ln(\"<body>\");\n\t\tm.addNavbar(NavbarItem.Sandpit, requestInfo);\n\n\t\tm.ln(\"<script>\");\n\t\tm.ln(\"function updateClientWidth() {\");\n\t\tm.ln(\"\tvar element = document.getElementById('client-width');\");\n\t\tm.ln(\"\telement.innerHTML = document.documentElement.clientWidth;\");\n\t\tm.ln(\"}\");\n\n\t\tm.ln(\"function updateInnerWidth() {\");\n\t\tm.ln(\"\tvar element = document.getElementById('inner-width');\");\n\t\tm.ln(\"\telement.innerHTML = window.innerWidth;\");\n\t\tm.ln(\"}\");\n\n\t\tm.ln(\"function updateClientHeight() {\");\n\t\tm.ln(\"\tvar element = document.getElementById('client-height');\");\n\t\tm.ln(\"\telement.innerHTML = document.documentElement.clientHeight;\");\n\t\tm.ln(\"}\");\n\n\t\tm.ln(\"function updateInnerHeight() {\");\n\t\tm.ln(\"\tvar element = document.getElementById('inner-height');\");\n\t\tm.ln(\"\telement.innerHTML = window.innerHeight;\");\n\t\tm.ln(\"}\");\n\n\t\tm.ln(\"function updateAll() {\");\n\t\tm.ln(\"\tupdateClientWidth();\");\n\t\tm.ln(\"\tupdateInnerWidth();\");\n\t\tm.ln(\"\tupdateClientHeight();\");\n\t\tm.ln(\"\tupdateInnerHeight();\");\n\t\tm.ln(\"}\");\n\t\tm.ln(\"</script>\");\n\n\n\t\tm.ln(\"<style>\");\n\t\tm.ln(\"#hold {\");\n\t\tm.ln(\"position: fixed;\");\n\t\tm.ln(\"background-color: powderblue;\");\n\t\tm.ln(\"left: 0;\");\n\t\tm.ln(\"}\");\n\n\t\tm.ln(\".green { background-color: lightgreen; }\");\n\t\tm.ln(\"</style>\");\n\n\t\tm.ln(\"<div class=\\\"common-content\\\">\");\n\t\tm.ln(\"<div class=\\\"card\\\">\");\n\n\t\tm.ln(\"<br><br><br>\");\n\t\tm.ln(\"<p><i>On Chrome for Android: you cannot interact with the bottom of the page when page is displayed through iframe. \"\n\t\t\t\t+ \"When you scroll down the innerHeight becomes bigger than clientHeight as the URL bar is hidden.</i></p><br>\");\n\n\t\tm.ln(\"<div id='hold'>\");\n\t\tm.ln(\"<p>document.documentElement.clientWidth = <b id='client-width'></b>\");\n\t\tm.ln(\"<button onclick='updateClientWidth()'>update</button></p>\");\n\n\t\tm.ln(\"<p>window.innerWidth = <b id='inner-width'></b>\");\n\t\tm.ln(\"<button onclick='updateInnerWidth()'>update</button></p>\");\n\n\t\tm.ln(\"<p>document.documentElement.clientHeight = <b id='client-height'></b>\");\n\t\tm.ln(\"<button onclick='updateClientHeight()'>update</button></p>\");\n\n\t\tm.ln(\"<p>window.innerHeight = <b id='inner-height'></b>\");\n\t\tm.ln(\"<button onclick='updateInnerHeight()'>update</button></p>\");\n\n\t\tm.ln(\"<p>Update all: \");\n\t\tm.ln(\"<button onclick='updateAll()'>update all</button></p>\");\n\t\tm.ln(\"</div>\"); // hold\n\n\t\tfor (int i = 0; i < 64; i ++) {\n\t\t\tm.ln(\"<br>line \" + i);\n\t\t}\n\n\t\tm.ln(\"</div>\"); // card\n\t\tm.ln(\"</div>\"); //common-content\n\n\t\tm.ln(\"<button onclick='this.classList.toggle(\\\"green\\\");'>----- Can press? -----</button><b style='float:right'>----- Can select? -----</b>\");\n\t\tm.ln(\"</body>\");\n\t\tm.ln(\"</html>\");\n\n\t\treturn m.p.toString();\n\t}", "@GET\n @Path(\"/\")\n @Produces(\"image/*\")\n public Response button() throws Exception {\n final List<String> health = this.info(\n this.build.info(\n this.uriInfo().getBaseUri(), this.stand\n )\n );\n return Response.ok(draw(health), MediaType.PNG.toString()).build();\n }", "@GET\n @Produces(MediaType.TEXT_HTML)\n public String sayHtmlHello() {\n return \"<html> \" + \"<title>\" + \"Hello Jersey\" + \"</title>\"\n + \"<body><h1>\" + \"Hello Jersey\" + \"</body></h1>\" + \"</html> \";\n }", "private void writeMenu(MessageEvent e) {\n\t\tresponseContent.setLength(0);\r\n\r\n\t\t// create Pseudo Menu\r\n\t\tresponseContent.append(\"<html>\");\r\n\t\tresponseContent.append(\"<head>\");\r\n\t\tresponseContent.append(\"<title>Netty Test Form</title>\\r\\n\");\r\n\t\tresponseContent.append(\"</head>\\r\\n\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<body bgcolor=white><style>td{font-size: 12pt;}</style>\");\r\n\r\n\t\tresponseContent.append(\"<table border=\\\"0\\\">\");\r\n\t\tresponseContent.append(\"<tr>\");\r\n\t\tresponseContent.append(\"<td>\");\r\n\t\tresponseContent.append(\"<h1>Netty Test Form</h1>\");\r\n\t\tresponseContent.append(\"Choose one FORM\");\r\n\t\tresponseContent.append(\"</td>\");\r\n\t\tresponseContent.append(\"</tr>\");\r\n\t\tresponseContent.append(\"</table>\\r\\n\");\r\n\r\n\t\t// GET\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<CENTER>GET FORM<HR WIDTH=\\\"75%\\\" NOSHADE color=\\\"blue\\\"></CENTER>\");\r\n\t\tresponseContent.append(\"<FORM ACTION=\\\"/formget\\\" METHOD=\\\"GET\\\">\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<input type=hidden name=getform value=\\\"GET\\\">\");\r\n\t\tresponseContent.append(\"<table border=\\\"0\\\">\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<tr><td>Fill with value: <br> <input type=text name=\\\"info\\\" size=10></td></tr>\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<tr><td>Fill with value: <br> <input type=text name=\\\"secondinfo\\\" size=20>\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<tr><td>Fill with value: <br> <textarea name=\\\"thirdinfo\\\" cols=40 rows=10></textarea>\");\r\n\t\tresponseContent.append(\"</td></tr>\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<tr><td><INPUT TYPE=\\\"submit\\\" NAME=\\\"Send\\\" VALUE=\\\"Send\\\"></INPUT></td>\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<td><INPUT TYPE=\\\"reset\\\" NAME=\\\"Clear\\\" VALUE=\\\"Clear\\\" ></INPUT></td></tr>\");\r\n\t\tresponseContent.append(\"</table></FORM>\\r\\n\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<CENTER><HR WIDTH=\\\"75%\\\" NOSHADE color=\\\"blue\\\"></CENTER>\");\r\n\r\n\t\t// POST\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<CENTER>POST FORM<HR WIDTH=\\\"75%\\\" NOSHADE color=\\\"blue\\\"></CENTER>\");\r\n\t\tresponseContent.append(\"<FORM ACTION=\\\"/formpost\\\" METHOD=\\\"POST\\\">\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<input type=hidden name=getform value=\\\"POST\\\">\");\r\n\t\tresponseContent.append(\"<table border=\\\"0\\\">\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<tr><td>Fill with value: <br> <input type=text name=\\\"info\\\" size=10></td></tr>\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<tr><td>Fill with value: <br> <input type=text name=\\\"secondinfo\\\" size=20>\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<tr><td>Fill with value: <br> <textarea name=\\\"thirdinfo\\\" cols=40 rows=10></textarea>\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<tr><td>Fill with file (only file name will be transmitted): <br> \"\r\n\t\t\t\t\t\t+ \"<input type=file name=\\\"myfile\\\">\");\r\n\t\tresponseContent.append(\"</td></tr>\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<tr><td><INPUT TYPE=\\\"submit\\\" NAME=\\\"Send\\\" VALUE=\\\"Send\\\"></INPUT></td>\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<td><INPUT TYPE=\\\"reset\\\" NAME=\\\"Clear\\\" VALUE=\\\"Clear\\\" ></INPUT></td></tr>\");\r\n\t\tresponseContent.append(\"</table></FORM>\\r\\n\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<CENTER><HR WIDTH=\\\"75%\\\" NOSHADE color=\\\"blue\\\"></CENTER>\");\r\n\r\n\t\t// POST with enctype=\"multipart/form-data\"\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<CENTER>POST MULTIPART FORM<HR WIDTH=\\\"75%\\\" NOSHADE color=\\\"blue\\\"></CENTER>\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<FORM ACTION=\\\"/formpostmultipart\\\" ENCTYPE=\\\"multipart/form-data\\\" METHOD=\\\"POST\\\">\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<input type=hidden name=getform value=\\\"POST\\\">\");\r\n\t\tresponseContent.append(\"<table border=\\\"0\\\">\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<tr><td>Fill with value: <br> <input type=text name=\\\"info\\\" size=10></td></tr>\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<tr><td>Fill with value: <br> <input type=text name=\\\"secondinfo\\\" size=20>\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<tr><td>Fill with value: <br> <textarea name=\\\"thirdinfo\\\" cols=40 rows=10></textarea>\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<tr><td>Fill with file: <br> <input type=file name=\\\"myfile\\\">\");\r\n\t\tresponseContent.append(\"</td></tr>\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<tr><td><INPUT TYPE=\\\"submit\\\" NAME=\\\"Send\\\" VALUE=\\\"Send\\\"></INPUT></td>\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<td><INPUT TYPE=\\\"reset\\\" NAME=\\\"Clear\\\" VALUE=\\\"Clear\\\" ></INPUT></td></tr>\");\r\n\t\tresponseContent.append(\"</table></FORM>\\r\\n\");\r\n\t\tresponseContent\r\n\t\t\t\t.append(\"<CENTER><HR WIDTH=\\\"75%\\\" NOSHADE color=\\\"blue\\\"></CENTER>\");\r\n\r\n\t\tresponseContent.append(\"</body>\");\r\n\t\tresponseContent.append(\"</html>\");\r\n\r\n\t\tChannelBuffer buf = ChannelBuffers.copiedBuffer(\r\n\t\t\t\tresponseContent.toString(), CharsetUtil.UTF_8);\r\n\t\t// Build the response object.\r\n\t\tHttpResponse response = new DefaultHttpResponse(HttpVersion.HTTP_1_1,\r\n\t\t\t\tHttpResponseStatus.OK);\r\n\t\tresponse.setContent(buf);\r\n\t\tresponse.setHeader(HttpHeaders.Names.CONTENT_TYPE,\r\n\t\t\t\t\"text/html; charset=UTF-8\");\r\n\t\tresponse.setHeader(HttpHeaders.Names.CONTENT_LENGTH,\r\n\t\t\t\tString.valueOf(buf.readableBytes()));\r\n\t\t// Write the response.\r\n\t\te.getChannel().write(response);\r\n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tString rs=\"<button>Clik here this was POST request</button>\";\n\t\tresp.getWriter().write(rs);\n\t}", "String getResponse();", "private JPanel makeButtonPanel()\n {\n // Create the containing panel\n JPanel buttonPanel = new JPanel();\n buttonPanel.setBackground(_backColor);\n\n // Create the CANCEL button\n JButton cancelButton = new JButton(\"CANCEL\");\n // Clear editFlag and data, then return back to main action panel if Cancel is pressed\n // TODO Remove this lambda expressionl; it produces a Javadoc error\n cancelButton.addActionListener((a) -> _hdCiv.back());\n\n // Create the SUBMIT button\n JButton submitButton = new JButton(\"SUBMIT\");\n\n // Display error message if received from submit button, or new Hero if OK\n submitButton.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent event)\n {\n // Call the Civ to validate the attributes. If no errors, Hero\n // is created and displayed\n EnumMap<PersonKeys, String> input = submit();\n if ((input != null) && (input.size() > 0)) {\n // Create the new Hero and display it\n Hero hero = _nhCiv.createHero(input);\n _hdCiv.displayHero(hero, true); // initial Hero needs true\n }\n }\n });\n\n // Create a little space between buttons\n JLabel space = new JLabel(SPACER);\n // Add the two buttons to the panel\n buttonPanel.add(submitButton);\n buttonPanel.add(space);\n buttonPanel.add(cancelButton);\n return buttonPanel;\n }", "@GET\r\n @Produces(\"text/html\")\r\n public String getHtml() {\r\n return \"<html><body>the solution is :</body></html> \";\r\n }", "@Override\n\tpublic Button createButton() {\n\t\treturn new HtmlButton();\n\t}", "public void generatePostHeader (\n HttpServletRequest request, HttpServletResponse response)\n throws IOException\n {\n request.getParameter(\"Blabbo\"); // Dummy read to send continue back to the client.\n BuildHtmlHeader(new PrintWriter (response.getOutputStream()), getTitle());\n }", "private void createResponseToolbar ( ExpandableComposite parent ) {\n \t\trawAction = new ShowRawAction();\n \t\trawAction.setChecked(true);\n \t\tbrowserAction = new ShowInBrowserAction();\n \n \t\tToolBarManager toolBarManager = new ToolBarManager(SWT.FLAT);\n \t\tToolBar toolbar = toolBarManager.createControl(parent);\n \n \t\ttoolBarManager.add(new FileSaveAction());\n \t\ttoolBarManager.add(new OpenInXMLEditorAction());\n \t\ttoolBarManager.add(rawAction);\n \t\ttoolBarManager.add(browserAction);\n \n \t\ttoolBarManager.update(true);\n \n \t\tparent.setTextClient(toolbar);\n \t}", "@Test\n\tpublic void testBinaryOperationHtmlResponseFromProvider() throws Exception {\n\t\tHttpGet httpGet = new HttpGet(\"http://localhost:\" + ourPort + \"/Patient/html/$binaryOp\");\n\t\thttpGet.addHeader(\"Accept\", \"text/html\");\n\n\t\tCloseableHttpResponse status = ourClient.execute(httpGet);\n\t\tString responseContent = IOUtils.toString(status.getEntity().getContent(), Charsets.UTF_8);\n\t\tstatus.close();\n\t\tassertEquals(200, status.getStatusLine().getStatusCode());\n\t\tassertEquals(\"text/html\", status.getFirstHeader(\"content-type\").getValue());\n\t\tassertEquals(\"<html>DATA</html>\", responseContent);\n\t\tassertEquals(\"Attachment;\", status.getFirstHeader(\"Content-Disposition\").getValue());\n\t}", "@Override\r\n public void onResponse(String response) {\n button.setText(\"Response is: \" + response);\r\n Log.i(NAME, response);\r\n }", "private JButton getJButtonAcceptHTML() {\r\n\r\n\t\tif (jButtonAcceptHTML == null) {\r\n\t\t\tjButtonAcceptHTML = new JButton();\r\n\t\t\tjButtonAcceptHTML.setBounds(new Rectangle(183, 258, 106, 21));\r\n\t\t\tjButtonAcceptHTML.setText(StringDatabase.getUniqueInstance ()\r\n\t\t\t\t.getString(\"HTMLTextEditor.jButtonAcceptHTML.Text\"));\r\n\t\t\tjButtonAcceptHTML\r\n\t\t\t\t.addActionListener(new java.awt.event.ActionListener() {\r\n\r\n\t\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\r\n\t\t\t\t\t\t//update the commentText\r\n\t\t\t\t\t\tcommentText = ekitCoreEditorHTMLPanel.getDocumentBody();\r\n\t\t\t\t\t\textendedHTMLEditorKit =\r\n\t\t\t\t\t\t\tekitCoreEditorHTMLPanel.gethtmlKit();\r\n\t\t\t\t\t\textendedHTMLDocument =\r\n\t\t\t\t\t\t\tekitCoreEditorHTMLPanel.gethtmlDoc();\r\n\t\t\t\t\t\tsetVisible(false);\r\n\t\t\t\t\t\tokButton = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t}\r\n\t\treturn jButtonAcceptHTML;\r\n\t}", "@Override\n public ExtensionResult getButtons(ExtensionRequest extensionRequest) {\n Map<String, String> output = new HashMap<>();\n\n ButtonTemplate button = new ButtonTemplate();\n button.setTitle(\"This is title\");\n button.setSubTitle(\"This is subtitle\");\n button.setPictureLink(SAMPLE_IMAGE_PATH);\n button.setPicturePath(SAMPLE_IMAGE_PATH);\n List<EasyMap> actions = new ArrayList<>();\n EasyMap bookAction = new EasyMap();\n bookAction.setName(\"Label\");\n bookAction.setValue(\"Payload\");\n actions.add(bookAction);\n button.setButtonValues(actions);\n\n ButtonBuilder buttonBuilder = new ButtonBuilder(button);\n output.put(OUTPUT, buttonBuilder.build());\n\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 }", "@Override\n public ExtensionResult dogetFormcuti(ExtensionRequest extensionRequest) {\n\n Map<String, String> output = new HashMap<>();\n String formId = appProperties.getFormIdCuti();\n FormBuilder formBuilder = new FormBuilder(formId);\n ButtonTemplate button = new ButtonTemplate();\n button.setTitle(\"Form Cuti\");\n button.setSubTitle(\"Form Cuti\");\n button.setPictureLink(Image_cuti);\n button.setPicturePath(Image_cuti);\n List<EasyMap> actions = new ArrayList<>();\n EasyMap bookAction = new EasyMap();\n bookAction.setName(\"Isi Form\");\n bookAction.setValue(formBuilder.build());\n// bookAction.setValue(appProperties.getShortenFormCuti());\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 }", "private void hahaha() {\t\t\n\t\tfinal Button searchButton = new Button(\"Search\");\n\t\tfinal TextBox nameField = new TextBox();\n\t\tnameField.setText(\"GWT User\");\n\t\tfinal Label errorLabel = new Label();\n\t\t\n\t\t// We can add style names to widgets\n\t\tsearchButton.addStyleName(\"sendButton\");\n\n\t\t// Add the nameField and sendButton to the RootPanel\n\t\t// Use RootPanel.get() to get the entire body element\n\t\tRootPanel.get(\"nameFieldContainer\").add(nameField);\n\t\tRootPanel.get(\"sendButtonContainer\").add(searchButton);\n\t\tRootPanel.get(\"errorLabelContainer\").add(errorLabel);\n\n\t\t// Focus the cursor on the name field when the app loads\n\t\tnameField.setFocus(true);\n\t\tnameField.selectAll();\n\n\t\t// Create the popup dialog box\n\n\t\t// Create a handler for the sendButton and nameField\n\t\tclass MyHandler implements ClickHandler, KeyUpHandler {\n\t\t\t/**\n\t\t\t * Fired when the user clicks on the sendButton.\n\t\t\t */\n\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\tsendNameToServer();\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Fired when the user types in the nameField.\n\t\t\t */\n\t\t\tpublic void onKeyUp(KeyUpEvent event) {\n\t\t\t\tif (event.getNativeKeyCode() == KeyCodes.KEY_ENTER) {\n\t\t\t\t\tsendNameToServer();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Send the name from the nameField to the server and wait for a\n\t\t\t * response.\n\t\t\t */\n\t\t\tprivate void sendNameToServer() {\n\t\t\t\t// First, we validate the input.\n\t\t\t\terrorLabel.setText(\"\");\n\t\t\t\tString textToServer = nameField.getText();\n\t\t\t\tif (!FieldVerifier.isValidName(textToServer)) {\n\t\t\t\t\terrorLabel.setText(\"Please enter at least four characters\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Then, we send the input to the server.\n\t\t\t\t// sendButton.setEnabled(false);\n\t\t\t\tSearchRequest request = new SearchRequest();\n\t\t\t\tDate twoMinsAgo = new Date(new Date().getTime() - 1000*60*2);\n\t\t\t\trequest.setFetchTime(Interval.after(twoMinsAgo));\n\t\t\t\tgreetingService.greetServer(request,\n\t\t\t\t\t\tnew AsyncCallback<Collection<Place>>() {\n\t\t\t\t\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t\t\t\t\tnotification.handleFailure(caught);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tpublic void onSuccess(Collection<Place> result) {\n\t\t\t\t\t\t\t\t// TODO: sign of utter stupidity\n\t\t\t\t\t\t\t\tfinal MapWidget map = (MapWidget) RootPanel\n\t\t\t\t\t\t\t\t\t\t.get(\"mapsTutorial\").getWidget(0);\n\t\t\t\t\t\t\t\tmap.clearOverlays();\n\n\t\t\t\t\t\t\t\tLatLng markerPos = null;\n\t\t\t\t\t\t\t\tfor (final Place place : result) {\n\t\t\t\t\t\t\t\t\tLocation coordinates = place.getCoordinates();\n\t\t\t\t\t\t\t\t\tmarkerPos = LatLng.newInstance(\n\t\t\t\t\t\t\t\t\t\t\tcoordinates.getLatitude(), coordinates.getLongitude());\n\n\t\t\t\t\t\t\t\t\t// Add a marker\n\t\t\t\t\t\t\t\t\tMarkerOptions options = MarkerOptions\n\t\t\t\t\t\t\t\t\t\t\t.newInstance();\n\t\t\t\t\t\t\t\t\toptions.setTitle(place.getAddress());\n\t\t\t\t\t\t\t\t\tMarker marker = new Marker(markerPos,\n\t\t\t\t\t\t\t\t\t\t\toptions);\n\t\t\t\t\t\t\t\t\tfinal LatLng currMarkerPos = markerPos;\n\t\t\t\t\t\t\t\t\tmarker.addMarkerClickHandler(new MarkerClickHandler() {\n\n\t\t\t\t\t\t\t\t\t\tpublic void onClick(\n\t\t\t\t\t\t\t\t\t\t\t\tMarkerClickEvent event) {\n\t\t\t\t\t\t\t\t\t\t\tPlaceFormatter places = new PlaceFormatter();\n\t\t\t\t\t\t\t\t\t\t\tInfoWindowContent wnd = new InfoWindowContent(places.format(place));\n\t\t\t\t\t\t\t\t\t\t\twnd.setMaxWidth(200);\n\t\t\t\t\t\t\t\t\t\t\tmap.getInfoWindow().open(\n\t\t\t\t\t\t\t\t\t\t\t\t\tcurrMarkerPos,\n\t\t\t\t\t\t\t\t\t\t\t\t\twnd);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\tmap.addOverlay(marker);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (markerPos != null) {\n\t\t\t\t\t\t\t\t\tmap.setCenter(markerPos);\n\t\t\t\t\t\t\t\t\tmap.setZoomLevel(12);\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}\n\t\t}\n\n\t\t// Add a handler to send the name to the server\n\t\tMyHandler handler = new MyHandler();\n\t\tsearchButton.addClickHandler(handler);\n\t\tnameField.addKeyUpHandler(handler);\n\t\t\n\t\tfinal Button startFetching = new Button(\"Fetch\");\n\t\tRootPanel.get(\"startFetchingContainer\").add(startFetching);\n\t\tstartFetching.addClickHandler(new ClickHandler() {\n\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\tadminService.checkDataSources(new AsyncCallback<AdminResponse>() {\n\t\t\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t\t\tnotification.handleFailure(caught);\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tpublic void onSuccess(AdminResponse result) {\n\t\t\t\t\t\tnotification.show(\"Coolio\", \"Everything is cool\", \"\");\n\t\t\t\t\t};\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}", "private SpeechletResponse getHelpResponse() {\n\t\tString speechText = \"Please ask Flight Check the status of a flight by providing the airline name followed by the flight number. For example, Flight Check, what is the status of Lufthansa flight 112. Now, what can I help you with?\";\n\t\t// Create the plain text output.\n\t\tPlainTextOutputSpeech speech = new PlainTextOutputSpeech();\n\t\tspeech.setText(speechText);\n\n\t\t// Create reprompt\n\t\tReprompt reprompt = new Reprompt();\n\t\treprompt.setOutputSpeech(speech);\n\n\t\treturn SpeechletResponse.newAskResponse(speech, reprompt);\n\t}", "java.lang.String getResponse();", "public String getHTMLPage() {\r\n String s = \"<html><body>\" + MySystem.lineBreak;\r\n s += \"<h1>Room Control module</h1>\" + MySystem.lineBreak;\r\n s += \"<p>This module controls any on/off-node connected to ARNE bus.</p>\" + MySystem.lineBreak;\r\n s += \"<h2>Controls:</h2>\";\r\n s += \"<center><p><table border=\\\"1\\\" cellpadding=\\\"3\\\" cellspacing=\\\"0\\\">\";\r\n Iterator it = roomObjects.keySet().iterator();\r\n while (it.hasNext()) {\r\n GenRoomObject o = (GenRoomObject)roomObjects.get(it.next());\r\n if (o!=null) {\r\n if (o.displHTML) { //if display this object (configured in modGenRoomControl.xml)\r\n s += \"<tr><td>\" + o.name + \"</td><td>[<a href=\\\"toggle:\" + o.name + \"\\\">toggle</a>]</td><td>[<a href=\\\"on:\" + o.name + \"\\\">ON</a>]</td><td>[<a href=\\\"off:\" + o.name + \"\\\">OFF</a>]</td></tr></tr>\";\r\n }\r\n }\r\n }\r\n s += \"</table></center>\";\r\n s += \"</body></html>\";\r\n return s;\r\n }", "@GET\n @Produces(\"text/html\")\n public Response Hello() {\n return Response.status(Response.Status.OK).entity(\"This is a restaurant api service\").build();\n }", "private RButton getOkButton() {\n if (okButton == null) {\n okButton = new RButton();\n okButton.setText(\"<%= ivy.cms.co(\\\"/Buttons/ok\\\") %>\");\n okButton.setName(\"okButton\");\n }\n return okButton;\n }", "public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {\n\t\n\t\tresponse.setContentType(\"text/html\");\n\t\tresponse.setStatus(HttpServletResponse.SC_OK);\n\t\t\n\t\tPrintWriter out = response.getWriter();\n\t\t\n\t\tout.println(header());\n\t\tout.println(\"input[type=text], input[type=password] { width: 100%; padding: 12px 20px; margin: 8px 0;display: inline-block;border: 1px solid #ccc; box-sizing: border-box }\");\n\t\tout.println(\"button { background-color: #000000; color: white; padding: 14px 20px; margin: 8px 0; border: none; cursor: pointer; width: 100%; }\");\n\t\tout.println(\".cancelbtn { padding: 14 px 20px; background-color: #000000; }\");\n\t\tout.println(\".cancelbtn,.signupbtn { float:left; width 50%; }\");\n\t\tout.println(\".container { padding: 16px; } \");\n\t\tout.println(\"clearfix: after { content: \\\"\\\"; clear: both; display: table: }\");\n\t\tout.println(closeStyle());\n\t\tout.println(body(\"ThreadsMusic\"));\n\t\tout.println(\"<img src=\\\"http://i64.tinypic.com/jkvnlz.jpg\\\" height= \\\"75\\\" width=\\\"100\\\" style=\\\"float:left;\\\"/>\");\n\t\tout.println(\"<h2> Sign Up </h2>\");\n\t\tout.println(\"<h5> Sign Up for free and enjoy the music! </h5>\");\n\t\tout.println(\"<form id=\\\"newAccount\\\" action=\\\"newAccount\\\" method=\\\"post\\\" style=\\\"border:1px solid #ccc\\\">\");\n\t\tout.println(\"<div class=\\\"container\\\">\");\n\t\tout.println(\"<label><b> Username </b></label>\");\n\t\tout.println(\"<input type=\\\"text\\\" placeholder=\\\"Username\\\" name=\\\"username\\\" required>\");\n\t\tout.println(\"<label><b> Password </b></label>\");\n\t\tout.println(\"<input type=\\\"password\\\" placeholder=\\\"Password\\\" name=\\\"password\\\" required>\");\n\t\tout.println(\"<label><b>Confirm Password</b></label>\");\n\t\tout.println(\"<input type=\\\"password\\\" placeholder=\\\"Confirm Your Password\\\" name=\\\"confirmPassword\\\" required>\");\n\t\tout.println(\"<div class=\\\"clearfix\\\">\");\n\t\tout.println(\"<button type=\\\"submit\\\" class=\\\"signupbtn\\\"> Sign Up </button>\");\n\t\tout.println(\"<form id=\\\"main\\\" action=\\\"mainmenu\\\" method=\\\"get\\\" style=\\\"border:1px solid #ccc\\\">\");\n\t\tout.println(\"<div class=\\\"clearfix\\\">\");\n\t\tout.println(\"<button type=\\\"mainmenu\\\" class=\\\"signupbtn\\\">Main Menu</button>\");\n\t\tout.println(\"</form><div class=\\\"tfclear\\\"></div></div></p>\");\n\t\tout.println(footer());\n\t\tout.println(\"</div></div></form>\");\n\t\tout.println(end());\n\t}", "public Response hello() {\n \t\t\n \t\treturn new StreamingResponse(\"text/xml\", \"<a f=\\\"\" + this.parameters.get(\"y\") + \"\\\" />\");\n \t}", "protected void createContents() throws Exception {\n\t\tshlGecco = new Shell();\n\t\tshlGecco.setImage(SWTResourceManager.getImage(jdView.class, \"/images/yc.ico\"));\n\t\tshlGecco.setSize(1366, 736);\n\t\tshlGecco.setText(\"gecco爬取京东信息\");\n\t\tshlGecco.setLocation(0, 0);\n\t\tshlGecco.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\tSashForm sashForm = new SashForm(shlGecco, SWT.NONE);\n\t\tsashForm.setOrientation(SWT.VERTICAL);\n\n\t\tGroup group = new Group(sashForm, SWT.NONE);\n\t\tgroup.setFont(SWTResourceManager.getFont(\"Microsoft YaHei UI\", 10, SWT.BOLD));\n\t\tgroup.setText(\"爬取查询条件\");\n\t\tgroup.setLayout(new FillLayout(SWT.HORIZONTAL));\n\n\t\tSashForm sashForm_2 = new SashForm(group, SWT.NONE);\n\n\t\tGroup group_2 = new Group(sashForm_2, SWT.NONE);\n\t\tgroup_2.setText(\"爬取条件\");\n\n\t\tLabel lblip = new Label(group_2, SWT.NONE);\n\t\tlblip.setLocation(34, 27);\n\t\tlblip.setSize(113, 21);\n\t\tlblip.setText(\"输入开始爬取地址:\");\n\n\t\ttxtSearchUrl = new Text(group_2, SWT.BORDER);\n\t\ttxtSearchUrl.setLocation(153, 23);\n\t\ttxtSearchUrl.setSize(243, 23);\n\t\ttxtSearchUrl.setText(\"https://www.jd.com/allSort.aspx\");\n\n\t\tbtnSearch = new Button(group_2, SWT.NONE);\n\t\tbtnSearch.setLocation(408, 23);\n\t\tbtnSearch.setSize(82, 25);\n\n\t\tbtnSearch.setEnabled(false);\n\t\tbtnSearch.setText(\"开始爬取\");\n\n\t\tGroup group_3 = new Group(sashForm_2, SWT.NONE);\n\t\tgroup_3.setText(\"查询条件\");\n\n\t\tLabel label_2 = new Label(group_3, SWT.NONE);\n\t\tlabel_2.setLocation(77, 25);\n\t\tlabel_2.setSize(86, 25);\n\t\tlabel_2.setText(\"选择查询条件:\");\n\n\t\tcombo = new Combo(group_3, SWT.NONE);\n\t\tcombo.setLocation(169, 23);\n\t\tcombo.setSize(140, 23);\n\t\tcombo.setItems(new String[] { \"全部\", \"商品总类别\", \"子类别名\", \"类别链接\" });\n\t\t// combo.setText(\"全部\");\n\n\t\tbutton = new Button(group_3, SWT.NONE);\n\t\tbutton.setLocation(524, 23);\n\t\tbutton.setSize(80, 25);\n\t\tbutton.setText(\"点击查询\");\n\t\tbutton.setEnabled(false);\n\n\t\tcombo_1 = new Combo(group_3, SWT.NONE);\n\t\tcombo_1.setEnabled(false);\n\t\tcombo_1.setLocation(332, 23);\n\t\tcombo_1.setSize(170, 23);\n\t\t// combo_1.setItems(new String[] { \"全部\" });\n\t\t// combo_1.setText(\"全部\");\n\t\tsashForm_2.setWeights(new int[] { 562, 779 });\n\t\tGroup group_1 = new Group(sashForm, SWT.NONE);\n\t\tgroup_1.setFont(SWTResourceManager.getFont(\"Microsoft YaHei UI\", 10, SWT.BOLD));\n\t\tgroup_1.setText(\"爬取结果\");\n\t\tgroup_1.setLayout(new FillLayout(SWT.HORIZONTAL));\n\n\t\tSashForm sashForm_1 = new SashForm(group_1, SWT.NONE);\n\n\t\tGroup group_Categorys = new Group(sashForm_1, SWT.NONE);\n\t\tgroup_Categorys.setText(\"商品分组\");\n\t\tgroup_Categorys.setLayout(new FillLayout(SWT.HORIZONTAL));\n\n\t\tcategorys = new Table(group_Categorys, SWT.BORDER | SWT.FULL_SELECTION);\n\t\tcategorys.setHeaderVisible(true);\n\t\tcategorys.setLinesVisible(true);\n\n\t\tTableColumn ParentName = new TableColumn(categorys, SWT.NONE);\n\t\tParentName.setWidth(87);\n\t\tParentName.setText(\"商品总类别\");\n\n\t\tTableColumn Title = new TableColumn(categorys, SWT.NONE);\n\t\tTitle.setWidth(87);\n\t\tTitle.setText(\"子类别名\");\n\n\t\tTableColumn Ip = new TableColumn(categorys, SWT.NONE);\n\t\tIp.setWidth(152);\n\t\tIp.setText(\"类别链接\");\n\n\t\tGroup group_ProductBrief = new Group(sashForm_1, SWT.NONE);\n\t\tgroup_ProductBrief.setText(\"商品简要信息列表\");\n\t\tgroup_ProductBrief.setLayout(new FillLayout(SWT.HORIZONTAL));\n\n\t\tproductBrief = new Table(group_ProductBrief, SWT.BORDER | SWT.FULL_SELECTION);\n\t\tproductBrief.setLinesVisible(true);\n\t\tproductBrief.setHeaderVisible(true);\n\n\t\tTableColumn Code = new TableColumn(productBrief, SWT.NONE);\n\t\tCode.setWidth(80);\n\t\tCode.setText(\"商品编号\");\n\n\t\tTableColumn Detailurl = new TableColumn(productBrief, SWT.NONE);\n\t\tDetailurl.setWidth(162);\n\t\tDetailurl.setText(\"商品详情链接\");\n\n\t\tTableColumn Preview = new TableColumn(productBrief, SWT.NONE);\n\t\tPreview.setWidth(170);\n\t\tPreview.setText(\"商品图片链接\");\n\n\t\tTableColumn Dtitle = new TableColumn(productBrief, SWT.NONE);\n\t\tDtitle.setWidth(150);\n\t\tDtitle.setText(\"商品标题\");\n\n\t\tGroup group_ProductDetail = new Group(sashForm_1, SWT.NONE);\n\t\tgroup_ProductDetail.setText(\"商品详细信息\");\n\t\tgroup_ProductDetail.setLayout(new FillLayout(SWT.HORIZONTAL));\n\n\t\tComposite composite = new Composite(group_ProductDetail, SWT.NONE);\n\n\t\tPDetail = new Text(composite,\n\t\t\t\tSWT.BORDER | SWT.READ_ONLY | SWT.WRAP | SWT.H_SCROLL | SWT.V_SCROLL | SWT.CANCEL | SWT.MULTI);\n\t\tPDetail.setLocation(55, 339);\n\t\tPDetail.setSize(360, 220);\n\n\t\tLabel Id = new Label(composite, SWT.NONE);\n\t\tId.setBounds(31, 28, 61, 15);\n\t\tId.setText(\"商品编号:\");\n\n\t\tLabel detail = new Label(composite, SWT.NONE);\n\t\tdetail.setText(\"商品详情:\");\n\t\tdetail.setBounds(31, 311, 61, 15);\n\n\t\tLabel title = new Label(composite, SWT.NONE);\n\t\ttitle.setText(\"商品标题:\");\n\t\ttitle.setBounds(31, 64, 61, 15);\n\n\t\tLabel jdAd = new Label(composite, SWT.NONE);\n\t\tjdAd.setText(\"商品广告:\");\n\t\tjdAd.setBounds(31, 201, 61, 15);\n\n\t\tLabel price = new Label(composite, SWT.NONE);\n\t\tprice.setBounds(31, 108, 61, 15);\n\t\tprice.setText(\"价格:\");\n\n\t\tdcode = new Text(composite, SWT.BORDER);\n\t\tdcode.setEditable(false);\n\t\tdcode.setBounds(98, 25, 217, 21);\n\n\t\tLabel jdprice = new Label(composite, SWT.NONE);\n\t\tjdprice.setBounds(75, 127, 48, 15);\n\t\tjdprice.setText(\"京东价:\");\n\n\t\tLabel srcPrice = new Label(composite, SWT.NONE);\n\t\tsrcPrice.setBounds(75, 166, 48, 15);\n\t\tsrcPrice.setText(\"原售价:\");\n\n\t\tdprice = new Text(composite, SWT.BORDER);\n\t\tdprice.setEditable(false);\n\t\tdprice.setBounds(128, 127, 187, 21);\n\n\t\tdsrcPrice = new Text(composite, SWT.BORDER);\n\t\tdsrcPrice.setEditable(false);\n\t\tdsrcPrice.setBounds(128, 166, 187, 21);\n\n\t\tdtitle = new Text(composite,\n\t\t\t\tSWT.BORDER | SWT.READ_ONLY | SWT.WRAP | SWT.H_SCROLL | SWT.V_SCROLL | SWT.CANCEL | SWT.MULTI);\n\t\tdtitle.setBounds(98, 62, 217, 42);\n\n\t\tLabel label = new Label(composite, SWT.NONE);\n\t\tlabel.setText(\"广告标题:\");\n\t\tlabel.setBounds(62, 233, 61, 15);\n\n\t\tLabel label_1 = new Label(composite, SWT.NONE);\n\t\tlabel_1.setText(\"广告链接:\");\n\t\tlabel_1.setBounds(62, 272, 61, 15);\n\n\t\tadtitle = new Text(composite, SWT.BORDER);\n\t\tadtitle.setEditable(false);\n\t\tadtitle.setBounds(128, 231, 187, 21);\n\n\t\tadUrl = new Text(composite, SWT.BORDER);\n\t\tadUrl.setEditable(false);\n\t\tadUrl.setBounds(128, 270, 187, 21);\n\t\tsashForm_1.setWeights(new int[] { 335, 573, 430 });\n\t\tsashForm.setWeights(new int[] { 85, 586 });\n\n\t\tdoEvent();// 组件的事件操作\n\n\t}", "private String doDogs(){\n return \"HTTP/1.1 200 OK\\r\\n\"\n + \"Content-Type: text/html\\r\\n\"\n + \"\\r\\n\"\n + \"<!DOCTYPE html>\\n\"\n + \"<html>\\n\"\n + \"<head>\\n\"\n + \"<meta charset=\\\"UTF-8\\\">\\n\"\n + \"<title>Dogs!!</title>\\n\"\n + \"</head>\\n\"\n + \"<body>\\n\"\n + \"<img src=\\\"https://www.happets.com/blog/wp-content/uploads/2019/08/ventajas-de-un-dispensador-de-comida-para-perros.jpg\\\" />\\n\"\n + \"</body>\\n\"\n + \"</html>\\n\";\n }", "private String httpOk() {\n return \"HTTP/1.1 200 OK\\r\\n\"\n + \"Content-Type: text/html\\r\\n\"\n + \"\\r\\n\";\n }", "private SlackerOutput handleHelp() {\n logger.debug(\"Handling help request\");\n List<WorkflowMetadata> metadata = registry.getWorkflowMetadata();\n Collections.sort(metadata, new Comparator<WorkflowMetadata>() {\n @Override\n public int compare(WorkflowMetadata m1, WorkflowMetadata m2) {\n String p1 = StringUtils.join(m1.getPath(), \"::\");\n String p2 = StringUtils.join(m2.getPath(), \"::\");\n return p1.compareTo(p2);\n }\n });\n StringBuilder sb = new StringBuilder(\"I can understand:\\n\");\n for (WorkflowMetadata wm : metadata) {\n sb.append(StringUtils.join(wm.getPath(), \" \"))\n .append(\" \")\n .append(trimToEmpty(wm.getArgsSpecification()))\n .append(\"\\n\").append(\" \")\n .append(trimToEmpty(wm.getName()))\n .append(\" - \").append(trimToEmpty(wm.getDescription()))\n .append(\"\\n\");\n }\n return new TextOutput(sb.toString());\n }", "private void renderObjetos() {\n // Agrego los botones a la barra\n this.rBotones.add(this.btnOK);\n this.rBotones.add(this.btnCancel);\n }", "@Override\n public void onResponse(String response)\n {\n httpReturn.setText(\"RESPOSTA:\\n\" + response.toString());\n httpReturn.setTextColor(Color.BLUE);\n httpReturn.setTextSize((float) 22.5);\n }", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tresponse.setContentType(\"text/html;charset=UTF-8\");\n\t\tresponse.getWriter().append(\"<form action='http://localhost:8080/ElementerOnWeb/ReturnComplexHtmlServlet' method='POST'>\\r\\n\" + \n\t\t\t\t\" <input type=\\\"radio\\\" name=\\\"gender\\\" value=\\\"male\\\" checked> Male<br>\\r\\n\" + \n\t\t\t\t\" <input type=\\\"radio\\\" name=\\\"gender\\\" value=\\\"female\\\"> Female<br>\\r\\n\" + \n\t\t\t\t\" <input type=\\\"radio\\\" name=\\\"gender\\\" value=\\\"other\\\"> Other\\r\\n\" + \n\t\t\t\t\" <input type=\\\"submit\\\" name=\\\"post\\\" value=\\\"Kaydet\\\"/> \\r\\n\" + \n\t\t\t\t\"</form>\");\n\t\t\n\t}", "@SuppressWarnings(\"unlikely-arg-type\")\r\n\t@Override\r\n\tpublic void handle(HttpExchange he) throws IOException {\n\t\t\r\n\t\tif(\"0:0:0:0:0:0:0:1\".equals(he.getLocalAddress().getHostName())) { //esta pagina es para el servidor\r\n\t\t\t\r\n\t\tString cad=\"<input type=\\\"button\\\" value=\\\"CLICK\\\" onclick=\\\"window.location.href='/descarga\"+OpenFileDialog.ext+\"'\\\">\";\r\n\r\n\t\tString response=\t\t\t\r\n\t\t\t\"<!DOCTYPE html>\"+\r\n \t\t\"<html>\"+\r\n \t\t\"<body>\"+\r\n \t\t\r\n \t\t\"<h1> Direccion IP </h1>\" + \r\n \t\t\"<h2>\" + new Host().daDireccioIP()+\":\"+ Prueba10.puerto +\"</h2>\"+\r\n \t\t\r\n\t\t\t\"<p>Click para cargar direccion</p>\" + \r\n\t\t\t\"<form method=\\\"get\\\">\" + \r\n\t\t\t\"<input type=\\\"button\\\" value=\\\"CLICK\\\" onclick=\\\"window.location.href='/openFileDialog'\\\">\" + \r\n\t\t\t\"</form>\"+\t\t\r\n\t\t\t\"<h4>\" + OpenFileDialog.ruta + \"</h4>\" +\r\n\t\t\t\r\n\t\t\t\"<p>Click para Descargar</p>\" + \r\n\t\t\t\"<form method=\\\"get\\\">\" + \r\n\t\t\tcad + \r\n\t\t\t\"</form>\"+\r\n \r\n\t\t\t\"<p>Click para apagar</p>\" + \r\n\t\t\t\"<form method=\\\"get\\\">\" + \r\n\t\t\t\"<input type=\\\"button\\\" value=\\\"CLICK\\\" onclick=\\\"window.location.href='/apagado'\\\">\" + \r\n\t\t\t\"</form>\"+\r\n\t\t\t\t\t\t\t\r\n\t\t\t\"</body>\"+\r\n\t\t\t\"</html>\"\r\n\t\t\t;\r\n\t\t\r\n\t\the.sendResponseHeaders(200, response.length()); \r\n\t\tOutputStream outputStream = he.getResponseBody();\r\n\t\toutputStream.write(response.getBytes());\r\n\t\toutputStream.close();\r\n\t\t\r\n\t\t}else {//esta pagina es para el cliente, el cual solo puede descargar archivos\r\n\t\t\t\r\n\t\t\tString cad=\"<input type=\\\"button\\\" value=\\\"CLICK\\\" onclick=\\\"window.location.href='/descarga\"+OpenFileDialog.ext+\"'\\\">\";\r\n\r\n\t\t\tString response=\t\t\t\r\n\t\t\t\t\"<!DOCTYPE html>\"+\r\n\t \t\t\"<html>\"+\r\n\t \t\t\"<body>\"+\r\n\r\n\t\t\t\t\"<p>Click para Descargar</p>\" + \r\n\t\t\t\t\"<form method=\\\"get\\\">\" + \r\n\t\t\t\tcad + \r\n\t\t\t\t\"</form>\"+\r\n\t\t\t\t\r\n \t\t\t\"<h1> Archivo </h1>\" + \r\n \t\t\t\"<h2>\" + OpenFileDialog.nombreArch + \"</h2>\"+\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\"</body>\"+\r\n\t\t\t\t\"</html>\"\r\n\t\t\t\t;\r\n\t\t\t\r\n\t\t\the.sendResponseHeaders(200, response.length()); \r\n\t\t\tOutputStream outputStream = he.getResponseBody();\r\n\t\t\toutputStream.write(response.getBytes());\r\n\t\t\toutputStream.close();\r\n\t\t\t\r\n\t\t}\r\n\t}", "public HBox hbButtons() {\r\n\r\n HBox hbBottom = new HBox(10); //HBox for buttons at the bottom\r\n\r\n hbBottom.setAlignment(Pos.CENTER); //Set Buttoms to center\r\n hbBottom.setPadding(new Insets(10, 1, 1, 1)); //Padd it\r\n\r\n //SetId\r\n btnConfirm.setId(\"btn\");\r\n btnEdit.setId(\"btn\");\r\n\r\n //Add buttons to the bottom HBox\r\n hbBottom.getChildren().addAll(btnConfirm, btnEdit);\r\n\r\n //Handlers\r\n btnConfirm.setOnAction(new ConfirmHandler()); //Handler for confirm\r\n btnEdit.setOnAction(new EditHandler()); //Handler for edit\r\n\r\n return hbBottom;\r\n\r\n }", "private JButton getJButtonOK() {\r\n\t\tif (jButtonOK == null) {\r\n\t\t\tjButtonOK = new JButton();\r\n\t\t\tjButtonOK.setText(BOTONCREAR);\r\n\t\t\tjButtonOK.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\r\n\t\t\t\t\tcambiarPass();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn jButtonOK;\r\n\t}", "public void displayResponse(String input)\n\t{\n\t\tJOptionPane.showMessageDialog(null, input);\n\t}", "public void createHeader() {\n\t\tHBox box = new HBox();\n\t\tButton printBtn = new Button(\"Print\");\n\t\tprintBtn.getStyleClass().addAll(\"btn\", \"btn-primary\");\n\t\tButton printAllBtn = new Button(\"Print allemaal\");\n\t\tprintAllBtn.getStyleClass().addAll(\"btn\", \"btn-primary\");\n\t\tButton cancelBtn = new Button(\"Annuleer\");\n\t\tcancelBtn.getStyleClass().addAll(\"btn\", \"btn-danger\");\n\t\tbox.getChildren().addAll(createTitle(), printBtn, printAllBtn, cancelBtn);\n\t\t\n\t\tprintBtn.setOnAction(e -> {\n\t\t\ttry {\n\t\t\t\tprintController.printSelected(debiteuren);\n\t\t\t} catch (Exception e1) {\n\t\t\t\te1.printStackTrace();\n\t\t\t\tSystem.out.println(\"Nothing selected mate\");\n\t\t\t}\n\t\t});\n\t\t\n\t\tprintAllBtn.setOnAction(e -> {\n\t\t\ttry {\n\t\t\t\tprintController.printAll(debiteuren);\n\t\t\t} catch (Exception e1) {\n\t\t\t\te1.printStackTrace();\n\t\t\t\tSystem.out.println(\"Nothing selected mate\");\n\t\t\t}\n\t\t});\n\t\t\n\t\tcancelBtn.setOnAction(e -> {\n\t\t\tprintController.cancel();\n\t\t});\n\t\t\n\t\tsetTop(box);\n\t}", "public void generateGetHeader (\n HttpServletRequest request, HttpServletResponse response)\n throws IOException\n {\n BuildHtmlHeader(new PrintWriter (response.getOutputStream()), getTitle());\n }", "public abstract String getResponse();", "public void doGet(HttpServletRequest request,\n\t HttpServletResponse response)\n\t throws ServletException, IOException\n\t {\n\t response.setContentType(\"text/html\");\n\n\t // Actual logic goes here.\n\t PrintWriter out = response.getWriter();\n\t out.println(\"<h1>\" + message + \"</h1>\");\n\t }", "protected Button getOkButton()\r\n\t{\r\n\t\treturn okButton;\r\n\t}", "public void txtResponse(String response , Player player);", "private JLabel createButtonDescription() {\r\n JLabel buttonDescription = new JLabel(\"Result\");\r\n buttonDescription.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n buttonDescription.setBorder(new EmptyBorder(5, 5, 5, 5));\r\n buttonDescription.setText(\"Play again?\");\r\n buttonDescription.setFont(new Font(null, Font.PLAIN, 20));\r\n return buttonDescription;\r\n }", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tint editorId = Integer.parseInt(request.getParameter(\"editor\"));\n\t\tEditor E = webpicture.getEditorById(editorId);\n\t\tArrayList<Diagram> diagrams = webpicture.getAllDiagramsForEditor(E);\n\t\tDiagram current = null;\n\t\tString strDiagrams = \"\";\n\t\t\n\t\tif (diagrams.isEmpty()) {\n\t\t\tstrDiagrams = \"<div class=\" + '\"' + \"hero-titles\" + '\"' + \">\" + \"\\n\" + \"<h3 class=\" + '\"' + \"marketing-header\" + '\"' + \" style=\" + '\"' + \"text-align:center; margin-top:50px\" + '\"' + \">\" + \"There's no available diagrams to display\" + \"</h3>\" + \"\\n\" + \"</div>\";\n\t\t\t\n\t\t} else {\n\t\t\tfor (int i = 0; i < diagrams.size(); i++) {\n\t\t\t\tcurrent = diagrams.get(i);\n\t\t\t\tstrDiagrams += current.toString(\n\t\t\t\t\t\tdateParser.dateToString(current.getCreated()),\n\t\t\t\t\t\tdateParser.dateToString(current.getLastModified()));\n\t\t\t}\n\t\t}\n\t\tresponse.setContentType(\"text/html\");\n\t\tout = response.getWriter();\n\t\tString html = \"<! DOCTYPE html><meta charset='UTF-8'><html lang='en'><link rel='icon' href='resources/res/siteIcon.png' type='image/x-icon'> <meta name='viewport' content='width=device-width, initial-scale=1.0'> <meta name='description' content='Index web site for WebPicture online DSL model editor'> <head><title>WebPicture</title><link rel='icon' href='resources/res/siteIcon.png' type='image/x-icon'><!-- JQuery --><script src='http://code.jquery.com/jquery-2.1.1.js'></script> <script src='http://code.jquery.com/ui/jquery-ui-git.js'></script><!-- Bootstrap --> <script src='http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js'></script> <link rel='stylesheet' href='http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css'> <!-- Bootbox --> <script src='resources/bootbox/bootbox.js'></script> <!-- Hojas de estilo --> <link rel='stylesheet' href='http://yui.yahooapis.com/pure//pure.css'> <link rel='stylesheet' href='http://yui.yahooapis.com/pure/0.5.0/pure-min.css'> <link rel='stylesheet' href='http://yui.yahooapis.com/pure//grids-responsive.css'> <link rel='stylesheet' href='resources/pure-css/css/layouts/marketing.css'> <link rel='stylesheet' href='http://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css'> <link rel='stylesheet' href='resources/pure-css/css/layouts/headers.css'></head> <body> <div class='header'> <div class='home-menu pure-menu pure-menu-open pure-menu-horizontal pure-menu-fixed' style='background-color:#181818'> <a class='pure-menu-heading' href='welcome'> <img src='resources/res/logo.png' class='pure-img' /> </a> </div> </div> <div class='pure-g'><!-- Informacion del editor -->\"\n\t\t\t\t+ E.dataToString(dateParser.dateToString(E.getCreated()))\n\t\t\t\t+ \"<div id='diagrams' class='pure-u-2-3' style='text-align:center; height:100%; overflow-y: auto'> <div class='hero-titles'><h3 class='hero-tagline' style='text-align:center; margin-top:50px'>Available diagrams</h3> </div> <form id='editorDetailForm' name='editorDetailForm' method='post' action='review_models_for_editor'><!-- Inicio plantilla de celda de tabla para un editor-->\" \n\t\t\t\t+ strDiagrams \n\t\t\t\t+ \"<!-- Fin plantilla--> <!-- Fin acceso a diagramas existentes --> </div>\"\n\t\t\t\t+ \"<input id='editorModel' type='hidden' value='' name='editor' /></form>\"\n\t\t\t\t+ \"</div><div class='footer l-box is-center' style='background-color:#181818; margin-top:0px'><p>All rights reserved Uniandes 2014</p><p>Universidad de los Andes - Computer engineering department - Engineering Faculty</p></div>\"\n\t\t\t\t+ \"<!-- Script de referencia para llamar la funcion de acuerdo al comando y al editor seleccionado-->\"\n\t\t\t\t+ \"<script> \"\n\t\t\t\t+ \"var form = $('#editorDetailForm'); \"\n\t\t\t\t+ \"function getSelectedActionForEditor(action, editor) {if (action == 'delete') {bootbox.dialog({message: 'Current editor will be deleted, would you like to continue?',buttons: {success: {label: 'Yes',className: 'btn-primary',callback: function () { $('#editorModel').val(editor);form.attr('action', 'available_editors');console.log('entro');form.on('submit', function (e) {$.ajax({url: form.attr('action'),type: form.attr('method'),data: form.serialize(),success: function (data) {},error: function (jXHR, textStatus, errorThrown) {alert(errorThrown);}});return false;});form.submit();window.location = 'all_editors';}},danger: {label: 'No',className: 'btn-danger',callback: function () {}}}});}else if (action == 'newModel') {$('#editorModel').val(editor);form.attr('action', 'new_diagram');form.on('submit', function (e) {$.ajax({url: $(this).attr('action'),type: $(this).attr('method'),data: $(this).serialize(),success: function (data) {},error: function (jXHR, textStatus, errorThrown) {alert(errorThrown);}});return true;});form.submit();}}\"\n\t\t\t\t+ \"function getSelectedActionForModel(action, model) { if (action == 'delete') {bootbox.dialog({message: 'Selected item will be deleted, would you like to continue?',buttons: {success: {label: 'Yes',className: 'btn-primary',callback: function () {$('#diagram_' + model).fadeOut(500, function () {$(this).remove();});$('#pad_' + model).fadeOut(500, function () {$(this).remove();});$('#editorModel').val(model);console.log($('#editorModel').val());form.attr('action', 'review_models_for_editor');form.on('submit', function (e) {$.ajax({url: form.attr('action'),type: form.attr('method'),data: form.serialize(),success: function (data) {},error: function (jXHR, textStatus, errorThrown) {alert(errorThrown);}});});form.submit();checkState();form.attr('action','editor_information');$('#editorModel').val(\" + E.getId() + \");form.submit();}},danger: {label: 'No',className: 'btn-danger',callback: function () {}}}});}else if (action == 'editDiagram') {$('#editorModel').val(model);console.log('new model');form.attr('action', 'get_diagram');form.on('submit', function (e) {$.ajax({url: $(this).attr('action'),type: $(this).attr('method'),data: $(this).serialize(),success: function (data) {},error: function (jXHR, textStatus, errorThrown) {alert(errorThrown);}});return true;});form.submit();}} \"\n\t\t\t\t+ \"function checkState() { \"\n\t\t\t\t+ \"var elements = $('#diagrams > div').length;var elements = $('#diagrams > div').length;\"\n\t\t\t\t+ \"var msg = \\\"<div class=\\\" + '\\\"' + \\\"hero-titles\\\" + '\\\"' + \\\">\\\" + \\\"<h3 class=\\\" + '\\\"' + \\\"marketing-header\\\" + '\\\"' + \\\" style=\\\" + '\\\"' + \\\"text-align:center; margin-top:50px\\\" + '\\\"' + \\\">\\\" + \\\"There's no available diagrams to display\\\" + \\\"</h3>\\\" + \\\"</div>\\\";\"\n\t\t\t\t+ \"if (elements == 3) {$('#diagrams').append(msg);}\"\n\t\t\t\t+ \"}\"\n\t\t\t\t+ \"</script>\"\n\t\t\t\t+ \"</body></html>\";\n\t\tout.println(html);\n\t\tout.close();\n\t}", "protected void createContents() throws UnknownHostException, IOException, InterruptedException {\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tshlUser = new Shell();\r\n\t\tshlUser.setSize(450, 464);\r\n\t\tshlUser.setText(\"QQ聊天室\\r\\n\");\r\n\t\t\r\n\t\ttext = new Text(shlUser, SWT.BORDER);\r\n\t\ttext.setEnabled(false);\r\n\t\ttext.setBounds(0, 52, 424, 187);\r\n\t\t\r\n\t\t\r\n\t\ttext_1 = new Text(shlUser, SWT.BORDER);\t\t\r\n\t\ttext_1.setBounds(23, 263, 274, 23);\r\n\t\t\r\n\t\tButton button = new Button(shlUser, SWT.CENTER);\r\n\t\tbutton.setText(\"发送\");\r\n\t\tbutton.setBounds(321, 257, 80, 27);\r\n\t\t\r\n\t\ttext_2 = new Text(shlUser, SWT.BORDER);\r\n\t\ttext_2.setText(\"abc\");\r\n\t\ttext_2.setBounds(61, 7, 91, 23);\r\n\t\t\r\n\t\tLabel lblNewLabel = new Label(shlUser, SWT.NONE);\r\n\t\tlblNewLabel.setBounds(0, 10, 51, 17);\r\n\t\tlblNewLabel.setText(\"昵称:\");\r\n\t\t\r\n\t\tButton btnNewButton = new Button(shlUser, SWT.NONE);\r\n\t\tbtnNewButton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tnew Thread() {\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t// 连接服务器\r\n\t\t\t\t\t\t\t\tsocket = new Socket(\"127.0.0.1\", 8888);\r\n\t\t\t\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t\t\t\t// 如果连不上服务器,说明服务器未启动,则启动服务器\r\n\t\t\t\t\t\t\t\tserver = new ServerSocket(8888);\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"服务器启动完成,监听端口:8888\");\r\n\t\t\t\t\t\t\t\tsocket = server.accept();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t/**\r\n\t\t\t\t\t\t\t * 注意:所有在自定义线程中修改图形控件属性,\r\n\t\t\t\t\t\t\t * 都必须使用 shell.getDisplay().asyncExec() 方法\r\n\t\t\t\t\t\t\t */\r\n\t\t\t\t\t\t\tshlUser.getDisplay().asyncExec(new Runnable() {\r\n\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\tMessageBox mb = new MessageBox(shlUser,SWT.OK);\r\n\t\t\t\t\t\t\t\t\tmb.setText(\"系统提示\");\r\n\t\t\t\t\t\t\t\t\tmb.setMessage(\"连接成功!现在你可以开始聊天了!\");\r\n\t\t\t\t\t\t\t\t\tmb.open();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\ttalker = new Talker(socket, new MsgListener() {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\tpublic void onMessage(String msg) {\r\n\t\t\t\t\t\t\t\t\t// 收到消息时,将消息更新到多行文本框\r\n\t\t\t\t\t\t\t\t\tshlUser.getDisplay().asyncExec(new Runnable() {\r\n\t\t\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\t\t\ttext.setText(text.getText() + msg + \"\\r\\n\");\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\tpublic void onConnect(InetAddress addr) {\r\n\t\t\t\t\t\t\t\t\t// 连接成功时,显示对方IP\r\n\t\t\t\t\t\t\t\t\tshlUser.getDisplay().asyncExec(new Runnable() {\r\n\t\t\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\t\t\tlblNewLabel.setText(\"好友IP:\" + addr.getHostAddress());\r\n\t\t\t\t\t\t\t\t\t\t\ttext.setEnabled(true);\r\n\t\t\t\t\t\t\t\t\t\t\tbutton.setEnabled(true);\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t\t\tthrow new RuntimeException(e);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}.start();\r\n\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\ttMsg = new Text(shlUser, SWT.BORDER);\r\n\t\ttMsg.setEnabled(false);\r\n\t\ttMsg.setBounds(10, 364, 414, 26);\r\n\r\n\t\t\r\n\t\tbtnNewButton.setBounds(324, 7, 80, 27);\r\n\t\tbtnNewButton.setText(\"连接服务器\");\r\n\t\tbutton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\ttry {\r\n\t\t\t\t\tif (tMsg.getText().trim().isEmpty() == false) {\r\n\t\t\t\t\t\tString msg = talker.send(text_2.getText(), tMsg.getText());\r\n\t\t\t\t\t\ttext.setText(text.getText() + msg + \"\\r\\n\");\r\n\t\t\t\t\t\ttMsg.setText(\"\");\r\n\t\t\t\t\t\t// 设置焦点\r\n\t\t\t\t\t\ttMsg.setFocus();\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (IOException e1) {\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\r\n\t\t});\r\n\t\t\r\n\t}", "public ResponseType response(PostRequestType input) {\n return new ResponseType(\"Thanks for your post, \" + input.getName() + \"!\");\n }", "@RequestMapping(method = RequestMethod.GET, value = \"_help\")\n\tpublic @ResponseBody\n\tRestResponseWelcome welcomeHelp() {\n\t\tWelcome welcome = new Welcome(helpMessage());\n\t\twelcome.setApis(helpApiList());\n\t\treturn new RestResponseWelcome(welcome);\n\t}", "private static GetButtonTemResponse Getbutton(GetButtonTem log) {\r\n com.wsclient.EJBWebServicev20_Service service = new com.wsclient.EJBWebServicev20_Service();\r\n com.wsclient.EJBWebServicev20 port = service.getEJBWebServicev20Port();\r\n return port.getButtonTempW(log);\r\n }", "private void createContents() {\r\n\t\tshell = new Shell();\r\n\t\tshell.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_BACKGROUND));\r\n\t\tshell.setSize(500, 400);\r\n\t\tshell.setText(\"SWT Application\");\r\n\t\tshell.setLayout(new FormLayout());\r\n\t\t\r\n\t\tSERVER_COUNTRY locale = SERVER_COUNTRY.DE;\r\n\t\tString username = JOptionPane.showInputDialog(\"Username\");\r\n\t\tString password = JOptionPane.showInputDialog(\"Password\");\r\n\t\tBot bot = new Bot(username, password, locale);\r\n\t\t\r\n\t\tGroup grpActions = new Group(shell, SWT.NONE);\r\n\t\tgrpActions.setText(\"Actions\");\r\n\t\tgrpActions.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_BACKGROUND));\r\n\t\tgrpActions.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.NORMAL));\r\n\t\tgrpActions.setForeground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_BACKGROUND));\r\n\t\tgrpActions.setLayout(new GridLayout(5, false));\r\n\t\tFormData fd_grpActions = new FormData();\r\n\t\tfd_grpActions.left = new FormAttachment(0, 203);\r\n\t\tfd_grpActions.right = new FormAttachment(100, -10);\r\n\t\tfd_grpActions.top = new FormAttachment(0, 10);\r\n\t\tfd_grpActions.bottom = new FormAttachment(0, 152);\r\n\t\tgrpActions.setLayoutData(fd_grpActions);\r\n\t\t\r\n\t\tConsole = new Text(shell, SWT.BORDER | SWT.READ_ONLY | SWT.V_SCROLL | SWT.MULTI);\r\n\t\tFormData fd_Console = new FormData();\r\n\t\tfd_Console.left = new FormAttachment(grpActions, 0, SWT.LEFT);\r\n\t\tfd_Console.right = new FormAttachment(100, -10);\r\n\t\tConsole.setLayoutData(fd_Console);\r\n\r\n\t\t\r\n\t\tButton Feed = new Button(grpActions, SWT.CHECK);\r\n\t\tFeed.setSelection(true);\r\n\t\tFeed.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tfeed = !feed;\r\n\t\t\t\tConsole.append(\"\\nTest\");\r\n\t\t\t}\r\n\t\t});\r\n\t\tFeed.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tFeed.setText(\"Feed\");\r\n\t\tnew Label(grpActions, SWT.NONE);\r\n\t\t\r\n\t\tButton Drink = new Button(grpActions, SWT.CHECK);\r\n\t\tDrink.setSelection(true);\r\n\t\tDrink.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tdrink = !drink;\r\n\t\t\t}\r\n\t\t});\r\n\t\tDrink.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tDrink.setText(\"Drink\");\r\n\t\tnew Label(grpActions, SWT.NONE);\r\n\t\t\r\n\t\tButton Stroke = new Button(grpActions, SWT.CHECK);\r\n\t\tStroke.setSelection(true);\r\n\t\tStroke.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tstroke = !stroke;\r\n\t\t\t}\r\n\t\t});\r\n\t\tStroke.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tStroke.setText(\"Stroke\");\r\n\t\t\r\n\t\t\r\n\t\t//STATIC\r\n\t\tLabel lblNewLabel_0 = new Label(grpActions, SWT.NONE);\r\n\t\tlblNewLabel_0.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tlblNewLabel_0.setImage(SWTResourceManager.getImage(MainWindow.class, \"/PNGs/feed.png\"));\r\n\t\tnew Label(grpActions, SWT.NONE);\r\n\t\t\r\n\t\tLabel lblNewLabel_1 = new Label(grpActions, SWT.NONE);\r\n\t\tlblNewLabel_1.setImage(SWTResourceManager.getImage(MainWindow.class, \"/PNGs/drink.png\"));\r\n\t\tlblNewLabel_1.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tnew Label(grpActions, SWT.NONE);\r\n\t\t\r\n\t\t\r\n\t\tGroup grpBreeds = new Group(shell, SWT.NONE);\r\n\t\tgrpBreeds.setText(\"Breeds\");\r\n\t\tgrpBreeds.setLayout(new GridLayout(1, false));\r\n\t\t\r\n\t\tFormData fd_grpBreeds = new FormData();\r\n\t\tfd_grpBreeds.top = new FormAttachment(0, 10);\r\n\t\tfd_grpBreeds.bottom = new FormAttachment(100, -10);\r\n\t\tfd_grpBreeds.right = new FormAttachment(0, 180);\r\n\t\tfd_grpBreeds.left = new FormAttachment(0, 10);\r\n\t\tgrpBreeds.setLayoutData(fd_grpBreeds);\r\n\t\t\r\n\t\tButton Defaults = new Button(grpBreeds, SWT.RADIO);\r\n\t\tDefaults.setText(\"Defaults\");\r\n\t\t//END STATIC\r\n\t\t\r\n\t\tbot.account.api.requests.setTimeout(200);\r\n\t\tbot.logger.printlevel = 1;\t\r\n\t\t\r\n\t\tReturn<HashMap<Integer,Breed>> b = bot.getBreeds();\t\t\r\n\t\tif(!b.sucess) {\r\n\t\t\tConsole.append(\"\\nERROR!\");\r\n\t\t\tSystem.exit(-1);\r\n\t\t}\t\t\r\n\t\t\r\n\t\t\r\n\r\n\t\tIterator<Breed> iterator = b.data.values().iterator();\r\n\t\tHashMap<String, java.awt.Button> buttons = new HashMap<String, Button>();\r\n\t\t\r\n\t\twhile(iterator.hasNext()) {\r\n\t\t\tBreed breed = iterator.next();\r\n\t\t\t\r\n\t\t\tString name = breed.name;\r\n\t\t\t\r\n\t\t\tButton btn = new Button(grpBreeds, SWT.RADIO);\r\n\t\t\tbtn.setText(name);\r\n\t\t\t\r\n\t\t\tbuttons.put(name, btn);\r\n\t\t\t\r\n\t\t\t//\tTODO - Für jeden Breed wird ein Button erstellt:\r\n\t\t\t//\tButton [HIER DER BREED NAME] = new Button(grpBreeds, SWT.RADIO); <-- Dass geht nicht so wirklich so\r\n\t\t\t//\tDefaults.setText(\"[BREED NAME]\");\r\n\t\t}\r\n\t\t\r\n\t\t// um ein button mit name <name> zu bekommen: Button whatever = buttons.get(<name>);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tButton btnStartBot = new Button(shell, SWT.NONE);\r\n\t\tfd_Console.top = new FormAttachment(0, 221);\r\n\t\tbtnStartBot.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tConsole.setText(\"Starting bot... \");\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t/*TODO\r\n\t\t\t\tBreed[] breeds = new Breed[b.data.size()];\r\n\t\t\t\t\r\n\t\t\t\tIterator<Breed> br = b.data.values().iterator();\r\n\t\t\t\t\r\n\t\t\t\tfor(int i = 0; i < b.data.size(); i++) {\r\n\t\t\t\t\tbreeds[i] = br.next();\r\n\t\t\t\t};\r\n\t\t\t\tBreed s = (Breed) JOptionPane.showInputDialog(null, \"Choose breed\", \"breed selector\", JOptionPane.PLAIN_MESSAGE, null, breeds, \"default\");\r\n\t\t\t\tEND TODO*/\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t//Breed breed, boolean drink, boolean stroke, boolean groom, boolean carrot, boolean mash, boolean suckle, boolean feed, boolean sleep, boolean centreMission, long timeout, Bot bot, Runnable onEnd\r\n\t\t\t\tReturn<BasicBreedTasksAsync> ret = bot.basicBreedTasks(0, drink, stroke, groom, carrot, mash, suckle, feed, sleep, mission, 500, new Runnable() {\r\n\r\n\t\t\t\t@Override\r\n\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"FINISHED!\", \"Bot\", JOptionPane.PLAIN_MESSAGE);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\tbot.logout();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\tif(!ret.sucess) {\r\n\t\t\t\t\tConsole.append(\"ERROR\");\r\n\t\t\t\t\tSystem.exit(-1);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tret.data.start();\r\n\t\t\t\t\r\n\t\t\t\t//TODO\r\n\t\t\t\twhile(ret.data.running()) {\r\n\t\t\t\t\tSleeper.sleep(5000);\r\n\t\t\t\t\tif(ret.data.getProgress() == 1)\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tConsole.append(\"progress: \" + (ret.data.getProgress() * 100) + \"%\");\r\n\t\t\t\t\tConsole.append(\"ETA: \" + (ret.data.getEta() / 1000) + \"sec.\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\tFormData fd_btnStartBot = new FormData();\r\n\t\tfd_btnStartBot.left = new FormAttachment(grpActions, 0, SWT.LEFT);\r\n\t\tbtnStartBot.setLayoutData(fd_btnStartBot);\r\n\t\tbtnStartBot.setText(\"Start Bot\");\r\n\t\t\r\n\t\tButton btnStopBot = new Button(shell, SWT.NONE);\r\n\t\tfd_btnStartBot.top = new FormAttachment(btnStopBot, 0, SWT.TOP);\r\n\t\tbtnStopBot.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tConsole.append(\"Stopping bot...\");\r\n\t\t\t\tbot.logout();\r\n\t\t\t}\r\n\t\t});\r\n\t\tFormData fd_btnStopBot = new FormData();\r\n\t\tfd_btnStopBot.right = new FormAttachment(grpActions, 0, SWT.RIGHT);\r\n\t\tbtnStopBot.setLayoutData(fd_btnStopBot);\r\n\t\tbtnStopBot.setText(\"Stop Bot\");\r\n\t\t\t\r\n\t\t\r\n\t\tProgressBar progressBar = new ProgressBar(shell, SWT.NONE);\r\n\t\tfd_Console.bottom = new FormAttachment(progressBar, -6);\r\n\t\tfd_btnStopBot.bottom = new FormAttachment(progressBar, -119);\r\n\t\t\r\n\t\tFormData fd_progressBar = new FormData();\r\n\t\tfd_progressBar.left = new FormAttachment(grpBreeds, 23);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//STATIC\r\n\t\tLabel lblNewLabel_2 = new Label(grpActions, SWT.NONE);\r\n\t\tlblNewLabel_2.setImage(SWTResourceManager.getImage(MainWindow.class, \"/PNGs/stroke.png\"));\r\n\t\tlblNewLabel_2.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\t\r\n\t\tButton Groom = new Button(grpActions, SWT.CHECK);\r\n\t\tGroom.setSelection(true);\r\n\t\tGroom.setSelection(true);\r\n\t\tGroom.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tgroom = !groom;\r\n\t\t\t}\r\n\t\t});\r\n\t\tGroom.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tGroom.setText(\"Groom\");\r\n\t\tnew Label(grpActions, SWT.NONE);\r\n\t\t\r\n\t\tButton Treat = new Button(grpActions, SWT.CHECK);\r\n\t\tTreat.setSelection(true);\r\n\t\tTreat.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tcarrot = !carrot;\r\n\t\t\t}\r\n\t\t});\r\n\t\tTreat.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tTreat.setText(\"Treat\");\r\n\t\tnew Label(grpActions, SWT.NONE);\r\n\t\t\r\n\t\tButton Mash = new Button(grpActions, SWT.CHECK);\r\n\t\tMash.setSelection(true);\r\n\t\tMash.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tmash = !mash;\r\n\t\t\t}\r\n\t\t});\r\n\t\tMash.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tMash.setText(\"Mash\");\r\n\t\t\r\n\t\tLabel lblNewLabel_3 = new Label(grpActions, SWT.NONE);\r\n\t\tlblNewLabel_3.setImage(SWTResourceManager.getImage(MainWindow.class, \"/PNGs/groom.png\"));\r\n\t\tlblNewLabel_3.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tnew Label(grpActions, SWT.NONE);\r\n\t\t\r\n\t\tLabel lblNewLabel_4 = new Label(grpActions, SWT.NONE);\r\n\t\tlblNewLabel_4.setImage(SWTResourceManager.getImage(MainWindow.class, \"/PNGs/carotte.png\"));\r\n\t\tlblNewLabel_4.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tnew Label(grpActions, SWT.NONE);\r\n\t\t\r\n\t\tLabel lblNewLabel_5 = new Label(grpActions, SWT.NONE);\r\n\t\tlblNewLabel_5.setImage(SWTResourceManager.getImage(MainWindow.class, \"/PNGs/mash.png\"));\r\n\t\tlblNewLabel_5.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\t\r\n\t\tButton btnSleep = new Button(grpActions, SWT.CHECK);\r\n\t\tbtnSleep.setSelection(true);\r\n\t\tbtnSleep.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tsleep = !sleep;\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnSleep.setText(\"Sleep\");\r\n\t\tnew Label(grpActions, SWT.NONE);\r\n\t\t\r\n\t\tButton btnMission = new Button(grpActions, SWT.CHECK);\r\n\t\tbtnMission.setSelection(true);\r\n\t\tbtnMission.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tmission = !mission;\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnMission.setText(\"Mission\");\r\n\t\tnew Label(grpActions, SWT.NONE);\r\n\t\tnew Label(grpActions, SWT.NONE);\r\n\r\n\t}", "public void service(HttpServletRequest request, HttpServletResponse response) throws IOException {\n String msg = request.getParameter(\"Body\");\n msg = msg.toLowerCase();\n System.out.println(\"-->\" + msg);\n\n String cmd = msg.split(\" \")[0];\n msg = msg.substring(msg.indexOf(' ')+1);\n\n String result = \"\";\n\n if (cmd.equals(\"usage\")) {\n System.out.println(\"usage\");\n result = \"Twilio Movie Assistant Usage Guide:\"\n + \"\\nLIST: Returns a list of movies available\"\n + \"\\nSHOW movie_num: Returns the movie's showtimes\";\n } else if (cmd.equals(\"list\")) {\n System.out.println(\"list\");\n Document doc;\n try {\n doc = Jsoup.connect(\"http://www.imdb.com/showtimes/cinema/CA/ci0961718/CA/H2W1G6\").get();\n Elements titles = doc.select(\".info > h3 > span > a\");\n System.out.println(titles.size());\n for (int i = 1; i <= titles.size(); i++) {\n String title = titles.get(i-1).text().split(\"\\\\(\")[0];\n title = title.substring(0, title.length()-1);\n result += \"\\n\" + i + \"-\" + title;\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n } else if (cmd.equals(\"show\")){\n System.out.println(\"showtimes\");\n Document doc;\n try {\n doc = Jsoup.connect(\"http://www.imdb.com/showtimes/cinema/CA/ci0961718/CA/H2W1G6\").get();\n Elements titles = doc.select(\".info > h3 > span > a\");\n Elements showtimes = doc.getElementsByClass(\"showtimes\");\n\n System.out.println(showtimes.size() + \" , \" + titles.size());\n for (int i = 0; i < titles.size(); i++) {\n String title = titles.get(i).text().toLowerCase().split(\"\\\\(\")[0];\n title = title.substring(0, title.length()-1);\n if ((\"\"+(i+1)).equals(msg)) {\n result = (titles.get(i).text() + \" : \" + showtimes.get(i).text());\n }\n }\n \n } catch (IOException e) {\n e.printStackTrace();\n }\n // } else if (cmd.equals(\"review\")) {\n // Document doc;\n // HttpURLConnection con;\n // try {\n // doc = Jsoup.connect(\"http://www.imdb.com/showtimes/cinema/CA/ci0961718/CA/H2W1G6\").get();\n // Elements titles = doc.select(\".info > h3 > span > a\");\n // System.out.println(titles.size());\n // String title = \"\";\n // for (int i = 0; i < titles.size(); i++) {\n // title = titles.get(i).text().split(\"\\\\(\")[0];\n // title = title.substring(0, title.length()-1);\n // if ((\"\"+i).equals(msg)) {\n // result = title;\n // break;\n // }\n // }\n // result = result.replace(' ', '+');\n // String url = \"http://api.rottentomatoes.com/api/public/v1.0/movies.json?q=\" + title + \"&page_limit=10&page=1&apikey=69dxhndmtkxf7f8m8bertygz\";\n\n // URL obj = new URL(url);\n // con = (HttpURLConnection) obj.openConnection();\n // con.setRequestMethod(\"GET\");\n // con.setRequestProperty(\"User-Agent\", \"Mozilla/5.0\");\n // BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));\n // String inputLine;\n // StringBuffer buf = new StringBuffer();\n \n // while ((inputLine = in.readLine()) != null) {\n // buf.append(inputLine);\n // }\n \n // JSONParser parser = new JSONParser(); \n // JSONObject json = (JSONObject) parser.parse(buf.toString());\n // JSONArray jsonArray = ((JSONArray)json.get(\"movies\"));\n // JSONObject movie1 = (JSONObject)jsonArray.get(0);\n // result = (String)movie1.get(\"synopsis\");\n \n // in.close();\n // } catch (IOException e) {\n // e.printStackTrace();\n // } catch (ParseException e) {\n \n // }\n } else {\n result = \"Cannot complete command: \" + msg;\n }\n\n System.out.println(result);\n\n Message message = new Message(result);\n TwiMLResponse twiml = new TwiMLResponse();\n try {\n twiml.append(message);\n } catch (TwiMLException e) {\n e.printStackTrace();\n }\n\n response.setContentType(\"application/xml\");\n response.getWriter().print(twiml.toXML());\n }", "@UiHandler(\"catalogue_search_send_button\")\r\n\t/*\r\n\t * Call to the OpenSearch service to get the list of the available\r\n\t * parameters\r\n\t */\r\n\tvoid onCatalogue_search_send_buttonClick(ClickEvent event) {\r\n\t\tString url = catalogue_search_panel_os_textbox.getValue();\r\n\t\tUrlValidator urlValidator = new UrlValidator();\r\n\t\tif (!urlValidator.isValidUrl(url, false)) {\r\n\t\t\tWindow.alert(\"ERROR : Opensearch URL not valid!\");\r\n\t\t} else {\r\n\t\t\topensearchService.getDescriptionFile(url, new AsyncCallback<Map<String, String>>() {\r\n\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void onFailure(Throwable caught) {\r\n\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\tSystem.out.println(\"fail!\");\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void onSuccess(final Map<String, String> result) {\r\n\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * Form building according to the available parameters\r\n\t\t\t\t\t * (result)\r\n\t\t\t\t\t */\r\n\t\t\t\t\tcatalogue_search_param_panel.setVisible(true);\r\n\r\n\t\t\t\t\tcatalogue_search_panel_see_description_button.setVisible(true);\r\n\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * Click on this button to see the description file\r\n\t\t\t\t\t */\r\n\t\t\t\t\tcatalogue_search_panel_see_description_button.addClickHandler(new ClickHandler() {\r\n\r\n\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\tpublic void onClick(ClickEvent event) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\t\tWindow.open(result.get(\"description\"), \"description\", result.get(\"description\"));\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * If the map doesn't contain the parameter then the field\r\n\t\t\t\t\t * is disabled. Otherwise, the parameter's key is register\r\n\t\t\t\t\t * to build the request url later\r\n\t\t\t\t\t */\r\n\t\t\t\t\tif (!result.containsKey(\"eo:platform\")) {\r\n\t\t\t\t\t\tcatalogue_search_panel_platform.setEnabled(false);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tcatalogue_search_panel_platform.setName(result.get(\"eo:platform\"));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!result.containsKey(\"eo:orbitType\")) {\r\n\t\t\t\t\t\tcatalogue_search_panel_orbitType.setEnabled(false);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tcatalogue_search_panel_orbitType.setName(result.get(\"eo:orbitType\"));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!result.containsKey(\"eo:instrument\")) {\r\n\t\t\t\t\t\tcatalogue_search_panel_sensor.setEnabled(false);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tcatalogue_search_panel_sensor.setName(result.get(\"eo:instrument\"));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!result.containsKey(\"eo:sensorType\")) {\r\n\t\t\t\t\t\tcatalogue_search_panel_sensortype.setEnabled(false);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tcatalogue_search_panel_sensortype.setName(result.get(\"eo:sensorType\"));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!result.containsKey(\"eo:sensorMode\")) {\r\n\t\t\t\t\t\tcatalogue_search_panel_sensorMode.setEnabled(false);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tcatalogue_search_panel_sensorMode.setName(result.get(\"eo:sensorMode\"));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!result.containsKey(\"eo:resolution\")) {\r\n\t\t\t\t\t\tcatalogue_search_panel_resolutionMax.setEnabled(false);\r\n\t\t\t\t\t\tcatalogue_search_panel_resolutionMin.setEnabled(false);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tcatalogue_search_panel_resolutionMax.setName(result.get(\"eo:resolution\"));\r\n\t\t\t\t\t\tcatalogue_search_panel_resolutionMin.setName(result.get(\"eo:resolution\"));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!result.containsKey(\"eo:swathId\")) {\r\n\t\t\t\t\t\tcatalogue_search_panel_swathId.setEnabled(false);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tcatalogue_search_panel_swathId.setName(result.get(\"eo:swathId\"));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!result.containsKey(\"eo:wavelength\")) {\r\n\t\t\t\t\t\tcatalogue_search_panel_waveLenght1.setEnabled(false);\r\n\t\t\t\t\t\tcatalogue_search_panel_waveLenght2.setEnabled(false);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tcatalogue_search_panel_waveLenght1.setName(result.get(\"eo:wavelength\"));\r\n\t\t\t\t\t\tcatalogue_search_panel_waveLenght2.setName(result.get(\"eo:wavelength\"));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!result.containsKey(\"eo:spectralRange\")) {\r\n\t\t\t\t\t\tcatalogue_search_panel_spectralRange.setEnabled(false);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tcatalogue_search_panel_spectralRange.setName(result.get(\"eo:spectralRange\"));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!result.containsKey(\"eo:orbitNumber\")) {\r\n\t\t\t\t\t\tcatalogue_search_panel_orbitMax.setEnabled(false);\r\n\t\t\t\t\t\tcatalogue_search_panel_orbitMin.setEnabled(false);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tcatalogue_search_panel_orbitMax.setName(result.get(\"eo:orbitNumber\"));\r\n\t\t\t\t\t\tcatalogue_search_panel_orbitMin.setName(result.get(\"eo:orbitNumber\"));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!result.containsKey(\"eo:orbitDirection\")) {\r\n\t\t\t\t\t\tcatalogue_search_panel_orbitDirection.setEnabled(false);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tcatalogue_search_panel_orbitDirection.setName(result.get(\"eo:orbitDirection\"));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!result.containsKey(\"eo:track\")) {\r\n\t\t\t\t\t\tcatalogue_search_panel_trackAccross.setEnabled(false);\r\n\t\t\t\t\t\tcatalogue_search_panel_trackAlong.setEnabled(false);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tcatalogue_search_panel_trackAccross.setName(result.get(\"eo:track\"));\r\n\t\t\t\t\t\tcatalogue_search_panel_trackAlong.setName(result.get(\"eo:track\"));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!result.containsKey(\"eo:frame\")) {\r\n\t\t\t\t\t\tcatalogue_search_panel_frame1.setEnabled(false);\r\n\t\t\t\t\t\tcatalogue_search_panel_frame2.setEnabled(false);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tcatalogue_search_panel_frame1.setName(result.get(\"eo:frame\"));\r\n\t\t\t\t\t\tcatalogue_search_panel_frame2.setName(result.get(\"eo:frame\"));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!result.containsKey(\"eo:identifier\")) {\r\n\t\t\t\t\t\tcatalogue_search_panel_identifier.setEnabled(false);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tcatalogue_search_panel_identifier.setName(result.get(\"eo:identifier\"));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!result.containsKey(\"eo:type\")) {\r\n\t\t\t\t\t\tcatalogue_search_panel_entryType.setEnabled(false);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tcatalogue_search_panel_entryType.setName(result.get(\"eo:type\"));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!result.containsKey(\"eo:acquisitionType\")) {\r\n\t\t\t\t\t\tcatalogue_search_panel_acquisitionType.setEnabled(false);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tcatalogue_search_panel_acquisitionType.setName(result.get(\"eo:acquisitionType\"));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!result.containsKey(\"eo:status\")) {\r\n\t\t\t\t\t\tcatalogue_search_panel_status.setEnabled(false);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tcatalogue_search_panel_status.setName(result.get(\"eo:status\"));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!result.containsKey(\"eo:archivingCenter\")) {\r\n\t\t\t\t\t\tcatalogue_search_panel_archivingCenter.setEnabled(false);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tcatalogue_search_panel_archivingCenter.setName(result.get(\"eo:archivingCenter\"));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!result.containsKey(\"eo:acquisitionStation\")) {\r\n\t\t\t\t\t\tcatalogue_search_panel_acquisitionStation.setEnabled(false);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tcatalogue_search_panel_acquisitionStation.setName(result.get(\"eo:acquisitionStation\"));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!result.containsKey(\"eo:processingCenter\")) {\r\n\t\t\t\t\t\tcatalogue_search_panel_processingCenter.setEnabled(false);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tcatalogue_search_panel_processingCenter.setName(result.get(\"eo:processingCenter\"));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!result.containsKey(\"eo:processingSoftware\")) {\r\n\t\t\t\t\t\tcatalogue_search_panel_processingSoftware.setEnabled(false);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tcatalogue_search_panel_processingSoftware.setName(result.get(\"eo:processingSoftware\"));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!result.containsKey(\"eo:processingDate\")) {\r\n\t\t\t\t\t\tcatalogue_search_panel_processingDate1.setEnabled(false);\r\n\t\t\t\t\t\tcatalogue_search_panel_processingDate2.setEnabled(false);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tcatalogue_search_panel_processingDate1.setName(result.get(\"eo:processingDate\"));\r\n\t\t\t\t\t\tcatalogue_search_panel_processingDate2.setName(result.get(\"eo:processingDate\"));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!result.containsKey(\"eo:processingLevel\")) {\r\n\t\t\t\t\t\tcatalogue_search_panel_processingLevel.setEnabled(false);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tcatalogue_search_panel_processingLevel.setName(result.get(\"eo:processingLevel\"));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!result.containsKey(\"eo:compositeType\")) {\r\n\t\t\t\t\t\tcatalogue_search_panel_compositeType.setEnabled(false);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tcatalogue_search_panel_compositeType.setName(result.get(\"eo:compositeType\"));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!result.containsKey(\"eo:contents\")) {\r\n\t\t\t\t\t\tcatalogue_search_panel_contents.setEnabled(false);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tcatalogue_search_panel_contents.setName(result.get(\"eo:contents\"));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!result.containsKey(\"eo:cloudCover\")) {\r\n\t\t\t\t\t\tcatalogue_search_panel_cloud.setEnabled(false);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tcatalogue_search_panel_cloud.setName(result.get(\"eo:cloudCover\"));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!result.containsKey(\"eo:snowCover\")) {\r\n\t\t\t\t\t\tcatalogue_search_panel_snow.setEnabled(false);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tcatalogue_search_panel_snow.setName(result.get(\"eo:snowCover\"));\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tSystem.out.println(\"success!\");\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t}\r\n\r\n\t}", "private void help() {\n String border = \"=====================================================================================\";\n String title = \"AILearning API:\\n\";\n String template = \"arguments: numOfControls, controls..., quantityOfEach, hasHighContrast, hasDisabled, \" +\n \"hasNoise, isUnsorted\\n\";\n String numOfCon= \"numOfControls - integer number of controls (1 - 6)\\n\";\n String contrls = \"controls... - each control is string and number of strings equals numOfControls\";\n String namesOfControls = \"Every string is define symbol:\\nB - Button, TF - TextField, RB - RadioButton\" +\n \"Sp - Spinner, Sl - Slider, CB - CheckBox\\n\";\n String quantityOfEach = \"quantityOfEach - integer number of each control (0 - 1 000 000)\\n\";\n String highContrast = \"hasHighContrast - string (true or false)\\n\";\n String disabled = \"hasDisabled - string (true of false)\\nif true - some controls will be disabled\\n\";\n String noise = \"hasNoise - string (true or false)\\n\";\n String unsorted = \"isUnsorted - string (true or false)\\nif true - controls will be in one folder\\n\";\n String example = \"Example: 3 B TF RB 100 true true true false\";\n String meaning = \"It means that app will generate 100 Buttons, 100 TextFields, 100 RadioButtons \" +\n \"with high contrast, noise,\\nsome controls will be disabled and locate in different folders\";\n\n System.out.println(String.format(\"%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\", border, title, template, numOfCon,\n contrls, namesOfControls, quantityOfEach, highContrast, disabled, noise, unsorted, example, meaning));\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 }", "private BButton getBtnOK() {\r\n\t\tif (btnOK == null) {\r\n\t\t\tbtnOK = new BButton();\r\n\t\t\tbtnOK.setText(\"OK\");\r\n\t\t\tbtnOK.setPreferredSize(new Dimension(100, 29));\r\n\t\t}\r\n\t\treturn btnOK;\r\n\t}", "public String create()\n {\n return createHtml();\n }", "private void createOKButtons() {\n okAddButton = addOKButton(\"Add Shape\");\n okRemoveButton = addOKButton(\"Remove Shape\");\n okAddKeyframeButton = addOKButton(\"Add Keyframe\");\n okAddKeyframeTimeButton = addOKButton(\"Add Keyframe Time\");\n okRemoveKeyframeButton = addOKButton(\"Remove Keyframe\");\n okRemoveKeyframeTimeButton = addOKButton(\"Remove Keyframe Time\");\n okEditKeyframeButton = addOKButton(\"Edit Keyframe\");\n okEditKeyframeTimeButton = addOKButton(\"Edit Keyframe Time\");\n okEditKeyframeFinalButton = addOKButton(\"Edit Keyframe Final\");\n okClearShapeButton = addOKButton(\"Clear Shape\");\n }", "public ServletResponse getResponse();", "@Override\n public void onResponse(String response) {\n try {\n JSONObject obj = new JSONObject(response);\n String content = obj.getString(\"content\");\n getAPI.setText(\"Response is: \" + content);\n } catch (JSONException error) {\n getAPI.setText(\"That didn't work!\");\n error.printStackTrace();\n }\n }", "@Override\n public void onResponse(String s) {\n Log.d(TAG, \"Form Response: \" + s);\n // create new toast to confirm user about demand generation\n Toast.makeText(context, context.getResources().getString(R.string.demand_generation) + itemName,\n Toast.LENGTH_LONG).show();\n\n }", "public static String display(String title, String header){\n Stage window = new Stage();\n window.initModality(Modality.APPLICATION_MODAL);\n window.setTitle(title);\n \n Label head = new Label(header);\n Button save = new Button(\"Save\");\n Button dontSave = new Button(\"Don't Save\");\n Button cancel = new Button(\"Cancel\");\n \n save.setOnAction(e-> {answer = \"save\"; window.close();}); \n dontSave.setOnAction(e-> {answer = \"dontSave\"; window.close();});\n cancel.setOnAction(e-> {answer = \"cancel\"; window.close();});\n \n VBox vBox = new VBox(10);\n vBox.setAlignment(Pos.CENTER);\n vBox.getChildren().addAll(head,save,dontSave,cancel);\n \n Scene scene = new Scene(vBox, 300, 200);\n window.setScene(scene);\n window.showAndWait();\n \n return answer;\n }", "String getAnswerResponse();", "private JButton addOKButton(){\n\t\tJButton okButton = new JButton(\"OK\");\n\t\tokButton.addActionListener(arg0 -> {\n\t\t\tinfo = new ChannelInfo(nameT.getText(), passwordT.getText(), null);\n\t\t\tsetVisible(false);\n\t\t});\n\t\treturn okButton;\n\t}", "public JButton getBtnHapus() {\n return btnHapus;\n }", "public String createHtml()\n {\n StringBuffer strEditor = new StringBuffer();\n\n strEditor.append(\"<div>\");\n String encodedValue = escapeXml(value.replaceAll(\"((\\r?\\n)+|\\t*)\", \"\"));\n\n if (check(request.getHeader(\"user-agent\")))\n {\n strEditor.append(createInputForVariable(instanceName, instanceName, encodedValue));\n // create config html\n String configStr = config.getUrlParams();\n if (configStr != null && configStr.length() > 0)\n {\n configStr = configStr.substring(1);\n strEditor.append(createInputForVariable(null, instanceName.concat(\"___Config\"), configStr));\n }\n\n // create IFrame\n String sLink = basePath.concat(\"/editor/fckeditor.html?InstanceName=\").concat(instanceName);\n if (toolbarSet != null && toolbarSet.length() > 0)\n {\n sLink += \"&Toolbar=\".concat(toolbarSet);\n }\n XHtmlTagTool iframeTag = new XHtmlTagTool(\"iframe\", XHtmlTagTool.SPACE);\n iframeTag.addAttribute(\"id\", instanceName.concat(\"___Frame\"));\n iframeTag.addAttribute(\"src\", sLink);\n iframeTag.addAttribute(\"width\", width);\n iframeTag.addAttribute(\"height\", height);\n iframeTag.addAttribute(\"frameborder\", \"no\");\n iframeTag.addAttribute(\"scrolling\", \"no\");\n strEditor.append(iframeTag);\n\n }\n else\n {\n XHtmlTagTool textareaTag = new XHtmlTagTool(\"textarea\", encodedValue);\n textareaTag.addAttribute(\"name\", instanceName);\n textareaTag.addAttribute(\"rows\", \"4\");\n textareaTag.addAttribute(\"cols\", \"40\");\n textareaTag.addAttribute(\"wrap\", \"virtual\");\n textareaTag.addAttribute(\"style\", \"width: \".concat(width).concat(\"; height: \").concat(height));\n }\n strEditor.append(\"</div>\");\n return strEditor.toString();\n }", "@SuppressWarnings(\"rawtypes\")\r\n\t@Override\r\n\tprotected Control createContents(Composite parent) {\r\n\t\tsetStatus(\"欢迎你,\" + this.puSysUser.getName());\r\n\t\tComposite container = new Composite(parent, SWT.NONE);\r\n\r\n\t\tint j = 0;\r\n\r\n\t\tLabel lblMac = new Label(container, SWT.NONE);\r\n\t\tlblMac.setAlignment(SWT.RIGHT);\r\n\t\tlblMac.setBounds(15, (j + 1) * paramsHight + 30 + 5, paramsWidht, 17);\r\n\t\tlblMac.setText(\"Mac地址:\");\r\n\r\n\t\tmacText = new Text(container, SWT.BORDER | SWT.READ_ONLY);\r\n\t\tmacText.setFont(SWTResourceManager.getFont(\"微软雅黑\", 12, SWT.NORMAL));\r\n\t\tmacText.setBounds(115, (j + 1) * paramsHight + 30, (length - 4) * paramsWidht + 88, 35);\r\n\r\n\t\tbtnmac = new Button(container, SWT.NONE);\r\n\t\tbtnmac.setBounds((length - 1) * paramsWidht + 15, (j + 1) * paramsHight + 30, 88, 35);\r\n\t\tbtnmac.setText(\"获取mac\");\r\n\t\tbtnmac.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tif (outputStream == null) {\r\n\t\t\t\t\t\toutputStream = serialPort.getOutputStream();\r\n\t\t\t\t\t}\r\n//\t\t\t\t\toutputStream.write(new byte[] { (byte) 0xfe, (byte) 0x2, (byte) 0xf1, (byte) 0x0, (byte) 0x6, (byte) 0x63, (byte) 0x41,\r\n//\t\t\t\t\t\t\t(byte) 0x0a, (byte) 0xfc, (byte) 0xb8, (byte) 0xdb, (byte) 0x4, (byte) 0xe6 });\r\n//\t\t\t\t\toutputStream.flush();\r\n\t\t\t\t} catch (IOException e1) {\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnmac.setEnabled(false);\r\n\t\tbtnmac.setVisible(false);\r\n\t\t\r\n\t\topenComBtn = new Button(container, SWT.NONE);\r\n\t\topenComBtn.setBounds((length - 2) * paramsWidht + 15, (j + 1) * paramsHight + 30, 88, 35);\r\n\t\topenComBtn.setText(\"打开串口\");\r\n\t\topenComBtn.forceFocus();\r\n\t\topenComBtn.addSelectionListener(new SelectionAdapter() {\r\n\t\t\tprivate Enumeration portList;\r\n\t\t\tprivate CommPortIdentifier portId;\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tlastMac=\"\";\r\n//\t\t\t\tbyte[] bbq = ByteUtil.hexToByte(\"55 55 02 01 06 10 FF 18 EE AC 52 0B 34 AD 00 03 13 08 78 67 C4 49 03 09 50 49 37 42 33 35 43 46 32 FD EE EE\".replaceAll(\" \", \"\"));\r\n//\t\t\t\thandleBuffer(bbq);\r\n\t\t\t\tif (comPortIsOpened) {\r\n\t\t\t\t\topenComBtn.setText(\"打开串口\");\r\n\t\t\t\t\tDisplay.getDefault().syncExec(new Runnable() {\r\n\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\tmacText.setText(\"ComOUT\");\r\n\t\t\t\t\t\t\tqrCodeText.setText(\"ComOUT\");\r\n\t\t\t\t\t\t\topenComBtn.setEnabled(true);\r\n\t\t\t\t\t\t\tbtnmac.setEnabled(false);\r\n\t\t\t\t\t\t\tprintQrCodeBtn.setEnabled(false);\r\n\r\n\t\t\t\t\t\t\tshowMsgOnLabel(\"串口已关闭,使用请重新打开。\");\r\n\t\t\t\t\t\t\tmacStr = \"\";\r\n\t\t\t\t\t\t\tmacStrWithOutSplit = \"\";\r\n\t\t\t\t\t\t\tqrCodeLabel.setImage(SWTResourceManager.getImage(MainWindow.class, \"/\" + ConfigUtil.dsmLogoImage));\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t});\r\n\t\t\t\t\tserialPort.close();\r\n\t\t\t\t\toutputStream = null;\r\n\t\t\t\t\tinputStream = null;\r\n\t\t\t\t\tcomPortIsOpened = false;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tSystem.out.println(\"in.\");\r\n\t\t\t\t\tportList = CommPortIdentifier.getPortIdentifiers();\r\n\t\t\t\t\tif (portList.hasMoreElements()) {\r\n\t\t\t\t\t\t// 如果找到了串口\r\n\t\t\t\t\t showMsgOnLabel(\"串口接口调用成功\");\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t showMsgOnLabel(\"没有找到可用的串口\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\twhile (portList.hasMoreElements()) {\r\n\t\t\t\t\t\tportId = (CommPortIdentifier) portList.nextElement();\r\n\t\t\t\t\t\tif (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) {\r\n\t\t\t\t\t\t\tString selectedCom = comListCombo.getText();\r\n\t\t\t\t\t\t\tif (portId.getName().equals(selectedCom)) { // 端口名 \r\n\t\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t\tserialPort = (SerialPort) portId.open(\"ReadComm\", 10000);\r\n\t\t\t\t\t\t\t\t\tserialPort.setSerialPortParams(115200, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE);\r\n\t\t\t\t\t\t\t\t\tshowMsgOnLabel(\"已打开串口 , 正在接收数据.....\");\r\n\t\t\t\t\t\t\t\t\topenComBtn.setText(\"关闭串口\");\r\n\t\t\t\t\t\t\t\t\tbtnmac.setEnabled(true);\r\n\r\n\t\t\t\t\t\t\t\t\tbtnmac.forceFocus();\r\n\t\t\t\t\t\t\t\t\tcomPortIsOpened = true;\r\n\t\t\t\t\t\t\t\t\tserialPort.addEventListener(new SerialPortEventListener() {\r\n\r\n\t\t\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\t\t\tpublic void serialEvent(SerialPortEvent event) {\r\n\t\t\t\t\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t\t\t\t\tinputStream = serialPort.getInputStream();\r\n\t\t\t\t\t\t\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t\t\t\t\twhile (inputStream.available() > 0) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t byte[] period = new byte[inputStream.available()];\r\n\t\t\t\t\t\t\t\t\t\t\t\t inputStream.read(period,0,period.length);\r\n\t\t\t\t\t\t\t\t\t\t\t\t readBuffer = getAvailableByte(readBuffer, period);\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\thandleBuffer(readBuffer);\r\n\t\t\t\t\t\t\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t\t\t\t\t\t logger.error(\"出错\",e);\r\n\t\t\t\t\t\t\t\t\t\t\t\tDisplay.getDefault().syncExec(new Runnable() {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmacText.setText(\"ComOUT\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tqrCodeText.setText(\"ComOUT\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\topenComBtn.setEnabled(true);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbtnmac.setEnabled(false);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tprintQrCodeBtn.setEnabled(false);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmsgLabel.setText(\"串口已经拔出,请重新插入串口后打开\");\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\topenComBtn.setText(\"打开串口\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tqrCodeLabel.setImage(SWTResourceManager.getImage(MainWindow.class, \"/\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ ConfigUtil.dsmLogoImage));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\t\t\t\tserialPort.close();\r\n\t\t\t\t\t\t\t\t\t\t\t\toutputStream = null;\r\n\t\t\t\t\t\t\t\t\t\t\t\tinputStream = null;\r\n\t\t\t\t\t\t\t\t\t\t\t\tcomPortIsOpened = false;\r\n\t\t\t\t\t\t\t\t\t\t\t\tmacStr = \"\";\r\n\t\t\t\t\t\t\t\t\t\t\t\tmacStrWithOutSplit = \"\";\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\t\t\tserialPort.notifyOnDataAvailable(true);\r\n\r\n\t\t\t\t\t\t\t\t} catch (Exception e5) {\r\n\t\t\t\t\t\t\t\t\te5.printStackTrace();\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}\r\n\t\t\t\t}\r\n\t\t\t\t// readThread = new Thread(this);\r\n\t\t\t\t// readThread.start(); // 线程负责每接收一次数据休眠20秒钟\r\n\t\t\t}\r\n\t\t});\r\n\t\tLabel lblNewLabel_1 = new Label(container, SWT.NONE);\r\n\t\tlblNewLabel_1.setAlignment(SWT.RIGHT);\r\n\t\tlblNewLabel_1.setBounds(15, (j + 2) * paramsHight + 30 + 5, paramsWidht, 17);\r\n\t\tlblNewLabel_1.setText(\"二维码字符串:\");\r\n\t\t\r\n Label lblNewLabel_2 = new Label(container, SWT.NONE);\r\n lblNewLabel_2.setAlignment(SWT.RIGHT);\r\n lblNewLabel_2.setBounds(15, (j + 3) * paramsHight + 30 + 10, paramsWidht, 17);\r\n lblNewLabel_2.setText(\"人工IMEI:\");\r\n\r\n Label lblManMadeDevId = new Label(container, SWT.NONE);\r\n lblManMadeDevId.setAlignment(SWT.RIGHT);\r\n lblManMadeDevId.setBounds(265, (j + 3) * paramsHight + 30 + 10, paramsWidht, 17);\r\n lblManMadeDevId.setText(\"人工设备序列号:\");\r\n \r\n\t\tqrCodeText = new Text(container, SWT.BORDER | SWT.READ_ONLY);\r\n\t\tqrCodeText.setFont(SWTResourceManager.getFont(\"微软雅黑\", 12, SWT.NORMAL));\r\n\t\t// qrCodeText.setText(\"http://dsmjd.com/?x=lock520|11111111|E5:3F:33:43:88:EC|lock\");\r\n\t\tqrCodeText.setBounds(115, (j + 2) * paramsHight + 30, (length - 4) * paramsWidht + 220, 35);\r\n\t\t\r\n\t\tmanmadeMac = new Text(container, SWT.BORDER);\r\n\t\tmanmadeMac.setFont(SWTResourceManager.getFont(\"微软雅黑\", 12, SWT.NORMAL));\r\n\t\tmanmadeMac.setBounds(115, (j + 3) * paramsHight + 30, paramsWidht + 50, 35);\r\n\t\t\r\n\t\tmanmadeDevId = new Text(container, SWT.BORDER);\r\n\t\tmanmadeDevId.setFont(SWTResourceManager.getFont(\"微软雅黑\", 12, SWT.NORMAL));\r\n\t\tmanmadeDevId.setBounds(364, (j + 3) * paramsHight + 30, paramsWidht + 50, 35);\r\n\r\n\t\tprintQrCodeBtn = new Button(container, SWT.NONE);\r\n\t\tprintQrCodeBtn.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t print(devCode, macText.getText());\r\n qrCodeText.setText(\"\");\r\n macText.setText(\"\");\r\n\t\t\t}\r\n\t\t});\r\n\t\tprintQrCodeBtn.setBounds((length - 1) * paramsWidht + 15, (j + 1) * paramsHight + 30, 88, 35);\r\n\t\tprintQrCodeBtn.setText(\"打印二维码\");\r\n\t\tprintQrCodeBtn.setEnabled(false);\r\n\t\t//手工打印的二维码\r\n\t\tmanPrintQrcode = new Button(container, SWT.NONE);\r\n\t\tmanPrintQrcode.addSelectionListener(new SelectionAdapter() {\r\n @Override\r\n public void widgetSelected(SelectionEvent e) {\r\n String writtenMAC = manmadeMac.getText().toUpperCase();\r\n String writtenDevCode = manmadeDevId.getText().toUpperCase();\r\n macText.setText(writtenMAC);\r\n qrCodeText.setText(String.format(\"http://iot.pihot.com/lock?d=%s&IMEI=%s\", writtenDevCode, writtenMAC));\r\n print(writtenDevCode, writtenMAC);\r\n }\r\n });\r\n manPrintQrcode.setBounds((length - 1) * paramsWidht + 20, (j + 3) * paramsHight + 30, paramsWidht+3, 35);\r\n manPrintQrcode.setText(\"手工打印二维码\");\r\n manPrintQrcode.setEnabled(true);\r\n\r\n\t\tmsgLabel = new Label(container, SWT.NONE);\r\n\t\tmsgLabel.setBounds(1 * paramsWidht + 15, (j + 4) * paramsHight + 30, (length - 4) * paramsWidht + 88, 35);\r\n\r\n\t\tqrCodeLabel = new Label(container, SWT.NONE);\r\n\t\tqrCodeLabel.setImage(SWTResourceManager.getImage(MainWindow.class, \"/\" + ConfigUtil.dsmLogoImage));\r\n\t\tqrCodeLabel.setBounds((length * paramsWidht + 30 - 210) / 2, (j + 5) * paramsHight, 210, 210);\r\n\r\n\t\t//串口Label 文字的初始化\r\n\t\tcomListLabel = new Label(container, SWT.NONE);\r\n\t\tcomListLabel.setAlignment(SWT.RIGHT);\r\n\t\tcomListLabel.setBounds((length - 2) * paramsWidht + 15, (j) * paramsHight + 30, paramsWidht, 17);\r\n\t\tcomListLabel.setText(\"可用串口:\");\r\n \r\n\t\tcomListCombo = new Combo(container, SWT.DROP_DOWN | SWT.READ_ONLY);\r\n\t\tcomListCombo.setBounds((length - 1) * paramsWidht + 15, (j) * paramsHight + 30, 88, 35);\r\n\t\tEnumeration portList = CommPortIdentifier.getPortIdentifiers();\r\n\t\tif (portList.hasMoreElements()) {\r\n\t\t\t// 如果找到了串口\r\n\t\t\tmsgLabel.setText(\"串口接口调用成功\");\r\n\t\t} else {\t\t \r\n\t\t\tmsgLabel.setText(\"未连接需要打印的设备,请手工打印\");\r\n\t\t}\r\n\t\twhile (portList.hasMoreElements()) {\r\n\t\t\tCommPortIdentifier portId = (CommPortIdentifier) portList.nextElement();\r\n\t\t\tif (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) {\r\n\t\t\t\tcomListCombo.add(portId.getName());\r\n\t\t\t\tcomListCombo.setText(portId.getName());\r\n\t\t\t}\r\n\t\t}\r\n\t\t//添加普通锁与假锁的下拉框的标签\r\n\t\tLabel lbListLock = new Label(container, SWT.NONE);\r\n\t\tlbListLock.setAlignment(SWT.RIGHT);\r\n\t\tlbListLock.setBounds(15, (j) * paramsHight + 30 + 5, paramsWidht, 17);\r\n\t\tlbListLock.setText(\"二维码类型:\");\r\n\t\t\t\t\t\r\n\t\t//添加普通锁与假锁的选项\r\n\t\tcomListLock = new Combo(container, SWT.DROP_DOWN | SWT.READ_ONLY);\r\n\t\tcomListLock.setBounds((length - 5) * paramsWidht + 15, (j) * paramsHight + 30, paramsWidht, 35);\r\n\t\tcomListLock.add(\"小程序二维码\", 0);\r\n\t\tcomListLock.select(0);\r\n\t\t\r\n\t\tcomListLock.addSelectionListener(new SelectionListener() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent event) {\r\n\t\t\t\tString text = comListLock.getText();\r\n printQrCodeBtn.setEnabled(false);\r\n openComBtn.setEnabled(true);\r\n qrCodeText.setText(\"\");\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n public void widgetDefaultSelected(SelectionEvent event) {\r\n }\r\n\t\t});\r\n\t\t\r\n\t\tgetShell().setSize(length * paramsWidht + 30, (j + 11) * paramsHight);\r\n\t\tRectangle area = Display.getDefault().getClientArea();\r\n\t\tgetShell().setLocation((area.width - (length * paramsWidht + 30)) / 2, (area.height - ((j + 8) * paramsHight + 30)) / 2);\r\n// byte[] by1 = ByteUtil.hexToByte(\"55 55 02 01 06 10 FF 18 EE AC 52 0B 34 AD 00 03 13 08\", true);\r\n// byte[] by2 = ByteUtil.hexToByte(\"78 67 C4 49 03 09 50 49 37 42 33 35 43 46 32 FD EE EE 55 55 02 01 06 10 FF 18 EE AC 52 0B\",true);\r\n// byte[] availableByte = getAvailableByte(by1, by2);\r\n// handleBuffer(availableByte);\r\n\t\treturn container;\r\n\t}", "public void doGet(HttpServletRequest request,\r\n HttpServletResponse response)\r\n throws ServletException, IOException\r\n {\n response.setContentType(\"text/html\");\r\n\r\n // Actual logic goes here.\r\n PrintWriter out = response.getWriter();\r\n out.println(\"<h1>Home</h1>\");\r\n out.println(\"<h2>Please put your name here, so we can welcome you.</h2>\");\r\n out.println(\"<form method='post' action='Alink'>\");\r\n out.println(\"Name <input type='text' name='user' required>\");\r\n out.println(\"<input type='submit' value='submit'>\");\r\n out.println(\"</form>\");\r\n }", "private HBox buttonRow() {\n\t\tOK = new ButtonMaker().makeButton(\"OK\", e -> {\n\t\t\t//TODO: implement once animation factory has been finalized.\n\t\t\tAnimationEvent animationEvent = factory.makeAnimationEvent(name.getText(), Integer.parseInt(duration.getText()));\n\t\t\t//TODO: use reflection to automate this (but tricky with the extra parameter in path effect)\n\t\t\tif(pathSelector.selectEffect.isSelected()) {\n\t\t\t\tfactory.makePathEffect((String) pathSelector.getValue(), pathSelector.isReverse(), animationEvent);\n\t\t\t}\n\t\t\tif(rotationSelector.selectEffect.isSelected()) {\n\t\t\t\tfactory.makeRotateEffect((Double)rotationSelector.getValue(), animationEvent);\n\t\t\t}\n\t\t\tif(scaleSelector.selectEffect.isSelected()) {\n\t\t\t\tfactory.makeScaleAnimationEffect((Double)scaleSelector.getValue(), animationEvent);\n\t\t\t}\n\t\t\tif(imageSelector.selectEffect.isSelected()) {\n\t\t\t\tfactory.makeImageAnimationEffect((List<String>)imageSelector.getValue(), imageSelector.getNumberOfCycles(), animationEvent);\n\t\t\t}\n\t\t});\n\t\tpreview = new ButtonMaker().makeButton(\"Preview\", e -> {\n\t\t\t//TODO: allow users to preview their animation\n\n\t\t});\n\t\treturn GUIUtils.makeRow(OK, preview);\n\t}", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(340, 217);\n\t\tshell.setText(\"Benvenuto\");\n\t\tshell.setLayout(new FormLayout());\n\t\t\n\t\tComposite composite = new Composite(shell, SWT.NONE);\n\t\tFormData fd_composite = new FormData();\n\t\tfd_composite.bottom = new FormAttachment(100, -10);\n\t\tfd_composite.top = new FormAttachment(0, 10);\n\t\tfd_composite.right = new FormAttachment(100, -10);\n\t\tfd_composite.left = new FormAttachment(0, 10);\n\t\tcomposite.setLayoutData(fd_composite);\n\t\tcomposite.setLayout(new GridLayout(2, false));\n\t\t\n\t\tLabel lblUsername = new Label(composite, SWT.NONE);\n\t\tlblUsername.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));\n\t\tlblUsername.setText(\"Username\");\n\t\t\n\t\ttxtUsername = new Text(composite, SWT.BORDER);\n\t\ttxtUsername.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n\t\tfinal String username = txtUsername.getText();\n\t\tSystem.out.println(username);\n\t\t\n\t\tLabel lblPeriodo = new Label(composite, SWT.NONE);\n\t\tlblPeriodo.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));\n\t\tlblPeriodo.setText(\"Periodo\");\n\t\t\n\t\tfinal CCombo combo_1 = new CCombo(composite, SWT.BORDER | SWT.READ_ONLY);\n\t\tcombo_1.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\n\t\tcombo_1.setVisibleItemCount(6);\n\t\tcombo_1.setItems(new String[] {\"1 settimana\", \"1 mese\", \"3 mesi\", \"6 mesi\", \"1 anno\", \"Overall\"});\n\t\t\n\t\tLabel lblNumeroCanzoni = new Label(composite, SWT.NONE);\n\t\tlblNumeroCanzoni.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));\n\t\tlblNumeroCanzoni.setText(\"Numero canzoni da analizzare\");\n\t\t\n\t\tfinal CCombo combo = new CCombo(composite, SWT.BORDER | SWT.READ_ONLY);\n\t\tcombo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\n\t\tcombo.setItems(new String[] {\"25\", \"50\"});\n\t\tcombo.setVisibleItemCount(2);\n\t\tcombo.setToolTipText(\"Numero canzoni da analizzare\");\n\t\t\n\t\tLabel lblNumeroCanzoniDa = new Label(composite, SWT.NONE);\n\t\tlblNumeroCanzoniDa.setText(\"Numero canzoni da consigliare\");\n\t\t\n\t\tfinal CCombo combo_2 = new CCombo(composite, SWT.BORDER | SWT.READ_ONLY);\n\t\tcombo_2.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\n\t\tcombo_2.setVisibleItemCount(3);\n\t\tcombo_2.setToolTipText(\"Numero canzoni da consigliare\");\n\t\tcombo_2.setItems(new String[] {\"5\", \"10\", \"20\"});\n\t\t\n\t\tButton btnAvviaRicerca = new Button(composite, SWT.NONE);\n\t\tbtnAvviaRicerca.addSelectionListener(new SelectionAdapter() {\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tfinal String username = txtUsername.getText();\n\t\t\t\tfinal String numSong = combo.getText();\n\t\t\t\tfinal String period = combo_1.getText();\n\t\t\t\tfinal String numConsigli = combo_2.getText();\n\t\t\t\tif(username.isEmpty() || numSong.isEmpty() || period.isEmpty() || numConsigli.isEmpty()){\n\t\t\t\t\tSystem.out.println(\"si prega di compilare tutti i campi\");\n\t\t\t\t}\n\t\t\t\tif(!username.isEmpty() && !numSong.isEmpty() && !period.isEmpty() && !numConsigli.isEmpty()){\n\t\t\t\t\tSystem.out.println(\"tutto ok\");\n\t\t\t\t\t\n\t\t\t\t\tFileOutputStream out;\n\t\t\t\t\tPrintStream ps;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tout = new FileOutputStream(\"datiutente.txt\");\n\t\t\t\t\t\tps = new PrintStream(out);\n\t\t\t\t\t\tps.println(username);\n\t\t\t\t\t\tps.println(numSong);\n\t\t\t\t\t\tps.println(period);\n\t\t\t\t\t\tps.println(numConsigli);\n\t\t\t\t\t\tps.close();\n\t\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\t\tSystem.err.println(\"Errore nella scrittura del file\");\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tPrincipaleParteA.main();\n\t\t\t\t\t} catch (FileNotFoundException e1) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t }\n\t\t\t\n\t\t});\n\t\tGridData gd_btnAvviaRicerca = new GridData(SWT.FILL, SWT.CENTER, false, false, 2, 1);\n\t\tgd_btnAvviaRicerca.heightHint = 31;\n\t\tbtnAvviaRicerca.setLayoutData(gd_btnAvviaRicerca);\n\t\tbtnAvviaRicerca.setText(\"Avvia Ricerca\");\n\t}", "@Produces(MediaType.TEXT_HTML)\n\t//Metodo http al cual va a responder el metodo saludar\n\t@GET\n\tpublic String saludar(@QueryParam(\"nombre\")String nombreCompleto){\n\t\treturn \"Buenas tardes \"+nombreCompleto;\n\t}", "@GET\r\n @Produces(MediaType.TEXT_PLAIN)\r\n public String getText() {\n return \"hai\";\r\n }", "HTML createHTML();", "private JPanel getService1JPanel() {\n\n\t\tJPanel panel = new JPanel();\n\t\tBoxLayout boxlayout = new BoxLayout(panel, BoxLayout.X_AXIS);\n\t\tJButton button = new JButton(\"Send Emergency Heart Rate\");\n\t\tbutton.addActionListener(this);\n\t\tpanel.add(button);\n\t\tpanel.add(Box.createRigidArea(new Dimension(10, 0)));\n\t\tpanel.setLayout(boxlayout);\n\n\t\treturn panel;\n\t}", "protected GuiTestObject okbutton() \n\t{\n\t\treturn new GuiTestObject(\n getMappedTestObject(\"okbutton\"));\n\t}", "public void renderHead(IHeaderResponse response) {\n\n\n\t\t//get Sakai skin\n\t\tString skinRepo = sakaiProxy.getSkinRepoProperty();\n\t\tString toolCSS = sakaiProxy.getToolSkinCSS(skinRepo);\n\t\tString toolBaseCSS = skinRepo + \"/tool_base.css\";\n\n\t\t//Sakai additions\n\t\tresponse.renderJavascriptReference(\"/library/js/headscripts.js\");\n\t\tresponse.renderCSSReference(toolBaseCSS);\n\t\tresponse.renderCSSReference(toolCSS);\n\t\tresponse.renderOnLoadJavascript(\"setMainFrameHeight( window.name )\");\n\n\t\t//Tool additions (at end so we can override if required)\n\t\tresponse.renderString(\"<meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html; charset=UTF-8\\\" />\");\n\t\t//response.renderCSSReference(\"css/my_tool_styles.css\");\n\t\t//response.renderJavascriptReference(\"js/my_tool_javascript.js\");\n\n\t}", "public Action getIndexApiAction() {\n Thing object = new Thing.Builder()\n .setName(\"Cadastro Page\") // TODO: Define a title for the content shown.\n // TODO: Make sure this auto-generated URL is correct.\n .setUrl(Uri.parse(\"http://[ENTER-YOUR-URL-HERE]\"))\n .build();\n return new Action.Builder(Action.TYPE_VIEW)\n .setObject(object)\n .setActionStatus(Action.STATUS_TYPE_COMPLETED)\n .build();\n }", "@POST\r\n @Produces(MediaType.TEXT_HTML)\r\n @Consumes(MediaType.TEXT_HTML)\r\n public Boolean getHtml(@QueryParam(\"esquema\")String esquema,@QueryParam(\"nombre\")String nombre,@QueryParam(\"idusuario\")int idusuario) {\r\n try {\r\n return creaTabla(esquema, nombre, idusuario);\r\n } catch (Exception ex) {\r\n Logger.getLogger(NuevaTablaResource.class.getName()).log(Level.SEVERE, null, ex);\r\n return false;\r\n }\r\n }", "void faild_response();", "public Action getIndexApiAction() {\n Thing object = new Thing.Builder()\n .setName(\"TDVoice Page\") // TODO: Define a title for the content shown.\n // TODO: Make sure this auto-generated URL is correct.\n .setUrl(Uri.parse(\"http://[ENTER-YOUR-URL-HERE]\"))\n .build();\n return new Action.Builder(Action.TYPE_VIEW)\n .setObject(object)\n .setActionStatus(Action.STATUS_TYPE_COMPLETED)\n .build();\n }", "public Action getIndexApiAction() {\n Thing object = new Thing.Builder()\n .setName(\"HomeView Page\") // TODO: Define a title for the content shown.\n // TODO: Make sure this auto-generated URL is correct.\n .setUrl(Uri.parse(\"http://[ENTER-YOUR-URL-HERE]\"))\n .build();\n return new Action.Builder(Action.TYPE_VIEW)\n .setObject(object)\n .setActionStatus(Action.STATUS_TYPE_COMPLETED)\n .build();\n }", "private void displaySubmitButton() {\n RegularButton submitButton = new RegularButton(\"SUBMIT\", 1000, 600);\n submitButton.setOnAction(e -> handleSubmit());\n\n sceneNodes.getChildren().add(submitButton);\n }", "@Override\n public void onHTTPResponseReceived(String tag, String response) {\n progressDialog.cancel();\n CharSequence text = \"Richiesta inviata!\";\n Toast toast = Toast.makeText(getActivity(), text, Toast.LENGTH_SHORT);\n toast.show();\n }", "public String produceResponse() {\n processData();\n return response;\n }", "private void createContents() {\r\n\t\tshlEventBlocker = new Shell(getParent(), getStyle());\r\n\t\tshlEventBlocker.setSize(167, 135);\r\n\t\tshlEventBlocker.setText(\"Event Blocker\");\r\n\t\t\r\n\t\tLabel lblRunningEvent = new Label(shlEventBlocker, SWT.NONE);\r\n\t\tlblRunningEvent.setBounds(10, 10, 100, 15);\r\n\t\tlblRunningEvent.setText(\"Running Event:\");\r\n\t\t\r\n\t\tLabel lblevent = new Label(shlEventBlocker, SWT.NONE);\r\n\t\tlblevent.setFont(SWTResourceManager.getFont(\"Segoe UI\", 15, SWT.BOLD));\r\n\t\tlblevent.setBounds(20, 31, 129, 35);\r\n\t\tlblevent.setText(eventName);\r\n\t\t\r\n\t\tButton btnFinish = new Button(shlEventBlocker, SWT.NONE);\r\n\t\tbtnFinish.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseUp(MouseEvent e) {\r\n\t\t\t\tshlEventBlocker.dispose();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnFinish.setBounds(10, 72, 75, 25);\r\n\t\tbtnFinish.setText(\"Finish\");\r\n\r\n\t}", "public Action getIndexApiAction() {\n Thing object = new Thing.Builder()\n .setName(\"Signup Page\") // TODO: Define a title for the content shown.\n // TODO: Make sure this auto-generated URL is correct.\n .setUrl(Uri.parse(\"http://[ENTER-YOUR-URL-HERE]\"))\n .build();\n return new Action.Builder(Action.TYPE_VIEW)\n .setObject(object)\n .setActionStatus(Action.STATUS_TYPE_COMPLETED)\n .build();\n }", "private JButton getJButtonOK() {\n\t\tif (jButtonOK == null) {\n\t\t\tjButtonOK = new JButton();\n\t\t\tjButtonOK.setLocation(new Point(100, 200));\n\t\t\tjButtonOK.setText(\"OK\");\n\t\t\tjButtonOK.addActionListener( new ActionListener() {\n\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\tcloseFrameSobre();\n\t\t\t\t}\n\t\t\t});\n\t\t\tjButtonOK.setSize(new Dimension(100, 30));\n\t\t}\n\t\treturn jButtonOK;\n\t}", "@Override\n\tprotected PortletRenderResult callInternal() throws Exception {\n\t final String characterEncoding = response.getCharacterEncoding();\n\t final RenderPortletOutputHandler renderPortletOutputHandler = new RenderPortletOutputHandler(characterEncoding);\n\t \n final PortletRenderResult result = portletRenderer.doRenderHeader(portletWindowId, request, response, renderPortletOutputHandler);\n \n this.output = renderPortletOutputHandler.getOutput();\n \n return result;\n\t}", "@Override\n public void onResponse(String s) {\n loading.dismiss();\n //Showing toast message of the response\n Toast.makeText(PreviewActivity.this, \"Correcto!\" , Toast.LENGTH_LONG).show();\n goMainScreen();\n }", "@GET\n @Produces(MediaType.TEXT_PLAIN)\n public Response sayBaaah(@Context HttpServletRequest request) {\n try {\n return RestUtilities.make200OkResponse(\"No sheep here.\\n\");\n } catch (Exception e) {\n return RestUtilities.make500AndLogSystemErrorResponse(request, e);\n }\n }", "public org.naru.park.ParkModel.UIParkResponse.Builder getResponseBuilder() {\n \n onChanged();\n return getResponseFieldBuilder().getBuilder();\n }", "void heading(JavaScriptObject source, JavaScriptObject error, JavaScriptObject code, JavaScriptObject type, JavaScriptObject success, JavaScriptObject heading);", "public Action getIndexApiAction() {\n Thing object = new Thing.Builder()\n .setName(\"FaceTracker Page\") // TODO: Define a title for the content shown.\n // TODO: Make sure this auto-generated URL is correct.\n .setUrl(Uri.parse(\"http://[ENTER-YOUR-URL-HERE]\"))\n .build();\n return new Action.Builder(Action.TYPE_VIEW)\n .setObject(object)\n .setActionStatus(Action.STATUS_TYPE_COMPLETED)\n .build();\n\n }", "private javax.swing.JButton getJButton13() {\n\t\tif(jButton13 == null) {\n\t\t\tjButton13 = new javax.swing.JButton();\n\t\t\tjButton13.setPreferredSize(new java.awt.Dimension(120,40));\n\t\t\tjButton13.setBackground(new java.awt.Color(226,226,222));\n\t\t\tjButton13.setText(\"Modo Invitado\");\n\t\t\tjButton13.setFont(new java.awt.Font(\"Dialog\", java.awt.Font.BOLD, 10));\n\t\t\tjButton13.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);\n\t\t\tjButton13.setMargin(new Insets(1,2,1,1));\n\t\t\tjButton13.setMnemonic('I');\n\t\t}\n\t\treturn jButton13;\n\t}", "private JButton getOkButton() {\n\t\tif (okButton == null) {\n\t\t\tokButton = new JButton();\n\t\t\tokButton.setText(\"OK\");\n\t\t\tokButton.addActionListener(new java.awt.event.ActionListener() {\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\tdoOK();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn okButton;\n\t}", "@POST\n\t@Produces(\"text/html\")\n\tpublic String getPost() {\n\t\treturn MessageConstants.POST_MESSAGE;\n\t}", "@AutoEscape\n\tpublic String getRespondText();", "@Override\n public void onResponse(String response) {\n Toast.makeText(ContainerActivity.this, \"hey\", Toast.LENGTH_SHORT).show();\n Log.d(\"exito\", \"la peticion ha sido tramitada con exito\");\n }", "public HomePageHelper writeTextOfButtons(){\n System.out.println (\"Quantity of elements: \" + languagesButtons.size());\n for(WebElement el : languagesButtons){\n System.out.println(\"Tag Name: \" + el.getTagName());\n System.out.println(\"attr: ng-click - \" + el.getAttribute(\"ng-click\"));\n }\n return this;\n }", "@Override\n\tpublic void execute(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\t\n\t\tBufferedReader br = request.getReader();\n\t\t\n\t\tSystem.out.println(br.readLine());\n\t\t\n\t\tSystem.out.println(request.getParameter(\"name\"));\n//\t\t\n\t\tPrintWriter pw = response.getWriter();\n\t\t\n\t\tpw.println(\"ajaxTest8return\");\n\t\t\n\t}", "public JButton getOkButton(){\n\t\treturn okButton;\n\t}", "public void handle(HttpExchange h) throws IOException {\n String message = \"The server is running without any problem\"; //Message to be shown to client\n h.sendResponseHeaders(200, message.length());//response code and the length of message to be sent\n \n /*writes in the output stream, converts the message into array of bytes and closes the stream.*/\n OutputStream out = h.getResponseBody();\n out.write(message.getBytes());\n out.close();\n }", "@GET\n\t@Produces(MediaType.TEXT_HTML)\n\tpublic String sayWelcome(){\n\t\t//System.out.println(\"This is a GET message---------\");\n\t\tString endHTML=\"\";\n\t\tString workingPath;\n\t\ttry {\n\t\t\t//workingPath = context.getResource(\"/WEB-INF\").getPath();\n\t\t\tStringBuffer fileData = new StringBuffer(1000);\n\t\t\t//Using the classLoader to get the file in the Classes\n\t\t\t//This method allow us to read the file from any web server\n\t\t\tInputStream uploadFileIS = GenerateHTMLDoc.class.getClassLoader().getResourceAsStream(\"/test/quick/UploadFile.html\");\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(uploadFileIS));\n\t\t\t//Tomcat use this\n\t\t\t//BufferedReader reader = new BufferedReader(new FileReader(\"../UploadFile.html\"));\n\t\t\tchar[] buf = new char[1024];\n\t\t\tint numRead=0;\n\t\t\twhile((numRead=reader.read(buf))!=-1){\n\t\t\t\tString readData = String.valueOf(buf,0,numRead);\n\t\t\t\tfileData.append(readData);\n\t\t\t\tbuf=new char[1024];\n\t\t\t}\n\t\t\treader.close();\n\t\t\tendHTML = fileData.toString();\n\t\t\treturn endHTML;\n\t\t\t\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tif(endHTML == \"\"){\n\t\t\treturn \"<html> \" + \"<title>\" + \"Docorro - Special Document Generation Thingy\" + \"</title>\" + \n\t\t\"<body><h1>\" +\"Hello,\" +\n\t\t\t\t\" Welcome to Docorro!!!!\" + \"</h1></body>\" + \"</html>\";\n\t\t}else\n\t\t{\n\t\t\treturn endHTML;\n\t\t}\n\t}", "public JButton getOkButton() {\n return okButton;\n }" ]
[ "0.5868314", "0.5560083", "0.54083204", "0.5366516", "0.532758", "0.529967", "0.5291597", "0.52866274", "0.52359676", "0.51702064", "0.5147149", "0.5123601", "0.51224226", "0.51146454", "0.5108571", "0.5107117", "0.5089383", "0.50534564", "0.50517786", "0.5017021", "0.50133413", "0.50067353", "0.50017935", "0.5000117", "0.49908185", "0.49734342", "0.49511316", "0.4929874", "0.49145707", "0.48878807", "0.488686", "0.4868847", "0.48642603", "0.483389", "0.48293036", "0.48111236", "0.48022318", "0.47959813", "0.479201", "0.47720677", "0.47720245", "0.47500706", "0.4748173", "0.47480473", "0.4743654", "0.47432095", "0.47404662", "0.47377452", "0.4737475", "0.47358313", "0.47272685", "0.47261328", "0.47238192", "0.47118318", "0.46949014", "0.46904114", "0.46804333", "0.46799847", "0.46798465", "0.46794218", "0.46790904", "0.46773016", "0.4676306", "0.46739194", "0.46716496", "0.46575782", "0.4649606", "0.46385026", "0.4636228", "0.4635324", "0.4632818", "0.46258366", "0.4622974", "0.461625", "0.4608545", "0.46046823", "0.46038", "0.45983317", "0.45967957", "0.45964757", "0.45776284", "0.45727983", "0.4568164", "0.45668533", "0.456408", "0.45629537", "0.4558007", "0.45570916", "0.45527282", "0.45511785", "0.45436198", "0.45423478", "0.45404628", "0.4540445", "0.45391372", "0.45361665", "0.45330924", "0.4530079", "0.4526434", "0.45238337", "0.45209265" ]
0.0
-1
TODO Autogenerated method stub
@Override public double similarity(double[] data1, double[] data2) { double distance; int i; if(MATHOD ==1){ i = 0; distance = 0; while (i < data1.length && i < data2.length) { distance += Math.pow(Math.abs(data1[i] - data2[i]), q); i++; } } if(MATHOD ==2){ i = 0; distance = 0; while (i < data1.length && i < data2.length) { distance += ( Math.abs(data1[i] - data2[i]) )/( Math.abs(data1[i]) + Math.abs(data2[i]) ); i++; } } if(MATHOD ==3){ i = 0; distance = 0; while (i < data1.length && i < data2.length) { distance += Math.abs( (data1[i] - data2[i]) / ( 1 + data1[i] + data2[i]) ); i++; } } return Math.pow(distance, 1 / q); }
{ "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
A constructor that instantiate the class AlertSuspectRegulation
public AlertSuspectRegulation(ServiceConfiguration serviceConfiguration) { super(serviceConfiguration); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public IoTSecurityAlertedDevice() {\n }", "public CalMonitor() {\r\n }", "public WeiXinPayMonitor() {\r\n\t\tsuper();\r\n\t}", "public IRSensorSubsystem() {\n\n }", "private Alarms() {}", "public Alarm_Msg(){ }", "private SevereWeatherAlertsResult() {}", "public SimOI() {\n super();\n }", "public alarm() {\n initComponents();\n }", "public Beacon() {\n method = AnalysisMethod.DEFAULT;\n }", "public SignaturEater()\r\n {\r\n }", "public Supervisor(double salario) {\r\n super(salario);\r\n }", "public ZElectricMeterExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public Simulator(){}", "public Alarm() {\n\n\t\tMachine.timer().setInterruptHandler(new Runnable() {\n\t\t\tpublic void run() { timerInterrupt(); }\n\t\t});\n\t}", "private ACARSSoundingTools() {\n\n }", "public ElectricShower() {\r\n\t\tthis(12, 0, 4);\r\n\t}", "public BasicSensor() {}", "public Goodsinfo() {\n super();\n }", "public simulation() {\n\n }", "public CalculatedPerformanceIndicators()\n {\n super();\n // TODO Auto-generated constructor stub\n }", "public ScreenMonitor(){\n this(Configuration.SCREEN_MONITOR_UPDATE_DELAY,\n\t \t\tConfiguration.SCREEN_MONITOR_LOGS_SIZE, \n\t \t\tConfiguration.SCREEN_MONITOR_LINE_SEPERATOR,\n\t \t\tConfiguration.SCREEN_MONITOR_DATA_MEMORY,\n\t \t\tConfiguration.SCREEN_MONITOR_DATA_POWER);\n }", "public SensorLog() {\n }", "public ActuatorData()\n\t{\n\t\tsuper(); \n\t}", "SensorDescription(){\n\n }", "public Notifications() {\n \n \t}", "public Incident() {\n\t\tsuper();\n\t}", "public ReceivingMonitoringBean() {\n serviceVessel=new ServiceVessel();\n }", "public TRIP_Sensor () {\n super();\n }", "public MMTMeasurement(){\n }", "public XSDataCrystal() {\n super();\n }", "public RecruitingAppManagementImpl() {\n }", "public StStatutesub() {\n }", "@Override\n public void init() {\n\n stevens_IMU = new AdafruitBNO055IMU(hardwareMap.i2cDeviceSynch.get(\"IMU\"));\n\n parameters = new BNO055IMU.Parameters();\n\n success = stevens_IMU.initialize(parameters);\n telemetry.addData(\"Success: \", success);\n\n doDaSleep(500);\n\n }", "public Simulador(){\n }", "public EnergySchedulingFactoryImpl() {\n\t\tsuper();\n\t}", "public ReportScreen() {\n\t\t\n\t}", "public ElectricCar(String mfr, String color, Model model, Vehicle.PowerSource power, \n\t\t double safety, int range, boolean awd, int price, int rch,String batteryType, int VIN)\n{\n\t super(mfr, color, model, Vehicle.PowerSource.ELECTRIC_MOTOR, safety, range, awd, price, VIN);\n\t rechargeTime = rch;\n\t batteryType = \"Lithium\";\n}", "public CyanSus() {\n\n }", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\n\t\t\t public void AnonymousGasSmrCR_singleregister_alreatchecked(){\n\t\t\t\tReport.createTestLogHeader(\"Anonymous SMR\", \"Verify whether the anonymous Gas customer is able to do SMR journey\");\n\t\t\t\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"AnonymousSMRGasCRdata\");\n\t\t\t\tCrmUserProfile crmuserProfile = new TestDataHelper().getCrmUserProfile(\"CrmDetailsforSMR\");\n\t\t\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"ViewuserVerifynew\");\t\t\n\t\t\t new SubmitMeterReadAction()\n\t\t\t .openSMRpageCRGas(\"Gas\")\t\t\t \n\t\t\t .verifyAnonymousSAPGasCus_CR_Multiplereg_newuser_alertchecked(smrProfile) ;\n\t\t\t // .VerifySAPCRM_SMR(crmuserProfile,userProfile,smrProfile);\n\t\t\t \t}", "public Vending_MachineTest()\n {\n // initialise instance variables\n \n \n }", "public SysSkillConferpo()\n {\n }", "public Simulator() {\n\t\t// create event chain\n\t\tec = new SortableQueue();\n\t\tsims = new SimulationStudy(this);\n\t\tstate = new SimulationState(sims);\n\t\t// push the first customer arrival at t = 0\n\t\tpushNewEvent(new CustomerArrivalEvent(state, 0));\n\t\t// push the termination event at the simulationTime (max duration of simulation)\n\t\tpushNewEvent(new SimulationTerminationEvent(sims.simulationTime));\n\t}", "private ClimateAlertUtils() {\n }", "public SensorData() {\n\n\t}", "public Scania() {\n\n super(2, 600, Color.white, \"Scania\", 13000);\n truckBed = new Ramp();\n }", "public TestBSSVRequest() {\r\n }", "public RegistroSensor() \n {\n\n }", "public CNAlarmSoundCfgExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public AirAndPollen() {\n\n\t}", "public RatioMonitor(int sampleSize, double tolerance, int minNotificationInterval)\r\n {\r\n this.sampleSize = sampleSize;\r\n this.tolerance = tolerance;\r\n this.minNotificationInterval = minNotificationInterval;\r\n monitor1 = new AmplitudeMonitor(sampleSize);\r\n monitor2 = new AmplitudeMonitor(sampleSize);\r\n }", "public AvaliacaoRisco() {\n }", "public WaterMeter(Alarm alarmParam)\r\n\t{\r\n\t\tthis();\r\n\t\taddAlarm(alarmParam);\r\n\t}", "public RevenueIncrease()\n {\n /* Allow the Event super class to handle intialisation */\n super();\n }", "public DefaultValidationReport()\r\n {\r\n factory = new DefaultReportFactory();\r\n }", "public SensorStation(){\n\n }", "public StudentInteraction() {\n//\t\tsuper();\n\t\tsfCon = new StudentFunctionalityController();\n\t}", "public TimedBeaconSimulator(){\n\t\tbeacons = new ArrayList<>();\n\t}", "public AppliancesInfo() {\n initComponents(); \n }", "public ProductionPower(){\n this(0, new NumberOfResources(), new NumberOfResources(), 0, 0);\n }", "public ProductTestReport() {}", "public DeviceReportExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public Notification()\n\t{\n\t\t\n\t}", "public Ambulance() {\n\t}", "public Notification() {\n\n\t}", "public Requisition() {\n\n }", "private Registry() {\n dbgLog.fine(\"Registry constructor is called\");\n }", "protected ModelAgent (String agentName)\n {\n trc = new Trace (\"ModelAgent\", agentName);\n\n String jsimprop = System.getProperty (\"jsim.use_xml\", \"false\");\n if (jsimprop.toLowerCase ().equals (\"true\")) {\n use_xml = true;\n } // if\n \n jsimprop = System.getProperty (\"jsim.generate_xml_files\", \"false\");\n if (jsimprop.toLowerCase ().equals (\"true\")) {\n generate_xml_files = true;\n } // if\n\n this.agentName = agentName;\n agentStat = new SampleStat (agentName);\n\n JPanel panel = new JPanel ();\n panel.setLayout (new BorderLayout ());\n panel.add (new JLabel (agentName, JLabel.CENTER),\n BorderLayout.CENTER);\n\n JPanel panel2 = new JPanel ();\n startBtn.addActionListener (this);\n panel2.add (startBtn);\n \n setLayout (new BorderLayout ());\n add (panel, BorderLayout.NORTH);\n add (panel2, BorderLayout.CENTER);\n setBorder (BorderFactory.createEmptyBorder (5, 5, 5, 5));\n setSize (WIDTH, HEIGHT);\n setVisible (true);\n\n }", "public BasicReport() throws OculusException\n { super(); }", "public CapteurEffetHall() {\n\t\t\n\t}", "protected MainDoorIntrusionPolicy(AlarmSystem alarmSystem, Communicator communicator, DelayTimer delayTimer) {\n super(alarmSystem);\n this.communicator = communicator;\n this.delayTimer = delayTimer;\n }", "public PopulationfosaController() {\n }", "public AETinteractions() {\r\n\t}", "public WaterMeter(List<Alarm> alarmParam)\r\n\t{\r\n\t\tthis();\r\n\t\tsetAlarms(alarmParam);\r\n\t}", "public Appliance(String type, String brandName){\n this.type = type;\n this.brandName = brandName;\n System.out.println(\"Test hello\");\n }", "public PerformanceAmigos() {\n initComponents();\n }", "public CollegeSuiteHealthCheck() {\n super();\n }", "Constructor() {\r\n\t\t \r\n\t }", "public ADSR()\n\t{\n\t\tthis(1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f);\n\t}", "public RxTxMonitoringMsg() {\n super(DEFAULT_MESSAGE_SIZE);\n amTypeSet(AM_TYPE);\n }", "public Simulation() {\n ecosystem = new Ecosystem();\n weeksElapsed = 0;\n }", "public Notifica(){}", "private reg1() {\n }", "public MonitoredData() {}", "public FruitStand() {}", "private AlarmDeviceTable() {}", "public Supercar() {\r\n\t\t\r\n\t}", "public JSONSenderUtilsSim() {\n\t}", "public Supermarket()\n {\n }", "public BeaconAnalysis() {\n this.left = BeaconColor.UNKNOWN;\n this.right = BeaconColor.UNKNOWN;\n this.confidence = 0.0f;\n this.location = new Rectangle();\n this.leftButton = null;\n this.rightButton = null;\n }", "public OscillatorCalculator() {\n this(1);\n }", "public AdmissionDetails() {\n initComponents();\n }", "public DriverControl(){\n super(0);\n }", "public EngineClass()\n {\n cyl = 10;\n fuel = new String( BATT );\n }", "public ServiceEvent() {\n // eventSenderID and eventSenderClass are initialized by the OperatingSystem! \n }", "public SampledPolicy() {\r\n super(ExecutablePolicyType.SAMPLED);\r\n }", "public SintaxAnalysis(java_cup.runtime.Scanner s) {super(s);}", "private DiagnosticMessageUtilities()\n {\n }", "public CancerRisk() { this(\"None\", 1.0); }", "private HardwareDeviceRental(){\r\n\r\n this.initializeComponent();\r\n hardwares= new ArrayList<HardwareDevice>();\r\n\r\n }" ]
[ "0.6542045", "0.6106909", "0.61030215", "0.6025918", "0.5958332", "0.5910313", "0.5841352", "0.58332133", "0.5808077", "0.5722812", "0.56953984", "0.5638766", "0.56333834", "0.5627158", "0.5616581", "0.5607668", "0.56036806", "0.560289", "0.55970496", "0.555511", "0.55490357", "0.55477226", "0.5538444", "0.55290955", "0.5502217", "0.54960257", "0.5486046", "0.54825425", "0.5480465", "0.54759765", "0.5456515", "0.5452636", "0.54309297", "0.5411228", "0.54073197", "0.5387537", "0.5385377", "0.53849536", "0.5373045", "0.5367523", "0.53511167", "0.5347606", "0.53460187", "0.5343784", "0.5343295", "0.5340105", "0.53327686", "0.53287196", "0.53166723", "0.5314027", "0.53047144", "0.5300732", "0.52935874", "0.52908367", "0.5289333", "0.5281123", "0.5276249", "0.5272105", "0.52714884", "0.5266097", "0.52633244", "0.52590775", "0.52508473", "0.52422833", "0.5239241", "0.5232585", "0.5231115", "0.5231009", "0.5225587", "0.5225234", "0.5221906", "0.5217953", "0.52170455", "0.5214197", "0.52018845", "0.519809", "0.5197111", "0.5191619", "0.51897967", "0.51893085", "0.518533", "0.5184275", "0.5183879", "0.518286", "0.5181014", "0.5179018", "0.51683176", "0.51642495", "0.5162931", "0.5162796", "0.51610386", "0.5154585", "0.5149596", "0.5148964", "0.51485014", "0.5143869", "0.51393545", "0.5138208", "0.5138131", "0.513778" ]
0.6928211
0
A class that represents a value that might be published for the AlertSuspectRegulation context. It is used by event methods that might or might not publish values for this context.
@Override protected AlertSuspectRegulationValuePublishable onMessageFromInput(MessageFromInput messageFromInput, DiscoverForMessageFromInput discover) { String messageAboutBodyPosition = messageFromInput.value(); // get the value of the string returned by the websocket if (messageAboutBodyPosition.equals("Une chute a eu lieu")) { // if a fall has been detected by the smarthphone. (info communicated through bluetooth and websocket DiaSuite) if (discover.presenceDetectors().anyOne().getInBedroom()) { // test if the person is in the bedroom (probably sleeping and not fallen) return new AlertSuspectRegulationValuePublishable("", false); // No Suspect alert has to be communicated } else { return new AlertSuspectRegulationValuePublishable("", true); // A Suspect alert has to be communicated } } else { return new AlertSuspectRegulationValuePublishable(messageAboutBodyPosition, false); // if the message returned by the web socket is not the one intended (no fall but an other event) } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getInsuredValue() {\n return insuredValue;\n }", "public S getValue() { return value; }", "public String Get_event_value() \n {\n\n return event_value;\n }", "private Value() {\n\t}", "@Override\r\n public Object getValue() {\r\n return value;\r\n }", "@Override\n public Object getValue()\n {\n return value;\n }", "public Object getValue() { return _value; }", "@Deprecated\r\n\tpublic QualityValue(){\r\n\t\tsuper();\r\n\t}", "@LogValue\n public Object toLogValue() {\n return LogValueMapFactory.builder(this)\n .put(\"sink\", _sink)\n .put(\"serverAddress\", _serverAddress)\n .put(\"serverPort\", _serverPort)\n .put(\"exponentialBackoffBase\", _exponentialBackoffBase)\n .build();\n }", "public Object getValue() { return this.value; }", "public Value(){}", "@Override\r\n\t\t\tpublic Object getValue() {\n\t\t\t\treturn null;\r\n\t\t\t}", "public org.omg.uml.behavioralelements.commonbehavior.Instance getValue();", "@Override\n\t\tpublic V getValue(){\n\t\t\treturn value;\n\t\t}", "@Override\r\n public void publishPropertyViolation (Publisher publisher) {\n }", "public CalMonitor(Object value) {\r\n data = value;\r\n empty = false;\r\n }", "public Value() {}", "@Override\n public String toString() {\n return String.valueOf(value());\n }", "@Override\r\n\tpublic String getValue() {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic String getValue() {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic String getValue() {\n\t\treturn null;\r\n\t}", "@Override\n protected String toCloudEventsValue(final Object value) {\n return value.toString();\n }", "@Override\n\tpublic Value apprise() {\n\t\treturn null;\n\t}", "@Override\n\tpublic Object getValue() {\n\t\treturn null;\n\t}", "@Override\n public String getValue() {\n return value;\n }", "@Override\n\tpublic String getValue() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getValue() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getValue() {\n\t\treturn null;\n\t}", "public String getValue() { return value; }", "public int getAlertness() {\n return 0;\n }", "public boolean isValue() {\n return false;\n }", "public Object getValue();", "public Object getValue();", "public Object getValue();", "public Object getValue();", "public Object getValue();", "public abstract Object getValue();", "public abstract Object getValue();", "public abstract Object getValue();", "public interface Value {\n\t}", "@Override\n public String getValue() {\n return this.value.toString();\n }", "int getEventValue();", "@Override\n public final String toString() {\n return this.value;\n }", "public TrueValue (){\n }", "public Object getValue()\n {\n return value;\n }", "public void setMonitoredResource(String value) {\n value.getClass();\n this.monitoredResource_ = value;\n }", "public String getStandardValue() {\n return standardValue;\n }", "@Override\n\t\t\tpublic String getValue() {\n\t\t\t\treturn value;\n\t\t\t}", "@NonNull\n public T getRequestedValue() {\n return mRequestedValue;\n }", "public Object getValue() {\r\n return value;\r\n }", "@Override\r\n\tpublic String getValue() {\n\t\treturn value;\r\n\t}", "BooleanProperty noValueWarningProperty();", "@Override\n public String toString() {\n return \"\" + this.value;\n }", "EDataType getSusceptance();", "public String getValue () { return value; }", "@Override\n\tpublic String getValue() {\n\t\treturn value;\n\t}", "Object getValue();", "Object getValue();", "Object getValue();", "Object getValue();", "Object getValue();", "Object getValue();", "Object getValue();", "public Object getValue() {\n return value;\n }", "public Object getValue() {\n return value;\n }", "public Object getValue() {\n return value;\n }", "public Object getValue() {\n return value;\n }", "public Object getValue() {\n return value;\n }", "@Override\n\t\tpublic V getValue() {\n\t\t\treturn v;\n\t\t}", "protected Value() {\n flags = 0;\n num = null;\n str = null;\n object_labels = getters = setters = null;\n excluded_strings = included_strings = null;\n functionPartitions = null;\n functionTypeSignatures = null;\n var = null;\n hashcode = 0;\n }", "@Override\n public final boolean hasSpecialDefenseValueAttribute() {\n return true;\n }", "public T getRawValue(){\n return mValue;\n }", "@Override\n\tpublic String getValue() {\n\t\treturn PushyView.c.getValue();\n\t}", "@Override\n\tpublic kus.eventy.decorator.Alert getAlert() {\n\t\treturn sA;\n\t}", "@java.lang.Override public int getPowerSourceValue() {\n return powerSource_;\n }", "private interface Valuable extends Base {\n\t\tString getValue();\n\t\tvoid setValue(String value);\n\t}", "public AlertSuspectRegulation(ServiceConfiguration serviceConfiguration) {\r\n super(serviceConfiguration);\r\n }", "public Object getVal()\n { return val; }", "public String getOutValue(){\n return null;\n }", "@Override\n public byte[] getValue() {\n return MetricUtils.concat2(topologyId, getTag(), sampleRate).getBytes();\n }", "public Object getObservedValue() {\n if (observedValue == null) {\n throw new IllegalStateException(\"Evidence statement has not \"\n + \"been compiled yet.\");\n }\n return observedValue;\n }", "int getCauseValue();", "public interface StatusAware {\n int getCode();\n String getMessage();\n String getDefaultValue();\n}", "public interface ValueState {\n }", "public Object getValue(){\n \treturn this.value;\n }", "@Override\n\tpublic Object getValue() {\n\t\treturn this ;\n\t}", "@Override\n\tpublic Object getValue() {\n\t\treturn this ;\n\t}", "public Value getValue(){\n return this.value;\n }", "public int getEventValue() {\n return event_;\n }", "public Object getValue()\r\n {\r\n return this.value;\r\n }", "public String value() {\n return this.value;\n }", "public String value() {\n return this.value;\n }", "ObjectProperty<Double> warningLowProperty();", "public String value() {\n return value;\n }", "@Override\n\tpublic String toString() {\n\t\treturn value;\n\t}", "public String getValue(){\n return this.value;\n }", "public Object getProvidedValue() {\n return providedValue;\n }", "@java.lang.Override public int getPowerSourceValue() {\n return powerSource_;\n }", "Object value();", "@Schema(description = \"Indicates the value of the indicator which crossed the threshold.\")\n\n\tpublic String getObservedValue() {\n\t\treturn observedValue;\n\t}", "public Object getValue() {\r\n return oValue;\r\n }" ]
[ "0.5436841", "0.5425553", "0.53473824", "0.52018386", "0.518472", "0.509905", "0.5079043", "0.50724655", "0.50691545", "0.5039837", "0.5027611", "0.5013013", "0.50111586", "0.5005832", "0.50034237", "0.4999233", "0.49981818", "0.49940744", "0.49912566", "0.49912566", "0.49912566", "0.49683842", "0.49663195", "0.49650785", "0.49531475", "0.49381086", "0.49381086", "0.49381086", "0.49272928", "0.4917675", "0.4914843", "0.4912588", "0.4912588", "0.4912588", "0.4912588", "0.4912588", "0.49113187", "0.49113187", "0.49113187", "0.49101412", "0.48915353", "0.48900318", "0.48748553", "0.4874005", "0.48658255", "0.4864211", "0.48633483", "0.48592708", "0.48592308", "0.48564452", "0.4856082", "0.48552427", "0.48484367", "0.48391244", "0.48347923", "0.48290733", "0.4824081", "0.4824081", "0.4824081", "0.4824081", "0.4824081", "0.4824081", "0.4824081", "0.48222065", "0.48222065", "0.48222065", "0.48222065", "0.48222065", "0.48183367", "0.48174897", "0.4814861", "0.47978047", "0.47928154", "0.47896153", "0.47835702", "0.47819436", "0.47794", "0.47789413", "0.4775249", "0.47710165", "0.4755162", "0.47510135", "0.4749644", "0.47489637", "0.47477362", "0.47453365", "0.47453365", "0.4741195", "0.47407517", "0.4739178", "0.473289", "0.473289", "0.47323227", "0.47260362", "0.47252807", "0.4723831", "0.47235858", "0.47234017", "0.47232306", "0.47217077", "0.4717052" ]
0.0
-1
This implementation returns the ExpireDuration. 0 as default if no configuration is present. 1 in case the configuration can not be converted to a number.
@Override public final long getDefaultExpireDuration() { Object durationObject = properties.get(DEFAULT_EXPIRE_DURATION); if(durationObject == null){ return 0; } else { try { return Long.parseLong(durationObject.toString()); } catch (NumberFormatException e) { log.warn("Configuration "+DEFAULT_EXPIRE_DURATION+"="+durationObject+" can not be converted to an Number -> return -1",e); return -1; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getTestDuration() {\n return config.big ? TEST_TIME_SECONDS : TEST_TIME_SECONDS / 10;\n }", "@Range(min = 0)\n\t@NotNull\n\tpublic Integer getExpiration() {\n\t\treturn this.expiration;\n\t}", "public Integer getDuration() {\n return duration;\n }", "public Optional<BigInteger> getDuration() {\n return duration;\n }", "public Optional<Integer> maxLeaseTtlSeconds() {\n return Codegen.integerProp(\"maxLeaseTtlSeconds\").config(config).env(\"TERRAFORM_VAULT_MAX_TTL\").def(1200).get();\n }", "long getExpiration();", "int getExpiryTimeSecs();", "int getExpireTimeout();", "protected int getDuration() {\n try {\n return Utils.viewToInt(this.durationInput);\n }\n catch (NumberFormatException ex) {\n return Integer.parseInt(durationInput.getHint().toString());\n }\n }", "@SimpleProperty(description = \"The default duration (in seconds) of each scan for this probe\")\n\tpublic float DefaultDuration(){\n\t\t\n\t\treturn SCHEDULE_DURATION;\n\t}", "public int getDuration() {\n return duration_;\n }", "private int getDeleteExportDelay() {\r\n\tint timeout = 0;\r\n\r\n\t// TODO Check first in sakai.properties, then in the components.xml as\r\n\t// a bean property and then use the constant.\r\n\tString timeOutString =\r\n\t\tServerConfigurationService\r\n\t\t\t.getString(EXPORT_DELETE_DELAY_MINUTES_KEY);\r\n\tif (timeOutString != null && !\"\".equals(timeOutString)) {\r\n\t timeout = Integer.parseInt(timeOutString);\r\n\t} else if (timeOutString == null) {\r\n\t timeout = EXPORT_DELETE_DELAY_MINUTES;\r\n\t}\r\n\treturn timeout;\r\n\r\n }", "public int getDuration() {\n\t\treturn duration;\n\t}", "public Integer getExpiry() {\n return expiry;\n }", "public int getDuration() {\n return duration_;\n }", "public int getExpiryTimeSecs() {\n return expiryTimeSecs_;\n }", "public int getDuration() {\n return duration;\n }", "public int getDuration() {\n return duration;\n }", "public int getDuration() {\n return duration;\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.math.BigDecimal getDuration() {\n return (java.math.BigDecimal)__getInternalInterface().getFieldValue(DURATION_PROP.get());\n }", "public int getExpiryTimeSecs() {\n return expiryTimeSecs_;\n }", "public long getExpiration() {\n return expiration;\n }", "public int getDuration() {\n\t\treturn this.Duration;\n\t}", "@gw.internal.gosu.parser.ExtendedProperty\n public java.math.BigDecimal getDuration() {\n return (java.math.BigDecimal)__getInternalInterface().getFieldValue(DURATION_PROP.get());\n }", "public int getDuration() {\n return this.duration;\n }", "public Long getDuration()\r\n {\r\n return duration;\r\n }", "public long getDuration() {\n return duration;\n }", "public int getExpiryTime() {\n return expiryTime;\n }", "int getDuration();", "int getDuration();", "public int getDuration();", "public int getExpiry()\n {\n return expiry;\n }", "public int getExpiry();", "@Override\n\tpublic int getDuration() {\n\t\tlog(\"getDuration()\");\n\t\tif (getState() > PREPARING && getState() < ERROR \n\t\t\t\t&& mCurrentMediaPlayer != null) {\n\t\t\treturn mCurrentMediaPlayer.getDuration();\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}", "protected Duration getCacheDuration() {\n return Duration.ZERO;\n }", "long getDuration();", "public long getDuration() {\n return duration;\n }", "public long getDuration() { throw new RuntimeException(\"Stub!\"); }", "public int getDuration() { return duration; }", "public final int getExpiresAfter() {\n return 0;\n }", "Duration getDuration();", "@DefaultValue(\"300\")\n int getDeleteGracePeriodSeconds();", "public int getmDuration() {\n return mDuration;\n }", "public double getDuration() {\n\t\treturn duration;\n\t}", "int getDefaultAutoArchiveDuration();", "private Optional<Integer> getDurationForStatus(Status s) {\n Integer customD = durationPerStatus.get(s);\n if (customD != null) {\n return Optional.of(customD);\n }\n // is there a default one set?\n if (defaultDuration != null) {\n return Optional.of(defaultDuration);\n }\n // no default value or custom one for that status\n return Optional.empty();\n }", "public long getDuration()\n {\n return duration;\n }", "public long getTimeout() {\r\n return configuration.getTimeout();\r\n }", "public long getDuration() {\n return mDuration;\n }", "int getBurnDuration();", "public int getSleepInterval() {\n if ((curAd < 0) || (tozAdCampaign.isEmpty())) {\n AppyAdService.getInstance().debugOut(TAG, \"Sleep interval defaulting to \" + AppyAdService.getInstance().getDefaultSleepInterval());\n return (AppyAdService.getInstance().getDefaultSleepInterval());\n }\n else {\n AppyAdService.getInstance().debugOut(TAG,\"Sleep interval for current ad is \"+tozAdCampaign.get(curAd).mAdDuration);\n return (tozAdCampaign.get(curAd).mAdDuration);\n }\n //else return (sleepInterval);\n }", "public int getSessionExpireRate();", "public int getExpiryDelay()\n {\n return m_cExpiryDelay;\n }", "public String getDuration() {\n return duration;\n }", "public long getDuration()\n\t{ return (long)0;\n\t}", "public long getExpiry() {\n return this.expiry;\n }", "public int getDuration( ) {\nreturn numberOfPayments / MONTHS;\n}", "private static int getExplanationDeadlineInterval(ConfigurationObject config) {\r\n\r\n // Read explanation deadline interval:\r\n String valueStr = Helper.getPropertyValue(config, EXPLANATION_DEADLINE_INTERVAL, false, false);\r\n int value;\r\n try {\r\n if (valueStr != null) {\r\n value = Integer.parseInt(valueStr);\r\n\r\n if (value <= 0) {\r\n throw new LateDeliverablesTrackerConfigurationException(\r\n \"The property 'explanationDeadlineIntervalInHours' should be a positive integer.\");\r\n }\r\n } else {\r\n value = DEFAULT_EXPLANATION_DEADLINE_INTERVAL;\r\n }\r\n\r\n } catch (NumberFormatException e) {\r\n throw new LateDeliverablesTrackerConfigurationException(\r\n \"The property 'explanationDeadlineIntervalInHours' should be a positive integer.\", e);\r\n }\r\n\r\n return value;\r\n\r\n }", "public long getCacheExpirationSeconds() {\n return cache.getCacheExpirationSeconds();\n }", "public Optional<Integer> getResultTtlInSeconds() {\n return Optional.ofNullable(resultTtlInSeconds);\n }", "@JsonIgnore public Duration getEstimatedFlightDurationDuration() {\n return (Duration) getValue(\"estimatedFlightDuration\");\n }", "com.google.protobuf.Duration getDowntimeJailDuration();", "public String getDuration() {\n return this.duration;\n }", "public long getExpiry() {\n return this.contextSet.getExpiration();\n }", "@Nullable\n public Long getDuration() {\n return mDuration;\n }", "public int getDuration() {return this.duration;}", "public float getDuration() {\n\t\treturn duration;\n\t}", "@Override\n public final double getExpiration() {\n return safetyHelper.getExpiration();\n }", "public float getDuration()\n\t{\n\t\treturn duration;\n\t}", "@Autowired\n\tpublic void setDuration(@Value(\"${repair.duration}\") Duration duration) {\n\t\tthis.duration = DurationConverter.oneOrMore(duration);\n\t}", "org.apache.xmlbeans.XmlInt xgetDuration();", "public Long getExpires_in() {\r\n\t\treturn expires_in;\r\n\t}", "Double getActualDuration();", "@ApiModelProperty(value = \"The number of seconds until this request can no longer be answered.\")\n public BigDecimal getExpiresIn() {\n return expiresIn;\n }", "public int getContainerTokenExpiryInterval() {\n return containerTokenExpiryInterval;\n }", "java.lang.String getDuration();", "@Override\n\t\t\tpublic int durationToWait() {\n\t\t\t\treturn getCarType() == 2 ? 60000 : 15000;\n\t\t\t}", "public int getExpireMinutes()\n\t{\n\t\treturn m_expire;\n\t}", "public String getExpiration() {\n return this.expiration;\n }", "public int getEleMaxTimeOut(){\r\n\t\t String temp= rb.getProperty(\"eleMaxTimeOut\");\r\n\t\t return Integer.parseInt(temp);\r\n\t}", "public int getDefaultAnimationDuration() {\n return (defaultAnimationDuration);\n }", "public double getDuration () {\n return duration;\n }", "long getExpiryTime() {\n return expiryTime;\n }", "public int getDuration() {\n if (!mPlayerState.equals(State.IDLE)) {\n return mMediaPlayer.getDuration();\n }\n return 0;\n }", "public int getduration() {\n\t\tDuration duration = Duration.between(initial_time, current_time);\n\t\treturn (int)duration.getSeconds();\n\t}", "final public int getAnimationDuration()\n {\n return ComponentUtils.resolveInteger(getProperty(ANIMATION_DURATION_KEY), 1000);\n }", "private static long getNotificationInterval(ConfigurationObject config) {\r\n // Read and parse notification interval\r\n String notificationIntervalStr = Helper.getPropertyValue(config, NOTIFICATION_INTERVAL_KEY,\r\n false, false);\r\n\r\n if (notificationIntervalStr != null) {\r\n return Helper.parseLong(notificationIntervalStr,\r\n NOTIFICATION_INTERVAL_KEY, 1);\r\n }\r\n return 0;\r\n }", "public void setDuration(int val){this.duration = val;}", "public Duration length() {\n return getObject(Duration.class, FhirPropertyNames.PROPERTY_LENGTH);\n }", "public Integer getRecordDuration() {\n return recordDuration;\n }", "@DefaultValue(\"600\")\n long getPodTerminationGracePeriodSeconds();", "public DeltaSeconds getDuration() { \n return duration ;\n }", "private int getWaitTime(HashMap confMap) {\n return Integer.parseInt(confMap.get(\"TimeoutInSecond\").toString());\n }", "public long getExpiresIn() {\n return expiresIn;\n }", "public Integer trafficRestorationTimeToHealedOrNewEndpointsInMinutes() {\n return this.innerProperties() == null\n ? null\n : this.innerProperties().trafficRestorationTimeToHealedOrNewEndpointsInMinutes();\n }", "String getSpecifiedExpiry();", "public long getRetryInterval() {\r\n return configuration.getRetryInterval();\r\n }", "public int getRegularWageDurationSeconds() {\n return regularWageDurationSeconds;\n }", "@Nullable\n public Long getExpiresIn() {\n return expiresIn;\n }", "public final String getRequestExpiration() {\n return properties.get(REQUEST_EXPIRATION_PROPERTY);\n }" ]
[ "0.6006397", "0.59527856", "0.5808564", "0.5751902", "0.5749416", "0.56745553", "0.5672891", "0.5656952", "0.5650328", "0.5614927", "0.56149113", "0.56128764", "0.560717", "0.5600773", "0.5576192", "0.5571192", "0.55699474", "0.55699474", "0.55699474", "0.556709", "0.5563075", "0.55488014", "0.5545025", "0.55441356", "0.5530595", "0.549638", "0.5482413", "0.54790306", "0.5470521", "0.5470521", "0.54591703", "0.54513335", "0.54400617", "0.5435374", "0.5433341", "0.54143304", "0.54067683", "0.53958654", "0.5395071", "0.53935605", "0.53757924", "0.5373199", "0.5345606", "0.53297675", "0.53116226", "0.5308725", "0.5292835", "0.5290614", "0.528445", "0.528187", "0.5276353", "0.52762157", "0.52678066", "0.5255357", "0.52531296", "0.5251886", "0.5250594", "0.5248648", "0.52460045", "0.5244117", "0.5243143", "0.5241326", "0.52413243", "0.5239403", "0.5229624", "0.5225849", "0.52197254", "0.52152365", "0.5207876", "0.52075386", "0.5200778", "0.5196962", "0.5195411", "0.51832044", "0.5178783", "0.5178208", "0.5174274", "0.51713705", "0.51681334", "0.5166268", "0.51501334", "0.5148919", "0.5146144", "0.51449966", "0.51375926", "0.5133283", "0.51314455", "0.5123698", "0.5105053", "0.50938463", "0.50897586", "0.50875586", "0.5074063", "0.50699097", "0.50692135", "0.5061266", "0.50598997", "0.50582373", "0.5057983", "0.50432974" ]
0.77188253
0
/ OSGI LIFECYCLE and LISTENER METHODS
@SuppressWarnings("unchecked") @Activate protected void activate(final ComponentContext context) throws ConfigurationException, YardException, InvalidSyntaxException { log.info("in "+ReferencedSiteImpl.class+" activate with properties "+context.getProperties()); if(context == null || context.getProperties() == null){ throw new IllegalStateException("No Component Context and/or Dictionary properties object parsed to the acticate methode"); } this.context = context; this.properties = context.getProperties(); //check and init all required properties! accessUri = OsgiUtils.checkProperty(properties,ConfiguredSite.ACCESS_URI).toString(); //accessURI is the default for the Query URI queryUri = OsgiUtils.checkProperty(properties,ConfiguredSite.QUERY_URI,accessUri).toString(); OsgiUtils.checkProperty(properties,ID); dereferencerComponentName = OsgiUtils.checkProperty(context.getProperties(), ConfiguredSite.DEREFERENCER_TYPE).toString(); if(dereferencerComponentName.isEmpty() || dereferencerComponentName.equals("none")){ dereferencerComponentName = null; } entitySearcherComponentName = OsgiUtils.checkProperty(this.properties, ConfiguredSite.SEARCHER_TYPE).toString(); if(entitySearcherComponentName.isEmpty() || entitySearcherComponentName.equals("none")){ entitySearcherComponentName = null; } //if the accessUri is the same as the queryUri and both the dereferencer and //the entitySearcher uses the same component, than we need only one component //for both dependencies. this.dereferencerEqualsEntitySearcherComponent = accessUri.equals(queryUri) && dereferencerComponentName != null && dereferencerComponentName.equals(entitySearcherComponentName); cacheStrategy = OsgiUtils.checkEnumProperty(CacheStrategy.class, properties, ConfiguredSite.CACHE_STRATEGY); //check if the congfig is valid if(this.cacheStrategy != CacheStrategy.none){ //check if the cacheId is configured if cacheStrategy != none this.cacheId = OsgiUtils.checkProperty(this.properties, ConfiguredSite.CACHE_ID).toString(); } //check that both dereferencer and searcher are configured if cacheStrategy != all if(cacheStrategy != CacheStrategy.all && (dereferencerComponentName==null || entitySearcherComponentName == null)){ throw new ConfigurationException(ConfiguredSite.CACHE_STRATEGY, String.format("If the EntitySearcher and/or the EntityDereferencer are set to \"none\", than the used CacheStragegy MUST BE \"all\"! (entitySearcher=%s | dereferencer=%s | cacheStrategy=%s", dereferencerComponentName==null?"none":dereferencerComponentName, entitySearcherComponentName==null?"none":entitySearcherComponentName, cacheStrategy)); } //parse the field mappings initFieldmappings(context); //now init the referenced Services initDereferencerAndEntitySearcher(); // If a cache is configured init the ServiceTracker used to manage the // Reference to the cache! if(cacheId != null){ String cacheFilter = String.format("(&(%s=%s)(%s=%s))", Constants.OBJECTCLASS,Cache.class.getName(), Cache.CACHE_YARD,cacheId); cacheTracker = new ServiceTracker(context.getBundleContext(), context.getBundleContext().createFilter(cacheFilter), null); cacheTracker.open(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createAndListen() {\n\n\t\t\n\t}", "@Override\r\n\tprotected void listeners() {\n\t\t\r\n\t}", "@Override\n\tpublic void getListener(){\n\t}", "public void run()\n {\n CallerContextManager ccm = (CallerContextManager) ManagerManager.getInstance(CallerContextManager.class);\n CallerContext cc = ccm.getCurrentContext();\n CCData data = getCCData(cc);\n if ((data != null) && (data.listeners != null)) data.listeners.notifyChange(event);\n }", "protected abstract void startListener();", "public abstract void lifeCycle();", "void onListeningStarted();", "public interface ManagerListener extends EventListener {\r\n\t\r\n\t/**\r\n\t * Method to notify that a manager has joined the application.\r\n\t *\r\n\t * @param e the event\r\n\t */\r\n\tpublic void managerAdded(ManagerEvent e);\r\n\t\r\n\t/**\r\n\t * Method to notify that a manager's active model has been modified\r\n\t * to reflect a new design task.\r\n\t *\r\n\t * @param e the event\r\n\t */\r\n\tpublic void managerModelModified(ManagerEvent e);\r\n\t\r\n\t/**\r\n\t * Method to notify that a manager's output has been modified to \r\n\t * reflect a new set of inputs from designers.\r\n\t *\r\n\t * @param e the event\r\n\t */\r\n\tpublic void managerOutputModified(ManagerEvent e);\r\n\t\r\n\t/**\r\n\t * Method to notify that a manger has left the application.\r\n\t *\r\n\t * @param e the event\r\n\t */\r\n\tpublic void managerRemoved(ManagerEvent e);\r\n}", "@Override\n\tpublic void StartListening()\n\t{\n\t\t\n\t}", "public ASListener(){\n \t\treload();\n \t}", "protected Listener(){super();}", "public FluoriteListener() {\r\n\t\tidleTimer = new IdleTimer();\r\n\t\tEHEventRecorder eventRecorder = EHEventRecorder.getInstance();\r\n//\t\tEventRecorder eventRecorder = EventRecorder.getInstance();\r\n\r\n//\t\teventRecorder.addCommandExecutionListener(this);\r\n//\t\teventRecorder.addDocumentChangeListener(this);\r\n//\t\teventRecorder.addRecorderListener(this);\r\n\t\teventRecorder.addEclipseEventListener(this);\r\n\t}", "public interface Listener {}", "public interface MonitoringEventListener {\n\n /**\n * Callback for received STDOUT lines.\n * \n * @param line stdout line\n */\n void appendStdout(String line);\n\n /**\n * Callback for received STDERR lines.\n * \n * @param line stderr line\n */\n void appendStderr(String line);\n\n /**\n * Callback for additional user information lines (validation, progress, ...).\n * \n * @param line information line\n */\n void appendUserInformation(String line);\n}", "void onStarted();", "@Override\n public void start() {\n }", "public void consulterEvent() {\n\t\t\n\t}", "EventManager()\n {\n }", "public void startListening();", "public ReplicationEventListener() {\n // connect to both the process and storage cluster\n this.hzClient = HazelcastClientFactory.getStorageClient();\n // get references to the system metadata map and events queue\n this.systemMetadata = this.hzClient.getMap(systemMetadataMap);\n // listen for changes on system metadata\n this.systemMetadata.addEntryListener(this, true);\n log.info(\"Added a listener to the \" + this.systemMetadata.getName() + \" map.\");\n this.replicationTaskRepository = ReplicationFactory.getReplicationTaskRepository();\n // start replication manager\n ReplicationFactory.getReplicationManager();\n }", "@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tlisten();\n\t\t\t\t}", "@Override\n public void start() {}", "@Override\n public void start() {\n\n }", "@Override\n public void start() {\n\n }", "@Override\n public void start() {\n\n }", "@Override\n\tpublic void setup()\n\t{\n\t\tCoreNotifications.get().addListener(this, ICoreContextOperationListener.class);\n\t\tCoreNotifications.get().addListener(this, ICoreProcedureInputListener.class);\n\t\tCoreNotifications.get().addListener(this, ICoreProcedureRuntimeListener.class);\n\t\tCoreNotifications.get().addListener(this, ICoreProcedureOperationListener.class);\n\t}", "void onServerStarted();", "public interface Listener {\n}", "public interface Listener {\n}", "public void start() {\n\n }", "public void start(){\n }", "public interface WFEventListener extends ActivityInsEventListener, ProcessInsEventListener {\r\n\r\n /**\r\n * called when a timer event is fired;\r\n */\r\n public void onTimerEvent();\r\n\r\n public void addECAList(ECAList list);\r\n\r\n}", "@Override\n public void start() { }", "private void start() {\n\n\t}", "public void service() {\n\t}", "public void start() {}", "public void start() {}", "Move listen(IListener ll);", "private void createEvents() {\n\t}", "@Override\n\tLifecycle on();", "@Override\r\n public void start() {\r\n }", "@Override\n\tpublic void start() {\n\n\t}", "public void start()\n/* 354: */ {\n/* 355:434 */ onStartup();\n/* 356: */ }", "public interface LifeCycleHandler {\n\n\tvoid beginning() throws Exception;\n\n\tvoid ending() throws Exception;\n\n}", "public void run() {\n try {\n this.initialize();\n Listener ln = new Listener(localDir, port);\n ln.run();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@Override\r\n\tpublic void setListener() {\n\r\n\t}", "@Override\r\n\tpublic void setListener() {\n\r\n\t}", "public interface TextileEventListener {\n\n /**\n * Called when the Textile node is started successfully\n */\n void nodeStarted();\n\n /**\n * Called when the Textile node fails to start\n * @param e The error describing the failure\n */\n void nodeFailedToStart(Exception e);\n\n /**\n * Called when the Textile node is successfully stopped\n */\n void nodeStopped();\n\n /**\n * Called when the Textile node fails to stop\n * @param e The error describing the failure\n */\n void nodeFailedToStop(Exception e);\n\n /**\n * Called when the Textile node comes online\n */\n void nodeOnline();\n\n /**\n * Called when the node is scheduled to be stopped in the future\n * @param seconds The amount of time the node will run for before being stopped\n */\n void willStopNodeInBackgroundAfterDelay(int seconds);\n\n /**\n * Called when the scheduled node stop is cancelled, the node will continue running\n */\n void canceledPendingNodeStop();\n\n /**\n * Called when the Textile node receives a notification\n * @param notification The received notification\n */\n void notificationReceived(Notification notification);\n\n /**\n * Called when any thread receives an update\n * @param feedItem The thread update\n */\n void threadUpdateReceived(FeedItem feedItem);\n\n /**\n * Called when a new thread is successfully added\n * @param threadId The id of the newly added thread\n */\n void threadAdded(String threadId);\n\n /**\n * Called when a thread is successfully removed\n * @param threadId The id of the removed thread\n */\n void threadRemoved(String threadId);\n\n /**\n * Called when a peer node is added to the user account\n * @param peerId The id of the new account peer\n */\n void accountPeerAdded(String peerId);\n\n /**\n * Called when an account peer is removed from the user account\n * @param peerId The id of the removed account peer\n */\n void accountPeerRemoved(String peerId);\n\n /**\n * Called when any query is complete\n * @param queryId The id of the completed query\n */\n void queryDone(String queryId);\n\n /**\n * Called when any query fails\n * @param queryId The id of the failed query\n * @param e The error describing the failure\n */\n void queryError(String queryId, Exception e);\n\n /**\n * Called when there is a thread query result available\n * @param queryId The id of the corresponding query\n * @param thread A thread query result\n */\n void clientThreadQueryResult(String queryId, Thread thread);\n\n /**\n * Called when there is a contact query result available\n * @param queryId The id of the corresponding query\n * @param contact A contact query result\n */\n void contactQueryResult(String queryId, Contact contact);\n}", "public void handleStart()\n {\n }", "@Override\n public void start() {\n }", "@Override\n public void start() {\n }", "@Override\n public void start() {\n }", "@Override\n public void start() {\n }", "@Override\n public void start() {\n }", "@Override\n public void start() {\n }", "@Override\n public void start() {\n }", "@Override\n\tpublic void start() {\n\t}", "@Override\n\tpublic void start() {\n\t}", "@Override\n\t\t\t\t\tpublic void onStart(int what, Object[] params) {\n\n\t\t\t\t\t}", "public interface MDDChannelListener {\r\n /**\r\n * Called on receipt of CHANNEL events\r\n * @param channel String containing the name of the channel\r\n * @param title String containing the title of the program\r\n * @param subtitle String containing the subtitle of the program\r\n */\r\n public void onChannel(String channel, String title, String subtitle);\r\n /**\r\n * Called on receipt of PROGRESS events\r\n * @param pos int representing current position\r\n */\r\n public void onProgress(int pos);\r\n /**\r\n * Called on receipt of EXIT event\r\n */\r\n public void onExit();\r\n}", "@Override\r\n\tpublic void start() {\n\t\t\r\n\t}", "@Override\n\tpublic void start() {\n\t\t\n\t}", "@Override\n\tpublic void start() {\n\t\t\n\t}", "@Override\n\tpublic void start() {\n\t\t\n\t}", "@Override\n\tpublic void start() {\n\t\t\n\t}", "public interface TIOADExecutorListeners{\n void OnStart();\n void OnStarting(double pro);\n void OnError(int error);\n void OnSuccess();\n}", "@Override public void start() {\n }", "@Override\n\tprotected void initListener() {\n\n\t}", "@Override\n\tprotected void setListener() {\n\n\t}", "@Override\n\tprotected void setListener() {\n\n\t}", "@Override\n\tpublic void run() {\n\t\tregisterTab(\"chat\");\n\t\tregisterListener(\"COMMAND\");\n\t}", "public abstract void onProcess();", "public void start() {\n\n\t}", "void mo9949a(StatusListener eVar);", "public void start() {\n\r\n }", "void start() {\n }", "@Override\r\n\tpublic void startEvent() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void startEvent() {\n\t\t\r\n\t}", "@Override\n\tprotected void initListeners() {\n\t\t\n\t}", "protected void start() {\n }", "public interface IInstanceListener {\n\t\n /**\n * Called when an instance is first created\n * \n * @param pid the instance that was created\n * @param definition the definition that created it\n */\n\tvoid instanceCreated(String pid, IDefinition definition);\n\t\n\t/**\n\t * Called when an instance pauses i.e. persists itself and is\n\t * not yet completed.\n\t * \n\t * @param pid the instance that pauses\n\t * @param result the paused result, including the continuation\n\t */\n\tvoid instancePaused(String pid, IPausedResult result);\n\t\n\t/**\n\t * Called if the instance fails\n\t * \n\t * @param pid the failing instance\n\t * @param result the failed result including the exception\n\t */\n void instanceFailed(String pid, IFailedResult result);\n \n /**\n * Called when an instance is killed\n * \n * @param pid the instance id that was killed\n * @param result the killed result\n */\n void instanceKilled(String pid, IKilledResult result);\n \n /**\n * Called when an instance completes\n * \n * @param pid the instance that completed\n * @param result the completed result\n */\n\tvoid instanceCompleted(String pid, ICompletedResult result);\n\n}", "public void start() {\n }", "@Override\n\tpublic void setListener() {\n\n\t}", "public GlobalNodeListener() {\n log.fine(\">>> Initialised\");\n }", "@Override\r\n\tpublic void initListener() {\n\r\n\t}", "@Override\n public void onContextCreated() {\n HeartbeatJob.updateBinaryServiceClusterChanges(serversService);\n registersHeartbeatJob();\n registerCallHomeJob();\n }", "private SecurityListener(){\n Bukkit.getPluginManager().registerEvents(this, SteveSus.getInstance());\n }", "public void run() {\n\t\t\t\n\t\t\tccListenerStarter() ;\n\t\t\t\n\t\t\toutPrintStream.println(\"#GETNAME\");\n\t\t\t\n\t\t}", "private void initListener() {\n }", "@Override\n\tpublic void listenerStarted(ConnectionListenerEvent evt) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tnew ListenAcross();\n\t}", "public void start() {\n\t\t\n\t}", "public void start() {\n\t\t\n\t}", "private DefaultListener() {\n }", "@Override\r\n\tpublic void onEvent(Object e) {\n\t}", "private void setListeners() {\n\n }", "public interface ShellLaunchListener {\n /**\n * Called when the connection to the target machine is initiated, for example\n * when debugger reports machine attach.\n * @param ev \n */\n public void connectionInitiated(ShellLaunchEvent ev);\n \n /**\n * The handshake with the target VM has succeeded, or failed. The 'agent' field\n * is valid.\n * @param ev \n */\n public void handshakeCompleted(ShellLaunchEvent ev);\n \n /**\n * Called when the connection has been closed. The connection and\n * agent fields are valid. Agent may be still live, so a new Connection\n * can be opened.\n * @param ev \n */\n public void connectionClosed(ShellLaunchEvent ev);\n \n /**\n * The VM agent has been destroyed. Perhaps the entire VM went down or something.\n * @param ev \n */\n public void agentDestroyed(ShellLaunchEvent ev);\n}", "public interface ApplicationListener extends EventListener {\n\n /**\n * Handle an application event\n *\n * @param e event to respond to\n */\n void onApplicationEvent(ApplicationEvent e);\n\n}", "private void setListener() {\n\t}", "private Listener() {\r\n // unused\r\n }", "@Override\r\n\tpublic void run() {\r\n\t\ttry {\r\n\t\t\teb = new EventBus(ebAddress, ebPort);\r\n\t\t\teb.start();\r\n\t\t\t// Add listener to listen for logins\r\n\t\t\tLoginListener loginListener = new LoginListener(location);\r\n\t\t\teb.addListener(loginListener);\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle\r\n\t\t}\r\n\r\n\t}" ]
[ "0.681156", "0.65694", "0.6542061", "0.64192104", "0.64100844", "0.63319236", "0.629995", "0.6296997", "0.6286717", "0.6286142", "0.6261996", "0.62348473", "0.6197066", "0.6192705", "0.61650497", "0.61646986", "0.6156514", "0.6115943", "0.60974157", "0.60897076", "0.60769486", "0.60675454", "0.6066821", "0.6066821", "0.6066821", "0.6038384", "0.60324", "0.6029402", "0.6029402", "0.60177225", "0.6011332", "0.6009527", "0.60063344", "0.5985914", "0.598585", "0.5983859", "0.5983859", "0.5982935", "0.59820586", "0.5978124", "0.59774315", "0.59684604", "0.59680474", "0.59564316", "0.5955084", "0.5945605", "0.5945605", "0.594207", "0.5940079", "0.5937135", "0.5937135", "0.5937135", "0.5937135", "0.5937135", "0.5937135", "0.5937135", "0.5936357", "0.5936357", "0.59350944", "0.5926801", "0.592559", "0.5923129", "0.5923129", "0.5923129", "0.5923129", "0.59230703", "0.5920137", "0.59189653", "0.5915288", "0.5915288", "0.5915033", "0.5911602", "0.59108835", "0.59050554", "0.5895312", "0.5892777", "0.5892387", "0.5892387", "0.5885528", "0.58754396", "0.58710617", "0.58643013", "0.58548987", "0.5852543", "0.58505505", "0.58505046", "0.58482546", "0.5844906", "0.58414555", "0.58181113", "0.58146137", "0.5799942", "0.5799942", "0.5799327", "0.57946384", "0.5791888", "0.57908154", "0.57898504", "0.5787388", "0.5784858", "0.57825" ]
0.0
-1
apply movetofront encoding, reading from standard input and writing to standard output
public static void encode() { int[] index = new int[R + 1]; char[] charAtIndex = new char[R + 1]; for (int i = 0; i < R + 1; i++) { index[i] = i; charAtIndex[i] = (char) i; } while (!BinaryStdIn.isEmpty()) { char c = BinaryStdIn.readChar(); BinaryStdOut.write((char)index[c]); for (int i = index[c] - 1; i >= 0; i--) { char temp = charAtIndex[i]; int tempIndex = ++index[temp]; charAtIndex[tempIndex] = temp; } charAtIndex[0] = c; index[c] = 0; } BinaryStdOut.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void encode() {\n char[] symbols = initializeSymbols();\n int position;\n while (!BinaryStdIn.isEmpty()) {\n char symbol = BinaryStdIn.readChar();\n position = 0;\n while (symbols[position] != symbol) {\n position++;\n }\n BinaryStdOut.write(position, BITS_PER_BYTE);\n System.arraycopy(symbols, 0, symbols, 1, position);\n symbols[0] = symbol;\n }\n BinaryStdOut.close();\n }", "public static void encode() {\n char[] seq = new char[R];\n\n for (int i = 0; i < R; i++)\n seq[i] = (char) i;\n\n while (!BinaryStdIn.isEmpty()) {\n char c = BinaryStdIn.readChar();\n char t = seq[0];\n int i;\n for (i = 0; i < R - 1; i++) {\n char tmp;\n if (t == c) break;\n tmp = t;\n t = seq[i + 1];\n seq[i + 1] = tmp;\n }\n seq[0] = t;\n BinaryStdOut.write((char) i);\n }\n BinaryStdOut.close();\n }", "public static void main(String[] args) throws IOException {\n InputStreamReader inputStreamReader = new InputStreamReader(new FileInputStream(args[0]), \"utf-8\");\n OutputStreamWriter outputStreamWriter = new OutputStreamWriter(new FileOutputStream(args[1]), \"windows-1251\");\n\n while (inputStreamReader.ready()) {\n outputStreamWriter.write( inputStreamReader.read() );\n }\n inputStreamReader.close();\n outputStreamWriter.close();\n }", "@Test\n public void testTransform() {\n InputStream standardIn = System.in;\n PrintStream standardOut = System.out;\n try {\n // setup new input\n System.setIn(new ByteArrayInputStream(DECODED_INPUT.getBytes()));\n // create new output stream as byte array and assign to standard\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n System.setOut(new PrintStream(baos));\n\n BurrowsWheeler.transform();\n byte[] encoded = baos.toByteArray();\n assertEquals(ENCODED_INPUT.length, encoded.length);\n for (int i = 0; i < encoded.length; i++) {\n assertEquals(ENCODED_INPUT[i], encoded[i]);\n }\n } finally {\n // return standard input and output\n System.setIn(standardIn);\n System.setOut(standardOut);\n }\n }", "public FakeStandardOutput() throws UnsupportedEncodingException {\r\n super(new StringOutputStream(), true, \"UTF8\");\r\n innerStream = (StringOutputStream) super.out;\r\n }", "OutputStream getStdin();", "@Test\n public void testTransform3() {\n InputStream standardIn = System.in;\n PrintStream standardOut = System.out;\n try {\n // setup new input\n System.setIn(new ByteArrayInputStream(DECODED_INPUT3.getBytes()));\n // create new output stream as byte array and assign to standard\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n System.setOut(new PrintStream(baos));\n\n BurrowsWheeler.transform();\n byte[] encoded = baos.toByteArray();\n assertEquals(ENCODED_INPUT3.length, encoded.length);\n for (int i = 0; i < encoded.length; i++) {\n assertEquals(ENCODED_INPUT3[i], encoded[i]);\n }\n } finally {\n // return standard input and output\n System.setIn(standardIn);\n System.setOut(standardOut);\n }\n }", "public static void main(String[] args) throws IOException {\n InputStream bS = new ByteArrayInputStream(\"Ы\".getBytes());\n int b = 0;\n while ((b = bS.read()) != -1)\n System.out.print(b + \" \");\n System.out.println(\"\\n\");\n\n for (byte c : \"Ы\".getBytes())\n System.out.print((c^-1 << 8) + \" \");\n System.out.println(\"\\n\");\n\n String s = \"Ы\";\n byte[] b1 = s.getBytes();\n for (int i = 0; i < b1.length; i++ ) {\n System.out.print(((int) b1[i] ^ -1 << 8) + \" \");\n }\n Writer writer = new OutputStreamWriter(System.out, StandardCharsets.US_ASCII);\n writer.write(\"Ч\");\n writer.close();\n }", "public static void main(String[] args) throws IOException {\n BufferedReader f = new BufferedReader(new InputStreamReader(System.in));\n PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));\n int N = Integer.parseInt(f.readLine());\n StringBuilder sb = new StringBuilder();\n for(int i = 0; i < N; i++) {\n sb.append(f.readLine());\n }\n StringBuilder res = new StringBuilder();\n while(sb.length() > 0) {\n char[] forward = sb.toString().toCharArray();\n char[] backward = new char[forward.length];\n for(int i = 0; i < forward.length; i++) {\n backward[i] = forward[forward.length-i-1];\n }\n String a = new String(forward);\n String b = new String(backward);\n if(a.compareTo(b) < 0) {\n res.append(sb.charAt(0));\n sb.deleteCharAt(0);\n } else {\n res.append(sb.charAt(sb.length()-1));\n sb.deleteCharAt(sb.length()-1);\n }\n }\n int idx = 0;\n while(idx < res.length()) {\n if(idx%80 == 0 && idx > 0) {\n out.println();\n }\n out.print(res.charAt(idx++));\n }\n out.println();\n f.close();\n out.close();\n }", "public static void decode() {\n char[] seq = new char[R];\n\n for (int i = 0; i < R; i++)\n seq[i] = (char) i;\n\n while (!BinaryStdIn.isEmpty()) {\n int index = BinaryStdIn.readChar();\n char c = seq[index];\n BinaryStdOut.write(seq[index]);\n\n for (int i = index; i > 0; i--)\n seq[i] = seq[i - 1];\n seq[0] = c;\n }\n BinaryStdOut.close();\n }", "public static void main(String[] args) throws IOException {\r\n BufferedReader input = new BufferedReader(new InputStreamReader(System.in,\"UTF-8\"));\r\n PrintStream output = new PrintStream(System.out, true, \"UTF-8\");\r\n \tString line;\r\n \twhile ( (line = input.readLine()) != null) {\r\n \t\tList<String> toks = tokenizeRawTweetText(line);\r\n \t\tfor (int i=0; i<toks.size(); i++) {\r\n \t\t\toutput.print(toks.get(i));\r\n \t\t\tif (i < toks.size()-1) {\r\n \t\t\t\toutput.print(\" \");\r\n \t\t\t}\r\n \t\t}\r\n \t\toutput.print(\"\\n\");\r\n \t}\r\n }", "public static void main(String[] args) throws IOException {\n Charset windows = Charset.forName(\"Windows-1251\");\n String sourceFile = args[0];\n String destFile = args[1];\n\n BufferedReader in = new BufferedReader(new FileReader(sourceFile));\n PrintWriter out = new PrintWriter(new FileWriter(destFile));\n\n ArrayList<String > source = new ArrayList<>();\n String line;\n while ((line = in.readLine()) != null){\n source.add(line);\n }\n ArrayList<String> decod = new ArrayList<>();\n\n for (String current: source){\n decod.add(new String(current.getBytes(windows)));\n }\n for(String item: decod){\n out.println(item);\n }\n in.close();\n out.close();\n }", "@Test\n public void testTransform2() {\n InputStream standardIn = System.in;\n PrintStream standardOut = System.out;\n try {\n // setup new input\n System.setIn(new ByteArrayInputStream(DECODED_INPUT2.getBytes()));\n // create new output stream as byte array and assign to standard\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n System.setOut(new PrintStream(baos));\n\n BurrowsWheeler.transform();\n byte[] encoded = baos.toByteArray();\n assertEquals(ENCODED_INPUT2.length, encoded.length);\n for (int i = 0; i < encoded.length; i++) {\n assertEquals(ENCODED_INPUT2[i], encoded[i]);\n }\n } finally {\n // return standard input and output\n System.setIn(standardIn);\n System.setOut(standardOut);\n }\n }", "public void readFromPc(String input) {\n\n }", "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 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 }", "public static void encode(InputStream in, OutputStream out)\n throws IOException {\n int[] inBuffer = new int[3];\n\n boolean done = false;\n while (!done && (inBuffer[0] = in.read()) != END_OF_INPUT){\n // Fill the buffer\n inBuffer[1] = in.read();\n inBuffer[2] = in.read();\n\n /*\n * The first byte of input is valid but must check other two bytes\n * are not equal to END_OF_INPUT. Each set of three bytes add up to\n * 24 bits, the 24 bits are split up into 4 bytes of 6 bits and\n * converted to ascii characters.\n *\n * If there are not enough bytes to make a 24 bit group, the\n * remaining ascii characters are converted to the = character.\n */\n\n // Byte 1: first six bits of first byte\n out.write(lookupMap[inBuffer[0]>>2 ]);\n if (inBuffer[1]!=END_OF_INPUT){\n // Byte 2: last two bits of first byte, first four bits of second byte\n out.write(lookupMap[((inBuffer[0]<<4)&0x30)|(inBuffer[1]>>4)]);\n if (inBuffer[2] != END_OF_INPUT){\n // Byte 3: last four bits of second byte, first two bits of third byte\n out.write(lookupMap[((inBuffer[1]<<2)&0x3c)|(inBuffer[2]>>6) ]);\n // Byte 4: last six bits of third byte\n out.write(lookupMap[inBuffer[2]&0x3F]);\n } else {\n // Byte 3: last four bits of second byte\n out.write(lookupMap[((inBuffer[1]<<2)&0x3c)]);\n // Output = if no more characters to write\n out.write('=');\n done = true;\n }\n } else {\n // Byte 2: last two bits of first byte\n out.write(lookupMap[((inBuffer[0]<<4)&0x30)]);\n // Output = if no more characters to write\n out.write('=');\n out.write('=');\n done=true;\n }\n }\n out.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 }", "InputStream synthesize(String phrase, OutputFormat fmt) throws IOException;", "@Test(timeout = 4000)\n public void test137() throws Throwable {\n JavaCharStream javaCharStream0 = new JavaCharStream((Reader) null);\n PipedInputStream pipedInputStream0 = new PipedInputStream();\n javaCharStream0.ReInit((InputStream) pipedInputStream0, 122, 122);\n assertEquals((-1), javaCharStream0.bufpos);\n }", "@Test\n public void testInverseTransform3() {\n InputStream standardIn = System.in;\n PrintStream standardOut = System.out;\n try {\n // setup new input with encoded message\n System.setIn(new ByteArrayInputStream(ENCODED_INPUT3));\n // create new output stream as byte array and assign to standard\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n System.setOut(new PrintStream(baos));\n\n BurrowsWheeler.inverseTransform();\n String decoded = baos.toString();\n // check length and chars\n assertEquals(DECODED_INPUT3.length(), decoded.length());\n assertEquals(DECODED_INPUT3, decoded);\n } finally {\n // return standard input and output\n System.setIn(standardIn);\n System.setOut(standardOut);\n }\n }", "public static void transform() {\r\n \tString str = BinaryStdIn.readString();;\r\n \tCircularSuffixArray suffixArr = new CircularSuffixArray(str);\r\n \tfor (int i = 0; i < suffixArr.length(); i++) {\r\n \t\tif (suffixArr.index(i) == 0) {\r\n \t\t\tBinaryStdOut.write(i);\r\n \t\t\tbreak;\r\n \t\t}\r\n \t}\r\n \tfor (int i = 0; i < suffixArr.length(); i++) {\r\n \t\tint pos = suffixArr.index(i);\r\n \t\tif (pos == 0) {\r\n \t\t\tpos = suffixArr.length();\r\n \t\t}\r\n \t\tBinaryStdOut.write(str.charAt(pos - 1), 8);\r\n \t}\r\n \tBinaryStdOut.close();\r\n }", "public static void decode() {\n char[] symbols = initializeSymbols();\n int position;\n while (!BinaryStdIn.isEmpty()) {\n position = BinaryStdIn.readChar();\n char symbol = symbols[position];\n BinaryStdOut.write(symbol, BITS_PER_BYTE);\n System.arraycopy(symbols, 0, symbols, 1, position);\n symbols[0] = symbol;\n }\n BinaryStdOut.close();\n }", "public VT10xEmulator(ICharacterTerminal term, InputStream in, OutputStream out) {\n super(term, in, out);\n }", "void perform(LineReader input, OutputStream output) throws IOException;", "@Test\n public void testInverseTransform() {\n InputStream standardIn = System.in;\n PrintStream standardOut = System.out;\n try {\n // setup new input with encoded message\n System.setIn(new ByteArrayInputStream(ENCODED_INPUT));\n // create new output stream as byte array and assign to standard\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n System.setOut(new PrintStream(baos));\n\n BurrowsWheeler.inverseTransform();\n String decoded = baos.toString();\n // check length and chars\n assertEquals(DECODED_INPUT.length(), decoded.length());\n assertEquals(DECODED_INPUT, decoded);\n } finally {\n // return standard input and output\n System.setIn(standardIn);\n System.setOut(standardOut);\n }\n }", "public static void encode () {\n // read the input\n s = BinaryStdIn.readString();\n char[] input = s.toCharArray();\n\n int[] indices = new int[input.length];\n for (int i = 0; i < indices.length; i++) {\n indices[i] = i;\n }\n \n Quick.sort(indices, s);\n \n // create t[] and find where original ended up\n char[] t = new char[input.length]; // last column in suffix sorted list\n int inputPos = 0; // row number where original String ended up\n \n for (int i = 0; i < indices.length; i++) {\n int index = indices[i];\n \n // finds row number where original String ended up\n if (index == 0)\n inputPos = i;\n \n if (index > 0)\n t[i] = s.charAt(index-1);\n else\n t[i] = s.charAt(indices.length-1);\n }\n \n \n // write t[] preceded by the row number where orginal String ended up\n BinaryStdOut.write(inputPos);\n for (int i = 0; i < t.length; i++) {\n BinaryStdOut.write(t[i]);\n BinaryStdOut.flush();\n } \n }", "private void loadOutput(InputStream in) throws IOException\r\n\t{\r\n\t\tlogger.debug(\"Begin: \"+getClass().getName()+\":loadOutput()\");\t\r\n\t\tStringBuffer sb=new StringBuffer();\r\n\t\tint c;\r\n\t\twhile((c=in.read())!= -1) \r\n\t\t{\t\t \r\n\t\t\tsb.append((char)c);\r\n\t\t}\t \r\n\t\toutput=sb.toString();\t\t\r\n\t\tlogger.debug(\"output is : \"+output);\r\n\t\tlogger.debug(\"Begin: \"+getClass().getName()+\":loadOutput()\");\t\r\n\t}", "@Test\n public void testInverseTransform2() {\n InputStream standardIn = System.in;\n PrintStream standardOut = System.out;\n try {\n // setup new input with encoded message\n System.setIn(new ByteArrayInputStream(ENCODED_INPUT2));\n // create new output stream as byte array and assign to standard\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n System.setOut(new PrintStream(baos));\n\n BurrowsWheeler.inverseTransform();\n String decoded = baos.toString();\n // check length and chars\n assertEquals(DECODED_INPUT2.length(), decoded.length());\n assertEquals(DECODED_INPUT2, decoded);\n } finally {\n // return standard input and output\n System.setIn(standardIn);\n System.setOut(standardOut);\n }\n }", "public static void main(String[] args) {\n\t\tString charactorSet = \"UTF-8\";\n\t\tString string = \"꽑한글과Alphabet조합\";\n\n\t\tCharset charset = Charset.forName(charactorSet);\n\t\tCharsetEncoder charsetEncoder = charset.newEncoder();\n\n\t\tCharBuffer charBuffer = CharBuffer.allocate(64);\n\t\tcharBuffer.put(string);\n\t\tcharBuffer.flip();\n\n\t\tByteBuffer byteBuffer = ByteBuffer.allocate(6);\n\n\t\tCoderResult coderResult = null;\n\t\tFileOutputStream fileOutputStream = null;\n\t\tFileChannel fileChannel = null;\n\t\t\n\t\tSystem.out.println(\"string\t\t\t:\t\" + string);\n\t\tSystem.out.println(\"string.length()\t\t:\t\" + string.length());\n\t\tSystem.out.println(\"=======================================================\");\n\t\tSystem.out.println(\"charBuffer.length()\t:\t\" + charBuffer.length());\n\t\tSystem.out.println(\"charBuffer.limit()\t:\t\" + charBuffer.limit() );\n\t\tSystem.out.println(\"charBuffer.position()\t:\t\" + charBuffer.position() );\n\t\tSystem.out.println(\"charBuffer.toString()\t:\t\" + charBuffer.toString() );\n\t\ttry {\n\t\t\tfileOutputStream = new FileOutputStream(\"temp.tmp\");\n\t\t\tfileChannel = fileOutputStream.getChannel();\n\n\t\t\twhile (true) {\n\t\t\t\tcoderResult = charsetEncoder.encode(charBuffer, byteBuffer, true);\n\t\t\t\tbyteBuffer.flip();\n\t\t\t\tfileChannel.write(byteBuffer);\n\t\t\t\tbyteBuffer.clear();\n\t\t\t\tSystem.out.println(\"=======================================================\");\n\t\t\t\tSystem.out.println(\"coderResult\t\t\t\t: \" + coderResult );\n\t\t\t\tSystem.out.println(\"\\ncharBuffer.limit()\t\t\t: \" + charBuffer.limit() );\n\t\t\t\tSystem.out.println(\"charBuffer.position()\t\t\t: \" + charBuffer.position() );\n\t\t\t\tSystem.out.println(\"charBuffer.toString()\t\t\t: \" + charBuffer.toString() );\n\t\t\t\tSystem.out.println(\"\\nbyteBuffer.toString()\t\t\t: \" + byteBuffer.toString() );\n\t\t\t\tSystem.out.println(\"byteBuffer.remaining()\t\t\t: \" + byteBuffer.remaining() );\n\t\t\t\tSystem.out.println(\"new String(byteBuffer.array())\t\t: \" + new String(byteBuffer.array()) );\n\t\t\t\t\n\n\t\t\t\tif (coderResult == CoderResult.UNDERFLOW) {\n\t\t\t\t\tif (charBuffer.position() == charBuffer.limit()) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"=======================================================\");\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "private void redirectSystemStreams() {\r\n\t\tOutputStream out = new OutputStream() {\r\n\t\t\t@Override\r\n\t\t\tpublic void write(int b) throws IOException {\r\n\t\t\t\tupdateTextArea(String.valueOf((char) b));\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void write(byte[] b, int off, int len) throws IOException {\r\n\t\t\t\tupdateTextArea(new String(b, off, len));\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void write(byte[] b) throws IOException {\r\n\t\t\t\twrite(b, 0, b.length);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tSystem.setOut(new PrintStream(out, true));\r\n\t\tSystem.setErr(new PrintStream(out, true));\r\n\t}", "public RingFactoryTokenizer() {\n this(new BufferedReader(new InputStreamReader(System.in,Charset.forName(\"UTF8\"))));\n }", "public static void main (String[] args){\n\n String str = \"qwwwwwwwwweeeeerrtyyyyyqqqqwEErTTT\";\n String rts = \"q9w5e2rt5y4qw2Er3T\";\n System.out.println(encode(str));\n System.out.print(decode(rts));\n\n }", "public static void main(String[] args)\n/* */ throws IOException\n/* */ {\n/* 130 */ if (args.length < 1) {\n/* 131 */ System.err.println(\"usage: java edu.stanford.nlp.process.ArabicTokenizer [-cr] filename\");\n/* 132 */ return;\n/* */ }\n/* 134 */ ArabicTokenizer tokenizer = new ArabicTokenizer(new InputStreamReader(new FileInputStream(args[(args.length - 1)]), \"UTF-8\"), args[0].equals(\"-cr\"));\n/* 135 */ PrintWriter pw = new PrintWriter(new OutputStreamWriter(System.out, \"UTF-8\"), true);\n/* 136 */ while (tokenizer.hasNext()) {\n/* 137 */ Word w = (Word)tokenizer.next();\n/* 138 */ if (w == ArabicLexer.crValue) {\n/* 139 */ pw.println(\"***CR***\");\n/* */ } else {\n/* 141 */ pw.println(w);\n/* */ }\n/* */ }\n/* */ }", "public static void main(String[] args) {\n MoveToFront m =new MoveToFront();\n m.readChar();\n m.ergodic();\n\t}", "public static void transform() {\n String s = BinaryStdIn.readString();\n CircularSuffixArray circularSuffixArray = new CircularSuffixArray(s);\n for (int i = 0; i < s.length(); i++) {\n if (circularSuffixArray.index(i) == 0) {\n BinaryStdOut.write(i);\n }\n }\n for (int i = 0; i < s.length(); i++) {\n int index = circularSuffixArray.index(i);\n if (index == 0) {\n BinaryStdOut.write(s.charAt(s.length() - 1));\n }\n else {\n BinaryStdOut.write(s.charAt(index - 1));\n }\n }\n BinaryStdOut.flush();\n }", "@Test\n\tpublic void testInlinerWithFile() throws Exception {\n\t\tString input = new String(Files.readAllBytes(new File(\"../warre.txt\").toPath()));\n\t\tInliner inliner = new Inliner();\n\t\tList<Part> parts = new Tokenizer(inliner).split(input);\n\t\tList<HTreeNode> freq = new FrequencyAnalyzer().analyzeFrequency(parts);\n\t\tString result = inliner.encode(parts, freq, 'X');\n\n\t\tSystem.out.println(\"\\nInput size : \" + input.length());\n\t\tSystem.out.println(\"Output size : \" + result.length());\n\t\tSystem.out.println(\"Num tokens : \" + freq.stream().filter(a -> a.prevalence > 1).count());\n\n//\t\tSystem.out.println(input);\n\t\tSystem.out.println(result);\n//\t\tSystem.out.println(inliner.decode(result, 'X'));\n\t}", "public CLI(BufferedReader in, Writer out) {\n\t\t_in = in;\n\t\t_out = out;\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 }", "public final void encodeUtf8Default(CharSequence in, ByteBuffer out) {\n int inLength = in.length();\n int outIx = out.position();\n int inIx = 0;\n while (inIx < inLength) {\n try {\n char c = in.charAt(inIx);\n if (c >= 128) {\n break;\n }\n out.put(outIx + inIx, (byte) c);\n inIx++;\n } catch (IndexOutOfBoundsException e) {\n throw new ArrayIndexOutOfBoundsException(\"Failed writing \" + in.charAt(inIx) + \" at index \" + (out.position() + Math.max(inIx, (outIx - out.position()) + 1)));\n }\n }\n if (inIx == inLength) {\n out.position(outIx + inIx);\n return;\n }\n int outIx2 = outIx + inIx;\n while (inIx < inLength) {\n char c2 = in.charAt(inIx);\n if (c2 < 128) {\n out.put(outIx2, (byte) c2);\n } else if (c2 < 2048) {\n int outIx3 = outIx2 + 1;\n try {\n out.put(outIx2, (byte) ((c2 >>> 6) | AtomsProto.Atom.MEDIAMETRICS_AUDIORECORD_REPORTED_FIELD_NUMBER));\n out.put(outIx3, (byte) ((c2 & '?') | 128));\n outIx2 = outIx3;\n } catch (IndexOutOfBoundsException e2) {\n outIx = outIx3;\n throw new ArrayIndexOutOfBoundsException(\"Failed writing \" + in.charAt(inIx) + \" at index \" + (out.position() + Math.max(inIx, (outIx - out.position()) + 1)));\n }\n } else if (c2 < 55296 || 57343 < c2) {\n int outIx4 = outIx2 + 1;\n out.put(outIx2, (byte) ((c2 >>> '\\f') | AtomsProto.Atom.BACK_GESTURE_REPORTED_REPORTED_FIELD_NUMBER));\n outIx2 = outIx4 + 1;\n out.put(outIx4, (byte) (((c2 >>> 6) & 63) | 128));\n out.put(outIx2, (byte) ((c2 & '?') | 128));\n } else {\n if (inIx + 1 != inLength) {\n inIx++;\n char low = in.charAt(inIx);\n if (Character.isSurrogatePair(c2, low)) {\n int codePoint = Character.toCodePoint(c2, low);\n int outIx5 = outIx2 + 1;\n try {\n out.put(outIx2, (byte) ((codePoint >>> 18) | PageId.FINGERPRINT_ENROLLING_VALUE));\n int outIx6 = outIx5 + 1;\n out.put(outIx5, (byte) (((codePoint >>> 12) & 63) | 128));\n int outIx7 = outIx6 + 1;\n out.put(outIx6, (byte) (((codePoint >>> 6) & 63) | 128));\n out.put(outIx7, (byte) ((codePoint & 63) | 128));\n outIx2 = outIx7;\n } catch (IndexOutOfBoundsException e3) {\n outIx = outIx5;\n throw new ArrayIndexOutOfBoundsException(\"Failed writing \" + in.charAt(inIx) + \" at index \" + (out.position() + Math.max(inIx, (outIx - out.position()) + 1)));\n }\n }\n }\n throw new UnpairedSurrogateException(inIx, inLength);\n }\n inIx++;\n outIx2++;\n }\n out.position(outIx2);\n }", "private static void translate(String input, FileWriter write) throws IOException {\n\t\tStringBuilder translation = new StringBuilder();\n\t\tFileReader inputString = new FileReader(input);\n\t\t\n\t\tchar read;\n\t\t\n\t\t//loops till the end\n\t\twhile((read = (char)(inputString.read())) != (char)-1) {\n\t\t\tint searchChar = 0;\n\t\t\t//finds the character that is currently being read in the results array\n\t\t\twhile(((Character)results[searchChar][0]) != ((Character)read)) {\n\t\t\t\tsearchChar++;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\ttranslation.append((String)results[searchChar][1]);\n\t\t}\n\t\tinputString.close();\n\t\twrite.write(translation.toString());\n\t}", "public void translate() {\n\t\twhile (!inputBuffer.endOfBuffer()) {\n\t\t\tMsgChar get = inputBuffer.getChar();\n\t\t\tif (get == null) continue;\n\t\t\tif (inputBuffer.isEndOfSentence()) {\n\t\t\t\toutputBuffer.markEndOfSentence();\n\t\t\t} else if (inputBuffer.isEndOfWord()) {\n\t\t\t\toutputBuffer.markEndOfWord();\n\t\t\t} else {\n\t\t\t\toutputBuffer.putChar(get.convert());\n\t\t\t}\n\t\t}\n\t\tinputBuffer.getReader().close();\n\t\toutputBuffer.close();\n\t}", "public abstract String inReadLine() throws JVMIOException;", "protected void instrumentIO()\r\n {\r\n // Clear out all the stream history stuff\r\n tcIn = null;\r\n tcOut = null;\r\n tcInBuf = null;\r\n\r\n // Make sure these are history-wrapped\r\n SystemIOUtilities.out();\r\n SystemIOUtilities.err();\r\n\r\n // First, make sure the original System.in gets captured, so it\r\n // can be restored later\r\n SystemIOUtilities.replaceSystemInContents(null);\r\n\r\n // The previous line actually replaced System.in, but now we'll\r\n // \"replace the replacement\" with one that uses fail() if it\r\n // has no contents.\r\n System.setIn(new MutableStringBufferInputStream((String)null)\r\n {\r\n protected void handleMissingContents()\r\n {\r\n fail(\"Attempt to access System.in before its contents \"\r\n + \"have been set\");\r\n }\r\n });\r\n }", "public int compress(InputStream in, OutputStream out, boolean force) throws IOException {\n int walk = 0; // Temp storage for incoming byte from read file\n int walkCount = 0; // Number of total bits read\n char codeCheck = ' '; // Used as a key to find the code in the code map\n String[] codeMap = HuffEncoder.encoding(); // Stores the character codes, copied from HuffEncode\n String s2b = \"\"; // Temp string storage \n int codeLen = 0; // Temp storage for code length (array storage)\n BitInputStream bitIn = new BitInputStream(in); \n BitOutputStream bitOut = new BitOutputStream(out);\n\n // Writes the code array at the top of the file. It first writes the number of bits in the code, then \n // the code itself. In the decode proccess, the code length is first read, then the code is read using the length\n // as a guide.\n // A space at top of file ensures the following is the array, and the file will correctly decompress\n out.write(32);\n for (int i = 0; i < codeMap.length; i++) {\n // Value of the character\n s2b = codeMap[i];\n // If null, make it zero\n if(s2b == null){\n s2b = \"0\";\n }\n // Record length of code\n codeLen = s2b.length();\n // Write the length of the code, to use for decoding\n bitOut.writeBits(8, codeLen);\n // Write the value of the character\n for (int j = 0; j < s2b.length(); j++) {\n bitOut.writeBits(1, Integer.valueOf(s2b.charAt(j)));\n }\n }\n\n // Reads in a byte from the file, converts it to a character, then uses that \n // caracter to look up the huffman code. The huffman code is writen to the new \n // file.\n try {\n while(true){\n // Read first eight bits\n walk = bitIn.read();\n // -1 means the stream has reached the end\n if(walk == -1){break;}\n // convert the binary to a character\n codeCheck = (char) walk;\n // find the huff code for the character\n s2b = codeMap[codeCheck];\n // write the code to new file\n for (int i = 0; i < s2b.length(); i++) {\n bitOut.writeBits(1, Integer.valueOf(s2b.charAt(i)));\n }\n walkCount += 8; // Number of bits read\n }\n bitIn.close();\n bitOut.close();\n return walkCount; \n } catch (IOException e) {\n bitIn.close();\n bitOut.close();\n throw e;\n }\n }", "public abstract InputStream stdout();", "public static void main(final String[] args) throws IOException {\n\t\tBufferedReader in =\n\t\t\tnew BufferedReader(new InputStreamReader(System.in));\n\t\tPrintStream out = new PrintStream(System.out, true, DEFAULT_CHARSET);\n\n\t\tString line;\n\t\twhile ((line = in.readLine()) != null) {\n\t\t\tout.println(parse(load(line)));\n\t\t}\n\t}", "private static void liaotian(File f3) throws IOException {\n\t\tSystem.out.println(\"输入聊天,quit退出\");\r\n\t\tFileWriter fw=new FileWriter(f3);\r\n\t\tBufferedWriter bw=new BufferedWriter(fw);\r\n\t\tint i=0;\r\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\r\n\t\twhile(true){\r\n\t\t\tSimpleDateFormat sdf=new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\r\n\t\t\tString time=sdf.format(System.currentTimeMillis());\r\n\t\t\tbw.write(time);\r\n\t\t\tbw.newLine();\r\n\t\tString[] name={\"小明:\",\"小红 : \"};\r\n\t\tSystem.out.print(name[i%2]);\r\n\t\tString line=br.readLine();\r\n\t\r\n\t\t\r\n\t\tbr.lines();\r\n\t\tif(line.equals(\"quit\")){\r\n\t\t\tbw.flush();\r\n\t\r\n\t\t\tSystem.out.println(\"退出聊天,保存到\"+f3);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\t\r\n\t\tbw.write(name[i%2]+line);\r\n\t\tbw.newLine();\r\n\t\ti++;\r\n\t\t}\r\n\t\t\r\n\t}", "private void suggestsUtF8CharsetWhenUsingPlatformDefaultCharset(OutputStream os) {\n OutputStreamWriter outputStreamWriter = new OutputStreamWriter(os, StandardCharsets.UTF_8);\n }", "public static void main(String argv[]) {\n if (argv.length == 0) {\n System.out.println(\"Usage : java AnalizadorLexicoPaginas [ --encoding <name> ] <inputfile(s)>\");\n }\n else {\n int firstFilePos = 0;\n String encodingName = \"UTF-8\";\n if (argv[0].equals(\"--encoding\")) {\n firstFilePos = 2;\n encodingName = argv[1];\n try {\n java.nio.charset.Charset.forName(encodingName); // Side-effect: is encodingName valid? \n } catch (Exception e) {\n System.out.println(\"Invalid encoding '\" + encodingName + \"'\");\n return;\n }\n }\n for (int i = firstFilePos; i < argv.length; i++) {\n AnalizadorLexicoPaginas scanner = null;\n try {\n java.io.FileInputStream stream = new java.io.FileInputStream(argv[i]);\n java.io.Reader reader = new java.io.InputStreamReader(stream, encodingName);\n scanner = new AnalizadorLexicoPaginas(reader);\n while ( !scanner.zzAtEOF ) scanner.debug_next_token();\n }\n catch (java.io.FileNotFoundException e) {\n System.out.println(\"File not found : \\\"\"+argv[i]+\"\\\"\");\n }\n catch (java.io.IOException e) {\n System.out.println(\"IO error scanning file \\\"\"+argv[i]+\"\\\"\");\n System.out.println(e);\n }\n catch (Exception e) {\n System.out.println(\"Unexpected exception:\");\n e.printStackTrace();\n }\n }\n }\n }", "public void translate(BitInputStream input, PrintStream output) {\n HuffmanNode node = this.front;\n while (input.hasNextBit()) {\n while (node.left != null && node.right != null) {\n if (input.nextBit() == 0) {\n node = node.left;\n } else {\n node = node.right;\n }\n }\n output.print(node.getData());\n node = this.front;\n }\n }", "InputStream getStdout();", "public static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tSystem.out.println(\"Enter the string\");\n\n\t\tString str=sc.next();\n\t\tSystem.out.println(FlushCharacters.FlushCharactersMM(str));\n\t\tsc.close();\n\n\t}", "public static void main(String[] args) throws IOException {\n\t\tReader in = new InputStreamReader(System.in);\n\t\tint data = 0;\n\t\twhile((data=in.read()) != -1) {\n\t\t\tSystem.out.print((char)data);\n\t\t}\n\t\t//f가나다라마바사아자차가카\n\t}", "@Override // com.google.protobuf.Utf8.Processor\n public void encodeUtf8Direct(CharSequence in, ByteBuffer out) {\n char c;\n long j;\n long outIx;\n long outLimit;\n long outIx2;\n char c2;\n long address = addressOffset(out);\n long outIx3 = ((long) out.position()) + address;\n long outLimit2 = ((long) out.limit()) + address;\n int inLimit = in.length();\n if (((long) inLimit) <= outLimit2 - outIx3) {\n int inIx = 0;\n while (true) {\n c = 128;\n j = 1;\n if (inIx < inLimit) {\n char c3 = in.charAt(inIx);\n if (c3 >= 128) {\n break;\n }\n UNSAFE.putByte(outIx3, (byte) c3);\n inIx++;\n outIx3 = 1 + outIx3;\n } else {\n break;\n }\n }\n if (inIx == inLimit) {\n out.position((int) (outIx3 - address));\n return;\n }\n while (inIx < inLimit) {\n char c4 = in.charAt(inIx);\n if (c4 < c && outIx3 < outLimit2) {\n UNSAFE.putByte(outIx3, (byte) c4);\n outLimit = outLimit2;\n outIx3 += j;\n c2 = 128;\n outIx = 1;\n outIx2 = address;\n } else if (c4 >= 2048 || outIx3 > outLimit2 - 2) {\n outIx2 = address;\n if ((c4 < 55296 || 57343 < c4) && outIx3 <= outLimit2 - 3) {\n long outIx4 = outIx3 + 1;\n UNSAFE.putByte(outIx3, (byte) ((c4 >>> '\\f') | 480));\n long outIx5 = outIx4 + 1;\n UNSAFE.putByte(outIx4, (byte) (((c4 >>> 6) & 63) | 128));\n UNSAFE.putByte(outIx5, (byte) ((c4 & '?') | 128));\n outLimit = outLimit2;\n outIx3 = outIx5 + 1;\n c2 = 128;\n outIx = 1;\n } else if (outIx3 <= outLimit2 - 4) {\n if (inIx + 1 != inLimit) {\n inIx++;\n char low = in.charAt(inIx);\n if (Character.isSurrogatePair(c4, low)) {\n int codePoint = Character.toCodePoint(c4, low);\n outLimit = outLimit2;\n long outIx6 = outIx3 + 1;\n UNSAFE.putByte(outIx3, (byte) ((codePoint >>> 18) | PageId.FINGERPRINT_ENROLLING_VALUE));\n long outIx7 = outIx6 + 1;\n UNSAFE.putByte(outIx6, (byte) (((codePoint >>> 12) & 63) | 128));\n long outIx8 = outIx7 + 1;\n c2 = 128;\n UNSAFE.putByte(outIx7, (byte) (((codePoint >>> 6) & 63) | 128));\n outIx = 1;\n outIx3 = outIx8 + 1;\n UNSAFE.putByte(outIx8, (byte) ((codePoint & 63) | 128));\n }\n }\n throw new UnpairedSurrogateException(inIx - 1, inLimit);\n } else if (55296 > c4 || c4 > 57343 || (inIx + 1 != inLimit && Character.isSurrogatePair(c4, in.charAt(inIx + 1)))) {\n throw new ArrayIndexOutOfBoundsException(\"Failed writing \" + c4 + \" at index \" + outIx3);\n } else {\n throw new UnpairedSurrogateException(inIx, inLimit);\n }\n } else {\n outIx2 = address;\n long outIx9 = outIx3 + 1;\n UNSAFE.putByte(outIx3, (byte) ((c4 >>> 6) | 960));\n outIx3 = outIx9 + 1;\n UNSAFE.putByte(outIx9, (byte) ((c4 & '?') | 128));\n outLimit = outLimit2;\n c2 = 128;\n outIx = 1;\n }\n inIx++;\n c = c2;\n address = outIx2;\n outLimit2 = outLimit;\n j = outIx;\n }\n out.position((int) (outIx3 - address));\n return;\n }\n throw new ArrayIndexOutOfBoundsException(\"Failed writing \" + in.charAt(inLimit - 1) + \" at index \" + out.limit());\n }", "public static void decode() {\n int first = BinaryStdIn.readInt();\n String t = BinaryStdIn.readString();\n int n = t.length();\n int[] count = new int[256 + 1];\n int[] next = new int[n];\n int i = 0;\n while (i < n) {\n count[t.charAt(i) + 1]++;\n i++;\n }\n i = 1;\n while (i < 256 + 1) {\n count[i] += count[i - 1];\n i++;\n }\n i = 0;\n while (i < n) {\n next[count[t.charAt(i)]++] = i;\n i++;\n }\n i = next[first];\n int c = 0;\n while (c < n){\n BinaryStdOut.write(t.charAt(i));\n i = next[i];\n c++;\n }\n BinaryStdOut.close();\n }", "public static void main(String argv[]) {\n if (argv.length == 0) {\n System.out.println(\"Usage : java AnalizadorLexico2 [ --encoding <name> ] <inputfile(s)>\");\n }\n else {\n int firstFilePos = 0;\n String encodingName = \"UTF-8\";\n if (argv[0].equals(\"--encoding\")) {\n firstFilePos = 2;\n encodingName = argv[1];\n try {\n java.nio.charset.Charset.forName(encodingName); // Side-effect: is encodingName valid? \n } catch (Exception e) {\n System.out.println(\"Invalid encoding '\" + encodingName + \"'\");\n return;\n }\n }\n for (int i = firstFilePos; i < argv.length; i++) {\n AnalizadorLexico2 scanner = null;\n try {\n java.io.FileInputStream stream = new java.io.FileInputStream(argv[i]);\n java.io.Reader reader = new java.io.InputStreamReader(stream, encodingName);\n scanner = new AnalizadorLexico2(reader);\n while ( !scanner.zzAtEOF ) scanner.debug_next_token();\n }\n catch (java.io.FileNotFoundException e) {\n System.out.println(\"File not found : \\\"\"+argv[i]+\"\\\"\");\n }\n catch (java.io.IOException e) {\n System.out.println(\"IO error scanning file \\\"\"+argv[i]+\"\\\"\");\n System.out.println(e);\n }\n catch (Exception e) {\n System.out.println(\"Unexpected exception:\");\n e.printStackTrace();\n }\n }\n }\n }", "public static void inverseTransform() {\n int[] count = new int[R + 1]; // used for count/cumulates for decoding\n @SuppressWarnings(\"unchecked\")\n Queue<Integer>[] fifoIndices = new Queue[R];\n for (int r = 0; r < R; r++) {\n fifoIndices[r] = new Queue<Integer>();\n }\n String binaryInputString = \"\";\n int length; // length of input\n int first;\n // Get input binary stream\n first = BinaryStdIn.readInt();\n while (!BinaryStdIn.isEmpty()) {\n binaryInputString = BinaryStdIn.readString();\n // binaryInputChar = BinaryStdIn.readChar();\n // binaryInputString = binaryInputString.append(binaryInputChar);\n // count[binaryInputChar + 1]++; // update counts\n // fifoIndices[binaryInputChar].enqueue(counter++); // array of FIFOs of indices of binaryInputChar in input binary stream\n }\n length = binaryInputString.length();\n for (int i = 0; i < length; i++) {\n count[binaryInputString.charAt(i) + 1]++;\n // store indices for each character as they appear in FIFO order\n fifoIndices[binaryInputString.charAt(i)].enqueue(i);\n }\n \n // update cumulates\n for (int r = 0; r < R; r++) {\n count[r + 1] += count[r];\n }\n \n // sorted first column\n char[] tAux = new char[length];\n \n // move items from string into first column array in sorted order\n for (int i = 0; i < length; i++) {\n tAux[count[binaryInputString.charAt(i)]++] = binaryInputString.charAt(i);\n }\n \n // store corresponding index for relative order\n // i < j --> next[i] < next[j]\n int[] next = new int[length];\n for (int i = 0; i < length; i++) {\n next[i] = fifoIndices[tAux[i]].dequeue();\n }\n \n for (int i = 0; i < length; i++) {\n BinaryStdOut.write(tAux[first]);\n first = next[first];\n }\n BinaryStdOut.flush();\n }", "public static void main(String args[]) throws IOException {\n Scanner sc= new Scanner(System.in);\r\n String s= sc.next();\r\n char ch= s.charAt(0);\r\n switch (ch)\r\n {\r\n case 'P':\r\n case 'p': \r\n System.out.println(\"PrepBytes\");\r\n break;\r\n case 'Z':\r\n case 'z':\r\n System.out.println(\"Zenith\");\r\n break;\r\n case 'E':\r\n case 'e':\r\n System.out.println(\"Expert Coder\");\r\n break;\r\n case 'D':\r\n case 'd':\r\n System.out.println(\"Data Structure\");\r\n break;\r\n }\r\n }", "public static void main(String[] args) throws IOException {\n\t\tString line = new String(Files.readAllBytes(Paths.get(\"input.txt\")));\n\t\t\n\t\tFiles.write(Paths.get(\"outputh.txt\"), getOutput(line).getBytes(), StandardOpenOption.CREATE);\n\t\t\n\t}", "@Override // com.google.protobuf.Utf8.Processor\n public int encodeUtf8(CharSequence in, byte[] out, int offset, int length) {\n char c;\n int utf16Length = in.length();\n int i = 0;\n int limit = offset + length;\n while (i < utf16Length && i + offset < limit && (c = in.charAt(i)) < 128) {\n out[offset + i] = (byte) c;\n i++;\n }\n if (i == utf16Length) {\n return offset + utf16Length;\n }\n int j = offset + i;\n while (i < utf16Length) {\n char c2 = in.charAt(i);\n if (c2 < 128 && j < limit) {\n out[j] = (byte) c2;\n j++;\n } else if (c2 < 2048 && j <= limit - 2) {\n int j2 = j + 1;\n out[j] = (byte) ((c2 >>> 6) | 960);\n j = j2 + 1;\n out[j2] = (byte) ((c2 & '?') | 128);\n } else if ((c2 < 55296 || 57343 < c2) && j <= limit - 3) {\n int j3 = j + 1;\n out[j] = (byte) ((c2 >>> '\\f') | 480);\n int j4 = j3 + 1;\n out[j3] = (byte) (((c2 >>> 6) & 63) | 128);\n out[j4] = (byte) ((c2 & '?') | 128);\n j = j4 + 1;\n } else if (j <= limit - 4) {\n if (i + 1 != in.length()) {\n i++;\n char low = in.charAt(i);\n if (Character.isSurrogatePair(c2, low)) {\n int codePoint = Character.toCodePoint(c2, low);\n int j5 = j + 1;\n out[j] = (byte) ((codePoint >>> 18) | PageId.FINGERPRINT_ENROLLING_VALUE);\n int j6 = j5 + 1;\n out[j5] = (byte) (((codePoint >>> 12) & 63) | 128);\n int j7 = j6 + 1;\n out[j6] = (byte) (((codePoint >>> 6) & 63) | 128);\n j = j7 + 1;\n out[j7] = (byte) ((codePoint & 63) | 128);\n }\n }\n throw new UnpairedSurrogateException(i - 1, utf16Length);\n } else if (55296 > c2 || c2 > 57343 || (i + 1 != in.length() && Character.isSurrogatePair(c2, in.charAt(i + 1)))) {\n throw new ArrayIndexOutOfBoundsException(\"Failed writing \" + c2 + \" at index \" + j);\n } else {\n throw new UnpairedSurrogateException(i, utf16Length);\n }\n i++;\n }\n return j;\n }", "public static void main(String argv[]) {\n if (argv.length == 0) {\n System.out.println(\"Usage : java AnalizadorLexicoArchivo [ --encoding <name> ] <inputfile(s)>\");\n }\n else {\n int firstFilePos = 0;\n String encodingName = \"UTF-8\";\n if (argv[0].equals(\"--encoding\")) {\n firstFilePos = 2;\n encodingName = argv[1];\n try {\n java.nio.charset.Charset.forName(encodingName); // Side-effect: is encodingName valid? \n } catch (Exception e) {\n System.out.println(\"Invalid encoding '\" + encodingName + \"'\");\n return;\n }\n }\n for (int i = firstFilePos; i < argv.length; i++) {\n AnalizadorLexicoArchivo scanner = null;\n try {\n java.io.FileInputStream stream = new java.io.FileInputStream(argv[i]);\n java.io.Reader reader = new java.io.InputStreamReader(stream, encodingName);\n scanner = new AnalizadorLexicoArchivo(reader);\n while ( !scanner.zzAtEOF ) scanner.debug_next_token();\n }\n catch (java.io.FileNotFoundException e) {\n System.out.println(\"File not found : \\\"\"+argv[i]+\"\\\"\");\n }\n catch (java.io.IOException e) {\n System.out.println(\"IO error scanning file \\\"\"+argv[i]+\"\\\"\");\n System.out.println(e);\n }\n catch (Exception e) {\n System.out.println(\"Unexpected exception:\");\n e.printStackTrace();\n }\n }\n }\n }", "public static void main(String[] args) {\n TextFileGenerator textFileGenerator = new TextFileGenerator();\n HuffmanTree huffmanTree;\n Scanner keyboard = new Scanner(System.in);\n PrintWriter encodedOutputStream = null;\n PrintWriter decodedOutputStream = null;\n String url, originalString = \"\", encodedString, decodedString;\n boolean badURL = true;\n int originalBits, encodedBits, decodedBits;\n\n while(badURL) {\n System.out.println(\"Please enter a URL: \");\n url = keyboard.nextLine();\n\n try {\n originalString = textFileGenerator.makeCleanFile(url, \"original.txt\");\n badURL = false;\n }\n catch(IOException e) {\n System.out.println(\"Error: Please try again\");\n }\n }\n\n huffmanTree = new HuffmanTree(originalString);\n encodedString = huffmanTree.encode(originalString);\n decodedString = huffmanTree.decode(encodedString);\n // NOTE: TextFileGenerator.getNumChars() was not working for me. I copied the encoded text file (pure 0s and 1s)\n // into google docs and the character count is accurate with the String length and not the method\n originalBits = originalString.length() * 16;\n encodedBits = encodedString.length();\n decodedBits = decodedString.length() * 16;\n\n decodedString = fixPrintWriterNewLine(decodedString);\n\n try { // creating the encoded and decoded files\n encodedOutputStream = new PrintWriter(new FileOutputStream(\"src\\\\edu\\\\miracosta\\\\cs113\\\\encoded.txt\"));\n decodedOutputStream = new PrintWriter(new FileOutputStream(\"src\\\\edu\\\\miracosta\\\\cs113\\\\decoded.txt\"));\n encodedOutputStream.print(encodedString);\n decodedOutputStream.print(decodedString);\n }\n catch(IOException e) {\n System.out.println(\"Error: IOException!\");\n }\n\n encodedOutputStream.close();\n decodedOutputStream.close();\n\n System.out.println(\"Original file bit count: \" + originalBits);\n System.out.println(\"Encoded file bit count: \" + encodedBits);\n System.out.println(\"Decoded file bit count: \" + decodedBits);\n System.out.println(\"Compression ratio: \" + (double)originalBits/encodedBits);\n }", "public void doConvertion() throws IOException{\n String filename = \"test\";\n writer = new PrintWriter(new FileWriter(filename));\n writer.write(\"\\\"token\\\",\\\"prev_word\\\",\\\"next_word\\\",\\\"tag\\\",\\\"prev_tag\\\",\\\"next_tag\\\",\\\"is_number\\\",\\\"is_punctuation\\\",\\\"is_place_directive\\\",\\\"is_url\\\",\\\"is_twitter_account\\\",\\\"is_hashtag\\\",\\\"is_month_name\\\",\\\"is_gazeteer\\\",\\\"label\\\"\");\n // write header first.. \n \n // Select from db.\n// ArrayList<String> tweets = selectTweet();\n// for (int i = 0; i < tweets.size(); i++) {\n// String tobewriten = parseTweet(tweets.get(i));\n// writer.write(tobewriten);\n// }\n // put arff header in bottom but next to be moved to top..\n writer.write(parseTweet());\n //writer.write(getArffHeader());\n \n writer.close();\n // write to external file\n \n }", "public static final void transcodeAndWrite(byte[] input, \r\n java.io.OutputStream os,\r\n int offset, int length, int input_encoding, int output_encoding)\r\n throws TranscodeException,\r\n IOException {\n int k = offset;\r\n int c;\r\n while (k < offset + length) {\r\n long l = decode(input, k, input_encoding);\r\n k = (int) (l >> 32);\r\n c = (int) l;\r\n encodeAndWrite(os, c, output_encoding);\r\n }\r\n }", "public static void convert(Path inputFile, String outputFile, Function<Character, String> encoder) throws IOException {\n Set<Character> invalidCharacters = new HashSet<>();\n Map<Character, String> characterMap = new HashMap<>();\n Stream<String> stream = Files.lines(inputFile)\n .map(s -> {\n StringBuilder str = new StringBuilder();\n for (int i = 0; i < s.length(); i++) {\n char c = Character.toLowerCase(s.charAt(i));\n if (invalidCharacters.contains(c)) {\n return null;\n }\n if (!Character.isWhitespace(c) && !Character.isDigit(c)) {\n String encoding = characterMap.computeIfAbsent(c, ch -> {\n String mapping = encoder.apply(ch);\n if (mapping == null) {\n invalidCharacters.add(ch);\n }\n return mapping;\n });\n str.append(encoding);\n } else {\n str.append(c);\n }\n }\n return str.toString();\n });\n try (PrintWriter pw = new PrintWriter(outputFile)) {\n stream.filter(Objects::nonNull).forEachOrdered(pw::println);\n }\n }", "public void generate() throws FileNotFoundException, UnsupportedEncodingException {\n\t\twriter = new PrintWriter(outputFile, \"UTF-8\");\n\t\tFile file = new File(inputFile);\n\t\treader = new Scanner(file);\n\t\tinitializeFile();\n\t\t\n\t\tString line = readLine();\n\t\twhile (line != null) {\n\t\t\tprocess(line);\n\t\t\tline = readLine();\n\t\t}\n\t\t\n\t\tfinishFile();\n\t\twriter.close();\n\t}", "private void encodeMessage() {\n encodedMessage = \"\";\n try(BufferedReader inputBuffer = Files.newBufferedReader(inputPath)) {\n String inputLine;\n while((inputLine = inputBuffer.readLine()) != null) {\n //walks the input message and builds the encode message\n for(int i = 0; i < inputLine.length(); i++) {\n encodedMessage = encodedMessage + codeTable[inputLine.charAt(i)];\n }\n encodedMessage = encodedMessage + codeTable[10];\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n //writes to the output file\n try(BufferedWriter outputBuffer = Files.newBufferedWriter(outputPath)) {\n outputBuffer.write(encodedMessage, 0, encodedMessage.length());\n outputBuffer.newLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "public abstract InputStream mo131998b();", "private static void input(String[] args) {\n try (BufferedReader scanner = new BufferedReader(\n new InputStreamReader(args.length > 0 ? new FileInputStream(args[0]) : System.in))) {\n\n String linija;\n\n // regularne definicije\n while ((linija = scanner.readLine()) != null && linija.startsWith(\"{\")) {\n String tmp[] = linija.split(\" \");\n\n tmp[0] = tmp[0].substring(1, tmp[0].length() - 1);\n String naziv = tmp[0];\n String izraz = expandRegularDefinition(tmp[1]);\n\n regularneDefinicije.put(naziv, izraz);\n\n // System.out.println(naziv + \", \" + izraz);\n }\n\n // stanja\n while (!linija.startsWith(\"%X\")) {\n linija = scanner.readLine().trim();\n }\n\n skipSplitAdd(linija, stanjaLA);\n\n // leksicke jedinke\n while (!linija.startsWith(\"%L\")) {\n linija = scanner.readLine().trim();\n }\n\n skipSplitAdd(linija, leksickeJedinke);\n\n // pravila leksickog analizatora\n\n while ((linija = scanner.readLine()) != null) {\n while (!linija.startsWith(\"<\")) {\n linija = scanner.readLine();\n }\n\n String tmp[] = linija.split(\">\", 2);\n\n String stateName = tmp[0].substring(1, tmp[0].length());\n String regDef = tmp[1];\n\n regDef = expandRegularDefinition(regDef);\n\n // System.out.println(stateName + \"<> \" + regDef);\n LexerRule lexerRule = new LexerRule(regDef, stateName, 1, \"<\" + stateName + \">\" + regDef);\n lexerRules.add(lexerRule);\n\n scanner.readLine(); // preskoci {\n\n linija = scanner.readLine().trim();\n while (linija != null && scanner.ready() && !linija.equals(\"}\")) {\n // radi nesto s naredbom\n lexerRule.addAction(linija);\n linija = scanner.readLine().trim();\n }\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public int translate(CharSequence input, int index, Writer out) throws IOException {\n/* 82 */ int seqEnd = input.length();\n/* */ \n/* 84 */ if (input.charAt(index) == '&' && index < seqEnd - 2 && input.charAt(index + 1) == '#') {\n/* 85 */ int entityValue, start = index + 2;\n/* 86 */ boolean isHex = false;\n/* */ \n/* 88 */ char firstChar = input.charAt(start);\n/* 89 */ if (firstChar == 'x' || firstChar == 'X') {\n/* 90 */ start++;\n/* 91 */ isHex = true;\n/* */ \n/* */ \n/* 94 */ if (start == seqEnd) {\n/* 95 */ return 0;\n/* */ }\n/* */ } \n/* */ \n/* 99 */ int end = start;\n/* */ \n/* 101 */ while (end < seqEnd && ((input.charAt(end) >= '0' && input.charAt(end) <= '9') || (input\n/* 102 */ .charAt(end) >= 'a' && input.charAt(end) <= 'f') || (input\n/* 103 */ .charAt(end) >= 'A' && input.charAt(end) <= 'F'))) {\n/* 104 */ end++;\n/* */ }\n/* */ \n/* 107 */ boolean semiNext = (end != seqEnd && input.charAt(end) == ';');\n/* */ \n/* 109 */ if (!semiNext) {\n/* 110 */ if (isSet(OPTION.semiColonRequired)) {\n/* 111 */ return 0;\n/* */ }\n/* 113 */ if (isSet(OPTION.errorIfNoSemiColon)) {\n/* 114 */ throw new IllegalArgumentException(\"Semi-colon required at end of numeric entity\");\n/* */ }\n/* */ } \n/* */ \n/* */ \n/* */ try {\n/* 120 */ if (isHex) {\n/* 121 */ entityValue = Integer.parseInt(input.subSequence(start, end).toString(), 16);\n/* */ } else {\n/* 123 */ entityValue = Integer.parseInt(input.subSequence(start, end).toString(), 10);\n/* */ } \n/* 125 */ } catch (NumberFormatException nfe) {\n/* 126 */ return 0;\n/* */ } \n/* */ \n/* 129 */ if (entityValue > 65535) {\n/* 130 */ char[] chars = Character.toChars(entityValue);\n/* 131 */ out.write(chars[0]);\n/* 132 */ out.write(chars[1]);\n/* */ } else {\n/* 134 */ out.write(entityValue);\n/* */ } \n/* */ \n/* 137 */ return 2 + end - start + (isHex ? 1 : 0) + (semiNext ? 1 : 0);\n/* */ } \n/* 139 */ return 0;\n/* */ }", "private void traceInput() {\r\n int line = 1, start = 0, stop = input.length();\r\n for (int i = 0; i < in; i++) {\r\n if (input.charAt(i) != '\\n') continue;\r\n line++;\r\n start = i + 1;\r\n }\r\n for (int i = in; i < input.length(); i++) {\r\n if (input.charAt(i) != '\\n') continue;\r\n stop = i;\r\n break;\r\n }\r\n System.out.print(\"I\" + line + \": \");\r\n System.out.print(input.substring(start, in));\r\n System.out.print(\"|\");\r\n System.out.println(input.substring(in, stop));\r\n }", "public static void encode()\n {\n String s = BinaryStdIn.readString();\n CircularSuffixArray myCsa = new CircularSuffixArray(s);\n int first = 0;\n while (first < myCsa.length() && myCsa.index(first) != 0) {\n first++;\n }\n BinaryStdOut.write(first);\n int i = 0;\n while (i < myCsa.length()) {\n BinaryStdOut.write(s.charAt((myCsa.index(i) + s.length() - 1) % s.length()));\n i++;\n }\n BinaryStdOut.close();\n }", "public ASCIIOutputStream(OutputStream out) {\n super(out);\n }", "InputStream mo1151a();", "public AnalizadorLexicoArchivo(java.io.Reader in) {\n this.zzReader = in;\n }", "Lexico(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "void writeUTF(OutputStream out, String str) throws IOException\n {\n for (int i = 0, len = str.length(); i < len; i++)\n {\n int c = str.charAt(i);\n if ((c >= 0x0001) && (c <= 0x007F))\n {\n out.write(c);\n }\n else\n {\n if (c > 0x07FF)\n {\n out.write(0xE0 | ((c >> 12) & 0x0F));\n out.write(0x80 | ((c >> 6) & 0x3F));\n out.write(0x80 | ((c >> 0) & 0x3F));\n }\n else\n {\n out.write(0xC0 | ((c >> 6) & 0x1F));\n out.write(0x80 | ((c >> 0) & 0x3F));\n }\n }\n }\n }", "private static void makeRaw() {\n String ttyName = \"/dev/tty\";\n int ofd = Util.getFd(FileDescriptor.out);\n\n CLibrary.LinuxTermios termios = new CLibrary.LinuxTermios();\n\n // check existing settings\n // If we don't do this tcssetattr() will return EINVAL.\n if (CLibrary.INSTANCE.tcgetattr(ofd, termios) == -1) {\n error(\"tcgetattr(\\\"\" + ttyName + \"\\\", <termios>) failed -- \" + strerror(Native.getLastError()));\n }\n\n // System.out.printf(\"tcgetattr() gives %s\\r\\n\", termios);\n\n // initialize values relevant for raw mode\n CLibrary.INSTANCE.cfmakeraw(termios);\n\n // System.out.printf(\"cfmakeraw() gives %s\\r\\n\", termios);\n\n // apply them\n if (CLibrary.INSTANCE.tcsetattr(ofd, CLibrary.INSTANCE.TCSANOW(), termios) == -1) {\n error(\"tcsetattr(\\\"\" + ttyName + \"\\\", TCSANOW, <termios>) failed -- \" + strerror(Native.getLastError()));\n }\n }", "public void feed() throws IOException {\n // 下面指令为打印完成后自动走纸\n writer.write(27);\n writer.write(100);\n writer.write(4);\n writer.write(10);\n\n writer.flush();\n\n }", "static void take_the_input() throws IOException{\n\t\tSystem.out.print(\"ENTER THE ADDRESS : \");\n\n\t\taddress = hexa_to_deci(scan.readLine());\n\t\tSystem.out.println();\n\n\t\twhile(true){\n\t\t\tprint_the_address(address);\n\t\t\tString instruction = scan.readLine();\n\t\t\tint label_size = check_for_label(instruction);\n\t\t\tinstruction = instruction.substring(label_size);\n\t\t\tmemory.put(address, instruction);\n\t\t\tif(stop_instruction(instruction))\n\t\t\t\tbreak;\n\t\t\taddress+=size_of_code(instruction);\n\t\t}\n\t\tSystem.out.println();\n\t\tSystem.out.print(\"DO YOU WANT TO ENTER ANY FURTHUR CODE (Y/N) : \");\n\t\tString choice = scan.readLine();\n\t\tSystem.out.println();\n\t\tif(choice.equals(\"Y\"))\n\t\t\ttake_the_input();\n\t}", "public void turnOnSystemOutput(){\n if(originalSystemOut == null){\n originalSystemOut = System.out;\n System.setOut(new PrintStream(generalStream));\n //will cause CSS hang up\n// System.setIn(console.getInputStream());\n }\n }", "PTB2TextLexer(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString str = sc.nextLine();\n\t\tString result = \"\";\n\t\tfor(int i=0; i<str.length(); i++) {\n\t\t\tchar ch = str.charAt(i);\n\t\t\tif(ch>='a' && ch <='z') {\n\t\t\t\tch+=13;\n\t\t\t\tif(ch>'z') {\n\t\t\t\t\tch-=26;\n\t\t\t\t}\n\t\t\t}else if(ch>='A' && ch <='Z') {\n\t\t\t\tch+=13;\n\t\t\t\tif(ch>'Z') {\n\t\t\t\t\tch-=26;\n\t\t\t\t}\n\t\t\t}\n\t\t\tresult+=ch;\n\t\t}\n\t\tSystem.out.println(result);\n\t}", "private static String loadConvert(String str) {\n\t\tint off = 0;\n\t\tint len = str.length();\n\t\tchar[] in = str.toCharArray();\n\t\tchar[] convtBuf = new char[1024];\n\t\tif (convtBuf.length < len) {\n\t\t\tint newLen = len * 2;\n\t\t\tif (newLen < 0) {\n\t\t\t\tnewLen = Integer.MAX_VALUE;\n\t\t\t}\n\t\t\tconvtBuf = new char[newLen];\n\t\t}\n\t\tchar aChar;\n\t\tchar[] out = convtBuf;\n\t\tint outLen = 0;\n\t\tint end = off + len;\n\n\t\twhile (off < end) {\n\t\t\taChar = in[off++];\n\t\t\tif (aChar == '\\\\') {\n\t\t\t\taChar = in[off++];\n\t\t\t\tif (aChar == 'u') {\n\t\t\t\t\t// Read the xxxx\n\t\t\t\t\tint value = 0;\n\t\t\t\t\tfor (int i = 0; i < 4; i++) {\n\t\t\t\t\t\taChar = in[off++];\n\t\t\t\t\t\tswitch (aChar) {\n\t\t\t\t\t\tcase '0':\n\t\t\t\t\t\tcase '1':\n\t\t\t\t\t\tcase '2':\n\t\t\t\t\t\tcase '3':\n\t\t\t\t\t\tcase '4':\n\t\t\t\t\t\tcase '5':\n\t\t\t\t\t\tcase '6':\n\t\t\t\t\t\tcase '7':\n\t\t\t\t\t\tcase '8':\n\t\t\t\t\t\tcase '9':\n\t\t\t\t\t\t\tvalue = (value << 4) + aChar - '0';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'a':\n\t\t\t\t\t\tcase 'b':\n\t\t\t\t\t\tcase 'c':\n\t\t\t\t\t\tcase 'd':\n\t\t\t\t\t\tcase 'e':\n\t\t\t\t\t\tcase 'f':\n\t\t\t\t\t\t\tvalue = (value << 4) + 10 + aChar - 'a';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'A':\n\t\t\t\t\t\tcase 'B':\n\t\t\t\t\t\tcase 'C':\n\t\t\t\t\t\tcase 'D':\n\t\t\t\t\t\tcase 'E':\n\t\t\t\t\t\tcase 'F':\n\t\t\t\t\t\t\tvalue = (value << 4) + 10 + aChar - 'A';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tthrow new IllegalArgumentException(\"Malformed \\\\uxxxx encoding.\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tout[outLen++] = (char) value;\n\t\t\t\t} else {\n\t\t\t\t\tif (aChar == 't')\n\t\t\t\t\t\taChar = '\\t';\n\t\t\t\t\telse if (aChar == 'r')\n\t\t\t\t\t\taChar = '\\r';\n\t\t\t\t\telse if (aChar == 'n')\n\t\t\t\t\t\taChar = '\\n';\n\t\t\t\t\telse if (aChar == 'f')\n\t\t\t\t\t\taChar = '\\f';\n\t\t\t\t\tout[outLen++] = aChar;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tout[outLen++] = aChar;\n\t\t\t}\n\t\t}\n\t\treturn new String(out, 0, outLen);\n\t}", "public static void transcode(String inputFile, String outputFile) {\n log.info(\"Starting to transcode...\");\n\n // Create an IMediaReader using the ToolFactory\n IMediaReader reader = ToolFactory.makeReader(inputFile);\n\n /*\n * Create an IMediaWriter and add it as a listener to the reader\n * creating a simple tool chain: reader -> writer.\n */\n IMediaWriter writer = ToolFactory.makeWriter(outputFile, reader);\n reader.addListener(writer);\n\n /*\n * Read and decode packets from the reader, which triggers tool chain processing. Surround\n * with a try/catch to log any errors.\n */\n try {\n while (reader.readPacket() == null)\n ;\n } catch (Exception e) {\n log.error(e.toString());\n }\n\n // Close the writer and reader\n writer.close();\n reader.close();\n\n log.info(\"Transcode finished!\");\n }", "public StreamGobbler(InputStream from, PrintStream to) {\n\t\tinput = from;\n\t\toutput = to;\n\t}", "void match(int t) throws IOException {\n\t\tif (lookahead == t) {\n\t\t\tlookahead = System.in.read();\n\t\t\tinput = input + (char)lookahead;\n\t\t} else {\n\t\t\t throw new Error(\"syntax error\");\n\t\t}\n\t}", "public void encode (String input){\n\t\tfor (int j=rotors.length-1;j>=1; --j)\n\t\t{\n\t\t\trotors[j].setNeighbour1(rotors[j-1]);\n\t\t}\n\t\ttry{\n\t\t\tfor (int i = 0; i <= input.length() - 1; ++i){\n\t\t\t\tString type = new String(\"direct\");\n\t\t\t\tchar in = input.charAt(i);\n\t\t\t\tfor (int j = 0; j <= elements.size() - 1; ++j){\n\t\t\t\t\telements.get(j).transmitInput(in, type);\n\t\t\t\t\tin = elements.get(j).receiveOutput();\n\t\t\t\t\tif (in == 0)\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif (in == 0) \n\t\t\t\t\tbreak;\n\t\t\t\ttype = \"inverse\";\n\t\t\t\tfor (int j = elements.size() - 2; j >= 0; --j){\n\t\t\t\t\telements.get(j).transmitInput(in, type);\n\t\t\t\t\tin = elements.get(j).receiveOutput();\n\t\t\t\t\tif (in == 0) break;\n\t\t\t\t}\n\t\t\t\tif (in == 0) continue;\n\t\t\t\tSystem.out.print(in);\n\t\t\t}\n\t\t}catch (NullPointerException e){\n\t\t\treturn;\n\t\t}\n\t}", "@Test(timeout = 4000)\n public void test001() throws Throwable {\n StringReader stringReader0 = new StringReader(\"~\\\"Py BTn?,~tnf\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 15, 15);\n javaCharStream0.bufpos = (-1396);\n javaCharStream0.backup((-1396));\n javaCharStream0.adjustBeginLineColumn((-1396), 76);\n assertEquals(0, javaCharStream0.bufpos);\n }", "public static void encode()\n {\n \n String s = BinaryStdIn.readString();\n //String s = \"ABRACADABRA!\";\n int len = s.length();\n int key = 0;\n \n // generating rotating string table\n String[] table = new String[len];\n for (int i = 0 ; i < len; i++)\n {\n table[i] = rotate(s, i, len);\n }\n \n // sort the table\n String[] sorted = new String[len];\n for(int i = 0 ; i < len; i++)\n {\n sorted[i] = table[i];\n }\n sort(sorted, len);\n \n //generating encoded string\n StringBuilder result = new StringBuilder();\n for(int i = 0 ; i < len; i++)\n result.append(sorted[i].charAt(len-1));\n \n //find the key index \n for(int i = 0 ; i < table.length; i++)\n {\n if(sorted[i].equals(s))\n {\n key = i;\n break;\n }\n }\n \n // output part\n \n BinaryStdOut.write(key);\n \n for(int i = 0 ; i < len; i++)\n BinaryStdOut.write(result.charAt(i)); // generate the output character by character\n \n BinaryStdOut.close();\n \n }", "private void translator(File inputFile) throws IOException {\n Parser fileParser = new Parser(inputFile);\n CodeWriter writer = new CodeWriter(inputFile);\n String outputName = inputFile.getPath().replace(\".vm\", \".asm\");\n writer.setFileName(inputFile.getName().replace(\".vm\", \"\"));\n\n Path outputPath = Paths.get(outputName);\n PrintWriter out = new PrintWriter(Files.newBufferedWriter(outputPath));\n\n String line;\n while (fileParser.hasMoreCommends()) {\n line = fileParser.adanvce();\n fileParser.lineAnalizer(line); // updates parser fields\n int CommendType = fileParser.getCommendType();\n\n switch (CommendType) {\n case Parser.C_ARITHMETIC:\n writer.writeArithmetic(fileParser.getArg1());\n break;\n case Parser.C_PUSH:\n case Parser.C_POP:\n writer.writePushPop(CommendType, fileParser.getArg1(), fileParser.getArg2());\n break;\n }\n\n }\n fileParser.close();\n writer.close();\n }", "public static void main(String[] args) throws IOException{\n char c;\r\n do{\r\n c = (char)System.in.read();\r\n System.out.println(\"c: \"+c);\r\n }while(c!='.');\r\n //2 method: int read(byte data[]) & int read(byte data[],int min, int max)\r\n// byte data[] = new byte[10];// input char translated into byte numbers\r\n// System.out.println(\"nhap cac ki tu: \");\r\n// //System.in.read(data);\r\n// System.in.read(data,0,3);// read chars [0;3)\r\n// System.out.println(\"cac ki tu vua nhap\");\r\n// for(int i=0;i<data.length;i++)\r\n// System.out.println((char)data[i]);// empty positions filled with 0/empty space\r\n }", "public void setInputEncoding(String inputEncoding) {\r\n this.inputEncoding = inputEncoding;\r\n }", "static void in_to_acc(String passed) throws IOException{\n\t\tSystem.out.print(\"Input to port \"+hexa_to_deci(passed.substring(3))+\" : \");\n\t\tString enter = scan.readLine();\n\t\tregisters.put('A',enter);\n\t}", "public static void main(String[] args)\n/* */ throws IOException\n/* */ {\n/* 135 */ if (args.length < 1) {\n/* 136 */ System.err.println(\"usage: java edu.stanford.nlp.process.WhitespaceTokenizer [-cr] filename\");\n/* 137 */ return;\n/* */ }\n/* 139 */ WhitespaceTokenizer tokenizer = new WhitespaceTokenizer(new InputStreamReader(new FileInputStream(args[(args.length - 1)]), \"UTF-8\"), args[0].equals(\"-cr\"));\n/* 140 */ PrintWriter pw = new PrintWriter(new OutputStreamWriter(System.out, \"UTF-8\"), true);\n/* 141 */ while (tokenizer.hasNext()) {\n/* 142 */ Word w = (Word)tokenizer.next();\n/* 143 */ if (w == WhitespaceLexer.crValue) {\n/* 144 */ pw.println(\"***CR***\");\n/* */ } else {\n/* 146 */ pw.println(w);\n/* */ }\n/* */ }\n/* */ }", "void readPreferences(InputStream prefin) {\n\t// line-based, <command> <args>, \"#\" starts comment, lines can be blank\n\tBufferedReader prefr = new BufferedReader(new InputStreamReader(prefin));\n\tStreamTokenizer st = new StreamTokenizer(prefr);\n\tst.eolIsSignificant(true);\n\tst.resetSyntax();\n\tst.whitespaceChars(0,' '); st.wordChars(' '+1, 0x7e);\n\tst.commentChar('#'); st.slashSlashComments(true); st.slashStarComments(true);\n\tst.quoteChar('\"');\n\n\ttry {\n\tString key, val;\n\tfor (int token=st.nextToken(); token!=StreamTokenizer.TT_EOF; ) {\n\t\tif (token==StreamTokenizer.TT_EOL) { token=st.nextToken(); continue; }\n\t\tString cmd = st.sval;\n\t\tif (cmd!=null) cmd=cmd.intern();\n\t\tst.nextToken(); key=st.sval; st.nextToken(); val=st.sval;\t// for now all commands have same syntax\n\t\tif (\"mediaadaptor\"==cmd) {\n//System.out.println(\"media adaptor \"+key+\" => \"+val);\n\t\t\tadaptor_.put(key.toLowerCase(), val); // not case sensitive\n\t\t} else if (\"remap\"==cmd) {\n//System.out.println(\"behavior remap \"+key+\" => \"+val);\n\t\t\tberemap_.put(key, val);\n\t\t\t//berevmap_.put(val, key); // reverse map for when save out => NO, keep logical name and associated behavior separate\n\t\t} else if (\"set\"==cmd) {\n\t\t\tputPreference(key, val);\n\t\t}\n\t\tdo { token=st.nextToken(); } while (token!=StreamTokenizer.TT_EOL && token!=';' && token!=StreamTokenizer.TT_EOF);\n\t}\n\tprefr.close();\n\t} catch (IOException ignore) {\nSystem.err.println(\"can't read prefs \"+ignore);\n\t}\n }", "@Test(timeout = 4000)\n public void test002() throws Throwable {\n StringReader stringReader0 = new StringReader(\"%WC\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.backup(1);\n javaCharStream0.BeginToken();\n javaCharStream0.AdjustBuffSize();\n javaCharStream0.adjustBeginLineColumn(1, 1);\n assertEquals(0, javaCharStream0.bufpos);\n }", "private void writeEscaped(String in)\n\t\tthrows IOException\n\t{\n\t\tfor(int i=0, n=in.length(); i<n; i++)\n\t\t{\n\t\t\tchar c = in.charAt(i);\n\t\t\tif(c == '\"' || c == '\\\\')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write(c);\n\t\t\t}\n\t\t\telse if(c == '\\r')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('r');\n\t\t\t}\n\t\t\telse if(c == '\\n')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('n');\n\t\t\t}\n\t\t\telse if(c == '\\t')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('t');\n\t\t\t}\n\t\t\telse if(c == '\\b')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('b');\n\t\t\t}\n\t\t\telse if(c == '\\f')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('f');\n\t\t\t}\n\t\t\telse if(c <= 0x1F)\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('u');\n\n\t\t\t\tint v = c;\n\t\t\t\tint pos = 4;\n\t\t\t\tdo\n\t\t\t\t{\n\t\t\t\t\tencoded[--pos] = DIGITS[v & HEX_MASK];\n\t\t\t\t\tv >>>= 4;\n\t\t\t\t}\n\t\t\t\twhile (v != 0);\n\n\t\t\t\tfor(int j=0; j<pos; j++) writer.write('0');\n\t\t\t\twriter.write(encoded, pos, 4 - pos);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\twriter.write(c);\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) throws IOException {\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n BufferedOutputStream out = new BufferedOutputStream(System.out);\n StringBuilder res = new StringBuilder();\n\n while (true) {\n // skip blank lines and end when no more input\n String line = in.readLine();\n if (line == null)\n break;\n else if (line.equals(\"\"))\n continue;\n\n int b = Integer.valueOf(line);\n int p = Integer.valueOf(in.readLine());\n int m = Integer.valueOf(in.readLine());\n\n res.append(modPow(b, p, m));\n res.append('\\n');\n }\n\n out.write(res.toString().getBytes());\n\n out.close();\n in.close();\n }" ]
[ "0.5330781", "0.52863777", "0.5269845", "0.50862455", "0.5081172", "0.5047047", "0.50462455", "0.5028201", "0.5021064", "0.49862203", "0.49672544", "0.49592713", "0.49573636", "0.49350464", "0.49272424", "0.49130592", "0.49009222", "0.48955578", "0.4888181", "0.4865894", "0.485706", "0.48565704", "0.48461923", "0.48273793", "0.48240927", "0.48199707", "0.477542", "0.4768877", "0.47487804", "0.474806", "0.47265205", "0.47226435", "0.47223845", "0.47200608", "0.47101122", "0.47043306", "0.47023818", "0.4701603", "0.46989873", "0.46885526", "0.46765113", "0.46690726", "0.4663078", "0.46621278", "0.46563333", "0.4654158", "0.46438238", "0.46436915", "0.46423382", "0.46344045", "0.4628975", "0.46264437", "0.46185744", "0.46144596", "0.4612743", "0.4612482", "0.46121445", "0.4609579", "0.46052033", "0.460468", "0.46045753", "0.4602611", "0.45952553", "0.4593284", "0.45882538", "0.4583767", "0.45773813", "0.4572122", "0.4568331", "0.4565038", "0.45634487", "0.45623648", "0.45567524", "0.4537386", "0.45303145", "0.45279878", "0.4522746", "0.45123094", "0.45036858", "0.45001", "0.4499489", "0.44994494", "0.44973788", "0.44894335", "0.44861102", "0.44608122", "0.44599763", "0.44568464", "0.4455141", "0.44517827", "0.44503686", "0.4449991", "0.44480622", "0.44476894", "0.44433036", "0.4411819", "0.44113877", "0.441083", "0.44074616", "0.44064382" ]
0.4965196
11
apply movetofront decoding, reading from standard input and writing to standard output
public static void decode() { int[] index = new int[R + 1]; char[] charAtIndex = new char[R + 1]; for (int i = 0; i < R + 1; i++) { index[i] = i; charAtIndex[i] = (char) i; } while (!BinaryStdIn.isEmpty()) { int c = BinaryStdIn.readChar(); char t = charAtIndex[c]; BinaryStdOut.write(t); for (int i = c - 1; i >= 0; i--) { char temp = charAtIndex[i]; int tempIndex = ++index[temp]; charAtIndex[tempIndex] = temp; } charAtIndex[0] = t; index[t] = 0; } BinaryStdOut.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void decode() {\n char[] seq = new char[R];\n\n for (int i = 0; i < R; i++)\n seq[i] = (char) i;\n\n while (!BinaryStdIn.isEmpty()) {\n int index = BinaryStdIn.readChar();\n char c = seq[index];\n BinaryStdOut.write(seq[index]);\n\n for (int i = index; i > 0; i--)\n seq[i] = seq[i - 1];\n seq[0] = c;\n }\n BinaryStdOut.close();\n }", "public static void decode() {\n char[] symbols = initializeSymbols();\n int position;\n while (!BinaryStdIn.isEmpty()) {\n position = BinaryStdIn.readChar();\n char symbol = symbols[position];\n BinaryStdOut.write(symbol, BITS_PER_BYTE);\n System.arraycopy(symbols, 0, symbols, 1, position);\n symbols[0] = symbol;\n }\n BinaryStdOut.close();\n }", "public void readFromPc(String input) {\n\n }", "@Test\n public void testTransform() {\n InputStream standardIn = System.in;\n PrintStream standardOut = System.out;\n try {\n // setup new input\n System.setIn(new ByteArrayInputStream(DECODED_INPUT.getBytes()));\n // create new output stream as byte array and assign to standard\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n System.setOut(new PrintStream(baos));\n\n BurrowsWheeler.transform();\n byte[] encoded = baos.toByteArray();\n assertEquals(ENCODED_INPUT.length, encoded.length);\n for (int i = 0; i < encoded.length; i++) {\n assertEquals(ENCODED_INPUT[i], encoded[i]);\n }\n } finally {\n // return standard input and output\n System.setIn(standardIn);\n System.setOut(standardOut);\n }\n }", "public static void decode() {\n int first = BinaryStdIn.readInt();\n String t = BinaryStdIn.readString();\n int n = t.length();\n int[] count = new int[256 + 1];\n int[] next = new int[n];\n int i = 0;\n while (i < n) {\n count[t.charAt(i) + 1]++;\n i++;\n }\n i = 1;\n while (i < 256 + 1) {\n count[i] += count[i - 1];\n i++;\n }\n i = 0;\n while (i < n) {\n next[count[t.charAt(i)]++] = i;\n i++;\n }\n i = next[first];\n int c = 0;\n while (c < n){\n BinaryStdOut.write(t.charAt(i));\n i = next[i];\n c++;\n }\n BinaryStdOut.close();\n }", "@Test\n public void testTransform3() {\n InputStream standardIn = System.in;\n PrintStream standardOut = System.out;\n try {\n // setup new input\n System.setIn(new ByteArrayInputStream(DECODED_INPUT3.getBytes()));\n // create new output stream as byte array and assign to standard\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n System.setOut(new PrintStream(baos));\n\n BurrowsWheeler.transform();\n byte[] encoded = baos.toByteArray();\n assertEquals(ENCODED_INPUT3.length, encoded.length);\n for (int i = 0; i < encoded.length; i++) {\n assertEquals(ENCODED_INPUT3[i], encoded[i]);\n }\n } finally {\n // return standard input and output\n System.setIn(standardIn);\n System.setOut(standardOut);\n }\n }", "@Test\n public void testTransform2() {\n InputStream standardIn = System.in;\n PrintStream standardOut = System.out;\n try {\n // setup new input\n System.setIn(new ByteArrayInputStream(DECODED_INPUT2.getBytes()));\n // create new output stream as byte array and assign to standard\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n System.setOut(new PrintStream(baos));\n\n BurrowsWheeler.transform();\n byte[] encoded = baos.toByteArray();\n assertEquals(ENCODED_INPUT2.length, encoded.length);\n for (int i = 0; i < encoded.length; i++) {\n assertEquals(ENCODED_INPUT2[i], encoded[i]);\n }\n } finally {\n // return standard input and output\n System.setIn(standardIn);\n System.setOut(standardOut);\n }\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 }", "@Test\n public void testInverseTransform3() {\n InputStream standardIn = System.in;\n PrintStream standardOut = System.out;\n try {\n // setup new input with encoded message\n System.setIn(new ByteArrayInputStream(ENCODED_INPUT3));\n // create new output stream as byte array and assign to standard\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n System.setOut(new PrintStream(baos));\n\n BurrowsWheeler.inverseTransform();\n String decoded = baos.toString();\n // check length and chars\n assertEquals(DECODED_INPUT3.length(), decoded.length());\n assertEquals(DECODED_INPUT3, decoded);\n } finally {\n // return standard input and output\n System.setIn(standardIn);\n System.setOut(standardOut);\n }\n }", "public static void inverseTransform() {\n int[] count = new int[R + 1]; // used for count/cumulates for decoding\n @SuppressWarnings(\"unchecked\")\n Queue<Integer>[] fifoIndices = new Queue[R];\n for (int r = 0; r < R; r++) {\n fifoIndices[r] = new Queue<Integer>();\n }\n String binaryInputString = \"\";\n int length; // length of input\n int first;\n // Get input binary stream\n first = BinaryStdIn.readInt();\n while (!BinaryStdIn.isEmpty()) {\n binaryInputString = BinaryStdIn.readString();\n // binaryInputChar = BinaryStdIn.readChar();\n // binaryInputString = binaryInputString.append(binaryInputChar);\n // count[binaryInputChar + 1]++; // update counts\n // fifoIndices[binaryInputChar].enqueue(counter++); // array of FIFOs of indices of binaryInputChar in input binary stream\n }\n length = binaryInputString.length();\n for (int i = 0; i < length; i++) {\n count[binaryInputString.charAt(i) + 1]++;\n // store indices for each character as they appear in FIFO order\n fifoIndices[binaryInputString.charAt(i)].enqueue(i);\n }\n \n // update cumulates\n for (int r = 0; r < R; r++) {\n count[r + 1] += count[r];\n }\n \n // sorted first column\n char[] tAux = new char[length];\n \n // move items from string into first column array in sorted order\n for (int i = 0; i < length; i++) {\n tAux[count[binaryInputString.charAt(i)]++] = binaryInputString.charAt(i);\n }\n \n // store corresponding index for relative order\n // i < j --> next[i] < next[j]\n int[] next = new int[length];\n for (int i = 0; i < length; i++) {\n next[i] = fifoIndices[tAux[i]].dequeue();\n }\n \n for (int i = 0; i < length; i++) {\n BinaryStdOut.write(tAux[first]);\n first = next[first];\n }\n BinaryStdOut.flush();\n }", "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 }", "@Test(timeout = 4000)\n public void test137() throws Throwable {\n JavaCharStream javaCharStream0 = new JavaCharStream((Reader) null);\n PipedInputStream pipedInputStream0 = new PipedInputStream();\n javaCharStream0.ReInit((InputStream) pipedInputStream0, 122, 122);\n assertEquals((-1), javaCharStream0.bufpos);\n }", "@Test\n public void testInverseTransform() {\n InputStream standardIn = System.in;\n PrintStream standardOut = System.out;\n try {\n // setup new input with encoded message\n System.setIn(new ByteArrayInputStream(ENCODED_INPUT));\n // create new output stream as byte array and assign to standard\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n System.setOut(new PrintStream(baos));\n\n BurrowsWheeler.inverseTransform();\n String decoded = baos.toString();\n // check length and chars\n assertEquals(DECODED_INPUT.length(), decoded.length());\n assertEquals(DECODED_INPUT, decoded);\n } finally {\n // return standard input and output\n System.setIn(standardIn);\n System.setOut(standardOut);\n }\n }", "@Test\n public void testInverseTransform2() {\n InputStream standardIn = System.in;\n PrintStream standardOut = System.out;\n try {\n // setup new input with encoded message\n System.setIn(new ByteArrayInputStream(ENCODED_INPUT2));\n // create new output stream as byte array and assign to standard\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n System.setOut(new PrintStream(baos));\n\n BurrowsWheeler.inverseTransform();\n String decoded = baos.toString();\n // check length and chars\n assertEquals(DECODED_INPUT2.length(), decoded.length());\n assertEquals(DECODED_INPUT2, decoded);\n } finally {\n // return standard input and output\n System.setIn(standardIn);\n System.setOut(standardOut);\n }\n }", "OutputStream getStdin();", "void perform(LineReader input, OutputStream output) throws IOException;", "public static void decode()\n {\n \n \n int a = BinaryStdIn.readInt();\n String t = BinaryStdIn.readString();\n int len = t.length();\n \n //variables for generating next[] array\n int[] next = new int[len];\n char[] original = t.toCharArray();\n char[] temp = t.toCharArray();\n boolean[] flag = new boolean[len];\n for(int i = 0 ; i < len; i++)\n {\n flag[i] = true;\n }\n \n //sort the encoded string\n decodeSort(temp);\n \n //generating next[] array\n for(int i = 0 ; i < len; i++)\n {\n for(int j = 0 ; j < len; j++)\n {\n if(flag[j])\n { \n if(original[j]==temp[i])\n {\n next[i] = j;\n flag[j]=false;\n break;\n }\n }\n }\n \n }\n \n // decode procedure\n int key = a;\n for (int count = 0; count < len; count++) {\n key = next[key];\n BinaryStdOut.write(t.charAt(key));\n }\n BinaryStdOut.close();\n }", "public VT10xEmulator(ICharacterTerminal term, InputStream in, OutputStream out) {\n super(term, in, out);\n }", "public static void main(String[] args) {\n MoveToFront m =new MoveToFront();\n m.readChar();\n m.ergodic();\n\t}", "public abstract boolean canDecodeInput(Object source) throws IOException;", "public abstract String inReadLine() throws JVMIOException;", "InputStream synthesize(String phrase, OutputFormat fmt) throws IOException;", "private static void input(String[] args) {\n try (BufferedReader scanner = new BufferedReader(\n new InputStreamReader(args.length > 0 ? new FileInputStream(args[0]) : System.in))) {\n\n String linija;\n\n // regularne definicije\n while ((linija = scanner.readLine()) != null && linija.startsWith(\"{\")) {\n String tmp[] = linija.split(\" \");\n\n tmp[0] = tmp[0].substring(1, tmp[0].length() - 1);\n String naziv = tmp[0];\n String izraz = expandRegularDefinition(tmp[1]);\n\n regularneDefinicije.put(naziv, izraz);\n\n // System.out.println(naziv + \", \" + izraz);\n }\n\n // stanja\n while (!linija.startsWith(\"%X\")) {\n linija = scanner.readLine().trim();\n }\n\n skipSplitAdd(linija, stanjaLA);\n\n // leksicke jedinke\n while (!linija.startsWith(\"%L\")) {\n linija = scanner.readLine().trim();\n }\n\n skipSplitAdd(linija, leksickeJedinke);\n\n // pravila leksickog analizatora\n\n while ((linija = scanner.readLine()) != null) {\n while (!linija.startsWith(\"<\")) {\n linija = scanner.readLine();\n }\n\n String tmp[] = linija.split(\">\", 2);\n\n String stateName = tmp[0].substring(1, tmp[0].length());\n String regDef = tmp[1];\n\n regDef = expandRegularDefinition(regDef);\n\n // System.out.println(stateName + \"<> \" + regDef);\n LexerRule lexerRule = new LexerRule(regDef, stateName, 1, \"<\" + stateName + \">\" + regDef);\n lexerRules.add(lexerRule);\n\n scanner.readLine(); // preskoci {\n\n linija = scanner.readLine().trim();\n while (linija != null && scanner.ready() && !linija.equals(\"}\")) {\n // radi nesto s naredbom\n lexerRule.addAction(linija);\n linija = scanner.readLine().trim();\n }\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private InputStream interposeActivityDetector(InputStream out) {\n\tfinal NotifyingInputSteam notifier = new NotifyingInputSteam(out);\n\tnotifier.setListener(new NotifyingInputSteam.Listener () {\n\t public void activity () {\n\t\tif (DebuggerOption.FRONT_PIO.isEnabled(\n\t\t\t NativeDebuggerManager.get().globalOptions()))\n\t\t OldTermComponent.this.requestVisible();\n\t }\n\t});\n\tnotifier.arm();\n\n\tout = notifier;\n\treturn out;\n }", "InputStream mo1151a();", "static void take_the_input() throws IOException{\n\t\tSystem.out.print(\"ENTER THE ADDRESS : \");\n\n\t\taddress = hexa_to_deci(scan.readLine());\n\t\tSystem.out.println();\n\n\t\twhile(true){\n\t\t\tprint_the_address(address);\n\t\t\tString instruction = scan.readLine();\n\t\t\tint label_size = check_for_label(instruction);\n\t\t\tinstruction = instruction.substring(label_size);\n\t\t\tmemory.put(address, instruction);\n\t\t\tif(stop_instruction(instruction))\n\t\t\t\tbreak;\n\t\t\taddress+=size_of_code(instruction);\n\t\t}\n\t\tSystem.out.println();\n\t\tSystem.out.print(\"DO YOU WANT TO ENTER ANY FURTHUR CODE (Y/N) : \");\n\t\tString choice = scan.readLine();\n\t\tSystem.out.println();\n\t\tif(choice.equals(\"Y\"))\n\t\t\ttake_the_input();\n\t}", "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 }", "public static void transcode(String inputFile, String outputFile) {\n log.info(\"Starting to transcode...\");\n\n // Create an IMediaReader using the ToolFactory\n IMediaReader reader = ToolFactory.makeReader(inputFile);\n\n /*\n * Create an IMediaWriter and add it as a listener to the reader\n * creating a simple tool chain: reader -> writer.\n */\n IMediaWriter writer = ToolFactory.makeWriter(outputFile, reader);\n reader.addListener(writer);\n\n /*\n * Read and decode packets from the reader, which triggers tool chain processing. Surround\n * with a try/catch to log any errors.\n */\n try {\n while (reader.readPacket() == null)\n ;\n } catch (Exception e) {\n log.error(e.toString());\n }\n\n // Close the writer and reader\n writer.close();\n reader.close();\n\n log.info(\"Transcode finished!\");\n }", "public static void main (String[] args){\n\n String str = \"qwwwwwwwwweeeeerrtyyyyyqqqqwEErTTT\";\n String rts = \"q9w5e2rt5y4qw2Er3T\";\n System.out.println(encode(str));\n System.out.print(decode(rts));\n\n }", "private void traceInput() {\r\n int line = 1, start = 0, stop = input.length();\r\n for (int i = 0; i < in; i++) {\r\n if (input.charAt(i) != '\\n') continue;\r\n line++;\r\n start = i + 1;\r\n }\r\n for (int i = in; i < input.length(); i++) {\r\n if (input.charAt(i) != '\\n') continue;\r\n stop = i;\r\n break;\r\n }\r\n System.out.print(\"I\" + line + \": \");\r\n System.out.print(input.substring(start, in));\r\n System.out.print(\"|\");\r\n System.out.println(input.substring(in, stop));\r\n }", "public FakeStandardOutput() throws UnsupportedEncodingException {\r\n super(new StringOutputStream(), true, \"UTF8\");\r\n innerStream = (StringOutputStream) super.out;\r\n }", "public static void transform() {\r\n \tString str = BinaryStdIn.readString();;\r\n \tCircularSuffixArray suffixArr = new CircularSuffixArray(str);\r\n \tfor (int i = 0; i < suffixArr.length(); i++) {\r\n \t\tif (suffixArr.index(i) == 0) {\r\n \t\t\tBinaryStdOut.write(i);\r\n \t\t\tbreak;\r\n \t\t}\r\n \t}\r\n \tfor (int i = 0; i < suffixArr.length(); i++) {\r\n \t\tint pos = suffixArr.index(i);\r\n \t\tif (pos == 0) {\r\n \t\t\tpos = suffixArr.length();\r\n \t\t}\r\n \t\tBinaryStdOut.write(str.charAt(pos - 1), 8);\r\n \t}\r\n \tBinaryStdOut.close();\r\n }", "private void loadOutput(InputStream in) throws IOException\r\n\t{\r\n\t\tlogger.debug(\"Begin: \"+getClass().getName()+\":loadOutput()\");\t\r\n\t\tStringBuffer sb=new StringBuffer();\r\n\t\tint c;\r\n\t\twhile((c=in.read())!= -1) \r\n\t\t{\t\t \r\n\t\t\tsb.append((char)c);\r\n\t\t}\t \r\n\t\toutput=sb.toString();\t\t\r\n\t\tlogger.debug(\"output is : \"+output);\r\n\t\tlogger.debug(\"Begin: \"+getClass().getName()+\":loadOutput()\");\t\r\n\t}", "public static void main(String args[]) {\n String str = \"Composer 2.1 ascii\\ncamera {\\n position 3.84789 3.48111 14.0946\\n viewDirection -123 -0.0143311 27\\n}\";\n\tIStrStream stream = new IStrStream(str);\n\tString input;\n\tint i;\n\tfloat f;\n\t\n\tinput = stream.getString();\n\tif (!(input.equals(\"Composer\"))) {\n\t System.err.println(\"unexpected string 1 \" + input);\n\t System.exit(1);\n\t}\n\tf = stream.getFloat();\n\tif (Math.abs(f - 2.1) > 0.1) {\n\t System.err.println(\"unexpected float 2 \" + f);\n\t System.exit(1);\n\t}\n\tinput = stream.getString();\n\tif (!(input.equals(\"ascii\"))) {\n\t System.err.println(\"unexpected string 3 \" + input);\n\t System.exit(1);\n\t}\n\twhile (!stream.eof()) {\n\t input = stream.getString();\n\t if (input.equals(\"camera\")) {\n\t\tinput = stream.getString();\t// skip over {\n\t\tinput = stream.getString();\n\t\tif (!(input.equals(\"position\"))) {\n\t\t System.err.println(\"unexpected string 4 \" + input);\n\t\t System.exit(1);\n\t\t}\n\t\tf = stream.getFloat();\n\t\tf = stream.getFloat();\n\t\tf = stream.getFloat();\n\t\tinput = stream.getString();\n\t\tif (!(input.equals(\"viewDirection\"))) {\n\t\t System.err.println(\"unexpected string 5 \" + input);\n\t\t System.exit(1);\n\t\t}\n\t\ti = stream.getInt();\n\t\tif (i != -123) {\n\t\t System.err.println(\"unexpected integer 6 \" + i);\n\t\t System.exit(1);\n\t\t}\n\t\tf = stream.getFloat();\n\t\ti = stream.getInt();\n\t\tif (i != 27) {\n\t\t System.err.println(\"unexpected integer 7 \" + i);\n\t\t System.exit(1);\n\t\t}\n\t\tinput = stream.getString();\t// skip over }\n\t } else {\n\t\tSystem.err.println(\"unexpected subcommand string 8 \" + input);\n\t\tSystem.exit(1);\n\t }\n\t}\n\tSystem.out.println(\"passed\");\n }", "public static void main(String args[]) throws IOException {\n Scanner sc= new Scanner(System.in);\r\n String s= sc.next();\r\n char ch= s.charAt(0);\r\n switch (ch)\r\n {\r\n case 'P':\r\n case 'p': \r\n System.out.println(\"PrepBytes\");\r\n break;\r\n case 'Z':\r\n case 'z':\r\n System.out.println(\"Zenith\");\r\n break;\r\n case 'E':\r\n case 'e':\r\n System.out.println(\"Expert Coder\");\r\n break;\r\n case 'D':\r\n case 'd':\r\n System.out.println(\"Data Structure\");\r\n break;\r\n }\r\n }", "public abstract void decode(SubtitleInputBuffer subtitleInputBuffer);", "public static void main(String[] args)\n/* */ throws IOException\n/* */ {\n/* 130 */ if (args.length < 1) {\n/* 131 */ System.err.println(\"usage: java edu.stanford.nlp.process.ArabicTokenizer [-cr] filename\");\n/* 132 */ return;\n/* */ }\n/* 134 */ ArabicTokenizer tokenizer = new ArabicTokenizer(new InputStreamReader(new FileInputStream(args[(args.length - 1)]), \"UTF-8\"), args[0].equals(\"-cr\"));\n/* 135 */ PrintWriter pw = new PrintWriter(new OutputStreamWriter(System.out, \"UTF-8\"), true);\n/* 136 */ while (tokenizer.hasNext()) {\n/* 137 */ Word w = (Word)tokenizer.next();\n/* 138 */ if (w == ArabicLexer.crValue) {\n/* 139 */ pw.println(\"***CR***\");\n/* */ } else {\n/* 141 */ pw.println(w);\n/* */ }\n/* */ }\n/* */ }", "public void processStreamInput() {\n }", "public void translate() {\n\t\twhile (!inputBuffer.endOfBuffer()) {\n\t\t\tMsgChar get = inputBuffer.getChar();\n\t\t\tif (get == null) continue;\n\t\t\tif (inputBuffer.isEndOfSentence()) {\n\t\t\t\toutputBuffer.markEndOfSentence();\n\t\t\t} else if (inputBuffer.isEndOfWord()) {\n\t\t\t\toutputBuffer.markEndOfWord();\n\t\t\t} else {\n\t\t\t\toutputBuffer.putChar(get.convert());\n\t\t\t}\n\t\t}\n\t\tinputBuffer.getReader().close();\n\t\toutputBuffer.close();\n\t}", "protected void instrumentIO()\r\n {\r\n // Clear out all the stream history stuff\r\n tcIn = null;\r\n tcOut = null;\r\n tcInBuf = null;\r\n\r\n // Make sure these are history-wrapped\r\n SystemIOUtilities.out();\r\n SystemIOUtilities.err();\r\n\r\n // First, make sure the original System.in gets captured, so it\r\n // can be restored later\r\n SystemIOUtilities.replaceSystemInContents(null);\r\n\r\n // The previous line actually replaced System.in, but now we'll\r\n // \"replace the replacement\" with one that uses fail() if it\r\n // has no contents.\r\n System.setIn(new MutableStringBufferInputStream((String)null)\r\n {\r\n protected void handleMissingContents()\r\n {\r\n fail(\"Attempt to access System.in before its contents \"\r\n + \"have been set\");\r\n }\r\n });\r\n }", "void readPreferences(InputStream prefin) {\n\t// line-based, <command> <args>, \"#\" starts comment, lines can be blank\n\tBufferedReader prefr = new BufferedReader(new InputStreamReader(prefin));\n\tStreamTokenizer st = new StreamTokenizer(prefr);\n\tst.eolIsSignificant(true);\n\tst.resetSyntax();\n\tst.whitespaceChars(0,' '); st.wordChars(' '+1, 0x7e);\n\tst.commentChar('#'); st.slashSlashComments(true); st.slashStarComments(true);\n\tst.quoteChar('\"');\n\n\ttry {\n\tString key, val;\n\tfor (int token=st.nextToken(); token!=StreamTokenizer.TT_EOF; ) {\n\t\tif (token==StreamTokenizer.TT_EOL) { token=st.nextToken(); continue; }\n\t\tString cmd = st.sval;\n\t\tif (cmd!=null) cmd=cmd.intern();\n\t\tst.nextToken(); key=st.sval; st.nextToken(); val=st.sval;\t// for now all commands have same syntax\n\t\tif (\"mediaadaptor\"==cmd) {\n//System.out.println(\"media adaptor \"+key+\" => \"+val);\n\t\t\tadaptor_.put(key.toLowerCase(), val); // not case sensitive\n\t\t} else if (\"remap\"==cmd) {\n//System.out.println(\"behavior remap \"+key+\" => \"+val);\n\t\t\tberemap_.put(key, val);\n\t\t\t//berevmap_.put(val, key); // reverse map for when save out => NO, keep logical name and associated behavior separate\n\t\t} else if (\"set\"==cmd) {\n\t\t\tputPreference(key, val);\n\t\t}\n\t\tdo { token=st.nextToken(); } while (token!=StreamTokenizer.TT_EOL && token!=';' && token!=StreamTokenizer.TT_EOF);\n\t}\n\tprefr.close();\n\t} catch (IOException ignore) {\nSystem.err.println(\"can't read prefs \"+ignore);\n\t}\n }", "public CLI(BufferedReader in, Writer out) {\n\t\t_in = in;\n\t\t_out = out;\n\t}", "public abstract InputStream mo131998b();", "public void readAndPrint(String str);", "public static void transform() {\n String s = BinaryStdIn.readString();\n CircularSuffixArray circularSuffixArray = new CircularSuffixArray(s);\n for (int i = 0; i < s.length(); i++) {\n if (circularSuffixArray.index(i) == 0) {\n BinaryStdOut.write(i);\n }\n }\n for (int i = 0; i < s.length(); i++) {\n int index = circularSuffixArray.index(i);\n if (index == 0) {\n BinaryStdOut.write(s.charAt(s.length() - 1));\n }\n else {\n BinaryStdOut.write(s.charAt(index - 1));\n }\n }\n BinaryStdOut.flush();\n }", "public void translate(BitInputStream input, PrintStream output) {\n HuffmanNode node = this.front;\n while (input.hasNextBit()) {\n while (node.left != null && node.right != null) {\n if (input.nextBit() == 0) {\n node = node.left;\n } else {\n node = node.right;\n }\n }\n output.print(node.getData());\n node = this.front;\n }\n }", "public static void main(String[] args) throws IOException {\r\n BufferedReader input = new BufferedReader(new InputStreamReader(System.in,\"UTF-8\"));\r\n PrintStream output = new PrintStream(System.out, true, \"UTF-8\");\r\n \tString line;\r\n \twhile ( (line = input.readLine()) != null) {\r\n \t\tList<String> toks = tokenizeRawTweetText(line);\r\n \t\tfor (int i=0; i<toks.size(); i++) {\r\n \t\t\toutput.print(toks.get(i));\r\n \t\t\tif (i < toks.size()-1) {\r\n \t\t\t\toutput.print(\" \");\r\n \t\t\t}\r\n \t\t}\r\n \t\toutput.print(\"\\n\");\r\n \t}\r\n }", "public static void main(String[] args) throws IOException {\n InputStream is = new FileInputStream(\"\");\n System.out.print ((char)is.read());\n is.skip(2);\n is.read();\n System.out.print((char)is.read());\n System.out.print((char)is.read());\n }", "public AnalizadorLexicoArchivo(java.io.Reader in) {\n this.zzReader = in;\n }", "@Test\n\tpublic void testInlinerWithFile() throws Exception {\n\t\tString input = new String(Files.readAllBytes(new File(\"../warre.txt\").toPath()));\n\t\tInliner inliner = new Inliner();\n\t\tList<Part> parts = new Tokenizer(inliner).split(input);\n\t\tList<HTreeNode> freq = new FrequencyAnalyzer().analyzeFrequency(parts);\n\t\tString result = inliner.encode(parts, freq, 'X');\n\n\t\tSystem.out.println(\"\\nInput size : \" + input.length());\n\t\tSystem.out.println(\"Output size : \" + result.length());\n\t\tSystem.out.println(\"Num tokens : \" + freq.stream().filter(a -> a.prevalence > 1).count());\n\n//\t\tSystem.out.println(input);\n\t\tSystem.out.println(result);\n//\t\tSystem.out.println(inliner.decode(result, 'X'));\n\t}", "void match(int t) throws IOException {\n\t\tif (lookahead == t) {\n\t\t\tlookahead = System.in.read();\n\t\t\tinput = input + (char)lookahead;\n\t\t} else {\n\t\t\t throw new Error(\"syntax error\");\n\t\t}\n\t}", "public StorableInput(InputStream stream) {\n Reader r = new BufferedReader(new InputStreamReader(stream));\n fTokenizer = new StreamTokenizer(r);\n fMap = new Vector();\n }", "public static void main(String argv[]) {\n if (argv.length == 0) {\n System.out.println(\"Usage : java AnalizadorLexico2 [ --encoding <name> ] <inputfile(s)>\");\n }\n else {\n int firstFilePos = 0;\n String encodingName = \"UTF-8\";\n if (argv[0].equals(\"--encoding\")) {\n firstFilePos = 2;\n encodingName = argv[1];\n try {\n java.nio.charset.Charset.forName(encodingName); // Side-effect: is encodingName valid? \n } catch (Exception e) {\n System.out.println(\"Invalid encoding '\" + encodingName + \"'\");\n return;\n }\n }\n for (int i = firstFilePos; i < argv.length; i++) {\n AnalizadorLexico2 scanner = null;\n try {\n java.io.FileInputStream stream = new java.io.FileInputStream(argv[i]);\n java.io.Reader reader = new java.io.InputStreamReader(stream, encodingName);\n scanner = new AnalizadorLexico2(reader);\n while ( !scanner.zzAtEOF ) scanner.debug_next_token();\n }\n catch (java.io.FileNotFoundException e) {\n System.out.println(\"File not found : \\\"\"+argv[i]+\"\\\"\");\n }\n catch (java.io.IOException e) {\n System.out.println(\"IO error scanning file \\\"\"+argv[i]+\"\\\"\");\n System.out.println(e);\n }\n catch (Exception e) {\n System.out.println(\"Unexpected exception:\");\n e.printStackTrace();\n }\n }\n }\n }", "public void interpret(Context context) {\n\t\tSystem.out.println(\"终端解释器\");\n\t}", "public int translate(CharSequence input, int index, Writer out) throws IOException {\n/* 82 */ int seqEnd = input.length();\n/* */ \n/* 84 */ if (input.charAt(index) == '&' && index < seqEnd - 2 && input.charAt(index + 1) == '#') {\n/* 85 */ int entityValue, start = index + 2;\n/* 86 */ boolean isHex = false;\n/* */ \n/* 88 */ char firstChar = input.charAt(start);\n/* 89 */ if (firstChar == 'x' || firstChar == 'X') {\n/* 90 */ start++;\n/* 91 */ isHex = true;\n/* */ \n/* */ \n/* 94 */ if (start == seqEnd) {\n/* 95 */ return 0;\n/* */ }\n/* */ } \n/* */ \n/* 99 */ int end = start;\n/* */ \n/* 101 */ while (end < seqEnd && ((input.charAt(end) >= '0' && input.charAt(end) <= '9') || (input\n/* 102 */ .charAt(end) >= 'a' && input.charAt(end) <= 'f') || (input\n/* 103 */ .charAt(end) >= 'A' && input.charAt(end) <= 'F'))) {\n/* 104 */ end++;\n/* */ }\n/* */ \n/* 107 */ boolean semiNext = (end != seqEnd && input.charAt(end) == ';');\n/* */ \n/* 109 */ if (!semiNext) {\n/* 110 */ if (isSet(OPTION.semiColonRequired)) {\n/* 111 */ return 0;\n/* */ }\n/* 113 */ if (isSet(OPTION.errorIfNoSemiColon)) {\n/* 114 */ throw new IllegalArgumentException(\"Semi-colon required at end of numeric entity\");\n/* */ }\n/* */ } \n/* */ \n/* */ \n/* */ try {\n/* 120 */ if (isHex) {\n/* 121 */ entityValue = Integer.parseInt(input.subSequence(start, end).toString(), 16);\n/* */ } else {\n/* 123 */ entityValue = Integer.parseInt(input.subSequence(start, end).toString(), 10);\n/* */ } \n/* 125 */ } catch (NumberFormatException nfe) {\n/* 126 */ return 0;\n/* */ } \n/* */ \n/* 129 */ if (entityValue > 65535) {\n/* 130 */ char[] chars = Character.toChars(entityValue);\n/* 131 */ out.write(chars[0]);\n/* 132 */ out.write(chars[1]);\n/* */ } else {\n/* 134 */ out.write(entityValue);\n/* */ } \n/* */ \n/* 137 */ return 2 + end - start + (isHex ? 1 : 0) + (semiNext ? 1 : 0);\n/* */ } \n/* 139 */ return 0;\n/* */ }", "public ObixDecoder(InputStream in)\n throws Exception\n { \n super(in);\n }", "public static void main(String argv[]) {\n if (argv.length == 0) {\n System.out.println(\"Usage : java AnalizadorLexicoPaginas [ --encoding <name> ] <inputfile(s)>\");\n }\n else {\n int firstFilePos = 0;\n String encodingName = \"UTF-8\";\n if (argv[0].equals(\"--encoding\")) {\n firstFilePos = 2;\n encodingName = argv[1];\n try {\n java.nio.charset.Charset.forName(encodingName); // Side-effect: is encodingName valid? \n } catch (Exception e) {\n System.out.println(\"Invalid encoding '\" + encodingName + \"'\");\n return;\n }\n }\n for (int i = firstFilePos; i < argv.length; i++) {\n AnalizadorLexicoPaginas scanner = null;\n try {\n java.io.FileInputStream stream = new java.io.FileInputStream(argv[i]);\n java.io.Reader reader = new java.io.InputStreamReader(stream, encodingName);\n scanner = new AnalizadorLexicoPaginas(reader);\n while ( !scanner.zzAtEOF ) scanner.debug_next_token();\n }\n catch (java.io.FileNotFoundException e) {\n System.out.println(\"File not found : \\\"\"+argv[i]+\"\\\"\");\n }\n catch (java.io.IOException e) {\n System.out.println(\"IO error scanning file \\\"\"+argv[i]+\"\\\"\");\n System.out.println(e);\n }\n catch (Exception e) {\n System.out.println(\"Unexpected exception:\");\n e.printStackTrace();\n }\n }\n }\n }", "private void start() {\n Scanner scanner = new Scanner(System.in);\n \n // While there is input, read line and parse it.\n String input = scanner.nextLine();\n TokenList parsedTokens = readTokens(input);\n }", "public static void main(String argv[]) {\n if (argv.length == 0) {\n System.out.println(\"Usage : java AnalizadorLexicoArchivo [ --encoding <name> ] <inputfile(s)>\");\n }\n else {\n int firstFilePos = 0;\n String encodingName = \"UTF-8\";\n if (argv[0].equals(\"--encoding\")) {\n firstFilePos = 2;\n encodingName = argv[1];\n try {\n java.nio.charset.Charset.forName(encodingName); // Side-effect: is encodingName valid? \n } catch (Exception e) {\n System.out.println(\"Invalid encoding '\" + encodingName + \"'\");\n return;\n }\n }\n for (int i = firstFilePos; i < argv.length; i++) {\n AnalizadorLexicoArchivo scanner = null;\n try {\n java.io.FileInputStream stream = new java.io.FileInputStream(argv[i]);\n java.io.Reader reader = new java.io.InputStreamReader(stream, encodingName);\n scanner = new AnalizadorLexicoArchivo(reader);\n while ( !scanner.zzAtEOF ) scanner.debug_next_token();\n }\n catch (java.io.FileNotFoundException e) {\n System.out.println(\"File not found : \\\"\"+argv[i]+\"\\\"\");\n }\n catch (java.io.IOException e) {\n System.out.println(\"IO error scanning file \\\"\"+argv[i]+\"\\\"\");\n System.out.println(e);\n }\n catch (Exception e) {\n System.out.println(\"Unexpected exception:\");\n e.printStackTrace();\n }\n }\n }\n }", "public RingFactoryTokenizer() {\n this(new BufferedReader(new InputStreamReader(System.in,Charset.forName(\"UTF8\"))));\n }", "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 }", "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 }", "@Override\n\tpublic void walk() {\n\t\tSystem.out.println(\"»êÃ¥ÀÌ Â¯ÀÌÁö! for sniff~~\");\n\t\t\n\t}", "public TemplexTokenMaker(java.io.InputStream in) {\r\n this(new java.io.InputStreamReader(in));\r\n }", "public abstract InputStream stdout();", "public AnalizadorLexico2(java.io.Reader in) {\n this.zzReader = in;\n }", "public static void main(final String[] args) throws IOException {\n\t\tBufferedReader in =\n\t\t\tnew BufferedReader(new InputStreamReader(System.in));\n\t\tPrintStream out = new PrintStream(System.out, true, DEFAULT_CHARSET);\n\n\t\tString line;\n\t\twhile ((line = in.readLine()) != null) {\n\t\t\tout.println(parse(load(line)));\n\t\t}\n\t}", "PTB2TextLexer(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "public static void main(String[] args) throws IOException {\n BufferedReader f = new BufferedReader(new InputStreamReader(System.in));\n PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));\n int N = Integer.parseInt(f.readLine());\n StringBuilder sb = new StringBuilder();\n for(int i = 0; i < N; i++) {\n sb.append(f.readLine());\n }\n StringBuilder res = new StringBuilder();\n while(sb.length() > 0) {\n char[] forward = sb.toString().toCharArray();\n char[] backward = new char[forward.length];\n for(int i = 0; i < forward.length; i++) {\n backward[i] = forward[forward.length-i-1];\n }\n String a = new String(forward);\n String b = new String(backward);\n if(a.compareTo(b) < 0) {\n res.append(sb.charAt(0));\n sb.deleteCharAt(0);\n } else {\n res.append(sb.charAt(sb.length()-1));\n sb.deleteCharAt(sb.length()-1);\n }\n }\n int idx = 0;\n while(idx < res.length()) {\n if(idx%80 == 0 && idx > 0) {\n out.println();\n }\n out.print(res.charAt(idx++));\n }\n out.println();\n f.close();\n out.close();\n }", "public void read() {\n try {\n pw = new PrintWriter(System.out, true);\n br = new BufferedReader(new InputStreamReader(System.in));\n input = br.readLine();\n while (input != null) {\n CM.processCommand(input, pw, true);\n input = br.readLine();\n }\n } catch (IOException ioe) {\n pw.println(\"ERROR: Problem with reading user input.\");\n } finally {\n try {\n br.close();\n } catch (IOException ioe) {\n pw.println(\"ERROR: Buffer DNE\");\n }\n }\n }", "public interface Decoder {\r\n \t \r\n\t// Main method that every decoder needs to overwrite \r\n\tpublic List<Hypothesis> extract_phase(int N);\r\n\r\n\t// Once a tree segment is matched with a pattern , what do we do with it ? \r\n\tpublic boolean processMatch(ParseTreeNode ptn, Integer patId,\r\n\t\t\tArrayList<ParseTreeNode> frontiers,\r\n\t\t\tArrayList<GrammarRule> targetStrings);\r\n\t\r\n\tpublic void addPhraseEntriesToForest(ArrayList<PhraseRule> targetList, ParseTreeNode frontier, boolean isRoot);\r\n\t// Add grammar rules to forest \r\n\tpublic boolean addToTargetForest(GrammarRule targetInfo, ArrayList<ParseTreeNode> frontiers, boolean isSrcRoot);\r\n\t// Add glue rules\r\n\tpublic void addGlueRulesToTargetForest(ParseTreeNode ptn);\r\n\t// Handle OOV - copy, delete, transliterate etc - Perhaps put in a different class later TODO\r\n\tpublic void handleOOV(ParseTreeNode ptn);\r\n\tpublic void addLexicalBackoff(LexicalRule backoff, ParseTreeNode ptn);\r\n}", "private static String loadConvert(String str) {\n\t\tint off = 0;\n\t\tint len = str.length();\n\t\tchar[] in = str.toCharArray();\n\t\tchar[] convtBuf = new char[1024];\n\t\tif (convtBuf.length < len) {\n\t\t\tint newLen = len * 2;\n\t\t\tif (newLen < 0) {\n\t\t\t\tnewLen = Integer.MAX_VALUE;\n\t\t\t}\n\t\t\tconvtBuf = new char[newLen];\n\t\t}\n\t\tchar aChar;\n\t\tchar[] out = convtBuf;\n\t\tint outLen = 0;\n\t\tint end = off + len;\n\n\t\twhile (off < end) {\n\t\t\taChar = in[off++];\n\t\t\tif (aChar == '\\\\') {\n\t\t\t\taChar = in[off++];\n\t\t\t\tif (aChar == 'u') {\n\t\t\t\t\t// Read the xxxx\n\t\t\t\t\tint value = 0;\n\t\t\t\t\tfor (int i = 0; i < 4; i++) {\n\t\t\t\t\t\taChar = in[off++];\n\t\t\t\t\t\tswitch (aChar) {\n\t\t\t\t\t\tcase '0':\n\t\t\t\t\t\tcase '1':\n\t\t\t\t\t\tcase '2':\n\t\t\t\t\t\tcase '3':\n\t\t\t\t\t\tcase '4':\n\t\t\t\t\t\tcase '5':\n\t\t\t\t\t\tcase '6':\n\t\t\t\t\t\tcase '7':\n\t\t\t\t\t\tcase '8':\n\t\t\t\t\t\tcase '9':\n\t\t\t\t\t\t\tvalue = (value << 4) + aChar - '0';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'a':\n\t\t\t\t\t\tcase 'b':\n\t\t\t\t\t\tcase 'c':\n\t\t\t\t\t\tcase 'd':\n\t\t\t\t\t\tcase 'e':\n\t\t\t\t\t\tcase 'f':\n\t\t\t\t\t\t\tvalue = (value << 4) + 10 + aChar - 'a';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'A':\n\t\t\t\t\t\tcase 'B':\n\t\t\t\t\t\tcase 'C':\n\t\t\t\t\t\tcase 'D':\n\t\t\t\t\t\tcase 'E':\n\t\t\t\t\t\tcase 'F':\n\t\t\t\t\t\t\tvalue = (value << 4) + 10 + aChar - 'A';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tthrow new IllegalArgumentException(\"Malformed \\\\uxxxx encoding.\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tout[outLen++] = (char) value;\n\t\t\t\t} else {\n\t\t\t\t\tif (aChar == 't')\n\t\t\t\t\t\taChar = '\\t';\n\t\t\t\t\telse if (aChar == 'r')\n\t\t\t\t\t\taChar = '\\r';\n\t\t\t\t\telse if (aChar == 'n')\n\t\t\t\t\t\taChar = '\\n';\n\t\t\t\t\telse if (aChar == 'f')\n\t\t\t\t\t\taChar = '\\f';\n\t\t\t\t\tout[outLen++] = aChar;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tout[outLen++] = aChar;\n\t\t\t}\n\t\t}\n\t\treturn new String(out, 0, outLen);\n\t}", "Lexico(java.io.Reader in) {\n this.zzReader = in;\n }", "@Override\n public void start() throws InvalidCommandException {\n String lua1 = \"\"\n + \"F='\" + target + \"' \"\n + \"file.remove(F) \"\n + \"file.open(F,'w+') \"\n + \"F=nil \"\n + \"uart.setup(0,\" + baud + \",8,0,1,0)\\n\";\n String lua2 = \"\"\n + \"rcv=function(b) \"\n + \" local s,e\"\n + \" s,e=string.find(b,'~~~esp~eof~~~',1,true)\"\n + \" if s==nil then\"\n + \" file.write(string.gsub(b,'\\\\r',''))\"\n + \" uart.write(0,'> ')\"\n + \" else\"\n + \" uart.on('data')\\n\";\n String lua3 = \"\"\n + \" file.write(string.sub(b,1,s-1))\"\n + \" file.close()\"\n + \" rcv=nil\"\n + \" uart.setup(0,\" + baud + \",8,0,1,\" + echo + \")\\n\";\n String lua4 = \"\"\n + \" print('\\\\r\\\\n--Done--\\\\r\\\\n> ')\"\n + \" collectgarbage()\"\n + \" end \"\n + \"end \"\n + \"uart.on('data','\\\\r',rcv,0)\\n\";\n\n sendBuffer.add(lua1.getBytes());\n sendBuffer.add(lua2.getBytes());\n sendBuffer.add(lua3.getBytes());\n sendBuffer.add(lua4.getBytes());\n File srcFile = new File(src);\n InputStream srcFileIs;\n try {\n srcFileIs = new BufferedInputStream(new FileInputStream(srcFile));\n } catch (FileNotFoundException ex) {\n throw new InvalidCommandException(\"Unable to open src: \" + src);\n }\n try {\n int read;\n while (-1 != (read = srcFileIs.read(fileReadBuffer, 0, fileReadBuffer.length - 1))) {\n fileReadBuffer[read] = '\\r';\n sendBuffer.add(Arrays.copyOfRange(fileReadBuffer, 0, read + 1));\n }\n sendBuffer.add(\"~~~esp~eof~~~\\r\".getBytes());\n } catch (IOException ex) {\n Util.close(srcFileIs);\n throw new InvalidCommandException(\"Failed to read file chunk\" + ex);\n }\n Util.close(srcFileIs);\n serialPort.pushEventListener(new SerialPortSink());\n sendIndex = 0;\n state = State.BUF_TRANSFER;\n sendNext();\n }", "TextDecoder getTextDecoder();", "public static void main(String[] args) {\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\t\n\t\t\tFile file = new File(\"char_data.txt\");\n\t\t\tScanner sc = new Scanner(file, \"UTF-8\");\n\t\t\tSystem.out.println(sc.delimiter());\n\t\t\t\n\t\t\tchar ch1 = sc.next().charAt(0);\n\t\t\tint int1 = sc.nextInt();\n\t\t\tString str1 = sc.next();\n\t\t\tString str2 = \"sound\\\\\" + sc.next() + \".mp3\";\n\t\t\tString str3 = sc.next();\n\t\t\t//while (sc.next() == \"\\t\") {}\n\t\t\tString str4 = sc.nextLine();\n\t\t\t//sc.nextLine();\n\t\t\tSystem.out.print(\"The character is: \" + ch1 + \" at position: \" + int1);\n\t\t\tSystem.out.println(\" with the pinyin: \" + str1);\n\t\t\tSystem.out.println(\"The sound is in file: \" + str2);\n\t\t\tSystem.out.println(\"The construction of the character is: \" + str3);\n\t\t\tSystem.out.println(\"The meaning of the character is: \" + str4);\n\t\t\t\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t\tch1 = sc.next().charAt(0);\n\t\t\tint1 = sc.nextInt();\n\t\t\tstr1 = sc.next();\n\t\t\tstr2 = \"sound\\\\\" + sc.next() + \".mp3\";\n\t\t\tstr3 = sc.next();\n\t\t\tstr4 = sc.nextLine();\n\t\t\tsc.nextLine();\n\t\t\tSystem.out.print(\"The character is: \" + ch1 + \" at position: \" + int1);\n\t\t\tSystem.out.println(\" with the pinyin: \" + str1);\n\t\t\tSystem.out.println(\"The sound is in file: \" + str2);\n\t\t\tSystem.out.println(\"The construction of the character is: \" + str3);\n\t\t\tSystem.out.println(\"The meaning of the character is: \" + str4);\n\t\t\t\n\t\t\t\n\t\t\tsc.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}", "Lexico(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "@Override\n\tprotected void processInput() {\n\t}", "public static void main(String[] args) throws IOException {\n Charset windows = Charset.forName(\"Windows-1251\");\n String sourceFile = args[0];\n String destFile = args[1];\n\n BufferedReader in = new BufferedReader(new FileReader(sourceFile));\n PrintWriter out = new PrintWriter(new FileWriter(destFile));\n\n ArrayList<String > source = new ArrayList<>();\n String line;\n while ((line = in.readLine()) != null){\n source.add(line);\n }\n ArrayList<String> decod = new ArrayList<>();\n\n for (String current: source){\n decod.add(new String(current.getBytes(windows)));\n }\n for(String item: decod){\n out.println(item);\n }\n in.close();\n out.close();\n }", "protected abstract boolean parse(Scanner input, int numShift);", "private void translator(File inputFile) throws IOException {\n Parser fileParser = new Parser(inputFile);\n CodeWriter writer = new CodeWriter(inputFile);\n String outputName = inputFile.getPath().replace(\".vm\", \".asm\");\n writer.setFileName(inputFile.getName().replace(\".vm\", \"\"));\n\n Path outputPath = Paths.get(outputName);\n PrintWriter out = new PrintWriter(Files.newBufferedWriter(outputPath));\n\n String line;\n while (fileParser.hasMoreCommends()) {\n line = fileParser.adanvce();\n fileParser.lineAnalizer(line); // updates parser fields\n int CommendType = fileParser.getCommendType();\n\n switch (CommendType) {\n case Parser.C_ARITHMETIC:\n writer.writeArithmetic(fileParser.getArg1());\n break;\n case Parser.C_PUSH:\n case Parser.C_POP:\n writer.writePushPop(CommendType, fileParser.getArg1(), fileParser.getArg2());\n break;\n }\n\n }\n fileParser.close();\n writer.close();\n }", "public static void main(String[] args) {\n TextFileGenerator textFileGenerator = new TextFileGenerator();\n HuffmanTree huffmanTree;\n Scanner keyboard = new Scanner(System.in);\n PrintWriter encodedOutputStream = null;\n PrintWriter decodedOutputStream = null;\n String url, originalString = \"\", encodedString, decodedString;\n boolean badURL = true;\n int originalBits, encodedBits, decodedBits;\n\n while(badURL) {\n System.out.println(\"Please enter a URL: \");\n url = keyboard.nextLine();\n\n try {\n originalString = textFileGenerator.makeCleanFile(url, \"original.txt\");\n badURL = false;\n }\n catch(IOException e) {\n System.out.println(\"Error: Please try again\");\n }\n }\n\n huffmanTree = new HuffmanTree(originalString);\n encodedString = huffmanTree.encode(originalString);\n decodedString = huffmanTree.decode(encodedString);\n // NOTE: TextFileGenerator.getNumChars() was not working for me. I copied the encoded text file (pure 0s and 1s)\n // into google docs and the character count is accurate with the String length and not the method\n originalBits = originalString.length() * 16;\n encodedBits = encodedString.length();\n decodedBits = decodedString.length() * 16;\n\n decodedString = fixPrintWriterNewLine(decodedString);\n\n try { // creating the encoded and decoded files\n encodedOutputStream = new PrintWriter(new FileOutputStream(\"src\\\\edu\\\\miracosta\\\\cs113\\\\encoded.txt\"));\n decodedOutputStream = new PrintWriter(new FileOutputStream(\"src\\\\edu\\\\miracosta\\\\cs113\\\\decoded.txt\"));\n encodedOutputStream.print(encodedString);\n decodedOutputStream.print(decodedString);\n }\n catch(IOException e) {\n System.out.println(\"Error: IOException!\");\n }\n\n encodedOutputStream.close();\n decodedOutputStream.close();\n\n System.out.println(\"Original file bit count: \" + originalBits);\n System.out.println(\"Encoded file bit count: \" + encodedBits);\n System.out.println(\"Decoded file bit count: \" + decodedBits);\n System.out.println(\"Compression ratio: \" + (double)originalBits/encodedBits);\n }", "static void in_to_acc(String passed) throws IOException{\n\t\tSystem.out.print(\"Input to port \"+hexa_to_deci(passed.substring(3))+\" : \");\n\t\tString enter = scan.readLine();\n\t\tregisters.put('A',enter);\n\t}", "public static void main (String[] args) {\n Scanner s = new Scanner(System.in);\r\n System.out.print(BinaryReversalMethod(s.nextLine()));\r\n s.close();\r\n }", "public Lexico(java.io.Reader in) {\n this.zzReader = in;\n }", "public Lexico(java.io.Reader in) {\n this.zzReader = in;\n }", "private static void incode_output(String[] input) throws IOException {\n int i = 0;\n while (i<input.length){\n //get the opcode and parameter modes\n String opcode_parameter = input[i];\n int opcode=0;\n int mode_1st_parameter = 0;\n int mode_2st_parameter = 0;\n int mode_3st_parameter = 0;\n if (opcode_parameter.length() !=1){\n opcode = Integer.parseInt(opcode_parameter.substring(opcode_parameter.length()-2));\n //have to check the length of the string before processing to avoid exceptions\n if (opcode_parameter.length() >=3){\n mode_1st_parameter = Integer.parseInt(opcode_parameter.substring(opcode_parameter.length()-3,opcode_parameter.length()-2));\n }\n if (opcode_parameter.length() >=4){\n mode_2st_parameter = Integer.parseInt(opcode_parameter.substring(opcode_parameter.length()-4,opcode_parameter.length()-3));\n }\n if (opcode_parameter.length() >=5){\n mode_3st_parameter = Integer.parseInt(opcode_parameter.substring(opcode_parameter.length()-5,opcode_parameter.length()-4));\n }\n }\n else {\n opcode = Integer.parseInt(opcode_parameter);\n\n }\n //if opcode is 99 the loop breaks and the processing is finished\n if(opcode == 99){\n break;\n }\n int value1=0;\n int value1_location =0 ;\n int value2=0;\n int value2_location =0 ;\n int return_location =0 ;\n int return_value=0;\n //getting the 1st value and the 2nd value according to the opcode and the modes\n if ((opcode >= 1 && opcode <= 2) || (opcode >= 5 && opcode <=8)){\n if (mode_1st_parameter == 0){\n value1_location = Integer.parseInt(input[i+1]);\n value1 = Integer.parseInt(input[value1_location]);\n }\n else{\n value1_location = i+1;\n value1 = Integer.parseInt(input[value1_location]);\n }\n }\n \n if ((opcode >=1 && opcode <=2)|| (opcode >= 5 && opcode <=8)){\n if (mode_2st_parameter == 0){\n value2_location = Integer.parseInt(input[i+2]);\n value2 = Integer.parseInt(input[value2_location]);\n }\n else{\n value2_location = i+2;\n value2 = Integer.parseInt(input[value2_location]);\n }\n }\n // calculating the result value according to the opcode\n if (opcode == 1){\n \n return_value = value1+value2;\n \n }\n else if (opcode == 2){\n return_value = value1*value2;\n\n }\n else if (opcode == 3){\n //opcode 3 requires the user to input a system ID according to the chcallenge\n print(\"opcode require input please enter the correct value\");\n BufferedReader reader =\n new BufferedReader(new InputStreamReader(System.in));\n String input_value = reader.readLine();\n // inserting the return value in the correct location according to the return location\n if (mode_1st_parameter == 0){\n return_location = Integer.parseInt(input[i+1]);\n input[return_location] = input_value;\n }\n else{\n return_location = i+1;\n input[return_location] = input_value;\n }\n\n }\n else if (opcode == 4){\n //mode 4 outputs the result of a certain test or the result of the full opcode\n if (mode_1st_parameter == 0){\n return_location = Integer.parseInt(input[i+1]);\n print(\"output: \"+ input[return_location]);\n }\n else{\n return_location = i+1;\n print(\"output: \"+ input[return_location]);\n }\n }\n //opcode 5 and 6 has the possibility to minpulate the loop counter \n //therefore it can skip the remaining code in the loop if the counter is minpulated\n else if (opcode == 5){\n if (value1 != 0 ){\n i = value2;\n continue;\n }\n }\n else if (opcode == 6){\n if (value1 ==0){\n i=value2;\n continue;\n }\n }\n else if (opcode == 7){\n if (value1 <value2){\n return_value=1;\n }\n else{\n return_value=0;\n }\n }\n else if (opcode == 8){\n if (value1==value2){\n return_value=1;\n }\n else{\n return_value=0;\n }\n }\n // inserting the return value according to the return location, opcode and mode of the parameter\n if ((opcode >=1 && opcode <=2)|| (opcode >=7 && opcode <=8)){\n if (mode_3st_parameter == 0){\n return_location = Integer.parseInt(input[i+3]);\n input[return_location] = String.valueOf(return_value);\n }\n else{\n return_location = i+3;\n input[return_location] = String.valueOf(return_value);\n }\n } \n //incrementing the loop counter according to the opcode\n if ((opcode >=1 && opcode <=2)|| (opcode >=7 && opcode <=8)){\n i = i+4;\n\n }\n else if (opcode == 5 || opcode == 6){\n i=i+3;\n }\n else{\n i=i+2;\n }\n }\n }", "public native static void convertMp3(String input, String mp3);", "int inputBit(){\n if (position == 0)\r\n try{\r\n buf = System.in.read();\r\n if (buf < 0){ return -1;\r\n }\r\n \r\n position = 0x80;\r\n }catch(IOException e){\r\n System.err.println(e);\r\n return -1;\r\n }\r\n int t = ((buf & position) == 0) ? 0 : 1;\r\n position >>= 1; \r\n return t;\r\n }", "InputStream getStdout();", "public void nonNetworkMde(){\n System.out.println(\"Please enter file path: \");\n Scanner scanner = new Scanner(System.in);\n String filePath = scanner.nextLine();\n\n List<String> stringFromFile = fileReader.readFile(filePath);\n fileCotextProcessor.consoleText(stringFromFile);\n }", "@Test(timeout = 4000)\n public void test001() throws Throwable {\n StringReader stringReader0 = new StringReader(\"~\\\"Py BTn?,~tnf\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 15, 15);\n javaCharStream0.bufpos = (-1396);\n javaCharStream0.backup((-1396));\n javaCharStream0.adjustBeginLineColumn((-1396), 76);\n assertEquals(0, javaCharStream0.bufpos);\n }", "public TaoTaiKhoan(QuanLyNganHang preFrame, BufferedReader input, PrintWriter output) {\n initComponents();\n this.preFrame = preFrame;\n this.input = input;\n this.output = output;\n }", "@Test(timeout = 4000)\n public void test002() throws Throwable {\n StringReader stringReader0 = new StringReader(\"%WC\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.backup(1);\n javaCharStream0.BeginToken();\n javaCharStream0.AdjustBuffSize();\n javaCharStream0.adjustBeginLineColumn(1, 1);\n assertEquals(0, javaCharStream0.bufpos);\n }", "public Cli (BufferedReader in,PrintWriter out , Controller thecontroller) {\r\n\t\tsuper(thecontroller);\r\n\t\tthis.in=in;\r\n\t\tthis.out=out;\r\n\t\tthis.commandsSet= controller.getCommandSet();\r\n\t}", "@Test(timeout = 4000)\n public void test061() throws Throwable {\n StringReader stringReader0 = new StringReader(\"anBz*^T>\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n char[] charArray0 = new char[4];\n stringReader0.read(charArray0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals(\"^\", token0.toString());\n }", "public static void main(String[] args) throws IOException{\n char c;\r\n do{\r\n c = (char)System.in.read();\r\n System.out.println(\"c: \"+c);\r\n }while(c!='.');\r\n //2 method: int read(byte data[]) & int read(byte data[],int min, int max)\r\n// byte data[] = new byte[10];// input char translated into byte numbers\r\n// System.out.println(\"nhap cac ki tu: \");\r\n// //System.in.read(data);\r\n// System.in.read(data,0,3);// read chars [0;3)\r\n// System.out.println(\"cac ki tu vua nhap\");\r\n// for(int i=0;i<data.length;i++)\r\n// System.out.println((char)data[i]);// empty positions filled with 0/empty space\r\n }", "private static void makeRaw() {\n String ttyName = \"/dev/tty\";\n int ofd = Util.getFd(FileDescriptor.out);\n\n CLibrary.LinuxTermios termios = new CLibrary.LinuxTermios();\n\n // check existing settings\n // If we don't do this tcssetattr() will return EINVAL.\n if (CLibrary.INSTANCE.tcgetattr(ofd, termios) == -1) {\n error(\"tcgetattr(\\\"\" + ttyName + \"\\\", <termios>) failed -- \" + strerror(Native.getLastError()));\n }\n\n // System.out.printf(\"tcgetattr() gives %s\\r\\n\", termios);\n\n // initialize values relevant for raw mode\n CLibrary.INSTANCE.cfmakeraw(termios);\n\n // System.out.printf(\"cfmakeraw() gives %s\\r\\n\", termios);\n\n // apply them\n if (CLibrary.INSTANCE.tcsetattr(ofd, CLibrary.INSTANCE.TCSANOW(), termios) == -1) {\n error(\"tcsetattr(\\\"\" + ttyName + \"\\\", TCSANOW, <termios>) failed -- \" + strerror(Native.getLastError()));\n }\n }", "void expr() throws IOException {\n\t\tinput = input+(char)lookahead;\n\t\tterm();\n\t\trest();\n\t\tprintPostfix();\n\t}", "public static void execute(String program, InputStream input, OutputStream output, OutputStream debug) throws IOException {\n\t\tInputStream codeStream = new ByteArrayInputStream(program.getBytes());\n\t\tCharStream codeInputStream = CharStreams.fromStream(codeStream);\n\t\tBrainfuckLexer lexer = new BrainfuckLexer(codeInputStream);\n\t\tCommonTokenStream tokens = new CommonTokenStream(lexer);\n\t\tBrainfuckParser parser = new BrainfuckParser(tokens);\n\t\tparser.setFile(null);\n\t\tProgram ast = parser.program().prog;\n\t\texecute(ast, input, output, null);\n\t}" ]
[ "0.5263798", "0.5224668", "0.51412493", "0.510081", "0.50760543", "0.50588584", "0.49877933", "0.49593645", "0.4915054", "0.49089956", "0.489734", "0.48874304", "0.48637602", "0.481302", "0.47896224", "0.47425652", "0.4729254", "0.47257555", "0.47143877", "0.47102153", "0.4700647", "0.46902296", "0.46629858", "0.46602765", "0.46581933", "0.46344292", "0.46263367", "0.4618639", "0.45905644", "0.45882568", "0.45847446", "0.4582261", "0.4582226", "0.4578428", "0.45780927", "0.45774013", "0.4569333", "0.45469505", "0.4531028", "0.45279437", "0.45212132", "0.45195782", "0.45080477", "0.4504789", "0.45013052", "0.44913024", "0.44872487", "0.447286", "0.44674695", "0.44658428", "0.4459333", "0.4451387", "0.4449398", "0.44466057", "0.44464612", "0.44420806", "0.44332", "0.4423455", "0.44151157", "0.44044453", "0.44012934", "0.43940347", "0.43899965", "0.43899217", "0.43888408", "0.4383293", "0.43813616", "0.43795025", "0.4375657", "0.43618757", "0.43590873", "0.43534654", "0.4352207", "0.43520328", "0.4338357", "0.43297845", "0.4328446", "0.43284088", "0.4323566", "0.43204895", "0.43196648", "0.43171504", "0.43165472", "0.43123034", "0.43116584", "0.43116584", "0.4309039", "0.43073466", "0.4305769", "0.43055883", "0.4305013", "0.43033132", "0.42952368", "0.42933762", "0.42850378", "0.42827994", "0.42780215", "0.42773128", "0.4276986", "0.42766625" ]
0.5071096
5
if args[0] is '', apply movetofront encoding if args[0] is '+', apply movetofront decoding
public static void main(String[] args) { String operation = args[0]; switch (operation) { case "+": // decode decode(); break; case "-": // encode encode(); break; default: // invalid command-line argument StdOut.println("Invalid command line argument: " + operation); break; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args)\n {\n String c = args[0];\n if(c.equals(\"-\"))\n encode();\n else if(c.equals(\"+\"))\n decode();\n \n }", "public static void main (String[] args) {\n if (args[0].equals(\"-\"))\n encode();\n if (args[0].equals(\"+\"))\n decode();\n }", "public static void main(String[] args) {\n if (args[0].equals(\"-\")) encode();\n else if (args[0].equals(\"+\")) decode();\n else throw new IllegalArgumentException(\"Command line argument error !!!\");\n }", "private static String pmaQ(String arg) {\n\t\tif (arg == null) {\n\t\t\treturn \"\";\n\t\t} else {\n\t\t\ttry {\n\t\t\t\treturn URLEncoder.encode(arg, \"UTF-8\").replace(\"+\", \"%20\");\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.print(e.getMessage());\n\t\t\t\treturn \"\";\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args)\n {\n switch (args[0]) {\n case \"-\":\n encode();\n break;\n case \"+\":\n decode();\n break;\n default:\n System.out.println(\"Invalid arguments, needs to be a '-' or '+'\");\n break;\n }\n }", "public static void main(String[] args) {\n if (args[0].equals(\"-\")) {\n transform();\n }\n else if (args[0].equals(\"+\")) {\n inverseTransform();\n }\n }", "public static void main(String[] args) {\n if (args[0].equals(\"-\")) transform();\n else if (args[0].equals(\"+\")) inverseTransform();\n else throw new IllegalArgumentException(\"Illegal Argument!\");\n }", "public static void main(String[] args) {\n\t\t\n\t\t\n\t\tStringUtils.removeInvalidCharacteres(\"alzheimer\\\\\");\n\t}", "private StringBuilder octConversion(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\tint val = Integer.parseInt(currentVal,8);\n\t\t\t\t\n\t\t\t\tfinalres.append(val + Character.toString(tempVal));\n\t\t\t}\n\t\t}\n\t\t\n\t\t// converting the last currentVal\n\t\t\n\t\tint val = Integer.parseInt(currentVal,8);\n\t\t\n\t\tfinalres.append(val);\n\t\t\n\t\treturn finalres;\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(\"20162891 ¹Ú¼º¹Î\");\r\n\t\tSystem.out.println(\"hotfix + \");\r\n\t}", "public static void main(String[] args)\r\n {\r\n \t\r\n \tif (args[0].equals(\"-\"))\r\n \t\ttransform();\r\n \tif (args[0].equals(\"+\"))\r\n \t\tinverseTransform();\r\n\r\n\r\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n int t=0;\n String s=e.getActionCommand();\n if(s.equals(\"+\")||s.equals(\"-\")||s.equals(\"*\")||s.equals(\"/\")) {\n input+=\" \"+s+\" \"; //如果碰到运算符,就在运算符前后分别加一个空格,\n //为后面的分解字符串做准备\n\n }else if(s.equals(\"清零\")) {\n input=\"\";\n }else if(s.equals(\"退格\")) {\n if((input.charAt(input.length()-1))==' ') { //检测字符串的最后一个字符是否为空格,\n input=input.substring(0,input.length()-3);//如果是则删除末尾3个字符,否则删除\n //1个字符\n }else {\n input=input.substring(0,input.length()-1);\n }\n }\n else if(s.equals(\"=\")) {\n input=compute(input);\n jt.setText(input);\n input=\"\";\n t=1;\n }\n else\n input += s;\n if(t==0) {\n jt.setText(input);\n }\n }", "private void prepareInput() {\n\t\tif(input.charAt(0) == '-') input = \"0\" + input;\n\t\tfor(int i = 0; i < input.length() - 1; i++) {\n\t\t\tif(input.charAt(i) == '(' && input.charAt(i+1) == '-') input = input.substring(0, i+1) + \"0\" + input.substring(i+1); \n\t\t}\n\t}", "public static void main(String[] args) {\n System.out.println(transform(\"\"));\n System.out.println(transform(\"I cän ©onv&#235;&reg;t - things &#038; stuff: ½. &#x00AE;\"));\n }", "public static void main(String[] args) {\n System.out.println(\"din => \"+encode(\"din\"));\n System.out.println(\"recede => \"+encode(\"recede\"));\n System.out.println(\"Success => \"+encode(\"Success\"));\n System.out.println(\"(( @ => \"+encode(\"(( @\"));\n }", "public static Object unescape(Context cx, Scriptable thisObj,\n Object[] args, Function funObj)\n {\n \tif (args.length < 1)\n args = ScriptRuntime.padArguments(args, 1);\n \n \tString s = ScriptRuntime.toString(args[0]);\n \tStringBuffer R = new StringBuffer();\n \tstringIter: for (int k = 0; k < s.length(); k++) {\n \t char c = s.charAt(k);\n \t if (c != '%' || k == s.length() -1) {\n \t\tR.append(c);\n \t\tcontinue;\n \t }\n \t String hex;\n \t int end, start;\n \t if (s.charAt(k+1) == 'u') {\n \t\tstart = k+2;\n \t\tend = k+6;\n \t } else {\n \t\tstart = k+1;\n \t\tend = k+3;\n \t }\n \t if (end > s.length()) {\n \t\tR.append('%');\n \t\tcontinue;\n \t }\n \t hex = s.substring(start, end);\n \t for (int i = 0; i < hex.length(); i++)\n \t\tif (!TokenStream.isXDigit(hex.charAt(i))) {\n \t\t R.append('%');\n \t\t continue stringIter;\n \t\t}\n \t k = end - 1;\n \t R.append((new Character((char) Integer.valueOf(hex, 16).intValue())));\n \t}\n \n \treturn R.toString();\n }", "private char processChar(char r11) {\n /*\n // Method dump skipped, instructions count: 152\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.adobe.xmp.impl.FixASCIIControlsReader.processChar(char):char\");\n }", "public static void main(String[] args) {\n\n\t\t\n\t\tfinal char b = (char) (126+12);\n\t\t//es una variable de tipo comnstante la cual no acepta cambios \n\t\tfinal String str1 = \"hola\";\n\t\tfinal String str2 = \"mundo\";\n\t\t\n\t\tSystem.out.println(\"holamundo\"==(str1+str2));\n\t\tSystem.out.println(b);\n\t}", "public String JSONTokener(String in) {\n if (in != null && in.startsWith(\"\\ufeff\")) {\n in = in.substring(1);\n }\n return in;\n }", "static boolean isOperator(char c) {\n return \"+\\u2212\\u00d7\\u00f7/*\".indexOf(c) != -1;\n }", "public static void main(String[] args) {\n if (args[0].equals(\"-\")) transform();\n else if (args[0].equals(\"+\")) inverseTransform();\n else throw new IllegalArgumentException(\"Illegal command line argument\");\n }", "public static void main(String[] args) {\n char myChar = '\\u00A9';\n\n System.out.println(myChar);\n\n boolean myBoolean = true;\n\n System.out.println(myBoolean);\n\n char jrfReg = '\\u00AE';\n\n System.out.println(jrfReg);\n\n }", "private void encodeFromCharSequence(@NonNull Appendable dst, @NonNull CharSequence text, boolean preserveSlash) throws IOException {\n\n for (int i = 0, length = text.length(); i < length; i++) {\n char c = text.charAt(i);\n if (OK_CHARS.get(c) || (preserveSlash && c == '/')) {\n dst.append(c);\n } else if (c == ' ') {\n dst.append('+');\n } else {\n if (c < 0x80) {\n Hexadecimal.encode(dst.append('%'), (byte) c);\n } else if (c < 0x800) {\n Hexadecimal.encode(dst.append('%'), (byte) (0xC0 | (c >> 6)));\n Hexadecimal.encode(dst.append('%'), (byte) (0x80 | (c & 0x3F)));\n } else if (StringUtil.isSurrogate(c)) {\n if (Character.isHighSurrogate(c) && ++i < length) {\n char c2 = text.charAt(i);\n if (Character.isLowSurrogate(c2)) {\n int codePoint = Character.toCodePoint(c, c2);\n Hexadecimal.encode(dst.append('%'), (byte) (0xF0 | (codePoint >> 18)));\n Hexadecimal.encode(dst.append('%'), (byte) (0x80 | ((codePoint >> 12) & 0x3F)));\n Hexadecimal.encode(dst.append('%'), (byte) (0x80 | ((codePoint >> 6) & 0x3F)));\n Hexadecimal.encode(dst.append('%'), (byte) (0x80 | (codePoint & 0x3F)));\n } else {\n Hexadecimal.encode(dst.append('%'), (byte) '?');\n i--;\n }\n } else {\n Hexadecimal.encode(dst.append('%'), (byte) '?');\n }\n }\n }\n }\n }", "public static void processMove(String move, char color) {\n if (!Character.isLetter(move.charAt(0))) {\n return;\n }\n\n char lastChar = move.charAt(move.length() - 1);\n\n while (lastChar == '+' || lastChar == '#'\n || lastChar == '!' || lastChar == '?') {\n move = move.substring(0, move.length() - 1);\n\n lastChar = move.charAt(move.length() - 1);\n }\n\n // Castling\n if (move.equals(\"O-O\")) {\n castleKingSide(color);\n\n return;\n } else if (move.equals(\"O-O-O\")) {\n castleQueenSide(color);\n\n return;\n }\n\n char piece = Character.isUpperCase(move.charAt(0)) ? move.charAt(0)\n : 'P';\n\n int promoteIndex = move.indexOf('=');\n boolean promote = promoteIndex != -1;\n\n int xIndex = move.indexOf('x');\n boolean capture = xIndex != -1;\n\n if (piece != 'P') {\n move = move.substring(1, move.length());\n }\n\n String promotion = promote\n ? Character.toString(move.charAt(promoteIndex + 1))\n + Character.toString(color)\n : null;\n\n if (promote) {\n move = move.substring(0, promoteIndex);\n }\n\n if (capture) {\n move = move.replace(\"x\", \"\");\n }\n\n int endFile = move.charAt(move.length() - 2) - 97;\n int endRank = move.charAt(move.length() - 1) - 49;\n\n move = move.substring(0, move.length() - 2);\n\n int startFile = -1;\n int startRank = -1;\n\n if (!move.equals(\"\")) {\n for (int i = 0; i < move.length(); i++) {\n char c = move.charAt(i);\n\n if (Character.isLetter(c)) {\n startFile = c - 97;\n } else {\n startRank = c - 49;\n }\n }\n\n move = \"\";\n }\n\n String piecePlusColor =\n Character.toString(piece) + Character.toString(color);\n\n String endPiece = promote ? promotion : piecePlusColor;\n\n int[] startPos = getStartPosition(piece, color, startFile,\n startRank, endFile, endRank,\n capture);\n\n move(endPiece, startPos[0], startPos[1], endFile, endRank);\n }", "public void processCommand(Object\tsource,\n\t\t\t\t\t\t\t String\tcommandOriginal,\n\t\t\t\t\t\t\t String\tp1,\n\t\t\t\t\t\t\t String\tp2,\n\t\t\t\t\t\t\t String\tp3,\n\t\t\t\t\t\t\t String\tp4,\n\t\t\t\t\t\t\t String\tp5,\n\t\t\t\t\t\t\t String\tp6,\n\t\t\t\t\t\t\t String\tp7,\n\t\t\t\t\t\t\t String\tp8,\n\t\t\t\t\t\t\t String\tp9,\n\t\t\t\t\t\t\t String\tp10)\n\t{\n\t\tXml xml;\n\t\tString command = commandOriginal.trim().toLowerCase();\n\t\tif (command.isEmpty())\n\t\t\treturn;\t// Nothing to do\n\n//////////\n// Quit\n\t\tif (command.equals(\"quit\")) {\n\t\t\t// Exiting the system\n\t\t\tSystem.exit(0);\n\n\n//////////\n// Back\n\t\t} else if (command.equals(\"back\")) {\n\t\t\t// Navigating back through chain\n\t\t\tm_opbm.navigateBack();\n\t\t\t// Note: For rawedits and edits, use the rawedit_* and edit_* commands below\n\n\n//////////\n// Home\n\t\t} else if (command.equals(\"home\")) {\n\t\t\t// Navigating back through chain\n\t\t\tm_opbm.navigateHome();\n\n\n//////////\n// LeftPanel\n\t\t} else if (command.equals(\"leftpanel\")) {\n\t\t\t// Navigating to a leftpanel\n\t\t\tm_opbm.navigateToLeftPanel(m_opbm.expandMacros(p1));\n\n\n//////////\n// Raw Edit related\n\t\t} else if (command.equals(\"rawedit\")) {\n\t\t\t// Raw editing (full-page edit box) of whatever file is specified\n\t\t\tm_opbm.rawedit(m_opbm.expandMacros(p1));\n\n\t\t} else if (command.equals(\"rawedit_save\")) {\n\t\t\t// Saving the current contents of the active rawedit\n\t\t\tm_opbm.rawEditSave();\n\n\t\t} else if (command.equals(\"rawedit_save_and_close\")) {\n\t\t\t// Saving the current contents of the active rawedit, and returning to the previous panel\n\t\t\tm_opbm.rawEditSaveAndClose();\n\t\t\tm_opbm.navigateBack();\n\n\t\t} else if (command.equals(\"rawedit_close\") || command.equals(\"rawedit_back\")) {\n\t\t\t// Saving the current contents of the active rawedit, and returning to the previous panel\n\t\t\tm_opbm.rawEditClose();\n\t\t\tm_opbm.navigateBack();\n\n\t\t} else if (command.equals(\"rawedit_home\")) {\n\t\t\t// Navigating back through chain\n\t\t\tm_opbm.rawEditClose();\n\t\t\tm_opbm.navigateHome();\n\n\n//////////\n// Edit related\n\t\t} else if (command.equals(\"edit\")) {\n\t\t\t// Raw editing (full-page edit box) of whatever file is specified\n\t\t\tm_opbm.edit(m_opbm.expandMacros(p1));\n\n\t\t} else if (command.equals(\"edit_save\")) {\n\t\t\t// Saving the current contents of the active rawedit\n\t\t\tm_opbm.editSave();\n\n\t\t} else if (command.equals(\"edit_save_and_close\")) {\n\t\t\t// Saving the current contents of the active rawedit, and returning to the previous panel\n\t\t\tm_opbm.editSave();\n\t\t\tm_opbm.editClose();\n\t\t\tm_opbm.navigateBack();\n\n\t\t} else if (command.equals(\"edit_close\") || command.equals(\"edit_back\")) {\n\t\t\t// Saving the current contents of the active rawedit, and returning to the previous panel\n\t\t\tm_opbm.editClose();\n\t\t\tm_opbm.navigateBack();\n\n\t\t} else if (command.equals(\"edit_home\")) {\n\t\t\t// Navigating back through chain\n\t\t\tm_opbm.editClose();\n\t\t\tm_opbm.navigateHome();\n\n\n//////////\n// LISTBOX BUTTONS\n\t\t} else if (command.equals(\"listbox_add\")) {\n\t\t\t// User clicked on the \"add\" listbox button on the flow control input\n\t\t\tm_opbm.listBoxAddCommand();\n\n\t\t} else if (command.equals(\"listbox_delete\")) {\n\t\t\t// User clicked on the \"delete\" listbox button on the flow control input\n\t\t\tm_opbm.listBoxDeleteCommand();\n\n\t\t} else if (command.equals(\"listbox_clone\")) {\n\t\t\t// User clicked on the \"clone\" listbox button on the flow control input\n\t\t\tm_opbm.listBoxCloneCommand();\n\n\t\t} else if (command.equals(\"listbox_move_up\")) {\n\t\t\t// User clicked on the \"Up\" listbox button\n\t\t\tm_opbm.listBoxCommand(\"up\", (PanelRightListbox)source);\n\n\t\t} else if (command.equals(\"listbox_move_down\")) {\n\t\t\t// User clicked on the \"Down\" listbox button\n\t\t\tm_opbm.listBoxCommand(\"down\", (PanelRightListbox)source);\n\n\n//////////\n// LOOKUPBOX BUTTONS\n\t\t} else if (command.equals(\"lookupbox_add\")) {\n\t\t\t// User clicked on the \"add\" listbox button on the flow control input\n\t\t\t// p1 = whereTo\n\t\t\t// p2 = after\n\t\t\t// p3 = whereFrom\n\t\t\t// p4 = allow customs?\n\t\t\tm_opbm.lookupboxAddCommand((PanelRightLookupbox)source, p1, p2, p3, Utils.interpretBooleanAsYesNo(p4, true).equalsIgnoreCase(\"yes\"));\n\n\t\t} else if (command.equals(\"lookupbox_subtract\")) {\n\t\t\t// User clicked on the \"subtract\" listbox button\n\t\t\tm_opbm.lookupboxCommand(\"subtract\", (PanelRightLookupbox)source);\n\n\t\t} else if (command.equals(\"lookupbox_move_up\")) {\n\t\t\t// User clicked on the \"Up\" listbox button\n\t\t\tm_opbm.lookupboxCommand(\"up\", (PanelRightLookupbox)source);\n\n\t\t} else if (command.equals(\"lookupbox_move_down\")) {\n\t\t\t// User clicked on the \"Down\" listbox button\n\t\t\tm_opbm.lookupboxCommand(\"down\", (PanelRightLookupbox)source);\n\n\t\t} else if (command.equals(\"lookupbox_zoom\")) {\n\t\t\t// User clicked on the \"zoom\" listbox button\n\t\t\t// p1 = name of edit to use for display\n\t\t\t// p2 = reference in \"zoom\" field in edit to only show those fields which contain that portion\n\t\t\t// p3 = override for data source (if present)\n\t\t\tp3 = \"\";\n\t\t\tif (p1.equalsIgnoreCase(\"relativeto\"))\n\t\t\t{\n\t\t\t\t// The name isn't a hard-coded name, because it is one of a list.\n\t\t\t\t// We have to find out which name belongs here based on whatever\n\t\t\t\t// one of the list is currently selected.\n\t\t\t\txml = m_opbm.getListboxOrLookupboxSelectedItem((PanelRightLookupbox)source);\n\t\t\t\tif (xml == null)\n\t\t\t\t{ // Cannot execut the command because nothing is selected, or there is no data\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tp1 = m_macroMaster.parseMacros(((PanelRightLookupbox)source).getEditForXml(xml.getName()));\n\t\t\t\tif (p1.contains(\":\"))\n\t\t\t\t{\n\t\t\t\t\t// We have to separate out the edit from the location where the data source is specified\n\t\t\t\t\tp3 = p1.substring(p1.indexOf(\":\") + 1);\n\t\t\t\t\tp1 = p1.substring(0, p1.indexOf(\":\"));\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tp1 = m_macroMaster.parseMacros(p1);\n\n\t\t\t}\n\n\t\t\tif (!p1.isEmpty()) {\n\t\t\t\tm_opbm.lookupboxZoomCommand((PanelRightLookupbox)source, p1, p2, p3);\n\n\t\t\t} else {\n\t\t\t\t// An error, we need an edit to display content\n\t\t\t\tif (p2.isEmpty())\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"No p1 or edits parameter was found for lookupbox_zoom \\\"\" + ((PanelRightLookupbox)source).getName() + \"\\\"\");\n\t\t\t\telse\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"No p1 or edits was found for lookupbox_zoom(\" + p2 +\") \\\"\" + ((PanelRightLookupbox)source).getName() + \"\\\"\");\n\t\t\t}\n\n\t\t} else if (command.equals(\"save_custom\")) {\n\t\t\t// User clicked on the \"zoom\" listbox button on the flow control input\n\t\t\t// p1 = uuid of tupel containing everything to update\n\t\t\tm_opbm.saveCustomCommand(p1);\n\n\t\t} else if (command.equals(\"cancel_custom\")) {\n\t\t\t// User clicked on the \"zoom\" listbox button on the flow control input\n\t\t\t// p1 = uuid of tupel containing everything to update\n\t\t\tm_opbm.cancelCustomCommand(p1);\n\n\n//////////\n// LOOKUPBOX UPDATE\n\t\t} else if (command.equals(\"lookupbox_update\")) {\n\t\t\t// User clicked on a listbox that's related to a lookupbox that needs\n\t\t\t// to have its information updated after the change in entry\n\t\t\tm_opbm.lookupboxUpdateCommand(p1);\n\n\n//////////\n// WEB_BROWSER\n\t\t} else if (command.equals(\"web_browser\")) {\n\t\t\t// Wants to link to the specified web browser address\n\t\t\tm_opbm.webBrowser(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10);\n\n//////////\n// BENCHMARKS\n\t\t} else if (command.equals(\"run_atom_benchmark\")) {\n\t\t\tm_opbm.benchmarkRunAtom(null, 1, true, (PanelRightItem)source, m_opbm, m_macroMaster, m_settingsMaster, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10);\n\n//////////\n// RESULTS VIEWER\n\t\t} else if (command.equals(\"run_results_viewer_sample\")) {\n\t\t\tm_opbm.createAndShowResultsViewer(\"results_sample.xml\");\n\t\t} else if (command.equals(\"run_results_viewer\")) {\n\t\t\tm_opbm.createAndShowResultsViewer(\"output.xml\");\n\n\n//////////\n// CLOSING BRACE\n\t\t}\n\n\n\t}", "@Override\n \tpublic void characters(final char inbuf[], final int offset, final int len)\n \t\t\tthrows SAXException {\n \t\tif (curAtom != null || !isParsing(eIsParsing.NONE)) {\n \t\t\tfinal String tmpString = new String(inbuf, offset, len);\n \t\t\tbuf += tmpString;\n \t\t}\n \t}", "public static void main(String[] args) throws UnsupportedEncodingException {\n\r\n\t}", "public static void main (String[] args){\n\n String str = \"qwwwwwwwwweeeeerrtyyyyyqqqqwEErTTT\";\n String rts = \"q9w5e2rt5y4qw2Er3T\";\n System.out.println(encode(str));\n System.out.print(decode(rts));\n\n }", "private static String escape(String arg) {\n int max;\n StringBuilder result;\n char c;\n\n max = arg.length();\n result = new StringBuilder(max);\n for (int i = 0; i < max; i++) {\n c = arg.charAt(i);\n switch (c) {\n case '\\'':\n case '\"':\n case ' ':\n case '\\t':\n case '&':\n case '|':\n case '(':\n case ')':\n case '\\n':\n result.append('\\\\');\n result.append(c);\n break;\n default:\n result.append(c);\n break;\n }\n }\n return result.toString();\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(\"\" +ToUtf8Util.toHexString(\"大连\"));\n\t\ttry {\n\t\t\tSystem.out.println(\"\" + URLEncoder.encode(\"大连\",\"utf-8\"));\n\t\t} catch (UnsupportedEncodingException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public static void main(String[] args) {\n System.out.println(\"你是个傻逼\");\n System.out.println(\"1\" + \"2\");\n System.out.println(\"hah\");\n System.out.println(\"hl;l\");\n System.out.println(\"hhas\");\n }", "private static java.lang.String m25224a(java.lang.String r7, java.lang.String r8) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r0 = \"\";\n r1 = \"\\\\?\";\n r7 = r7.split(r1);\n r1 = r7.length;\n r2 = 1;\n if (r1 <= r2) goto L_0x0033;\n L_0x000c:\n r7 = r7[r2];\n r1 = \"&\";\n r7 = r7.split(r1);\n r1 = r7.length;\n r3 = 0;\n r4 = r0;\n r0 = 0;\n L_0x0018:\n if (r0 >= r1) goto L_0x0032;\n L_0x001a:\n r5 = r7[r0];\n r6 = \"=\";\n r5 = r5.split(r6);\n r6 = r5.length;\n if (r6 <= r2) goto L_0x002f;\n L_0x0025:\n r6 = r5[r3];\n r6 = r6.equals(r8);\n if (r6 == 0) goto L_0x002f;\n L_0x002d:\n r4 = r5[r2];\n L_0x002f:\n r0 = r0 + 1;\n goto L_0x0018;\n L_0x0032:\n r0 = r4;\n L_0x0033:\n r7 = \"UTF-8\";\t Catch:{ Exception -> 0x003a }\n r7 = java.net.URLDecoder.decode(r0, r7);\t Catch:{ Exception -> 0x003a }\n goto L_0x003b;\n L_0x003a:\n r7 = r0;\n L_0x003b:\n return r7;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.leanplum.messagetemplates.BaseMessageDialog.a(java.lang.String, java.lang.String):java.lang.String\");\n }", "@Override\n public String encodeURL(String arg0) {\n return null;\n }", "@Override\n\tpublic void execute(String prefix, String[] args) {\n\t\tif (prefix.equals(\"COMMAND\")) {\n\t\t\tif (args.length >= 2) {\n\t\t\t\tString message = args[1].replace(\"%40\", \"@\");\n\t\t\t\tprintToTab(\"chat\", \"≫ \" + message); //TODO: Replace with the >> character.\n\t\t\t}\n\t\t}\n\t}", "public String startOz(String str) {\n String result = \"\";\n \n if (str.length() >= 1 && str.charAt(0)=='o') {\n result = result + str.charAt(0);\n }\n \n if (str.length() >= 2 && str.charAt(1)=='z') {\n result = result + str.charAt(1);\n }\n \n return result;\n}", "public static String encode(String argStr) {\r\n\t\tString result = argStr;\r\n\t\ttry {\r\n\t\t\tif (result != null && !result.isEmpty()) {\r\n\t\t\t\tresult = URLDecoder.decode(result, UTF_8);\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\t// ignore\r\n\t\t}\r\n\t\tresult = encodeExplicit(result);\r\n\t\treturn result;\r\n\t}", "void mo9700a(String str, boolean z);", "protected String canonicalizeLabel(String label) {\r\n\t\tif (label.indexOf('&') < 0) {\r\n\t\t\treturn label;\r\n\t\t}\r\n\r\n\t\treturn label.replaceAll(\"&\", \"&&\"); //$NON-NLS-1$//$NON-NLS-2$\r\n\t}", "public static void main(String[] args) {\n\t\tArgsProcessor ap = new ArgsProcessor(args);\n\t\tString file = ap.nextString(\"Paste in directory to convert slashes\");\n\t\tSystem.out.println(convertSlashes(file));\n\n\t}", "public static void main(String[] args) {\n\t\tString str = \"\";\n\t\t\n\t\tScanner input = new Scanner(System.in);\n\t\n\t\tSystem.out.println(\"Enter a string \");\n\t\tstr = input.next();\n\t\tbackwardChars(str);\n\t\tinput.close();\n\t\t\t\n\t}", "public static void main(String[] args) {\n String urlStr = URLEncoder.encode(\"疯狂动物城\");\n System.out.println(urlStr);\n String decoder = URLDecoder.decode(urlStr);\n System.out.println(decoder);\n }", "private String convertSymbol(String sym)\t{\n\t\tif (sym.charAt(0) == '\\'' || sym.charAt(0) == '\"')\t{\n\t\t\tString s = sym.substring(1, sym.length() - 1);\n\t\t\tif (s.length() <= 0)\n\t\t\t\tthrow new IllegalArgumentException(\"Empty character or string definition: \"+sym);\n\n\t\t\tStringBuffer sb = new StringBuffer(s.length());\t// convert escape sequences to their real meaning\n\t\t\tfor (int i = 0; i < s.length(); i++)\t{\n\t\t\t\tchar c = s.charAt(i);\n\t\t\t\tif (c == '\\\\')\t{\n\t\t\t\t\tchar c1 = s.length() > i + 1 ? s.charAt(i + 1) : 0;\n\t\t\t\t\tswitch (c1)\t{\n\t\t\t\t\t\tcase 'n': sb.append('\\n'); i++; break;\n\t\t\t\t\t\tcase 'r': sb.append('\\r'); i++; break;\n\t\t\t\t\t\tcase 't': sb.append('\\t'); i++; break;\n\t\t\t\t\t\tcase 'f': sb.append('\\f'); i++; break;\n\t\t\t\t\t\tcase 'b': sb.append('\\b'); i++; break;\n\t\t\t\t\t\tcase '\\'': sb.append('\\''); i++; break;\n\t\t\t\t\t\tcase '\"': sb.append('\"'); i++; break;\n\t\t\t\t\t\tcase '\\\\': sb.append('\\\\'); i++; break;\n\t\t\t\t\t\tdefault: sb.append(c); break;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\t{\n\t\t\t\t\tsb.append(c);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn sb.toString();\n\t\t}\n\t\telse\t{\t// must be starting with digit or be a nonterminal\n\t\t\tchar c;\n\t\t\tif (sym.startsWith(\"0x\") || sym.startsWith(\"0X\"))\t// hexadecimal number\n\t\t\t\tc = (char) Integer.valueOf(sym.substring(2), 16).intValue();\n\t\t\telse\n\t\t\tif (sym.startsWith(\"0\"))\t// octal number\n\t\t\t\tc = (char) Integer.valueOf(sym.substring(1), 8).intValue();\n\t\t\telse\n\t\t\tif (Character.isDigit(sym.charAt(0)))\n\t\t\t\tc = (char) Integer.valueOf(sym).intValue();\t// will throw NumberFormatException when not number\n\t\t\telse\n\t\t\t\treturn sym;\t// is a nonterminal\n\t\t\t\n\t\t\treturn new String(new char [] { c });\n\t\t}\n\t}", "@org.junit.Test\n public void encodeDecode()\n {\n String test = \"just some \\t\\ftes\\rt\\u001B for decoding\\t and...\\n\";\n\n assertEquals(\"encode/decode\", test,\n Encodings.decodeEscapes(Encodings.encodeEscapes(test)));\n assertEquals(\"encode/decode\", \"\",\n Encodings.decodeEscapes(Encodings.encodeEscapes(null)));\n }", "public static void main(String[] args) {\r\n \tif (args.length > 0) {\r\n \t\tString operator = args[0];\r\n \t\tif (operator.equals(\"-\")) {\r\n \t\t\ttransform();\r\n \t\t} else if (operator.equals(\"+\")) {\r\n \t\t\tinverseTransform();\r\n \t\t} else {\r\n \t\t\tthrow new IllegalArgumentException();\r\n \t\t}\r\n \t}\r\n }", "private static String determineOperation(String[] args)\n {\n for (String arg : args) {\n if (!arg.startsWith(\"-\")) { //$NON-NLS-1$\n return arg;\n }\n }\n return null;\n }", "abstract char[] parseFlags(String rawFlags);", "public static void main(String[] args) {\n\t\tString st1= \"jdk\" + 6.0;\n\t\tString st2 = st1 + \" Ư¡\";\n\t\tSystem.out.println(st2);\n\t\tString st3 = \"jdk\"+3+3.0;\n\t\tString st4 = 3+3.0+\"jdk\";\n\t\tSystem.out.println(st3);\n\t\tSystem.out.println(st4);\n\t\t\n\t\n\t}", "public static final String shift(String text) {\n return \"+\" + text; /*I18nOK:LINE*/\n }", "static Escaper escapeUnencodableAndControlCharacters(Charset cs) {\n CharsetEncoder enc = cs.newEncoder();\n return c -> {\n switch (c) {\n case '\\t':\n return \"\\\\t\";\n case '\\r':\n return \"\\\\r\";\n case '\\n':\n return \"\\\\n\";\n }\n if (!enc.canEncode(c) || Character.isISOControl(c)) {\n return \"<0x\" + Strings.toHex(c) + \">\";\n }\n return null;\n };\n }", "private boolean isOperator(char ch) {\r\n\t\treturn (ch == '+' || ch == '-' || ch == '*' || ch == '/');\r\n\t}", "@Override\n\tpublic void parseInput() throws InvalidArgumentValueException {\n\t\t\n\t\t\n\t\ttry {\n\t\t\tstringArgBytes = stringToArrayOfByte(stringText.getText());\n\t\t} catch (NumberFormatException e) {\n\n\t\t\tthrow new InvalidArgumentValueException(\n\t\t\t\t\t\"This string cannot be converted to ASCII for some reason. Maybe there are non asci characters used in it\");\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tint result = 0;\r\n\t\tif (args[0].equals(\"/?\")) {\r\n\t\t\tSystem.out.println(\"도움말 출력\");\r\n\t\t} else if (args[0].equals(\"+\")) {\r\n\t\t\tresult = Integer.parseInt(args[1])\r\n\t\t\t\t\t+ Integer.parseInt(args[2]);\r\n\t\t\tSystem.out.println(result);\r\n\t\t} else if (args[0].equals(\"+\")) {\r\n\t\t\tresult = Integer.parseInt(args[1])\r\n\t\t\t\t\t- Integer.parseInt(args[2]);\r\n\t\t\tSystem.out.println(result);\r\n\t\t}\r\n\t\t\r\n\t\t//String[] args = {\"+\" , \"10\" , \"20\"}\r\n\t\tString [] str = {\"이숭무\" , \"이상범\" , \"이장범\"};\r\n\t\tSystem.out.println(str[0]);\r\n\t\r\n\r\n\t}", "private String addCharacter() {\n\t\t// Two Parameters: CharaNumber, CharaName\n\t\tStringBuilder tag = new StringBuilder();\n\t\ttag.append(\"|chara\");\n\t\tif (!parameters[0].equals(\"0\")) {\n\t\t\ttag.append(parameters[0]);\n\t\t}\n\t\ttag.append(\":\" + parameters[1]);\n\t\treturn tag.toString();\n\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}", "public static void main(String[] args) {\n char myChar = '\\u00A9';\n System.out.println(\"Unicode is : \" + myChar);\n char myReg = '\\u00AE';\n System.out.println(\"Unicode for regiter : \" + myReg);\n }", "@Override\n public void setCharacterEncoding(String arg0) {\n\n }", "public static void main(String[] args) {\n\t\tMimeTransferEncoding[] mtes = {\n\t\t\t\tMimeTransferEncoding.parseString(\"7bit\"),\n\t\t\t\tMimeTransferEncoding.parseString(\"base64\"),\n\t\t\t\tMimeTransferEncoding.parseString(\"bad\") };\n\n\t\tfor (MimeTransferEncoding mte : mtes) {\n\t\t\tif (mte == null) {\n\t\t\t\tSystem.out.println(\"no encoding\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"have a \" + mte);\n\t\t\t}\n\t\t}\n\t}", "private int _prependOrWriteCharacterEscape(char[] buffer, int ptr, int end, char ch, int escCode)\n/* */ throws IOException, JsonGenerationException\n/* */ {\n/* 1727 */ if (escCode >= 0) {\n/* 1728 */ if ((ptr > 1) && (ptr < end)) {\n/* 1729 */ ptr -= 2;\n/* 1730 */ buffer[ptr] = '\\\\';\n/* 1731 */ buffer[(ptr + 1)] = ((char)escCode);\n/* */ } else {\n/* 1733 */ char[] ent = this._entityBuffer;\n/* 1734 */ if (ent == null) {\n/* 1735 */ ent = _allocateEntityBuffer();\n/* */ }\n/* 1737 */ ent[1] = ((char)escCode);\n/* 1738 */ this._writer.write(ent, 0, 2);\n/* */ }\n/* 1740 */ return ptr;\n/* */ }\n/* 1742 */ if (escCode != -2) {\n/* 1743 */ if ((ptr > 5) && (ptr < end)) {\n/* 1744 */ ptr -= 6;\n/* 1745 */ buffer[(ptr++)] = '\\\\';\n/* 1746 */ buffer[(ptr++)] = 'u';\n/* */ \n/* 1748 */ if (ch > 'ÿ') {\n/* 1749 */ int hi = ch >> '\\b' & 0xFF;\n/* 1750 */ buffer[(ptr++)] = HEX_CHARS[(hi >> 4)];\n/* 1751 */ buffer[(ptr++)] = HEX_CHARS[(hi & 0xF)];\n/* 1752 */ ch = (char)(ch & 0xFF);\n/* */ } else {\n/* 1754 */ buffer[(ptr++)] = '0';\n/* 1755 */ buffer[(ptr++)] = '0';\n/* */ }\n/* 1757 */ buffer[(ptr++)] = HEX_CHARS[(ch >> '\\004')];\n/* 1758 */ buffer[ptr] = HEX_CHARS[(ch & 0xF)];\n/* 1759 */ ptr -= 5;\n/* */ }\n/* */ else {\n/* 1762 */ char[] ent = this._entityBuffer;\n/* 1763 */ if (ent == null) {\n/* 1764 */ ent = _allocateEntityBuffer();\n/* */ }\n/* 1766 */ this._outputHead = this._outputTail;\n/* 1767 */ if (ch > 'ÿ') {\n/* 1768 */ int hi = ch >> '\\b' & 0xFF;\n/* 1769 */ int lo = ch & 0xFF;\n/* 1770 */ ent[10] = HEX_CHARS[(hi >> 4)];\n/* 1771 */ ent[11] = HEX_CHARS[(hi & 0xF)];\n/* 1772 */ ent[12] = HEX_CHARS[(lo >> 4)];\n/* 1773 */ ent[13] = HEX_CHARS[(lo & 0xF)];\n/* 1774 */ this._writer.write(ent, 8, 6);\n/* */ } else {\n/* 1776 */ ent[6] = HEX_CHARS[(ch >> '\\004')];\n/* 1777 */ ent[7] = HEX_CHARS[(ch & 0xF)];\n/* 1778 */ this._writer.write(ent, 2, 6);\n/* */ }\n/* */ }\n/* 1781 */ return ptr; }\n/* */ String escape;\n/* */ String escape;\n/* 1784 */ if (this._currentEscape == null) {\n/* 1785 */ escape = this._characterEscapes.getEscapeSequence(ch).getValue();\n/* */ } else {\n/* 1787 */ escape = this._currentEscape.getValue();\n/* 1788 */ this._currentEscape = null;\n/* */ }\n/* 1790 */ int len = escape.length();\n/* 1791 */ if ((ptr >= len) && (ptr < end)) {\n/* 1792 */ ptr -= len;\n/* 1793 */ escape.getChars(0, len, buffer, ptr);\n/* */ } else {\n/* 1795 */ this._writer.write(escape);\n/* */ }\n/* 1797 */ return ptr;\n/* */ }", "@Override\n public String visit(CharLiteralExpr n, Object arg) {\n return null;\n }", "public static void main(String[] args){\n \tbyte[] bytes = {90, -103};\n \tfor(byte by:bytes){\n \t\tif(Instruction.HEAD[0]!=by&&ESCAPE!=by&&Instruction.TAIL[0]!=by){\n \t\t\tSystem.out.println(\"escape code error.\"+by);\n \t\t}\n \t}\n \t\n \tSystem.out.println(Instruction.HEAD[0]);\n \tSystem.out.println(Instruction.HEAD[0]==0x5a);\n }", "public static void main(String[] args) {\n MoveToFront m =new MoveToFront();\n m.readChar();\n m.ergodic();\n\t}", "public static void main(String[] args) {\n\t\tString str = \"264*8/+3-\";\n\t\t\n\t\tStack<Integer> val = new Stack<>();\n\t\tStack<String> in = new Stack<>();\n\t\tStack<String> pre = new Stack<>();\n\t\tfor(int i=0;i<str.length();i++) {\n\t\t\tchar ch = str.charAt(i);\n\t\t\tif(ch=='/'||ch=='+'||ch=='-'||ch=='*') {\n\t\t\t\tint val2 = val.pop();\n\t\t\t\tint val1 = val.pop();\n\t\t\t\tint valueVal = operations(val1, val2, ch);\n\t\t\t\tval.push(valueVal);\n\t\t\t\tString v2in = in.pop();\n\t\t\t\tString v1in = in.pop();\n\t\t\t\tString valueIn = \"(\"+v1in+ch+v2in+\")\";\n\t\t\t\tin.push(valueIn);\n\t\t\t\tString v2pre = pre.pop();\n\t\t\t\tString v1pre = pre.pop();\n\t\t\t\tString valuePre = ch+v1pre+v2pre;\n\t\t\t\tpre.push(valuePre);\n\t\t\t}else {\n\t\t\t\tval.push(ch-'0');\n\t\t\t\tin.push(ch+\"\");\n\t\t\t\tpre.push(ch+\"\");\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\tSystem.out.println(val.pop());\n\t\tSystem.out.println(pre.pop());\n\t\tSystem.out.println(in.pop());\n\t}", "public static void main(String[] args) {\n\n\t\tString cadena1 = \" She sells sea shells on the sea shore \";\n\t\tSystem.out.println(\"Cadena: \" + cadena1);\n\t\t//String cadena2 = \"\"; \n\t\tcadena1 = cadena1.substring(1,10);\n\t\t\n\t\tSystem.out.println(\"Cadena recortada: \" + cadena1);\n\t\t\n\t\t\n\t\t\n\t}", "private static boolean isOperator(char c) {\n return c == '+' ||\n c == '-' ||\n c == '*' ||\n c == '/';\n }", "public static void main(String[] args) {\n\t\t\n\t\tFileOutputStream fos = null;\n\t\ttry {\n\t\t\t\n\t\t\tString nombreArchivo = args[0];\n\t\t\tString textAGrabar = args[1];\n\t\t\t\n\t\t\t//abrimos el archivo para escritura\n\t\t\tfos = new FileOutputStream (nombreArchivo);\n\t\t\t//recorremos la cadena\n\t\t\t\n\t\t\tfor(int i=0; i<textAGrabar.length();i++) {\n\t\t\t\tint c = textAGrabar.charAt(i);\n\t\t\t\t//grabamos el siguiente byte\n\t\t\t\tfos.write(c);\n\t\t\t\t\n\t\t\t}\n\t\t}catch(Exception ex) {\n\t\t\t\n\t\t\t\tex.printStackTrace();\n\t\t\t\tthrow new RuntimeException(ex);\n\t\t\t\n\t\t}finally {\n\t\t\t\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\t\tif(fos!=null) fos.close();\n\t\t\t\t\t\n\t\t\t}catch(Exception ex){\n\t\t\t\t\n\t\t\t\t\tex.printStackTrace();\n\t\t\t\t\tthrow new RuntimeException(ex);\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tchar letra= 'a';\r\n\t\tSystem.out.println(letra);\r\n\t\t\r\n\t\tchar valor = 66;\r\n\t\tvalor = (char) (valor + 1);\r\n\t\tSystem.out.println(valor);\r\n\t\t\r\n\t\t// String é mais comum\r\n\t String palavra = \"aprendendo java\";\r\n\t System.out.println(palavra);\r\n\t\t\r\n\t \r\n\t // char usa aspas simples e String usa aspas duplas\r\n\t}", "private static boolean isOperator(String c)\n\t\t{\t\n\t\t\tif (c.equals(\"+\") || c.equals(\"-\") || c.equals(\"*\") || c.equals(\"/\") ) \n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "@Override\n\tpublic String visitExpr(MicroParser.ExprContext ctx) {\n\t\tString prefix = visit(ctx.expr_prefix());\n\t\tString expr = prefix + visit(ctx.term());\n\t\t\n\t\t//System.out.println(\"in visit expr: \"+expr);\n\t\t//System.out.println(\"in visit expr: prefix is: \"+prefix);\n\t\tif((prefix.contentEquals(\"\"))) return expr;\n\t\tString op1, op2, result;\n\t\tString type = currentType;\n\t\tString[] ids = expr.split(\"\\\\-|\\\\+\");\n\t List<String> operands = new ArrayList<String>();\n\t List<Character> addops = new ArrayList<Character>();\n\t \n\t for(int i=0;i<expr.length();i++) {\n\t \tif(expr.charAt(i)=='+' || expr.charAt(i)=='-')\n\t \t\taddops.add(expr.charAt(i));\n\t }\n\t //create a list of addops\n\t \n\t //create a list of operands \n\t for(String i:ids) \n\t \t operands.add(i);\n\t \n\t op1 = operands.get(0);\n\t op2 = operands.get(1);\n\t temp = new Temporary(type);\n\t result = temp.fullName;\n\t tempList.addT(temp);\n\t //System.out.println(\"in visit expr, ops are: \"+op1+\" \"+ op2);\n\t //System.out.println(\"in visit expr, result is: \"+ result);\n\t if(addops.get(0)=='+') {\n\t \tglobalIR.addStmt(IRStatement.generateArithmetic(type, \"ADD\", op1, op2, result));\n\t \toperands.remove(0); operands.remove(0); addops.remove(0);\n\t }\n\t \t\n\t else {\n\t \tglobalIR.addStmt(IRStatement.generateArithmetic(type, \"SUB\", op1, op2, result));\n\t \toperands.remove(0); operands.remove(0); addops.remove(0);\n\t }\n\t \n\t \t\n\t if(operands.size()==0) return result;\n\t \n\t for(int i=0; i<operands.size();i++) {\n\t \top1 = result;\n\t \top2 = operands.get(i);\n\t \ttemp = new Temporary(type);\n\t \tresult = temp.fullName;\n\t \ttempList.addT(temp);\n\t \tif(addops.get(0)=='+') {\n\t\t \tglobalIR.addStmt(IRStatement.generateArithmetic(type, \"ADD\", op1, op2, result));\n\t\t \taddops.remove(0);\n\t \t}\n\t\t \t\n\t\t else {\n\t\t \tglobalIR.addStmt(IRStatement.generateArithmetic(type, \"SUB\", op1, op2, result));\n\t\t \taddops.remove(0);\n\t\t }\n\t\t \t\n\t }\n\t return result; \n\t\t\n\t}", "private static int encodeMove(int p_x, int p_y, int to_x, int to_y, int a_x, int a_y) {\n\t\treturn p_x + (p_y << 4) + (to_x << 8) + (to_y << 12) + (a_x << 16) + (a_y << 20);\n\t}", "private static String parseCommandStr(String cmd, String[] args) {\n return cmd + \" \" + String.join(\" \", args);\n }", "public boolean higherpres(char oprt) {\r\n\t\tif(oprt == '+'|| oprt =='-') {\r\n\t\t\tif((char)opt.peek() == '*' || (char)opt.peek() == '/' ) {\r\n\t\t\t\treturn true;\r\n\t\t\t}else {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}else if (oprt == '/'|| oprt =='*') {\r\n\t\t\tif((char)opt.peek() == '+' || (char)opt.peek() == '-' ) {\r\n\t\t\t\treturn false;\r\n\t\t\t}else {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "private String checkForChars(String jsArg) {\n\t\tString jsNameToCallArgument = jsArg;\n\n\t\t// TODO replace the current logic for character-by-character comparison\n\t\t// with a more efficient approach\n\t\t/*-// fix to avoid char by char iteration for replacing \"\\'\" char.\n\t\tString jsNametoCallFirstChar = jsNameToCallArgument.substring(0, 1);\n\t\tString jsNametoCallSubStr = jsNameToCallArgument.substring(1, jsNameToCallArgument.length() - 1);\n\t\tString jsNametoCallLastChar = jsNameToCallArgument.substring(jsNameToCallArgument.length() - 1, 1);\n\t\tjsNametoCallSubStr = jsNametoCallSubStr.replaceAll(\"'\", \"\");\n\t\tjsNametoCallSubStr = jsNametoCallFirstChar + jsNametoCallSubStr + jsNametoCallLastChar;\n\t\treturn jsNametoCallSubStr;*/\n\n\t\t// For checking the occurrence of ' in the given string and\n\t\t// removing it\n\t\tfor (int i = 0; i < jsNameToCallArgument.length(); i++) {\n\t\t\tif (jsNameToCallArgument.charAt(i) == '\\'') {\n\t\t\t\tif (i != 0 && i != (jsNameToCallArgument.length() - 1)) {\n\t\t\t\t\tjsNameToCallArgument = jsNameToCallArgument.substring(0, i) + SmartConstants.ENCODE_SINGLE_QUOTE_UTF8 + jsNameToCallArgument.substring(i + 1, jsNameToCallArgument.length());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn jsNameToCallArgument;\n\t}", "private static boolean needSingleQuotation(char paramChar)\n/* */ {\n/* 2498 */ return ((paramChar >= '\\t') && (paramChar <= '\\r')) || ((paramChar >= ' ') && (paramChar <= '/')) || ((paramChar >= ':') && (paramChar <= '@')) || ((paramChar >= '[') && (paramChar <= '`')) || ((paramChar >= '{') && (paramChar <= '~'));\n/* */ }", "public void specialMacs(Verbum w){\r\n\t\tint cd = w.cd;\r\n\t\tint variant = w.variant;\r\n\t\tint i = 0;\r\n\t\tint index = 0;\r\n\t\tif(w.pos.equals(\"V\")){\r\n\t\t\t//3rd conjugation have long vowel if the 1st pp stem and 3rd pp stem are one syllable\r\n\t\t\tif(cd==3 && countSyllables(w.form2)<2 && countSyllables(w.form3)<2){\t\t\r\n\t\t\t\tdo {\r\n\t\t\t\t\tchar c = w.form3.charAt(i);\r\n\t\t\t\t\tif(isVowel(c)){\r\n\t\t\t\t\t\tindex = i;\r\n\t\t\t\t\t}\r\n\t\t\t\t\ti++;\r\n\t\t\t\t} while(i<w.form3.length()-1);\r\n\t\t\t\tw.form3 = new StringBuffer(w.form3).insert(index, \"*\").toString();\r\n\t\t\t}\r\n\t\t\t//First conjugation variant 1 have long a's \r\n\t\t\tif (cd==1 && variant==1){\r\n\t\t\t\tw.form3 = new StringBuffer(w.form3).insert(w.form3.length()-2, \"*\").toString();\r\n\t\t\t\tw.form4 = new StringBuffer(w.form4).insert(w.form4.length()-2, \"*\").toString();\r\n\t\t\t}\r\n\t\t} else if (w.pos.equals(\"N\")){\r\n\t\t\t//Some 3rd declension nouns have short o in nom and long o in all other forms\r\n\t\t\tif (cd == 3 && w.form1.charAt(w.form1.length()-1) == 'r' && w.form2.charAt(w.form2.length()-1) == 'r' && (w.gender.equals(\"M\") || w.gender.equals(\"F\"))){\r\n\t\t\t\tw.form2 = new StringBuffer(w.form2).insert(w.form2.length()-2, \"*\").toString();\r\n\t\t\t} \r\n\t\t\t//Neuter 3rd declension -ar nouns have short a in nom and long a in all others\r\n\t\t\tif (cd == 3 && w.form1.substring(w.form1.length()-2).equals(\"ar\") && w.form2.substring(w.form2.length()-2).equals(\"ar\")){\r\n\t\t\t\tw.form2 = new StringBuffer(w.form2).insert(w.form2.length()-2, \"*\").toString();\r\n\t\t\t} \r\n\t\t}\r\n\t}", "private static String fixKleene(String reg) {\n int ind, beg, len;\n String expr;\n\n do {\n ind = reg.indexOf('*');\n if (ind != -1 && reg.charAt(ind - 1) == QUOTE)\n ind = 0;\n } while(ind == 0);\n\n while (ind >= 1) {\n char character = reg.charAt(ind - 1);\n if (character == ')') {\n beg = reg.substring(0, ind).lastIndexOf(\"(\");\n expr = reg.substring(beg + 1, ind - 1);\n len = expr.length();\n if (expr.contains(\"|\")) {\n if (ind + len + 2 < reg.length()\n && reg.substring(ind + 1, ind + 1 + len + 2).equals(\"(\" + expr + \")\")) {\n replace(reg, ind, '+');\n removeChars(reg, ind + 1, len + 2);\n }\n if (ind - (2 + len) * 2 >= 0\n && reg.substring(ind - (2 + len) * 2, ind - 2 - len).equals(\n \"(\" + expr + \")\")) {\n replace(reg, ind, '+');\n removeChars(reg, ind - (2 + len) * 2, len + 2);\n }\n } else {\n if (ind + len < reg.length()\n && reg.substring(ind + 1, ind + 1 + len).equals(expr)) {\n replace(reg, ind, '+');\n removeChars(reg, ind + 1, len);\n }\n if (ind - 2 - len * 2 >= 0\n && reg.substring(ind - 2 - len * 2, ind - 2 - len).equals(expr)) {\n replace(reg, ind, '+');\n removeChars(reg, ind - 2 - len * 2, len);\n }\n }\n } else if (reg.charAt(ind - 1) == QUOTE) {\n if (ind + 2 < reg.length() && reg.charAt(ind + 2) == character\n && reg.charAt(ind + 1) == QUOTE) {\n reg = replace(reg, ind, '+');\n reg = removeChars(reg, ind + 1, 2);\n }\n if (ind - 2 * 2 >= 0 && reg.charAt(ind - 2 - 1) == character\n && reg.charAt(ind - 2 * 2) == QUOTE) {\n reg = replace(reg, ind, '+');\n reg = removeChars(reg, ind - 2, 2);\n }\n } else {\n if (ind + 1 < reg.length() && reg.charAt(ind + 1) == character) {\n reg = replace(reg, ind, '+');\n reg = removeChars(reg, ind + 1, 1);\n }\n if (ind - 2 >= 0 && reg.charAt(ind - 2) == character) {\n reg = replace(reg, ind, '+');\n reg = removeChars(reg, ind - 2, 1);\n }\n }\n ind = reg.indexOf('*', ind + 1);\n }\n return reg;\n }", "public static void main(String[] args) {\n\t\tchar aa = '\\u0000';\r\n\t\tchar a = '\\u0041';\r\n\t\tchar b = '\\u0042';\r\n\t\tchar c = '\\u0043';\r\n\t\tchar d = '\\u0044';\r\n\t\tchar e = '\\u0045';\r\n\t\tchar f = '\\u0046';\r\n\t\tchar g = '\\u0047';\r\n\t\tchar h = '\\u0048';\r\n\t\tchar i = '\\u0049';\r\n\t\tchar j = '\\u004A';\r\n\t\tchar k = '\\u004B';\r\n\t\tchar l = '\\u004C';\r\n\t\tchar m = '\\u004D';\r\n\t\tchar n = '\\u004E';\r\n\t\tchar o = '\\u004F';\r\n\t\tchar p = '\\u0051';\r\n\t\tchar q = '\\u0051';\r\n\t\tchar r = '\\u0052';\r\n\t\tchar s = '\\u0053';\r\n\t\tchar t = '\\u0054';\r\n\t\tchar u = '\\u0055';\r\n\t\tchar v = '\\u0056';\r\n\t\tchar w = '\\u0057';\r\n\t\tchar x = '\\u0058';\r\n\t\tchar y = '\\u0059';\r\n\t\tchar z = '\\u0060';\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(+i+\"\"+aa+\"\"+w+\"\"+i+\"\"+s+\"\"+h+\"\"+aa+\"\"+t+\"\"+o+\"\"+aa+\"\"+p+\"\"+e+\"\"+r+\"\"+i+\"\"+s+\"\"+h);\r\n\t}", "private void _prependOrWriteCharacterEscape(char ch, int escCode)\n/* */ throws IOException, JsonGenerationException\n/* */ {\n/* 1636 */ if (escCode >= 0) {\n/* 1637 */ if (this._outputTail >= 2) {\n/* 1638 */ int ptr = this._outputTail - 2;\n/* 1639 */ this._outputHead = ptr;\n/* 1640 */ this._outputBuffer[(ptr++)] = '\\\\';\n/* 1641 */ this._outputBuffer[ptr] = ((char)escCode);\n/* 1642 */ return;\n/* */ }\n/* */ \n/* 1645 */ char[] buf = this._entityBuffer;\n/* 1646 */ if (buf == null) {\n/* 1647 */ buf = _allocateEntityBuffer();\n/* */ }\n/* 1649 */ this._outputHead = this._outputTail;\n/* 1650 */ buf[1] = ((char)escCode);\n/* 1651 */ this._writer.write(buf, 0, 2);\n/* 1652 */ return;\n/* */ }\n/* 1654 */ if (escCode != -2) {\n/* 1655 */ if (this._outputTail >= 6) {\n/* 1656 */ char[] buf = this._outputBuffer;\n/* 1657 */ int ptr = this._outputTail - 6;\n/* 1658 */ this._outputHead = ptr;\n/* 1659 */ buf[ptr] = '\\\\';\n/* 1660 */ buf[(++ptr)] = 'u';\n/* */ \n/* 1662 */ if (ch > 'ÿ') {\n/* 1663 */ int hi = ch >> '\\b' & 0xFF;\n/* 1664 */ buf[(++ptr)] = HEX_CHARS[(hi >> 4)];\n/* 1665 */ buf[(++ptr)] = HEX_CHARS[(hi & 0xF)];\n/* 1666 */ ch = (char)(ch & 0xFF);\n/* */ } else {\n/* 1668 */ buf[(++ptr)] = '0';\n/* 1669 */ buf[(++ptr)] = '0';\n/* */ }\n/* 1671 */ buf[(++ptr)] = HEX_CHARS[(ch >> '\\004')];\n/* 1672 */ buf[(++ptr)] = HEX_CHARS[(ch & 0xF)];\n/* 1673 */ return;\n/* */ }\n/* */ \n/* 1676 */ char[] buf = this._entityBuffer;\n/* 1677 */ if (buf == null) {\n/* 1678 */ buf = _allocateEntityBuffer();\n/* */ }\n/* 1680 */ this._outputHead = this._outputTail;\n/* 1681 */ if (ch > 'ÿ') {\n/* 1682 */ int hi = ch >> '\\b' & 0xFF;\n/* 1683 */ int lo = ch & 0xFF;\n/* 1684 */ buf[10] = HEX_CHARS[(hi >> 4)];\n/* 1685 */ buf[11] = HEX_CHARS[(hi & 0xF)];\n/* 1686 */ buf[12] = HEX_CHARS[(lo >> 4)];\n/* 1687 */ buf[13] = HEX_CHARS[(lo & 0xF)];\n/* 1688 */ this._writer.write(buf, 8, 6);\n/* */ } else {\n/* 1690 */ buf[6] = HEX_CHARS[(ch >> '\\004')];\n/* 1691 */ buf[7] = HEX_CHARS[(ch & 0xF)];\n/* 1692 */ this._writer.write(buf, 2, 6);\n/* */ }\n/* */ return;\n/* */ }\n/* */ String escape;\n/* */ String escape;\n/* 1698 */ if (this._currentEscape == null) {\n/* 1699 */ escape = this._characterEscapes.getEscapeSequence(ch).getValue();\n/* */ } else {\n/* 1701 */ escape = this._currentEscape.getValue();\n/* 1702 */ this._currentEscape = null;\n/* */ }\n/* 1704 */ int len = escape.length();\n/* 1705 */ if (this._outputTail >= len) {\n/* 1706 */ int ptr = this._outputTail - len;\n/* 1707 */ this._outputHead = ptr;\n/* 1708 */ escape.getChars(0, len, this._outputBuffer, ptr);\n/* 1709 */ return;\n/* */ }\n/* */ \n/* 1712 */ this._outputHead = this._outputTail;\n/* 1713 */ this._writer.write(escape);\n/* */ }", "public static void main(String[] args) {\n\n\t\t\n\t\tString s = \"平仮�??stringabc片仮�??numbers 123漢字gh%^&*#$1@):\";\n\t\t\n\t\t//Regular Expression: [^a-zA-Z0-9]\n\t\t\n\t\ts = s.replaceAll(\"[^a-zA-Z0-9]\", \"-\"); // ^ symbol is used for not/except\n\t\tSystem.out.println(s);\n\t}", "public abstract String zza(Charset charset);", "private String prepare(String originStr)\r\n {\r\n String result=originStr.toLowerCase();\r\n result = result.replace('ä','a');\r\n result = result.replace('ö','o');\r\n result = result.replace('ü','u');\r\n// result = result.replace(':',' ');\r\n// result = result.replace(';',' ');\r\n// result = result.replace('<',' ');\r\n// result = result.replace('>',' ');\r\n// result = result.replace('=',' ');\r\n// result = result.replace('?',' ');\r\n// result = result.replace('[',' ');\r\n// result = result.replace(']',' ');\r\n// result = result.replace('/',' ');\r\n return result;\r\n }", "AstroArg unpack(Astro litChars);", "public static void main(String[] args) {\n\t\tScanner teclado= new Scanner(System.in);\r\n\t\tchar letra\r\n\t\tSystem.out.printf(\"Introduzca un caracter\");\r\n\t\tletra=teclado.next().charAt(0);\r\n\t\twhile(letra!='*') {\r\n\t\t\t\r\n\t\t}\r\n\t}", "public void mo9252e(String str, boolean z) {\n }", "public void parseArguments(String queryString, String contentEncoding) {\n String[] args = JOrphanUtils.split(queryString, QRY_SEP);\n final boolean isDebug = log.isDebugEnabled();\n for (int i = 0; i < args.length; i++) {\n if (isDebug) {\n log.debug(\"Arg: \" + args[i]);\n }\n // need to handle four cases:\n // - string contains name=value\n // - string contains name=\n // - string contains name\n // - empty string\n \n String metaData; // records the existance of an equal sign\n String name;\n String value;\n int length = args[i].length();\n int endOfNameIndex = args[i].indexOf(ARG_VAL_SEP);\n if (endOfNameIndex != -1) {// is there a separator?\n // case of name=value, name=\n metaData = ARG_VAL_SEP;\n name = args[i].substring(0, endOfNameIndex);\n value = args[i].substring(endOfNameIndex + 1, length);\n } else {\n metaData = \"\";\n name=args[i];\n value=\"\";\n }\n if (name.length() > 0) {\n if (isDebug) {\n log.debug(\"Name: \" + name+ \" Value: \" + value+ \" Metadata: \" + metaData);\n }\n // If we know the encoding, we can decode the argument value,\n // to make it easier to read for the user\n if(!StringUtils.isEmpty(contentEncoding)) {\n addEncodedArgument(name, value, metaData, contentEncoding);\n }\n else {\n // If we do not know the encoding, we just use the encoded value\n // The browser has already done the encoding, so save the values as is\n addNonEncodedArgument(name, value, metaData);\n }\n }\n }\n }", "private StringBuilder leadingSign(StringBuilder sb, boolean negative) {\n\t\t\tif (!negative) {\n\t\t\t\tif (flag.contains(Flags.PLUS)) {\n\t\t\t\t\tsb.append('+');\n\t\t\t\t} else if (flag.contains(Flags.LEADING_SPACE)) {\n\t\t\t\t\tsb.append(' ');\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (flag.contains(Flags.PARENTHESES)) {\n\t\t\t\t\tsb.append('(');\n\t\t\t\t} else {\n\t\t\t\t\tsb.append('-');\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn sb;\n\t\t}", "public static void main(String[] args) {\n char myChar = '\\u00Ae'; //registered symbol unicode\n System.out.println(\"Unicode output was : \" + myChar);\n\n boolean myBoolean = true;\n System.out.println(\"Boolean is = \" + myBoolean);\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}", "private void jetBinopExprStr(){\n\t\tBinopExpr binopExpr = (BinopExpr) rExpr;\n\t\tValue op1 = binopExpr.getOp1();\n\t\tValue op2 = binopExpr.getOp2();\n\t\tZ3Type op1Z3Type = Z3MiscFunctions.v().z3Type(op1.getType());\n\t\tZ3Type op2Z3Type = Z3MiscFunctions.v().z3Type(op2.getType());\n\t\tStringBuilder sb = new StringBuilder();\n\t\t\n\t\tBinopExprType binopType = Z3MiscFunctions.v().getBinopExprType(binopExpr);\n\t\tswitch(binopType){\n\t\t//[start]ADD\n\t\tcase ADD:\n\t\t\t//add_expr = immediate \"+\" immediate;\n\t\t\t//immediate = constant | local;\n\t\t\t//only Int, Real, String can ADD\n\t\t\t//Exceptional Cases: \"084\" + 42; we exclude them\n\t\t\tassert((op1Z3Type == Z3Type.Z3String && op2Z3Type == Z3Type.Z3String) ||\n\t\t\t\t\t(op1Z3Type != Z3Type.Z3String && op2Z3Type != Z3Type.Z3String));\n\t\t\tif(op1Z3Type == Z3Type.Z3String ){\n\t\t\t\t//( Concat \"te\" y1 )\n\t\t\t\tsb.append(\"( Concat \");\n\t\t\t}else{\n\t\t\t\t//(+ 2 i2)\n\t\t\t\tsb.append(\"(+ \");\n\t\t\t}\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\" )\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end]ADD\n\t\tcase AND:\n\t\t\t//and_expr = immediate \"&\" immediate;\n\t\t\t//TODO\n\t\t\t//assert(false) : \"AND Expr\";\n\t\t\tbreak;\n\t\t//[start] DIV\n\t\tcase DIV:\n\t\t\t//div_expr = immediate \"/\" immediate;\n\t\t\t//(div a b) integer division\n\t\t\t//(/ a b) float division\n\t\t\tif(op1Z3Type == Z3Type.Z3Real || op2Z3Type == Z3Type.Z3Real){\n\t\t\t\tsb.append(\"(/ \");\n\t\t\t}else{\n\t\t\t\tsb.append(\"(div \");\n\t\t\t}\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] DIV\n\t\t//[start] EQ\n\t\tcase EQ:\n\t\t\t//eq_expr = immediate \"==\" immediate;\n\t\t\t//b = r1 == r2\n\t\t\t//(assert (= b (= r1 r2)))\n\t\t\tsb.append(\"(= \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] EQ\n\t\t//[start] GE\n\t\tcase GE:\n\t\t\t//ge_expr = immediate \">=\" immediate;\n\t\t\t//b = r1 >= r2\n\t\t\t//(assert (= b (>= r1 r2)))\n\t\t\tsb.append(\"(>= \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] GE\n\t\t//[start] GT\n\t\tcase GT:\n\t\t\t//gt_expr = immediate \">\" immediate;\n\t\t\t//b = r1 > r2\n\t\t\t//(assert (= b (> r1 r2)))\n\t\t\tsb.append(\"(> \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] GT\n\t\t//[start] LE\n\t\tcase LE:\n\t\t\t//le_expr = immediate \"<=\" immediate;\n\t\t\t//b = r1 <= r2\n\t\t\t//(assert (= b (<= r1 r2)))\n\t\t\tsb.append(\"(<= \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] LE\n\t\t//[start] LT\n\t\tcase LT:\n\t\t\t//lt_expr = immediate \"<\" immediate;\n\t\t\t//b = r1 < r2\n\t\t\t//(assert (= b (< r1 r2)))\n\t\t\tsb.append(\"(< \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] LT\n\t\t//[start] MUL\n\t\tcase MUL:\n\t\t\t//mul_expr = immediate \"*\" immediate;\n\t\t\t//(* op1 op2)\n\t\t\tsb.append(\"(* \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] MUL\n\t\t//[start] NE\n\t\tcase NE:\n\t\t\t//ne_expr = immediate \"!=\" immediate;\n\t\t\t//(not (= op1 op2))\n\t\t\tsb.append(\"(not (= \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\"))\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] NE\n\t\tcase OR:\n\t\t\t//or_expr = immediate \"|\" immediate;\n\t\t\t//TODO\n\t\t\tassert(false) : \"OR Expr\";\n\t\t\tbreak;\n\t\t//[start] REM\n\t\tcase REM:\n\t\t\t//rem_expr = immediate \"%\" immediate;\n\t\t\t//(rem op1 op2)\n\t\t\tsb.append(\"(rem \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] REM\n\t\t//[start] SUB\n\t\tcase SUB:\n\t\t\t//sub_expr = immediate \"-\" immediate;\n\t\t\t//(- op1 op2)\n\t\t\tsb.append(\"(- \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] SUB\n\t\t}\n\t}", "private boolean escape() {\r\n return backslash() && (\r\n (digits() && (CHAR(';') || true)) || SET(\"rnqdgb\"));\r\n }", "public static void main(String[] args) {\n\t\t\n\t\tBasicRLECompression compress = new BasicRLECompression('$');\n\t\t//String res = compress.compress(str);\n\t\t//System.out.println(res);\n\t\tString out = compress.uncompress(\"a$4g$4e$4f$1e$1a$f6\");\n\t\t//System.out.println(out);\n\t\t//System.out.println(str);\n\t\t//System.out.print(out.equals(str));\n\t}", "@Test\n public void testEncode() {\n LOGGER.info(\"testEncode\");\n final String actual = new AtomString().encode();\n final String expected = \"0:\";\n assertEquals(expected, actual);\n }", "private static String[] escape(String[] args) {\n String[] result;\n\n result = new String[args.length];\n for (int i = 0; i < result.length; i++) {\n result[i] = escape(args[i]);\n }\n return result;\n }", "private String parseArgs(String args[])\n {\n String fpath = null;\n \n for (String arg : args)\n {\n if (arg.startsWith(\"-\"))\n {\n // TODO: maybe add something here.\n }\n else // expect a filename.\n {\n fpath = arg;\n }\n }\n \n return fpath;\n }", "public interface ExtraEncoding {\n \n /**\n * Converts an Unicode string to a byte array according to some encoding.\n * @param text the Unicode string\n * @param encoding the requested encoding. It's mainly of use if the same class\n * supports more than one encoding.\n * @return the conversion or <CODE>null</CODE> if no conversion is supported\n */ \n public byte[] charToByte(String text, String encoding);\n \n /**\n * Converts an Unicode char to a byte array according to some encoding.\n * @param char1 the Unicode char\n * @param encoding the requested encoding. It's mainly of use if the same class\n * supports more than one encoding.\n * @return the conversion or <CODE>null</CODE> if no conversion is supported\n */ \n public byte[] charToByte(char char1, String encoding);\n \n /**\n * Converts a byte array to an Unicode string according to some encoding.\n * @param b the input byte array\n * @param encoding the requested encoding. It's mainly of use if the same class\n * supports more than one encoding.\n * @return the conversion or <CODE>null</CODE> if no conversion is supported\n */\n public String byteToChar(byte b[], String encoding); \n}", "static void ori_with_acc(String passed){\n\t\tint val1 = hexa_to_deci(registers.get('A'));\n\t\tint val2 = hexa_to_deci(passed.substring(4));\n\t\tval1 = val1|val2;\n\t\tregisters.put('A',decimel_to_hexa_8bit(val1));\n\t\tmodify_status(registers.get('A'));\n\t}", "private boolean isOperator(String op){\n return (op.equals(\"+\") || op.equals(\"-\") || op.equals(\"*\") || op.equals(\"/\"));\n }", "public void addEncodedArgument(String name, String value) {\n this.addEncodedArgument(name, value, ARG_VAL_SEP);\n }", "public void addEncodedArgument(String name, String value) {\n this.addEncodedArgument(name, value, ARG_VAL_SEP);\n }", "private String updateUnaryMinus(String expression) {\n String previous = expression.substring(0, 1);\n if (previous.equals(\"-\")) {\n expression = \"(0\" + expression + \")\";\n previous = \"0\";\n }\n if (expression.length() > 1) {\n for (int i = 1; i < expression.length(); i++) {\n if (expression.substring(i, i + 1).equals(\"-\") && !isNumber(previous)) {\n expression = expression.substring(0, i) + \"0\" + expression.substring(i, expression.length());\n previous = \"-\";\n i = i + 1;\n System.out.println(expression);\n } else previous = expression.substring(i, i + 1);\n }\n }\n return expression;\n }", "public static void main(String[] args) {\n\t\tString reverse = \"Ragha\";\r\n\t\t//String reversed = ;\r\n //System.out.println(reverseAstring(reverse.toCharArray(),0));\r\n \t//printReverseString(reverse.toCharArray(),0);\r\n \tSystem.out.println('A'^'B');\r\n \tSystem.out.println('B'^3);\r\n \tSystem.out.println(3^65);\r\n\t}" ]
[ "0.6378468", "0.61872554", "0.59689534", "0.5922162", "0.5497047", "0.5014875", "0.49197033", "0.4917179", "0.49028468", "0.48734325", "0.4795454", "0.47869283", "0.47864", "0.47859752", "0.47406754", "0.47349966", "0.47177306", "0.4713853", "0.46751565", "0.46406376", "0.46251604", "0.4622642", "0.46148843", "0.4599118", "0.45884648", "0.45601213", "0.4552546", "0.4547092", "0.4543567", "0.45131156", "0.45053434", "0.45050672", "0.45028505", "0.44960272", "0.44955823", "0.44875988", "0.44765776", "0.4475624", "0.4475378", "0.44602758", "0.4449412", "0.4446999", "0.4441691", "0.44328249", "0.44293037", "0.44274378", "0.44249794", "0.44216496", "0.44173843", "0.44017112", "0.440159", "0.43941075", "0.438595", "0.43775904", "0.43739232", "0.43681", "0.43664294", "0.4366217", "0.43589926", "0.43552095", "0.43472716", "0.4347045", "0.43456903", "0.43428892", "0.43416846", "0.4340889", "0.4339334", "0.43390283", "0.43350258", "0.43343726", "0.43326318", "0.43307343", "0.43293643", "0.43285426", "0.43281975", "0.4325369", "0.43217233", "0.4319629", "0.43168592", "0.43151078", "0.43150228", "0.43052918", "0.43052912", "0.42961186", "0.42933285", "0.42874175", "0.42835802", "0.42826062", "0.4278778", "0.42783895", "0.42689902", "0.426857", "0.42682427", "0.42659536", "0.42606163", "0.42598817", "0.4259712", "0.4259712", "0.42581335", "0.42540795" ]
0.50669277
5
Identificador do servidor GPP e porta Metodo...: GerentePoolLog Descricao: Construtor
protected GerentePoolLog(Class ownerClass) { ArquivoConfiguracaoGPP arqConf = ArquivoConfiguracaoGPP.getInstance(); //Define o nome e a porta do servidor q serao utilizados no LOG hostName = arqConf.getEnderecoOrbGPP() + ":" + arqConf.getPortaOrbGPP(); /* Configura o LOG4J com as propriedades definidas no arquivo * de configuracao do GPP */ PropertyConfigurator.configure(arqConf.getConfiguracaoesLog4j()); //Inicia a instancia do Logger do LOG4J logger = Logger.getLogger(ownerClass); log(0,Definicoes.DEBUG,"GerentePoolLog","Construtor","Iniciando escrita de Log do sistema GPP..."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setPoolLog(String poolLog) { this.poolLog = poolLog; }", "public String poolName();", "public static GerentePoolLog getInstancia(Class ownerClass)\n {\n \t// Verifica se ja existe uma instancia do Pool em execucao se negativo entao inicializa\n /*if ( instancia == null )\n {\n System.out.println (\"Gerente de LOG (Singleton) INICIADO \");\n instancia = \n }*/\n \tGerentePoolLog instancia = new GerentePoolLog(ownerClass);\n \n return instancia;\n }", "public String getInfoPool() {\n StringBuilder info = new StringBuilder();\n \n if (pool == null) {\n info.append(\"El pool no está creado\");\n } else {\n\n int conexiones_libres = pool.getTotalFree();\n int conexiones_creadas_totales = pool.getTotalCreatedConnections();\n int conexiones_liberadas_totales = pool.getTotalLeased();\n \n BoneCPConfig config = pool.getConfig();\n \n info.append(\"Pool \" + config.getPoolName() + \": \");\n info.append(\"Libres: \" + conexiones_libres + \" / \");\n info.append(\"Tot. creadas: \" + conexiones_creadas_totales + \" / \");\n info.append(\"Tot. liberadas: \" + conexiones_liberadas_totales + Comun.NL);\n }\n \n info.append(Comun.NL);\n \n return info.toString();\n }", "public LogGPPServer()\n\t{\n\t\tarqConfig = ArqConfigGPPServer.getInstance();\n\t\t\n\t\t//Define o nome e a porta do servidor q serao utilizados no LOG\n\t\thostName = arqConfig.getHostGPP() + \":\" + arqConfig.getPortaGPP();\n\n\t\ttry\n\t\t{\n\t\t\t// Liga o log4j\n\t\t\tthis.ligaLog4j();\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(\"Não foi possível instanciar logger\");\n\t\t}\n\t}", "public String toString()\n {\n return \"DBPoolImpl[\" + _name + \"]\";\n }", "OMMPool getPool();", "java.lang.String getPoolId();", "int getPoolNumber();", "java.lang.String getPoolName();", "public Pool() {\n\t\t// inicializaDataSource();\n\t}", "@Column(name = \"POOL_LOG\")\n/* */ @Order(4)\n/* 86 */ public String getPoolLog() { return this.poolLog; }", "public void log(long idProcesso, int aTipo, String aClasse, String aMetodo, String aMensagem)\n\t{\n\t\tString mensagemFinal = \"<Servidor> \" + this.hostName; \n\t\tmensagemFinal = mensagemFinal + \" <ID> \" + idProcesso;\n\t\tmensagemFinal = mensagemFinal + \" <CL> \" + aClasse;\n\t\tmensagemFinal = mensagemFinal + \" <ME> \" + aMetodo;\n\t\tmensagemFinal = mensagemFinal + \" <Mensagem> \" + aMensagem;\n\t\t\n\t\tregistraLog(aTipo,mensagemFinal);\n\t}", "private ConnectionPool() {\r\n\t\tResourceManagerDB resourceManager = ResourceManagerDB.getInstance();\r\n\t\tthis.driver = resourceManager.getValue(ParameterDB.DRIVER_DB);\r\n\t\tthis.url = resourceManager.getValue(ParameterDB.URL_DB);\r\n\t\tthis.user = resourceManager.getValue(ParameterDB.USER_DB);\r\n\t\tthis.password = resourceManager.getValue(ParameterDB.PASSWORD_DB);\r\n\t\tthis.poolsize = Integer.parseInt(resourceManager.getValue(ParameterDB.POOLSIZE_DB));\r\n\t}", "public void log(long idProcesso, int aTipo, String aClasse, String aMetodo, String aMensagem)\n\t{\n\t\tStringBuffer mensagemFinal = new StringBuffer(\"<Servidor> \").append(getHostName()); \n\t\tmensagemFinal.append(\" <ID> \").append(idProcesso);\n\t\tmensagemFinal.append(\" <Metodo> \").append(aMetodo);\n\t\tmensagemFinal.append(\" <Mensagem> \").append(aMensagem);\n\t\t\n\t\tregistraLog(aTipo,mensagemFinal.toString());\n\t\tmensagemFinal = null;\n\t}", "public PoolNYCH() {\n\t\tinicializarDataSource();\n\t}", "public PoolNotFoundException() {\n super();\n }", "public EmitirNFBonusTLDC (long logId)\n\t {\n\t\tsuper(logId, Definicoes.CL_EMITIR_NF_BONUS_TLDC);\n\t\t\n\t\t// Obtem referencia do gerente de conexoes do Banco de Dados\n\t\tthis.gerenteBancoDados = GerentePoolBancoDados.getInstancia(logId);\n\t }", "public Puertos() {\n estaDisponibleServerSocket();\n }", "public ServidorScrabbleJ()\n\t {\n\t super( \"ServidorScrabbleJ\" ); // establece el título de la ventana\n\n\t // crea objeto ExecutorService con un subproceso para cada jugador\n\t ejecutarJuego = Executors.newFixedThreadPool(2);\n\t bloqueoJuego = new ReentrantLock(); // crea bloqueo para el juego\n\n\t // variable de condición para los dos jugadores conectados\n\t otroJugadorConectado = bloqueoJuego.newCondition();\n\n\t // variable de condición para el turno del otro jugador\n\t turnoOtroJugador = bloqueoJuego.newCondition(); \n\n\t for ( int i = 0; i < 15; i++ )\n\t \t for (int j = 0; j < 15; j++) {\n\t \t tablero[ i ][ j ] = new String( \"\" ); // crea tablero de scrabble\n\t\t\t}\n\t jugadores = new Jugador[2]; // crea arreglo de jugadores\n\t jugadorActual = JUGADOR_1; // establece el primer jugador como el jugador actual\n\t \n\t try\n\t {\n\t \t //establece el puerto y el numero maximo de conexiones permitidas\n\t servidor = new ServerSocket(12345, 2); // establece objeto ServerSocket\n\t } // fin de try\n\t catch ( IOException excepcionES ) \n\t {\n\t excepcionES.printStackTrace();\n\t System.exit(1);\n\t } // fin de catch\n\n\t areaSalida = new JTextArea(); // crea objeto JTextArea para mostrar la salida\n\t add( new JScrollPane(areaSalida), BorderLayout.CENTER );\n\t areaSalida.setText( \"Servidor esperando conexiones\\n\" );\n\n\t setSize( 300, 325 ); // establece el tamaño de la ventana\n\t setVisible( true ); // muestra la ventana\n\t }", "public Gossip_server() throws IOException {\n\t\t//creo socket\n\t\tsocket = new ServerSocket(Gossip_config.TCP_PORT);\n\t\t\n\t\t//creo thread pool\n\t\tpool = (ThreadPoolExecutor)Executors.newCachedThreadPool();\n\t\t\n\t\t//ininzializzo struttura dati\n\t\tdata = new Gossip_data();\n\t\t\n\t}", "public Long getPoolId();", "private void ejecutorDeServicio(){\r\n dbExeccutor = Executors.newFixedThreadPool(\r\n 1, \r\n new databaseThreadFactory()\r\n ); \r\n }", "@Override\r\n public String getServletInfo() {\r\n return \"Servlet Adapter to call generadorReportesPDF-Stateles-Session\";\r\n }", "public NamePool getNamePool() {\n return config.getNamePool();\n }", "public GenLogServerConfig() {\n }", "private DatosDeSesion() throws ExcepcionArchivoDePropiedadesNoEncontrado {\r\n this.poolDeConexiones = new PoolDeConexiones();\r\n }", "public static void main(String p, String nom, String groupe) {\n\t\tint nbTours = Constantes.NB_TOURS_PERSONNAGE_DEFAUT;\n\t\t\n\t\t// init des arguments\n\t\tint port = Constantes.PORT_DEFAUT;\n\t\tString ipArene = Constantes.IP_DEFAUT;\n\t\t\n\t\t\n\t\t// creation du logger\n\t\tLoggerProjet logger = null;\t\t\n\t\t\n\t\ttry {\n\t\t\tlogger = new LoggerProjet(true, \"personnage_\" + nom + groupe);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(ErreurLancement.suivant);\n\t\t}\n\t\t\n\t\t// lancement du serveur\n\t\ttry {\n\t\t\tString ipConsole = InetAddress.getLocalHost().getHostAddress();\n\t\t\t\n\t\t\tlogger.info(\"Lanceur\", \"Creation du personnage...\");\n\t\t\t\n\t\t\t// caracteristiques du personnage\n\t\t\tHashMap<Caracteristique, Integer> caracts = new HashMap<Caracteristique, Integer>();\n\t\t\t// seule la force n'a pas sa valeur par defaut (exemple)\n\t\t\tif (p==\"Crevard\"){\n\t\t\t\tcaracts.put(Caracteristique.FORCE, 5);\n\t\t\t} /*else \n\t\t\tcaracts.put(Caracteristique.FORCE, \n\t\t\t\t\tCalculs.valeurCaracAleatoire(Caracteristique.FORCE)); */\n\t\t\t\n\t\t\tPoint position = Calculs.positionAleatoireArene();\n\t\t\t\n\t\t\tswitch (p){\n\t\t\tcase \"Pochtron\":\n\t\t\t\tnew Pochtron(ipArene, port, ipConsole, nom, groupe, caracts, nbTours, position, logger);\n\t\t\t\tbreak;\n\t\t\tcase \"Crevard\":\n\t\t\t\tnew Crevard(ipArene, port, ipConsole, nom, groupe, caracts, nbTours, position, logger);\n\t\t\t\tbreak;\n\t\t\tcase \"Intello\":\n\t\t\t\tnew Intello(ipArene, port, ipConsole, nom, groupe, caracts, nbTours, position, logger);\n\t\t\t\tbreak;\n\t\t\tcase \"Kamikaze\":\n\t\t\t\tnew Kamikaze(ipArene, port, ipConsole, nom, groupe, caracts, nbTours, position, logger);\n\t\t\t\tbreak;\n\t\t\tcase \"Fuyard\":\n\t\t\t\tnew Fuyard(ipArene, port, ipConsole, nom, groupe, caracts, nbTours, position, logger);\n\t\t\t\tbreak;\n\t\t\tcase \"Soigneur\":\n\t\t\t\tnew Soigneur(ipArene, port, ipConsole, nom, groupe, caracts, nbTours, position, logger);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tlogger.info(\"Lanceur\", \"Creation du personnage reussie\");\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tlogger.severe(\"Lanceur\", \"Erreur lancement :\\n\" + e.getCause());\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(ErreurLancement.suivant);\n\t\t}\n\t}", "@Override\n public String getServletInfo() {\n return \"Servlet responsável pela funcionalidade Visualizar Consulta.\";\n }", "public ModeloContratoDAO(InterfacePool pool) {\r\n\t\tsuper();\r\n\t\tthis.pool = pool;\r\n\t}", "public static void main(String[] args) throws UnknownHostException {\n\t\tSystem.out.println(args.length);\n\t\tif(args.length < 3)\n\t\t{\n\t\t\tSystem.out.println(\"请输入 taskId(数字)/要继续的instanceId(前缀i,如i2000), AreaId, ISPId, 浏览器类型(1-hbrowser(默认), 2-IE)\");\n\t\t\treturn;\n\t\t}\n\t\tLog4JIniter.init(\"src\");\n\t\tString ss = args[0];\n\t\tString area = args[1];\n\t\tString isp = args[2];\n\t\tInteger browser = 1;\n\t\ttry{\n\t\t\tInteger b = Integer.parseInt(args[3]);\n\t\t\tif(b == 2)\n\t\t\t\tbrowser = 2;\n\t\t}catch(Exception e)\n\t\t{\n\t\t\t\n\t\t}\n//\t\tss = \"http://www.sina.com.cn\";\n//\t\tString ss = \"http://www.sina.com.cn\";\n//\t\tString area = \"CN1100\";\n//\t\tString isp = \"CN0002\";\n//\t\tSystem.out.println(ss);\n//\t\tNodeConfig.setIsp(\"CN0002\");\n//\t\tNodeConfig.setIp(\"119.57.54.29\");\n//\t\tNodeConfig.setArea(\"CN1100\");\n//\t\tNodeConfig.setClusterId(2);\n\t\tNodeConfig.setIsp(isp);\n\t\tNodeConfig.setIp(InetAddress.getLocalHost().getHostAddress());\n\t\tNodeConfig.setArea(area);\n\t\t\n\t\tInteger clusterId = initCluser(area, isp);\n\t\tNodeConfig.setClusterId(clusterId);\n\t\tInteger instanceId = null;\n\t\tInteger taskId = null;\n\t\ttry{\n\t\t\tif(ss.startsWith(\"i\"))\n\t\t\t{\n\t\t\t\tString s1 = ss.substring(1);\n\t\t\t\tSystem.out.println(s1);\n\t\t\t\tinstanceId = Integer.parseInt(s1);\n\t\t\t}else\n\t\t\t{\n\t\t\t\ttaskId = Integer.parseInt(ss);\n\t\t\t}\n\t\t\t\n\t\t}catch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(\"请输入 taskId(数字)\");\n\t\t\treturn;\n\t\t}\n\t\tInteger nodeId = initNode(clusterId, NodeConfig.getIp());\n\t\trunOne(taskId, instanceId, browser, null);\n\t}", "public static void main(String[] args) {\r\n System.out.println(\"***debut serveur gestion ***\");\r\n new ServeurGestion(50003).fonctionnementService();\r\n \r\n }", "public static void setupTorPoolConnexion() throws Exception {\n\t\t\n\t\tLog.stdout(\"Setting up TorPool connection...\");\n\t\t\n\t\t// check if pool is running.\n\t\tcheckRunningPool();\n\t\t\n\t\tSystem.setProperty(\"socksProxyHost\", \"127.0.0.1\");\n\t\t\n\t\t\n\t\ttry{\n\t\t\t//changePortFromFile(new BufferedReader(new FileReader(new File(\".tor_tmp/ports\"))));\n\t\t\tswitchPort();\n\t\t}catch(Exception e){e.printStackTrace();}\n\t\t\n\t\t//showIP();\n\t\t\n\t\thasTorPoolConnexion = true;\n\t}", "public PlanoGerenciamentoAquisicaoDAO(InterfacePool pool) {\r\n\t\tsuper();\r\n\t\tthis.pool = pool;\r\n\t}", "public void createTasks(Integer _optID, String _tupleTag, String _taskType, String _info1, String _info2, String _destIP, String _port, String _location, long timestamp, Object _appSpecific){ \r\n //System.out.print(\"Create tasks\");\r\n boolean flag = false;\r\n String defaultIP = \"-1\";\r\n String defaultPort = \"-1\";\r\n \r\n //use wildcard to let one worker randomly choose the job to run\r\n //System.out.println(\"---What is optID: \" +_optID);\r\n if(_destIP.equals(\"RANDOM\")){\r\n int tempTaskID = getUpdatedTaskID();\r\n \r\n insertIntoParaList(tempTaskID, _optID, _tupleTag, _taskType,defaultIP,_info1,_info2,defaultPort,_location, timestamp,_appSpecific);\r\n flag = true;\r\n addEntryToResultList(_optID,flag);\r\n //------THE TASK IS INSERTED HERE\r\n insertTask(tempTaskID);\r\n }\r\n //send tuples to all\r\n else if(_destIP.equals(\"ALL\")){\r\n //Iterate through all sites that subscribe to certain types of task \r\n //System.out.println(\"infoSys.getSiteList(): \"+infoSys.getSiteList());\r\n Iterator it = infoSys.getSiteList().entrySet().iterator();\r\n while (it.hasNext()) {\r\n Map.Entry entry = (Map.Entry) it.next();\r\n _destIP = ((String) entry.getKey());\r\n ConcurrentHashMap<String, String> subscribeType = (ConcurrentHashMap<String, String>) entry.getValue();\r\n \r\n //option 2, if there is multiple subscribers of a certain taskType in one site\r\n Iterator subIt = subscribeType.entrySet().iterator();\r\n while (subIt.hasNext()) {\r\n Map.Entry subEntry = (Map.Entry) subIt.next();\r\n String[] typeAndAssociate = subEntry.getValue().toString().split(\",\");\r\n if (typeAndAssociate[0].equals(_tupleTag) && typeAndAssociate[1].equals(_taskType)) {\r\n _port = subEntry.getKey().toString();\r\n\r\n int tempTaskID = getUpdatedTaskID();\r\n insertIntoParaList(tempTaskID, _optID, _tupleTag, _taskType,_destIP, _info1,_info2,_port,_location, timestamp,_appSpecific);\r\n //System.out.println(\"Master out: \"+\"--\"+_tupleTag+\"--\"+_taskType+\"--\"+_optID+\"--\"+_destIP+\"--\"+_budget+\"--\"+_deadline+\"--\"+_port);\r\n flag = true;\r\n addEntryToResultList(_optID,flag);\r\n //------THE TASK IS INSERTED HERE\r\n insertTask(tempTaskID);\r\n \r\n }\r\n }\r\n }\r\n }\r\n //if user choose one specific worker, only send the message to it\r\n else{ \r\n //System.out.println(infoSys.getSiteList());\r\n //Check if this subscriber exists\r\n if (infoSys.hasAssociateSubscriber(_destIP, _port)) {\r\n int tempTaskID = getUpdatedTaskID();\r\n //System.out.println(\"Master out: \"+\"--\"+_tupleTag+\"--\"+_taskType+\"--\"+_optID+\"--\"+_destIP+\"--\"+_budget+\"--\"+_deadline+\"--\"+_port);\r\n insertIntoParaList(tempTaskID, _optID, _tupleTag, _taskType,_destIP,_info1,_info2,_port,_location, timestamp,_appSpecific);\r\n flag = true;\r\n addEntryToResultList(_optID,flag);\r\n insertTask(tempTaskID);\r\n } else {\r\n System.out.println(\"Incorrect destIP or destPort for creating task!\");\r\n }\r\n } \r\n //create entry in resultList\r\n addEntryToResultList(_optID,flag);\r\n }", "public static void main(String[] args) {\n try {\n //创建一个远程对象\n\n String ip = args[0];\n String port = args[1];\n Integer totalSpace = args[2] == null ? 100 :Integer.valueOf(args[2]);\n ChunkServerProperties properties = new ChunkServerProperties();\n properties.setIp(ip);\n properties.setPort(port);\n\n IChunkServerService chunkServer = new BFSChunkServer(totalSpace,0,\"/\",ip);\n\n LocateRegistry.createRegistry(Integer.parseInt(port));\n\n String rmi = \"rmi://\"+properties.getServerIpPort()+\"/chunk_server\";\n Printer.println(rmi);\n Naming.bind(rmi,chunkServer);\n\n String masterRMI =\"rmi://127.0.0.1:8888/master\";\n\n IMasterService masterService =(IMasterService) Naming.lookup(\"rmi://127.0.0.1:8888/master\");\n\n\n masterService.registerChunkServer(properties);\n\n Printer.println(\"register to master \"+masterRMI + \" succcess\");\n\n } catch (RemoteException e) {\n e.printStackTrace();\n } catch (MalformedURLException e) {\n e.printStackTrace();\n } catch (AlreadyBoundException e) {\n e.printStackTrace();\n } catch (NotBoundException e) {\n e.printStackTrace();\n }\n }", "public static LogGPPServer getInstancia()\n\t{\n\t\tif(instancia == null)\n\t\t{\n\t\t\tinstancia = new LogGPPServer(); \n\t\t}\n\n\t\treturn( instancia );\n\t}", "public static void main(String[] argv) {\n try {\n PoolInfoClient test = create();\n System.out.println(test.toString());\n } catch (Exception e) {\n System.out.println(\"Got exception: \");\n e.printStackTrace();\n System.exit(1);\n }\n }", "public interface Pool {\n public PooledConnection getConnection();\n\n public void createConnection(int ocunt);\n}", "private void sendGroupInit() {\n \t\ttry {\n \t\t\tmyEndpt=new Endpt(serverName+\"@\"+vsAddress.toString());\n \n \t\t\tEndpt[] view=null;\n \t\t\tInetSocketAddress[] addrs=null;\n \n \t\t\taddrs=new InetSocketAddress[1];\n \t\t\taddrs[0]=vsAddress;\n \t\t\tview=new Endpt[1];\n \t\t\tview[0]=myEndpt;\n \n \t\t\tGroup myGroup = new Group(\"DEFAULT_SERVERS\");\n \t\t\tvs = new ViewState(\"1\", myGroup, new ViewID(0,view[0]), new ViewID[0], view, addrs);\n \n \t\t\tGroupInit gi =\n \t\t\t\tnew GroupInit(vs,myEndpt,null,gossipServers,vsChannel,Direction.DOWN,this);\n \t\t\tgi.go();\n \t\t} catch (AppiaEventException ex) {\n \t\t\tSystem.err.println(\"EventException while launching GroupInit\");\n \t\t\tex.printStackTrace();\n \t\t} catch (NullPointerException ex) {\n \t\t\tSystem.err.println(\"EventException while launching GroupInit\");\n \t\t\tex.printStackTrace();\n \t\t} catch (AppiaGroupException ex) {\n \t\t\tSystem.err.println(\"EventException while launching GroupInit\");\n \t\t\tex.printStackTrace();\n \t\t} \n \t}", "void agregarConexion(String id, String direccion, String ip) {\n this.s.agregarConexion(id, direccion, ip);\n }", "protected abstract void createPool();", "private void logOperation(String operation, String function) {\r\n m_logger.debug(\"ObjectPool2 '\" + m_desc + \"' \" + operation + \" \" + function);\r\n }", "public String getConcurrentPool() {\n return getPropertyAsString(CONCURRENT_POOL, CONCURRENT_POOL_DEFAULT);\n }", "public static void main(String[] args) {\r\n ExamenSegundo es = new ExamenSegundo();\r\n int num = 9000;\r\n try {\r\n num = Integer.parseInt(JOptionPane.showInputDialog(\"Puerto del servidor(9000-9010)\", 9000));\r\n System.out.println(\"Soy el :\" + num);\r\n lab3.setText(lab3.getText().replace(\"Puerto : \", \"Puerto : \" + num));\r\n lab6.setText(num + \"\");\r\n lab7.setText(num + \"\");\r\n clienteM = new ClienteM(num);\r\n servidorD = new ServidorD(num);\r\n clienteD = new ClienteD(num);\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n System.exit(-1);\r\n }\r\n\r\n Thread sm = new Thread(servidorM);\r\n Thread cm = new Thread(clienteM);\r\n Thread sd = new Thread(servidorD);\r\n //Thread cd = new Thread(clienteD);\r\n// Thread sf = new Thread(servidorF);\r\n// Thread cf = new Thread(clienteF);\r\n\r\n sm.start();\r\n cm.start();\r\n sd.start();\r\n //cd.start();\r\n// sf.start();\r\n// cf.start();\r\n\r\n for (;;) {\r\n try {\r\n ArrayList columnas = servidorM.getServidores();\r\n ArrayList ips = servidorM.getServidoresIp();\r\n// System.out.println(modelo.getRowCount()+\" - \"+columnas.size());\r\n for (int i = modelo1.getRowCount() - 1; i >= 0; i--) {\r\n modelo1.removeRow(i);\r\n }\r\n ips = ordenarIps(columnas, ips);\r\n columnas.sort(null);\r\n for (int i = 0; i < columnas.size(); i++) {\r\n String fila[] = {ips.get(i).toString(), columnas.get(i).toString()};\r\n if (Integer.parseInt(columnas.get(i).toString()) == num) {\r\n clienteD.puertoServidor = Integer.parseInt(columnas.get((i + 1) % columnas.size()).toString());\r\n clienteD.ipServidor = ips.get((i + 1) % columnas.size()).toString().substring(1);\r\n servidorD.ipServidor = ips.get((i + 1) % columnas.size()).toString().substring(1);\r\n servidorD.puerto2 = Integer.parseInt(columnas.get((i + 1) % columnas.size()).toString());\r\n lab6.setText(columnas.get((i - 1 + columnas.size()) % columnas.size()).toString());\r\n lab7.setText(columnas.get((i + 1) % columnas.size()).toString());\r\n }\r\n modelo1.addRow(fila);\r\n }\r\n \r\n String fila[]= new String[1];\r\n for(int i=0;i<servidorD.aBuscados.size();i++){\r\n fila[0]=servidorD.aBuscados.get(i);\r\n modelo2.addRow(fila);\r\n }\r\n servidorD.aBuscados.clear();\r\n \r\n for(int i=0;i<servidorD.aRespuestas.size();i++){\r\n fila[0]=servidorD.aRespuestas.get(i);\r\n modelo3.addRow(fila);\r\n }\r\n servidorD.aRespuestas.clear();\r\n\r\n// System.out.println(\"bla\");\r\n servidorM.servidores.clear();\r\n servidorM.servidoresIp.clear();\r\n Thread.sleep(5000);\r\n } // sm.join();\r\n // cm.join();\r\n // sd.join();\r\n // //cd.join();\r\n // sf.join();\r\n // cf.join();\r\n catch (InterruptedException ex) {\r\n Logger.getLogger(ExamenSegundo.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }", "public ForkJoinPoolMgr() {\n }", "public String getName() {\n return poolName;\n }", "public ConnectionPoolDataSource createPoolDataSource(CConnection connection);", "public ConnectionPoolDataSource createPoolDataSource(CConnection connection);", "public Pooled(T t, Pool<T> pool, LogTarget logTarget) {\n\t\t\tcontent = t;\n\t\t\tthis.pool = pool;\n\t\t\tthis.logTarget = logTarget;\n\t\t}", "String process_mgr_name () throws BaseException;", "private RepositorioOrdemServicoHBM() {\n\n\t}", "public HibernateTrapdIpMgr() {\n }", "public static void main( String[] args )\n {\n\n\t\tString tarjetaCredito = \"4916119711304546\";\n\t\tString origen = \"Aeroport Son Sant Joan\";\n\t\tString destino = \"Magaluf\";\n\t\tdouble distancia = 7.75;\n\t\tint tiempoEsperadoMinutos = 10;\n\n\t\tCarrera carrera = new Carrera(tarjetaCredito);\n\t\tcarrera.setOrigen(origen);\n\t\tcarrera.setDestino(destino);\n\t\tcarrera.setDistancia(distancia);\n\t\tcarrera.setTiempoEsperado(tiempoEsperadoMinutos);\n\n\t\tSystem.out.println(\"\\n#####\" + \"\\t Set Pickup: \\t\" + \"#####\\n\");\n\n\t\tSystem.out.println(\"Visa: \" + carrera.getTarjetaCredito());\n\t\tSystem.out.println(\"From: \" + carrera.getOrigen());\n\t\tSystem.out.println(\"To: \" + carrera.getDestino());\n\t\tSystem.out.println(\"Distance: \" + carrera.getDistancia());\n\n\t\tSystem.out.println(\"\\n#####\" + \"\\t See your Cost: \\t\" + \"#####\\n\");\n\n\t\tSystem.out.println(\"Visa: \" + carrera.getTarjetaCredito());\n\t\tSystem.out.println(\"From: \" + carrera.getOrigen());\n\t\tSystem.out.println(\"To: \" + carrera.getDestino());\n\t\tSystem.out.println(\"Distance: \" + carrera.getDistancia());\n\t\tSystem.out.println(\"Total: \" + carrera.getCosteEsperado() + \"€\");\n\n\t\tSystem.out.println(\"\\n#####\" + \"\\t Get a ride: Driver: \\t\" + \"#####\\n\");\n\n\t\t/**\n\t\t * Necesitamos crear la flota de conductores de donde seleccionar uno\n\t\t * para ofrecer el servicio.\n\t\t * La flota es un objeto de tipo PoolConductores.\n\t\t */\n\n\t\tList<Conductor> poolConductores = new ArrayList<Conductor>();\n\t\tConductor conductor = null;\n\n\t\t// creamos objetos conductor y los metemos en el array\n\n\t\tString[] nombres = { \"Samantha\", \"Fox\", \"Mola\" };\n\t\tfor (String nombre : nombres) {\n\t\t\tconductor = new Conductor(nombre);\n\t\t\tpoolConductores.add(conductor);\n\t\t}\n\n\t\tString[] matricula = { \"4ABC123\", \"5DHJ444\", \"7JKK555\" };\n\t\tString[] modelos = { \"Chevy Malibu\", \"Toyota Prius\", \"Mercedes A\" };\n\n\t\tint index = 0;\n\t\tfor (Conductor conductora : poolConductores) {\n\t\t\tconductora.setMatricula(matricula[index]);\n\t\t\tconductora.setModelo(modelos[index]);\n\t\t\t// suponemos que las conductoras tienen una valoracion inicial de 4 stars\n\t\t\tconductora.setValoracion((byte) 4);\n\t\t\tindex++;\n\t\t}\n\n\t\t// Creamos el objeto flota de conductores, de la clase PoolConductores.\n\n\t\tPoolConductores conductores = new PoolConductores(poolConductores);\n\n\t\t/* Seleccion del conductor en la flota y asignacion a la carrera */\n\n\t\tcarrera.asignarConductor(conductores);\n\n\t\t// Info por pantalla\n\n\t\tSystem.out.println(\"Driver: \" + carrera.getConductor().getNombre());\n\t\tSystem.out.println(\"Type: \" + carrera.getConductor().getModelo());\n\t\tSystem.out.println(\"Matricula: \" + carrera.getConductor().getMatricula());\n\t\tSystem.out.println(\"Stars: \" + carrera.getConductor().getValoracion());\n\t\tSystem.out.println(\"From: \" + carrera.getOrigen());\n\t\tSystem.out.println(\"To: \" + carrera.getDestino());\n\t\tboolean ocupado = carrera.getConductor().isOcupado();\n\t\tif (ocupado) {\n\t\t\tSystem.out.println(\"Disponible para ti\");\n\t\t} else {\n\t\t\tSystem.out.println(\"Esta conductora no esta disponible :/\");\n\t\t}\n\t\t// cancel ride\n\t\t// contact by phone\t\t\n\n\t\tSystem.out.println(\"\\n#####\" + \"\\t Pay and Tip: \\t\" + \"#####\\n\");\n\n\t\tcarrera.realizarPago(carrera.getCosteEsperado());\n\t\tcarrera.recibirPropina(1);\n\t\tcarrera.liberarConductor();\n\n\t\tSystem.out.println(\"Driver: \" + carrera.getConductor().getNombre());\n\t\tSystem.out.println(\"TIP: \" + carrera.getPropina());\n\t\tSystem.out.println(\"Visa: \" + carrera.getTarjetaCredito());\n\t\tSystem.out.println(\"Total: \" + carrera.getCosteTotal());\n\t\tSystem.out.println(\"Ocupado?: \" + carrera.getConductor().isOcupado());\n\n\t\tSystem.out.println(\"\\n#####\" + \"\\t Rate your driver: \\t\" + \"#####\\n\");\n\n\t\tcarrera.getConductor().setValoracion((byte) 5);\n\n\t\tSystem.out.println(\"Driver: \" + carrera.getConductor().getNombre());\n\t\tSystem.out.println(\"Stars: \" + carrera.getConductor().getValoracion());\n }", "public void setPoolId(Long poolId);", "public void start() {\n synchronized (initLock) {\n\n try {\n connectionPool = new ConnectionPool(driver, serverURL, username,\n password, minConnections, maxConnections, connectionTimeout,\n mysqlUseUnicode);\n }\n catch (IOException e) {\n Log.error(e);\n }\n }\n }", "public PaymentSessionPool(String path, String domain,\n boolean waitIfBusy)\n throws Exception {\n\n Properties props = new Properties();\n InputStreamReader in = null;\n try {\n //in =this.getC getResourceAsStream\n in = new InputStreamReader(new FileInputStream(path + \"/\" + domain + \".properties\"), \"UTF-8\");\n props.load(in);\n this.url = props.getProperty(\"cg.url\");\n this.appId = props.getProperty(\"cg.appId\");\n this.user = props.getProperty(\"cg.user\");\n this.password = props.getProperty(\"cg.password\");\n this.rcode = props.getProperty(\"cg.rcode\");\n this.domainId = props.getProperty(\"cg.domainId\");\n\n initialConnections = Integer.parseInt(props.getProperty(\"initconnections\"));\n maxConnections = Integer.parseInt(props.getProperty(\"maxConnections\"));\n\n LOG.debug(domain + \" :pool initiallise start\" + appId + \":\" + user + \":\" + password + \":\" + rcode + \":\" + domainId);\n System.out.println(domain + \" :pool initiallise start\");\n\n } catch (FileNotFoundException e) {\n // e.printStackTrace();\n System.err.println(\n \"Check your Property file, it should be in application home dir, Error:\"\n + e.getCause() + \"Cant load APPLICATION.properties\");\n //System.exit(-1);\n } catch (IOException e) {\n System.err.println(\n \"Check your Property file, it should be in application home dir, Error:\"\n + e.getCause() + \"Cant load APPLICATION.properties\");\n //System.exit(-1);\n } finally {\n if (null != in) {\n try {\n in.close();\n } catch (IOException ex) {\n }\n }\n }\n\n this.maxConnections = maxConnections;\n this.waitIfBusy = waitIfBusy;\n if (initialConnections > maxConnections) {\n initialConnections = maxConnections;\n }\n availableConnections = new Vector(initialConnections);\n busyConnections = new Vector();\n for (int i = 0; i < initialConnections; i++) {\n availableConnections.addElement(makeNewConnection());\n }\n\n LOG.debug(domain + \" :pool initiallise completed\");\n System.out.println(domain + \" :pool initiallise completed\");\n\n }", "public MeteoService(ComConnexions_I comConnexion)\n\t\t{\n\t\tsuper(comConnexion.getNamePort());\n\n\t\tthis.comConnexion = comConnexion;\n\t\t}", "public TelaCliente() {\n\n try {\n Handler console = new ConsoleHandler();\n Handler file = new FileHandler(\"/tmp/roquerou.log\");\n console.setLevel(Level.ALL);\n file.setLevel(Level.ALL);\n file.setFormatter(new SimpleFormatter());\n LOG.addHandler(file);\n LOG.addHandler(console);\n LOG.setUseParentHandlers(false);\n } catch (IOException io) {\n LOG.warning(\"O ficheiro hellologgin.xml não pode ser criado\");\n }\n\n initComponents();\n NivelDAO nd = new NivelDAO();\n if (nd.buscar() == 3) {\n botaoNovoCliente.setEnabled(false);\n buscarcli.setEnabled(false);\n tabelaCliente.setEnabled(false);\n popularCombo();\n setarLabels();\n\n LOG.info(\"Abertura da Tela de Clientes\");\n } else {\n popularCombo();\n setarLabels();\n\n LOG.info(\"Abertura da Tela de Clientes\");\n }\n }", "public WorkerPool(String name) {\n this.name = name;\n\n log = LogFactory.getLog(WorkerPool.class.getName() + \":\" + name);\n }", "public SRWDatabasePool() {\n }", "protected String logInstanceName() {\n\t\treturn getClass().getName();\n\t}", "public void body() {\r\n \t // wait for a little while for about 3 seconds.\r\n // This to give a time for GridResource entities to register their\r\n // services to GIS (GridInformationService) entity.\r\n super.gridSimHold(1000.0);\r\n System.out.println(name_ + \": retrieving GridResourceList\");\r\n LinkedList resList = super.getGridResourceList();\r\n double[] sendTime = new double[totalGridlet];\r\n double[] receiveTime = new double[totalGridlet];\r\n \r\n // initialises all the containers\r\n int totalResource = resList.size();\r\n write(name_ + \": obtained \" + totalResource + \" resource IDs in GridResourceList\");\r\n int resourceID[] = new int[totalResource];\r\n String resourceName[] = new String[totalResource];\r\n \r\n //get characteristics of resources\r\n ResourceCharacteristics resChar;\r\n double resourceCost[] = new double[totalResource];\r\n double resourcePEs[] = new double[totalResource];\r\n int i = 0 ;\r\n for (i = 0; i < totalResource; i++)\r\n {\r\n // Resource list contains list of resource IDs not grid resource\r\n // objects.\r\n resourceID[i] = ( (Integer)resList.get(i) ).intValue();\r\n\r\n // Requests to resource entity to send its characteristics\r\n super.send(resourceID[i], GridSimTags.SCHEDULE_NOW,\r\n GridSimTags.RESOURCE_CHARACTERISTICS, this.myId_);\r\n\r\n // waiting to get a resource characteristics\r\n resChar = (ResourceCharacteristics) super.receiveEventObject();\r\n resourceName[i] = resChar.getResourceName();\r\n resourceCost[i] = resChar.getCostPerSec();\r\n resChar.getNumFreePE();\r\n resourcePEs[i] = resChar.getNumPE();\r\n\r\n write(\"Received ResourceCharacteristics from \" +\r\n resourceName[i] + \", with id = \" + resourceID[i] + \" with \" + resourcePEs[i] + \" PEs\");\r\n\r\n // record this event into \"stat.txt\" file\r\n super.recordStatistics(\"\\\"Received ResourceCharacteristics \" +\r\n \"from \" + resourceName[i] + \"\\\"\", \"\");\r\n }\r\n \r\n //total PE number\r\n double totalPEs = 0;\r\n for(i = 0; i < totalResource; i++){\r\n \ttotalPEs += resourcePEs[i];\r\n }\r\n\r\n\r\n ////////////////////////////////////////////////\r\n // SUBMIT Gridlets\r\n Gridlet gl = null;\r\n boolean success;\r\n \r\n //initial populating of PEs\r\n \r\n int j = 0; //number of gridlet\r\n int k = 0; // number of PE\r\n startTime = GridSim.clock(); ///Start time of the submission;\r\n for(i = 0; i < totalResource; i++){ \r\n \tfor(k = 0; k < resourcePEs[i] && j < list_.size(); k++){\r\n \t\tgl = (Gridlet) list_.get(j);\r\n \t\tif(j % chunkSize == 0){\r\n \t\t\tSystem.out.println(\" .\" + j + \" / \" + totalGridlet );\r\n \t\t\t//write(name_ + \"Sending Gridlet #\" + j + \"with id \" + gl.getGridletID() + \" to PE \" + k + \" at \" + resourceName[i] + \" at time \" + GridSim.clock());\r\n \t\t}\r\n \t\t\t//write(gridletToString(gl));\r\n success = super.gridletSubmit(gl, resourceID[i]);\r\n sendTime[j]= GridSim.clock(); //remember the time when the gridlet was submited\r\n j++;\r\n \t}\r\n }\r\n write(name_ +\"%%%%%%%%%%% \" + j + \"gridlets submitted, \" + (list_.size() - j) + \" gridlets left after initial submision\");\r\n \r\n ////////////////////////////////////////////////////////\r\n // RECEIVES Gridlets and submit new\r\n\r\n // hold for few period - few seconds since the Gridlets length are\r\n // quite huge for a small bandwidth\r\n //super.gridSimHold(5);\r\n \r\n int resourceFromID = 0;\r\n String resourceFromName = null;\r\n \r\n // receives the gridlet back\r\n for (i = 0; i < totalGridlet; i++){ //loop over received gridlets\r\n gl = (Gridlet) super.receiveEventObject(); // gets the Gridlet\r\n if( i==0 ) { saturationStart = GridSim.clock();} //first gridlet received \r\n receiveTime[list_.indexOf(gl)]= GridSim.clock(); //remember the time when the gridlet was received\r\n receiveList_.add(gl); // add into the received list \r\n resourceFromID = gl.getResourceID(); //resource which has a free PE\r\n resourceFromName = GridSim.getEntityName(resourceFromID);\r\n //if(j % (list_.size() / 100) == 0){\r\n \t//write(name_ + \": Receiving Gridlet #\" +\r\n //gl.getGridletID() + \"from: \" + resourceFromName + \" at time = \" + GridSim.clock() );\r\n //}\r\n \r\n if(j < totalGridlet){ //if not all gridlets are submitted\r\n \t//submit next gridlet\r\n \tgl = (Gridlet) list_.get(j);\r\n \t//if(j % (list_.size() / 100) == 0){\r\n \t\t//write(name_ + \"Sending next Gridlet #\" + j + \"with id \" + gl.getGridletID() + \" to \" + resourceFromName + \" at time \" + GridSim.clock());\r\n \t//}\r\n \t\r\n \t\tif(j % chunkSize == 0){\r\n \t\t\tSystem.out.println(\" .\" + j + \" / \" + totalGridlet );\r\n \t\t}\r\n \tsuccess = super.gridletSubmit(gl, resourceFromID);\r\n sendTime[j]= GridSim.clock(); //remember the time when the gridlet was submited\r\n j++;\r\n if (j == totalGridlet){\r\n \twrite(name_ + \" ALL GRIDLETS SUBMITTED\");\r\n \tsaturationFinish = GridSim.clock();\r\n }\r\n } \r\n }\r\n finishTime = GridSim.clock();\r\n \r\n ////////////print statistics\r\n //printGridletList(receiveList_, name_);\r\n for (i = 0; i < list_.size(); i += list_.size() / 5){\r\n \tgl = (Gridlet) list_.get(i);\r\n \tprintGridletHist(gl);\r\n }\r\n \r\n ////print transfer times \r\n System.out.println(\"-------------gridlet log--------------\");\r\n System.out.println(\"getGridletID getResourceID getGridletLength \tgetGridletFileSize\t getGridletOutputSize\t \tinTransfer\t \t\toutTransfer\t\t getWallClockTime\t\ttotalTime \t\t\tslowdown\");\r\n\r\n double inTransfer, outTransfer, totalTime, slowdown; \r\n String indent = \"\t\t\";\r\n for (i = 0; i < list_.size(); i += chunkSize / 5){\r\n \tgl = (Gridlet) list_.get(i);\r\n \tinTransfer = gl.getExecStartTime() - sendTime[i];\r\n \toutTransfer = receiveTime[i] - gl.getFinishTime();\r\n \ttotalTime = receiveTime[i] - sendTime[i];\r\n \tslowdown = totalTime / gl.getWallClockTime();\r\n \twrite(gl.getGridletID() + indent + gl.getResourceID() + indent + gl.getGridletLength() + indent + gl.getGridletFileSize() + indent + gl.getGridletOutputSize() + indent +\r\n \t\t\tinTransfer + indent + outTransfer + indent + gl.getWallClockTime() + indent + totalTime + indent + slowdown);\r\n \t\r\n }\r\n\r\n\r\n ////////////////////////////////////////////////////////\r\n //ping resources\r\n for(i = 0; i < totalResource; i++){ \r\n \tpingRes(resourceID[i]);\r\n }\r\n \r\n ///calculate computational efficiency per resource\r\n double[] firstJobSend = new double[totalResource];\r\n double[] lastJobReceived = new double[totalResource];\r\n double[] work = new double[totalResource];\r\n int[] jobs = new int[totalResource];\r\n \r\n double[] outminTransferTime = new double[totalResource];\r\n double[] outmaxTransferTime = new double[totalResource];\r\n double[] outtransferTime = new double[totalResource];\r\n \r\n double[] minTransferTime = new double[totalResource];\r\n double[] maxTransferTime = new double[totalResource];\r\n double[] transferTime = new double[totalResource];\r\n //initialize values\r\n for(i = 0; i < totalResource; i++){\r\n \tfirstJobSend[i] = Double.MAX_VALUE;\r\n \tlastJobReceived[i] = 0.0;\r\n \twork[i] = 0.0;\r\n \tjobs[i] = 0;\r\n \tminTransferTime[i] = Double.MAX_VALUE;\r\n \tmaxTransferTime[i] = 0.0;\r\n \ttransferTime[i] = 0.0;\r\n \t\r\n \toutminTransferTime[i] = Double.MAX_VALUE;\r\n \toutmaxTransferTime[i] = 0.0;\r\n \touttransferTime[i] = 0.0;\r\n }\r\n \r\n double gridletTransferTime;\r\n double outgridletTransferTime;\r\n for (j = 0; j < list_.size(); j++){ //loop over gridlets\r\n \tgl = (Gridlet) list_.get(j);\r\n \tfor(i = 0; i < totalResource; i++){ //loop over resources\r\n \t\tif(gl.getResourceID() == resourceID[i]){\r\n \t\t\tjobs[i]++;\r\n \t\t\twork[i] += gl.getActualCPUTime();\r\n \t\t\tgridletTransferTime = gl.getSubmissionTime() - sendTime[j];\r\n \t\t\toutgridletTransferTime = receiveTime[j] - gl.getFinishTime();\r\n \t\t\ttransferTime[i] += gridletTransferTime;\r\n \t\t\touttransferTime[i] += outgridletTransferTime;\r\n \t\t\tif(firstJobSend[i] > sendTime[j]) { firstJobSend[i] = sendTime[j]; } //serch for the first job submited to the resource \r\n \t\t\tif( lastJobReceived[i] < receiveTime[j] ) { lastJobReceived[i] = receiveTime[j]; } //search for the last job arrived from the resource \r\n \t\t\tif( minTransferTime[i] > gridletTransferTime ) { minTransferTime[i] = gridletTransferTime; }\r\n \t\t\tif( maxTransferTime[i] < gridletTransferTime ) { maxTransferTime[i] = gridletTransferTime; }\r\n \t\t\tif( outminTransferTime[i] > outgridletTransferTime ) { outminTransferTime[i] = outgridletTransferTime; }\r\n \t\t\tif( outmaxTransferTime[i] < outgridletTransferTime ) { outmaxTransferTime[i] = outgridletTransferTime; }\r\n \t\t\t\r\n \t\t\tbreak;\r\n \t\t\t\r\n \t\t}\r\n \t}\r\n }\r\n \r\n ///////////////////////////////////////\r\n //print computational efficiency \r\n double cost = 1.0;\r\n double efficiency = 0.0;\r\n indent = \"\t\";\r\n System.out.println(\"#####################Computational efficiency######################\");\r\n System.out.println(\"Name PEs\tjobs\tfirstJobSend\tlastJobReceived\tcost\t\twork\tefficiency\tminTransfer\tmaxTransfer\t\"\r\n \t\t+ \"averageTransfer\toutminTrans\toutmaxTrans\taverageOutTrans\");\r\n for(i = 0; i < totalResource; i++){ //loop over resources\r\n \tcost = (lastJobReceived[i] - firstJobSend[i]) * resourcePEs[i] ;\r\n \tefficiency = work[i] / cost; \t\r\n \t\r\n \tSystem.out.print(String.format(\"%6s\t\", resourceName[i]));\r\n \tSystem.out.print(String.format(\"%5.0f\t\",resourcePEs[i] ));\r\n \tSystem.out.print(String.format(\"%d\t\",jobs[i] ));\r\n \tSystem.out.print(String.format(\"%10.3f\t\",firstJobSend[i]));\r\n \tSystem.out.print(String.format(\"%10.3f\t\",lastJobReceived[i]));\r\n \tSystem.out.print(String.format(\"%10.3f\t\",cost));\r\n \tSystem.out.print(String.format(\"%10.3f\t\",work[i])); \t\r\n \tSystem.out.print(String.format(\"%2.3f\t\",efficiency));\r\n \t\r\n \tSystem.out.print(String.format(\"%10.3f\t\",minTransferTime[i]));\r\n \tSystem.out.print(String.format(\"%10.3f\t\",maxTransferTime[i]));\r\n \tSystem.out.print(String.format(\"%10.3f\t\",(transferTime[i] / jobs[i]) ) );\r\n \tSystem.out.print(String.format(\"%10.3f\t\",outminTransferTime[i]));\r\n \tSystem.out.print(String.format(\"%10.3f\t\",outmaxTransferTime[i]));\r\n \tSystem.out.println(String.format(\"%10.3f\t\",(outtransferTime[i] / jobs[i]) ));\r\n \t\r\n\r\n \r\n \tSystem.out.println();\r\n \r\n }\r\n \r\n /////////////////////////////\r\n //print overall statistics\r\n write(\"---------------summary------------------\");\r\n write(\"Number of gridlets: \" + totalGridlet);\r\n write(\" Resources: \" + totalResource);\r\n write(\" PEs: \" + totalPEs);\r\n \r\n write(\" Submission start: \" + startTime);\r\n write(\" saturationStart: \" + saturationStart);\r\n write(\" saturationFinish: \" + saturationFinish);\r\n write(\" Last receive: \" + finishTime);\r\n \r\n write(\" Makespan: \" + (finishTime - startTime));\r\n write(\" Saturated interval: \" + (saturationFinish - saturationStart));\r\n write(\" Saturated time ratio: \" + (saturationFinish - saturationStart) / (finishTime - startTime));\r\n write(\"------------------------------------------\");\r\n\r\n ////////////////////////////////////////////////////////\r\n // shut down I/O ports\r\n shutdownUserEntity();\r\n terminateIOEntities();\r\n\r\n // don't forget to close the file\r\n if (report_ != null) {\r\n report_.finalWrite();\r\n }\r\n\r\n write(this.name_ + \": sending and receiving of Gridlets\" +\r\n \" complete at \" + GridSim.clock() );\r\n \r\n\r\n \r\n \r\n ////////////////////////////////////////////////////////\r\n // shut down I/O ports\r\n shutdownUserEntity();\r\n terminateIOEntities();\r\n System.out.println(this.name_ + \":%%%% Exiting body() at time \" +\r\n GridSim.clock());\r\n }", "public BoneCP getPool() {\n return pool;\n }", "public EnviarArchivo(String ip) {\n initComponents();\n //iniciamos configuracion de la ventana\n iniciarVentana();\n //colocamos icono a la ventana\n this.setTitle(\"Enviar a todos los equipos dentro del grupo\");\n //guardamos en la variable global la direccion/hostname resivida\n this.ip=ip;\n \n \n }", "void setPoolId(java.lang.String poolId);", "public ManagedProductosDivisionLotes() {\n this.LOGGER = LogManager.getRootLogger();\n }", "public void infoServiceRequest(String requestType, String param){\r\n \r\n InetAddress destAddr = null;\r\n String[] nodeInfo = null;\r\n String ip = this.getPeerIP().split(\":\")[0].substring(2);\r\n try {\r\n destAddr = InetAddress.getByName(ip);\r\n } catch (UnknownHostException ex) {\r\n FedLog.writeLog(this.getPeerIP().split(\":\")[1], \"masterLog%g-\" + this.getPeerIP().substring(2) + \".log\", FedLog.getExceptionStack(ex), \"severe\");\r\n }\r\n int destPort = Integer.parseInt(managerInfoServicePort);\r\n \r\n DataOutputStream output;\r\n DataInputStream input;\r\n \r\n Socket sock = null;\r\n boolean connected = false;\r\n while (!connected) {\r\n try {\r\n sock = new Socket(destAddr, destPort);\r\n connected = true;\r\n } catch (IOException ex) {\r\n try {\r\n Thread.sleep(500);\r\n } catch (InterruptedException ex1) {\r\n FedLog.writeLog(this.getPeerIP().split(\":\")[1], \"masterLog%g-\" + this.getPeerIP().substring(2) + \".log\", FedLog.getExceptionStack(ex1), \"severe\");\r\n }\r\n }\r\n }\r\n try {\r\n output = new DataOutputStream(sock.getOutputStream());\r\n input = new DataInputStream(sock.getInputStream()); \r\n \r\n if(requestType.equals(\"UPDATE\")){\r\n output.writeUTF(requestType+\"-LOCAL\");\r\n output.flush();\r\n String infoServiceList = input.readUTF();\r\n infoSys.updateInfo(infoServiceList);\r\n }\r\n else if(requestType.equals(\"POISON\")){\r\n output.writeUTF(requestType+\"-LOCAL-\"+param);\r\n output.flush();\r\n infoSys.removeInfo(param);\r\n }\r\n else if(requestType.equals(\"ADD\")){\r\n output.writeUTF(requestType+\"-LOCAL-\"+param);\r\n output.flush();\r\n String infoServiceList = input.readUTF();\r\n //update local information service list\r\n infoSys.updateInfo(infoServiceList);\r\n }\r\n else if(requestType.equals(\"CPT-UPDATE\")){\r\n output.writeUTF(requestType);\r\n output.flush();\r\n String cptNode = input.readUTF();\r\n String[] cptNodes = cptNode.split(\", \");\r\n List singleCptList = new ArrayList<String>();\r\n for(int i = 0 ; i < cptNodes.length; ++i){\r\n singleCptList.add(cptNodes[i].substring(1,cptNodes[i].indexOf(\"]\")));\r\n }\r\n updateSubscriberList(\"CPT\",singleCptList); \r\n }\r\n else if(requestType.equals(\"CPT-DELETE\")){\r\n output.writeUTF(requestType+\"-\"+param);\r\n output.flush();\r\n subscriberList.get(\"CPT\").remove(param);\r\n }\r\n else if(requestType.equals(\"REQ-UPDATE\")){\r\n output.writeUTF(requestType);\r\n output.flush();\r\n String reqNode = input.readUTF();\r\n String[] reqNodes = reqNode.split(\", \");\r\n List reqList = new ArrayList<String>();\r\n for(int i = 0 ; i < reqNodes.length; ++i){\r\n reqList.add(reqNodes[i].substring(1,reqNodes[i].indexOf(\"]\")));\r\n }\r\n updateSubscriberList(\"REQ\",reqList); \r\n }\r\n else if(requestType.equals(\"REQ-DELETE\")){\r\n output.writeUTF(requestType+\"-\"+param);\r\n output.flush();\r\n subscriberList.get(\"REQ\").remove(param);\r\n }\r\n output.close();\r\n input.close();\r\n sock.close();\r\n } catch (IOException ex) {\r\n FedLog.writeLog(this.getPeerIP().split(\":\")[1], \"masterLog%g-\" + this.getPeerIP().substring(2) + \".log\", FedLog.getExceptionStack(ex), \"severe\");\r\n }\r\n }", "public Servicio(String servicio){\n nombreServicio = servicio;\n }", "public static void viewConnections(){\n\t\tfor(int i=0; i<Server.clients.size();i++){\n\t\t\tServerThread cliente = Server.clients.get(i);\n\t\t\tlogger.logdate(cliente.getConnection().getInetAddress().getHostName());\n\t\t}\n\t}", "public ServerInfo() {\n this.logger = null;\n }", "@Override\n public String toString() {\n return \"PoolOfExistingAcceptedDrivers{\" + \"validator=\" + validator\n + \", poolOfExistingAcceptedDrivers=\" + poolOfExistingAcceptedDrivers + '}';\n }", "@Override\r\n /* OSINE791 - RSIS1 - Inicio */\r\n //public ExpedienteDTO generarExpedienteOrdenServicio(ExpedienteDTO expedienteDTO,String codigoTipoSupervisor,UsuarioDTO usuarioDTO) throws ExpedienteException{\r\n public ExpedienteGSMDTO generarExpedienteOrdenServicio(ExpedienteGSMDTO expedienteDTO,String codigoTipoSupervisor,UsuarioDTO usuarioDTO,String sigla) throws ExpedienteException{\r\n LOG.error(\"generarExpedienteOrdenServicio\");\r\n ExpedienteGSMDTO retorno= new ExpedienteGSMDTO();\r\n try{\r\n expedienteDTO.setEstado(Constantes.ESTADO_ACTIVO);\r\n PghExpediente pghExpediente = ExpedienteGSMBuilder.toExpedienteDomain(expedienteDTO);\r\n pghExpediente.setFechaEstadoProceso(new Date());\r\n pghExpediente.setDatosAuditoria(usuarioDTO);\r\n crud.create(pghExpediente);\r\n retorno=ExpedienteGSMBuilder.toExpedienteDto(pghExpediente);\r\n \r\n //reg historicoEstado\r\n MaestroColumnaDTO tipoHistorico=maestroColumnaDAO.findMaestroColumna(Constantes.DOMINIO_TIPO_COMPONENTE, Constantes.APLICACION_INPS, Constantes.CODIGO_TIPO_COMPONENTE_EXPEDIENTE).get(0);\r\n /* OSINE_SFS-480 - RSIS 40 - Inicio */\r\n HistoricoEstadoDTO historicoEstado=historicoEstadoDAO.registrar(pghExpediente.getIdExpediente(), null, pghExpediente.getIdEstadoProceso().getIdEstadoProceso(), pghExpediente.getIdPersonal().getIdPersonal(), pghExpediente.getIdPersonal().getIdPersonal(), tipoHistorico.getIdMaestroColumna(),null,null, null, usuarioDTO);\r\n LOG.info(\"historicoEstado-->\"+historicoEstado);\r\n /* OSINE_SFS-480 - RSIS 40 - Fin */\r\n //inserta ordenServicio\r\n Long idLocador=codigoTipoSupervisor.equals(Constantes.CODIGO_TIPO_SUPERVISOR_PERSONA_NATURAL)?expedienteDTO.getOrdenServicio().getLocador().getIdLocador():null;\r\n Long idSupervisoraEmpresa=codigoTipoSupervisor.equals(Constantes.CODIGO_TIPO_SUPERVISOR_PERSONA_JURIDICA)?expedienteDTO.getOrdenServicio().getSupervisoraEmpresa().getIdSupervisoraEmpresa():null;\r\n OrdenServicioDTO OrdenServicioDTO=ordenServicioDAO.registrar(retorno.getIdExpediente(), \r\n expedienteDTO.getOrdenServicio().getIdTipoAsignacion(), expedienteDTO.getOrdenServicio().getEstadoProceso().getIdEstadoProceso(), \r\n /* OSINE791 - RSIS1 - Inicio */\r\n //codigoTipoSupervisor, idLocador, idSupervisoraEmpresa, usuarioDTO);\r\n codigoTipoSupervisor, idLocador, idSupervisoraEmpresa, usuarioDTO,sigla);\r\n /* OSINE791 - RSIS1 - Fin */\r\n LOG.info(\"OrdenServicioDTO:\"+OrdenServicioDTO.getNumeroOrdenServicio());\r\n //busca idPersonalDest\r\n PersonalDTO personalDest=null;\r\n List<PersonalDTO> listPersonalDest=null;\r\n if(codigoTipoSupervisor.equals(Constantes.CODIGO_TIPO_SUPERVISOR_PERSONA_NATURAL)){\r\n //personalDest=personalDAO.find(new PersonalFilter(expedienteDTO.getOrdenServicio().getLocador().getIdLocador(),null)).get(0);\r\n listPersonalDest=personalDAO.find(new PersonalFilter(expedienteDTO.getOrdenServicio().getLocador().getIdLocador(),null));\r\n }else if(codigoTipoSupervisor.equals(Constantes.CODIGO_TIPO_SUPERVISOR_PERSONA_JURIDICA)){\r\n //personalDest=personalDAO.find(new PersonalFilter(null,expedienteDTO.getOrdenServicio().getSupervisoraEmpresa().getIdSupervisoraEmpresa())).get(0);\r\n listPersonalDest=personalDAO.find(new PersonalFilter(null,expedienteDTO.getOrdenServicio().getSupervisoraEmpresa().getIdSupervisoraEmpresa()));\r\n }\r\n if(listPersonalDest==null || listPersonalDest.isEmpty()){\r\n throw new ExpedienteException(\"La Empresa Supervisora no tiene un Personal asignado\",null);\r\n }else{\r\n personalDest=listPersonalDest.get(0);\r\n }\r\n //inserta historico Orden Servicio\r\n EstadoProcesoDTO estadoProcesoDto=estadoProcesoDAO.find(new EstadoProcesoFilter(Constantes.IDENTIFICADOR_ESTADO_PROCESO_OS_REGISTRO)).get(0);\r\n MaestroColumnaDTO tipoHistoricoOS=maestroColumnaDAO.findMaestroColumna(Constantes.DOMINIO_TIPO_COMPONENTE, Constantes.APLICACION_INPS, Constantes.CODIGO_TIPO_COMPONENTE_ORDEN_SERVICIO).get(0);\r\n /* OSINE_SFS-480 - RSIS 40 - Inicio */\r\n HistoricoEstadoDTO historicoEstadoOS=historicoEstadoDAO.registrar(null, OrdenServicioDTO.getIdOrdenServicio(), estadoProcesoDto.getIdEstadoProceso(), expedienteDTO.getPersonal().getIdPersonal(), personalDest.getIdPersonal(), tipoHistoricoOS.getIdMaestroColumna(),null,null, null, usuarioDTO); \r\n LOG.info(\"historicoEstadoOS:\"+historicoEstadoOS);\r\n /* OSINE_SFS-480 - RSIS 40 - Fin */\r\n retorno.setOrdenServicio(new OrdenServicioDTO(OrdenServicioDTO.getIdOrdenServicio(),OrdenServicioDTO.getNumeroOrdenServicio()));\r\n }catch(Exception e){\r\n LOG.error(\"error en generarExpedienteOrdenServicio\",e);\r\n throw new ExpedienteException(e.getMessage(), e);\r\n }\r\n return retorno;\r\n }", "public static void main(String[] args) throws MalformedURLException, Exception {\n int maxPopulationSize = 35000;\r\n\r\n\r\n // set to true in order to make server wait for at least 1 client, for instance viewer client\r\n boolean waitForClients = false;\r\n\r\n // END: CUSTOMIZE -------------------------------------------------\r\n\r\n // open server port for clients to connect to\r\n SimulationServer.INSTANCE.startAcceptingNonBlocking();\r\n SimulationServer.INSTANCE.setWaitForClients(waitForClients);\r\n\r\n DvrpConfigGroup dvrpConfigGroup = new DvrpConfigGroup();\r\n dvrpConfigGroup.setTravelTimeEstimationAlpha(0.05);\r\n\r\n File configFile = new File(args[0]);\r\n //Config config = ConfigUtils.loadConfig(configFile.toString(), new AVConfigGroup(), dvrpConfigGroup);\r\n Config config = ConfigUtils.loadConfig(configFile.toString(), new AVConfigGroup(), dvrpConfigGroup, new BlackListedTimeAllocationMutatorConfigGroup());\r\n Scenario scenario = ScenarioUtils.loadScenario(config);\r\n final Population population = scenario.getPopulation();\r\n MatsimStaticDatabase.initializeSingletonInstance( //\r\n scenario.getNetwork(), ReferenceFrame.IDENTITY);\r\n \r\n \r\n// // admissible Nodes sebhoerl\r\n// final Network network = scenario.getNetwork();\r\n// \r\n// FileInputStream stream = new FileInputStream(ConfigGroup.getInputFileURL(config.getContext(), \"nodes.list\").getPath());\r\n// BufferedReader reader = new BufferedReader(new InputStreamReader(stream));\r\n//\r\n// final Set<Node> permissibleNodes = new HashSet<>();\r\n// final Set<Link> permissibleLinks = new HashSet<>();\r\n//\r\n// reader.lines().forEach((String nodeId) -> permissibleNodes.add(network.getNodes().get(Id.createNodeId(nodeId))) );\r\n// permissibleNodes.forEach((Node node) -> permissibleLinks.addAll(node.getOutLinks().values()));\r\n// permissibleNodes.forEach((Node node) -> permissibleLinks.addAll(node.getInLinks().values()));\r\n// final Set<Link> filteredPermissibleLinks = permissibleLinks.stream().filter((l) -> l.getAllowedModes().contains(\"car\")).collect(Collectors.toSet());\r\n \r\n \r\n TheApocalypse.decimatesThe(population).toNoMoreThan(maxPopulationSize).people();\r\n Controler controler = new Controler(scenario);\r\n controler.addOverridingModule(VrpTravelTimeModules.createTravelTimeEstimatorModule(0.05));\r\n controler.addOverridingModule(new DynQSimModule<>(AVQSimProvider.class));\r\n controler.addOverridingModule(new AVModule());\r\n controler.addOverridingModule(new DatabaseModule()); // added only to listen to iteration counter\r\n controler.addOverridingModule(new BlackListedTimeAllocationMutatorStrategyModule());\r\n controler.addOverridingModule(new AVTravelTimeModule());\r\n \r\n \r\n// controler.addOverridingModule(new AbstractModule() {\r\n// @Override\r\n// public void install() {\r\n// bind(new TypeLiteral<Collection<Link>>() {}).annotatedWith(Names.named(\"zurich\")).toInstance(filteredPermissibleLinks);\r\n// //AVUtils.registerDispatcherFactory(binder(), \"ZurichDispatcher\", ZurichDispatcher.ZurichDispatcherFactory.class);\r\n// AVUtils.registerGeneratorFactory(binder(), \"ZurichGenerator\", ZurichGenerator.ZurichGeneratorFactory.class);\r\n//\r\n// addPlanStrategyBinding(\"ZurichModeChoice\").toProvider(ZurichPlanStrategyProvider.class);\r\n// }\r\n// });\r\n \r\n \r\n controler.run();\r\n \r\n SimulationServer.INSTANCE.stopAccepting(); // close port\r\n\r\n AnalyzeAll.analyze(args);\r\n //AnalyzeMarc.analyze(args);\r\n }", "public DBPoolImpl()\n {\n }", "public cto.framework.service.schema.types.PoolClassType getPoolClass() {\r\n return this._poolClass;\r\n }", "private HikariDataSource getPool() {\n switch (DBtype) {\n case \"mariadb\":\n MariadbPool();\n break;\n case \"postgresql\":\n PostgresPool();\n break;\n }\n return null;\n\n }", "public LoadBalancer(int port) throws IOException {\n super(port);\n tabServerssout = new Vector();\n tabServerssin = new Vector();\n //On se connecte aux serveurs\n addServers(8010,8013);\n }", "public static void main (String args[]) throws IOException{\n\t\tint PUERTO=4444;\n\t\tServerSocket servidor = new ServerSocket(PUERTO);\n\t\tSystem.out.println(\"Servidor iniciado...\");\n\t\t\n\t\tSocket tabla[] = new Socket[MAXIMO];\n\t\tComunHilos comun = new ComunHilos(MAXIMO, 0,0, tabla);\n\t\t\n\t\twhile(comun.getCONEXIONES()<MAXIMO) {\n\t\t\tSocket socket= new Socket();\n\t\t\tsocket= servidor.accept(); //esperando cliente\n\t\t\t\n\t\t\t//OBKETO COMPARTIDO POR LOS HILOS\n\t\t\t\n\t\t\tcomun.addtabla(socket, comun.getCONEXIONES());\n\t\t\tcomun.setACTUALES(comun.getACTUALES()+1);\n\t\t\tcomun.setCONEXIONES(comun.getCONEXIONES()+1);\n\t\t\t\n\t\t\tHiloservidorChat hilo = new HiloservidorChat(socket, comun);\n\t\t\thilo.start();\n\t\t}\n\t\tservidor.close();\n\t}", "public static int getPuertoServidor() throws IOException {\r\n getInstancia();\r\n return propiedades.puerto;\r\n }", "public QoSModel(String logName, String statLogName, String dataset, String taskSet, String taxonomySet) {\n\t\tif (dataset != null)\n\t\t\t_servFilename = dataset;\n\t\tif (taskSet != null)\n\t\t\t_taskFilename = taskSet;\n\t\tif (taxonomySet != null)\n\t\t\t_taxonomyFilename = taxonomySet;\n\n\t\t//String dateTime\n\t\tif (logName != null && statLogName != null) {\n\t\t\t_logFileName = logName;\n\t\t\t_statLogFileName = statLogName;\n\t\t}\n\t\t// Create your own names\n\t\telse {\n\t\t\tString timeDate = new SimpleDateFormat(\"_dd-MM-yyyy_HH-mm-ss\").format(Calendar.getInstance().getTime());\n\t\t\t_logFileName = \"gp\" + timeDate;\n\t\t\t_statLogFileName = \"gpStats\" + timeDate;\n\t\t}\n\t\tsetupLogging();\n\n\t\tparseWSCServiceFile(_servFilename);\n\t\tparseWSCTaskFile(_taskFilename);\n\t\tparseWSCTaxonomyFile(_taxonomyFilename);\n\t\tfindConceptsForInstances();\n\n \tinputNode = new ServiceNode(\"Input\", new Properties(new HashSet<String>(), availableInputs, new double[]{0,0,1,1}));\n \toutputNode = new ServiceNode(\"Output\", new Properties(requiredOutputs, new HashSet<String>(), new double[]{0,0,1,1}));\n\n \tpopulateOutputsInTree();\n\n // Set terminals and function nodes\n\t\tList<Node> syntax = new ArrayList<Node>();\n\n\t\t// Function nodes\n\t\tsyntax.add(new SequenceNode());\n\t\tsyntax.add(new ParallelNode());\n\n\t\trelevantServices = getRelevantServices(serviceMap, availableInputs, requiredOutputs);\n\t\trecalculateTotals = false;\n\n\t\t// Terminal nodes\n\t\tfor (ServiceNode s : relevantServices) {\n\t\t\tsyntax.add(s);\n\t\t}\n\n\n _logger.log(SETUP, \"Filename: \" + _servFilename);\n _logger.log(SETUP, \"NumServices: \" + numServices);\n _logger.log(SETUP, \"TaskInput: \" + Arrays.toString(INPUT));\n _logger.log(SETUP, \"TaskOutput: \" + Arrays.toString(OUTPUT));\n _logger.log(SETUP, \"NumRuns: \" + NUM_RUNS);\n _logger.log(SETUP, \"populationSize: \" + POPULATION);\n _logger.log(SETUP, \"MaxNumIterations: \" + MAX_NUM_ITERATIONS);\n _logger.log(SETUP, \"MaxInitialDepth: \" + MAX_INIT_DEPTH);\n _logger.log(SETUP, \"MaxDepth: \" + MAX_DEPTH);\n _logger.log(SETUP, \"CrossoverProb: \" + CROSSOVER_PROB);\n _logger.log(SETUP, \"MutationProb: \" + MUTATION_PROB);\n _logger.log(SETUP, \"NoElites: \" + NO_ELITES);\n _logger.log(SETUP, \"fitness_W1: \" + w1);\n _logger.log(SETUP, \"fitness_W2: \" + w2);\n _logger.log(SETUP, \"fitness_W3: \" + w3);\n _logger.log(SETUP, \"fitness_W4: \" + w4);\n\n\t\tsetSyntax(syntax);\n setCrossoverProbability(CROSSOVER_PROB);\n setMutationProbability(MUTATION_PROB);\n\n // Set parameters\n\t\tsetPopulationSize(POPULATION);\n\t\tsetNoGenerations(MAX_NUM_ITERATIONS);\n\t\tsetMaxInitialDepth(MAX_INIT_DEPTH);\n\t\tsetMaxDepth(MAX_DEPTH);\n\t\tsetCrossoverProbability(CROSSOVER_PROB);\n\t\tsetMutationProbability(MUTATION_PROB);\n\t\tsetNoElites(NO_ELITES);\n\n // Request statistics every generation\n Life.get().addGenerationListener(new GenerationAdapter(){\n @Override\n public void onGenerationEnd() {\n \tStats.get().print(StatField.GEN_NUMBER, StatField.GEN_FITNESS_MIN, StatField.GEN_FITTEST_PROGRAM);\n }\n });\n\n double bestOverallFitness = Double.POSITIVE_INFINITY;\n GPCandidateProgram bestOverallProgram = null;\n\n for (int i = 0; i < NUM_RUNS; i++) {\n\n\t\t\tlong seed = i * SEED_COEFFICIENT;\n \tsetRNG(new MyRand(seed));\n\n \t// Set operators and components\n \tsetInitialiser(new GreedyInitialiser(this, getRNG()));\n \tsetProgramSelector(new TournamentSelector(this, 7));\n \tsetCrossover(new ServiceCrossover(this, getRNG()));\n \tsetMutation(new GreedyMutation(this, getRNG()));\n\n\t\t\t_logger.log(RUN, \"Run: \" + i);\n\t\t\t_logger.log(RUN, \"Seed: \" + seed);\n\n\t\t\tStopWatch runWatch = new Log4JStopWatch(\"RunTime\",_logger, RUN);\n\t\t\trun();\n\t\t\trunWatch.stop();\n\n\t\t\tdouble fitness = (Double) Stats.get().getStat(StatField.GEN_FITNESS_MIN);\n\t\t\tGPCandidateProgram program = (GPCandidateProgram) Stats.get().getStat(StatField.GEN_FITTEST_PROGRAM);\n\n\t\t\tif (fitness < bestOverallFitness) {\n\t\t\t\tbestOverallFitness = fitness;\n\t\t\t\tbestOverallProgram = program;\n\t\t\t}\n\n\t\t\t_logger.log(RUN, \"BestFitness: \" + fitness);\n\t\t\t_logger.log(RUN, \"BestProgram: \" + program);\n\t\t\treset();\n }\n\t\t_logger.log(POSTRUN, \"BestOverallFitness: \" + bestOverallFitness);\n\t\t_logger.log(POSTRUN, \"BestOverallProgram: \" + bestOverallProgram);\n\t\t_generateStatistics();\n\t\t_logger.removeAppender(_appender);\n\t\t_appender.close();\n\t\tSystem.setOut(stdout);\n\t}", "@Override\n public final void contextInitialized(final ServletContextEvent sce) {\n context = sce.getServletContext();\n\n String apiSrvDaemonPath = context.getRealPath(PS);\n System.setProperty(\"APISrvDaemonPath\", context.getRealPath(\"/\"));\n System.setProperty(\"APISrvDaemonVersion\",\n \"v.0.0.2-22-g2338f25-2338f25-40\");\n\n // Notify execution\n System.out.println(\"--- \" + \"Starting APIServerDaemon \"\n + System.getProperty(\"APISrvDaemonVersion\") + \" ---\");\n System.out.println(\"Java vendor : '\" + VN + \"'\");\n System.out.println(\"Java vertion: '\" + VR + \"'\");\n System.out.println(\"Running as : '\" + US + \"' username\");\n System.out.println(\"Servlet path: '\" + apiSrvDaemonPath + \"'\");\n\n // Initialize log4j logging\n String log4jPropPath =\n apiSrvDaemonPath + \"WEB-INF\" + PS + \"log4j.properties\";\n File log4PropFile = new File(log4jPropPath);\n\n if (log4PropFile.exists()) {\n System.out.println(\"Initializing log4j with: \" + log4jPropPath);\n PropertyConfigurator.configure(log4jPropPath);\n } else {\n System.err.println(\n \"WARNING: '\" + log4jPropPath\n + \" 'file not found, so initializing log4j \"\n + \"with BasicConfigurator\");\n BasicConfigurator.configure();\n }\n\n // Make a test with jdbc/geApiServerPool\n // jdbc/UserTrackingPool\n // jdbc/gehibernatepool connection pools\n String currentPool = \"not yet defined!\";\n String poolPrefix = \"java:/comp/env/\";\n String[] pools = {\"jdbc/fgApiServerPool\",\n \"jdbc/UserTrackingPool\",\n \"jdbc/gehibernatepool\"};\n Connection[] connPools = new Connection[pools.length];\n\n for (int i = 0; i < pools.length; i++) {\n try {\n Context initContext = new InitialContext();\n Context envContext =\n (Context) initContext.lookup(\"java:comp/env\");\n\n currentPool = pools[i];\n\n // DataSource ds =\n // (DataSource)initContext.lookup(poolPrefix+currentPool);\n DataSource ds = (DataSource) envContext.lookup(currentPool);\n\n connPools[i] = ds.getConnection();\n System.out.println(\"PERFECT: \" + currentPool + \" was ok\");\n } catch (Exception e) {\n System.err.println(\"WARNING: \" + currentPool + \" failed\" + LS\n + e.toString());\n } finally {\n try {\n connPools[i].close();\n } catch (Exception e) {\n System.err.println(\"WARNING: \" + currentPool\n + \" failed to close\" + LS + e.toString());\n }\n }\n }\n\n // Register MySQL driver\n APIServerDaemonDB.registerDriver();\n\n // Initializing the daemon\n if (asDaemon == null) {\n asDaemon = new APIServerDaemon();\n }\n\n asDaemon.startup();\n }", "@Pointcut(\"execution(* genarateClientResponse(..))\")\n private void AccessLogingpc() {\n }", "public static String getPcNombreCliente(){\n\t\tString host=\"\";\n\t\ttry{\n\t\t\tString ips[] = getIPCliente().split(\"\\\\.\");\n\t\t\tbyte[] ipAddr = new byte[]{(byte)Integer.parseInt(ips[0]),\n\t\t\t\t\t(byte)Integer.parseInt(ips[1]),\n\t\t\t\t\t(byte)Integer.parseInt(ips[2]),\n\t\t\t\t\t(byte)Integer.parseInt(ips[3])};\n\t\t\tInetAddress inet = InetAddress.getByAddress(ipAddr);\n\t\t\thost = inet.getHostName();\n\t\t}catch(Exception ex){\n\t\t\t//Log.error(ex, \"Utiles :: getPcNombreCliente :: controlado\");\n\t\t}\n\t\treturn host;\n\t}", "private void registraLog(int aTipo, String aMensagem)\n\t{\n\t\tArquivoConfiguracaoGPP arqConf = ArquivoConfiguracaoGPP.getInstance();\n\t\tif (aTipo == Definicoes.FATAL)\n\t\t\tlogger.fatal(aMensagem);\n\t\telse if (aTipo == Definicoes.ERRO)\n\t\t\t\tlogger.error(aMensagem);\n\t\telse if (aTipo == Definicoes.WARN)\n\t\t\t\tlogger.warn(aMensagem);\n\t\telse if (aTipo == Definicoes.INFO)\n\t\t\t\tlogger.info(aMensagem);\n\t\telse if (aTipo == Definicoes.DEBUG)\n\t\t{\n\t\t\t\tif (arqConf.getSaidaDebug())\n\t\t\t\t\tlogger.debug(aMensagem);\n\t\t}\n\t\telse logger.warn(\"SEVERIDADE NAO DEFINIDA - \" + aMensagem);\n\t}", "public void initAsg(){\n\t\tConfigure conf = Configure.getConf();\n\t\tint min = conf.getMaxNum();\n\t\t\n\t\t//launch min number of instances\n\t\tTimeManager.PrintCurrentTime(\"Init Cluster, launching %d DC\\n\", min);\n\t\tfor(int i=0; i < min; i++){\n\t\t\tConnToDC dc = nova.launchOne(conf.getInatanceName());\n\t\t\tif(dc != null){\n\t\t\t\tdcList.offer(dc);\n\t\t\t\tlb.addDC(dc.getIp());\n\t\t\t\tTimeManager.PrintCurrentTime(\"Successfully launch 1 DC [%s:%s]\\n\", \n\t\t\t\t\t\tdc.getIp(), dc.getId());\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn ;\n\t}", "void setPoolNumber(int poolNumber);", "public PoolNotFoundException(String s) {\n super(s);\n }", "public String toString() {\n return \"appName=\" + _appName\n + \", readTimeout=\" + _readTimeout + \", poolSize=\" + _poolSize\n + \", numberOfOperations=\" + numOfOps + \", shutdown=\" + _shutdown;\n }", "@PostConstruct\n public void initPool() {\n SpringHelper.setApplicationContext(applicationContext);\n if (!initialized) {\n try {\n final File configDirectory = ConfigDirectory.setupTestEnvironement(\"OGCRestTest\");\n final File dataDirectory2 = new File(configDirectory, \"dataCsw2\");\n dataDirectory2.mkdir();\n\n try {\n serviceBusiness.delete(\"csw\", \"default\");\n serviceBusiness.delete(\"csw\", \"intern\");\n } catch (ConfigurationException ex) {}\n\n final Automatic config2 = new Automatic(\"filesystem\", dataDirectory2.getPath());\n config2.putParameter(\"shiroAccessible\", \"false\");\n serviceBusiness.create(\"csw\", \"default\", config2, null);\n\n writeProvider(\"meta1.xml\", \"42292_5p_19900609195600\");\n\n Automatic configuration = new Automatic(\"internal\", (String)null);\n configuration.putParameter(\"shiroAccessible\", \"false\");\n serviceBusiness.create(\"csw\", \"intern\", configuration, null);\n\n initServer(null, null, \"api\");\n pool = GenericDatabaseMarshallerPool.getInstance();\n initialized = true;\n } catch (Exception ex) {\n Logger.getLogger(OGCRestTest.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }", "public void createCon(){\n\t\ttry {\n\t\t\tClass.forName(\"oracle.jdbc.driver.OracleDriver\");\n\t\t\tcon=DriverManager.getConnection(\"jdbc:oracle:thin:@172.26.132.40:1521:ORCLILP\", \"a63d\", \"a63d\");\n\t\t} catch (ClassNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\n\t\t\te.printStackTrace();\n\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\n\t\t\te.printStackTrace();\n\n\t\t}\n\n\n\t}", "protected ServerConnectionDebugger() {\n\n }", "public static void main(String[] args) {\n Servidor s = new Servidor();\n try{\n VoteSystem channel = (VoteSystem) UnicastRemoteObject.exportObject(s, 0);\n Registry register = LocateRegistry.createRegistry(1099);\n register.bind(\"VoteSystem\", channel);\n ServerGUI sgui= new ServerGUI();\n ServerThread st = new ServerThread(sgui);\n st.setDaemon(true);\n st.start();\n sgui.setVisible(true);\n }\n catch(Exception e){\n e.printStackTrace();\n }\n }", "public String[] getConnessionDetails() {\r\n\t\treturn new String[]{server.getText(),port.getText(),database.getText(),user.getText(),password.getText()};\r\n\t}", "Connection createConnection(ExecutorService pool);", "public ControladorCatalogoServicios() {\r\n }", "public DNSLog() {}", "@Override\n public String toString()\n {\n return String.format(\"request in Thread %d(%s): \", reqID, masterThread); \n }", "@Override\r\n public void parar(Conexion conexion){\n }", "public DataSourcePool() throws NamingException, \r\n SQLException, InstantiationException, IllegalAccessException, ClassNotFoundException {\r\n InitialContext ctx = new InitialContext();\r\n //DataSource ds =(DataSource)ctx.lookup(\"java:jboss/jdbc/webapp\");\r\n DataSource ds =(DataSource)ctx.lookup(\"java:jboss/datasources/WebApp\");\r\n connection = ds.getConnection();\r\n }" ]
[ "0.6349649", "0.60005325", "0.5947864", "0.5852873", "0.5838931", "0.56797725", "0.56491256", "0.56431913", "0.5607296", "0.5549598", "0.5435614", "0.5401622", "0.53647137", "0.53050876", "0.5239733", "0.52000785", "0.51899964", "0.51877356", "0.5168091", "0.5158049", "0.5145132", "0.5124138", "0.5121452", "0.5117755", "0.5101646", "0.5092127", "0.50897527", "0.5077686", "0.506528", "0.5032477", "0.5029876", "0.50288767", "0.50163954", "0.49978423", "0.49933946", "0.49663213", "0.49652147", "0.4956232", "0.49247774", "0.492366", "0.49202436", "0.49201646", "0.48931354", "0.48905024", "0.48833188", "0.48780316", "0.48762685", "0.48760918", "0.48760918", "0.4860653", "0.4856858", "0.48554698", "0.48475838", "0.48406184", "0.48388073", "0.48377746", "0.4825405", "0.48196754", "0.4817145", "0.48165128", "0.48095128", "0.48028398", "0.4798883", "0.47941017", "0.47927028", "0.47923177", "0.47915867", "0.47889942", "0.47853687", "0.47780213", "0.4775284", "0.4772055", "0.47717524", "0.4770821", "0.4768995", "0.47669634", "0.47662634", "0.47516668", "0.47510684", "0.4740608", "0.47322384", "0.4727923", "0.4725734", "0.47225672", "0.47138232", "0.47126144", "0.46999356", "0.46952012", "0.46868926", "0.46857178", "0.46808225", "0.46783635", "0.46735835", "0.4672827", "0.46718964", "0.46588174", "0.465616", "0.4651125", "0.46501485", "0.4646451" ]
0.6884392
0
Metodo....: getHostName Descricao.: Retorna o nome do servidor GPP e a porta ORB utilizada
private String getHostName() { return hostName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getHostName();", "String getHostName();", "public String getHostName();", "String getRemoteHostName();", "static String getHostName() {\n try {\n return InetAddress.getLocalHost().getHostName();\n } catch (UnknownHostException e) {\n return \"unknown\";\n }\n }", "java.lang.String getHost();", "java.lang.String getHost();", "private String GetHostName() throws UnknownHostException{\n return Inet4Address.getLocalHost().getHostName();\n }", "String getHost();", "private static String getHostNameImpl() {\n String bindAddr = System.getProperty(\"jboss.bind.address\");\n if (bindAddr != null && !bindAddr.trim().equals(\"0.0.0.0\")) {\n return bindAddr;\n }\n\n // Fallback to qualified name\n String qualifiedHostName = System.getProperty(\"jboss.qualified.host.name\");\n if (qualifiedHostName != null) {\n return qualifiedHostName;\n }\n\n // If not on jboss env, let's try other possible fallbacks\n // POSIX-like OSes including Mac should have this set\n qualifiedHostName = System.getenv(\"HOSTNAME\");\n if (qualifiedHostName != null) {\n return qualifiedHostName;\n }\n\n // Certain versions of Windows\n qualifiedHostName = System.getenv(\"COMPUTERNAME\");\n if (qualifiedHostName != null) {\n return qualifiedHostName;\n }\n\n try {\n return NetworkUtils.canonize(getLocalHost().getHostName());\n } catch (UnknownHostException uhe) {\n uhe.printStackTrace();\n return \"unknown-host.unknown-domain\";\n }\n }", "public String getHostName (){\n return hostName;\n }", "public String getHostName() {\n return null;\n }", "public String getHostName()\n\t{\n\t\treturn hostName;\n\t}", "private String getHostName() {\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(activity);\n\n return preferences.getString(activity.getString(R.string.pref_host_id), activity.getString(R.string.pref_default_host_name));\n }", "String host();", "String getHostname();", "String getHostname();", "public String getHostName() {\n return hostName;\n }", "public String getHostName() {\n return hostName;\n }", "java.lang.String getRemoteHost();", "public String getHostName() {\n\t\treturn hostName;\n\t}", "public String getHostName() {\n\t\treturn hostName;\n\t}", "public String getHostName() {\n\t\treturn \"RaspberryHostName\";\n\t}", "public static String getHostName() {\n try {\n return InetAddress.getLocalHost().getHostName();\n } catch (UnknownHostException e) {\n return LOCALHOST;\n }\n }", "public String getHost();", "public String getHost();", "public String getHostName() throws UnknownHostException\n\t{\n\t\t\n\t\treturn InetAddress.getLocalHost().getHostAddress();\n\t\t\n\t}", "String getIntegHost();", "public String getHost() {\n\t\ttry {\n\t\t\treturn InetAddress.getLocalHost().getHostName();\n\t\t} catch (UnknownHostException e) {\n\t\t\treturn \"unknown\";\n\t\t}\n\t}", "public String getHostName() {\n return FxSharedUtils.getHostName();\n }", "public String getHostname();", "public String getHostName(String connectionString)\n {\n String[] tokens = connectionString.split(\";\");\n for (String token: tokens)\n {\n if (token.contains(\"HostName\"))\n {\n String[] hName = token.split(\"=\");\n return hName[1];\n }\n }\n\n return null;\n }", "default String getHost()\n {\n return getString( \"host\", \"localhost:80\");\n }", "public static String name() {\r\n String _computername=\"\";\r\n InetAddress _address=null;\r\n \r\n try {\r\n _address=InetAddress.getLocalHost();\r\n _computername=_address.getHostName();\r\n }\r\n catch (Exception ex) {\r\n throw new RuntimeException(ex.getMessage());\r\n }\r\n \r\n if (_address!=null) {\r\n _address=null; System.gc();\r\n }\r\n \r\n return _computername;\r\n }", "public InetAddress getHost();", "Host getHost();", "public String getHost() {\r\n \t\treturn properties.getProperty(KEY_HOST);\r\n \t}", "public String getHostName() {\n return this.hostContext.getHostName();\n }", "public static String getPcNombreCliente(){\n\t\tString host=\"\";\n\t\ttry{\n\t\t\tString ips[] = getIPCliente().split(\"\\\\.\");\n\t\t\tbyte[] ipAddr = new byte[]{(byte)Integer.parseInt(ips[0]),\n\t\t\t\t\t(byte)Integer.parseInt(ips[1]),\n\t\t\t\t\t(byte)Integer.parseInt(ips[2]),\n\t\t\t\t\t(byte)Integer.parseInt(ips[3])};\n\t\t\tInetAddress inet = InetAddress.getByAddress(ipAddr);\n\t\t\thost = inet.getHostName();\n\t\t}catch(Exception ex){\n\t\t\t//Log.error(ex, \"Utiles :: getPcNombreCliente :: controlado\");\n\t\t}\n\t\treturn host;\n\t}", "public String get_hostname() throws Exception {\n\t\treturn this.hostname;\n\t}", "java.lang.String getServerAddress();", "public String getBoxNetHost();", "public static String getHostname()\n\t{\n\t\treturn hostname; // send the hostname\n\t}", "private static String getHostname()\n throws UnknownHostException {\n return InetAddress.getLocalHost().getHostName();\n }", "String getHostName(String clusterName, String componentName) throws SystemException;", "String getAddr();", "public static String getHostname() throws IOException {\n\n String line;\n StringBuilder result = new StringBuilder();\n Process p = Runtime.getRuntime().exec(\"hostname\");\n\n BufferedReader br = new BufferedReader(new InputStreamReader(p.getInputStream()));\n\n while ((line = br.readLine()) != null) result.append(line);\n\n br.close();\n\n return result.toString();\n }", "public static String getHostname()\n {\n String host = \"unknown\";\n try\n {\n return InetAddress.getLocalHost().getHostName();\n }\n catch ( UnknownHostException e )\n {\n // ignore\n }\n return host;\n }", "HostInfo getHostInfo();", "public static String getBaseHost() {\r\n if (baseHost == null) {\r\n baseHost = PropertiesProvider.getInstance().getProperty(\"server.name\", \"localhost\");\r\n }\r\n return baseHost;\r\n }", "public String getHost()\n\t{\n\t\treturn m_strHostname;\n\t}", "protected abstract String getHostNamePropertyName();", "public String getFullHost() {\n return \"http://\" + get(HOSTNAME_KEY) + \":\" + get(PORT_KEY) + \"/\" + get(CONTEXT_ROOT_KEY) + \"/\";\n }", "public String hostname() {\n return this.hostname;\n }", "public String getHost() {\n\tLogWriter.logMessage(LogWriter.TRACE_DEBUG,\"getHost()\");\n Via via=(Via)sipHeader;\n return via.getHost();\n }", "private String GetHostAddress() throws UnknownHostException {\n return Inet4Address.getLocalHost().getHostAddress();\n }", "private String lookup_ip (String host) throws LookupException\n , NameServerContactException{\n return lookup(host)[0];\n }", "public String getHost( ) {\n return props.getProperty(HOST, \"localhost\");\n }", "String getRemoteAddr();", "public String getHost(Env env) {\n return client.getHost();\n }", "protected String get_object_name() {\n\t\treturn this.hostname;\n\t}", "public static String getInetAddress(String hostName) throws UnknownHostException {\r\n InetAddress addr = InetAddress.getByName(hostName);\r\n return addr.getHostAddress();\r\n }", "String getHost()\n {\n return host;\n }", "public String getServerName();", "public String getHostname () {\n return hostname;\n }", "public String getHost() {\n return host.getText();\n }", "public String getHost() {\n \t\treturn host;\n \t}", "public String getHost( ) {\n\t\treturn host;\n\t}", "public String getHostname() {\r\n return hostname;\r\n }", "String getPreferredHost() {\n return preferredHost;\n }", "abstract String getRemoteAddress();", "public String getGatewayHost();", "public String getHostname() {\n return this.hostname;\n }", "public String getHost(){\n\t\treturn this.host;\n\t}", "public String getHost() {\n\t\treturn this.sipStack.getHostAddress();\n\t}", "public String getHostAddress()\n {\n return (addr != null ? addr.getHostAddress() : \"\");\n }", "private static String[] getServerAddress(String p_78863_0_) {\n/* */ try {\n/* 87 */ String var1 = \"com.sun.jndi.dns.DnsContextFactory\";\n/* 88 */ Class.forName(\"com.sun.jndi.dns.DnsContextFactory\");\n/* 89 */ Hashtable<Object, Object> var2 = new Hashtable<>();\n/* 90 */ var2.put(\"java.naming.factory.initial\", \"com.sun.jndi.dns.DnsContextFactory\");\n/* 91 */ var2.put(\"java.naming.provider.url\", \"dns:\");\n/* 92 */ var2.put(\"com.sun.jndi.dns.timeout.retries\", \"1\");\n/* 93 */ InitialDirContext var3 = new InitialDirContext(var2);\n/* 94 */ Attributes var4 = var3.getAttributes(\"_minecraft._tcp.\" + p_78863_0_, new String[] { \"SRV\" });\n/* 95 */ String[] var5 = var4.get(\"srv\").get().toString().split(\" \", 4);\n/* 96 */ return new String[] { var5[3], var5[2] };\n/* */ }\n/* 98 */ catch (Throwable var6) {\n/* */ \n/* 100 */ return new String[] { p_78863_0_, Integer.toString(25565) };\n/* */ } \n/* */ }", "public String getRnidsHostAddress() {\n\t\tString address = getProperties().getProperty(\"rnids.host.address\").trim();\n\t\treturn address;\n\t}", "public String getHost() { return host; }", "public java.lang.String getHost() {\n java.lang.Object ref = host_;\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 host_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "@NonNull\n public String getServerAddr() {\n if (mIkeTunConnParams == null) return mServerAddr;\n\n final IkeSessionParams ikeSessionParams = mIkeTunConnParams.getIkeSessionParams();\n return ikeSessionParams.getServerHostname();\n }", "public String getHost() {\r\n return host;\r\n }", "static String generateNodeName(final String hostName, final String hostPort) {\n return hostName + ':' + hostPort + '_' + \"solr\";\n }", "@Override\n\t\tpublic String getHost() {\n\t\t\treturn null;\n\t\t}", "private static InetAddress getBootstrapServer(InetAddress hostIP) {\n\t\tSocket socket = null;\n\t\tInputStream in = null;\n\t\tOutputStream out = null;\n\t\ttry {\n\t\t\t//socket = new Socket();\n\t\t\tsocket = new Socket(JoinHOST,OW_PORT);\n\t\t\t//socket.connect(iSock, 3000);\n\t\t\tout = socket.getOutputStream();\n\t\t\tObjectOutputStream oout = new ObjectOutputStream(out);\n\t\t\toout.writeObject(hostIP.getHostName());\n\t\t\t//oout.writeObject(hostIP.getHostAddress());\n\t\t\t//oout.writeObject(\"hakkoudasan.matlab.nitech.ac.jp\");\n\t\t\t\n\t\t\tin = socket.getInputStream();\n\t\t\tObjectInputStream oin = new ObjectInputStream(in);\n\t\t\tString bsIP = (String)oin.readObject();\n\t\t\tif(bsIP.equals(hostIP.getHostName())) {\n//\t\t\t\tif(bsIP.equals(\"10.192.41.113\")) {\n\t\t\t\t//if(bsIP.equals(\"hakkoudasan.matlab.nitech.ac.jp\")) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tInetAddress iNetAddr = InetAddress.getByName(bsIP);\n\t\t\treturn iNetAddr;\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (socket != null) {\n\t\t\t\t\tsocket.close();\n\t\t\t\t\tsocket = null;\n\t\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t\t/* ignore */\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t\t\n\t}", "public String getHostAddress() {\n\t\treturn javaNetAddress.getHostAddress();\n\t}", "public String hostname() {\n return this.innerProperties() == null ? null : this.innerProperties().hostname();\n }", "Builder hostName(String hostName);", "public String getHostname() {\n return this.config.getHostname();\n }", "public String getHost() {\n\t\treturn host;\n\t}", "public String getHost() {\n\t\treturn host;\n\t}", "private String getDomain(String host){\n StringBuffer sb = new StringBuffer(\"\");\r\n try{\r\n StringTokenizer stk = new StringTokenizer(host, \".\");\r\n sb.append(stk.nextToken());\r\n sb.append(\".\");\r\n sb.append(stk.nextToken());\r\n sb.append(\".\");\r\n sb.append(stk.nextToken());\r\n sb.append(\".\");\r\n sb.append(\"*\");\r\n }catch(Exception e){\r\n e.printStackTrace();\r\n }\r\n return sb.toString();\r\n }", "public String getHost() {\n return host;\n }", "public String getHost() {\n return host;\n }", "public String getHost() {\n return host;\n }", "public String getHost() {\n return host;\n }", "public String getHost() {\n return host;\n }", "public String getHost() {\n return host;\n }", "public String getHost() {\n return host;\n }", "public String getHost() {\n return host;\n }" ]
[ "0.8215644", "0.8215644", "0.8054655", "0.7989536", "0.76411164", "0.7610472", "0.7610472", "0.75964445", "0.74860924", "0.7439241", "0.7377952", "0.7359701", "0.7308613", "0.7278251", "0.72636414", "0.719458", "0.719458", "0.7192605", "0.7192605", "0.7138404", "0.7116591", "0.7116591", "0.7088778", "0.7073695", "0.70385283", "0.70385283", "0.70151436", "0.7010876", "0.6995549", "0.6936692", "0.6924861", "0.69141537", "0.68991244", "0.68990487", "0.689806", "0.6896691", "0.6870376", "0.6856937", "0.68183017", "0.67737424", "0.6765268", "0.67449164", "0.6733979", "0.6673136", "0.66333896", "0.660204", "0.65970176", "0.65885234", "0.6584842", "0.65314853", "0.65081245", "0.65063477", "0.6504067", "0.6497454", "0.6490933", "0.64858586", "0.6484393", "0.64497805", "0.64276534", "0.63990945", "0.63875806", "0.6368487", "0.6356603", "0.63289946", "0.63162464", "0.6294754", "0.6290183", "0.62816274", "0.62714666", "0.6271456", "0.62590617", "0.6258799", "0.62570614", "0.6247501", "0.6238353", "0.62263966", "0.6217117", "0.6211285", "0.62041706", "0.61950064", "0.61826766", "0.6177996", "0.61684763", "0.61549693", "0.6149685", "0.6147646", "0.6145821", "0.6144673", "0.6137432", "0.6102741", "0.6102741", "0.60891575", "0.60809445", "0.60809445", "0.6078077", "0.6078077", "0.6078077", "0.6078077", "0.6078077", "0.6078077" ]
0.7582895
8
Metodo....: getInstancia Descricao.: Metodo para criar e retornar uma instancia da classe
public static GerentePoolLog getInstancia(Class ownerClass) { // Verifica se ja existe uma instancia do Pool em execucao se negativo entao inicializa /*if ( instancia == null ) { System.out.println ("Gerente de LOG (Singleton) INICIADO "); instancia = }*/ GerentePoolLog instancia = new GerentePoolLog(ownerClass); return instancia; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static LoCurso GetInstancia(){\n if (instancia==null)\n {\n instancia = new LoCurso();\n \n }\n\n return instancia;\n }", "public static LoInscripcion GetInstancia(){\n if (instancia==null)\n {\n instancia = new LoInscripcion();\n }\n\n return instancia;\n }", "public static IRepositorioTransacao getInstancia(){\n\n\t\tif(instancia == null){\n\t\t\tinstancia = new RepositorioTransacaoHBM();\n\t\t}\n\n\t\treturn instancia;\n\t}", "Instance createInstance();", "private synchronized static void createInstance(){\r\n\t\tif (instance == null){\r\n\t\t\tinstance = new Casino();\r\n\t\t}\r\n\t}", "public static IRepositorioOrdemServico getInstancia(){\n\n\t\tif(instancia == null){\n\t\t\tinstancia = new RepositorioOrdemServicoHBM();\n\t\t}\n\n\t\treturn instancia;\n\t}", "private Object createInstance() throws InstantiationException, IllegalAccessException {\n\t\treturn classType.newInstance();\n\t}", "static public GUIAltaHabitacion obtenerInstancia(){\r\n\t\t if(altaHabitacion == null){\r\n\t\t\t altaHabitacion = new GUIAltaHabitacion();\r\n\t\t }\r\n\t\t \r\n\t\t return altaHabitacion;\r\n\t }", "@Override\r\n\tpublic T createInstance() {\r\n\t\ttry {\r\n\t\t\treturn getClassType().newInstance();\r\n\t\t} catch (Exception e) {\r\n\t\t\tLogger.getLogger(AbstractCRUDBean.class.getSimpleName()).log(Level.ALL, e.getMessage());\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "Reproducible newInstance();", "public static ConexionBD obtenerInstancia() {\n\t\tif (INSTANCIA == null)\n\t\t\tINSTANCIA = new ConexionBD();\n\n\t\treturn INSTANCIA;\n\t}", "T getInstance();", "public static TMemoria getInstance(){\r\n\t\tif (instancia==null)\r\n\t\t\tinstancia=new TMemoriaImp();\t\t\t\r\n\t\treturn instancia;\t\t\t\t\t\t\t\t\t\r\n\t}", "public T newInstance();", "public static crearNuevaSalida getInstance() {\n if (myInstance == null) {\n myInstance = new crearNuevaSalida();\n }\n return myInstance;\n }", "public static VistaCliente getInstance(){\n\t\tif(instance == null)\n\t\t\tinstance = new VistaClienteImp();\n\t\treturn instance;\n\t}", "public static GestorPersonas instanciar(){\n \n if(gestor == null){\n gestor = new GestorPersonas();\n }\n return gestor;\n }", "public static Casino getInstance(){\r\n\t\tif (instance == null){\r\n\t\t\tcreateInstance();\r\n\t\t}\r\n\t\treturn instance;\r\n\t}", "private Instantiation(){}", "public CMObject newInstance();", "public static class_config getinstance(){\n\t\tif (instance==null){\n\t\t\tinstance = new class_config();\n\t\t\t\n singleton.mongo=new Mongo_DB();\n singleton.nom_bd=singleton.mongo.getNom_bd();\n singleton.nom_table=singleton.mongo.getNom_table();\n singleton.client = Mongo_DB.connect();\n if (singleton.client != null) {\n singleton.db = singleton.mongo.getDb();\n singleton.collection = singleton.mongo.getCollection();\n }\n \n\t\t\tsingleton_admin.admin= new ArrayList<admin_class>();\n\t\t\tsingleton_client.client= new ArrayList<client_class>();\n\t\t\tsingleton_reg.reg= new ArrayList<reg_user_class>();\n\t\t\t\n// A_auto_json.auto_openjson_admin();\n// C_auto_json.auto_openjson_client();\n R_auto_json.auto_openjson_reg();\n //funtions_files.auto_open();\n\t\t\tauto_config.auto_openconfig();\n //class_language.getinstance();\n\t\t\tsingleton_config.lang=new class_language();\n \n connectionDB.init_BasicDataSourceFactory();\n \n\t\t}\n\t\treturn instance;\n\t}", "public static LazyInitializedSingleton getInstance(){ // method for create/return Object\n if(instance == null){//if instance null?\n instance = new LazyInitializedSingleton();//create new Object\n }\n return instance; // return early created object\n }", "public VistaInicial crearventanaInicial(){\n if(vistaInicial==null){\n vistaInicial = new VistaInicial();\n }\n return vistaInicial;\n }", "public static LogGPPServer getInstancia()\n\t{\n\t\tif(instancia == null)\n\t\t{\n\t\t\tinstancia = new LogGPPServer(); \n\t\t}\n\n\t\treturn( instancia );\n\t}", "Klassenstufe createKlassenstufe();", "public static Incremental getInstance() {\n\n\t\t// o resultado da variável local parece desnecessário mas, melhora o desempenho\n\t\t// do nosso código. Nos casos em que a instância já foi\n\t\t// inicializada (na maioria das vezes), o campo volátil é acessado apenas uma\n\t\t// vez (devido ao “return resultado;” ao invés de “return instance;”)\n\n\t\t// A palavra-chave sincronizada garante que, se um objeto for procurado para\n\t\t// modificação, nenhum outro thread poderá acessar esse objeto e esperar até que\n\t\t// o thread de modificação seja concluído.\n\t\t\n\t\tIncremental resultado = instance;\n\t\tif (resultado != null) {\n\t\t\treturn resultado;\n\t\t}\n\t\tsynchronized (Incremental.class) {\n\t\t\tif (instance == null) {\n\t\t\t\t//foi necessário colocar esse \"delay\" para que houvesse o multithread \n\t\t\t\ttry {\n\t\t Thread.sleep(1000);\n\t\t } catch (InterruptedException ex) {\n\t\t ex.printStackTrace();\n\t\t }\n\t\t\t\tinstance = new Incremental();\n\t\t\t}\n\t\t}\n\t\treturn instance;\n\t}", "public static CtrlObras getInstancia() {\r\n return unicaInstancia;\r\n }", "@Override\n public T getInstance() {\n return instance;\n }", "private static void getInstancia() throws IOException {\r\n if (propiedades == null) {\r\n propiedades = new PropiedadesComunicacion();\r\n }\r\n }", "public org.omg.uml.behavioralelements.commonbehavior.Instance getInstance();", "private static synchronized void createInstance() {\r\n\t\tif (instance == null)\r\n\t\t\tinstance = new LOCFacade();\r\n\t}", "private static Propiedades getInstance() {\n if (instance == null) {\n instance = new Propiedades();\n }\n return instance;\n }", "public static DateUtil getInstace(){ // This is lazy intialization\n if (instace == null) {\n synchronized (DateUtil.class) { // make it thread safe\n System.out.println(\"instace is null\");\n instace = new DateUtil();\n }\n }\n return instace;\n }", "private InstanceUtil() {\n }", "public Object aj() {\n try {\n return this.ad.newInstance();\n } catch (IllegalAccessException | InstantiationException e) {\n throw new RuntimeException();\n }\n }", "Instance getInstance(String id);", "@Override\n protected T createInstance() throws Exception {\n return this.isSingleton() ? this.builder().build() : XMLObjectSupport.cloneXMLObject(this.builder().build());\n }", "public Instance() {\n }", "public static IndicieSeznam getInstance() {\n\n return ourInstance;\n }", "public static Replica1Singleton getInstance() {\r\n\t\tif (instance==null){\r\n\t\t/*System.err.println(\"Istanza creata\");*/\r\n\t\tinstance = new Replica1Singleton();\r\n\t\t}\r\n\t\treturn instance;\r\n\t\r\n\t}", "public static Univers get(){\n if (instance == null)\n {\n instance = new Univers();\n }\n return instance;\n }", "public Object ai() {\n try {\n return this.ad.newInstance();\n } catch (IllegalAccessException | InstantiationException e) {\n throw new RuntimeException();\n }\n }", "@Override\n\t\tpublic Object getInstance() {\n\t\t\treturn null;\n\t\t}", "public T safeNewInstance() {\n try {\n return newInstance();\n } catch (NoSuchMethodException e) {\n throw new IllegalArgumentException(e);\n } catch (IllegalAccessException e) {\n throw new IllegalArgumentException(e);\n } catch (InvocationTargetException e) {\n throw new IllegalArgumentException(e);\n } catch (InstantiationException e) {\n throw new IllegalArgumentException(e);\n }\n }", "public Instalacion get(Instalacion t) {\n Instalacion c = instalaciones.get(t.getId());\n return c;\n }", "public static boolean getInsta() {\n return insta;\n }", "public Game getNewInstance() {\n try {\n return classObj.newInstance();\n } catch (Exception e) {\n e.printStackTrace();\n throw new RuntimeException(\"Error generating \" + this + \" game\");\n }\n }", "private Object getInstance(Annotation label) throws Exception {\r\n ExtractorBuilder builder = getBuilder(label);\r\n Constructor factory = builder.getConstructor();\r\n \r\n if(!factory.isAccessible()) {\r\n factory.setAccessible(true);\r\n }\r\n return factory.newInstance(contact, label, format); \r\n }", "public Object createNew(String typename, Object... args) \n\t\tthrows \tIllegalAccessException, \n\t\t\tInstantiationException, \n\t\t\tClassNotFoundException,\n\t\t\tNoSuchMethodException,\n\t\t\tInvocationTargetException \n\t{\n\t\tswitch(args.length) \n\t\t{\n\t\tcase 1 : return Class.forName(typename).getConstructor(args[0].getClass()).newInstance(args[0]);\n\t\tcase 2 : return Class.forName(typename).getConstructor(args[0].getClass(), args[1].getClass()).\n\t\t\tnewInstance(args[0], args[1]);\n\t\t}\n\t\treturn null;\n\t}", "public Object newInstance( Class<?> clazz )\n {\n return newInstance( Thread.currentThread().getContextClassLoader(),\n clazz );\n \n }", "public /* synchronized */ static LazyInitClass getInstanceThreadSafe() {\r\n\t\t//first if is for perfrroamce betterment\r\n\t\t//once object got created no need to synchronize and stop other threads to read\r\n\t\tif(instance == null) {\r\n\t\t\tsynchronized (LazyInitClass.class) {\r\n\t\t\t\tif(instance == null) {\r\n\t\t\t\t\tinstance = new LazyInitClass();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\treturn instance;\r\n\t}", "DynamicInstance createDynamicInstance();", "public DPSingletonLazyLoading getInstance(){ //not synchronize whole method. Instance oluşmuş olsa bile sürekli burada bekleme olur.\r\n\t\tif (instance == null){//check\r\n\t\t\tsynchronized(DPSingletonLazyLoading.class){ //critical section code NOT SYNCRONIZED(this) !!\r\n\t\t\t\tif (instance == null){ //double check\r\n\t\t\t\t\tinstance = new DPSingletonLazyLoading();//We are creating instance lazily at the time of the first request comes.\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn instance;\r\n\t}", "public ProductoCreable newInstance(int codigo, String nombre){\r\n \r\n }", "public static <C> C newInstance(C obj) {\n try {\n //System.out.println(obj.getClass().getSimpleName());\n C c = (C) obj.getClass().newInstance();\n return c;\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }", "public static StructuraSemestru2 getInstance(){\n if (instance==null)\n {\n return instance =new StructuraSemestru2();\n }\n else\n return instance;\n }", "@Override\n\tpublic ModIndexedInstance createNewInstance() {\n\t\tModIndexedInstance newInst = new ModIndexedInstance(); // create the new instance\n\t\tnewInst.setRegComp(this); // set component type of new instance\n\t\taddInstanceOf(newInst); // add instance to list for this comp\n\t\treturn newInst;\n\t}", "public static void main(String[] args) throws IOException, ClassNotFoundException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException {\n\n Class objectClass = LazyMethodSingleton.class;\n\n Constructor constructor = objectClass.getDeclaredConstructor();\n constructor.setAccessible(true);\n\n LazyMethodSingleton instance = LazyMethodSingleton.getInstance();\n LazyMethodSingleton newInstance = (LazyMethodSingleton) constructor.newInstance();\n\n// HungrySingleton instance = HungrySingleton.getInstance();\n// HungrySingleton newInstance = (HungrySingleton) constructor.newInstance();\n\n// LazyStaticInnerClassSingleton instance = LazyStaticInnerClassSingleton.getInstance();\n// LazyStaticInnerClassSingleton newInstance = (LazyStaticInnerClassSingleton) constructor.newInstance();\n\n System.out.println(instance);\n System.out.println(newInstance);\n System.out.println(instance == newInstance);\n\n\n\n\n }", "Secuencia createSecuencia();", "public T getInstance() {\n return instance;\n }", "protected final MareaPesca createInstance() {\n MareaPesca mareaPesca = new MareaPesca();\n return mareaPesca;\n }", "public T getNewInstance() {\n T value = null;\n Class<T> tClass = (Class<T>) ((ParameterizedType) this.getClass().getGenericSuperclass()).getActualTypeArguments()[0];\n try {\n value = tClass.newInstance();\n } catch (InstantiationException e) {\n e.printStackTrace();\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n }\n return value;\n }", "public static Singleton getInstance() {\t\t//getInstance nam omogucava da instanciramo klasu jedinstveno ako vec nismo!\r\n\t\tif (instance == null) {\t\t\t\t\t// inace nam vraca instancu ako je vec napravljena!\r\n\t\t\tinstance = new Singleton();\r\n\t\t}\r\n\t\treturn instance;\r\n\t}", "private SingletonSigar(){}", "public static synchronized Object getInstance(String classname) {\n\n Object singleton = map.get(classname);\n\n if(singleton != null) {\n dbgLog.fine(\"Registry.getInstance(): already-registered case\");\n return singleton;\n }\n try {\n singleton = Class.forName(classname).newInstance();\n } catch(ClassNotFoundException cnf) {\n cnf.printStackTrace();\n } catch(InstantiationException ie) {\n ie.printStackTrace();\n } catch(IllegalAccessException ia) {\n ia.printStackTrace();\n } catch(Exception e) {\n e.printStackTrace();\n }\n map.put(classname, singleton);\n dbgLog.fine(\"Registry.getInstance(): not-registered case\");\n return singleton;\n }", "Oracion createOracion();", "static <T> T instantiate(Class<T> type) {\n\n\n try {\n final Constructor<T> constructor = type.getDeclaredConstructor();\n return constructor.newInstance();\n } catch (NoSuchMethodException | InstantiationException | IllegalAccessException | InvocationTargetException e) {\n e.printStackTrace();\n }\n\n\n return null;\n }", "OBJECT createOBJECT();", "public static FacadeMiniBank getInstance(){\r\n\r\n\t\tif(singleton==null){\r\n\t\t\ttry {\r\n\t\t\t\t//premier essai : implementation locale\r\n\t\t\t\tsingleton=(FacadeMiniBank) Class.forName(implFacadePackage + \".\" + localeFacadeClassName).newInstance();\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tSystem.err.println(e.getMessage() + \" not found or not created\");\r\n\t\t\t}\t\t\t\t\t\t\r\n\t\t}\r\n\t\tif(singleton==null){\r\n\t\t\t//deuxieme essai : business delegate \r\n\t\t singleton=getRemoteInstance();\r\n\t\t\t\t\t\t\t\t\r\n\t\t}\r\n\t\treturn singleton;\r\n\t}", "Foco createFoco();", "public static synchronized N_ThreadSafeSingalton getInstance() throws InterruptedException{\n\t\t\n\t\tif (uniqueInstance == null){\n\t\t\tThread.sleep(1000);// just to show multithreading issue.\n\t\t\tuniqueInstance=new N_ThreadSafeSingalton();\n\t\t}\t\t\n\t\t\n\t\treturn uniqueInstance;\n\t}", "private static Suma creaObjetoSuma (){\n Suma suma = new Suma(4,6);\n return suma; \n }", "public static Ambulancia get_instance() {\n if (instance == null)\n instance = new Ambulancia();\n return instance;\n }", "public static Arkanoid getInstace() {\n\t\tif(instance == null) {\n\t\t\tinstance = new Arkanoid();\n\t\t}\n\t\treturn instance;\n\t}", "public static Alloca getInstance() {\n if (instance == null) {\n instance = new Alloca();\n }\n return instance;\n }", "private synchronized static void createInstance() {\n if (INSTANCE == null) { \n INSTANCE = new DataConnection();\n }\n }", "T create();", "T create();", "@Override\r\n\tpublic CMObject newInstance()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\treturn this.getClass().getDeclaredConstructor().newInstance();\r\n\t\t}\r\n\t\tcatch(final Exception e)\r\n\t\t{\r\n\t\t\tLog.errOut(ID(),e);\r\n\t\t}\r\n\t\treturn new StdBehavior();\r\n\t}", "public static vue_Options instance() {\n\t\tif (!estInstancie){// Pour n'avoir qu'une seule fenÍtre ouverte ŗ la fois\n\t\t\testInstancie = true;\n\t\t\treturn new vue_Options() ; \n\t\t}\n\t\telse{\n\t\t\treturn null ;\n\t\t}\n\t\t\t\n\t}", "public synchronized static WSControlador getControlador() {\n if (instancia == null) {\n instancia = new WSControlador();\n }\n return instancia;\n }", "private Singleton(){}", "public IntegerGenotype create() \r\n\t{\n\t\tIntegerGenotype genotype = new IntegerGenotype(1,3);\r\n\t\tgenotype.init(new Random(), Data.numeroCuardillas); \r\n\t\t\r\n\t\treturn genotype;\r\n\t}", "public static utilitys getInstance(){\n\r\n\t\treturn instance;\r\n\t}", "public static Construtor construtor() {\n return new Construtor();\n }", "public static NPIconFactory getInstance()\r\n {\r\n if(instance==null)\r\n instance = new NPIconFactory();\r\n return instance;\r\n }", "private LazySingleton(){}", "private static void createInstance() {\n if (mApiInterface == null) {\n synchronized(APIClient.class) {\n if (mApiInterface == null) {\n mApiInterface = buildApiClient();\n }\n }\n }\n }", "private static Object getInstance( final String className ) {\n if( className == null ) return null;\n return java.security.AccessController.doPrivileged(\n new java.security.PrivilegedAction<Object>() {\n public Object run() {\n try {\n ClassLoader cl =\n Thread.currentThread().getContextClassLoader();\n if (cl == null)\n cl = ClassLoader.getSystemClassLoader();\n return Class.forName( className, true,cl).newInstance();\n } catch( Exception e ) {\n new ErrorManager().error(\n \"Error In Instantiating Class \" + className, e,\n ErrorManager.GENERIC_FAILURE );\n }\n return null;\n }\n }\n );\n }", "public static Object createTaskObject(){\n try {\n\n return taskModel.make()\n .load(ClassLoader.getSystemClassLoader(), ClassLoadingStrategy.Default.WRAPPER)\n .getLoaded()\n .newInstance();\n\n\n } catch (InstantiationException e) {\n e.printStackTrace();\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n }\n\n return null;\n }", "public java.lang.String getInstancia() {\r\n return instancia;\r\n }", "public Object buildNewInstance() throws DescriptorException {\n if (this.isUsingDefaultConstructor()) {\n return this.buildNewInstanceUsingDefaultConstructor();\n } else {\n return this.buildNewInstanceUsingFactory();\n }\n }", "public static Servidor getInstance() throws IOException {\n if (instancia == null) {\n instancia = new Servidor(\"Servidor liga 19/20\");\n }\n\n return instancia;\n }", "public org.objenesis.instantiator.ObjectInstantiator newInstantiatorOf(final java.lang.Class r4) {\n /*\n r3 = this;\n boolean r0 = com.esotericsoftware.kryo.util.Util.IS_ANDROID\n r1 = 1\n if (r0 != 0) goto L_0x002a\n java.lang.Class r0 = r4.getEnclosingClass()\n if (r0 == 0) goto L_0x001d\n boolean r0 = r4.isMemberClass()\n if (r0 == 0) goto L_0x001d\n int r0 = r4.getModifiers()\n boolean r0 = java.lang.reflect.Modifier.isStatic(r0)\n if (r0 != 0) goto L_0x001d\n r0 = 1\n goto L_0x001e\n L_0x001d:\n r0 = 0\n L_0x001e:\n if (r0 != 0) goto L_0x002a\n com.esotericsoftware.reflectasm.ConstructorAccess r0 = com.esotericsoftware.reflectasm.ConstructorAccess.get(r4) // Catch:{ Exception -> 0x002a }\n com.esotericsoftware.kryo.Kryo$DefaultInstantiatorStrategy$1 r2 = new com.esotericsoftware.kryo.Kryo$DefaultInstantiatorStrategy$1 // Catch:{ Exception -> 0x002a }\n r2.<init>(r0, r4) // Catch:{ Exception -> 0x002a }\n return r2\n L_0x002a:\n r0 = 0\n r2 = r0\n java.lang.Class[] r2 = (java.lang.Class[]) r2 // Catch:{ Exception -> 0x0033 }\n java.lang.reflect.Constructor r0 = r4.getConstructor(r2) // Catch:{ Exception -> 0x0033 }\n goto L_0x003c\n L_0x0033:\n java.lang.Class[] r0 = (java.lang.Class[]) r0 // Catch:{ Exception -> 0x0042 }\n java.lang.reflect.Constructor r0 = r4.getDeclaredConstructor(r0) // Catch:{ Exception -> 0x0042 }\n r0.setAccessible(r1) // Catch:{ Exception -> 0x0042 }\n L_0x003c:\n com.esotericsoftware.kryo.Kryo$DefaultInstantiatorStrategy$2 r1 = new com.esotericsoftware.kryo.Kryo$DefaultInstantiatorStrategy$2 // Catch:{ Exception -> 0x0042 }\n r1.<init>(r0, r4) // Catch:{ Exception -> 0x0042 }\n return r1\n L_0x0042:\n org.objenesis.strategy.InstantiatorStrategy r0 = r3.fallbackStrategy\n if (r0 != 0) goto L_0x00c1\n boolean r0 = r4.isMemberClass()\n if (r0 == 0) goto L_0x0073\n int r0 = r4.getModifiers()\n boolean r0 = java.lang.reflect.Modifier.isStatic(r0)\n if (r0 == 0) goto L_0x0058\n goto L_0x0073\n L_0x0058:\n com.esotericsoftware.kryo.KryoException r0 = new com.esotericsoftware.kryo.KryoException\n java.lang.StringBuilder r1 = new java.lang.StringBuilder\n r1.<init>()\n java.lang.String r2 = \"Class cannot be created (non-static member class): \"\n r1.append(r2)\n java.lang.String r4 = com.esotericsoftware.kryo.util.Util.className(r4)\n r1.append(r4)\n java.lang.String r4 = r1.toString()\n r0.<init>(r4)\n throw r0\n L_0x0073:\n java.lang.StringBuilder r0 = new java.lang.StringBuilder\n java.lang.StringBuilder r1 = new java.lang.StringBuilder\n r1.<init>()\n java.lang.String r2 = \"Class cannot be created (missing no-arg constructor): \"\n r1.append(r2)\n java.lang.String r2 = com.esotericsoftware.kryo.util.Util.className(r4)\n r1.append(r2)\n java.lang.String r1 = r1.toString()\n r0.<init>(r1)\n java.lang.String r4 = r4.getSimpleName()\n java.lang.String r1 = \"\"\n boolean r4 = r4.equals(r1)\n if (r4 == 0) goto L_0x00b7\n java.lang.String r4 = \"\\n\\tThis is an anonymous class, which is not serializable by default in Kryo. Possible solutions: \"\n r0.append(r4)\n java.lang.String r4 = \"1. Remove uses of anonymous classes, including double brace initialization, from the containing \"\n r0.append(r4)\n java.lang.String r4 = \"class. This is the safest solution, as anonymous classes don't have predictable names for serialization.\"\n r0.append(r4)\n java.lang.String r4 = \"\\n\\t2. Register a FieldSerializer for the containing class and call \"\n r0.append(r4)\n java.lang.String r4 = \"FieldSerializer#setIgnoreSyntheticFields(false) on it. This is not safe but may be sufficient temporarily. \"\n r0.append(r4)\n java.lang.String r4 = \"Use at your own risk.\"\n r0.append(r4)\n L_0x00b7:\n com.esotericsoftware.kryo.KryoException r4 = new com.esotericsoftware.kryo.KryoException\n java.lang.String r0 = r0.toString()\n r4.<init>(r0)\n throw r4\n L_0x00c1:\n org.objenesis.instantiator.ObjectInstantiator r4 = r0.newInstantiatorOf(r4)\n return r4\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.esotericsoftware.kryo.Kryo.DefaultInstantiatorStrategy.newInstantiatorOf(java.lang.Class):org.objenesis.instantiator.ObjectInstantiator\");\n }", "public interface CourseRegFactory\n{\n\n /**\n * Test the existence of an instance\n * @param name The name of the instance to test the existence of\n * @return \n */\n public boolean exists(String name) throws IOException;\n\n /**\n * Create a new instance\n * @param edma_name The name of the instance to create\n * @param schoolInfo The initial values for the singleton SchoolInfo\n * @return \n */\n public CourseRegInstance newInstance(String edma_name, SchoolInfo schoolInfo) throws IOException;\n\n /**\n * Get an instance from its name\n * @param name The name of the instance to get\n * @return \n */\n public CourseRegInstance getInstance(String name) throws IOException;\n\n /**\n * Delete an instance\n * @param name The name of the instance to delete\n * @return <tt>true</tt> if the instance was deleted\n */\n public boolean deleteInstance(String name) throws IOException;\n\n}", "public Object getNewInstance(String type, String tag) throws XCFException {\n\t\treturn getInstance(type, tag, false);\n\t}", "protected BusinessObject getNewBusinessObjInstance()\n {\n return BUSINESS_OBJ ;\n }", "public static Livro criarLivro() {\n\n\t\tLivro livro = new Livro();\n\n\t\tString codigo = Console.recuperaTexto(\"Informe o código:\");\n\t\tlivro.setCodigo(codigo);\n\t\tString titulo = Console.recuperaTexto(\"Informe o título:\");\n\t\tlivro.setTitulo(titulo);\n\n\t\tArrayList<String> autores = new ArrayList<>();\n\t\tInteger quantidade = Console.recuperaInteiro(\"Quantos autores?\");\n\t\tfor (int i = 0; i < quantidade; i++) {\n\t\t\tString autor = Console.recuperaTexto(\"Informe o autor \" + (i + 1) + \":\");\n\t\t\tautores.add(autor);\n\t\t}\n\t\tlivro.setAutores(autores);\n\n\t\tString isbn = Console.recuperaTexto(\"Informe o ISBN:\");\n\t\tlivro.setIsbn(isbn);\n\t\tInteger ano = Console.recuperaInteiro(\"Informe o ano:\");\n\t\tlivro.setAno(ano);\n\n\t\treturn livro;\n\n\t}", "final Truerandomness defaultInstance() {\n\n\t\ttry {\n\t\t\treturn newInstance();\n\t\t} catch (Throwable t) {\n\t\t\t// hide\n\t\t}\n\n\t\t// not supported\n\t\treturn null;\n\t}", "CdapServiceInstance createCdapServiceInstance();" ]
[ "0.77628577", "0.7760556", "0.7161816", "0.71604574", "0.6970644", "0.69594646", "0.69426405", "0.68333465", "0.67452097", "0.66087914", "0.65595025", "0.646124", "0.6415941", "0.6376868", "0.6354025", "0.62603825", "0.6251072", "0.62471455", "0.6247084", "0.6240395", "0.62050736", "0.6192347", "0.61902034", "0.61853987", "0.61801624", "0.6149349", "0.61376435", "0.612636", "0.60944545", "0.60891724", "0.60842365", "0.6074581", "0.60571504", "0.6051671", "0.6031142", "0.6028868", "0.6021689", "0.6014291", "0.59941494", "0.5959676", "0.59402263", "0.59332913", "0.59331226", "0.5902778", "0.59020597", "0.58874893", "0.5882973", "0.587628", "0.5871197", "0.5868722", "0.5867112", "0.585789", "0.58490133", "0.5829261", "0.5814301", "0.5808992", "0.58041966", "0.5800626", "0.58001995", "0.5777485", "0.5771025", "0.57681656", "0.57560015", "0.57559556", "0.5754355", "0.5750879", "0.574603", "0.57409585", "0.57338005", "0.5733388", "0.5731885", "0.5731636", "0.57185066", "0.57083046", "0.570029", "0.56986916", "0.56958574", "0.56958574", "0.5695649", "0.5694496", "0.569097", "0.5689381", "0.5683551", "0.5673548", "0.567182", "0.5664996", "0.565997", "0.56540847", "0.564046", "0.56351906", "0.56342345", "0.5626501", "0.5622823", "0.56212425", "0.56167954", "0.56151175", "0.5611576", "0.5604719", "0.5604587", "0.5602838" ]
0.6207324
20
Metodo....: destroiInstancia Descricao.: Libera a instancia de LOG da memoria Atencao: Se uma instancia for liberada (existe apenas uma), nao sera possivel chamar qualquer metodo... Qualquer chamada causara um NULL POINT EXCEPTION e por isso este metodo so podera ser chamado pelo gerente do GPP
public void destroiInstancia() { // Libera a variavel instancia para ser limpa pelo garbage collection //instancia = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static GerentePoolLog getInstancia(Class ownerClass)\n {\n \t// Verifica se ja existe uma instancia do Pool em execucao se negativo entao inicializa\n /*if ( instancia == null )\n {\n System.out.println (\"Gerente de LOG (Singleton) INICIADO \");\n instancia = \n }*/\n \tGerentePoolLog instancia = new GerentePoolLog(ownerClass);\n \n return instancia;\n }", "@Override\r\n /* OSINE791 - RSIS1 - Inicio */\r\n //public ExpedienteDTO generarExpedienteOrdenServicio(ExpedienteDTO expedienteDTO,String codigoTipoSupervisor,UsuarioDTO usuarioDTO) throws ExpedienteException{\r\n public ExpedienteGSMDTO generarExpedienteOrdenServicio(ExpedienteGSMDTO expedienteDTO,String codigoTipoSupervisor,UsuarioDTO usuarioDTO,String sigla) throws ExpedienteException{\r\n LOG.error(\"generarExpedienteOrdenServicio\");\r\n ExpedienteGSMDTO retorno= new ExpedienteGSMDTO();\r\n try{\r\n expedienteDTO.setEstado(Constantes.ESTADO_ACTIVO);\r\n PghExpediente pghExpediente = ExpedienteGSMBuilder.toExpedienteDomain(expedienteDTO);\r\n pghExpediente.setFechaEstadoProceso(new Date());\r\n pghExpediente.setDatosAuditoria(usuarioDTO);\r\n crud.create(pghExpediente);\r\n retorno=ExpedienteGSMBuilder.toExpedienteDto(pghExpediente);\r\n \r\n //reg historicoEstado\r\n MaestroColumnaDTO tipoHistorico=maestroColumnaDAO.findMaestroColumna(Constantes.DOMINIO_TIPO_COMPONENTE, Constantes.APLICACION_INPS, Constantes.CODIGO_TIPO_COMPONENTE_EXPEDIENTE).get(0);\r\n /* OSINE_SFS-480 - RSIS 40 - Inicio */\r\n HistoricoEstadoDTO historicoEstado=historicoEstadoDAO.registrar(pghExpediente.getIdExpediente(), null, pghExpediente.getIdEstadoProceso().getIdEstadoProceso(), pghExpediente.getIdPersonal().getIdPersonal(), pghExpediente.getIdPersonal().getIdPersonal(), tipoHistorico.getIdMaestroColumna(),null,null, null, usuarioDTO);\r\n LOG.info(\"historicoEstado-->\"+historicoEstado);\r\n /* OSINE_SFS-480 - RSIS 40 - Fin */\r\n //inserta ordenServicio\r\n Long idLocador=codigoTipoSupervisor.equals(Constantes.CODIGO_TIPO_SUPERVISOR_PERSONA_NATURAL)?expedienteDTO.getOrdenServicio().getLocador().getIdLocador():null;\r\n Long idSupervisoraEmpresa=codigoTipoSupervisor.equals(Constantes.CODIGO_TIPO_SUPERVISOR_PERSONA_JURIDICA)?expedienteDTO.getOrdenServicio().getSupervisoraEmpresa().getIdSupervisoraEmpresa():null;\r\n OrdenServicioDTO OrdenServicioDTO=ordenServicioDAO.registrar(retorno.getIdExpediente(), \r\n expedienteDTO.getOrdenServicio().getIdTipoAsignacion(), expedienteDTO.getOrdenServicio().getEstadoProceso().getIdEstadoProceso(), \r\n /* OSINE791 - RSIS1 - Inicio */\r\n //codigoTipoSupervisor, idLocador, idSupervisoraEmpresa, usuarioDTO);\r\n codigoTipoSupervisor, idLocador, idSupervisoraEmpresa, usuarioDTO,sigla);\r\n /* OSINE791 - RSIS1 - Fin */\r\n LOG.info(\"OrdenServicioDTO:\"+OrdenServicioDTO.getNumeroOrdenServicio());\r\n //busca idPersonalDest\r\n PersonalDTO personalDest=null;\r\n List<PersonalDTO> listPersonalDest=null;\r\n if(codigoTipoSupervisor.equals(Constantes.CODIGO_TIPO_SUPERVISOR_PERSONA_NATURAL)){\r\n //personalDest=personalDAO.find(new PersonalFilter(expedienteDTO.getOrdenServicio().getLocador().getIdLocador(),null)).get(0);\r\n listPersonalDest=personalDAO.find(new PersonalFilter(expedienteDTO.getOrdenServicio().getLocador().getIdLocador(),null));\r\n }else if(codigoTipoSupervisor.equals(Constantes.CODIGO_TIPO_SUPERVISOR_PERSONA_JURIDICA)){\r\n //personalDest=personalDAO.find(new PersonalFilter(null,expedienteDTO.getOrdenServicio().getSupervisoraEmpresa().getIdSupervisoraEmpresa())).get(0);\r\n listPersonalDest=personalDAO.find(new PersonalFilter(null,expedienteDTO.getOrdenServicio().getSupervisoraEmpresa().getIdSupervisoraEmpresa()));\r\n }\r\n if(listPersonalDest==null || listPersonalDest.isEmpty()){\r\n throw new ExpedienteException(\"La Empresa Supervisora no tiene un Personal asignado\",null);\r\n }else{\r\n personalDest=listPersonalDest.get(0);\r\n }\r\n //inserta historico Orden Servicio\r\n EstadoProcesoDTO estadoProcesoDto=estadoProcesoDAO.find(new EstadoProcesoFilter(Constantes.IDENTIFICADOR_ESTADO_PROCESO_OS_REGISTRO)).get(0);\r\n MaestroColumnaDTO tipoHistoricoOS=maestroColumnaDAO.findMaestroColumna(Constantes.DOMINIO_TIPO_COMPONENTE, Constantes.APLICACION_INPS, Constantes.CODIGO_TIPO_COMPONENTE_ORDEN_SERVICIO).get(0);\r\n /* OSINE_SFS-480 - RSIS 40 - Inicio */\r\n HistoricoEstadoDTO historicoEstadoOS=historicoEstadoDAO.registrar(null, OrdenServicioDTO.getIdOrdenServicio(), estadoProcesoDto.getIdEstadoProceso(), expedienteDTO.getPersonal().getIdPersonal(), personalDest.getIdPersonal(), tipoHistoricoOS.getIdMaestroColumna(),null,null, null, usuarioDTO); \r\n LOG.info(\"historicoEstadoOS:\"+historicoEstadoOS);\r\n /* OSINE_SFS-480 - RSIS 40 - Fin */\r\n retorno.setOrdenServicio(new OrdenServicioDTO(OrdenServicioDTO.getIdOrdenServicio(),OrdenServicioDTO.getNumeroOrdenServicio()));\r\n }catch(Exception e){\r\n LOG.error(\"error en generarExpedienteOrdenServicio\",e);\r\n throw new ExpedienteException(e.getMessage(), e);\r\n }\r\n return retorno;\r\n }", "public ImagenLogica(){\n this.objImagen=new Imagen();\n //Creacion de rutas\n this.creaRutaImgPerfil();\n this.crearRutaImgPublicacion();\n \n }", "private void BajarPiezaAlInstante() {\n int newY = posicionY;\r\n while (newY > 0) {\r\n if (!Mover(piezaActual, posicionX, newY - 1)) {\r\n break;\r\n }\r\n --newY;\r\n }\r\n BajarPieza1posicion();\r\n }", "public static LoInscripcion GetInstancia(){\n if (instancia==null)\n {\n instancia = new LoInscripcion();\n }\n\n return instancia;\n }", "public static IRepositorioTransacao getInstancia(){\n\n\t\tif(instancia == null){\n\t\t\tinstancia = new RepositorioTransacaoHBM();\n\t\t}\n\n\t\treturn instancia;\n\t}", "@Override\r\n\tpublic Bloco0 criarBloco(MovimentoMensalIcmsIpi movimentoMensalIcmsIpi) {\n\t\tLOG.log(Level.INFO, \"Montando o BLOCO 0, com INICIO em: {0} e TERMINO: {1} \", movimentoMensalIcmsIpi.getDataInicio());\r\n\t\tBloco0 bloco0 = new Bloco0();\r\n\t\t\r\n\t\t/**\r\n\t\t * TODO (Para ver/pensar melhor)\r\n\t\t * Ver se eu tenho que fazer alguma validação aqui. Ex.: irá preecher registro X para aquele Mês?\r\n\t\t * Tentar capturar possiveis erros.: Ex o famosão -> @NullPointerException\r\n\t\t */\r\n\t\t\r\n\t\tbloco0.setReg0000(reg0000Service.montarGrupoDeRegistroSimples(movimentoMensalIcmsIpi));\r\n\t\tbloco0.setReg0001(reg0001Service.montarGrupoDeRegistroSimples(movimentoMensalIcmsIpi));\r\n\t\tbloco0.setReg0005(reg0005Service.montarGrupoDeRegistroSimples(movimentoMensalIcmsIpi));\r\n\t\tbloco0.setReg0100(reg0100Service.montarGrupoDeRegistroSimples(movimentoMensalIcmsIpi));\r\n\t\tbloco0.setReg0150(reg0150Service.montarGrupoDeRegistro(movimentoMensalIcmsIpi));\r\n\t\tbloco0.setReg0190(reg0190Service.montarGrupoDeRegistro(movimentoMensalIcmsIpi));\r\n\t\tbloco0.setReg0200(reg0200Service.montarGrupoDeRegistro(movimentoMensalIcmsIpi));\r\n\t\tbloco0.setReg0400(reg0400Service.montarGrupoDeRegistro(movimentoMensalIcmsIpi));\r\n\t\tbloco0.setReg0450(reg0450Service.montarGrupoDeRegistro(movimentoMensalIcmsIpi));\r\n//\t\tbloco0.setReg0460(reg0460Service.montarGrupoDeRegistro(movimentoMensalIcmsIpi));\r\n//\t\tbloco0.setReg0990(montarEncerramentoDoBloco0(bloco0));\r\n\t\t\r\n\t\tLOG.log(Level.INFO, \"Montagem do BLOCO 0, TEMINADA! {0} \" ,bloco0);\r\n\t\treturn bloco0;\r\n\t}", "public static LogGPPServer getInstancia()\n\t{\n\t\tif(instancia == null)\n\t\t{\n\t\t\tinstancia = new LogGPPServer(); \n\t\t}\n\n\t\treturn( instancia );\n\t}", "public CalculadoraException() {\r\n }", "public void inicializarCaptura() {\n try {\n fingerprintSDK = new MatchingContext(); \n //Inicializa la captura de huella digital.\n GrFingerJava.initializeCapture(this); \n objpantprincipal.writeLog(\"**SDK de huella dactilar inicializado con éxito**\");\n } catch (Exception e) {\n //Si ocurre un error se cierra la aplicación.\n //If any error ocurred while initializing GrFinger,\n //writes the error to log\n Toolkit.getDefaultToolkit().beep();\n objpantprincipal.writeLog(e.getMessage());\n //System.exit(1);\n }\n }", "private void inizia() throws Exception {\n /* variabili e costanti locali di lavoro */\n Campo campoDataInizio;\n Campo campoDataFine;\n Campo campoConto;\n Date dataIniziale;\n Date dataFinale;\n int numPersone;\n ContoModulo modConto;\n\n\n String titolo = \"Esecuzione addebiti fissi\";\n AddebitoFissoPannello pannello;\n Date dataInizio;\n Pannello panDate;\n Campo campoStato;\n Filtro filtro;\n int codConto;\n int codCamera;\n\n\n try { // prova ad eseguire il codice\n\n /* recupera dati generali */\n modConto = Albergo.Moduli.Conto();\n codConto = this.getCodConto();\n codCamera = modConto.query().valoreInt(Conto.Cam.camera.get(), codConto);\n numPersone = CameraModulo.getNumLetti(codCamera);\n\n /* crea il pannello servizi e vi registra la camera\n * per avere l'anteprima dei prezzi*/\n pannello = new AddebitoFissoPannello();\n this.setPanServizi(pannello);\n pannello.setNumPersone(numPersone);\n this.setTitolo(titolo);\n\n// /* regola date suggerite */\n// dataFinale = Progetto.getDataCorrente();\n// dataInizio = Lib.Data.add(dataFinale, -1);\n\n /* pannello date */\n campoDataInizio = CampoFactory.data(nomeDataIni);\n campoDataInizio.decora().obbligatorio();\n// campoDataInizio.setValore(dataInizio);\n\n campoDataFine = CampoFactory.data(nomeDataFine);\n campoDataFine.decora().obbligatorio();\n// campoDataFine.setValore(dataFinale);\n\n /* conto */\n campoConto = CampoFactory.comboLinkSel(nomeConto);\n campoConto.setNomeModuloLinkato(Conto.NOME_MODULO);\n campoConto.setLarScheda(180);\n campoConto.decora().obbligatorio();\n campoConto.decora().etichetta(\"conto da addebitare\");\n campoConto.setUsaNuovo(false);\n campoConto.setUsaModifica(false);\n\n /* inizializza e assegna il valore (se non inizializzo\n * il combo mi cambia il campo dati e il valore si perde)*/\n campoConto.inizializza();\n campoConto.setValore(this.getCodConto());\n\n /* filtro per vedere solo i conti aperti dell'azienda corrente */\n campoStato = modConto.getCampo(Conto.Cam.chiuso.get());\n filtro = FiltroFactory.crea(campoStato, false);\n filtro.add(modConto.getFiltroAzienda());\n campoConto.getCampoDB().setFiltroCorrente(filtro);\n\n panDate = PannelloFactory.orizzontale(this.getModulo());\n panDate.creaBordo(\"Periodo da addebitare\");\n panDate.add(campoDataInizio);\n panDate.add(campoDataFine);\n panDate.add(campoConto);\n\n this.addPannello(panDate);\n this.addPannello(this.getPanServizi());\n\n this.regolaCamera();\n\n /* recupera la data iniziale (oggi) */\n dataIniziale = AlbergoLib.getDataProgramma();\n\n /* recupera la data di partenza prevista dal conto */\n modConto = ContoModulo.get();\n dataFinale = modConto.query().valoreData(Conto.Cam.validoAl.get(),\n this.getCodConto());\n\n /* recupera il numero di persone dal conto */\n numPersone = modConto.query().valoreInt(Conto.Cam.numPersone.get(),\n this.getCodConto());\n\n /* regola date suggerite */\n campoDataInizio = this.getCampo(nomeDataIni);\n campoDataInizio.setValore(dataIniziale);\n\n campoDataFine = this.getCampo(nomeDataFine);\n campoDataFine.setValore(dataFinale);\n\n /* conto */\n campoConto = this.getCampo(nomeConto);\n campoConto.setAbilitato(false);\n\n /* regola la data iniziale di riferimento per l'anteprima dei prezzi */\n Date data = (Date)campoDataInizio.getValore();\n this.getPanServizi().setDataPrezzi(data);\n\n /* regola il numero di persone dal conto */\n this.getPanServizi().setNumPersone(numPersone);\n\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n }", "private void guardarFoto() {\n if (foto != null && is != null) {\n\n Image foto_Nueva;\n foto_Nueva = foto.getScaledInstance(frmPersona.getLblFoto().getWidth(), frmPersona.getLblFoto().getHeight(), Image.SCALE_SMOOTH);\n frmPersona.getLblFoto().setIcon(new ImageIcon(foto_Nueva));\n cancelarFoto();\n ctrFrmPersona.pasarFoto(is);\n } else {\n JOptionPane.showMessageDialog(vtnWebCam, \"Aun no se a tomado una foto.\");\n }\n\n }", "private void inizia() throws Exception {\n /* variabili e costanti locali di lavoro */\n\n try { // prova ad eseguire il codice\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n }", "private void caricaRegistrazione() {\n\t\tfor(MovimentoEP movimentoEP : primaNota.getListaMovimentiEP()){\n\t\t\t\n\t\t\tif(movimentoEP.getRegistrazioneMovFin() == null) { //caso di prime note libere.\n\t\t\t\tthrow new BusinessException(ErroreCore.OPERAZIONE_NON_CONSENTITA.getErrore(\"La prima nota non e' associata ad una registrazione.\"));\n\t\t\t}\n\t\t\t\n\t\t\tthis.registrazioneMovFinDiPartenza = registrazioneMovFinDad.findRegistrazioneMovFinById(movimentoEP.getRegistrazioneMovFin().getUid());\n\t\t\t\n\t\t}\n\t\t\n\t\tif(this.registrazioneMovFinDiPartenza.getMovimento() == null){\n\t\t\tthrow new BusinessException(\"Movimento non caricato.\");\n\t\t}\n\t\t\n\t}", "private void inizia() throws Exception {\n try { // prova ad eseguire il codice\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n }", "public co.com.telefonica.atiempo.vpistbba.actividades.df.instalacion.ejb.sb.AInstalarTOALocal create()\n\t\tthrows javax.ejb.CreateException;", "private static void getInstancia() throws IOException {\r\n if (propiedades == null) {\r\n propiedades = new PropiedadesComunicacion();\r\n }\r\n }", "public ViaturaExistenteException(){\n super();\n }", "public void generar() throws Exception {\n\t\tAnalizador_Sintactico.salida.generar(\".DATA\", \"genero los datos estaticos para la clase \"+this.nombre);\r\n\t\tAnalizador_Sintactico.salida.generar(\"VT_\"+nombre+\":\",\" \");\r\n\t\t\r\n\t\tboolean esDinamico=false;\r\n\t\t\r\n\t\t//para cada metodo, genero la etiqueta dw al codigo\r\n\t\tfor (EntradaMetodo m: entradaMetodo.values()) {\r\n\t\t\tif (m.getModificador().equals(\"dynamic\")) {\r\n\t\t\t\tAnalizador_Sintactico.salida.gen_DW(\"DW \"+m.getEtiqueta(),\"offset: \"+m.getOffsetMetodo(),m.getOffsetMetodo());\r\n\t\t\t\tesDinamico=true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tAnalizador_Sintactico.salida.agregar_DW();\r\n\t\t\r\n\t\t//si NO hay ningun metodo dinamico -> VT con NOP\r\n\t\tif (! esDinamico)\r\n\t\t\tAnalizador_Sintactico.salida.generar(\"NOP\",\"no hago nada\");\r\n\t\t\r\n\t\t//genero codigo para todos los metodos\r\n\t\tAnalizador_Sintactico.salida.generar(\".CODE\",\"seccion codigo de la clase \"+this.nombre);\r\n\t\t\r\n\t\tList<EntradaPar> listaParams;\r\n\t\tfor(EntradaMetodo m: entradaMetodo.values()) {\r\n\t\t\t//metodo actual es m\r\n\t\t\tAnalizador_Sintactico.TS.setMetodoActual(m);\r\n\t\t\t\r\n\t\t\t//SETEO el offset de sus parametros\r\n\t\t\tlistaParams= m.getEntradaParametros();\r\n\t\t\t\r\n\t\t\tfor(EntradaPar p: listaParams) {\r\n\t\t\t\t//seteo offset de p\r\n\t\t\t\t\r\n\t\t\t\t//si es dinamico m -> offset desde 3\r\n\t\t\t\tif (m.getModificador().equals(\"dynamic\")) {\r\n\t\t\t\t\tp.setOffset((listaParams.size() +4) - p.getUbicacion());\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t//si es estatico m -> offset desde 2\r\n\t\t\t\t\tp.setOffset((listaParams.size() +3) - p.getUbicacion());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//genero el codigo del cuerpo de ese metodo\r\n\t\t\tm.generar();\r\n\t\t}\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//genero codigo para todos los constructores\r\n\t\tfor(EntradaCtor c: entradaCtor.values()) {\r\n\t\t\t//metodo actual es m\r\n\t\t\tAnalizador_Sintactico.TS.setMetodoActual(c);\r\n\t\t\t\r\n\t\t\t//SETEO el offset de sus parametros\r\n\t\t\tlistaParams= c.getEntradaParametros();\r\n\t\t\t\r\n\t\t\tfor(EntradaPar p: listaParams) {\r\n\t\t\t\t//seteo offset de p\r\n\t\t\t\tp.setOffset(listaParams.size() +4 - p.getUbicacion());\t// +4 porque el ctor tiene this\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\t//genero el codigo de ese metodo\r\n\t\t\tc.generar();\r\n\t\t}\t\r\n\t}", "public String guardar()\r\n/* 104: */ {\r\n/* 105: */ try\r\n/* 106: */ {\r\n/* 107:132 */ this.servicioDimensionContable.guardar(this.dimensionContable);\r\n/* 108:133 */ addInfoMessage(getLanguageController().getMensaje(\"msg_info_guardar\"));\r\n/* 109:134 */ setEditado(false);\r\n/* 110:135 */ cargarDatos();\r\n/* 111: */ }\r\n/* 112: */ catch (Exception e)\r\n/* 113: */ {\r\n/* 114:137 */ addErrorMessage(getLanguageController().getMensaje(\"msg_error_guardar\"));\r\n/* 115:138 */ LOG.error(\"ERROR AL GUARDAR DATOS\", e);\r\n/* 116: */ }\r\n/* 117:140 */ return \"\";\r\n/* 118: */ }", "static public GUIAltaHabitacion obtenerInstancia(){\r\n\t\t if(altaHabitacion == null){\r\n\t\t\t altaHabitacion = new GUIAltaHabitacion();\r\n\t\t }\r\n\t\t \r\n\t\t return altaHabitacion;\r\n\t }", "public void registrarPagoFacturaCredito(){\n if(facturaCredito != null){\n try{\n //NUEVA TRANSACCION\n Transaccion transac = new Transaccion();\n transac.setFechaTransac(new funciones().getTime());\n transac.setHoraTransac(new funciones().getTime());\n transac.setResponsableTransac(new JsfUtil().getEmpleado());\n transac.setTipoTransac(4); //REGISTRO DE PAGO\n transac.setIdtransac(ejbFacadeTransac.getNextIdTransac());\n ejbFacadeTransac.create(transac);\n //REGISTRAR PAGO\n PagoCompra pagoCompra = new PagoCompra();\n pagoCompra.setFacturaIngreso(facturaCredito);\n pagoCompra.setIdtransac(transac);\n pagoCompra.setInteresPagoCompra(new BigDecimal(intereses));\n pagoCompra.setMoraPagoCompra(new BigDecimal(mora));\n pagoCompra.setAbonoPagoCompra(new BigDecimal(pago));\n BigDecimal total = pagoCompra.getAbonoPagoCompra().add(pagoCompra.getInteresPagoCompra()).add(pagoCompra.getMoraPagoCompra());\n pagoCompra.setTotalPagoCompra(new BigDecimal(new funciones().redondearMas(total.floatValue(), 2)));\n pagoCompra.setIdpagoCompra(ejbFacadePagoCompra.getNextIdPagoCompra());\n ejbFacadePagoCompra.create(pagoCompra); // Registrar Pago en la BD\n //Actualizar Factura\n facturaCredito.getPagoCompraCollection().add(pagoCompra); //Actualizar Contexto\n BigDecimal saldo = facturaCredito.getSaldoCreditoCompra().subtract(pagoCompra.getAbonoPagoCompra());\n facturaCredito.setSaldoCreditoCompra(new BigDecimal(new funciones().redondearMas(saldo.floatValue(), 2)));\n if(facturaCredito.getSaldoCreditoCompra().compareTo(BigDecimal.ZERO)==0){\n facturaCredito.setEstadoCreditoCompra(\"CANCELADO\");\n facturaCredito.setFechaCancelado(transac.getFechaTransac());\n }\n facturaCredito.setUltimopagoCreditoCompra(transac.getFechaTransac());\n ejbFacadeFacturaIngreso.edit(facturaCredito);\n new funciones().setMsj(1, \"PAGO REGISTRADO CORRECTAMENTE\");\n if(facturaCredito.getEstadoCreditoCompra().equals(\"CANCELADO\")){\n RequestContext context = RequestContext.getCurrentInstance(); \n context.execute(\"alert('FACTURA CANCELADA POR COMPLETO');\");\n }\n prepararPago();\n }catch(Exception e){\n new funciones().setMsj(3, \"ERROR AL REGISTRAR PAGO\");\n }\n }\n }", "public static void registrarAuditoria(Connexion connexion,Long idUsuario,PlantillaFactura plantillafactura,String sUsuarioPC,String sNamePC,String sIPPC)throws Exception {\n\t\t\r\n\t\ttry {\r\n\t\t\tif(PlantillaFacturaConstantesFunciones.ISCONAUDITORIA) {\r\n\t\t\t\tif(plantillafactura.getIsNew()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,PlantillaFacturaDataAccess.TABLENAME, plantillafactura.getId(), Constantes.SAUDITORIAINSERTAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(PlantillaFacturaConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////PlantillaFacturaLogic.registrarAuditoriaDetallesPlantillaFactura(connexion,plantillafactura,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if(plantillafactura.getIsDeleted()) {\r\n\t\t\t\t\t/*if(!plantillafactura.getIsExpired()) {\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.RegistrarNuevaAuditoria(Constantes.getLOidSistemaActual(),idUsuario,PlantillaFacturaDataAccess.TABLENAME, plantillafactura.getId(), Constantes.getSAuditoriaEliminarLogicamente(),\"\",sUsuarioPC,sNamePC,sIPPC,Timestamp.valueOf(Funciones.getStringMySqlCurrentDateTime()),\"\");\r\n\t\t\t\t\t\t////PlantillaFacturaLogic.registrarAuditoriaDetallesPlantillaFactura(connexion,plantillafactura,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t} else {*/\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,PlantillaFacturaDataAccess.TABLENAME, plantillafactura.getId(), Constantes.SAUDITORIAELIMINARFISICAMENTE,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t//}\r\n\t\t\t\t} else if(plantillafactura.getIsChanged()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,PlantillaFacturaDataAccess.TABLENAME, plantillafactura.getId(), Constantes.SAUDITORIAACTUALIZAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(PlantillaFacturaConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////PlantillaFacturaLogic.registrarAuditoriaDetallesPlantillaFactura(connexion,plantillafactura,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch(Exception e) {\r\n\t\t\tFunciones.manageException(logger,e);\r\n\t\t\tthrow e;\r\n\t\t}\t\t\r\n\t}", "public void guardarDireccionAlcabalaHstorico(RaDireccionAlcabalaHistorico raDireccionAlcabalaHistorico)throws Exception;", "public static LoCurso GetInstancia(){\n if (instancia==null)\n {\n instancia = new LoCurso();\n \n }\n\n return instancia;\n }", "private Malote buscaMaloteDestino(Localidade destinoMalote) {\n\t\tlogger.info(\"buscar Malote Destino:\"+destinoMalote.getDescricao());\r\n\t\t\t\t\t\t \r\n\t\tLocalidade destinoFinal = destinoMalote;\r\n\t\tTipoMalote tipoMalote = TipoMalote.SEPEX;\r\n\t\t\r\n\t\tif (destinoMalote.getTipoRemessa().equals(TipoRemessa.VARAS_INT) &&\r\n\t\t\t\tdestinoMalote.temCodUnidadeAdmCentral()) {\r\n\t\t\tlogger.info(\"<<< malote seadm interior >>\");\r\n\t\t\tdestinoFinal = destinoMalote.getUnidadeAdmCentral();\r\n\t\t\ttipoMalote = TipoMalote.SEADM_INT;\r\n\t\t} else {\r\n\t\t\tif (destinoMalote.getTipoRemessa().equals(TipoRemessa.INTERNO) && destinoMalote.isAgrupado()) {\r\n\t\t\t\tlogger.info(\"<<< malote agrupado >>\");\r\n\t\t\t\tdestinoFinal = destinoMalote.getMaloteAgrupado();\r\n\t\t\t} else {\t\t\r\n\t\t\t\tlogger.info(\"<<< malote interno nao agrupado>>>\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\tStringBuilder sb = new StringBuilder(\"from Malote m \");\r\n\t\tsb.append(\"where m.fechado = false and \");\r\n\t\tsb.append(\"m.tipoMalote = :pTipoMalote \");\r\n\t\tsb.append(\"and m.destino = :pDestino\");\r\n\t\tQuery q = em.createQuery(sb.toString());\r\n\t\tq.setParameter(\"pTipoMalote\", tipoMalote);\r\n\t\tq.setParameter(\"pDestino\", destinoFinal);\r\n\t\t\r\n\t\tMalote maloteEnviar = (Malote) q.getSingleResult();\r\n\t\t\r\n\t\tif (null == maloteEnviar) {\r\n\t\t\tlogger.info(\"<<<bmd - malote novo>>\");\r\n\t\t\tLocalidadeManager locDAO = new LocalidadeManager();\r\n\t\t\tmaloteEnviar = new Malote();\r\n\t\t\tmaloteEnviar.setDestino(destinoFinal);\r\n\t\t\t// rem : sepex ou sistema\r\n\t\t\tmaloteEnviar.setRemetente(locDAO.remetenteSepex());\r\n\t\t\tmaloteEnviar.setTipoMalote(tipoMalote);\r\n\t\t\tmaloteEnviar.setDtEnvio(Calendar.getInstance().getTime());\r\n\t\t\tsalva(maloteEnviar);\r\n\t\t\t//closeSession();\r\n\t\t}\r\n\t\treturn maloteEnviar;\r\n\t}", "SpaceInvaderTest_test_UnNouveauVaisseauPositionneDansEspaceJeuMaisAvecDimensionTropGrande_DoitLeverUneExceptionDeDebordement createSpaceInvaderTest_test_UnNouveauVaisseauPositionneDansEspaceJeuMaisAvecDimensionTropGrande_DoitLeverUneExceptionDeDebordement();", "public Utilisateur() throws RemoteException{}", "public co\n\t\t.com\n\t\t.telefonica\n\t\t.atiempo\n\t\t.soltec\n\t\t.datos_publicacion\n\t\t.ejb\n\t\t.sb\n\t\t.DatosPublicacionSTLocal create()\n\t\tthrows javax.ejb.CreateException;", "public static IRepositorioOrdemServico getInstancia(){\n\n\t\tif(instancia == null){\n\t\t\tinstancia = new RepositorioOrdemServicoHBM();\n\t\t}\n\n\t\treturn instancia;\n\t}", "@Override\n\tpublic void pegaInstanciaDialogo(AposentadoriaCompulsoria obj) {\n\t\t\n\t}", "private static void registrarAuditoriaDetallesPlantillaFactura(Connexion connexion,PlantillaFactura plantillafactura)throws Exception {\n\t\t\r\n\t\tString strValorActual=null;\r\n\t\tString strValorNuevo=null;\r\n\t\t\r\n\t\t\t\r\n\t\t\tif(plantillafactura.getIsNew()||!plantillafactura.getid_empresa().equals(plantillafactura.getPlantillaFacturaOriginal().getid_empresa()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(plantillafactura.getPlantillaFacturaOriginal().getid_empresa()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=plantillafactura.getPlantillaFacturaOriginal().getid_empresa().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(plantillafactura.getid_empresa()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=plantillafactura.getid_empresa().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PlantillaFacturaConstantesFunciones.IDEMPRESA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(plantillafactura.getIsNew()||!plantillafactura.getcodigo().equals(plantillafactura.getPlantillaFacturaOriginal().getcodigo()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(plantillafactura.getPlantillaFacturaOriginal().getcodigo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=plantillafactura.getPlantillaFacturaOriginal().getcodigo();\r\n\t\t\t\t}\r\n\t\t\t\tif(plantillafactura.getcodigo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=plantillafactura.getcodigo() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PlantillaFacturaConstantesFunciones.CODIGO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(plantillafactura.getIsNew()||!plantillafactura.getnombre().equals(plantillafactura.getPlantillaFacturaOriginal().getnombre()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(plantillafactura.getPlantillaFacturaOriginal().getnombre()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=plantillafactura.getPlantillaFacturaOriginal().getnombre();\r\n\t\t\t\t}\r\n\t\t\t\tif(plantillafactura.getnombre()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=plantillafactura.getnombre() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PlantillaFacturaConstantesFunciones.NOMBRE,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(plantillafactura.getIsNew()||!plantillafactura.getdescripcion().equals(plantillafactura.getPlantillaFacturaOriginal().getdescripcion()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(plantillafactura.getPlantillaFacturaOriginal().getdescripcion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=plantillafactura.getPlantillaFacturaOriginal().getdescripcion();\r\n\t\t\t\t}\r\n\t\t\t\tif(plantillafactura.getdescripcion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=plantillafactura.getdescripcion() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PlantillaFacturaConstantesFunciones.DESCRIPCION,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(plantillafactura.getIsNew()||!plantillafactura.getes_proveedor().equals(plantillafactura.getPlantillaFacturaOriginal().getes_proveedor()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(plantillafactura.getPlantillaFacturaOriginal().getes_proveedor()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=plantillafactura.getPlantillaFacturaOriginal().getes_proveedor().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(plantillafactura.getes_proveedor()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=plantillafactura.getes_proveedor().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PlantillaFacturaConstantesFunciones.ESPROVEEDOR,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(plantillafactura.getIsNew()||!plantillafactura.getid_cuenta_contable_aplicada().equals(plantillafactura.getPlantillaFacturaOriginal().getid_cuenta_contable_aplicada()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(plantillafactura.getPlantillaFacturaOriginal().getid_cuenta_contable_aplicada()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=plantillafactura.getPlantillaFacturaOriginal().getid_cuenta_contable_aplicada().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(plantillafactura.getid_cuenta_contable_aplicada()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=plantillafactura.getid_cuenta_contable_aplicada().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PlantillaFacturaConstantesFunciones.IDCUENTACONTABLEAPLICADA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(plantillafactura.getIsNew()||!plantillafactura.getid_cuenta_contable_credito_bien().equals(plantillafactura.getPlantillaFacturaOriginal().getid_cuenta_contable_credito_bien()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(plantillafactura.getPlantillaFacturaOriginal().getid_cuenta_contable_credito_bien()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=plantillafactura.getPlantillaFacturaOriginal().getid_cuenta_contable_credito_bien().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(plantillafactura.getid_cuenta_contable_credito_bien()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=plantillafactura.getid_cuenta_contable_credito_bien().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PlantillaFacturaConstantesFunciones.IDCUENTACONTABLECREDITOBIEN,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(plantillafactura.getIsNew()||!plantillafactura.getid_cuenta_contable_credito_servicio().equals(plantillafactura.getPlantillaFacturaOriginal().getid_cuenta_contable_credito_servicio()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(plantillafactura.getPlantillaFacturaOriginal().getid_cuenta_contable_credito_servicio()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=plantillafactura.getPlantillaFacturaOriginal().getid_cuenta_contable_credito_servicio().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(plantillafactura.getid_cuenta_contable_credito_servicio()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=plantillafactura.getid_cuenta_contable_credito_servicio().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PlantillaFacturaConstantesFunciones.IDCUENTACONTABLECREDITOSERVICIO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(plantillafactura.getIsNew()||!plantillafactura.getid_tipo_retencion_fuente_bien().equals(plantillafactura.getPlantillaFacturaOriginal().getid_tipo_retencion_fuente_bien()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(plantillafactura.getPlantillaFacturaOriginal().getid_tipo_retencion_fuente_bien()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=plantillafactura.getPlantillaFacturaOriginal().getid_tipo_retencion_fuente_bien().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(plantillafactura.getid_tipo_retencion_fuente_bien()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=plantillafactura.getid_tipo_retencion_fuente_bien().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PlantillaFacturaConstantesFunciones.IDTIPORETENCIONFUENTEBIEN,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(plantillafactura.getIsNew()||!plantillafactura.getid_tipo_retencion_fuente_servicio().equals(plantillafactura.getPlantillaFacturaOriginal().getid_tipo_retencion_fuente_servicio()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(plantillafactura.getPlantillaFacturaOriginal().getid_tipo_retencion_fuente_servicio()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=plantillafactura.getPlantillaFacturaOriginal().getid_tipo_retencion_fuente_servicio().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(plantillafactura.getid_tipo_retencion_fuente_servicio()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=plantillafactura.getid_tipo_retencion_fuente_servicio().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PlantillaFacturaConstantesFunciones.IDTIPORETENCIONFUENTESERVICIO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(plantillafactura.getIsNew()||!plantillafactura.getid_tipo_retencion_iva_bien().equals(plantillafactura.getPlantillaFacturaOriginal().getid_tipo_retencion_iva_bien()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(plantillafactura.getPlantillaFacturaOriginal().getid_tipo_retencion_iva_bien()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=plantillafactura.getPlantillaFacturaOriginal().getid_tipo_retencion_iva_bien().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(plantillafactura.getid_tipo_retencion_iva_bien()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=plantillafactura.getid_tipo_retencion_iva_bien().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PlantillaFacturaConstantesFunciones.IDTIPORETENCIONIVABIEN,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(plantillafactura.getIsNew()||!plantillafactura.getid_tipo_retencion_iva_servicio().equals(plantillafactura.getPlantillaFacturaOriginal().getid_tipo_retencion_iva_servicio()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(plantillafactura.getPlantillaFacturaOriginal().getid_tipo_retencion_iva_servicio()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=plantillafactura.getPlantillaFacturaOriginal().getid_tipo_retencion_iva_servicio().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(plantillafactura.getid_tipo_retencion_iva_servicio()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=plantillafactura.getid_tipo_retencion_iva_servicio().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PlantillaFacturaConstantesFunciones.IDTIPORETENCIONIVASERVICIO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(plantillafactura.getIsNew()||!plantillafactura.getid_cuenta_contable_gasto().equals(plantillafactura.getPlantillaFacturaOriginal().getid_cuenta_contable_gasto()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(plantillafactura.getPlantillaFacturaOriginal().getid_cuenta_contable_gasto()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=plantillafactura.getPlantillaFacturaOriginal().getid_cuenta_contable_gasto().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(plantillafactura.getid_cuenta_contable_gasto()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=plantillafactura.getid_cuenta_contable_gasto().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PlantillaFacturaConstantesFunciones.IDCUENTACONTABLEGASTO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t}", "public Proyectil(){\n disparar=false;\n ubicacion= new Rectangle(0,0,ancho,alto);\n try {\n look = ImageIO.read(new File(\"src/Disparo/disparo.png\"));\n } catch (IOException ex) {\n System.out.println(\"error la imagen del proyectil no se encuentra en la ruta por defecto\");\n }\n }", "public void reprova(Orcamento orcamento) {\n\t\tthrow new RuntimeException(\"Orçamento já está em estado finalizado e não pode ser reprovado\");\n\t}", "private void addInstituicao() {\n\n if (txtNome.getText().equals(\"\")) {\n JOptionPane.showMessageDialog(null, \"Campo Nome Invalido\");\n txtNome.grabFocus();\n return;\n } else if (txtNatureza.getText().equals(\"\")) {\n JOptionPane.showMessageDialog(null, \"Campo Natureza Invalido\");\n txtNatureza.grabFocus();\n return;\n }\n if ((instituicao == null) || (instituicaoController == null)) {\n instituicao = new Instituicao();\n instituicaoController = new InstituicaoController();\n }\n instituicao.setNome(txtNome.getText());\n instituicao.setNatureza_administrativa(txtNatureza.getText());\n if (instituicaoController.insereInstituicao(instituicao)) {\n limpaCampos();\n JOptionPane.showMessageDialog(null, \"Instituicao Cadastrada com Sucesso\");\n }\n }", "public AddebitoFissoLogica(Modulo modulo) {\n /* rimanda al costruttore della superclasse */\n super(modulo);\n\n try { // prova ad eseguire il codice\n /* regolazioni iniziali di riferimenti e variabili */\n this.inizia();\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n }", "private void registraLog(int aTipo, String aMensagem)\n\t{\n\t\tArquivoConfiguracaoGPP arqConf = ArquivoConfiguracaoGPP.getInstance();\n\t\tif (aTipo == Definicoes.FATAL)\n\t\t\tlogger.fatal(aMensagem);\n\t\telse if (aTipo == Definicoes.ERRO)\n\t\t\t\tlogger.error(aMensagem);\n\t\telse if (aTipo == Definicoes.WARN)\n\t\t\t\tlogger.warn(aMensagem);\n\t\telse if (aTipo == Definicoes.INFO)\n\t\t\t\tlogger.info(aMensagem);\n\t\telse if (aTipo == Definicoes.DEBUG)\n\t\t{\n\t\t\t\tif (arqConf.getSaidaDebug())\n\t\t\t\t\tlogger.debug(aMensagem);\n\t\t}\n\t\telse logger.warn(\"SEVERIDADE NAO DEFINIDA - \" + aMensagem);\n\t}", "public void aprova(Orcamento orcamento) {\n\t\tthrow new RuntimeException(\"Orçamento já está em estado finalizado e não pode voltar para aprovado\");\n\t}", "public static void registrarAuditoria(Connexion connexion,Long idUsuario,GrupoBodega grupobodega,String sUsuarioPC,String sNamePC,String sIPPC)throws Exception {\n\t\t\r\n\t\ttry {\r\n\t\t\tif(GrupoBodegaConstantesFunciones.ISCONAUDITORIA) {\r\n\t\t\t\tif(grupobodega.getIsNew()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,GrupoBodegaDataAccess.TABLENAME, grupobodega.getId(), Constantes.SAUDITORIAINSERTAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(GrupoBodegaConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////GrupoBodegaLogic.registrarAuditoriaDetallesGrupoBodega(connexion,grupobodega,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if(grupobodega.getIsDeleted()) {\r\n\t\t\t\t\t/*if(!grupobodega.getIsExpired()) {\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.RegistrarNuevaAuditoria(Constantes.getLOidSistemaActual(),idUsuario,GrupoBodegaDataAccess.TABLENAME, grupobodega.getId(), Constantes.getSAuditoriaEliminarLogicamente(),\"\",sUsuarioPC,sNamePC,sIPPC,Timestamp.valueOf(Funciones.getStringMySqlCurrentDateTime()),\"\");\r\n\t\t\t\t\t\t////GrupoBodegaLogic.registrarAuditoriaDetallesGrupoBodega(connexion,grupobodega,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t} else {*/\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,GrupoBodegaDataAccess.TABLENAME, grupobodega.getId(), Constantes.SAUDITORIAELIMINARFISICAMENTE,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t//}\r\n\t\t\t\t} else if(grupobodega.getIsChanged()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,GrupoBodegaDataAccess.TABLENAME, grupobodega.getId(), Constantes.SAUDITORIAACTUALIZAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(GrupoBodegaConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////GrupoBodegaLogic.registrarAuditoriaDetallesGrupoBodega(connexion,grupobodega,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch(Exception e) {\r\n\t\t\tFunciones.manageException(logger,e);\r\n\t\t\tthrow e;\r\n\t\t}\t\t\r\n\t}", "private void inicializarConexoesDaSegundaCamada() {\n conexoesSegundaCamada = new double[numeroNeuroniosPrimeiraCamada + 1];\n for (int i = 0; i < conexoesSegundaCamada.length; i++) {\n conexoesSegundaCamada[i] = Math.random();\n //conexoesSegundaCamada[i] = 1.0;\n }\n }", "protected void nuevo(){\n wp = new frmEspacioTrabajo();\n System.runFinalization();\n inicializar();\n }", "private void creaModuloMem() {\n /* variabili e costanti locali di lavoro */\n ArrayList<Campo> campi = new ArrayList<Campo>();\n ModuloRisultati modulo;\n Campo campo;\n\n try { // prova ad eseguire il codice\n\n campo = CampoFactory.intero(Campi.Ris.codicePiatto.getNome());\n campi.add(campo);\n\n campo = CampoFactory.testo(Campi.Ris.nomePiatto.getNome());\n campo.setVisibileVistaDefault();\n campo.setTitoloColonna(\"piatto\");\n campo.setToolTipLista(\"nome del piatto\");\n campo.decora()\n .etichetta(\"nome del piatto\"); // le etichette servono per il dialogo ricerca\n campo.setLarghezza(250);\n campi.add(campo);\n\n campo = CampoFactory.testo(Campi.Ris.categoria.getNome());\n campo.setVisibileVistaDefault();\n campo.setTitoloColonna(\"categoria\");\n campo.setToolTipLista(\"categoria del piatto\");\n campo.setLarghezza(80);\n campi.add(campo);\n\n campo = CampoFactory.intero(Campi.Ris.quanteVolte.getNome());\n campo.setVisibileVistaDefault();\n campo.setLarghezza(80);\n campo.setTitoloColonna(\"quante volte\");\n campo.setToolTipLista(\n \"quante volte questo piatto è stato offerto nel periodo analizzato\");\n campo.decora().etichetta(\"quante volte\");\n campi.add(campo);\n\n campo = CampoFactory.intero(Campi.Ris.quantiCoperti.getNome());\n campo.setVisibileVistaDefault();\n campo.setTitoloColonna(\"coperti\");\n campo.setToolTipLista(\"numero di coperti che avrebbero potuto ordinare\");\n campo.decora().etichetta(\"n. coperti\");\n campo.setLarghezza(80);\n campi.add(campo);\n\n campo = CampoFactory.intero(Campi.Ris.quanteComande.getNome());\n campo.setVisibileVistaDefault();\n campo.setTitoloColonna(\"comande\");\n campo.setToolTipLista(\"numero di comande effettive\");\n campo.decora().etichetta(\"n. comande\");\n campo.setLarghezza(80);\n campo.setTotalizzabile(true);\n campi.add(campo);\n\n campo = CampoFactory.percentuale(Campi.Ris.gradimento.getNome());\n campo.setVisibileVistaDefault();\n campo.setTitoloColonna(\"gradimento\");\n campo.setToolTipLista(\n \"percentuale di gradimento (è il 100% se tutti i coperti potenziali lo hanno ordinato)\");\n campo.decora().etichetta(\"% gradimento\");\n campo.setLarghezza(80);\n campi.add(campo);\n\n modulo = new ModuloRisultati(campi);\n setModuloRisultati(modulo);\n\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n } // fine del blocco try-catch\n\n }", "public static void registrarAuditoria(Connexion connexion,Long idUsuario,PresuTipoProyecto presutipoproyecto,String sUsuarioPC,String sNamePC,String sIPPC)throws Exception {\n\t\t\r\n\t\ttry {\r\n\t\t\tif(PresuTipoProyectoConstantesFunciones.ISCONAUDITORIA) {\r\n\t\t\t\tif(presutipoproyecto.getIsNew()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,PresuTipoProyectoDataAccess.TABLENAME, presutipoproyecto.getId(), Constantes.SAUDITORIAINSERTAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(PresuTipoProyectoConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////PresuTipoProyectoLogic.registrarAuditoriaDetallesPresuTipoProyecto(connexion,presutipoproyecto,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if(presutipoproyecto.getIsDeleted()) {\r\n\t\t\t\t\t/*if(!presutipoproyecto.getIsExpired()) {\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.RegistrarNuevaAuditoria(Constantes.getLOidSistemaActual(),idUsuario,PresuTipoProyectoDataAccess.TABLENAME, presutipoproyecto.getId(), Constantes.getSAuditoriaEliminarLogicamente(),\"\",sUsuarioPC,sNamePC,sIPPC,Timestamp.valueOf(Funciones.getStringMySqlCurrentDateTime()),\"\");\r\n\t\t\t\t\t\t////PresuTipoProyectoLogic.registrarAuditoriaDetallesPresuTipoProyecto(connexion,presutipoproyecto,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t} else {*/\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,PresuTipoProyectoDataAccess.TABLENAME, presutipoproyecto.getId(), Constantes.SAUDITORIAELIMINARFISICAMENTE,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t//}\r\n\t\t\t\t} else if(presutipoproyecto.getIsChanged()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,PresuTipoProyectoDataAccess.TABLENAME, presutipoproyecto.getId(), Constantes.SAUDITORIAACTUALIZAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(PresuTipoProyectoConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////PresuTipoProyectoLogic.registrarAuditoriaDetallesPresuTipoProyecto(connexion,presutipoproyecto,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch(Exception e) {\r\n\t\t\tFunciones.manageException(logger,e);\r\n\t\t\tthrow e;\r\n\t\t}\t\t\r\n\t}", "public static void registrarAuditoria(Connexion connexion,Long idUsuario,TarjetaCredito tarjetacredito,String sUsuarioPC,String sNamePC,String sIPPC)throws Exception {\n\t\t\r\n\t\ttry {\r\n\t\t\tif(TarjetaCreditoConstantesFunciones.ISCONAUDITORIA) {\r\n\t\t\t\tif(tarjetacredito.getIsNew()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,TarjetaCreditoDataAccess.TABLENAME, tarjetacredito.getId(), Constantes.SAUDITORIAINSERTAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(TarjetaCreditoConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////TarjetaCreditoLogic.registrarAuditoriaDetallesTarjetaCredito(connexion,tarjetacredito,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if(tarjetacredito.getIsDeleted()) {\r\n\t\t\t\t\t/*if(!tarjetacredito.getIsExpired()) {\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.RegistrarNuevaAuditoria(Constantes.getLOidSistemaActual(),idUsuario,TarjetaCreditoDataAccess.TABLENAME, tarjetacredito.getId(), Constantes.getSAuditoriaEliminarLogicamente(),\"\",sUsuarioPC,sNamePC,sIPPC,Timestamp.valueOf(Funciones.getStringMySqlCurrentDateTime()),\"\");\r\n\t\t\t\t\t\t////TarjetaCreditoLogic.registrarAuditoriaDetallesTarjetaCredito(connexion,tarjetacredito,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t} else {*/\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,TarjetaCreditoDataAccess.TABLENAME, tarjetacredito.getId(), Constantes.SAUDITORIAELIMINARFISICAMENTE,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t//}\r\n\t\t\t\t} else if(tarjetacredito.getIsChanged()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,TarjetaCreditoDataAccess.TABLENAME, tarjetacredito.getId(), Constantes.SAUDITORIAACTUALIZAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(TarjetaCreditoConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////TarjetaCreditoLogic.registrarAuditoriaDetallesTarjetaCredito(connexion,tarjetacredito,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch(Exception e) {\r\n\t\t\tFunciones.manageException(logger,e);\r\n\t\t\tthrow e;\r\n\t\t}\t\t\r\n\t}", "private void inizia() throws Exception {\n }", "private void inizia() throws Exception {\n }", "private void inizia() throws Exception {\n }", "private void inizia() throws Exception {\n }", "private void inizia() throws Exception {\n }", "protected GerentePoolLog(Class ownerClass)\n {\n\t\tArquivoConfiguracaoGPP arqConf = ArquivoConfiguracaoGPP.getInstance();\n\t\t//Define o nome e a porta do servidor q serao utilizados no LOG\n\t\thostName = arqConf.getEnderecoOrbGPP() + \":\" + arqConf.getPortaOrbGPP();\n\n\t\t/* Configura o LOG4J com as propriedades definidas no arquivo\n\t\t * de configuracao do GPP\n\t\t */\n\t\t\n\t\tPropertyConfigurator.configure(arqConf.getConfiguracaoesLog4j());\n\t\t//Inicia a instancia do Logger do LOG4J\n\t\tlogger = Logger.getLogger(ownerClass);\n\t\tlog(0,Definicoes.DEBUG,\"GerentePoolLog\",\"Construtor\",\"Iniciando escrita de Log do sistema GPP...\");\n }", "public static TMemoria getInstance(){\r\n\t\tif (instancia==null)\r\n\t\t\tinstancia=new TMemoriaImp();\t\t\t\r\n\t\treturn instancia;\t\t\t\t\t\t\t\t\t\r\n\t}", "public static void registrarAuditoria(Connexion connexion,Long idUsuario,DatoGeneralEmpleado datogeneralempleado,String sUsuarioPC,String sNamePC,String sIPPC)throws Exception {\n\t\t\r\n\t\ttry {\r\n\t\t\tif(DatoGeneralEmpleadoConstantesFunciones.ISCONAUDITORIA) {\r\n\t\t\t\tif(datogeneralempleado.getIsNew()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,DatoGeneralEmpleadoDataAccess.TABLENAME, datogeneralempleado.getId(), Constantes.SAUDITORIAINSERTAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(DatoGeneralEmpleadoConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////DatoGeneralEmpleadoLogic.registrarAuditoriaDetallesDatoGeneralEmpleado(connexion,datogeneralempleado,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if(datogeneralempleado.getIsDeleted()) {\r\n\t\t\t\t\t/*if(!datogeneralempleado.getIsExpired()) {\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.RegistrarNuevaAuditoria(Constantes.getLOidSistemaActual(),idUsuario,DatoGeneralEmpleadoDataAccess.TABLENAME, datogeneralempleado.getId(), Constantes.getSAuditoriaEliminarLogicamente(),\"\",sUsuarioPC,sNamePC,sIPPC,Timestamp.valueOf(Funciones.getStringMySqlCurrentDateTime()),\"\");\r\n\t\t\t\t\t\t////DatoGeneralEmpleadoLogic.registrarAuditoriaDetallesDatoGeneralEmpleado(connexion,datogeneralempleado,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t} else {*/\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,DatoGeneralEmpleadoDataAccess.TABLENAME, datogeneralempleado.getId(), Constantes.SAUDITORIAELIMINARFISICAMENTE,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t//}\r\n\t\t\t\t} else if(datogeneralempleado.getIsChanged()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,DatoGeneralEmpleadoDataAccess.TABLENAME, datogeneralempleado.getId(), Constantes.SAUDITORIAACTUALIZAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(DatoGeneralEmpleadoConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////DatoGeneralEmpleadoLogic.registrarAuditoriaDetallesDatoGeneralEmpleado(connexion,datogeneralempleado,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch(Exception e) {\r\n\t\t\tFunciones.manageException(logger,e);\r\n\t\t\tthrow e;\r\n\t\t}\t\t\r\n\t}", "public void guardarTransferenteAlcabala(RaTransferenteAlcabala raTransferenteAlcabala)throws Exception;", "private void inizia() throws Exception {\n }", "public void annuler(){\r\n try {\r\n viewEtudiantInscripEcheance = new ViewEtudiantInscriptionEcheance();\r\n echeance_etudiant = new EcoEcheanceEtudiant(); \r\n \r\n } catch (Exception e) {\r\n System.err.println(\"Erreur capturée : \"+e);\r\n }\r\n }", "public DuplicateSensorException(){\n }", "public cola_de_un_banco(){// se crea nuestro metodo costructor \r\n primero=null;//se crea el tipo de indicaciones con valor a null\r\n ultimo=null;\r\n}", "@Override\n public TipoBase check(TipoBase tipo) throws Exception {\n Clase c = analizadorsintactico.AnalizadorSintactico.getTs().getClase(tipo.getNombre());\n String nombreVar = id.getLexema();\n VarInstancia v;\n\n if (tipo.getNombre().equals(\"int\") || tipo.getNombre().equals(\"boolean\") || tipo.getNombre().equals(\"char\") || tipo.getNombre().equals(\"String\")) {\n throw new Exception(\"La variable \" + id.getLexema() + \" en la linea \" + id.getLineNumber() + \" no puede llamar metodos ya que es de tipo primitivo\");\n }\n if (c == null) {\n throw new Exception(\"Se trata de acceder a un metodo void en la linea \" + id.getLineNumber());\n }\n\n if (cadena == null) {\n\n if (c.getVariables().containsKey(nombreVar)) {\n v = c.getVariables().get(nombreVar);\n if (v.getVisibilidad().equals(\"private\")) {\n throw new Exception(\"No se puede acceder a la variable \" + v.getNombre() + \" de la linea \" + v.getLinea() + \" debido a que su visibilidad es privada\");\n }\n if (this.ladoIzq) {\n GenCode.gen().write(\"SWAP\");\n GenCode.gen().write(\"STOREREF \" + v.getOffset() + \" # Guardo el valor en la variable \" + v.getNombre());\n\n } else {\n GenCode.gen().write(\"LOADREF \" + v.getOffset() + \" # Cargo variable de instancia \" + v.getNombre() + \" de la clase \" + c.getNombre());\n\n }\n\n } else {\n throw new Exception(\"No se encontro la variable \" + nombreVar + \" de la linea \" + id.getLineNumber() + \" en la clase \" + c.getNombre());\n }\n\n return v.getTipoVar();\n } else { //con encadenado\n if (c.getVariables().containsKey(nombreVar)) {\n v = c.getVariables().get(nombreVar);\n if (v.getVisibilidad().equals(\"private\")) {\n throw new Exception(\"No se puede acceder a la variable \" + v.getNombre() + \" de la linea \" + v.getLinea() + \" debido a que su visibilidad es privada\");\n }\n\n GenCode.gen().write(\"LOADREF \" + v.getOffset() + \" # Cargo variable de instancia \" + v.getNombre() + \" de la clase \" + c.getNombre());\n\n Tipo aux = v.getTipoVar();\n\n return cadena.check(aux);\n } else {\n throw new Exception(\"No se encontro la variable \" + nombreVar + \" de la linea \" + id.getLineNumber() + \" en la clase \" + c.getNombre());\n }\n }\n }", "@Override\r\n /* OSINE791 - RSIS1 - Inicio */\r\n //public ExpedienteDTO asignarOrdenServicio(ExpedienteDTO expedienteDTO,String codigoTipoSupervisor,UsuarioDTO usuarioDTO) throws ExpedienteException{\r\n public ExpedienteGSMDTO asignarOrdenServicio(ExpedienteGSMDTO expedienteDTO,String codigoTipoSupervisor,UsuarioDTO usuarioDTO,String sigla) throws ExpedienteException{\r\n LOG.error(\"asignarOrdenServicio\");\r\n ExpedienteGSMDTO retorno=expedienteDTO;\r\n try{\r\n //cambiarEstado expediente \r\n \tExpedienteGSMDTO expedCambioEstado=cambiarEstadoProceso(expedienteDTO.getIdExpediente(),expedienteDTO.getPersonal().getIdPersonal(),expedienteDTO.getPersonal().getIdPersonal(),expedienteDTO.getPersonal().getIdPersonal(),expedienteDTO.getEstadoProceso().getIdEstadoProceso(),null,usuarioDTO);\r\n LOG.info(\"expedCambioEstado:\"+expedCambioEstado);\r\n //update expediente\r\n PghExpediente registroDAO = crud.find(expedienteDTO.getIdExpediente(), PghExpediente.class);\r\n registroDAO.setDatosAuditoria(usuarioDTO);\r\n if(expedienteDTO.getTramite()!=null){\r\n registroDAO.setIdTramite(new PghTramite(expedienteDTO.getTramite().getIdTramite()));\r\n }else if(expedienteDTO.getProceso()!=null){\r\n registroDAO.setIdProceso(new PghProceso(expedienteDTO.getProceso().getIdProceso()));\r\n }\r\n if(expedienteDTO.getObligacionTipo()!=null){\r\n registroDAO.setIdObligacionTipo(new PghObligacionTipo(expedienteDTO.getObligacionTipo().getIdObligacionTipo()));\r\n }\r\n if(expedienteDTO.getObligacionSubTipo()!=null && expedienteDTO.getObligacionSubTipo().getIdObligacionSubTipo()!=null){\r\n registroDAO.setIdObligacionSubTipo(new PghObligacionSubTipo(expedienteDTO.getObligacionSubTipo().getIdObligacionSubTipo()));\r\n }\r\n registroDAO.setIdUnidadSupervisada(new MdiUnidadSupervisada(expedienteDTO.getUnidadSupervisada().getIdUnidadSupervisada()));\r\n crud.update(registroDAO);\r\n //inserta ordenServicio\r\n Long idLocador=codigoTipoSupervisor.equals(Constantes.CODIGO_TIPO_SUPERVISOR_PERSONA_NATURAL)?expedienteDTO.getOrdenServicio().getLocador().getIdLocador():null;\r\n Long idSupervisoraEmpresa=codigoTipoSupervisor.equals(Constantes.CODIGO_TIPO_SUPERVISOR_PERSONA_JURIDICA)?expedienteDTO.getOrdenServicio().getSupervisoraEmpresa().getIdSupervisoraEmpresa():null;\r\n OrdenServicioDTO OrdenServicioDTO=ordenServicioDAO.registrar(expedienteDTO.getIdExpediente(), \r\n expedienteDTO.getOrdenServicio().getIdTipoAsignacion(), expedienteDTO.getOrdenServicio().getEstadoProceso().getIdEstadoProceso(), \r\n /* OSINE791 - RSIS1 - Inicio */\r\n //codigoTipoSupervisor, idLocador, idSupervisoraEmpresa, usuarioDTO);\r\n codigoTipoSupervisor, idLocador, idSupervisoraEmpresa, usuarioDTO,sigla);\r\n /* OSINE791 - RSIS1 - Fin */\r\n LOG.info(\"OrdenServicioDTO:\"+OrdenServicioDTO.getNumeroOrdenServicio());\r\n //busca idPersonalDest\r\n PersonalDTO personalDest=null;\r\n List<PersonalDTO> listPersonalDest=null;\r\n if(codigoTipoSupervisor.equals(Constantes.CODIGO_TIPO_SUPERVISOR_PERSONA_NATURAL)){\r\n listPersonalDest=personalDAO.find(new PersonalFilter(expedienteDTO.getOrdenServicio().getLocador().getIdLocador(),null));\r\n }else if(codigoTipoSupervisor.equals(Constantes.CODIGO_TIPO_SUPERVISOR_PERSONA_JURIDICA)){\r\n listPersonalDest=personalDAO.find(new PersonalFilter(null,expedienteDTO.getOrdenServicio().getSupervisoraEmpresa().getIdSupervisoraEmpresa()));\r\n }\r\n if(listPersonalDest==null || listPersonalDest.isEmpty() || listPersonalDest.get(0).getIdPersonal()==null){\r\n throw new ExpedienteException(\"La Empresa Supervisora no tiene un Personal asignado\",null);\r\n }else{\r\n personalDest=listPersonalDest.get(0);\r\n }\r\n //inserta historico Orden Servicio\r\n EstadoProcesoDTO estadoProcesoDto=estadoProcesoDAO.find(new EstadoProcesoFilter(Constantes.IDENTIFICADOR_ESTADO_PROCESO_OS_REGISTRO)).get(0);\r\n MaestroColumnaDTO tipoHistorico=maestroColumnaDAO.findMaestroColumna(Constantes.DOMINIO_TIPO_COMPONENTE, Constantes.APLICACION_INPS, Constantes.CODIGO_TIPO_COMPONENTE_ORDEN_SERVICIO).get(0);\r\n /* OSINE_SFS-480 - RSIS 40 - Inicio */\r\n HistoricoEstadoDTO historicoEstado=historicoEstadoDAO.registrar(null, OrdenServicioDTO.getIdOrdenServicio(), estadoProcesoDto.getIdEstadoProceso(), expedienteDTO.getPersonal().getIdPersonal(), personalDest.getIdPersonal(), tipoHistorico.getIdMaestroColumna(),null,null, null, usuarioDTO); \r\n LOG.info(\"historicoEstado:\"+historicoEstado);\r\n /* OSINE_SFS-480 - RSIS 40 - Fin */\r\n retorno=ExpedienteGSMBuilder.toExpedienteDto(registroDAO);\r\n retorno.setOrdenServicio(new OrdenServicioDTO(OrdenServicioDTO.getIdOrdenServicio(),OrdenServicioDTO.getNumeroOrdenServicio()));\r\n }catch(Exception e){\r\n LOG.error(\"error en asignarOrdenServicio\",e);\r\n ExpedienteException ex = new ExpedienteException(e.getMessage(), e);\r\n throw ex;\r\n }\r\n return retorno;\r\n }", "private void inizia() throws Exception {\n this.setAllineamento(Layout.ALLINEA_CENTRO);\n this.creaBordo(\"Coperti serviti\");\n\n campoPranzo=CampoFactory.intero(\"a pranzo\");\n campoPranzo.setLarghezza(60);\n campoPranzo.setModificabile(false);\n campoCena=CampoFactory.intero(\"a cena\");\n campoCena.setLarghezza(60);\n campoCena.setModificabile(false);\n campoTotale=CampoFactory.intero(\"Totale\");\n campoTotale.setLarghezza(60); \n campoTotale.setModificabile(false);\n\n this.add(campoPranzo);\n this.add(campoCena);\n this.add(campoTotale);\n }", "public OriDestEOImpl() {\n }", "public /* bridge */ /* synthetic */ java.lang.Object createFromParcel(android.os.Parcel r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e9 in method: android.location.GpsClock.1.createFromParcel(android.os.Parcel):java.lang.Object, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.location.GpsClock.1.createFromParcel(android.os.Parcel):java.lang.Object\");\n }", "public RMPLogica(Modulo modulo) {\n /* rimanda al costruttore della superclasse */\n super(modulo);\n\n try { // prova ad eseguire il codice\n /* regolazioni iniziali di riferimenti e variabili */\n this.inizia();\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n }", "private void guardar() {\n\t\t//JFileChooser fglobal = principal.getFglobal();\n\t\tprincipal.getFglobal().setDialogTitle(ic.buscar(38)); // Tag 38\n\n\t\t\tprincipal.getFglobal().setDialogType(JFileChooser.SAVE_DIALOG);\n\n\t\tAccesorio pep = new Accesorio(principal.getFglobal(),t, principal.getIC());\n\t\tprincipal.getFglobal().setAccessory(pep);\n\t\tpep.setProfundidad(true);\n\t\t\n principal.getFglobal().resetChoosableFileFilters();\n \n ExampleFileFilter filtroT = new ExampleFileFilter (\n new String [] {\"tiff\",\n \"tif\",\n },\n ic.buscar(3)); // Tag 3\n \n\n \n\t\t\t\n ExampleFileFilter filtroJ = new ExampleFileFilter (\n new String [] {\"jpeg\",\n \"jpg\"\n },\n ic.buscar(4)); // Tag 4\n principal.getFglobal().addChoosableFileFilter(filtroT);\n principal.getFglobal().addChoosableFileFilter(filtroJ);\n\t\t\n\t\t\n\t\t\n\t\tint retval = principal.getFglobal().showDialog(t, null);\n\t\tif (retval == JFileChooser.APPROVE_OPTION) \n\t\t{\t\t\n\t\t\tFile guardar = principal.getFglobal().getSelectedFile();\n \n\t\t\tif (\tprincipal.getFglobal().getFileFilter().getDescription().equals(filtroJ.getDescription()) )\n\t\t\t{// Guardar como JPEG\n \n\t\t\t\tJAI.create(\"filestore\",imagen_original,guardar.getPath(),\"JPEG\", new JPEGEncodeParam());\n\t\t\t}\n\t\t\telse if (principal.getFglobal().getFileFilter().getDescription().equals(filtroT.getDescription()))\n\t\t\t{// Guardar como TIFF\n\t\t\t\tint profundidad = pep.getEP().getMarcada();\n\t\t\t\t// Cubre todas las posibilidades (¿esto guarda los metadatos?)\n\t\t\t\tTiledImage tiled = null;\n\t\t\t\tif (profundidad != ElegirProfundidad.OCHO)\n\t\t\t\t{\n\t\t\t\t\ttiled = \n ElegirProfundidad.crearProfundidadReducida(\n ipixel_o, \n profundidad, \n imagen_original.getWidth(), \n imagen_original.getHeight());\n\t\t\t\t}\n\n\t\t\t\t//imgGuardar = djai.getSource();\n\t\t\t\tParameterBlock pb = new ParameterBlock();\n\t\t\t\tif (profundidad != ElegirProfundidad.OCHO)\n\t\t\t\t{\n\t\t\t\t\tpb.addSource(tiled);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tpb.addSource(imagen_original);\n\t\t\t\t}\n\t\t\t\tpb.add(guardar);\n\t\t\t\tpb.add(\"TIFF\");\n\t\t\t\tpb.add(false); //UseProperties\n\t\t\t\tpb.add(false); //Transcode\n\t\t\t\tpb.add(true); //VerifyOutput\n\t\t\t\tpb.add(false); //AllowPixelReplacement\n\t\t\t\tpb.add(null); //TileSize\n\t\t\t\tpb.add(streamData);\n\t\t\t\tpb.add(imageData);\n\t \t\t\tJAI.create(\"imagewrite\", pb);\n\t\t\t\t\n\t\t\t\t//JAI.create(\"imagewrite\",tiled,guardar.getPath(),\"TIFF\");\n\t\t\t}\n\t\t\telse\n\t\t\t{// No tiene extensión o es una extensión extraña\n\t\t\t\tJAI.create(\"imagewrite\",imagen_original,guardar.getPath()+\".tif\",\"TIFF\");\n\t\t\t}\n\t\t\t\n\t\t}\t\t\t \n\t\telse \n\t\t{\n\t\t\tdibujarMensajesError(retval);\n\t\t} \n\t\t\n\t\t\n\t}", "private Pares(){\n\t\t\tprimero=null;\n\t\t\tsegundo=null;\n\t\t\tdistancia=0;\n\t\t}", "public Espacio() {\n dib=new Dibujo(\"Simulacion de satelites\", 800,800);\n dib.dibujaImagen(limiteX-60,limiteY-60,\"tierra.png\");\n dib.pinta();\n }", "private DatosDeSesion() throws ExcepcionArchivoDePropiedadesNoEncontrado {\r\n this.poolDeConexiones = new PoolDeConexiones();\r\n }", "public static void registrarAuditoria(Connexion connexion,Long idUsuario,ValorPorUnidad valorporunidad,String sUsuarioPC,String sNamePC,String sIPPC)throws Exception {\n\t\t\r\n\t\ttry {\r\n\t\t\tif(ValorPorUnidadConstantesFunciones.ISCONAUDITORIA) {\r\n\t\t\t\tif(valorporunidad.getIsNew()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,ValorPorUnidadDataAccess.TABLENAME, valorporunidad.getId(), Constantes.SAUDITORIAINSERTAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(ValorPorUnidadConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////ValorPorUnidadLogic.registrarAuditoriaDetallesValorPorUnidad(connexion,valorporunidad,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if(valorporunidad.getIsDeleted()) {\r\n\t\t\t\t\t/*if(!valorporunidad.getIsExpired()) {\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.RegistrarNuevaAuditoria(Constantes.getLOidSistemaActual(),idUsuario,ValorPorUnidadDataAccess.TABLENAME, valorporunidad.getId(), Constantes.getSAuditoriaEliminarLogicamente(),\"\",sUsuarioPC,sNamePC,sIPPC,Timestamp.valueOf(Funciones.getStringMySqlCurrentDateTime()),\"\");\r\n\t\t\t\t\t\t////ValorPorUnidadLogic.registrarAuditoriaDetallesValorPorUnidad(connexion,valorporunidad,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t} else {*/\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,ValorPorUnidadDataAccess.TABLENAME, valorporunidad.getId(), Constantes.SAUDITORIAELIMINARFISICAMENTE,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t//}\r\n\t\t\t\t} else if(valorporunidad.getIsChanged()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,ValorPorUnidadDataAccess.TABLENAME, valorporunidad.getId(), Constantes.SAUDITORIAACTUALIZAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(ValorPorUnidadConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////ValorPorUnidadLogic.registrarAuditoriaDetallesValorPorUnidad(connexion,valorporunidad,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch(Exception e) {\r\n\t\t\tFunciones.manageException(logger,e);\r\n\t\t\tthrow e;\r\n\t\t}\t\t\r\n\t}", "private void inizia() throws Exception {\n this.setClasse((new ArrayList<Boolean>()).getClass());\n this.setValoreVuoto(null);\n }", "private InstanceUtil() {\n }", "Lancamento persistir(Lancamento lancamento);", "public VotacaoSegundoDia() {\n\n\t}", "public void limpiarMemoria();", "public static void main(String[] args) {\n /* obtenção da localização do serviço de registo RMI */\n \n // nome do sistema onde está localizado o serviço de registos RMI\n String rmiRegHostName;\n \n // port de escuta do serviço\n int rmiRegPortNumb; \n\n RegistryConfig rc = new RegistryConfig(\"config.ini\");\n rmiRegHostName = rc.registryHost();\n rmiRegPortNumb = rc.registryPort();\n \n /* instanciação e instalação do gestor de segurança */\n if (System.getSecurityManager() == null) {\n System.setSecurityManager(new SecurityManager());\n }\n \n /* instanciação do objecto remoto que representa o referee site e geração de um stub para ele */\n RefereeSite referee_site = null;\n RefereeSiteInterface refereeSiteInterface = null;\n referee_site = new RefereeSite();\n \n try {\n refereeSiteInterface = (RefereeSiteInterface) UnicastRemoteObject.exportObject(referee_site, rc.refereeSitePort());\n } catch (RemoteException e) {\n System.out.println(\"Excepção na geração do stub para o referee site: \" + e.getMessage());\n System.exit(1);\n }\n \n System.out.println(\"O stub para o referee site foi gerado!\");\n\n /* seu registo no serviço de registo RMI */\n String nameEntryBase = RegistryConfig.registerHandler;\n String nameEntryObject = RegistryConfig.refereeSiteNameEntry;\n Registry registry = null;\n RegisterInterface reg = null;\n\n try {\n registry = LocateRegistry.getRegistry(rmiRegHostName, rmiRegPortNumb);\n } catch (RemoteException e) {\n System.out.println(\"Excepção na criação do registo RMI: \" + e.getMessage());\n System.exit(1);\n }\n \n System.out.println(\"O registo RMI foi criado!\");\n\n try {\n reg = (RegisterInterface) registry.lookup(nameEntryBase);\n } catch (RemoteException e) {\n System.out.println(\"RegisterRemoteObject lookup exception: \" + e.getMessage());\n System.exit(1);\n } catch (NotBoundException e) {\n System.out.println(\"RegisterRemoteObject not bound exception: \" + e.getMessage());\n System.exit(1);\n }\n\n try {\n reg.bind(nameEntryObject, refereeSiteInterface);\n } catch (RemoteException e) {\n System.out.println(\"Excepção no registo do referee site: \" + e.getMessage());\n System.exit(1);\n } catch (AlreadyBoundException e) {\n System.out.println(\"O referee site já está registado: \" + e.getMessage());\n System.exit(1);\n }\n \n System.out.println(\"O referee site foi registado!\");\n }", "public static void registrarAuditoria(Connexion connexion,Long idUsuario,ClienteArchivo clientearchivo,String sUsuarioPC,String sNamePC,String sIPPC)throws Exception {\n\t\t\r\n\t\ttry {\r\n\t\t\tif(ClienteArchivoConstantesFunciones.ISCONAUDITORIA) {\r\n\t\t\t\tif(clientearchivo.getIsNew()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,ClienteArchivoDataAccess.TABLENAME, clientearchivo.getId(), Constantes.SAUDITORIAINSERTAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(ClienteArchivoConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////ClienteArchivoLogic.registrarAuditoriaDetallesClienteArchivo(connexion,clientearchivo,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if(clientearchivo.getIsDeleted()) {\r\n\t\t\t\t\t/*if(!clientearchivo.getIsExpired()) {\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.RegistrarNuevaAuditoria(Constantes.getLOidSistemaActual(),idUsuario,ClienteArchivoDataAccess.TABLENAME, clientearchivo.getId(), Constantes.getSAuditoriaEliminarLogicamente(),\"\",sUsuarioPC,sNamePC,sIPPC,Timestamp.valueOf(Funciones.getStringMySqlCurrentDateTime()),\"\");\r\n\t\t\t\t\t\t////ClienteArchivoLogic.registrarAuditoriaDetallesClienteArchivo(connexion,clientearchivo,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t} else {*/\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,ClienteArchivoDataAccess.TABLENAME, clientearchivo.getId(), Constantes.SAUDITORIAELIMINARFISICAMENTE,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t//}\r\n\t\t\t\t} else if(clientearchivo.getIsChanged()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,ClienteArchivoDataAccess.TABLENAME, clientearchivo.getId(), Constantes.SAUDITORIAACTUALIZAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(ClienteArchivoConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////ClienteArchivoLogic.registrarAuditoriaDetallesClienteArchivo(connexion,clientearchivo,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch(Exception e) {\r\n\t\t\tFunciones.manageException(logger,e);\r\n\t\t\tthrow e;\r\n\t\t}\t\t\r\n\t}", "public void crearActividad (Actividad a) {\r\n String query = \"INSERT INTO actividad (identificacion_navegate, numero_matricula, fecha, hora, destino, eliminar) VALUES (\\\"\" \r\n + a.getIdentificacionNavegante()+ \"\\\", \" \r\n + a.getNumeroMatricula() + \", \\\"\" \r\n + a.getFecha() + \"\\\", \\\"\" \r\n + a.getHora() + \"\\\", \\\"\" \r\n + a.getDestino()+ \"\\\" ,false)\";\r\n try {\r\n Statement st = con.createStatement();\r\n st.executeUpdate(query);\r\n st.close();\r\n JOptionPane.showMessageDialog(null, \"Actividad creada\", \"Operación exitosa\", JOptionPane.INFORMATION_MESSAGE);\r\n } catch (SQLException ex) {\r\n Logger.getLogger(PActividad.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }", "private TipoAtaque generateTipoAtaque() {\n\t\treturn null;\r\n\t}", "public void inicializar(Coleccion coleccion){\n cargador.inicializar();\n analizador.inicializar();\n gestorAlmacenamiento.inicializar(coleccion);\n\n }", "@Override\n\tpublic void crearTipoAsiento(TipoAsiento tipoAsiento) throws Exception {\n\t\ttipoAsientoMapper.crearTipoAsiento(tipoAsiento);\n\t\t\n\t}", "public ReferenciaNoDisponibleException() {\n }", "public static void registrarOperacionPrestamo(Usuario autor, long idPrestamo, Operacion operacion) throws DaoException {\r\n String msg = null;\r\n Prestamo prestamo = PrestamoDao.findPrestamoById(idPrestamo, null);\r\n Conexion con = null;\r\n try {\r\n HashMap<String, String> infoPrestamo;\r\n HashMap<String, Object> infoOperacion = new HashMap<String, Object>();\r\n infoOperacion.put(\"ID\", Consultas.darNumFilas(Operacion.NOMBRE_TABLA)+1);\r\n infoOperacion.put(\"FECHA\", Consultas.getCurrentDate());\r\n infoOperacion.put(\"TIPO\", operacion.getTipo());\r\n infoOperacion.put(\"ID_AUTOR\", autor.getId());\r\n\r\n \r\n con=new Conexion();\r\n switch (operacion.getTipo()) {\r\n case Operacion.PAGAR_CUOTA:\r\n PrestamoDao.registrarPagoCuota(prestamo,con);\r\n infoOperacion.put(\"MONTO\", prestamo.getValorCuota());\r\n infoOperacion.put(\"DESTINO\", \"0\");\r\n infoOperacion.put(\"METODO\", operacion.getMetodo());\r\n infoOperacion.put(\"ID_PRESTAMO\", prestamo.getId()); \r\n \r\n break;\r\n case Operacion.PAGAR_CUOTA_EXTRAORDINARIA:\r\n \r\n //solo gasta lo necesario par apagar el prestamo\r\n if (operacion.getMonto()>prestamo.getCantidadRestante())\r\n {\r\n throw new DaoException(\"La cuota supera lo que debe\");\r\n }\r\n \r\n infoOperacion.put(\"MONTO\", operacion.getMonto());\r\n infoOperacion.put(\"DESTINO\",\"0\" );\r\n infoOperacion.put(\"METODO\", operacion.getMetodo());\r\n infoOperacion.put(\"ID_PRESTAMO\", prestamo.getId()); \r\n PrestamoDao.registrarPagoCuotaExtraordinaria(prestamo,operacion,con);\r\n break;\r\n case Operacion.CERRAR:\r\n if (prestamo.getCantidadRestante() != 0) {\r\n throw new DaoException( \"El prestamo no se ha pagado completamente\");\r\n } else {\r\n \r\n Consultas.insertar(null, infoOperacion, Operacion.infoColumnas, Operacion.NOMBRE_TABLA);\r\n String sentenciaCerrar = \"UPDATE PRESTAMOS SET ESTADO='CERRADO' WHERE ID=\" + prestamo.getId();\r\n con.getConexion().prepareStatement(sentenciaCerrar).executeUpdate();\r\n \r\n }\r\n \r\n }\r\n \r\n Consultas.insertar(con, infoOperacion, Operacion.infoColumnas, Operacion.NOMBRE_TABLA);\r\n } catch (SQLException ex) {\r\n Logger.getLogger(OperacionDao.class.getName()).log(Level.SEVERE, null, ex); \r\n con.rollback();\r\n throw new DaoException();\r\n }\r\n\r\n \r\n }", "private void validaPosicaoDestino(Posicao orig, Posicao dest) {\n\t\tif (!tabuleiro.peca(orig).movimentoPossivel(dest)) {\n\t\t\tthrow new XadrezException(\"A peca escolhida não pode mover-se para a posicao destino\");\n\t\t}\n\t}", "private void registraLog(int aTipo, String aMensagem)\n\t{\n\t\tif (aTipo == Definicoes.FATAL)\n\t\t\tlogger.fatal(aMensagem);\n\t\telse if (aTipo == Definicoes.ERRO)\n\t\t\t\tlogger.error(aMensagem);\n\t\telse if (aTipo == Definicoes.WARN)\n\t\t\t\tlogger.warn(aMensagem);\n\t\telse if (aTipo == Definicoes.INFO)\n\t\t\t\tlogger.info(aMensagem);\n\t\telse if (aTipo == Definicoes.DEBUG)\n\t\t{\n\t\t\t\tif (arqConfig.getSaidaDebug())\n\t\t\t\t\tlogger.debug(aMensagem);\n\t\t}\n\t\telse logger.warn(\"SEVERIDADE NAO DEFINIDA - \" + aMensagem);\n\t}", "public static File salvarBitmapEnUnidadExterna(String DIRECTORIOEXTERNO, Bitmap bitmap, String carpetadestino, String nombreficherodestino) {\n boolean res = true;\n File fileDestino = null;\n try {\n File carpetaDestino = JYOCUtilsv4.obtenerDirectorioEnUnidadExterna(DIRECTORIOEXTERNO, carpetadestino);\n\n\n if (carpetaDestino != null) {\n fileDestino = new File(carpetaDestino, nombreficherodestino);\n if (!fileDestino.exists())\n fileDestino.createNewFile(); // por si acaso android en el futuro ..... hace algo raro\n\n OutputStream stream = new FileOutputStream(fileDestino);\n bitmap.compress(Bitmap.CompressFormat.JPEG, 100, stream);\n stream.flush();\n stream.close();\n return fileDestino;\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }", "private static void registrarAuditoriaDetallesPresuTipoProyecto(Connexion connexion,PresuTipoProyecto presutipoproyecto)throws Exception {\n\t\t\r\n\t\tString strValorActual=null;\r\n\t\tString strValorNuevo=null;\r\n\t\t\r\n\t\t\t\r\n\t\t\tif(presutipoproyecto.getIsNew()||!presutipoproyecto.getid_empresa().equals(presutipoproyecto.getPresuTipoProyectoOriginal().getid_empresa()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(presutipoproyecto.getPresuTipoProyectoOriginal().getid_empresa()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=presutipoproyecto.getPresuTipoProyectoOriginal().getid_empresa().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(presutipoproyecto.getid_empresa()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=presutipoproyecto.getid_empresa().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PresuTipoProyectoConstantesFunciones.IDEMPRESA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(presutipoproyecto.getIsNew()||!presutipoproyecto.getcodigo().equals(presutipoproyecto.getPresuTipoProyectoOriginal().getcodigo()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(presutipoproyecto.getPresuTipoProyectoOriginal().getcodigo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=presutipoproyecto.getPresuTipoProyectoOriginal().getcodigo();\r\n\t\t\t\t}\r\n\t\t\t\tif(presutipoproyecto.getcodigo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=presutipoproyecto.getcodigo() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PresuTipoProyectoConstantesFunciones.CODIGO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(presutipoproyecto.getIsNew()||!presutipoproyecto.getnombre().equals(presutipoproyecto.getPresuTipoProyectoOriginal().getnombre()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(presutipoproyecto.getPresuTipoProyectoOriginal().getnombre()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=presutipoproyecto.getPresuTipoProyectoOriginal().getnombre();\r\n\t\t\t\t}\r\n\t\t\t\tif(presutipoproyecto.getnombre()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=presutipoproyecto.getnombre() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PresuTipoProyectoConstantesFunciones.NOMBRE,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t}", "private static void registrarAuditoriaDetallesGrupoBodega(Connexion connexion,GrupoBodega grupobodega)throws Exception {\n\t\t\r\n\t\tString strValorActual=null;\r\n\t\tString strValorNuevo=null;\r\n\t\t\r\n\t\t\t\r\n\t\t\tif(grupobodega.getIsNew()||!grupobodega.getid_empresa().equals(grupobodega.getGrupoBodegaOriginal().getid_empresa()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(grupobodega.getGrupoBodegaOriginal().getid_empresa()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=grupobodega.getGrupoBodegaOriginal().getid_empresa().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(grupobodega.getid_empresa()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=grupobodega.getid_empresa().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),GrupoBodegaConstantesFunciones.IDEMPRESA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(grupobodega.getIsNew()||!grupobodega.getcodigo().equals(grupobodega.getGrupoBodegaOriginal().getcodigo()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(grupobodega.getGrupoBodegaOriginal().getcodigo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=grupobodega.getGrupoBodegaOriginal().getcodigo();\r\n\t\t\t\t}\r\n\t\t\t\tif(grupobodega.getcodigo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=grupobodega.getcodigo() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),GrupoBodegaConstantesFunciones.CODIGO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(grupobodega.getIsNew()||!grupobodega.getnombre().equals(grupobodega.getGrupoBodegaOriginal().getnombre()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(grupobodega.getGrupoBodegaOriginal().getnombre()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=grupobodega.getGrupoBodegaOriginal().getnombre();\r\n\t\t\t\t}\r\n\t\t\t\tif(grupobodega.getnombre()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=grupobodega.getnombre() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),GrupoBodegaConstantesFunciones.NOMBRE,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(grupobodega.getIsNew()||!grupobodega.getruc().equals(grupobodega.getGrupoBodegaOriginal().getruc()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(grupobodega.getGrupoBodegaOriginal().getruc()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=grupobodega.getGrupoBodegaOriginal().getruc();\r\n\t\t\t\t}\r\n\t\t\t\tif(grupobodega.getruc()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=grupobodega.getruc() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),GrupoBodegaConstantesFunciones.RUC,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(grupobodega.getIsNew()||!grupobodega.getdireccion().equals(grupobodega.getGrupoBodegaOriginal().getdireccion()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(grupobodega.getGrupoBodegaOriginal().getdireccion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=grupobodega.getGrupoBodegaOriginal().getdireccion();\r\n\t\t\t\t}\r\n\t\t\t\tif(grupobodega.getdireccion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=grupobodega.getdireccion() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),GrupoBodegaConstantesFunciones.DIRECCION,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(grupobodega.getIsNew()||!grupobodega.gettelefono().equals(grupobodega.getGrupoBodegaOriginal().gettelefono()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(grupobodega.getGrupoBodegaOriginal().gettelefono()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=grupobodega.getGrupoBodegaOriginal().gettelefono();\r\n\t\t\t\t}\r\n\t\t\t\tif(grupobodega.gettelefono()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=grupobodega.gettelefono() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),GrupoBodegaConstantesFunciones.TELEFONO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(grupobodega.getIsNew()||!grupobodega.getid_pais().equals(grupobodega.getGrupoBodegaOriginal().getid_pais()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(grupobodega.getGrupoBodegaOriginal().getid_pais()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=grupobodega.getGrupoBodegaOriginal().getid_pais().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(grupobodega.getid_pais()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=grupobodega.getid_pais().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),GrupoBodegaConstantesFunciones.IDPAIS,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(grupobodega.getIsNew()||!grupobodega.getid_ciudad().equals(grupobodega.getGrupoBodegaOriginal().getid_ciudad()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(grupobodega.getGrupoBodegaOriginal().getid_ciudad()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=grupobodega.getGrupoBodegaOriginal().getid_ciudad().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(grupobodega.getid_ciudad()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=grupobodega.getid_ciudad().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),GrupoBodegaConstantesFunciones.IDCIUDAD,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(grupobodega.getIsNew()||!grupobodega.getid_centro_costo().equals(grupobodega.getGrupoBodegaOriginal().getid_centro_costo()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(grupobodega.getGrupoBodegaOriginal().getid_centro_costo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=grupobodega.getGrupoBodegaOriginal().getid_centro_costo().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(grupobodega.getid_centro_costo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=grupobodega.getid_centro_costo().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),GrupoBodegaConstantesFunciones.IDCENTROCOSTO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(grupobodega.getIsNew()||!grupobodega.getid_empleado().equals(grupobodega.getGrupoBodegaOriginal().getid_empleado()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(grupobodega.getGrupoBodegaOriginal().getid_empleado()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=grupobodega.getGrupoBodegaOriginal().getid_empleado().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(grupobodega.getid_empleado()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=grupobodega.getid_empleado().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),GrupoBodegaConstantesFunciones.IDEMPLEADO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(grupobodega.getIsNew()||!grupobodega.getdescripcion().equals(grupobodega.getGrupoBodegaOriginal().getdescripcion()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(grupobodega.getGrupoBodegaOriginal().getdescripcion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=grupobodega.getGrupoBodegaOriginal().getdescripcion();\r\n\t\t\t\t}\r\n\t\t\t\tif(grupobodega.getdescripcion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=grupobodega.getdescripcion() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),GrupoBodegaConstantesFunciones.DESCRIPCION,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(grupobodega.getIsNew()||!grupobodega.getid_cuenta_contable_inventario().equals(grupobodega.getGrupoBodegaOriginal().getid_cuenta_contable_inventario()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(grupobodega.getGrupoBodegaOriginal().getid_cuenta_contable_inventario()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=grupobodega.getGrupoBodegaOriginal().getid_cuenta_contable_inventario().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(grupobodega.getid_cuenta_contable_inventario()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=grupobodega.getid_cuenta_contable_inventario().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),GrupoBodegaConstantesFunciones.IDCUENTACONTABLEINVENTARIO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(grupobodega.getIsNew()||!grupobodega.getid_cuenta_contable_costo().equals(grupobodega.getGrupoBodegaOriginal().getid_cuenta_contable_costo()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(grupobodega.getGrupoBodegaOriginal().getid_cuenta_contable_costo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=grupobodega.getGrupoBodegaOriginal().getid_cuenta_contable_costo().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(grupobodega.getid_cuenta_contable_costo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=grupobodega.getid_cuenta_contable_costo().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),GrupoBodegaConstantesFunciones.IDCUENTACONTABLECOSTO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(grupobodega.getIsNew()||!grupobodega.getid_cuenta_contable_venta().equals(grupobodega.getGrupoBodegaOriginal().getid_cuenta_contable_venta()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(grupobodega.getGrupoBodegaOriginal().getid_cuenta_contable_venta()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=grupobodega.getGrupoBodegaOriginal().getid_cuenta_contable_venta().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(grupobodega.getid_cuenta_contable_venta()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=grupobodega.getid_cuenta_contable_venta().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),GrupoBodegaConstantesFunciones.IDCUENTACONTABLEVENTA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(grupobodega.getIsNew()||!grupobodega.getid_cuenta_contable_descuento().equals(grupobodega.getGrupoBodegaOriginal().getid_cuenta_contable_descuento()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(grupobodega.getGrupoBodegaOriginal().getid_cuenta_contable_descuento()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=grupobodega.getGrupoBodegaOriginal().getid_cuenta_contable_descuento().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(grupobodega.getid_cuenta_contable_descuento()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=grupobodega.getid_cuenta_contable_descuento().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),GrupoBodegaConstantesFunciones.IDCUENTACONTABLEDESCUENTO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(grupobodega.getIsNew()||!grupobodega.getid_cuenta_contable_devolucion().equals(grupobodega.getGrupoBodegaOriginal().getid_cuenta_contable_devolucion()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(grupobodega.getGrupoBodegaOriginal().getid_cuenta_contable_devolucion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=grupobodega.getGrupoBodegaOriginal().getid_cuenta_contable_devolucion().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(grupobodega.getid_cuenta_contable_devolucion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=grupobodega.getid_cuenta_contable_devolucion().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),GrupoBodegaConstantesFunciones.IDCUENTACONTABLEDEVOLUCION,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(grupobodega.getIsNew()||!grupobodega.getid_cuenta_contable_debito().equals(grupobodega.getGrupoBodegaOriginal().getid_cuenta_contable_debito()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(grupobodega.getGrupoBodegaOriginal().getid_cuenta_contable_debito()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=grupobodega.getGrupoBodegaOriginal().getid_cuenta_contable_debito().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(grupobodega.getid_cuenta_contable_debito()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=grupobodega.getid_cuenta_contable_debito().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),GrupoBodegaConstantesFunciones.IDCUENTACONTABLEDEBITO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(grupobodega.getIsNew()||!grupobodega.getid_cuenta_contable_credito().equals(grupobodega.getGrupoBodegaOriginal().getid_cuenta_contable_credito()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(grupobodega.getGrupoBodegaOriginal().getid_cuenta_contable_credito()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=grupobodega.getGrupoBodegaOriginal().getid_cuenta_contable_credito().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(grupobodega.getid_cuenta_contable_credito()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=grupobodega.getid_cuenta_contable_credito().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),GrupoBodegaConstantesFunciones.IDCUENTACONTABLECREDITO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(grupobodega.getIsNew()||!grupobodega.getid_cuenta_contable_produccion().equals(grupobodega.getGrupoBodegaOriginal().getid_cuenta_contable_produccion()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(grupobodega.getGrupoBodegaOriginal().getid_cuenta_contable_produccion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=grupobodega.getGrupoBodegaOriginal().getid_cuenta_contable_produccion().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(grupobodega.getid_cuenta_contable_produccion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=grupobodega.getid_cuenta_contable_produccion().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),GrupoBodegaConstantesFunciones.IDCUENTACONTABLEPRODUCCION,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(grupobodega.getIsNew()||!grupobodega.getid_cuenta_contable_bonifica().equals(grupobodega.getGrupoBodegaOriginal().getid_cuenta_contable_bonifica()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(grupobodega.getGrupoBodegaOriginal().getid_cuenta_contable_bonifica()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=grupobodega.getGrupoBodegaOriginal().getid_cuenta_contable_bonifica().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(grupobodega.getid_cuenta_contable_bonifica()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=grupobodega.getid_cuenta_contable_bonifica().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),GrupoBodegaConstantesFunciones.IDCUENTACONTABLEBONIFICA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(grupobodega.getIsNew()||!grupobodega.getid_cuenta_contable_costo_bonifica().equals(grupobodega.getGrupoBodegaOriginal().getid_cuenta_contable_costo_bonifica()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(grupobodega.getGrupoBodegaOriginal().getid_cuenta_contable_costo_bonifica()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=grupobodega.getGrupoBodegaOriginal().getid_cuenta_contable_costo_bonifica().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(grupobodega.getid_cuenta_contable_costo_bonifica()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=grupobodega.getid_cuenta_contable_costo_bonifica().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),GrupoBodegaConstantesFunciones.IDCUENTACONTABLECOSTOBONIFICA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t}", "public void inizializza() {\n Navigatore nav;\n Portale portale;\n\n super.inizializza();\n\n try { // prova ad eseguire il codice\n\n Modulo modulo = getModuloRisultati();\n modulo.inizializza();\n// Campo campo = modulo.getCampoChiave();\n// campo.setVisibileVistaDefault(false);\n// campo.setPresenteScheda(false);\n// Vista vista = modulo.getVistaDefault();\n// vista.getElement\n// Campo campo = vista.getCampo(modulo.getCampoChiave());\n\n\n\n /* aggiunge il Portale Navigatore al pannello placeholder */\n nav = this.getNavigatore();\n portale = nav.getPortaleNavigatore();\n this.getPanNavigatore().add(portale);\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n }", "public NEOLoggerException()\n {\n }", "private synchronized static void createInstance(){\r\n\t\tif (instance == null){\r\n\t\t\tinstance = new Casino();\r\n\t\t}\r\n\t}", "public static ServicioAdicional insertServicioAdicional(String nombre_servicio,\n String descripcion_servicio,\n String nombre_tipo_servicio,\n float tarifa_serv_adicional,\n int cantidad_serv_adicional,\n String tipo_plan_serv_adicional){\n \n ServicioAdicional miServAdicional = new ServicioAdicional(nombre_servicio,\n descripcion_servicio,\n nombre_tipo_servicio,\n tarifa_serv_adicional,\n cantidad_serv_adicional,\n tipo_plan_serv_adicional);\n \n \n try {\n miServAdicional.registrarServicioAd();\n } catch (Exception e) {\n // Si hay una excepcion se imprime un mensaje\n System.err.println(e.getMessage());\n }\n \n return miServAdicional;\n \n }", "Long crear(Espacio espacio);", "SpacesInvaders_aUnVaisseau createSpacesInvaders_aUnVaisseau();", "public Object cloner(Sommet origine, Sommet destination) {\n // assert(origine.graphe() == destination.graphe() == graphe)\n try {\n Arete le_clone = (Arete)super.clone();\n le_clone.graph = origine.graphe();\n le_clone.position = le_clone.graph.edges.ajouterElement(le_clone);\n le_clone.origine = origine;\n le_clone.destination = destination;\n origine.successeurs.inserer(destination);\n destination.predecesseurs.inserer(origine);\n origine.aretes_sortantes.inserer(le_clone);\n destination.aretes_entrantes.inserer(le_clone);\n return le_clone;\n } catch(CloneNotSupportedException e) {\n return null;\n }\n }", "public abstract Anuncio creaAnuncioTematico();", "public String limpiar()\r\n/* 103: */ {\r\n/* 104:112 */ this.motivoLlamadoAtencion = new MotivoLlamadoAtencion();\r\n/* 105:113 */ return \"\";\r\n/* 106: */ }", "Parcelle createParcelle();", "public void ejbPostCreate(int argLogid) throws java.rmi.RemoteException {}", "public static void main(String[] args) throws Exception {\n\t\t\n\t\tSistemaInmobiliaria sistema= new SistemaInmobiliaria();\n\t\t\n\t\tLocalDate fechaInicio1= LocalDate.of(2019, 05, 28);\n\t\tLocalDate fechaInicio2= LocalDate.of(2019, 04, 19);\n\t\tLocalDate fechaInicio3= LocalDate.of(2019, 03, 27);\n\t\t\n\t\tLocatorio locatorio1= new Locatorio (4, 4444444, \"Pablo\", \"Perez\", \"1234567812\", true);\n\t\tLocatorio locatorio2= new Locatorio (5, 5555555, \"Homero\", \"Simpson\", \"1234567813\", true);\n\t\tLocatorio locatorio3= new Locatorio (6, 6666666, \"Lissa\", \"Simpson\", \"1234567814\", true);\n\t\t\n\t\tLocador locador1 = new Locador(1, 1111111, \"Nicolas\", \"Perez\", \"1234567890\",1,\"Frances\", 20,\"Animal\");\n\t\tLocador locador2= new Locador(2, 2222222, \"Romina\", \"Mansilla\", \"1234567810\",2,\"Santander Rio\",19,\"Pescado\");\n\t\tLocador locador3= new Locador(3, 3333333, \"Alejandra\", \"Vranic\", \"1234567811\",3,\"Patagonia\",18,\"Gato\");\n\t\t\n\t\tPropiedad propiedad1= new Propiedad (1, 1010, \"Uno\", 2340, 1, \"UF\", \"Lanús\", \"Buenos Aires\",locador1);\n\t\tPropiedad propiedad2= new Propiedad (2, 9090, \"Dos\", 2341, 2, \"UF1\", \"Lanús\", \"Buenos Aires\",locador2);\n\t\tPropiedad propiedad3= new Propiedad (3, 8080, \"Tres\", 2342, 3, \"UF2\", \"Lanús\", \"Buenos Aires\",locador3);\n\n\t\t/*-----------------------------------------------------------------------*/\n\t\t\n\t\tSystem.out.println(\"Agregar Contrato con id\");\n\t\t\n\t\tsistema.agregarContrato(1, locatorio1, propiedad1, 789, fechaInicio1, 1, 6, 7500, 10);\n\t\tsistema.agregarContrato(2, locatorio2, propiedad2, 345, fechaInicio2, 2, 8, 8500, 11);\n\t\t\n\t\tfor(Contrato c: sistema.getLstContratos()){\n\t\t\tSystem.out.println(c.toString());\n\t\t}\n\t\t\n\t System.out.println(\"-------------------------------------------------\");\n\t\t\n\t\t/*-----------------------------------------------------------------------*/\n\t \n\t\tSystem.out.println(\"Agregar Contrato con comision\");\n\t\t\n\t\tsistema.agregarContrato(locatorio3, propiedad3, 327, fechaInicio3, 3, 10, 1000, 12);\n\n\t\tfor(Contrato c: sistema.getLstContratos()){\n\t\t\tSystem.out.println(c.toString());\n\t\t}\n\t\t\n\t System.out.println(\"-------------------------------------------------\");\n\t \n\t /*-----------------------------------------------------------------------*/\n\t \n\t\tSystem.out.println(\"Traer contrato por id\");\n\t\t \n\t\tSystem.out.println(sistema.traerContratoPorId(1));\n\t\t\n\t\tSystem.out.println(\"-------------------------------------------------\");\n\n\t\t/*-----------------------------------------------------------------------*/\n\t\t\n\t\tSystem.out.println(\"Traer contrato por comision\");\n\t\t \n\t\tSystem.out.println(sistema.traerContratoPorComision(327));\n\t\t\n\t\tSystem.out.println(\"-------------------------------------------------\");\n\n\t\t/*-----------------------------------------------------------------------*/\n\t\t\n\t\tSystem.out.println(\"Modificar contrato por id\");\n\t\t \n\t\tSystem.out.println(sistema.modificarContratoPorId(2, locatorio2, propiedad2, 345, fechaInicio2, 2, 8, 9050, 9));\n\t\t\n\t\tfor(Contrato c: sistema.getLstContratos()){\n\t\t\tSystem.out.println(c.toString());\n\t\t}\n\n\t\tSystem.out.println(\"-------------------------------------------------\");\n\n\t\t/*-----------------------------------------------------------------------*/\n\t\t\n\t\tSystem.out.println(\"Modificar Propiedad por comision\");\n\t\t \n\t\tSystem.out.println(sistema.modificarContratoPorComision(locatorio2, propiedad2, 345, fechaInicio2, 2, 10, 9050, 9));\n\t\t\n\t\tfor(Contrato c: sistema.getLstContratos()){\n\t\t\tSystem.out.println(c.toString());\n\t\t}\n\n\t\tSystem.out.println(\"-------------------------------------------------\");\n\n\t\t/*-----------------------------------------------------------------------*/\n\t\t\n\t\tSystem.out.println(\"Es contrato vigente?\");\n\n\t\tLocalDate probarFecha= LocalDate.of(2019, 05, 31);\n\t\t\n\t\tSystem.out.println(sistema.traerContratoPorId(1).esContratoVigente(probarFecha));\n\t\t\n\t\tSystem.out.println(\"-------------------------------------------------\");\n\t\t\n\t\t/*-----------------------------------------------------------------------*/\n\t\t\n\t\tSystem.out.println(\"Calcular mora\");\n\t\t\n\t\tSystem.out.println(sistema.traerContratoPorId(1).calcularMora(20));\n\t\t\n\t\tSystem.out.println(\"-------------------------------------------------\");\n\t\t\n\t\t/*-----------------------------------------------------------------------*/\n\t\t\n\t\tSystem.out.println(\"Calcular Monto Pago a Recibir\");\n\t\t\n\t\tSystem.out.println(sistema.traerContratoPorId(1).calcularMontoPagoARecibir());\n\t\t\n\t\tSystem.out.println(\"-------------------------------------------------\");\n\t\t\n\t\t/*-----------------------------------------------------------------------*/\n\t\t\n\t\tSystem.out.println(\"Calcular Monto Pago a Recibir por fecha\");\n\t\t\n\t\tLocalDate probarFecha1= LocalDate.of(2019, 5, 30);\n\t\t\n\t\tSystem.out.println(sistema.traerContratoPorId(1).calcularMontoPagoARecibir(probarFecha1));\n\t\t\n\t\tSystem.out.println(\"-------------------------------------------------\");\n\t\t\n\t\t/*-----------------------------------------------------------------------*/\n\t\t\n\t\tSystem.out.println(\"Calcular comision\");\n\t\t\n\t\tSystem.out.println(sistema.traerContratoPorId(1).calcularComision());\n\t\t\n\t\tSystem.out.println(\"-------------------------------------------------\");\n\t\t\n\t\t/*-----------------------------------------------------------------------*/\n\t\t\n\t\tSystem.out.println(\"Calcular Monto Pago a Recibir que debe pagar la inmobiliaria a Locador\");\n\t\t\n\t\tSystem.out.println(sistema.traerContratoPorId(1).calcularMontoPagoARecibirInmobiliariaAlLocador());\n\t\t\n\t\tSystem.out.println(\"-------------------------------------------------\");\n\t\t\n\t\t/*-----------------------------------------------------------------------*/\n\t\t\n\t\tSystem.out.println(\"Traer contratos vigentes con fechas\");\n\t\t\n\t\tLocalDate probarFecha2= LocalDate.of(2019, 3, 30);\n\t\tLocalDate probarFecha3= LocalDate.of(2019, 4, 21);\n\t\t\n\t\tSystem.out.println(sistema.traerContratosVigentes(probarFecha2, probarFecha3));\n\t\n\t\tSystem.out.println(\"-------------------------------------------------\");\n\t\t\n\t}", "private static void registrarAuditoriaDetallesDatoGeneralEmpleado(Connexion connexion,DatoGeneralEmpleado datogeneralempleado)throws Exception {\n\t\t\r\n\t\tString strValorActual=null;\r\n\t\tString strValorNuevo=null;\r\n\t\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getid_numero_patronal().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_numero_patronal()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_numero_patronal()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_numero_patronal().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getid_numero_patronal()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getid_numero_patronal().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.IDNUMEROPATRONAL,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getid_tipo_afiliacion().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_tipo_afiliacion()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_tipo_afiliacion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_tipo_afiliacion().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getid_tipo_afiliacion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getid_tipo_afiliacion().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.IDTIPOAFILIACION,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getcarnet_iess().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getcarnet_iess()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getcarnet_iess()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getcarnet_iess();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getcarnet_iess()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getcarnet_iess() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.CARNETIESS,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getsectorial_iess().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getsectorial_iess()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getsectorial_iess()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getsectorial_iess();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getsectorial_iess()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getsectorial_iess() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.SECTORIALIESS,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getid_pais().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_pais()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_pais()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_pais().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getid_pais()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getid_pais().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.IDPAIS,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getid_provincia().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_provincia()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_provincia()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_provincia().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getid_provincia()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getid_provincia().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.IDPROVINCIA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getid_canton().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_canton()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_canton()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_canton().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getid_canton()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getid_canton().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.IDCANTON,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getid_parroquia().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_parroquia()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_parroquia()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_parroquia().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getid_parroquia()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getid_parroquia().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.IDPARROQUIA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getfecha_nacimiento().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getfecha_nacimiento()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getfecha_nacimiento()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getfecha_nacimiento().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getfecha_nacimiento()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getfecha_nacimiento().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.FECHANACIMIENTO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getfecha_fallece().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getfecha_fallece()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getfecha_fallece()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getfecha_fallece().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getfecha_fallece()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getfecha_fallece().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.FECHAFALLECE,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getvalor_evaluacion().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor_evaluacion()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor_evaluacion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor_evaluacion().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getvalor_evaluacion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getvalor_evaluacion().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.VALOREVALUACION,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getnumero_horas().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getnumero_horas()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getnumero_horas()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getnumero_horas().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getnumero_horas()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getnumero_horas().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.NUMEROHORAS,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getvalor_hora().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor_hora()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor_hora()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor_hora().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getvalor_hora()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getvalor_hora().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.VALORHORA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getsalario().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getsalario()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getsalario()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getsalario().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getsalario()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getsalario().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.SALARIO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getid_moneda().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_moneda()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_moneda()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_moneda().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getid_moneda()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getid_moneda().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.IDMONEDA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getnumero_contrato().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getnumero_contrato()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getnumero_contrato()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getnumero_contrato();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getnumero_contrato()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getnumero_contrato() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.NUMEROCONTRATO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getid_tipo_contrato().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_tipo_contrato()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_tipo_contrato()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_tipo_contrato().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getid_tipo_contrato()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getid_tipo_contrato().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.IDTIPOCONTRATO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getvalor1().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor1()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor1()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor1().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getvalor1()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getvalor1().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.VALOR1,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getvalor2().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor2()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor2()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor2().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getvalor2()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getvalor2().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.VALOR2,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getvalor3().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor3()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor3()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor3().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getvalor3()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getvalor3().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.VALOR3,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getvalor4().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor4()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor4()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor4().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getvalor4()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getvalor4().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.VALOR4,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getvalor5().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor5()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor5()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor5().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getvalor5()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getvalor5().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.VALOR5,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getvalor6().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor6()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor6()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor6().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getvalor6()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getvalor6().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.VALOR6,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getcon_aporta_seguro_social().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getcon_aporta_seguro_social()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getcon_aporta_seguro_social()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getcon_aporta_seguro_social().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getcon_aporta_seguro_social()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getcon_aporta_seguro_social().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.CONAPORTASEGUROSOCIAL,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getcon_recibe_horas_extras().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getcon_recibe_horas_extras()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getcon_recibe_horas_extras()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getcon_recibe_horas_extras().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getcon_recibe_horas_extras()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getcon_recibe_horas_extras().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.CONRECIBEHORASEXTRAS,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getcon_descuento_impuestos().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getcon_descuento_impuestos()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getcon_descuento_impuestos()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getcon_descuento_impuestos().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getcon_descuento_impuestos()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getcon_descuento_impuestos().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.CONDESCUENTOIMPUESTOS,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getpension_alimenticia().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getpension_alimenticia()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getpension_alimenticia()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getpension_alimenticia().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getpension_alimenticia()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getpension_alimenticia().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.PENSIONALIMENTICIA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getcon_pago_por_horas().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getcon_pago_por_horas()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getcon_pago_por_horas()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getcon_pago_por_horas().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getcon_pago_por_horas()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getcon_pago_por_horas().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.CONPAGOPORHORAS,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getcon_anticipo().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getcon_anticipo()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getcon_anticipo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getcon_anticipo().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getcon_anticipo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getcon_anticipo().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.CONANTICIPO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getid_tipo_libreta_mili().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_tipo_libreta_mili()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_tipo_libreta_mili()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_tipo_libreta_mili().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getid_tipo_libreta_mili()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getid_tipo_libreta_mili().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.IDTIPOLIBRETAMILI,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getlibreta_militar().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getlibreta_militar()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getlibreta_militar()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getlibreta_militar();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getlibreta_militar()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getlibreta_militar() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.LIBRETAMILITAR,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getid_tipo_grupo_forma_pago().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_tipo_grupo_forma_pago()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_tipo_grupo_forma_pago()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_tipo_grupo_forma_pago().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getid_tipo_grupo_forma_pago()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getid_tipo_grupo_forma_pago().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.IDTIPOGRUPOFORMAPAGO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getid_banco().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_banco()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_banco()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_banco().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getid_banco()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getid_banco().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.IDBANCO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getid_tipo_cuenta_banco_global().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_tipo_cuenta_banco_global()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_tipo_cuenta_banco_global()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_tipo_cuenta_banco_global().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getid_tipo_cuenta_banco_global()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getid_tipo_cuenta_banco_global().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.IDTIPOCUENTABANCOGLOBAL,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getnumero_cuenta().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getnumero_cuenta()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getnumero_cuenta()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getnumero_cuenta();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getnumero_cuenta()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getnumero_cuenta() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.NUMEROCUENTA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getid_tipo_sangre().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_tipo_sangre()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_tipo_sangre()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_tipo_sangre().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getid_tipo_sangre()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getid_tipo_sangre().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.IDTIPOSANGRE,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t}", "Obligacion createObligacion();" ]
[ "0.5522898", "0.5294049", "0.5282163", "0.5253165", "0.5248756", "0.51164323", "0.51080626", "0.51016235", "0.5075916", "0.50254285", "0.5013765", "0.5010525", "0.5005644", "0.4958552", "0.49455518", "0.49385533", "0.49126902", "0.49054492", "0.48852134", "0.48744738", "0.487004", "0.48657772", "0.48481777", "0.48405138", "0.4834222", "0.48148063", "0.48120588", "0.48086536", "0.48033497", "0.48004878", "0.47953385", "0.47926968", "0.47857198", "0.47856614", "0.47819665", "0.47767848", "0.47342572", "0.4721234", "0.47162336", "0.4711295", "0.46993387", "0.46844113", "0.46798912", "0.4677451", "0.46761706", "0.46761706", "0.46761706", "0.46761706", "0.46761706", "0.466692", "0.46667942", "0.4659908", "0.46591908", "0.46559066", "0.46535888", "0.465045", "0.4648507", "0.46462098", "0.46448123", "0.46405467", "0.46367627", "0.4636106", "0.46357927", "0.46296746", "0.4624988", "0.46244386", "0.46140003", "0.4613645", "0.4612134", "0.46058553", "0.46033373", "0.4602018", "0.46015802", "0.45943686", "0.4594136", "0.4590336", "0.45873904", "0.45873168", "0.45839894", "0.4578935", "0.45786703", "0.45785457", "0.45767197", "0.4576221", "0.45713118", "0.4569718", "0.4564439", "0.4560269", "0.45555663", "0.45554602", "0.45481467", "0.45470452", "0.45427242", "0.4539021", "0.45383492", "0.4537346", "0.4535162", "0.45334813", "0.45327225", "0.45301718" ]
0.64587754
0
Metodo....: liberaIdProcesso Descricao.: Metodo para liberar o id do processo que terminou a escrita no log
public void liberaIdProcesso(long idProcesso, String compNegocio, String status) { logComponente(idProcesso,Definicoes.DEBUG,compNegocio,"FIM",status); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void liberarConexoesEmUso (long idProcesso) {\r\n this._delegate.liberarConexoesEmUso(idProcesso);\r\n }", "public void processEliminar() {\n }", "public com.opentext.bn.converters.avro.entity.ContentErrorEvent.Builder clearProcessId() {\n processId = null;\n fieldSetFlags()[8] = false;\n return this;\n }", "void desalocar(Processo processo) {\n for (int r = 0; r < size(); r++) {\n if (get(r).idProcesso == processo.getId()) {\n //TODO Marcar o bloco como livre\n get(r).espaçoUsado = 0;\n get(r).idProcesso = -1;\n }\n }\n }", "public Processo(String id, int tamProcesso) {\r\n\t\tthis.id = id;\r\n\t\tthis.tamProcesso = tamProcesso;\r\n\t\tpaginas = new ArrayList<>();\r\n\t}", "java.lang.String getProcessId();", "public void deletarConsumoHistoricoRETIRAR(Integer idImovel, int amFaturamento) throws ErroRepositorioException;", "public abstract long getProcessID();", "public void era (int idProcedimiento){\n // crear nuevo objeto Registro con el id correspondiente\n Registro registroNuevo = new Registro();\n registroNuevo.setIdentificadorProcedimiento(idProcedimiento);\n this.pilaEras.push(registroNuevo);\n }", "public Integer obterIdEmpresaPorRota(Rota rota) throws ErroRepositorioException;", "@PostMapping(\"/relatorioporidprocesso\")\n\tpublic ResponseEntity<List<Processos>> getProcessoIdprocesso(@RequestBody Processos objeto){\n\t\tList<Processos> lista = dao.findByIdprocesso(objeto.getIdprocesso());\n\t\tif(lista.size()==0) return ResponseEntity.status(404).build();\n\t\treturn ResponseEntity.ok(lista);\n\t\t\n\t}", "@PostMapping(\"/relatorioporidadvogado\")\n\tpublic ResponseEntity<List<Processos>> getProcessoIdadvogado(@RequestBody Processos objeto){\n\t\tList<Processos> lista = dao.findByAdvogadoIdadvogado(objeto.getAdvogado().getIdAdvogado());\n\t\tif(lista.size()==0) return ResponseEntity.status(404).build();\n\t\treturn ResponseEntity.ok(lista);\n\t\t\n\t}", "private static void removerProduto() throws Exception {\r\n int id;\r\n boolean erro, result;\r\n System.out.println(\"\\t** Remover produto **\\n\");\r\n System.out.print(\"ID do produto a ser removido: \");\r\n id = read.nextInt();\r\n if (indice_Produto_Cliente.lista(id).length != 0) {\r\n System.out.println(\"Esse produto não pode ser removido pois foi comprado por algum Cliente!\");\r\n } else {\r\n do {\r\n erro = false;\r\n System.out.println(\"\\nRemover produto?\");\r\n System.out.print(\"1 - SIM\\n2 - NÂO\\nR: \");\r\n switch (read.nextByte()) {\r\n case 1:\r\n result = arqProdutos.remover(id - 1);\r\n if (result) {\r\n System.out.println(\"Removido com sucesso!\");\r\n } else {\r\n System.out.println(\"Produto não encontrado!\");\r\n }\r\n break;\r\n case 2:\r\n System.out.println(\"\\nOperação Cancelada!\");\r\n break;\r\n default:\r\n System.out.println(\"\\nOpção Inválida!\\n\");\r\n erro = true;\r\n break;\r\n }\r\n } while (erro);\r\n }\r\n }", "public void deletaArquivoTextoRoteiroEmpresaDivisao(Integer idArquivoTextoRoteiroEmpresa) \n\t\tthrows ErroRepositorioException;", "void abortProcess(Long processInstanceId);", "public Integer pesquisarSequencialContaHistoricoBoleto(Integer idConta) throws ErroRepositorioException;", "public void processEnd();", "public com.opentext.bn.converters.avro.entity.DocumentEvent.Builder clearProcessId() {\n processId = null;\n fieldSetFlags()[18] = false;\n return this;\n }", "void eliminar(Long id);", "String getProcessInstanceID();", "public String getProcessID()\n {\n return processID;\n }", "public Collection verificarExtratoQuitacaoAnual(Integer idImovel, Integer amReferenciaConta) throws ErroRepositorioException;", "String getPid();", "public void deleteLogico(Long itemRetiradaId) {\n\t\tItemRetirada itemRetirada = this.repository.findById(itemRetiradaId).get();\n\t\tthis.itemService.atualizaEstoque(itemRetirada, Servico.ENTRADA);\n\t\tthis.repository.deleteLogico(itemRetiradaId);\n\t}", "@ResponseBody\n @ResponseStatus(HttpStatus.NO_CONTENT)\n @DeleteMapping(path = ProcessesApi.BASE_URL + \"/{id:.+}\")\n void undeployProcess(@PathVariable(\"id\") String id)\n throws ProcessNotFoundException, UndeletableProcessException;", "public void excluirConta(Integer idFaturamentoGrupo , Integer anoMesReferencia) throws ErroRepositorioException ;", "void kill(long procid);", "public String pesquisarNomeAgenteArrecadador(Integer idPagamentoHistorico) throws ControladorException {\r\n\r\n\t\tString nomeCliente = null;\r\n\r\n\t\ttry {\r\n\t\t\tString objetoNomeCliente = this.repositorioImovel.pesquisarNomeAgenteArrecadador(idPagamentoHistorico);\r\n\r\n\t\t\tif (objetoNomeCliente != null) {\r\n\r\n\t\t\t\tnomeCliente = objetoNomeCliente;\r\n\t\t\t}\r\n\t\t} catch (ErroRepositorioException ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t\tthrow new ControladorException(\"erro.sistema\", ex);\r\n\t\t}\r\n\r\n\t\treturn nomeCliente;\r\n\t}", "public void excluirClienteConta(Integer idFaturamentoGrupo , Integer anoMesReferencia) throws ErroRepositorioException ;", "@PostMapping(\"/relatorioporcliente\")\n\tpublic ResponseEntity<List<Processos>> getProcessoIdcliente(@RequestBody Processos objeto){\n\t\tList<Processos> lista = dao.findByClienteIdcli(objeto.getCliente().getIdcli());\n\t\tif(lista.size()==0) return ResponseEntity.status(404).build();\n\t\treturn ResponseEntity.ok(lista);\n\t\t\n\t}", "public static void libertarPagina(PCB processo) {\n\n for (Pagina pagina : Paginas) {\n if (processo.getPid() == pagina.getPagina_pid()) {\n pagina.setAlocado(false);\n pagina.setPagina_pid(-1);\n pagina.setEspacoVazio(VirtualMemory.tamanho_pagina);\n\n }\n }\n processo.setMemoriaOcupada(0);\n }", "public static void eliminarRegistros(){\n int idEliminar = Integer.parseInt(JOptionPane.showInputDialog(\"Igrese el ID a Eliminar\"));\n pd.eliminaraPersonas(idEliminar);\n }", "public void excluirContaImopostosDeduzidos(Integer idFaturamentoGrupo , Integer anoMesReferencia) throws ErroRepositorioException;", "public String getProcessId()\r\n\t{\r\n\t\treturn processId;\r\n\t}", "public void eliminar(Long id) throws AppException;", "public long getProcessID() {\n return processID;\n }", "public void eliminarTermino() {\n System.out.println(\"......................\");\n System.out.println(\"Eliminar Termino Academico\");\n int i = 1;\n Entrada entrada = new Entrada();\n for (Termino t : Termino.terminos) {\n System.out.println(i + \". \" + t);\n i++;\n }\n if (i != 1) {\n int opc;\n do {\n opc = entrada.Entera(\"Ingrese opcion(1-\" + (i - 1) + \"): \");\n if (!(opc >= 1 && opc <= (i - 1))) {\n System.out.println(\"opcion no valida\");\n }\n } while (!(opc >= 1 && opc <= (i - 1)));\n Termino.terminos.remove(opc - 1);\n System.out.println(\"Termino Eliminado\");\n } else {\n System.out.println(\"No existen terminos\");\n }\n }", "public void informarOcorrenciaCadastroAnormalidadeElo(String idImovel, String idOcorrenciaCadastro,\r\n\t\t\tString idAnormalidadeElo, String dataOcorrenciaCadastro, String dataAnormalidadeElo,\r\n\t\t\tbyte[] uploadPictureCadastro, byte[] uploadPictureAnormalidade, Usuario usuarioLogado,\r\n\t\t\tCollection colecaoIdCadastroOcorrenciaRemover, Collection colecaoIdAnormalidadeRemover)\r\n\t\t\tthrows ControladorException {\r\n\r\n\t\t// validando se o imovel existe na base\r\n\t\tif (this.verificarExistenciaImovel(new Integer(idImovel)) == 0) {\r\n\t\t\tthrow new ControladorException(\"atencao.imovel.inexistente\");\r\n\t\t}\r\n\r\n\t\t// validando se o imovel foi exclu�do\r\n\t\tImovel imovelDigitado = this.pesquisarImovelDigitado(new Integer(idImovel));\r\n\t\tif (imovelDigitado.getIndicadorExclusao() != null && imovelDigitado.getIndicadorExclusao().equals(\"1\")) {\r\n\t\t\tthrow new ControladorException(\"atencao.imovel.excluido\");\r\n\t\t}\r\n\r\n\t\t// validando se foi informado ocorrencia de cadastro ou anormalidade de\r\n\t\t// elo\r\n\t\tif ((idOcorrenciaCadastro == null || idOcorrenciaCadastro.equalsIgnoreCase(\"\"))\r\n\t\t\t\t&& (idAnormalidadeElo == null || idAnormalidadeElo.equalsIgnoreCase(\"\"))) {\r\n\t\t\tthrow new ControladorException(\"atencao.informe_ocorrencia_cadastro_anormalidade_elo\");\r\n\t\t}\r\n\r\n\t\t// instanciando o Objeto ImovelCadastroOcorrencia\r\n\t\tImovelCadastroOcorrencia imovelCadastroOcorrencia = new ImovelCadastroOcorrencia();\r\n\r\n\t\t// instanciando o Objeto ImovelEloAnormalidade\r\n\t\tImovelEloAnormalidade imovelEloAnormalidade = new ImovelEloAnormalidade();\r\n\r\n\t\t// ------------ REGISTRAR TRANSA��O ROTA----------------------------\r\n\t\tRegistradorOperacao registradorOperacao = new RegistradorOperacao(\r\n\t\t\t\tOperacao.OPERACAO_OCORRENCIA_ANORMALIDADE_INSERIR, imovelDigitado.getId(), imovelDigitado.getId(),\r\n\t\t\t\tnew UsuarioAcaoUsuarioHelper(usuarioLogado, UsuarioAcao.USUARIO_ACAO_EFETUOU_OPERACAO));\r\n\r\n\t\t// ------------ REGISTRAR TRANSA��O ROTA----------------------------\r\n\r\n\t\t/*\r\n\t\t * // ------------ REGISTRAR TRANSA��O ROTA----------------------------\r\n\t\t * RegistradorOperacao registradorOperacaoRota = new RegistradorOperacao(\r\n\t\t * Operacao.OPERACAO_OCORRENCIA_ANORMALIDADE_INSERIR, new\r\n\t\t * UsuarioAcaoUsuarioHelper(usuarioLogado,\r\n\t\t * UsuarioAcao.USUARIO_ACAO_EFETUOU_OPERACAO));\r\n\t\t * \r\n\t\t * Operacao operacao = new Operacao();\r\n\t\t * operacao.setId(Operacao.OPERACAO_OCORRENCIA_ANORMALIDADE_INSERIR);\r\n\t\t * \r\n\t\t * OperacaoEfetuada operacaoEfetuada = new OperacaoEfetuada();\r\n\t\t * operacaoEfetuada.setOperacao(operacao);\r\n\t\t * \r\n\t\t * imovelCadastroOcorrencia.setOperacaoEfetuada(operacaoEfetuada);\r\n\t\t * imovelCadastroOcorrencia.adicionarUsuario(usuarioLogado,\r\n\t\t * UsuarioAcao.USUARIO_ACAO_EFETUOU_OPERACAO);\r\n\t\t * registradorOperacaoRota.registrarOperacao(imovelCadastroOcorrencia);\r\n\t\t * \r\n\t\t * imovelEloAnormalidade.setOperacaoEfetuada(operacaoEfetuada);\r\n\t\t * imovelEloAnormalidade.adicionarUsuario(usuarioLogado,\r\n\t\t * UsuarioAcao.USUARIO_ACAO_EFETUOU_OPERACAO);\r\n\t\t * registradorOperacaoRota.registrarOperacao(imovelEloAnormalidade); //\r\n\t\t * ------------ REGISTRAR TRANSA��O ROTA----------------------------\r\n\t\t */\r\n\t\t// verifica se foi informado Ocorrencia de cadastro\r\n\t\tif (idOcorrenciaCadastro != null && !idOcorrenciaCadastro.equalsIgnoreCase(\"\")) {\r\n\r\n\t\t\t// Instancia o Objeto Imovel e setando o valor do Id preenchido\r\n\t\t\tImovel imovel = new Imovel();\r\n\t\t\timovel.setId(new Integer(idImovel));\r\n\r\n\t\t\t// setando o valor do Imovel do Objeto Principal\r\n\t\t\timovelCadastroOcorrencia.setImovel(imovel);\r\n\r\n\t\t\t// Instancia o Objeto CadastroOcorrencia e setando o valor do id\r\n\t\t\t// escolhido\r\n\r\n\t\t\tCadastroOcorrencia cadastroOcorrencia = new CadastroOcorrencia();\r\n\t\t\tcadastroOcorrencia.setId(new Integer(idOcorrenciaCadastro));\r\n\t\t\tFiltro filtro = cadastroOcorrencia.retornaFiltro();\r\n\t\t\tCollection<CadastroOcorrencia> collectionCadastroOcorrencia = getControladorUtil().pesquisar(filtro,\r\n\t\t\t\t\tCadastroOcorrencia.class.getName());\r\n\t\t\tcadastroOcorrencia = (CadastroOcorrencia) Util.retonarObjetoDeColecao(collectionCadastroOcorrencia);\r\n\r\n\t\t\t// setando o valor de Cadastro Ocorrencia do Objeto Principal\r\n\t\t\timovelCadastroOcorrencia.setCadastroOcorrencia(cadastroOcorrencia);\r\n\r\n\t\t\t// setando a data da ocorrencia do cadastro\r\n\t\t\tif (dataOcorrenciaCadastro != null && !dataOcorrenciaCadastro.equalsIgnoreCase(\"\")) {\r\n\r\n\t\t\t\tCalendar data = Calendar.getInstance();\r\n\r\n\t\t\t\tdata.setTime(Util.converteStringParaDate(dataOcorrenciaCadastro));\r\n\r\n\t\t\t\tif (data.get(Calendar.YEAR) < 1985) {\r\n\t\t\t\t\tthrow new ControladorException(\"atencao.data.ocorrencia.nao.inferior.1985\");\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (data.getTime().after(new Date())) {\r\n\t\t\t\t\t\tthrow new ControladorException(\"atencao.data_inicio_ocorrencia\");\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\timovelCadastroOcorrencia.setDataOcorrencia(Util.converteStringParaDate(dataOcorrenciaCadastro));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// setando a foto da ocorrencia do cadastro\r\n\t\t\tif (uploadPictureCadastro != null) {\r\n\t\t\t\timovelCadastroOcorrencia.setFotoOcorrencia(uploadPictureCadastro);\r\n\t\t\t}\r\n\r\n\t\t\t// setando a data/hora no campo Ultima Alteracao\r\n\t\t\timovelCadastroOcorrencia.setUltimaAlteracao(new Date());\r\n\r\n\t\t\tregistradorOperacao.registrarOperacao(imovelCadastroOcorrencia);\r\n\r\n\t\t\t// Remove as ocorrencias do imovel.\r\n\t\t\tif (colecaoIdCadastroOcorrenciaRemover != null && !colecaoIdCadastroOcorrenciaRemover.equals(\"\")) {\r\n\r\n\t\t\t\tIterator iteratorColecaoImovelCadastroOcorrencia = colecaoIdCadastroOcorrenciaRemover.iterator();\r\n\r\n\t\t\t\twhile (iteratorColecaoImovelCadastroOcorrencia.hasNext()) {\r\n\t\t\t\t\tImovelCadastroOcorrencia imovelcadOcorrencia = (ImovelCadastroOcorrencia) iteratorColecaoImovelCadastroOcorrencia\r\n\t\t\t\t\t\t\t.next();\r\n\t\t\t\t\tgetControladorUtil().remover(imovelcadOcorrencia);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Remove as anormalidades do imovel.\r\n\t\t\tif (colecaoIdAnormalidadeRemover != null && !colecaoIdAnormalidadeRemover.equals(\"\")) {\r\n\r\n\t\t\t\tIterator iteratorColecaoIdAnormalidade = colecaoIdAnormalidadeRemover.iterator();\r\n\r\n\t\t\t\twhile (iteratorColecaoIdAnormalidade.hasNext()) {\r\n\t\t\t\t\tImovelEloAnormalidade imoveleloAnormalidade = (ImovelEloAnormalidade) iteratorColecaoIdAnormalidade\r\n\t\t\t\t\t\t\t.next();\r\n\t\t\t\t\tgetControladorUtil().remover(imoveleloAnormalidade);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// inserindo no banco\r\n\t\t\tgetControladorUtil().inserir(imovelCadastroOcorrencia);\r\n\t\t}\r\n\r\n\t\t// verifica se foi informado Anormalidade de Elo\r\n\t\tif (idAnormalidadeElo != null && !idAnormalidadeElo.equalsIgnoreCase(\"\")) {\r\n\r\n\t\t\t// Instancia o Objeto Imovel e setando o valor do Id preenchido\r\n\t\t\tImovel imovel = new Imovel();\r\n\t\t\timovel.setId(new Integer(idImovel));\r\n\r\n\t\t\t// setando o valor do Imovel do Objeto Principal\r\n\t\t\timovelEloAnormalidade.setImovel(imovel);\r\n\r\n\t\t\t// Instancia o Objeto CadastroOcorrencia e setando o valor do id\r\n\t\t\t// escolhido\r\n\t\t\tEloAnormalidade eloAnormalidade = new EloAnormalidade();\r\n\t\t\teloAnormalidade.setId(new Integer(idAnormalidadeElo));\r\n\t\t\tFiltro filtro = eloAnormalidade.retornaFiltro();\r\n\t\t\tCollection<EloAnormalidade> collectionEloAnormalidade = getControladorUtil().pesquisar(filtro,\r\n\t\t\t\t\tEloAnormalidade.class.getName());\r\n\t\t\teloAnormalidade = (EloAnormalidade) Util.retonarObjetoDeColecao(collectionEloAnormalidade);\r\n\r\n\t\t\t// setando o valor de Cadastro Ocorrencia do Objeto Principal\r\n\t\t\timovelEloAnormalidade.setEloAnormalidade(eloAnormalidade);\r\n\r\n\t\t\t// setando a data da ocorrencia do cadastro\r\n\t\t\tif (dataAnormalidadeElo != null && !dataAnormalidadeElo.equalsIgnoreCase(\"\")) {\r\n\r\n\t\t\t\tCalendar data = Calendar.getInstance();\r\n\r\n\t\t\t\tdata.setTime(Util.converteStringParaDate(dataAnormalidadeElo));\r\n\r\n\t\t\t\tif (data.get(Calendar.YEAR) < 1985) {\r\n\t\t\t\t\tthrow new ControladorException(\"atencao.data.anormalidade.nao.inferior.1985\");\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (data.getTime().after(new Date())) {\r\n\t\t\t\t\t\tthrow new ControladorException(\"atencao.data_inicio_anormalidade\");\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\timovelEloAnormalidade.setDataAnormalidade(Util.converteStringParaDate(dataAnormalidadeElo));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// setando a foto da ocorrencia do cadastro\r\n\t\t\tif (uploadPictureAnormalidade != null) {\r\n\t\t\t\timovelEloAnormalidade.setFotoAnormalidade(uploadPictureAnormalidade);\r\n\t\t\t}\r\n\r\n\t\t\t// Remove as ocorrencias do imovel.\r\n\t\t\tif (colecaoIdCadastroOcorrenciaRemover != null && !colecaoIdCadastroOcorrenciaRemover.equals(\"\")) {\r\n\r\n\t\t\t\tIterator iteratorColecaoImovelCadastroOcorrencia = colecaoIdCadastroOcorrenciaRemover.iterator();\r\n\r\n\t\t\t\twhile (iteratorColecaoImovelCadastroOcorrencia.hasNext()) {\r\n\t\t\t\t\tImovelCadastroOcorrencia imovelcadOcorrencia = (ImovelCadastroOcorrencia) iteratorColecaoImovelCadastroOcorrencia\r\n\t\t\t\t\t\t\t.next();\r\n\t\t\t\t\tgetControladorUtil().remover(imovelcadOcorrencia);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Remove as anormalidades do imovel.\r\n\t\t\tif (colecaoIdAnormalidadeRemover != null && !colecaoIdAnormalidadeRemover.equals(\"\")) {\r\n\r\n\t\t\t\tIterator iteratorColecaoIdAnormalidade = colecaoIdAnormalidadeRemover.iterator();\r\n\r\n\t\t\t\twhile (iteratorColecaoIdAnormalidade.hasNext()) {\r\n\t\t\t\t\tImovelEloAnormalidade imoveleloAnormalidade = (ImovelEloAnormalidade) iteratorColecaoIdAnormalidade\r\n\t\t\t\t\t\t\t.next();\r\n\t\t\t\t\tgetControladorUtil().remover(imoveleloAnormalidade);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// setando a data de ultima alteracao\r\n\t\t\timovelEloAnormalidade.setUltimaAlteracao(new Date());\r\n\r\n\t\t\tregistradorOperacao.registrarOperacao(imovelEloAnormalidade);\r\n\t\t\t// inserindo no banco\r\n\t\t\tgetControladorUtil().inserir(imovelEloAnormalidade);\r\n\t\t}\r\n\t}", "void endProcess()\n throws RemoteException;", "public String getModuleId() throws BaseTechnicalError, RemoteException {\n\t return JazzQAConstants.MODULE_PEDVALIDACAO;\n\t}", "public void permisoEscribir(int idEscritor) throws InterruptedException;", "@PostMapping(\"/relatorioporidclientenomecliente\")\n\tpublic ResponseEntity<List<Processos>> getProcessoIdclienteNomecliente(@RequestBody Processos objeto){\n\t\tList<Processos> lista = dao.findByClienteIdcliAndClienteNomecli(objeto.getCliente().getIdcli(), objeto.getCliente().getNomecli());\n\t\tif(lista.size()==0) return ResponseEntity.status(404).build();\n\t\treturn ResponseEntity.ok(lista);\n\t\t\n\t}", "private void registroErroneo(InterfazParams interfazParams) {\n\t\tLong registrosErroneos = (Long) interfazParams.getQueryParams().get(\n\t\t\t\t\"registrosErroneos\");\n\t\tregistrosErroneos = new Long(registrosErroneos.longValue() + 1);\n\t\tinterfazParams.getQueryParams().put(\"registrosErroneos\",\n\t\t\t\tregistrosErroneos);\n\t}", "public int endproc(){\n Registro registroAuxiliar = pilaRegistros.pop();\n Procedimiento procActual = this.directorioProcedimientos.obtenerProcedimientoPorId(registroAuxiliar.getIdentificadorProcedimiento());\n for (int i=0; i<procActual.getIndicadorPorReferencia().size(); i++){\n if (procActual.getIndicadorPorReferencia().get(i)){\n int direccionParametroLocal = procActual.getDireccionParametros().get(i);\n int direccionArgumento = procActual.getFilaDireccionesLlamada().peek().get(i);\n String valorParametroLocal = registroAuxiliar.getValor(direccionParametroLocal);\n this.pilaRegistros.peek().guardaValor(direccionArgumento,valorParametroLocal);\n }\n }\n System.out.println(procActual.getFilaDireccionesLlamada().peek());\n try {\n procActual.getFilaDireccionesLlamada().remove();\n } catch (Exception e){\n e.printStackTrace();\n }\n\n return registroAuxiliar.getDireccionRetorno();\n }", "@Override \n public void commandKill(int id) {\n\n }", "public ProcessEntity findUnClosedProcessId(Connection conn, String openId)\r\n/* 37: */ throws SQLException\r\n/* 38: */ {\r\n/* 39: 63 */ return this.dao.findUnClosedProcessId(conn, openId);\r\n/* 40: */ }", "@Override\r\n\tpublic int elimina(int id) throws Exception {\n\t\treturn 0;\r\n\t}", "@PostMapping(\"/relatorioporidclienteidprocessodataabertura\")\n\tpublic ResponseEntity<List<Processos>> getProcessoIdclienteIdprocessoDataabertura(@RequestBody Processos objeto){\n\t\tList<Processos> lista = dao.findByClienteIdcliAndIdprocessoAndDtinicio(objeto.getCliente().getIdcli(), objeto.getIdprocesso(), objeto.getDataAbertura());\n\t\tif(lista.size()==0) return ResponseEntity.status(404).build();\n\t\treturn ResponseEntity.ok(lista);\n\t\t\n\t}", "public void setNumeroId(String NumeroId) {\r\n this.NumeroId = NumeroId;\r\n }", "@PostMapping(\"/relatorioporidclientedataabertura\")\n\tpublic ResponseEntity<List<Processos>> getProcessoIdclienteDataabertura(@RequestBody Processos objeto){\n\t\tList<Processos> lista = dao.findByClienteIdcliAndDtinicio(objeto.getCliente().getIdcli(), objeto.getDataAbertura());\n\t\tif(lista.size()==0) return ResponseEntity.status(404).build();\n\t\treturn ResponseEntity.ok(lista);\n\t\t\n\t}", "public java.lang.String getProcessId() {\n return processId;\n }", "public java.lang.String getProcessId() {\n return processId;\n }", "private String getIdioma()\n throws MareException\n {\n\t\tLong idioma = UtilidadesSession.getIdioma(this);\n\t\treturn idioma.toString();\n }", "private String getIdRequisitante(long numOrdem)\n\t{\n\t\treturn procBatchPOA.getUserIDRequisitante(numOrdem);\n\t}", "public void addProcessPid() throws JNCException {\n setLeafValue(Epc.NAMESPACE,\n \"process-pid\",\n null,\n childrenNames());\n }", "@Override\r\n\t\t\tpublic void autEndProcess() {\n\t\t\t}", "@Override\r\n\t\t\tpublic void autEndProcess() {\n\t\t\t}", "public void removeRafProcess(RafProcess rafProcess);", "private void setProcessId(int value) {\n\t\tthis.processId = value;\n\t}", "public static final int getProcessId() {\n\t\treturn ID;\n\t}", "public void markProcessPidDelete() throws JNCException {\n markLeafDelete(\"processPid\");\n }", "public void setProcessId(String processId)\r\n\t{\r\n\t\tthis.processId = processId;\r\n\t}", "@Override\r\n\tpublic Celular buscarPeloId(String id) throws Exception {\n\t\treturn null;\r\n\t}", "@Override\r\n\t\t\t\tpublic void autEndProcess() {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void autEndProcess() {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\n public int detener(){\n \n try {\n Process proceso;\n proceso = Runtime.getRuntime().exec(\"/etc/init.d/\"+nombreServicio+\" stop\");\n InputStream is = proceso.getInputStream(); \n BufferedReader buffer = new BufferedReader (new InputStreamReader (is));\n String resultado = buffer.readLine();\n \n if(resultado.contains(\"Stopping \"+nombreServicio)){\n return 1;\n }\n } \n catch (IOException ex) {\n Logger.getLogger(Servicio.class.getName()).log(Level.SEVERE, null, ex);\n }\n return 0;\n }", "@Override\n\tpublic void eliminar(Integer id) {\n\t\t\n\t}", "@Override\n\tpublic void eliminar(Integer id) {\n\t\t\n\t}", "com.google.protobuf.ByteString getProcessIdBytes();", "public void deletarArquivoTextoRoteiroEmpresa(Integer idArquivoTextoRoteiroEmpresa)\n\t\t\tthrows ErroRepositorioException;", "public com.opentext.bn.converters.avro.entity.ContentErrorEvent.Builder setProcessId(java.lang.String value) {\n validate(fields()[8], value);\n this.processId = value;\n fieldSetFlags()[8] = true;\n return this;\n }", "public ConProcess getById(int id) throws AppException;", "@Override\r\n\t\t\tpublic void autEndProcess() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void autEndProcess() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void autEndProcess() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void autEndProcess() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void autEndProcess() {\n\t\t\t\t\r\n\t\t\t}", "protected void removerContato(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\tString id = request.getParameter(\"id\");\n\t\t// System.out.println(id);//teste de recebimento do ID\n\n\t\t// evio do ID - Send ID\n\t\tcontato.setId(id);\n\t\t// executando a exclusão - execute\n\t\tdao.deletarContato(contato);\n\t\t// redirecionar para agenda.jsp - redirect to agenda.jsp\n\t\tresponse.sendRedirect(\"main\");\n\n\t}", "String getExecId();", "public java.lang.String getProcessId() {\n return processId;\n }", "public java.lang.String getProcessId() {\n return processId;\n }", "protected static void saveLastEntityIdProcessed(long id)\n\t{\n\t}", "public String getUniqueProcessId() {\n\t\treturn uniqueProcessId;\n\t}", "process finishService ();", "void eliminarPedido(UUID idPedido);", "public void markProcessPidReplace() throws JNCException {\n markLeafReplace(\"processPid\");\n }", "public int buscar_usuario_id(VOUsuario usu) throws RemoteException {\n int linea=-1;\n int id=Integer.parseInt(usu.getId());\n try {\n FileReader fr = new FileReader(datos);\n BufferedReader entrada = new BufferedReader(fr);\n String s, texto=\"\";\n int n, num, l=0;\n boolean encontrado=false;\n while((s = entrada.readLine()) != null && !encontrado) {\n\n texto=s;\n n=texto.indexOf(\" \");\n texto=texto.substring(0, n);\n num=Integer.parseInt(texto);\n\n if(num==id) {\n encontrado=true;\n linea=l;\n }\n l++;\n }\n entrada.close();\n } catch (FileNotFoundException e) {\n System.err.println(\"FileStreamsTest: \" + e);\n } catch (IOException e) {\n System.err.println(\"FileStreamsTest: \" + e);\n }\n return linea;\n }", "public synchronized void yeetProcess(Process p){\n pros.remove(p.getId());\n freshSort();\n }", "public Short pesquisarIndicadorBloqueioAlteracaoContaMotivoRevisao(Integer idContaMotivoRevisao)\n\t\t\tthrows ErroRepositorioException;", "public String obtemOponente(Integer idJogador) throws RemoteException;", "void deletar(Long id);", "public void carroRemovido(){\n System.out.println(\"Su carro fue removido exitosamente\");\n }", "public void End(int id);", "public int zeraJogador(Integer idJogador) throws RemoteException;", "public int getIdPreventivo() {\n return idPreventivo;\n }", "public void deletar(Integer id) {\n\t\t\n\t}", "@Override\n public String getId(@Nonnull IRI iri) {\n\n Preconditions.checkNotNull(iri, \"Default pid uri must not be null.\");\n Preconditions.checkState(iri.toString().contains(\"#\"), \"Not an valid default pid uri.\");\n String id = null;\n String uri = iri.toString();\n id = uri.substring(uri.lastIndexOf('#') + 1);\n return id;\n }", "@DELETE\n @Path(\"{id:\\\\d+}\")\n public String eliminarProductora(@PathParam(\"id\") Long id) throws BusinessLogicException {\n LOGGER.log(Level.INFO, \"ProdcutoraResource eliminarcategoria: input: {0}\", id);\n CategoriaEntity entity = categoriaLogic.getCategoria(id);\n if (entity == null) {\n throw new WebApplicationException(\"El recurso /productoras/\" + id + \" no existe.\", 404);\n }\n categoriaLogic.borrarCategoria(id);\n LOGGER.info(\"ProduccionResource eliminarProduccion: output: void\");\n return \"Se borro exitosamente la categoria con id: \" + id;\n }", "public Integer Excluir(int ID){\n\n //EXCLUINDO REGISTRO E RETORNANDO O NÚMERO DE LINHAS AFETADAS\n return databaseUtil.GetConexaoDataBase().delete(\"tb_log\",\"log_ID = ?\", new String[]{Integer.toString(ID)});\n }", "public String doDeleteProcessBean() throws Exception\n\t{\n\t\tif(this.processId != null)\n\t\t{\n\t\t\tProcessBean pb = ProcessBean.getProcessBean(ImportRepositoryAction.class.getName(), processId);\n\t\t\tif(pb != null)\n\t\t\t\tpb.removeProcess();\n\t\t}\n\t\t\n\t\treturn \"successRedirectToProcesses\";\n\t}" ]
[ "0.7025565", "0.55535614", "0.5534971", "0.5534334", "0.55267334", "0.544433", "0.5413949", "0.5360641", "0.5315324", "0.531212", "0.53026193", "0.5302534", "0.5276599", "0.52530044", "0.52351403", "0.52318776", "0.52177566", "0.52020335", "0.5187457", "0.518622", "0.5181265", "0.5160988", "0.5144623", "0.5133083", "0.5115288", "0.5104754", "0.5084813", "0.5082624", "0.50780326", "0.5065483", "0.5057851", "0.5050087", "0.50457644", "0.50450146", "0.50422144", "0.50361466", "0.5031633", "0.50303257", "0.5020258", "0.50107735", "0.50102925", "0.50089407", "0.5005667", "0.5003816", "0.4998308", "0.49959576", "0.49821013", "0.49799913", "0.49799013", "0.4978045", "0.49725845", "0.49725845", "0.49661347", "0.49463964", "0.49446994", "0.4942336", "0.4942336", "0.49323195", "0.4928788", "0.49181056", "0.4917418", "0.49142605", "0.49036884", "0.4898645", "0.4898645", "0.48910856", "0.48868215", "0.48868215", "0.48860547", "0.48804986", "0.48768336", "0.48767418", "0.48753196", "0.48753196", "0.48753196", "0.48753196", "0.48753196", "0.48740542", "0.4868616", "0.48669678", "0.48669678", "0.4857607", "0.48551527", "0.48474526", "0.48380986", "0.48240513", "0.4814532", "0.4809715", "0.48014593", "0.4783464", "0.4778282", "0.47732857", "0.47676888", "0.47662607", "0.47594956", "0.47593573", "0.47491723", "0.47478107", "0.47394115", "0.47391206" ]
0.69193435
1
Metodo....: log Descricao.: Grava uma linha no arquivo de LOG para log de classes do sistema
public void log(long idProcesso, int aTipo, String aClasse, String aMetodo, String aMensagem) { StringBuffer mensagemFinal = new StringBuffer("<Servidor> ").append(getHostName()); mensagemFinal.append(" <ID> ").append(idProcesso); mensagemFinal.append(" <Metodo> ").append(aMetodo); mensagemFinal.append(" <Mensagem> ").append(aMensagem); registraLog(aTipo,mensagemFinal.toString()); mensagemFinal = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void log(String line);", "void log(String source, String line);", "private void logToFile() {\n }", "abstract protected String getLogFileName();", "IFileLogger log();", "abstract void initiateLog();", "public void writeLog() {\n\n\t}", "public void writeLog() {\n\n\t}", "public void writeLog() {\n\n\t}", "void setLogFile(File log);", "protected GerentePoolLog(Class ownerClass)\n {\n\t\tArquivoConfiguracaoGPP arqConf = ArquivoConfiguracaoGPP.getInstance();\n\t\t//Define o nome e a porta do servidor q serao utilizados no LOG\n\t\thostName = arqConf.getEnderecoOrbGPP() + \":\" + arqConf.getPortaOrbGPP();\n\n\t\t/* Configura o LOG4J com as propriedades definidas no arquivo\n\t\t * de configuracao do GPP\n\t\t */\n\t\t\n\t\tPropertyConfigurator.configure(arqConf.getConfiguracaoesLog4j());\n\t\t//Inicia a instancia do Logger do LOG4J\n\t\tlogger = Logger.getLogger(ownerClass);\n\t\tlog(0,Definicoes.DEBUG,\"GerentePoolLog\",\"Construtor\",\"Iniciando escrita de Log do sistema GPP...\");\n }", "private Log() {\r\n readFile(\"Save.bin\",allLogs);\r\n readFile(\"Tag.bin\", allTags);\r\n readFile(\"Password.bin\", userInfo);\r\n }", "private Log() {\r\n\t}", "public void log(String txt);", "void log();", "public void log(long idProcesso, int aTipo, String aClasse, String aMetodo, String aMensagem)\n\t{\n\t\tString mensagemFinal = \"<Servidor> \" + this.hostName; \n\t\tmensagemFinal = mensagemFinal + \" <ID> \" + idProcesso;\n\t\tmensagemFinal = mensagemFinal + \" <CL> \" + aClasse;\n\t\tmensagemFinal = mensagemFinal + \" <ME> \" + aMetodo;\n\t\tmensagemFinal = mensagemFinal + \" <Mensagem> \" + aMensagem;\n\t\t\n\t\tregistraLog(aTipo,mensagemFinal);\n\t}", "public String getLog();", "@Override\n public void log()\n {\n }", "public static void main(String[] args){\n\n String clazz = Thread.currentThread().getStackTrace()[1].getClassName();\n String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();\n int lineNumber = Thread.currentThread().getStackTrace()[1].getLineNumber();\n System.out.println(\"class:\"+ clazz+\",method:\"+methodName+\",lineNum:\"+lineNumber);\n\n System.out.println(LogBox.getInstance().getClassName());\n System.out.println(LogBox.getRuntimeClassName());\n System.out.println(LogBox.getRuntimeMethodName());\n System.out.println(LogBox.getRuntimeLineNumber());\n System.out.println();\n System.out.println(LogBox.getTraceInfo());\n }", "Path getLogFilePath();", "public void generateLogFile() {\n\t\tFileOperations operator = new FileOperations(path);\n\t\toperator.writeFile(buildLogContent());\n\t}", "void log() {\n\t\tm_drivetrain.log();\n\t\tm_forklift.log();\n\t}", "void log(Log log);", "Logger getLog(Class clazz);", "private TypicalLogEntries() {}", "Appendable getLog();", "String getLogHandled();", "public static void main(String []args) {\n\t\tlog.trace(\"111---\");\n\t\tlog.debug(\"2222\");\n\t\tlog.info(\"333\");\n\t\tlog.warn(\"444\");\n\t\tlog.error(\"555\");\n\t}", "public MyLogs() {\n }", "private void processLog(File log) {\n BufferedReader in = null;\r\n ArrayList<String> list = new ArrayList<String>();\r\n String lastFrom = \"\";\r\n try {\r\n in = new BufferedReader(new FileReader(log));\r\n String line;\r\n while((line = in.readLine()) != null) {\r\n // lineNum++;\r\n if(line.contains(\"FROM\")) {\r\n // Start over at each FROM, leaving the last one and what\r\n // follows\r\n list.clear();\r\n list.add(line);\r\n lastFrom = line;\r\n } else if(line.contains(\"TO\")) {\r\n list.add(line);\r\n }\r\n }\r\n in.close();\r\n Data data = new Data(log.getName(), lastFrom);\r\n results.add(data);\r\n System.out.printf(\"%s\\n\", log.getName());\r\n for(String item : list) {\r\n System.out.printf(\" %s\\n\", item);\r\n }\r\n } catch(Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n }", "protected Log getLog()\n/* */ {\n/* 59 */ return log;\n/* */ }", "LogFile(File file)\n {\n this.file = file;\n }", "void setupFileLogging();", "public void analizarArchivoDeLog(String nombreArchivo)\n {\n archivoLog.clear();\n try{\n File log = new File(nombreArchivo);\n Scanner sc = new Scanner(log);\n while (sc.hasNextLine()) {\n String linea = sc.nextLine();\n String[] arrayDeString = linea.split(\" \");\n archivoLog.add(new Acceso (Integer.parseInt(arrayDeString[0]),Integer.parseInt(arrayDeString[1]),Integer.parseInt(arrayDeString[2]),Integer.parseInt(arrayDeString[3]),Integer.parseInt(arrayDeString[4])));\n }\n sc.close();\n }\n\n catch (FileNotFoundException e){\n e.printStackTrace();\n }\n }", "void initializeLogging();", "@Override\n public void log(Class<?> clazz, String message,Object... bizObjects) {\n Logger.i(clazz.getSimpleName(),message);\n }", "@Override\n\tpublic String getLogFileName() {\n\t\treturn model.getLogFileName();\n\t}", "static public final void ccLogln(String pxLine){\n ccLogln(pxLine, null);\n }", "private Log() {\n }", "private void logika_rozpocznij(){\n\t}", "public AcideLogTab() {\r\n\r\n\t\t// Gets the file content\r\n\t\t_logFileContent = AcideFileManager.getInstance().load(LOG_FILE_PATH);\r\n\r\n\t\tif (_logFileContent != null) {\r\n\r\n\t\t\t// Creates the lexicon configuration\r\n\t\t\tAcideLexiconConfiguration lexiconConfiguration = new AcideLexiconConfiguration();\r\n\r\n\t\t\t// Loads the lexicon configuration by default\r\n\t\t\tlexiconConfiguration.load(AcideLexiconConfiguration.DEFAULT_PATH\r\n\t\t\t\t\t+ AcideLexiconConfiguration.DEFAULT_NAME);\r\n\r\n\t\t\t// Creates the current grammar configuration\r\n\t\t\tAcideGrammarConfiguration currentGrammarConfiguration = new AcideGrammarConfiguration();\r\n\r\n\t\t\t// Sets the current grammar configuration path\r\n\t\t\tcurrentGrammarConfiguration\r\n\t\t\t\t\t.setPath(AcideGrammarConfiguration.DEFAULT_FILE);\r\n\r\n\t\t\t// Creates the previous grammar configuration\r\n\t\t\tAcideGrammarConfiguration previousGrammarConfiguration = new AcideGrammarConfiguration();\r\n\r\n\t\t\t// Sets the previous grammar configuration path\r\n\t\t\tpreviousGrammarConfiguration\r\n\t\t\t\t\t.setPath(AcideGrammarConfiguration.DEFAULT_FILE);\r\n\r\n\t\t\t// Updates the tabbed pane in the file editor manager\r\n\t\t\tAcideMainWindow\r\n\t\t\t\t\t.getInstance()\r\n\t\t\t\t\t.getFileEditorManager()\r\n\t\t\t\t\t.updateTabbedPane(\"Log\", _logFileContent, false,\r\n\t\t\t\t\t\t\tAcideProjectFileType.NORMAL, 0, 0, 1,\r\n\t\t\t\t\t\t\tlexiconConfiguration, currentGrammarConfiguration,\r\n\t\t\t\t\t\t\tpreviousGrammarConfiguration);\r\n\t\t}\r\n\t}", "Logger loggerArrangement(String logName, String filePath, LogeLevel logLevel);", "public static void dumpLog() {\n\t\t\n\t\tif (log == null) {\n\t\t\t// We have no log! We must be accessing this entirely statically. Create a new log. \n\t\t\tnew Auditor(); // This will create the log for us. \n\t\t}\n\n\t\t// Try to open the log for writing.\n\t\ttry {\n\t\t\tFileWriter logOut = new FileWriter(log);\n\n\t\t\t// Write to the log.\n\t\t\tlogOut.write( trail.toString() );\n\n\t\t\t// Close the log writer.\n\t\t\tlogOut.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t// Close the log file itself.\n\t\t// Apparently we can't? TODO: Look into this. \n\n\t}", "public void logClassPath() {\n\n log.info(\"Classpath of JVM on \" + HostUtils.getLocalHostIP() + \": \\n\" + getClassPathDescription());\n }", "public Log() {\n cadenas = new Vector<String>();\n }", "public void logData(){\n }", "public String get_log(){\n }", "public void dumpLog(String filename){\n }", "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}", "public void imprimir(String log){\n System.out.println(log);\n\n }", "private void addLog(String log) {\n LogHelper.addIdentificationLog(log);\n }", "public static void main(String[] args) throws FileNotFoundException {\n\n Logger file = new Logger(\"/home/vladimir/text.txt\");\n\n file.log(\"dikie sobaki\");\n file.end();\n\n\n }", "@Override\n\tpublic void writeToLog(String log, LogLevelEnum logLevel, String className) {\n\t\tSystem.out.println(className + \" : \" + logLevel.toString() + \" : \" + log);\n\t}", "public SystemLog () {\r\n\t\tsuper();\r\n\t}", "@Override\n public void logs() {\n \n }", "public Log()\n {\n filePath = String.format(\"log-%d.sl\", System.currentTimeMillis());\n\n open();\n }", "private void log(String l) {\n if (LOG) {\n System.out.println(\"RotationMatrixTest.\" + l);\n }\n }", "public void log(String logThis){\n\t\t\n\t\t DateFormat df = new SimpleDateFormat(\"MM/dd/yyyy HH:mm:ss\");\n\t Date today = Calendar.getInstance().getTime();\n\t String reportDate = df.format(today);\n\t\t\n\t\t\t{\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\tFile log = new File(\"C:\\\\Users\\\\Student\\\\Downloads\\\\m1-java-capstone-vending-machine-A-Copy\\\\m1-java-capstone-vending-machine\\\\Log.txt\");\t\n\t\t\t\tBufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(log, true));\n\n\t\t bufferedWriter.write(reportDate + \"||\" + logThis);\n\t\t bufferedWriter.newLine();\n\n\t\t bufferedWriter.close();\n\t\t\t\t\n\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\t\n\t\t}\n\t\t\t\n\t}", "public interface ILog {\n /**\n * 打印日志\n * @param L 虚拟机地址,可通过 {@link org.luaj.vm2.Globals#getGlobalsByLState(long)}获取\n */\n void l(long L, String tag, String log);\n\n /**\n * 打印错误日志\n * @param L 虚拟机地址,可通过 {@link org.luaj.vm2.Globals#getGlobalsByLState(long)}获取\n */\n void e(long L, String tag, String log);\n}", "public static void main(String[] args) {\n\t\t\n\t\tlogger.trace(\"Trace\");\n\t\tlogger.debug(\"Debug\");\n\t\tlogger.info(\"Info\");\n\t\tlogger.warn(\"Warn\");\n\t\tlogger.error(\"Error\");\n\t\tlogger.fatal(\"Fatal\");\n\t\t\n\t\t//AnotherClass.method();\n\t\t\n\t}", "public void recordLog(){\r\n\t\tthis.finishLog(resourceFiles.getString(\"PathHepparIITestDirectory\") + \"/\" + TEST_FILE_NAME); \r\n\t}", "@Override\n\t\t\t\t\t\t\tpublic void log(String msg, int level, Date date, StackTraceElement trace) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}", "ClassLoaderLogInfo getClassLoaderLogInfo();", "private static void _logInfo ()\n {\n System.err.println (\"Logging is enabled using \" + log.getClass ().getName ());\n }", "public static void loadLogFile() throws Exception {\n ConfigManager cm = ConfigManager.getInstance();\n cm.add(\"accuracytests\" + File.separator + \"Logging.xml\");\n cm.add(\"Config.xml\");\n }", "public LogX() {\n\n }", "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}", "public static void log(String line) {\r\n\t\tcitiesLogger.info(line);\r\n\t}", "public void setLog(String log)\r\n\t{\r\n\t\tcombatLog = log;\r\n\t}", "public static void log(Class clz, String message){\n if(logging){\n String tag = clz.getName();\n android.util.Log.d(tag, message);\n }\n }", "@Override\n public void log(String message) {\n }", "String getLogStackTrace();", "public void serializeLogs();", "private static void defineLogger() {\n HTMLLayout layout = new HTMLLayout();\n DailyRollingFileAppender appender = null;\n try {\n appender = new DailyRollingFileAppender(layout, \"/Server_Log/log\", \"yyyy-MM-dd\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n logger.addAppender(appender);\n logger.setLevel(Level.DEBUG);\n }", "public SecurityLog()\n {\n String fileName = \"Log.txt\";\n File output = new File(fileName);\n if(output.exists())\n readFile(fileName);\n }", "private static void createLogFile() {\n try {\n String date = new Date().toString().replaceAll(\":\", \"-\");\n logFile = new FileWriter(\"bio-formats-test-\" + date + \".log\");\n TestLogger log = new TestLogger(logFile);\n LogTools.setLog(log);\n }\n catch (IOException e) { }\n }", "public void viewLogs() {\n\t}", "public static void logLayout(StructuredFile log)\n\t{\n\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}", "public String getRunLog();", "public void setLogUtilities(LogUtilities log) { this.log = log; }", "@Override\n public Logger getLog(Class clazz) {\n return new Slf4jLogger(LoggerFactory.getLogger(clazz));\n }", "void saveLog(LogInfo logText);", "public final void toLogFile() {\n\t\tRetroTectorEngine.toLogFile(\"Error message from \" + THESTRINGS[0] + \":\");\n\t\tfor (int i=1; i<THESTRINGS.length; i++) {\n\t\t\tRetroTectorEngine.toLogFile(THESTRINGS[i]);\n\t\t}\n\t}", "private void loggerEinrichten() {\n\t\tlogger.setLevel(Level.INFO);\n//\t\tHandler handler = new FileHandler(\"/home/programmieren/TestFiles/iCalender/temp.log\");\n\t\tHandler handler = new ConsoleHandler();\n\t\thandler.setLevel(Level.FINEST);\n\t\thandler.setFormatter(new Formatter() {\n\t\t\t@Override\n\t\t\tpublic String format(LogRecord record) {\n\t\t\t\treturn record.getSourceClassName() + \".\" + record.getSourceMethodName() + \": \" + record.getMessage()\n\t\t\t\t\t\t+ \"\\n\";\n\t\t\t}\n\t\t});\n\t\tlogger.addHandler(handler);\n\t\tlogger.setUseParentHandlers(false);\n\t\tlogger.finest(\"begonnen\");\n\t}", "@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();", "public LogEntry () {\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}", "public void logThis(String log, Theory theory)\n {\n }", "public Log() { //Null constructor is adequate as all values start at zero\n\t}", "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 }", "abstract protected void _log(Source src, OpLevel sev, String msg, Object... args) throws Exception;", "@Override\n \tpublic void logLines(String filePath, int lineNum) {\n \t\tSystem.out.println(\"\\nLine executed: \" + filePath + \":\" + lineNum);\n \t}", "public interface LogService {\r\n\r\n\t/** \r\n\t * saveLog:保存错误日志. <br/> \r\n\t * \r\n\t * @author wqy \r\n\t * @param info \r\n\t * @since JDK 1.7 \r\n\t */\r\n\tvoid saveExceptionLog(ExceptionLog info);\r\n\t\r\n\t/** \r\n\t * listLogInfo:根据条件获取错误日志信息. <br/> \r\n\t * \r\n\t * @author wqy \r\n\t * @param param\r\n\t * @return \r\n\t * @since JDK 1.7 \r\n\t */\r\n\tList<ExceptionLog> listLogInfo(Map<String,Object> param);\r\n\t\r\n\t\r\n\t/** \r\n\t * removeLogInfo:根据时间删除之前日志信息. <br/> \r\n\t * \r\n\t * @author wqy \r\n\t * @param endTime \r\n\t * @since JDK 1.7 \r\n\t */\r\n\tvoid removeLogInfo(String endTime);\r\n\r\n\t/** \r\n\t * saveOpenInfoLog:保存开放接口日志. <br/> \r\n\t * \r\n\t * @author wqy \r\n\t * @param log \r\n\t * @since JDK 1.7 \r\n\t */\r\n\tvoid saveOpenInfoLog(OpenInfLog log);\r\n\r\n\t/** \r\n\t * saveLogInfo:保存自定义接口日志. <br/> \r\n\t * \r\n\t * @author wqy \r\n\t * @param log \r\n\t * @since JDK 1.7 \r\n\t */\r\n\tvoid saveLogInfo(LogInfo logInfo);\r\n}", "private void logUser() {\n }", "private JavaUtilLogHandlers() { }", "private void logInfo(){\n var f = new java.io.File(\".\");\n try {\n logger.info(\".=\" + f.getCanonicalPath());\n } catch (IOException e) {\n logger.error(\"Cannot get canonical path of .\");\n }\n logger.info(\"user.dir=\" + System.getProperty(\"user.dir\"));\n logger.info(\"isMacOSX = \"+ String.valueOf(isMacOSX()));\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 }", "private void logMessage(String msg) {\n\n\t\tlog.logMsg(\"(L\" + lexAnalyser.getLineCount() + \")\" + msg + \"\\n\");\n\n\t\t// System.out.println(\"(L\" + lexAnalyser.getLineCount() + \")\" + msg);\n\n\t}", "public void zalogujSkonci() {\n PrintWriter pw;\n try {\n pw = new PrintWriter(new BufferedWriter(new FileWriter(new File(\"logClient.txt\"), true)));\n pw.println(\"Odeslano bytu: \" + main.odeslanoZprav);\n pw.println(\"Prijato bytu: \" + main.prijatoBytu);\n pw.println(\"Odeslano zprav: \" + main.odeslanoZprav);\n pw.println(\"Prijato zprav: \" + main.prijatoZprav);\n pw.println(\"Odehrano her: \" + main.odehranoHer);\n pw.println(\"Doba behu: \" + (System.currentTimeMillis() - main.start) / 1000 + \" sekund.\");\n pw.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n System.exit(0);\n }" ]
[ "0.67510927", "0.6713956", "0.65830195", "0.65648365", "0.6526499", "0.6296612", "0.6278995", "0.6278995", "0.6278995", "0.6272866", "0.6267501", "0.62412643", "0.62314814", "0.6213514", "0.61561185", "0.6110545", "0.6107001", "0.6102285", "0.60655284", "0.60267437", "0.59948814", "0.59814584", "0.5973969", "0.59688324", "0.5957383", "0.59532505", "0.5952655", "0.5947774", "0.5931941", "0.5919173", "0.59166837", "0.59127057", "0.5905144", "0.5899649", "0.58984673", "0.58967775", "0.589162", "0.587725", "0.58595854", "0.58414656", "0.5836079", "0.5833221", "0.583124", "0.5813195", "0.58039", "0.5795047", "0.5793837", "0.5781646", "0.5771782", "0.5770831", "0.5768622", "0.5764085", "0.5762386", "0.5757985", "0.5748062", "0.57431805", "0.5734168", "0.5726414", "0.5702032", "0.56982094", "0.56970644", "0.5686759", "0.5681802", "0.56693196", "0.5667051", "0.5659532", "0.56554013", "0.5652984", "0.5651977", "0.5648598", "0.5643717", "0.5638161", "0.563356", "0.56318635", "0.56114435", "0.56082106", "0.55997694", "0.559823", "0.55956095", "0.5593521", "0.55912054", "0.5589033", "0.5588465", "0.55764645", "0.55654675", "0.55536026", "0.5553099", "0.5539359", "0.5536079", "0.55350995", "0.5535051", "0.5530674", "0.5514637", "0.5511963", "0.55025536", "0.55024403", "0.54969543", "0.54903114", "0.5484106", "0.5484076" ]
0.610724
16