This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Svelte and Sapper in Action and have Mark Volkmann on-line!
See this thread for details.
Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!

teguh sugiono

Greenhorn
+ Follow
since Sep 10, 2013
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by teguh sugiono

i got this error java.util.ConcurrentModificationException
how to solved this problem

package com.gate;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.ConcurrentModificationException;

import android.R.integer;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.DatePickerDialog;
import android.app.Dialog;
import android.app.DialogFragment;
import android.app.ProgressDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.AsyncTask;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.util.Log;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.View.OnKeyListener;
import android.view.View.OnTouchListener;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.AutoCompleteTextView;
import android.widget.Button;
import android.widget.DatePicker;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.RelativeLayout;
import android.widget.Spinner;
import android.widget.TextView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.Toast;

public class MainEdtShifting extends Activity {

private Button btnexit,btnback,btnSearch,BtnSave,BtnReset;
ProgressDialog pDialog;
JSONArray dataJSON = null;
ArrayList<SetterGetter> tampung ;
ArrayList<SetterGetter> tampungdetail ;
ArrayList<SetterGetter> tampungspin ;
AutoCompleteTextView txtNoContainer ;
DataAdapter adapter;
static EditText EdtTglShiftting;
private int hit;
EditText txtBlock,txtRow,txtCol,txtStack ;
EditText txtBlock1,txtRow1,txtCol1,txtStack1 ;
ListView lv;

private static final String url_update_container = "http://192.168.10.91/gate_app/get_cek_update.php";
private static final String TAG_NoContainer = "NoContainer";
private static final String TAG_Block = "Block";
private static final String TAG_Row = "Row";
private static final String TAG_Col = "Col";
private static final String TAG_Stack = "Stack";
private static final String TAG_SUCCESS = "success";
private static final String TAG_userlogin = "userlogin" ;
private int success = 0 ;

private String userlogin;
private Spinner spinner_condition ;

@Override
   protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
       setContentView(R.layout.frmeditshifting);
       
       Intent dapatdata = this.getIntent();
userlogin = dapatdata.getStringExtra("userlogin");

tampung = new ArrayList<SetterGetter>();
txtNoContainer = (AutoCompleteTextView) findViewById(R.id.txtNoContainer);
       txtNoContainer.requestFocus();
       new GetDataKontainer().execute();
       
}

public class GetDataKontainer extends AsyncTask<String, String, String> {
 @Override
 protected void onPreExecute() {
  super.onPreExecute();
  pDialog = new ProgressDialog(MainEdtShifting.this);
  pDialog.setMessage("Loading Data...");
  pDialog.setIndeterminate(false);
  pDialog.setCancelable(false);
  pDialog.show();
 }

 @Override
 protected String doInBackground(String... arg0) {    
 
 String url = "http://192.168.10.91/gate_app/get_cek_shifting_search.php?cont_number="; ;
 Log.e("proses : ", "---------->" + url);
 
 JSONParser jParser = new JSONParser();
 JSONObject json = jParser.getJSONFromUrl(url);
 
 System.out.println(" tampung --------------> " + tampung);
 tampung.clear();
 
  try {
  dataJSON = json.getJSONArray("list_container");
  System.out.println(" kesini --------------> ");
  for (int i = 0; i < dataJSON.length(); i++) {
JSONObject c = dataJSON.getJSONObject(i);

tampung.add(new SetterGetter(c.getString("cont_number"), c.getString("block_loc"), c.getString("rowss"), c.getString("col"), c.getString("stack"), "",c.getString("contstatus"))) ;

  }

 
  } catch (JSONException e) {
   
  }
 
  return null;
 }
 
 @Override
 protected void onPostExecute(String result) {  
super.onPostExecute(result);  
pDialog.dismiss();  

List<SetterGetter> list = new ArrayList<SetterGetter>();

       for(SetterGetter karyawan:tampung){
        list.add(new SetterGetter(karyawan.getcontno().toString(), karyawan.getblock().toString(), karyawan.getrow().toString(), karyawan.getcol().toString(), karyawan.getstack().toString(),"",karyawan.getcontstatus().toString())) ;
       
        Iterator<SetterGetter> iter = list.iterator();
       
        try{
       
        while(iter.hasNext()){
        SetterGetter str = iter.next();
       
        String AA = karyawan.getcontno().toString(); String BB = karyawan.getblock().toString();
            String CC = karyawan.getrow().toString(); String DD = karyawan.getcol().toString();
            String EE = karyawan.getstack().toString(); String FF = karyawan.getcontstatus().toString();
           
           
            String KK = str.getcontno().toString(); String LL = str.getblock().toString();
            String MM = str.getrow().toString(); String NN = str.getcol().toString();
            String OO = str.getstack().toString(); String PP = str.getcontstatus().toString();
           
           
            if(KK.equals(AA) && LL.equals(BB) && MM.equals(CC) && NN.equals(DD) && OO.equals(EE) && PP.equals(FF)){
            iter.remove();
           }
        }
       
        list.add(new SetterGetter(karyawan.getcontno().toString(), karyawan.getblock().toString(), karyawan.getrow().toString(), karyawan.getcol().toString(), karyawan.getstack().toString(),"",karyawan.getcontstatus().toString())) ;
       
        }catch (ConcurrentModificationException e) {
        e.printStackTrace();  
}
       
       }
       
       txtNoContainer = (AutoCompleteTextView) findViewById(R.id.txtNoContainer);
       txtNoContainer.setThreshold(1);
       adapter = new DataAdapter(MainEdtShifting.this, R.layout.frmeditshifting, R.id.txtnocont, list);
       txtNoContainer.setAdapter(adapter);
       txtNoContainer.setText("") ;
       
       txtNoContainer.requestFocus();

 }
}

}
1 year ago
yes I found a red line in the function, whether the function cannot be called from there.
new GetData().execute();
1 year ago
how to execute data on datepicker ondateset dialog?
1 year ago
solved , i use arraylist.
thank you...
1 year ago
how to create arrays from public declarations

public class NewJFrame extends javax.swing.JFrame {

   private static String[][][] dimensitiga;

   public NewJFrame() {
       initComponents();
   }
                   

   private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                        

/*
       String[][][] array3D = {
               {{"KODE001","Teguh Sugiono","JAKARTA"},
               {"KODE002","Nugie","BEKASI"},
               {"KODE003","Shulhan","JAKARTA"},
               {"KODE004","Adi","JAKARTA"},
               {"KODE005","Yasin","BEKASI"},
               {"KODE006","M.Donny","TANGGERANG"},
               {"KODE007","Fadil","BEKASI"}}  
       };*/

dimensitiga = {
               {{"KODE001","Teguh Sugiono","JAKARTA"},
               {"KODE002","Nugie","BEKASI"},
               {"KODE003","Shulhan","JAKARTA"},
               {"KODE004","Adi","JAKARTA"},
               {"KODE005","Yasin","BEKASI"},
               {"KODE006","M.Donny","TANGGERANG"},
               {"KODE007","Fadil","BEKASI"}}  
       };

       
   }

}
1 year ago
I want to make autocomplete with mysql database, please help






1 year ago
Error :

if I select the data in its autocomplete then the data that appears inconsistent with the chosen
4 years ago
if the data I have type numbers or letters, then the autocomplete run properly when selected. but if the data I have of numbers and letters example B91829UXY , then autocomplete is not going well.
please help me .

  • MainActivity



  • KoneksiMysql



  • Tabel_test



  • activity_main.xml



  • get_auto_truck.php



  • tabel_contoh

  • 4 years ago
    Please Help me. how to solved this problem?

    4 years ago
    i use this

    String path = "src/id/ptmsa/co/id/report/TesReport.jasper";
    JOptionPane.showMessageDialog(null, "Direktori " + path );

    JasperPrint jasperPrint = JasperFillManager.fillReport(path, null, koneksi);
    System.out.println("Viewing...");
    JasperViewer.viewReport(jasperPrint, false);
    System.out.println("Done!");
    4 years ago