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
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { buttonGroup1 = new javax.swing.ButtonGroup(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jcombocateg = new javax.swing.JComboBox(); txtcodigo = new javax.swing.JTextField(); txtproduto = new javax.swing.JTextField(); txtpreco = new javax.swing.JTextField(); jButton1 = new javax.swing.JButton(); jPanel1 = new javax.swing.JPanel(); jRadioButton1 = new javax.swing.JRadioButton(); jRadioButton2 = new javax.swing.JRadioButton(); jLabel5 = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setTitle("Adicionar Produtos"); setResizable(false); jLabel1.setText("Codigo"); jLabel2.setText("Produto"); jLabel3.setText("Categoria"); jLabel4.setText("Preço"); jcombocateg.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Medicamento", "Perfumaria" })); jButton1.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N jButton1.setText("Adicionar"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Status", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 13))); // NOI18N buttonGroup1.add(jRadioButton1); jRadioButton1.setText("Disponivel"); buttonGroup1.add(jRadioButton2); jRadioButton2.setText("Em Falta"); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jRadioButton1) .addContainerGap()) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addComponent(jRadioButton2) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jRadioButton1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 3, Short.MAX_VALUE) .addComponent(jRadioButton2)) ); jLabel5.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N jLabel5.setText("Adicionar Produtos"); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(121, 121, 121) .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(137, Short.MAX_VALUE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel4, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(10, 10, 10) .addComponent(txtpreco, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup() .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jcombocateg, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGap(43, 43, 43) .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup() .addGap(12, 12, 12) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(txtcodigo, javax.swing.GroupLayout.PREFERRED_SIZE, 96, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(txtproduto, javax.swing.GroupLayout.PREFERRED_SIZE, 252, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addGap(26, 26, 26)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 184, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addContainerGap() .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 34, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(txtcodigo, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(15, 15, 15) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(txtproduto, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(43, 43, 43) .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jcombocateg, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(17, 17, 17) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(txtpreco, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(31, 31, 31))) .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(22, 22, 22)) ); setSize(new java.awt.Dimension(416, 415)); setLocationRelativeTo(null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n ...
[ "0.7319396", "0.7290941", "0.7290941", "0.7290941", "0.7285927", "0.7248002", "0.72139066", "0.72086275", "0.71958303", "0.718997", "0.7184516", "0.7159095", "0.71481097", "0.709288", "0.70806605", "0.70578784", "0.6986726", "0.6977067", "0.6955257", "0.6954392", "0.6945326",...
0.0
-1
todo fethc wholeday and put it here.
public void downloadDay(){ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "@Override\n public void perish() {\n \n }", "private FlyWithWings(){\n\t\t\n\t}", "protected void mo6255a() {\n }", "public void smell() {\n\t\t\n\t}", "@Override\n protected void prot() {\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "publi...
[ "0.6180373", "0.5981687", "0.5884446", "0.5788745", "0.5788456", "0.57278645", "0.5697032", "0.5691304", "0.56854695", "0.56739753", "0.5659082", "0.5631912", "0.5623448", "0.5602827", "0.55711234", "0.55711234", "0.55674696", "0.55674696", "0.55674696", "0.55674696", "0.5567...
0.0
-1
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.main_menu, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {...
[ "0.7246102", "0.7201358", "0.7194834", "0.7176498", "0.71066517", "0.7039537", "0.7037961", "0.70112145", "0.70094734", "0.69807225", "0.6944953", "0.69389373", "0.6933199", "0.6916928", "0.6916928", "0.6891486", "0.68831646", "0.68754137", "0.68745375", "0.68621665", "0.6862...
0.0
-1
SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd_HH:mm"); //TODO so far will add todays date. but I might add a button to add manually the user
public void createDate(){ 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 currentDateandTime = sdf.format(new Date()); Log.e(TAG, "todays date is: "+currentDateandTime ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void updateDateTxtV()\n {\n String dateFormat =\"EEE, d MMM yyyy\";\n SimpleDateFormat sdf = new SimpleDateFormat(dateFormat, Locale.CANADA);\n dateStr = sdf.format(cal.getTime());\n dateTxtV.setText(dateStr);\n\n //unix datetime for saving in db\n dateTimeUnix ...
[ "0.6569985", "0.6561803", "0.6504817", "0.6485242", "0.64612633", "0.64317846", "0.63582224", "0.6355659", "0.63349277", "0.63272053", "0.6274422", "0.6266108", "0.6248114", "0.62108344", "0.62036955", "0.61810607", "0.61575824", "0.6151184", "0.6113827", "0.61022025", "0.608...
0.7497931
0
if it is a different date, it will delete previous saved data. If it is the same day, then it will load everything that hs been done by the same user compare: user date
public void verifyDate(){ // currentDateandTime dataSingleton.getDay().getDate(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void deleteOldData() {\n Date today = SunshineDateUtils.getNormalizedUtcDateForToday();\n weatherDao.deleteOldWeather(today);\n }", "public synchronized static void cleanOldFiles() {\n\t\tGregorianCalendar yesterday = new GregorianCalendar();\n\t\tyesterday.roll(GregorianCalendar.HOUR_OF...
[ "0.7116562", "0.6211804", "0.5941053", "0.584964", "0.57222897", "0.56828415", "0.5609913", "0.55298793", "0.5522469", "0.5511776", "0.5498445", "0.5494932", "0.5477235", "0.544343", "0.54312205", "0.5427973", "0.5399818", "0.5385747", "0.5352996", "0.5351429", "0.53282243", ...
0.504619
70
sincronizar con el user de firebase currentUser = new User(); currentUser.setFirstName("Ivan"); currentUser.setLastName("Zepeda");
public void setupUser() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createPersonFromUser(String fullname){\n String useruid=\"\";\n String useremail=\"\";\n\n FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();\n if (user != null) {\n // Name, email address, and profile photo Url\n String username = user.g...
[ "0.726678", "0.704623", "0.6978677", "0.69715834", "0.69145036", "0.68771714", "0.6857951", "0.68352485", "0.6789316", "0.6772101", "0.6766677", "0.6735389", "0.67007804", "0.66960275", "0.6645203", "0.66416246", "0.6641052", "0.6609239", "0.65804106", "0.655795", "0.6557407"...
0.0
-1
checar que no esten nulos
public void verifyData() { saveDay(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void carroNoAgregado(){\n System.out.println(\"No hay un parqueo para su automovil\");\n }", "private int cantFantasmasRestantes() {\n // TODO implement here\n return 0;\n }", "private int verificarRemocao(No no){\n if(no.getDireita()==null && no.getEsquerda()==null)\n ...
[ "0.7315156", "0.6673286", "0.6560864", "0.65496486", "0.6511134", "0.65002584", "0.64702076", "0.6454979", "0.6425718", "0.6378976", "0.6373899", "0.63409483", "0.63349605", "0.63325655", "0.6324648", "0.6290648", "0.6240914", "0.61825603", "0.6144651", "0.6128173", "0.612170...
0.0
-1
databaseReference.push().setValue(day); UUID add objects on day, before will add them on firebase. else,
public void saveDay() { day.setServices(serviciosTotales); day.setTasks(tasksTotales); databaseReference.child(day.getDate() + "_" + day.getUserId()).setValue(day); Toast.makeText(context, "Creando archivo para enviar por correo.", Toast.LENGTH_LONG).show(); //todo, so far it will keep updating the day askPermissions(); createExcel(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void SaveVisitors() {\n\n if(deceasedKey!=null)\n {\n @SuppressLint(\"SimpleDateFormat\") DateFormat df = new SimpleDateFormat(\"EEE, d MMM yyyy, HH:mm\");\n date = df.format(Calendar.getInstance().getTime());\n\n reference=database.getReference(\"Deceaceds\"...
[ "0.66183335", "0.63062143", "0.6238612", "0.6216551", "0.6210296", "0.6119464", "0.6115832", "0.60795987", "0.6055945", "0.59275365", "0.5757829", "0.5747427", "0.5743701", "0.5740402", "0.5721635", "0.5720825", "0.5712591", "0.5707028", "0.5702349", "0.5691463", "0.56669235"...
0.6472503
1
Need to clear list before fetching serviciosTotales=new ArrayList(); fetch services from FB add them to arraylist
public void fetchServices() { serviciosTotales.clear(); for (String serviceId : serviceList) { databaseServiceReference.child(serviceId).addListenerForSingleValueEvent(new ValueEventListener() { @Override public void onDataChange(@NonNull DataSnapshot dataSnapshot) { Servicio servicioTemp = dataSnapshot.getValue(Servicio.class); serviciosTotales.add(servicioTemp); servicesAdapter.notifyDataSetChanged(); } @Override public void onCancelled(@NonNull DatabaseError databaseError) { } }); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ArrayList<Servicio> cargarServicios() throws CaException {\n try {\n String strSQL = \"SELECT k_idservicio, f_fycentrada, f_fycsalida, q_valorapagar, k_idvehiculo FROM servicio\";\n Connection conexion = ServiceLocator.getInstance().tomarConexion();\n PreparedStatemen...
[ "0.6609492", "0.6246593", "0.62379247", "0.61956984", "0.6185027", "0.6094866", "0.60522085", "0.59188217", "0.59178776", "0.59156954", "0.58937746", "0.5887293", "0.5805305", "0.57896614", "0.57846576", "0.57750314", "0.57674384", "0.5757937", "0.57573074", "0.575432", "0.57...
0.76827234
0
todo trabajar aqui para mostrar los elementos en el adapter tasksTotales=new ArrayList();
public void fetchTasks() { tasksTotales.clear(); for (String taskId : taskList) { databaseTaskReference.child(taskId).addListenerForSingleValueEvent(new ValueEventListener() { @Override public void onDataChange(@NonNull DataSnapshot dataSnapshot) { com.ijzepeda.armet.model.Task taskTemp = dataSnapshot.getValue(com.ijzepeda.armet.model.Task.class); tasksTotales.add(taskTemp); taskAdapter.notifyDataSetChanged(); } @Override public void onCancelled(@NonNull DatabaseError databaseError) { } }); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public int getCount() {\n return tasks.size();\n }", "@Override\n public int getItemCount() {\n return tasks.size();\n }", "@Override\n public int getItemCount() {\n return taskList.size();\n }", "public int getCount() {\n return this.tasks.size();\n ...
[ "0.7000542", "0.6957798", "0.684231", "0.679706", "0.67802364", "0.67709005", "0.65096813", "0.6477878", "0.64471364", "0.64002496", "0.6310446", "0.63093024", "0.6295991", "0.62604946", "0.6255243", "0.6219172", "0.61897063", "0.6169776", "0.61472964", "0.61390364", "0.60817...
0.7554467
0
changed this bit and the iteration in the contructor for now, you can change it later leo
public int search(String name){ for(Map.Entry<String, Integer> e : map.entrySet()){ if(e.getKey().equals(name)){ return e.getValue(); } } throw new NullPointerException(); /* while(pointer < locations.length){ if(locations[pointer].getName() == name){ map.put(locations[pointer].getName(), locations[pointer].getID()); pointer++; return locations[pointer - 1].getID(); } else { map.put(locations[pointer].getName(), locations[pointer].getID()); pointer++; } } throw new NullPointerException(); */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n protected void init() {\n }", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Ove...
[ "0.65996456", "0.6594109", "0.63844234", "0.63061297", "0.63061297", "0.63061297", "0.6287283", "0.6224451", "0.6188138", "0.6188138", "0.6188138", "0.6188138", "0.6188138", "0.61544055", "0.61544055", "0.61544", "0.61440814", "0.6133047", "0.6096434", "0.6096434", "0.6096434...
0.0
-1
I changed it a bit for now cause the original code gave me java.lang.ArrayStoreException
public String[] locationNames(){ String[] s = new String[locations.length]; for(int i=0; i<locations.length; i++){ s[i] = locations[i].toString(); } return s; //return Arrays.copyOf(locations, locations.length, String[].class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Array createArray();", "ArrayValue createArrayValue();", "@Test\n public void testToArray_0args() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n instance.add(1);\n instance.add(2);\n instance.add(3);\n instance.add(4);\n instance.add(5)...
[ "0.6309324", "0.6212759", "0.6182397", "0.6129856", "0.6087595", "0.60659355", "0.606524", "0.60391515", "0.5935499", "0.5933985", "0.58911395", "0.58816284", "0.587448", "0.58739215", "0.5871235", "0.5870011", "0.58379775", "0.582018", "0.58078617", "0.5806898", "0.5802033",...
0.0
-1
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { rootView = inflater.inflate(R.layout.fragment_dish_profile, container, false); initView(); getProfileDish(); return rootView; }
{ "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...
[ "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.66251...
0.0
-1
Do view model stuff
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { mealComponentsViewModel = ViewModelProviders.of(this).get(MealComponentsViewModel.class); View root = inflater.inflate(R.layout.fragment_meal_components, container, false); mealComponentsViewModel.getText().observe(this, new Observer<String>() { @Override public void onChanged(@Nullable String s) { } }); // Setup the action button FloatingActionButton fab = root.findViewById(R.id.fabAddComponent); fab.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { DialogFragment mealMaker = new MakeMealComponentDialogFragment(adapter, thisFragment); mealMaker.show(getFragmentManager(), "TAG"); } }); // Tell the user if no components exist if (ItemStorage.getInstance().components.size() < 1) { Toast.makeText(getContext(), R.string.noComponents, Toast.LENGTH_LONG) .show(); } // set up the RecyclerView RecyclerView recyclerView = root.findViewById(R.id.componentsRecycler); recyclerView.setLayoutManager(new LinearLayoutManager(getContext())); adapter = new MealComponentRecyclerViewAdapter(getContext(), this.getActivity(), this); adapter.setClickListener(this); recyclerView.setAdapter(adapter); // Add lines in between each row recyclerView.addItemDecoration(new DividerItemDecoration(getContext(), DividerItemDecoration.VERTICAL)); // Add the touch helper to enable swiping ItemTouchHelper itemTouchHelper = new ItemTouchHelper(new SwipeToDeleteEditCallback(adapter)); itemTouchHelper.attachToRecyclerView(recyclerView); return root; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void updateViewFromModel();", "@Override\n protected void initViewModel() {\n }", "void updateModelFromView();", "protected abstract void populateView(View v, T model);", "public void initView() {\n\t\t view.initView(model);\t \n\t }", "public interface MainMvpView extends MvpView {\n\n void sho...
[ "0.7108107", "0.7075142", "0.6962075", "0.67862034", "0.6596543", "0.657364", "0.65365565", "0.6435074", "0.6420781", "0.6420781", "0.6420781", "0.63674647", "0.6364288", "0.63175863", "0.62494195", "0.6246973", "0.621913", "0.6207299", "0.6149517", "0.6140969", "0.61366516",...
0.0
-1
/ Callback for creating component modifying dialog
public void editComponent(int position){ DialogFragment mealMaker = new MakeMealComponentDialogFragment(adapter.getItem(position), position, this); mealMaker.show(getFragmentManager(), "TAG"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract JDialog createDialog();", "public abstract Dialog createDialog(DialogDescriptor descriptor);", "void makeDialog()\n\t{\n\t\tfDialog = new ViewOptionsDialog(this.getTopLevelAncestor());\n\t}", "public NewPropertyTypeDialog(JFrame parent) {\r\n super(parent, \"New Property Type\", true);\...
[ "0.6756236", "0.67078567", "0.6488801", "0.6470581", "0.6408964", "0.64026827", "0.63628626", "0.6341904", "0.630701", "0.6272988", "0.6263617", "0.625351", "0.62167865", "0.61841", "0.6144057", "0.60954535", "0.6089", "0.6080381", "0.60793376", "0.60763067", "0.60656244", ...
0.0
-1
/ Tell the RecyclerView adapter to update its contents
public void updateComponents(){ adapter.updateItems(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void notifyChanged() {\n notifyDataSetChanged();\n }", "@Override\r\n public void onItemsChanged(RecyclerView recyclerView){\r\n isNotifyDataSetChanged = true;\r\n }", "public void notifyDataSetChanged() {\n viewState.setShouldRefreshEvents(true);\n invalidat...
[ "0.76744175", "0.76350534", "0.758731", "0.7406876", "0.7376782", "0.7299191", "0.7292515", "0.7277008", "0.72366214", "0.7216188", "0.7195797", "0.7186586", "0.7173647", "0.7172947", "0.71686524", "0.71660715", "0.7157731", "0.7138066", "0.7128678", "0.71198297", "0.7063856"...
0.7483635
3
/ Callback for clicking on an item
@Override public void onItemClick(View view, int position) { Toast.makeText(getContext(), "You clicked " + adapter.getItem(position) + " on row number " + position, Toast.LENGTH_SHORT).show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void clickItem(int uid);", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\titemClickListener.Callback(itemInfo);\n\t\n\t\t\t}", "void issuedClick(String item);", "@Override\n public void itemClick(int pos) {\n }", "@Override\n public voi...
[ "0.8214339", "0.8087317", "0.79964817", "0.79821914", "0.78492606", "0.7834982", "0.78038704", "0.78036547", "0.7794688", "0.77348095", "0.7679006", "0.76654303", "0.76620036", "0.76528454", "0.7645843", "0.76441175", "0.763323", "0.7632486", "0.7627892", "0.7618359", "0.7614...
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { System.out.println("Hola Mundo o/"); int i = 0; int nota = 0; boolean copia = true; do{ System.out.println("Tu nota es a" + nota); if(i>20) { break; } i++; }while(copia); System.out.println("Wiiiiii"); }
{ "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 getExr...
[ "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.608016...
0.0
-1
System management service. Add/Update/Remove and show all the systems that will communicate with the record removal service
@RemoteServiceRelativePath("solr-system") public interface SolrSystemService extends RemoteService { /** * Create a new system * * @param systemDTO * The system to create * @param userDTO * The user that creates the system */ void createSolrSystem(SolrSystemDTO systemDTO, UserDTO userDTO); /** * Update a selected system * * @param systemDTO * The system to update * @param userDTO * The user that updates the system */ void updateSolrSystem(SolrSystemDTO systemDTO, UserDTO userDTO); /** * Delete a system * * @param systemDTO * The system to delete * @param userDTO * The user that deletes the system */ void deleteSolrSystem(SolrSystemDTO systemDTO, UserDTO userDTO); /** * Show a list of all the systems the system can communicate with * * @param userDTO * the user that requested the systems * @return A list of all the available systems */ List<SolrSystemDTO> showAllSolrSystems(UserDTO userDTO); boolean optimize(SolrSystemDTO sustemDTO, UserDTO userDTO); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void showServices()\n {\n // Remove all of the items from the listField.\n _treeField.deleteAll();\n \n // Get a copy of the ServiceRouting class.\n ServiceRouting serviceRouting = ServiceRouting.getInstance();\n \n // Add in our new items by trolling thr...
[ "0.69194597", "0.6271763", "0.62450486", "0.61138654", "0.5996561", "0.5897551", "0.58285666", "0.5793365", "0.5743296", "0.57384676", "0.5717861", "0.5665556", "0.56469184", "0.56351256", "0.55905247", "0.55905175", "0.55615723", "0.5546134", "0.5533331", "0.5527404", "0.551...
0.58411354
6
Create a new system
void createSolrSystem(SolrSystemDTO systemDTO, UserDTO userDTO);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "System createSystem();", "public void create() {\n\t\t\n\t}", "public void create(){}", "private SpaceSystemType addSpaceSystem(SpaceSystemType parentSystem,\n String systemName,\n String description,\n ...
[ "0.74678063", "0.65493375", "0.6490503", "0.63337064", "0.61083347", "0.6067174", "0.59934324", "0.599323", "0.5959604", "0.59333163", "0.5932558", "0.5906357", "0.5874489", "0.5848288", "0.58294034", "0.58211946", "0.5818937", "0.578099", "0.5765641", "0.5763751", "0.5745102...
0.5938055
9
Update a selected system
void updateSolrSystem(SolrSystemDTO systemDTO, UserDTO userDTO);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void update() {\r\n for (SGSystem sys : systems.toArray(new SGSystem[0])) {\r\n sys.update();\r\n }\r\n }", "Software update( Software s );", "public abstract void updateSystem(Set<Integer> selectedDatasetIds);", "void setSystem(java.lang.String system);", "public void se...
[ "0.7413345", "0.66852206", "0.66068053", "0.6204643", "0.61944366", "0.6146423", "0.58686125", "0.5860956", "0.5770859", "0.57071644", "0.56919754", "0.56359607", "0.5634554", "0.5593843", "0.5579262", "0.55435526", "0.55420303", "0.55389756", "0.5528769", "0.5506608", "0.549...
0.60964465
6
Show a list of all the systems the system can communicate with
List<SolrSystemDTO> showAllSolrSystems(UserDTO userDTO);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void listDevices()\n\t{\n\t\tfor(SerialPort port : SerialPort.getCommPorts())\n\t\t{\n\t String portName = port.getSystemPortName();\n\t System.out.println(portName);\n\t\t}\n\t}", "public Collection<String> listDevices();", "public String showAvailableExternalSystem() {\n in...
[ "0.72143096", "0.694447", "0.6709592", "0.6678835", "0.6423593", "0.6415958", "0.6412876", "0.6411067", "0.63112915", "0.62445617", "0.62379205", "0.616999", "0.61472636", "0.6133945", "0.61020225", "0.60552007", "0.6028464", "0.59306574", "0.5884729", "0.5863119", "0.5839375...
0.0
-1
Remove Blackboard default formatting
private String removeNamePrefix(String sFileName){ int iDateScoreIndex = 0; String sOriginalFileName = ""; iDateScoreIndex = sFileName.indexOf("_attempt_"); sOriginalFileName = sFileName.substring(iDateScoreIndex + 29); return sOriginalFileName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void clearFormats();", "public static String stripFormattingCodes(String str) {\n \treturn str == null ? null : formattingCodesPattern.matcher(str).replaceAll(\"\");\n }", "public void revertColorAndFont()\r\n\t{\r\n\t\trevertColor();\r\n\t\trevertFont();\r\n\t}", "String removeImageStyle();", ...
[ "0.65574306", "0.6117897", "0.5918954", "0.5866649", "0.5771552", "0.57428205", "0.57163125", "0.569987", "0.5697891", "0.5680549", "0.5652938", "0.5595404", "0.55732846", "0.55609316", "0.55545956", "0.55382156", "0.5489382", "0.547571", "0.54563445", "0.54412", "0.5431486",...
0.0
-1
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_matches, container, false); if (getArguments() != null) { teamInfo = getArguments().getParcelable(StaticConfig.TEAM_INFO); player_id = getArguments().getString(StaticConfig.PARAM_PLAYER_ID); } initialiseViews(view); matches_adapter = new Adapter(getActivity(), list); matches_recycler.setAdapter(matches_adapter); matches_recycler.setLayoutManager(new LinearLayoutManager(getActivity())); calendar = Calendar.getInstance(); datePickerDialog = new DatePickerDialog( getActivity(), this, calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH), calendar.get(Calendar.DAY_OF_MONTH)); if (teamInfo != null && teamInfo.getRecentMatches() != null) { LL_date_layout.setVisibility(GONE); matches.addAll(teamInfo.getRecentMatches()); Collections.sort(matches, (o, t1) -> { Match match = o; Match match1 = t1; long millis1 = Utils.getMillisFromMatchDate(match.getFullDatetimeSpaces()); long millis2 = Utils.getMillisFromMatchDate(match1.getFullDatetimeSpaces()); if (millis1 > millis2) return 1; else if (millis1 < millis2) return -1; else return 0; }); list.addAll(matches); if (matches.size() == 0) AppSingleton.getInstance(getActivity()).loadNativeAds(mNativeAds, matches_recycler, matches_adapter, matches, list, NUMBER_OF_NATIVE_ADS_MATCHES); else AppSingleton.getInstance(getActivity()).loadNativeAds(mNativeAds, matches_recycler, matches_adapter, matches, list, NUMBER_OF_NATIVE_ADS_MATCHES); matches_adapter.notifyDataSetChanged(); shimmerFrameLayout.hideShimmer(); shimmerFrameLayout.setVisibility(GONE); } else if (player_id != null) { LL_date_layout.setVisibility(GONE); getPlayerMatches(); } else { handler = new Handler(); runnable = this::getMatches; getMatches(); displayDate(); } getLatestNews(); return view; }
{ "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...
[ "0.6740675", "0.6725193", "0.67224836", "0.6699259", "0.6691596", "0.668896", "0.6687658", "0.66861755", "0.667755", "0.66756433", "0.6667425", "0.66667783", "0.6665166", "0.66614723", "0.66549766", "0.665031", "0.6643759", "0.6639389", "0.66378653", "0.66345453", "0.6626348"...
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { String s = "abc"; //set(s); int n = 5, a = 2, b = 1, c = 5; System.out.println(ropeP(n, a, b, c)); }
{ "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 getExr...
[ "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.608016...
0.0
-1
constructors (use whichever suits your purposes; you can set any part of this class later) Todo: check if the minimum units allowed for enrollment is reached minimal
public Quarter() { // note: null fields exist for this option courses = new ArrayList<Course>(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Units()\n\t{\n\t\t// empty for empty unitset\n\t}", "private Units() {\n // Nothing to do\n }", "public ActionProgrammer(String firstName, String lastName,\r\nString socialSecurityNumber, int month, int year, \r\ndouble wage, double pieces) {\r\nsuper(firstName, lastName, socialSecurityNumber,...
[ "0.62710583", "0.60680556", "0.59581393", "0.5869845", "0.5723745", "0.56848264", "0.56667924", "0.5561087", "0.5559914", "0.55399084", "0.552748", "0.54994446", "0.5471642", "0.5470993", "0.54708195", "0.54689336", "0.54609597", "0.54608065", "0.54387486", "0.5402266", "0.53...
0.52377534
54
get combined units of all classes in the quarter
public double getTotalUnits() { int total = 0; for(int i = 0; i < courses.size(); i++) { // don't count if units are null? idk how defensive I need to be (I choose not to check, units should never be null) // TODO: test with System.out Course course = courses.get(i); //if(!course.getUnits().equals(null)) total += course.getUnits(); } return total; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getTotalUnits() {\n double totalUnits = 0;\n for (int i = 0; i < quarters.size(); i++) {\n totalUnits += quarters.get(i).getTotalUnits();\n }\n return totalUnits;\n }", "public String getQuarter() {\r\n return quarter;\r\n }", "public int getQua...
[ "0.6261926", "0.6046109", "0.59936416", "0.5887887", "0.5805992", "0.5805992", "0.5805992", "0.5595087", "0.5591392", "0.5587401", "0.5437739", "0.53907806", "0.5347558", "0.5345145", "0.53291667", "0.5328472", "0.5302866", "0.52444124", "0.52114964", "0.52077603", "0.5205243...
0.49907574
42
we only check for overdone units
public boolean hasValidUnitNum() { return getTotalUnits() <= 22; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean needUnits(){\n\t\tif(units.size() >= maxUnits){\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "private boolean checkGreedyEnergy() {\r\n return myTotal.get(2) < 10 || (myTotal.get(2) < 13 && myTotal.get(2) <= enTotal.get(2));\r\n }", "Unit getHasUnit();", "int getToughness(Uni...
[ "0.7463756", "0.6276188", "0.62405026", "0.6150894", "0.61311364", "0.60830456", "0.6081805", "0.60583943", "0.59782696", "0.5971893", "0.59413576", "0.5918606", "0.5917134", "0.5915477", "0.5912315", "0.589955", "0.5886463", "0.5846946", "0.5837902", "0.57738566", "0.5767560...
0.646612
1
helper function for reorder()
private int extractDigits(String courseCode) { CharMatcher matcher = CharMatcher.javaLetter(); String digitOnly = matcher.removeFrom(courseCode); int digits = Integer.parseInt(digitOnly); return digits; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void changeSortOrder();", "public void reorder(Object obj, int newIndex);", "private void updateOrder() {\n Arrays.sort(positions);\n }", "public void insertReorderBarrier() {\n\t\t\n\t}", "public void reorder(String field){\n\t\tsetOrderFields(new String[] {\n\t\t\tfield\n\t\t});\n\t\tdj....
[ "0.7033024", "0.6948401", "0.64139205", "0.6401494", "0.62500393", "0.62309086", "0.62005085", "0.61061484", "0.6002819", "0.5982208", "0.59642506", "0.59642506", "0.5938708", "0.5937081", "0.59158826", "0.5913287", "0.59118414", "0.588197", "0.5878481", "0.58512723", "0.5837...
0.0
-1
helper function for reorder()
private String extractLetters(String courseCode) { CharMatcher matcher = CharMatcher.javaDigit(); String StringOnly = matcher.removeFrom(courseCode); return StringOnly; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void changeSortOrder();", "public void reorder(Object obj, int newIndex);", "private void updateOrder() {\n Arrays.sort(positions);\n }", "public void insertReorderBarrier() {\n\t\t\n\t}", "public void reorder(String field){\n\t\tsetOrderFields(new String[] {\n\t\t\tfield\n\t\t});\n\t\tdj....
[ "0.7033024", "0.6948401", "0.64139205", "0.6401494", "0.62500393", "0.62309086", "0.62005085", "0.61061484", "0.6002819", "0.5982208", "0.59642506", "0.59642506", "0.5938708", "0.5937081", "0.59158826", "0.5913287", "0.59118414", "0.588197", "0.5878481", "0.58512723", "0.5837...
0.0
-1
helper function for reorder()
private int partition(int low, int high) { // choose the pivot point int pivot = extractDigits(courses.get(high).getCode()); int i = (low - 1); // partition the larger elements to the right of the pivot // and smaller elements to the left of the pivot for (int j = low; j < high; j++) { int coursePtr = extractDigits(courses.get(j).getCode()); if (coursePtr <= pivot) { i++; Course temp = courses.get(i); courses.set(i, courses.get(j)); courses.set(j, temp); } } Course temp = courses.get(i+1); courses.set(i+1, (courses.get(high))); courses.set(high, temp); return (i + 1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void changeSortOrder();", "public void reorder(Object obj, int newIndex);", "private void updateOrder() {\n Arrays.sort(positions);\n }", "public void insertReorderBarrier() {\n\t\t\n\t}", "public void reorder(String field){\n\t\tsetOrderFields(new String[] {\n\t\t\tfield\n\t\t});\n\t\tdj....
[ "0.7033024", "0.6948401", "0.64139205", "0.6401494", "0.62500393", "0.62309086", "0.62005085", "0.61061484", "0.6002819", "0.5982208", "0.59642506", "0.59642506", "0.5938708", "0.5937081", "0.59158826", "0.5913287", "0.59118414", "0.588197", "0.5878481", "0.58512723", "0.5837...
0.0
-1
Reorder the course list using quick sort by choosing the last element as the pivot point. After sorting, the course list will be in the increasing order according to the course codes.
public void reorder(int low, int high) { if (low < high) { // Select pivot position and put all the elements smaller // than pivot on left and greater than pivot on right int pi = partition(low, high); // Sort the elements on the left of pivot reorder(low, pi - 1); // Sort the elements on the right of pivot reorder(pi + 1, high); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void sortFinalsList() {\n \n Course course = null;\n int j = 0;\n for (int i = 1; i < finalsList.size(); i++) {\n\n j = i;\n // checks to see if the start time of the element j is less than the\n // previous element, and if j > 0\n whil...
[ "0.63380766", "0.6053602", "0.58875495", "0.57157916", "0.57045585", "0.57000005", "0.5600499", "0.55475783", "0.55318886", "0.5499393", "0.5476292", "0.54700536", "0.5459385", "0.54440564", "0.5428711", "0.5426669", "0.5426162", "0.5409121", "0.5404561", "0.5393202", "0.5368...
0.571422
4
Called just before this Command runs the first time
@Override protected void initialize() { Robot.collector.open(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void preRun() {\n super.preRun();\n }", "protected void preRun() {\r\n\t\tthis.preparePairs();\r\n\t}", "@Override\n public void beforeFirstLogic() {\n }", "public void prePerform() {\n // nothing to do by default\n }", "protected void onFirstUse() {}", "@O...
[ "0.7113986", "0.6542487", "0.64347786", "0.6433418", "0.64082474", "0.6353506", "0.6309701", "0.62537354", "0.62473047", "0.62407833", "0.6167777", "0.6163407", "0.6129232", "0.6129232", "0.6129232", "0.6129232", "0.6129232", "0.61080366", "0.608483", "0.608483", "0.60805327"...
0.0
-1
Make this return true when this Command no longer needs to run execute()
@Override protected boolean isFinished() { return Robot.collector.isOpen(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean execute() {\n return false;\n }", "@Override\n public boolean execute() {\n return false;\n }", "public boolean execute(){\n return false;\n }", "@Override\n\tpublic boolean Unexecute() \n\t{\n\t\treturn false;\n\t}", "p...
[ "0.77345294", "0.77345294", "0.7678753", "0.76457655", "0.75966", "0.7554271", "0.6877811", "0.6748956", "0.6728847", "0.66855806", "0.65891784", "0.65624696", "0.64980483", "0.63857424", "0.63736373", "0.6356819", "0.6356819", "0.63498974", "0.63401324", "0.63290936", "0.632...
0.0
-1
method to open browser with practo.com website
public static void openBrowser() { driver = DriverSetup.getWebDriver(ReadPropertiesFile.getBrowser()); driver.get(ReadPropertiesFile.getURL()); log.info("Opening Browser"); log.info("Practo website is launched "); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void openWebpage(String url) {\n try {\n new ProcessBuilder(\"x-www-browser\", url).start();\n } catch (IOException e) {\n log.error(e.getMessage(), e);\n }\n }", "public void openUrlInBrowser(String URL) {}", "@Given(\"^Open URL in chrome browser$\"...
[ "0.7618539", "0.7418567", "0.73231465", "0.7305593", "0.7263695", "0.72339225", "0.72089946", "0.70703626", "0.7042674", "0.7041303", "0.70101595", "0.6999222", "0.6973783", "0.6942476", "0.6936305", "0.6911404", "0.6901125", "0.6880209", "0.68795466", "0.685858", "0.6851403"...
0.7932748
0
method to close browser
public static void closeBrowser() { driver.quit(); BaseUI.logger.log(Status.INFO,ReadPropertiesFile.getBrowser()+" is closed Successfully "); report.flush(); log.info("Closing Browser \n"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void closeBrowser() {\n System.out.println(\"Browser closed\");}", "public void closeBrowser(){\n driver.quit();\n }", "public void closeBrowser(){\n\t driver.close();\n\t \t }", "public static void CloseBrowser() {\n\t\tBrowser.Driver.quit();\n\t}", "public static ...
[ "0.8524229", "0.8394343", "0.8339457", "0.82482463", "0.81417084", "0.80828565", "0.80299157", "0.79668486", "0.7825666", "0.77937186", "0.7686354", "0.76724756", "0.76299936", "0.76069385", "0.7604965", "0.75798607", "0.7432492", "0.74141735", "0.7395506", "0.73435223", "0.7...
0.759474
15
adding cleanUp method for when the console based service side program is closed
public void cleanUp() { emfactory.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void cleanUp(){\n\t\tSystem.out.println(\"Destroying beans cleanUp method() for triangle\");\n\t}", "@PreDestroy\r\n\tpublic void doMyCleanupStuff() {\r\n\t\tSystem.out.println(\">> TennisCoach: inside of doMyCleanupStuff()\");\r\n\t}", "public void cleanShutDown () {\n shutdown = true;\n }", "@Pr...
[ "0.73289067", "0.7264795", "0.7212863", "0.7197392", "0.71673995", "0.71217126", "0.7102324", "0.70481145", "0.7036847", "0.70326847", "0.6986768", "0.6986768", "0.69711286", "0.69469905", "0.69443256", "0.69417673", "0.6932761", "0.68912256", "0.68762517", "0.6861742", "0.68...
0.65006083
69
adding service side option to view customer's order by order number
public Order viewOrder(int on) { EntityManager em = emfactory.createEntityManager(); em.getTransaction().begin(); Order found = em.find(Order.class, on); em.close(); return found; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@VTID(10)\r\n int getOrder();", "@Override\n\tpublic void getSpecificOrders() {\n\t\t\n\t}", "@Override\n\tpublic void getSpecificOrders() {\n\t\t\n\t}", "public void setOrderno(String orderno) {\n this.orderno = orderno;\n }", "String getOrderId();", "public void setOrderNumber(int value) {\n...
[ "0.67353714", "0.6583472", "0.6583472", "0.6508207", "0.6501687", "0.6474215", "0.64631534", "0.6438762", "0.6438762", "0.635955", "0.632697", "0.6300097", "0.6295439", "0.6270658", "0.62168133", "0.6211889", "0.62024254", "0.61812466", "0.6174559", "0.6154442", "0.61406875",...
0.6041243
28
adding service side option to view full inventory
public List<Order> showAllInventory() { EntityManager em = emfactory.createEntityManager(); //I may need to change the query criteria TypedQuery<Order> typedQuery = em.createQuery("select orderNumber from Order orderNumber", Order.class); List<Order> allInventory = typedQuery.getResultList(); em.close(); return allInventory; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Inventory getInventory(){ //needed for InventoryView - Sam\n return inventory;\n }", "public void showInventory()\n\t{\n\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t+ \"__________________\\n\\n\");\n\t\tSystem.out.print(\"\\t\\t\\t\\tInventory\");\n\t\...
[ "0.6049224", "0.6033736", "0.59395874", "0.59150124", "0.591212", "0.5886931", "0.58848506", "0.58468866", "0.58449036", "0.58309877", "0.5687193", "0.5676263", "0.56738234", "0.5619211", "0.5600939", "0.55751", "0.5570459", "0.5515078", "0.5506955", "0.54920965", "0.54649967...
0.0
-1
adding service side option to view the next order in line
public Order viewOrders() { EntityManager em = emfactory.createEntityManager(); em.getTransaction().begin(); //Order nextOrder = return nextOrder; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String showCurrentOrder(){\n stringBuilder = new StringBuilder();\n for (int i = 0; i < OrderManager.getInstance().getOrder().size(); i++) {\n stringBuilder.append((i + 1) + \". \" + OrderManager.getInstance().getOrder().get(i).toString() + \"\\n\");\n }\n return strin...
[ "0.63372827", "0.5963775", "0.5888414", "0.5837513", "0.58089715", "0.57971656", "0.57564354", "0.5755411", "0.5736038", "0.57332814", "0.5729621", "0.5697573", "0.56947666", "0.56505764", "0.56505764", "0.5637642", "0.5630739", "0.56001455", "0.5543732", "0.5535331", "0.5527...
0.60337865
1
Factory for Spring to configure the EntityManager.
@Bean public LocalContainerEntityManagerFactoryBean entityManagerFactory() { LocalContainerEntityManagerFactoryBean entityManagerFactory = new LocalContainerEntityManagerFactoryBean(); entityManagerFactory.setDataSource(dataSource); entityManagerFactory.setJpaDialect(hibernateJpaDialect()); entityManagerFactory.setJpaVendorAdapter(hibernateJpaVendorAdapter()); entityManagerFactory.setJpaProperties(getJpaProperties()); entityManagerFactory.setPackagesToScan("com.bouacheria.ami.domain"); return entityManagerFactory; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Bean\n EntityManagerFactory entityManagerFactoryProvider() {\n \tEntityManagerFactory emf = Persistence.createEntityManagerFactory(DATA_SOURCE_NAME);\n return emf;\n }", "@Bean\n public LocalContainerEntityManagerFactoryBean managerFactory() {\n HibernateJpaVendorAdapter adapter = new ...
[ "0.72597814", "0.71444726", "0.7086596", "0.7072899", "0.70439637", "0.7037152", "0.7003914", "0.69793504", "0.6923343", "0.69231635", "0.68399596", "0.6739074", "0.6611167", "0.6610511", "0.65997624", "0.6561932", "0.65611076", "0.65232986", "0.64938766", "0.648664", "0.6425...
0.7118843
2
/ Assumes that there is no entity currently occupying the intended destination cell.
public void addEntity(Entity entity) { if (withinBounds(entity.getPosition())) { setOccupancyCell(entity.getPosition(), entity); this.entities.add(entity); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static boolean checkCellsNotNull(\n \t\t\tde.fhhannover.inform.hnefatafl.vorgaben.Move currentMove){\n \t\t\t\tif (currentMove.getFromCell() == null ||\n \t\t\t\t\tcurrentMove.getToCell() == null){\n \t\t\t\t\t\treturn false;\n \t\t\t\t}\n \t\t\t\treturn true;\t\t\n \t}", "public Position destination(Pos...
[ "0.64039695", "0.6199365", "0.60665345", "0.60548526", "0.6035209", "0.6034745", "0.6003671", "0.5981077", "0.59729755", "0.59695154", "0.58832896", "0.5871445", "0.58503044", "0.58477896", "0.58465636", "0.58309305", "0.58302", "0.58018064", "0.579739", "0.57802045", "0.5778...
0.0
-1
a priority queue to keep weight to know which edge is lighter
public DijkstraSP(EdgeWeightedDigraph G, int s) { edgeTo = new DirectedEdge[G.V()]; distTo = new double[G.V()]; pq = new IndexMinPQ<Double>(G.V()); for (int v = 0; v < G.V(); v++) distTo[v] = Double.POSITIVE_INFINITY; distTo[s] = 0.0; pq.insert(s, 0.0); while (!pq.isEmpty()) relax(G, pq.delMin()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void primsMST(List<Vertex> graph) {\n\n\t\tMyPriorityQueue priorityQueue = new MyPriorityQueue(10);\n\t\tfor (Vertex v : graph) {\n\t\t\tv.key = Integer.MAX_VALUE;\n\t\t\tpriorityQueue.add(v);\n\t\t}\n\n\t\tVertex peek = priorityQueue.peek();\n\t\tpeek.key = 0;\n\n\t\twhile (!priorityQueue.isEmpty()) {\n\t...
[ "0.6277024", "0.62074417", "0.60784435", "0.6026116", "0.59984446", "0.59177315", "0.59033585", "0.58857465", "0.58259505", "0.5795449", "0.57763493", "0.57679856", "0.57554746", "0.5725826", "0.5673012", "0.56539166", "0.5633489", "0.5615425", "0.5594146", "0.5592937", "0.55...
0.0
-1
OK static public e = 1; // NOT OK, access modifier MUST come before specifier
void m1();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private E() {}", "public static void main(String[] args) {\nprivate final int d=20; // illegal modifier ( inside {} block private can't use\nfinal int f=20;\nprivate int g=30;\n\t}", "private Constantes() {\r\n\t\t// No way\r\n\t}", "private static class <init>\n implements e\n{\n\n public String a()...
[ "0.6285236", "0.592388", "0.5888297", "0.58562154", "0.57338357", "0.5593752", "0.5593696", "0.55513376", "0.55275875", "0.5477585", "0.54641205", "0.5439028", "0.54041684", "0.5379921", "0.5375381", "0.53584045", "0.5344914", "0.53355235", "0.532833", "0.5305493", "0.5296596...
0.0
-1
A simple implementation of getting all the column names in the clause. Filter out the columns that are variaibles, expressions, literals. A more complete implementation should move this method into each specific atomic condition.
public Columns getColumns() { Columns cs = null; if (column1 != null && !column1.isVariable()) { cs = new Columns(column1); if (column2 != null && !column2.isVariable()) { cs.add(column2); } } return cs; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String getAllColumnName() {\n\t\t\n\t\tStringBuilder builder = new StringBuilder();\n\t\t// .append(COLUMN_id).append(\"=?,\").\n\t\tbuilder.append(\"user_id\").append(\"=?,\");\n\t\tbuilder.append(\"lib_book_id\").append(\"=?,\");\n\t\tbuilder.append(\"lending_date\").append(\"=?,\");\n\t\tbuilder.append(...
[ "0.69952714", "0.6676717", "0.64928573", "0.6384534", "0.6260012", "0.6155855", "0.6077666", "0.59735554", "0.5922623", "0.5922222", "0.58110774", "0.58086354", "0.579362", "0.57632095", "0.5751167", "0.5720024", "0.5687214", "0.5645436", "0.56439984", "0.5568238", "0.5555652...
0.0
-1
Get the tables from the two operands of the condition.
public Tables getTables(){ Tables result=null; Table t1=(column1==null || column1.getTableName()==null)?(null):new Table(column1.getTableName()); Table t2=(column2==null || column2.getTableName()==null)?(null):new Table(column2.getTableName()); if (t1!=null) { result=new Tables(t1); result.add(t2); } else if(t2!=null){ result=new Tables(t2); } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Table condSelect(String name, String[] columns, String[] tablesList, String[] conds) {\n Table t1;\n Table t2;\n tablesList = new LinkedHashSet<String>(Arrays.asList(tablesList)).toArray(new String[0]);\n\n //Parse Comparison and Arithmetic Operations\n LinkedList<LinkedList> com...
[ "0.6349637", "0.58991915", "0.58642316", "0.5721395", "0.55017567", "0.5416369", "0.53762573", "0.5343045", "0.53428936", "0.51079875", "0.50979596", "0.5085567", "0.50350565", "0.5020528", "0.50105697", "0.5009759", "0.4926545", "0.48699477", "0.48600885", "0.485043", "0.484...
0.5743152
3
dynamic query method/finder all we need is to set up the method name (findBy.../findAll..) and then Spring Data JPA is going to provide us with the implementation fetch data from the database.
Owner findByLastName(String lastName);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Getter<ENTITY, FK> finder();", "public Faq[] findByDynamicSelect(String sql, Object[] sqlParams) throws FaqDaoException;", "@Repository\npublic interface HotelRepository extends JpaRepository<Hotel, Integer> {\n\t//query methods: findByPropertyName . . . (parses method name)\n\tpublic List<Hotel> findByPriceBe...
[ "0.62656206", "0.6235466", "0.61981547", "0.61190724", "0.6088847", "0.60299975", "0.60191894", "0.6018273", "0.6010124", "0.6001861", "0.5999717", "0.59934723", "0.59846354", "0.597384", "0.59592867", "0.5946355", "0.5945871", "0.5928076", "0.5925613", "0.5925559", "0.592478...
0.0
-1
maximum valid time in milliseconds constructor
public EditorDayTime( int columnIndex, int row ) { // use spin editor super( columnIndex, row ); m_spin = new SpinEditor(); m_spin.setFormat( "00" ); setControl( m_spin ); // determine min & max valid times m_min = 0; m_max = Time.MILLISECONDS_IN_DAY; Day day = JPlanner.plan.daytypes.get( row ); if ( columnIndex > Day.SECTION_START1 ) { m_min = ( (Time) day.getValue( columnIndex - 1 ) ).getDayMilliseconds(); m_min += 60000; } int num = day.getNumberOfPeriods(); if ( columnIndex < Day.SECTION_START1 + 2 * num - 1 ) { m_max = ( (Time) day.getValue( columnIndex + 1 ) ).getDayMilliseconds(); m_max -= 60000; } // add listener text changes to wrap hours and minutes, and set error status addListener( ( observable, oldText, newText ) -> { // as prefix hold hours, if not null means minutes are being edited if ( m_spin.getPrefix() != null ) { // if minutes greater than 59, increase hours int minutes = m_spin.getInteger(); if ( minutes > 59 ) { String prefix = m_spin.getPrefix(); int hours = minutes / 60 + Integer.parseInt( prefix.substring( 0, prefix.length() - 1 ) ); m_spin.setPrefixSuffix( hours + ":", null ); m_spin.setInteger( minutes % 60 ); return; } // if minutes less than 0, decrease hours if ( minutes < 0 ) { String prefix = m_spin.getPrefix(); int hours = ( minutes - 60 ) / 60 + Integer.parseInt( prefix.substring( 0, prefix.length() - 1 ) ); m_spin.setPrefixSuffix( hours + ":", null ); m_spin.setInteger( ( minutes + 60 ) % 60 ); return; } } // check editor value and if error String error = check( newText ); if ( error == null ) JPlanner.setNoError( getControl(), "" ); else JPlanner.setError( getControl(), error ); } ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getMaxTime() { return _maxTime; }", "public float getMaxTimeSeconds() { return getMaxTime()/1000f; }", "public Integer getMaxTime() {\n return maxTime;\n }", "TimeResource maxDuration();", "int getMaxRecordingMillis();", "public long getMaxTime()\n {\n return times[times.length...
[ "0.7228569", "0.7138707", "0.6726576", "0.66546726", "0.6649586", "0.6581801", "0.65698457", "0.6547331", "0.65303767", "0.64744097", "0.64735776", "0.64300734", "0.62902164", "0.6248714", "0.61918926", "0.6169075", "0.6163241", "0.61105424", "0.6099554", "0.6096397", "0.6087...
0.0
-1
create mapping filter config Assumes: store previous path in meta is enabled
@Test public void testMetadataMapping() { PathMappingConfig filterConfig = new PathMappingConfig(); filterConfig.setMapSource(Metadata); filterConfig.setMetadataName(mappingMetadataName); SyncOptions options = new SyncOptions(); TestStorage source = initializeSourceStorage(options, true); // build sync config SyncConfig syncConfig = new SyncConfig(); syncConfig.setOptions(options); syncConfig.setFilters(Collections.singletonList(filterConfig)); syncConfig.setTarget(testConfig); EcsSync sync = new EcsSync(); sync.setSyncConfig(syncConfig); sync.setSource(source); TestUtil.run(sync); validateMappingResults((TestStorage) sync.getTarget()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initMapper() {\n final BeanPropertyFilter filterOutAllExcept =\n SimpleBeanPropertyFilter.filterOutAllExcept(\"fname\", \"executionTimeNano\");\n this.mapper.addMixInAnnotations(\n PortalEvent.class, PortletRenderExecutionEventFilterMixIn.class);\n fi...
[ "0.5657493", "0.52672", "0.5267141", "0.5249511", "0.5205401", "0.51956075", "0.5028447", "0.49890098", "0.49626648", "0.49626014", "0.49334985", "0.49295503", "0.48950824", "0.48816904", "0.4867897", "0.48458523", "0.4827878", "0.48250622", "0.48011705", "0.47612926", "0.476...
0.50837255
6
create mapping filter config Assumes: store previous path in meta is enabled
@Test public void testRegExMapping() { PathMappingConfig filterConfig = new PathMappingConfig(); filterConfig.setMapSource(RegEx); filterConfig.setRegExPattern(regexPattern); filterConfig.setRegExReplacementString(regexReplacement); SyncOptions options = new SyncOptions(); TestStorage source = initializeSourceStorage(options, false); // build sync config SyncConfig syncConfig = new SyncConfig(); syncConfig.setOptions(options); syncConfig.setFilters(Collections.singletonList(filterConfig)); syncConfig.setTarget(testConfig); EcsSync sync = new EcsSync(); sync.setSyncConfig(syncConfig); sync.setSource(source); TestUtil.run(sync); validateMappingResults((TestStorage) sync.getTarget()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initMapper() {\n final BeanPropertyFilter filterOutAllExcept =\n SimpleBeanPropertyFilter.filterOutAllExcept(\"fname\", \"executionTimeNano\");\n this.mapper.addMixInAnnotations(\n PortalEvent.class, PortletRenderExecutionEventFilterMixIn.class);\n fi...
[ "0.5654965", "0.52656025", "0.5265483", "0.5245519", "0.5203483", "0.519431", "0.5081159", "0.50282604", "0.4988424", "0.49637684", "0.4961013", "0.49351078", "0.49270487", "0.48963302", "0.48819774", "0.48644578", "0.4846386", "0.48266596", "0.4824294", "0.48002428", "0.4758...
0.45363918
50
"ingest" source keys in dummy storage
TestStorage initializeSourceStorage(SyncOptions options, boolean addMappingMetadata) { TestStorage storage = new TestStorage(); storage.withConfig(testConfig).withOptions(options); for (String key : pathMap.keySet()) { boolean directory = directories.contains(key); ObjectMetadata meta = new ObjectMetadata().withContentLength(0).withDirectory(directory); // add mapping metadata if necessary if (addMappingMetadata) meta.setUserMetadataValue(mappingMetadataName, pathMap.get(key)); SyncObject syncObject = new SyncObject(this.storage, key, meta, new ByteArrayInputStream(new byte[0]), new ObjectAcl()); // updateObject expects a storage identifier (absolute path), so here we have to add the // internal path prefix that it uses storage.updateObject(testStoragePrefix + key, syncObject); } return storage; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void reDistributeMyKeys() {\n toDistribute = readNodeEntries();\n }", "private <K, V> Source initInputFile(\n Iterable<IsmRecord<WindowedValue<V>>> elements,\n IsmRecordCoder<WindowedValue<V>> coder,\n String tmpFilePath)\n throws Exception {\n // Group the keys by shard a...
[ "0.5396048", "0.53731793", "0.52176386", "0.51905084", "0.51898664", "0.51669765", "0.51426643", "0.5121085", "0.50517106", "0.49271423", "0.49063796", "0.48908046", "0.48890245", "0.48841682", "0.48661295", "0.4846961", "0.48333722", "0.48282427", "0.48073897", "0.4799244", ...
0.4796865
20
total object count matches
void validateMappingResults(TestStorage targetStorage) { Set<SyncObject> targetObjects = getAllObjects(targetStorage, null); Assertions.assertEquals(pathMap.size(), targetObjects.size()); // target storage contains only target paths Set<String> targetPaths = targetObjects.stream().map(SyncObject::getRelativePath).collect(Collectors.toSet()); Assertions.assertEquals(new HashSet<>(pathMap.values()), targetPaths); // check mapping and original path in metadata for (SyncObject object : targetObjects) { String originalPath = object.getMetadata().getUserMetadataValue(PathMappingConfig.META_PREVIOUS_NAME); Assertions.assertNotNull("original path not set in metadata", originalPath); Assertions.assertEquals(pathMap.get(originalPath), object.getRelativePath()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Object getNumberMatched();", "public int numMatches();", "public int getObjectCount() {\n\t\treturn objects.size(); // Replace with your code\n\t}", "public int getNumOfMatchedBets();", "public int count(T instance, M matchCondition);", "public Double getTotalMatched(){\n return totalMatched;\n ...
[ "0.7471589", "0.7134092", "0.6871442", "0.6852208", "0.6823397", "0.68167794", "0.65674114", "0.65003055", "0.65003055", "0.6476863", "0.6474391", "0.6474391", "0.6449797", "0.63930625", "0.6378294", "0.63605887", "0.6353358", "0.63024914", "0.63024914", "0.63024914", "0.6278...
0.0
-1
switch the screen to add sales form
@FXML void add_btn_clicked(MouseEvent event) { switchScenes("/client/boundry/MarketingAgentSalesAddForm.fxml", "/client/boundry/MarketingAgentMainCustomer.css"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void salesScreen()\n {\n onSales = true;\n salesItem = new SalesItem[50];\n Button timbitAdd = new Button(24, \"button-blue.png\", \"button-green.png\", \"Add timbit:\");\n Button doughnutAdd = new Button(24, \"button-blue.png\", \"button-green.png\", \"Add doughnut:\");\n ...
[ "0.6929588", "0.6716668", "0.66893274", "0.6370093", "0.63547", "0.6194389", "0.61890554", "0.6177842", "0.6119392", "0.6094611", "0.6093315", "0.6058392", "0.6007968", "0.5999155", "0.5997324", "0.5987549", "0.59496886", "0.5945645", "0.59410757", "0.5934362", "0.59303796", ...
0.64533097
3
switch the screen to main customer form
@FXML void customers_btn_clicked(MouseEvent event) { switchScenes("/client/boundry/MarketingAgentMainCustomerForm.fxml", "/client/boundry/MarketingAgentMainCustomer.css"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void goMainScreen(){\n\t\tcheckSavePwd();\n\t\tActionEvent e = new ActionEvent();\n\t\te.sender = this;\n\t\te.action = ActionEventConstant.ACTION_SWITH_TO_CATEGORY_SCREEN;\n\t\tUserController.getInstance().handleSwitchActivity(e);\n\t}", "private void backToCustomer() {\n new CustomerPanel().setVisible(t...
[ "0.74262583", "0.7214529", "0.68940485", "0.67108905", "0.66991776", "0.6682688", "0.66643965", "0.6632337", "0.65935075", "0.65536606", "0.64563644", "0.64529544", "0.6449966", "0.6431052", "0.6391256", "0.63624376", "0.6361551", "0.63557357", "0.6351482", "0.63490343", "0.6...
0.65973777
8
this method delete sale pattern if sale is clicked and it's not "active" at the DB after appropriate alert
@FXML void delete_btn_clicked(MouseEvent event) { if (sales_table.getSelectionModel().getSelectedItem() == null) { Alert alert3 = new Alert(AlertType.ERROR); alert3.setTitle("ERROR"); alert3.setHeaderText(null); alert3.setContentText("Please select a sale to delete"); alert3.show(); return; } if (sales_table.getSelectionModel().getSelectedItem().getStatus().toLowerCase().equals("active")) { Alert alert2 = new Alert(AlertType.ERROR); alert2.setTitle("The sale is active"); alert2.setHeaderText(null); alert2.setContentText("Active sale cannot be deleted"); alert2.show(); return; } Alert alert = new Alert(AlertType.WARNING, "Are you sure you delete the sale pattern?", ButtonType.YES, ButtonType.NO); alert.setTitle("Back"); alert.setHeaderText(null); alert.showAndWait(); if (alert.getResult() == ButtonType.YES) { if (sales_table.getSelectionModel().getSelectedItem().getStatus().equals("Un-active")) { // query for delete from DB String query1 = "Delete from sale_pattern where salePatternTag = " + sales_table.getSelectionModel().getSelectedItem().getSalePatternTag().toString(); Message message1 = new Message(MessageType.UPDATEINFO, "MarketingAgentSalesMainController_delete", query1); MainClientGUI.client.handleMessageFromClientUI(message1); // successful alert Alert alert1 = new Alert(AlertType.CONFIRMATION); alert1.setTitle("Sale deleted"); alert1.setHeaderText(null); alert1.setContentText("The sale pattern deleted successfully"); alert1.show(); switchScenes("/client/boundry/MarketingAgentSalesMainForm.fxml", "/client/boundry/MarketingAgentMainCustomer.css"); } } else { return; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void delete(Sale sale) {\n sale_dao.delete(sale);\n }", "protected boolean afterDelete() {\n if (!DOCSTATUS_Drafted.equals(getDocStatus())) {\n JOptionPane.showMessageDialog(null, \"El documento no se puede eliminar ya que no esta en Estado Borrador.\", \"Error\", JOptionPane.E...
[ "0.67495126", "0.6207944", "0.6098762", "0.6077868", "0.6043151", "0.6032427", "0.6012356", "0.59362626", "0.5935657", "0.592056", "0.58997345", "0.58938885", "0.5873158", "0.5870135", "0.58628666", "0.58432096", "0.5835904", "0.58322525", "0.58281654", "0.5825792", "0.581194...
0.68052244
0
specific help button for marketing agent with general information
@FXML void help_btn_clicked(MouseEvent event) { Dialog<String> dia = new Dialog<>(); Stage stage = (Stage) dia.getDialogPane().getScene().getWindow(); DialogPane dialogPane = dia.getDialogPane(); dialogPane.getStylesheets().add(getClass().getResource("/client/boundry/dialog.css").toExternalForm()); dialogPane.getStyleClass().add("dialog"); dia.setTitle("Help Dialog"); dia.setHeaderText("Guide:"); dia.setGraphic(new ImageView(this.getClass().getResource("/icons8-info-48.png").toString())); // Add a custom icon. stage.getIcons().add(new Image(this.getClass().getResource("/icons8-help-24.png").toString())); dia.getDialogPane().getButtonTypes().addAll(ButtonType.OK); dia.setContentText( "Main Sale Pattern Screen\nIn this screen you can choose sale from table,add sale, delete and open\n" + "for full information, click on specific sale and choose an action, in addition you can click" + "on \"Statistics\" for statistic inforamtion"); dia.show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n \t\t\t\tpublic void doHelp() {\n \n \t\t\t\t}", "@Override\n\tprotected void handleHelp(ClickEvent event) {\n\t\t\n\t}", "public void helpSpecificAction() {\n new Help(getSpecificHelpTitle(), getSpecificHelp());\n }", "public void showHelp();", "public void helpPressed() {\n S...
[ "0.7268882", "0.72304994", "0.7029075", "0.6925896", "0.6902745", "0.6900158", "0.6888691", "0.68354344", "0.6788945", "0.6762405", "0.6715101", "0.66886276", "0.6662774", "0.6660458", "0.66302437", "0.66292125", "0.6603242", "0.65935063", "0.65824515", "0.6574453", "0.656248...
0.62531996
55
when logout button clicked, the system send a query to logout and switch to login scene
@FXML void logout_btn_clicked(MouseEvent event) { String quary = "UPDATE users SET connection_status = 0 WHERE userID = " + MainClientGUI.getUserID(); Message message = new Message(MessageType.LOGOUT, "MarketingAgentSalesMainController_logout_clicked", quary); MainClientGUI.client.handleMessageFromClientUI(message); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void logout() {\n showLoginScreen();\n }", "@FXML\r\n private void handleButtonLogOut() {\r\n sessionContent.remove(\"activeId\");\r\n user = null;\r\n MobileApplication.getInstance().switchView(LOGIN_VIEW);\r\n }", "private void logout() {\n\t\tgetUI().get().navigat...
[ "0.8038486", "0.7837762", "0.78089005", "0.7628017", "0.76135296", "0.75868094", "0.7554778", "0.7543264", "0.7543264", "0.75270706", "0.75063956", "0.75019395", "0.74988306", "0.7492724", "0.74058", "0.7405634", "0.7405529", "0.739918", "0.73951966", "0.7371091", "0.735319",...
0.7850396
1
not have implementation for now
@FXML void main_btn_clicked(MouseEvent event) { }
{ "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\tprotected void interr() {\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t...
[ "0.62420297", "0.6156516", "0.60647535", "0.6030221", "0.5954782", "0.5895229", "0.5895229", "0.58590066", "0.5847479", "0.5825338", "0.58094674", "0.58047247", "0.58047247", "0.5802421", "0.5757812", "0.57397026", "0.5716638", "0.5714169", "0.5712029", "0.57017857", "0.56963...
0.0
-1
not have implementation for now
@FXML void menu_btn_clicked(MouseEvent event) { switchScenes("/client/boundry/MarketingAgentMenuWelcomeForm.fxml", "/client/boundry/MarketingAgentMainCustomer.css"); }
{ "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\tprotected void interr() {\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t...
[ "0.62420297", "0.6156516", "0.60647535", "0.6030221", "0.5954782", "0.5895229", "0.5895229", "0.58590066", "0.5847479", "0.5825338", "0.58094674", "0.58047247", "0.58047247", "0.5802421", "0.5757812", "0.57397026", "0.5716638", "0.5714169", "0.5712029", "0.57017857", "0.56963...
0.0
-1
switch the screen to notification form
@FXML void notification_btn_clicked(MouseEvent event) { switchScenes("/client/boundry/MarketingAgentNotificationMainForm.fxml", "/client/boundry/MarketingAgentMainCustomer.css"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void updateScreen()\r\n\t{\r\n\t\tif (this.areRealmsNotificationsEnabled())\r\n\t\t{\r\n\t\t\tthis.realmsNotification.updateScreen();\r\n\t\t}\r\n\t}", "private void showNotification() {\n }", "private void showNotification() {\n\n }", "private void notificationButtonActionPerformed(java.awt.eve...
[ "0.68714154", "0.6852091", "0.67601895", "0.6757073", "0.6650222", "0.65029675", "0.64832175", "0.6469972", "0.63739365", "0.6303138", "0.62830234", "0.62192214", "0.62158674", "0.62049407", "0.6203007", "0.6182744", "0.6167206", "0.6154152", "0.6132495", "0.6123062", "0.6122...
0.6075296
25
switch the scene to the same page for refreshing
@FXML void refresh_btn_clicked(MouseEvent event) { switchScenes("/client/boundry/MarketingAgentSalesMainForm.fxml", "/client/boundry/MarketingAgentMainCustomer.css"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void goToMainScene() {\n\n scenesSeen.clear();\n this.window.setScene(firstScene.createAndReturnScene());\n scenesSeen.add(firstScene);\n }", "public void refresh_and_back_to_tourspane() {\n\t\tSceneController.pop();\n\t\tSceneController.pop_title();\n\t\tFadeOutRight anim1 = new FadeOutRight(Ho...
[ "0.7024857", "0.6973204", "0.6967508", "0.67677474", "0.67182356", "0.66677785", "0.6646762", "0.6606816", "0.65792865", "0.6545597", "0.6494362", "0.6490413", "0.6463866", "0.645626", "0.6450677", "0.6381893", "0.637738", "0.635641", "0.63277894", "0.63218266", "0.6307776", ...
0.58464074
73
this method searches specific sale and put them at local list to show on table
@FXML void search_btn_clicked(MouseEvent event) { ObservableList<SalePattern> found_sales = FXCollections.observableArrayList(); try { if (!search_txt.getText().isEmpty()) { for (SalePattern sale : sale_patterns_list) { Integer search = new Integer(search_txt.getText()); if (search <= 0) { throw new Exception(); } if (sale.getGasStationTag().toString().startsWith(search.toString())) { found_sales.add(sale); } } sales_table.setItems(FXCollections.observableArrayList()); if (found_sales != null) { sales_table.getItems().addAll(found_sales); } } else { sales_table.setItems(sale_patterns_list); } search_txt.setStyle(null); } catch (Exception e) { search_txt.setStyle("-fx-text-box-border: #FF0000; -fx-focus-color: #FF0000;"); Alert alert = new Alert(AlertType.ERROR); alert.setTitle("Invalid input"); alert.setHeaderText(null); alert.setContentText("Input entered is not valid please try again"); alert.show(); return; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ArrayList<SaleVO> showSale() {\n\t\treturn sale.show();\r\n\t}", "@GetMapping(\"/sale\")\n public ResultEntity<List<ItemDTO>> getAllSale()\n {\n return itemService.getItemsBySubCategory(ConstantUtil.TYPE_SALE_RENT,\"Sale\");\n }", "@Override\n\tpublic List<Object> getSaleList(Search sear...
[ "0.65368545", "0.6524147", "0.65169966", "0.62561136", "0.61362594", "0.6089008", "0.60483074", "0.60201395", "0.5993272", "0.5982868", "0.59132844", "0.5897396", "0.58879715", "0.5883293", "0.5878297", "0.57895446", "0.5788542", "0.57883793", "0.576359", "0.5761063", "0.5725...
0.5538666
41
open statistic data for make sale pattern by the analytic system
@FXML void statistics_btn_clicked(MouseEvent event) { switchScenes("/client/boundry/SaleStatisticsInformationForm.fxml", "/client/boundry/MarketingAgentMainCustomer.css"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic List<SalesAnalysis> getSalesAnalysis(Date fromDate, Date toDate) {\r\n\t\t\r\n\t\tList<SalesAnalysis> salesAnalysisDetails=new ArrayList<>();\r\n\t\tSalesAnalysis salesAnalysis=new SalesAnalysis();\r\n\t\t\r\n\t\t//get orders placed in the given period\r\n\t\tList<Order> orderDetails=orderSer...
[ "0.5719487", "0.5514344", "0.5379585", "0.52643156", "0.5185238", "0.5160591", "0.51219183", "0.5117341", "0.5110565", "0.50959486", "0.50860286", "0.5067791", "0.50611037", "0.5020054", "0.49758452", "0.49753213", "0.497276", "0.49650553", "0.49288768", "0.4928432", "0.49217...
0.0
-1
initialize the screen, set the user name at the top of the page, and initialize table with the details of the sales
@Override public void initialize(URL location, ResourceBundle resources) { instance = this; user_fullname.setText("Hello ," + MainClientGUI.getUserFirstName() + " " + MainClientGUI.getUserLastName()); // set at the table nameColumn.setCellValueFactory(new PropertyValueFactory<SalePattern, String>("name")); fuelTypeColumn.setCellValueFactory(new PropertyValueFactory<SalePattern, String>("fuelType")); statusColumn.setCellValueFactory(new PropertyValueFactory<SalePattern, String>("status")); stationTagColumn.setCellValueFactory(new PropertyValueFactory<SalePattern, Integer>("gasStationTag")); discountColumn.setCellValueFactory(new PropertyValueFactory<SalePattern, Float>("discount")); // this query is for get from DB the details of the sales String query = "SELECT sp.name , f.fuelName, sp.startHour, sp.endHour, sp.discount,salePatternTag, sp.status, sp.stationTag, sp.description" + " FROM sale_pattern sp, fuels f" + " WHERE sp.fuelType = f.fuelType"; Message message = new Message(MessageType.REQUESTINFO, "MarketingAgentSalesMainController_initialize_table", query); MainClientGUI.client.handleMessageFromClientUI(message); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void initialScreen() {\n PortfolioStocksVOImpl vo = getPortfolioStocksVO();\n //Number numb = (Number)2;\n Number num = new Number(2);\n vo.setBindPortfolioID(2);\n vo.executeQuery();\n //System.out.println(\"\\n\\n\\n End initial screen method \\n\\n\");\n }", ...
[ "0.64739573", "0.6351711", "0.63031846", "0.6201052", "0.6199339", "0.618119", "0.6167053", "0.60989594", "0.60802776", "0.60542774", "0.604131", "0.5967182", "0.5965995", "0.5963516", "0.59503055", "0.5948971", "0.5944496", "0.59434193", "0.5887525", "0.5887081", "0.5876587"...
0.6244773
3
open the full report of the specific sale by put the sale at static parameter
@FXML void open_btn_clicked(MouseEvent event) { sale_selected = sales_table.getSelectionModel().getSelectedItem(); if (sale_selected != null) { switchScenes("/client/boundry/MarketingAgentSaleShowForm.fxml", "/client/boundry/MarketingAgentMainCustomer.css"); } else { Alert alert = new Alert(AlertType.ERROR); alert.setTitle("No sale pattern selected"); alert.setHeaderText(null); alert.setContentText("Please select sale pattern"); alert.show(); return; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setSale(int sale) {\n\t\tthis.sale = sale;\r\n\t}", "public void setSale_num(Integer sale_num) {\n this.sale_num = sale_num;\n }", "public void gotoDetailSalesOrder() {\n\t}", "public void salesReport(View view) {\n String dbString = dbHandler.databaseToString();\n// start...
[ "0.67364615", "0.63056403", "0.6041384", "0.5950595", "0.59186864", "0.59176654", "0.5898841", "0.58386636", "0.5823155", "0.57962525", "0.5791852", "0.57809585", "0.5716045", "0.5707679", "0.56696004", "0.56635016", "0.56526077", "0.5635188", "0.5628064", "0.5591029", "0.553...
0.53555113
32
returned method after the user logout
public void return_logout_success() { MainClientGUI.loggedIn = false; switchScenes("/client/boundry/LoginForm.fxml", "/client/boundry/MainCss.css"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void performLogout(){\n }", "@Override\n\tpublic void onUserNeedLogout() {\n\t\t\n\t}", "@Override\n\tpublic void onUserNeedLogout() {\n\t\t\n\t}", "@Override\r\n\tpublic void logout() {\n\t\t\r\n\t}", "void logoutDone();", "public void logout() {\n \n }", "void logou...
[ "0.8198749", "0.8166455", "0.8166455", "0.81619644", "0.8070826", "0.8046587", "0.8043287", "0.80285275", "0.7866557", "0.77433157", "0.7739584", "0.7697606", "0.7633905", "0.75794035", "0.75581837", "0.75581837", "0.75272906", "0.75018924", "0.74884295", "0.74678254", "0.744...
0.0
-1
this method get the sale's details from DB and put them at list, , than set them at the table
public void fill_table_sale_pattern(ArrayList<ArrayList<Object>> sale_pattern) { for (ArrayList<Object> row : sale_pattern) { sale_patterns_list.add(new SalePattern((String) row.get(0), (String) row.get(1), (String) row.get(2), (String) row.get(3), (Float) row.get(4), (Integer) row.get(5), (String) row.get(6), (Integer) row.get(7), (String) row.get(8))); } sales_table.setItems(sale_patterns_list); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void initSalesList() {\n\n String sql = \"SELECT menu.id_product, menu.name, menu.price,size.size, COUNT(orders_menu.id_order) \"\n + \"FROM menu, orders_menu, orders, size WHERE menu.id_product=orders_menu.id_product \"\n + \"AND orders.id_order=orders_menu.id_order AND orders.id_statu...
[ "0.7025911", "0.6832165", "0.6603225", "0.6582435", "0.636677", "0.6355414", "0.6204116", "0.6199193", "0.6186734", "0.61422473", "0.61400646", "0.6138237", "0.6108412", "0.610233", "0.6049329", "0.6042895", "0.6021659", "0.60211295", "0.60044646", "0.5997757", "0.59971", "...
0.6240021
6
TODO Autogenerated method stub
@Override public void onClick(View arg0) { String ans1 = editbangundatar.getText().toString(); int answer = Integer.parseInt(editbangundatar.getText().toString()); if(answer == 16){ Toast.makeText(getActivity(), "True", Toast.LENGTH_LONG).show(); } else{ Toast.makeText(getActivity(), "Maaf, jawaban anda salah", Toast.LENGTH_LONG).show(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0...
0.0
-1
System.err.println("glob: "+new String(pattern)+", "+pattern_index+" "+new String(name)+", "+name_index);
static private boolean glob(byte[] pattern, int pattern_index, byte[] name, int name_index) { int patternlen = pattern.length; if (patternlen == 0) return false; int namelen = name.length; int i = pattern_index; int j = name_index; while (i < patternlen && j < namelen) { if (pattern[i] == '\\') { if (i + 1 == patternlen) return false; i++; if (pattern[i] != name[j]) return false; i += skipUTF8Char(pattern[i]); j += skipUTF8Char(name[j]); continue; } if (pattern[i] == '*') { while (i < patternlen) { if (pattern[i] == '*') { i++; continue; } break; } if (patternlen == i) return true; byte foo = pattern[i]; if (foo == '?') { while (j < namelen) { if (glob(pattern, i, name, j)) { return true; } j += skipUTF8Char(name[j]); } return false; } else if (foo == '\\') { if (i + 1 == patternlen) return false; i++; foo = pattern[i]; while (j < namelen) { if (foo == name[j]) { if (glob(pattern, i + skipUTF8Char(foo), name, j + skipUTF8Char(name[j]))) { return true; } } j += skipUTF8Char(name[j]); } return false; } while (j < namelen) { if (foo == name[j]) { if (glob(pattern, i, name, j)) { return true; } } j += skipUTF8Char(name[j]); } return false; } if (pattern[i] == '?') { i++; j += skipUTF8Char(name[j]); continue; } if (pattern[i] != name[j]) return false; i += skipUTF8Char(pattern[i]); j += skipUTF8Char(name[j]); if (!(j < namelen)) { // name is end if (!(i < patternlen)) { // pattern is end return true; } if (pattern[i] == '*') { break; } } continue; } if (i == patternlen && j == namelen) return true; if (!(j < namelen) && // name is end pattern[i] == '*') { boolean ok = true; while (i < patternlen) { if (pattern[i++] != '*') { ok = false; break; } } return ok; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testCrazyPatterns() {\n assertEquals(\"java\\\\.\\\\{.*\\\\}\\\\.Array\", glob2Pattern(\"java.{**}.Array\").pattern());\n assertEquals(\"java\\\\./.*<>\\\\.Array\\\\$1\", glob2Pattern(\"java./**<>.Array$1\").pattern());\n assertEquals(\"\\\\+\\\\^\\\\$\", glob2Pattern(\"+^$\").pattern...
[ "0.62716496", "0.6105274", "0.59387225", "0.58973044", "0.5882337", "0.58676183", "0.58506346", "0.5817834", "0.5771393", "0.56655025", "0.56443095", "0.5542059", "0.5527174", "0.55227554", "0.54983723", "0.5443507", "0.54255325", "0.5388454", "0.5372047", "0.53616434", "0.53...
0.63597316
0
Constructs a new BaseNetHandler instance.
public BaseNetHandler(String name) { this.name = name; this.packets = new ArrayList<>(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public GeneralNettyHandler() {\n\t\tthis(1024 * 8);\n\t}", "public GenericHandler() {\n\n }", "public PacketHandler() {}", "abstract public TelnetServerHandler createHandler(TelnetSocket s);", "EthHandler create(EthVersion version);", "CreateHandler()\n {\n }", "public Gateway() {\n genClie...
[ "0.6112263", "0.6006961", "0.59740216", "0.5845544", "0.5829143", "0.57860994", "0.5712504", "0.5576943", "0.55750906", "0.55650187", "0.55343956", "0.54708236", "0.5452268", "0.54520375", "0.5378092", "0.5368131", "0.53635645", "0.5354096", "0.5305472", "0.52817935", "0.5277...
0.6729224
0
Register your packet with the pipeline. Discriminators are automatically set. If more than 256 packet classes are registered, the packet is not registered.
public void registerPacket(Class<? extends ECPacket> clazz) { if (this.postInitialized) { throw new IllegalStateException("Cannot register packet after post initialization"); } if (this.packets.size() > 255) { throw new IllegalStateException("Cannot register packet - packet class '" + clazz + "' already registered"); } else if (this.packets.contains(clazz)) { throw new IllegalStateException("Cannot register packet - too many discriminators in use"); } this.packets.add(clazz); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void registerPacketClass(Object classInstance){\n\t\tWrappedFieldArray<PacketType> array = new WrappedFieldArray<>(classInstance, PacketType.class);\n\n\t\ttry{\n\t\t\tfor(Field f : array.getFields()){\n\t\t\t\tpacketLookup.add((PacketType) f.get(null));\n\t\t\t}\n\t\t}\n\t\tcatch(IllegalAccessExcep...
[ "0.60286313", "0.54191834", "0.5327711", "0.5166656", "0.5151634", "0.5149641", "0.51462626", "0.513211", "0.51297885", "0.5129507", "0.51069367", "0.50655776", "0.5036347", "0.50082284", "0.49971977", "0.4976877", "0.4970329", "0.49471682", "0.4946114", "0.49399936", "0.4879...
0.68997407
0
Ensures that packet discriminators are common between server and client by using logical sorting
public void postInit() { if (!this.initialized) { ECLog.warning( "The net handler " + this.name + " is attempting to post-init, but it hasn't been initialised yet."); } if (this.postInitialized) { return; } this.postInitialized = true; Collections.sort(this.packets, new Comparator<Class>() { @Override public int compare(Class clazz1, Class clazz2) { String canon1 = clazz1.getCanonicalName(); String canon2 = clazz2.getCanonicalName(); int com = String.CASE_INSENSITIVE_ORDER.compare(canon1, canon2); if (com == 0) { com = canon1.compareTo(canon2); } return com; } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void sortClients()\n {\n System.out.println(\"clients items (alphabetically):\");\n Set<Client> clients = ctrl.sortClientsAlphabetically();\n clients.stream().forEach(System.out::println);\n }", "private void processPacket(DatagramPacket packet) {\n String data = new Str...
[ "0.5672387", "0.5353603", "0.5322718", "0.52516913", "0.5249936", "0.52125686", "0.52123296", "0.51594394", "0.5141674", "0.51255494", "0.5021764", "0.5020583", "0.50170827", "0.49903736", "0.49779257", "0.49553943", "0.4943338", "0.49126527", "0.49095976", "0.4900601", "0.48...
0.48156342
27
Intelligently decides where the message should be sent. If this is called from a clientside thread, the message is sent to the server. Otherwise, it is sent to all players on the server.
public void send(ECPacket message) { if (FMLCommonHandler.instance().getEffectiveSide().isClient()) { this.sendToServer(message); } else { this.sendToAll(message); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void sendMessage() {\n\t\tString myPosition=this.agent.getCurrentPosition();\n\t\tif (myPosition!=null){\n\t\t\t\n\t\t\tList<String> wumpusPos = ((CustomAgent)this.myAgent).getStenchs();\n\t\t\t\n\t\t\tif(!wumpusPos.isEmpty()) {\n\t\t\t\tList<String> agents =this.agent.getYellowpage().getOtherAgents(this.ag...
[ "0.6869059", "0.67909783", "0.6742695", "0.6734871", "0.6631", "0.6561462", "0.6510273", "0.63245887", "0.62895924", "0.6242994", "0.6211907", "0.6203183", "0.6155999", "0.6114471", "0.6100207", "0.60958695", "0.6081346", "0.6078271", "0.60775733", "0.6062153", "0.60528094", ...
0.0
-1
Stores a pair of x and y integer values for quantities such as coordinates, sizes and distances on Board.
public interface Pair { /** * @return the x value from the pair */ public int getX(); /** * @return the y value from the pair */ public int getY(); /** * @param other the pair to add to this pair * @return a pair with the given pair's x and y values added onto this one's */ public Pair add(Pair other); /** * @param other the pair to subtract this pair * @return a pair with the given pair's x and y values subtracted from this one's */ public Pair subtract(Pair other); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void storeValues(int posx, int posy, int piece) {\n\t\tprevPosX = posx;\n\t\tprevPosY = posy;\n\t\tprevName = \"\" + prevPosX + \"\" + prevPosY;\n\t\tprevComp = (JLabel) curComp;\n\t\tprevPiece = piece;\n\t\tpiece = Logic.arr[posx][posy];\n\t}", "public Coordinates(int x, int y){\n this.x = x;\n th...
[ "0.6201974", "0.6036498", "0.60306984", "0.6002377", "0.5949957", "0.58880264", "0.5852175", "0.5805871", "0.57809186", "0.57526827", "0.57507056", "0.57507056", "0.57457525", "0.5742483", "0.5711121", "0.57064945", "0.5705684", "0.56927395", "0.5686061", "0.5671516", "0.5669...
0.0
-1
Return element from collection.
T get(int position);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static <T> T getSingleElement(Collection<T> collection) {\n\t\tif (collection.size() != 1)\n\t\t\tthrow new IndexOutOfBoundsException(String.format(\n\t\t\t\t\t\"Expected collection to contain a single element, but observed %d elements: %s\", collection.size(),\n\t\t\t\t\tcollection.toString()));\n\t\tretur...
[ "0.68764234", "0.6730466", "0.67214155", "0.66213953", "0.66182524", "0.66182524", "0.6615811", "0.65920925", "0.65790457", "0.656255", "0.656255", "0.6532577", "0.6525858", "0.652442", "0.6506664", "0.6462901", "0.6462647", "0.6446148", "0.6408218", "0.63999313", "0.639782",...
0.0
-1
Add new element to collection.
boolean add(T value);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void add(Object element);", "public void add(E element) {\n\t\t// your code here\n\t}", "public boolean add(Object element);", "public @Override boolean add(E element) {\n \tappend(element);\n \treturn true;\n }", "@Override\r\n\tpublic void add(T element) {\n\t\tthis._list.add(element);\r\n\t}", ...
[ "0.75069565", "0.75035554", "0.74293923", "0.7295888", "0.72158325", "0.71672136", "0.71672136", "0.714006", "0.7109686", "0.7097551", "0.6990513", "0.69456446", "0.69456446", "0.6925442", "0.6925442", "0.6852147", "0.68351394", "0.6827585", "0.6787604", "0.67726624", "0.6768...
0.0
-1
Check that given object contains at the collection.
boolean contains(Object o);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean contains(Object o);", "public boolean contains(Object o);", "public boolean contains(T obj) {\r\n\t\tlogger.trace(\"Enter contains\");\r\n\t\tlogger.trace(\"Exit contains\");\r\n\t\treturn data.contains(obj);\r\n\t}", "@Override\r\n\tpublic boolean contains(Object o) {\n\t\treturn set.contains...
[ "0.7393392", "0.7393392", "0.7236778", "0.7181101", "0.7119776", "0.7119776", "0.70301104", "0.7025098", "0.70090854", "0.69639474", "0.69634116", "0.69285613", "0.68921983", "0.68921983", "0.68921983", "0.686308", "0.6815819", "0.67485464", "0.67199725", "0.66746116", "0.666...
0.723054
5
Return size of collection.
int size();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int size() {\n return collection.size();\n }", "public int size() {\n\t\treturn collection.size();\n\t}", "public int size() {\n return this.collection.size();\n }", "public int getSize() {\n\t\treturn collection.size();\n\t\t\n\t}", "public int size() {\n maintain();\n ...
[ "0.8805773", "0.8772008", "0.87578076", "0.8690244", "0.86485904", "0.8614789", "0.8573273", "0.83600175", "0.8014422", "0.7958934", "0.79570156", "0.78075486", "0.7795024", "0.7759983", "0.7757619", "0.77405304", "0.77277046", "0.77151114", "0.77151114", "0.77151114", "0.770...
0.0
-1
Your code here calculate the mask
public void gaussianSmooth(Img i, double sigma) { int half = (int) (sigma * Math.sqrt(6 * Math.log(10))); int size = 1 + 2 * half; System.out.printf("Size: %d\n", size); double[] mask = new double[size]; double mask_sum = 0; for (int k = 0; k <= half; k++) { double value = Math.exp(-k * k / (2 * sigma * sigma)) / (sigma * Math.sqrt(2 * Math.PI)); mask_sum += (k == 0) ? value : value * 2; mask[half + k] = value; mask[half - k] = value; } // normalize the mask for (int k = 0; k < size; k++) { mask[k] = mask[k] / mask_sum; } System.out.printf("Mask: %s\n", Arrays.toString(mask)); // 2D convolution using 1D mask in x double[] i_temp = new double[i.img.length]; for (int x = 0; x < i.img.length; x++) { i_temp[x] = (double) (i.img[x] & 0xFF); } for (int x = half; x < i.height - half; x++) { for (int y = half; y < i.width - half; y++) { i_temp[x * i.width + y] = 0; for (int s = -half; s <= half; s++) { i_temp[x * i.width + y] += (double) (i.img[(x + s) * i.width + y] & 0xFF) * mask[half - s]; } } } // 2D convolution using 1D mask in y for (int x = half; x < i.height - half; x++) { for (int y = half; y < i.width - half; y++) { double f = 0; for (int s = -half; s <= half; s++) { f += i_temp[x * i.width + y + s] * mask[half - s]; } i.img[x * i.width + y] = (byte) f; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Long getResultMaskBoundary();", "byte[] networkMask();", "IntExpression implicitMask(Expression p) {\n\t\treturn p.join(mask).sum();\n\t}", "private static synchronized int nextMask() {\n return (int) Math.pow(2, maskCount++);\n }", "private android.graphics.Bitmap getMaskBitmap() {\n /*\n...
[ "0.69404143", "0.6556282", "0.6438727", "0.6375797", "0.6231888", "0.61662227", "0.6114166", "0.6076276", "0.5986424", "0.5926584", "0.59169745", "0.5903705", "0.59010404", "0.58893347", "0.5824921", "0.58088416", "0.57827127", "0.57741505", "0.57596374", "0.57462204", "0.573...
0.0
-1
Created by Fyj on 2016/6/6.
public interface MainContract { interface Model extends BaseModel { ArrayList<CustomTabEntity> getTabs(); ArrayList<Fragment> getFragments(); String[] getTitles(); } interface View extends BaseView { void updataListView(ArrayList<CustomTabEntity> tabs,ArrayList<Fragment> fragments,String[] titles); } abstract class Presenter extends BasePresenter<Model,View> { } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "public fina...
[ "0.61093843", "0.5976348", "0.588363", "0.58776504", "0.5856281", "0.5856281", "0.58463436", "0.57764745", "0.5752658", "0.5744669", "0.5730157", "0.57172984", "0.5709257", "0.56927115", "0.56724346", "0.56668144", "0.566238", "0.5653472", "0.5632274", "0.56050503", "0.557913...
0.0
-1
Set the default command for a subsystem here. setDefaultCommand(new MySpecialCommand());
public void initDefaultCommand() { setDefaultCommand(new articulateIntake()); //Make sure to only set the doublesolenoid to off if the last position of the intake was down /*if (downPosition == 1){ setDefaultCommand(new articulateIntake("down")); } else { setDefaultCommand(new articulateIntake("up")); }*/ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void initDefaultCommand() {\n // Set the default command for a subsystem here.\n // setDefaultCommand(new MySpecialCommand());\n }", "@Override\n public void initDefaultCommand() {\n // Set the default command for a subsystem here.\n // setDefaultCommand(new MySpecialCommand());...
[ "0.9324153", "0.9324153", "0.9176814", "0.9145523", "0.9120177", "0.91201586", "0.91201586", "0.91201586", "0.91201586", "0.9078301", "0.90563947", "0.89595234", "0.8956215", "0.88660914", "0.8796251", "0.8682107", "0.8648125", "0.864615", "0.85777426", "0.84162575", "0.84021...
0.0
-1
TO DO: need CSV data provider
@DataProvider public Object[][] correctData() { return new Object[][]{ {"nikol344265", "NikolR4551"} }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "CSV createCSV();", "public void createCSV() {\n\t\t// Need to integrate CSV calling logic\n\t}", "public interface CSVDataRow\n{\n String toLine();\n}", "@Override\n DBO consume(String csv) throws TransformerException;", "@Override\n\tpublic void parseCSV(String csv) {\n\t\t\n\t}", "public void ach...
[ "0.7344425", "0.72588205", "0.6924708", "0.6810622", "0.67159146", "0.6708786", "0.6688337", "0.6494188", "0.6477533", "0.6437457", "0.6430327", "0.637003", "0.6368264", "0.6361407", "0.6331905", "0.63183814", "0.62928", "0.6285145", "0.6262981", "0.62581897", "0.62411535", ...
0.0
-1
filter out all deprecated images
@Override public boolean apply(Image input) { return !(input.deprecated() != null && input.deprecated().state() != null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String removeImageStyle();", "@Test\n public void testImageFiltering()\n { \n String html = header + \"<img src=\\\"file://path/to/local/image.png\\\"/>\" + footer;\n Document doc = wysiwygHTMLCleaner.clean(new StringReader(html));\n NodeList nodes = doc.getElementsByTagName(\"i...
[ "0.6010135", "0.58008325", "0.56348425", "0.5627484", "0.54871416", "0.5336974", "0.5323418", "0.5320059", "0.51700187", "0.5164348", "0.5162703", "0.5068896", "0.5058625", "0.50416714", "0.5017555", "0.49791542", "0.49686792", "0.49667284", "0.49497998", "0.49392965", "0.492...
0.62335485
0
need to insert the network first
@Test(groups = "live") public void testInsertInstanceWindows() { assertOperationDoneSuccessfully(api.networks().createInIPv4Range (INSTANCE_NETWORK_NAME, IPV4_RANGE)); assertOperationDoneSuccessfully(diskApi().create(DISK_NAME, new DiskCreationOptions.Builder().sizeGb(DEFAULT_DISK_SIZE_GB).build())); assertOperationDoneSuccessfully(api().create(instance)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void testNetworkCreationValid() {\n\t\tassertEquals(N_TESTNODES, testNet.nodeCount());\n\t\tfor (int i = 0; i < testNodes.length; i++) {\n\t\t\tassertTrue(testNet.nodes().contains(testNodes[i]));\n\t\t\tassertEquals(i, testNodes[i].getSimulationId());\n\t\t}\n\n\t\t// Test that link insertion works...
[ "0.6092745", "0.60609806", "0.5941872", "0.593269", "0.5769822", "0.5767407", "0.5760132", "0.5730199", "0.57219875", "0.5712728", "0.5692875", "0.56907666", "0.56868", "0.5663361", "0.5661651", "0.5642575", "0.56002253", "0.5592729", "0.5591315", "0.5584356", "0.55777436", ...
0.0
-1
Dijkstra Shortest Path Algorithm
public int[] getDijkstraSP(int source) { int[] distance = new int[this.v]; Arrays.fill(distance, Integer.MAX_VALUE); distance[source] = 0; Queue<Distance> q = new LinkedList<>();//new PriorityQueue<>(); q.add(new Distance(source, 0)); boolean[] visited = new boolean[this.v]; while(!q.isEmpty()) { Distance e = q.poll(); if(visited[e.vertex]) { continue; } visited[e.vertex] = true; List<Edge> list = this.edges.get(e.vertex); for(Edge adjEdge : list) { if((long)distance[adjEdge.from] + adjEdge.weight < distance[adjEdge.to]) { distance[adjEdge.to] = distance[adjEdge.from] + adjEdge.weight; q.add(new Distance(adjEdge.to, distance[adjEdge.to])); //System.out.println(Arrays.toString(distance)); } } } return distance; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void computeShortestPath(){\n T current = start;\n boolean atEnd = false;\n while (!unvisited.isEmpty()&& !atEnd){\n int currentIndex = vertexIndex(current);\n LinkedList<T> neighbors = getUnvisitedNeighbors(current); // getting unvisited neighbors\n \n //what is ...
[ "0.79563457", "0.7915737", "0.79086435", "0.78188735", "0.7649311", "0.7638876", "0.76002276", "0.75538284", "0.75527674", "0.7529396", "0.7483125", "0.7477229", "0.7460363", "0.7440352", "0.7374221", "0.7351855", "0.73455614", "0.73260343", "0.73044074", "0.73016614", "0.728...
0.0
-1
Creates new form Usuario
public ViewPerfil() { initComponents(); carregaperfil(); setLocationRelativeTo(null); habilitarDesabilitarCampos(false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Usuario() {\r\n }", "public Usuario() {\r\n }", "public Usuario () {\r\n\t\t\r\n\t\t\r\n\t}", "public UsuarioControlador() {\n }", "@RequestMapping( method = RequestMethod.GET )\n\tpublic String showUserForm( ModelMap model, HttpServletRequest request ) {\n\t\tUsuario usuario = new Usuario(...
[ "0.7110446", "0.7110446", "0.68567115", "0.6853482", "0.6830427", "0.67445874", "0.6741504", "0.66978693", "0.6686097", "0.66764826", "0.6663584", "0.6646601", "0.6638224", "0.6635426", "0.65903383", "0.65716696", "0.6555039", "0.65482056", "0.6537012", "0.65044236", "0.64830...
0.0
-1
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel1 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jtfCodigo = new javax.swing.JTextField(); jLabel2 = new javax.swing.JLabel(); jtfNome = new javax.swing.JTextField(); jScrollPane1 = new javax.swing.JScrollPane(); jtUsuario = new javax.swing.JTable(); jbSalvar = new javax.swing.JButton(); jbAlterar = new javax.swing.JButton(); jbNovo = new javax.swing.JButton(); jbCancelar = new javax.swing.JButton(); jbExcluir = new javax.swing.JButton(); jLabel7 = new javax.swing.JLabel(); jtfPesquisa = new javax.swing.JTextField(); jButton1 = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setTitle("Usuario"); jLabel1.setText("Código"); jtfCodigo.setEditable(false); jLabel2.setText("Nome"); jtUsuario.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { {null, null}, {null, null}, {null, null}, {null, null} }, new String [] { "Código", "Nome" } ) { Class[] types = new Class [] { java.lang.Integer.class, java.lang.String.class }; boolean[] canEdit = new boolean [] { false, false }; public Class getColumnClass(int columnIndex) { return types [columnIndex]; } public boolean isCellEditable(int rowIndex, int columnIndex) { return canEdit [columnIndex]; } }); jScrollPane1.setViewportView(jtUsuario); if (jtUsuario.getColumnModel().getColumnCount() > 0) { jtUsuario.getColumnModel().getColumn(0).setMinWidth(50); jtUsuario.getColumnModel().getColumn(0).setPreferredWidth(50); jtUsuario.getColumnModel().getColumn(0).setMaxWidth(50); } jbSalvar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/imagens/if_save_2561379.png"))); // NOI18N jbSalvar.setText("Salvar"); jbSalvar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jbSalvarActionPerformed(evt); } }); jbAlterar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/imagens/if_new-24_103173.png"))); // NOI18N jbAlterar.setText("Alterar"); jbAlterar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jbAlterarActionPerformed(evt); } }); jbNovo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/imagens/if_new10_216291.png"))); // NOI18N jbNovo.setText("Novo"); jbNovo.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jbNovoActionPerformed(evt); } }); jbCancelar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/imagens/if_cancel_216128.png"))); // NOI18N jbCancelar.setText("Cancelar"); jbCancelar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jbCancelarActionPerformed(evt); } }); jbExcluir.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/imagens/if_cross-24_103181.png"))); // NOI18N jbExcluir.setText("Excluir"); jbExcluir.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jbExcluirActionPerformed(evt); } }); jLabel7.setText("Pesquisar"); jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/imagens/if_70_111121.png"))); // NOI18N jButton1.setText("Pesquisar"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane1) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() .addGap(0, 0, Short.MAX_VALUE) .addComponent(jLabel7) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jtfPesquisa, javax.swing.GroupLayout.PREFERRED_SIZE, 342, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jButton1)) .addGroup(jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jtfCodigo, javax.swing.GroupLayout.PREFERRED_SIZE, 82, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jtfNome, javax.swing.GroupLayout.PREFERRED_SIZE, 235, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jLabel1) .addGap(63, 63, 63) .addComponent(jLabel2)) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jbCancelar) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jbNovo) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jbAlterar) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jbSalvar) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jbExcluir))) .addGap(0, 0, Short.MAX_VALUE))) .addContainerGap()) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel1) .addComponent(jLabel2)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jtfCodigo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jtfNome, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel7) .addComponent(jtfPesquisa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jButton1)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jbCancelar) .addComponent(jbNovo) .addComponent(jbAlterar) .addComponent(jbSalvar) .addComponent(jbExcluir)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) ); pack(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n ...
[ "0.73191476", "0.72906625", "0.72906625", "0.72906625", "0.72860986", "0.7248112", "0.7213479", "0.72078276", "0.7195841", "0.71899796", "0.71840525", "0.7158498", "0.71477973", "0.7092748", "0.70800966", "0.70558053", "0.69871384", "0.69773406", "0.69548076", "0.69533914", "...
0.0
-1
Database queires for get todos
public List<TodoItemEntity> findAll(){ return todoItemRepository.findAll(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Todo> getAllTodos() {\n List<Todo> todos = new ArrayList<>();\n\n String TASKS_SELECT_QUERY = String.format(\"SELECT * FROM %s\", TABLE_TODOS);\n\n // \"getReadableDatabase()\" and \"getWriteableDatabase()\" return the same object (except under low\n // disk space scenarios)...
[ "0.70927775", "0.68417954", "0.6725145", "0.67200357", "0.6715865", "0.6600629", "0.65915346", "0.6570254", "0.6342951", "0.6201669", "0.6166744", "0.6159688", "0.6143821", "0.6115564", "0.6107867", "0.6107265", "0.60704017", "0.6069535", "0.6041003", "0.60052454", "0.5998493...
0.6045228
18
Interface de la factory de l'application
public interface IFactory { /** * créer un service transactionel (un proxy de service) gérant les Users * * @param caller * objet transactionel appelant ce service. null si début de * transaction * @return */ public abstract IUserService createUserService(ITransactional caller); /** * créer un dao transactionel dédié à la table utilisateur (un proxy de dao) * * @param caller * objet transactionel appelant ce service. null si début de * transaction * @return */ public abstract IUtilisateurDAO createUserDAO(ITransactional caller); /** * créer un dao transactionel dédié à la table cursus (un proxy de dao) * * @param caller * objet transactionel appelant ce service. null si début de * transaction * @return */ public abstract ICursusDAO createCursusDAO(ITransactional caller); /** * créer un dao transactionel dédié à la table competence (un proxy de dao) * * @param caller * objet transactionel appelant ce service. null si début de * transaction * @return */ public abstract ICompetenceDAO createCompetenceDAO(ITransactional caller); public abstract INiveauxDAO createNiveauDAO(ITransactional caller); public abstract IProfilDAO createProfilDAO(ITransactional caller); public abstract IGroupeDAO createGroupeDAO(ITransactional caller); public abstract IFenetreDAO createFenetreDAO(ITransactional caller); public abstract IFonctionDAO createFonctionDAO(ITransactional caller); public abstract INatureDAO createNatureDAO(ITransactional caller); public abstract IDroitDAO createDroitDAO(ITransactional caller); public abstract ISecurityService createSecurityService(ITransactional caller); public abstract IProjectService createProjectService(ITransactional caller); public abstract IKeywordDAO createKeywordDAO(ITransactional caller); public abstract IStatutDAO createStatutDAO(ITransactional caller); public abstract IAdresseDAO createAdresseDAO(ITransactional caller); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface Factory {\n LeiFeng createLeiFeng();\n}", "public interface Factory {\r\n}", "public interface IMainframeFactory {\n\n\t/**\n\t * \n\t * @return new instance of IMainframe\n\t */\n\tIMainframe createInstance();\n}", "public interface FakeApplicationFactory {\n\n Application buildApplicat...
[ "0.75126815", "0.73388946", "0.70479727", "0.69899195", "0.6956935", "0.68957806", "0.6889476", "0.68646485", "0.68556696", "0.68502283", "0.684204", "0.67734694", "0.6756545", "0.67500275", "0.6747757", "0.674717", "0.6720668", "0.67057556", "0.6705087", "0.6699874", "0.6699...
0.0
-1
/ Plays a chip of the Player in the GameField, if the InputColumn is valid. While the userInput is not valid, write errormessage and continue asking, until user entered a valid value.
public void makeMove(GameVersion game){ while(!this.inputType.waitForValidUserInput(game)){ try {Thread.sleep(500); }catch(InterruptedException e) {} } int userInput = this.inputType.getUserInput(game); game.board.playChip(userInput, this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void userPosition(char inputCharUser, char[][] board) {\r\n\t int row = 0;\r\n\t int col = 0;\r\n\r\n\t //Only break out of the while loop once the user enters a valid position\r\n\t while(true) {\r\n\t System.out.print(\"Enter a row number (0, 1, or 2): \");\r\...
[ "0.6101798", "0.5968689", "0.5907111", "0.58951557", "0.58880657", "0.586893", "0.5690301", "0.5687359", "0.56858146", "0.56844723", "0.56536776", "0.56329846", "0.5615857", "0.56151086", "0.5599103", "0.55763316", "0.5540672", "0.55332124", "0.55192435", "0.54843754", "0.547...
0.0
-1
Returns the row count for ListView display purposes
@Override public int getCount() { return getRowCount(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getCount() {\n\t\treturn mNumRows;\n\t}", "public abstract int getViewRowCount();", "int getRowsCount();", "@Override\n\t\t\t\tpublic int getViewRowCount() {\n\t\t\t\t\treturn model.getListaBase().size();\n\t\t\t\t}", "public int getRowCount() {\n if (rowBuilder_ == null) {\n ret...
[ "0.78423077", "0.77897054", "0.7476315", "0.73629636", "0.7300916", "0.7300916", "0.7300916", "0.7300916", "0.7300916", "0.7300916", "0.7275338", "0.72680587", "0.72667027", "0.72180057", "0.72063965", "0.7205666", "0.7156657", "0.71566445", "0.71566445", "0.71566445", "0.715...
0.7181759
16
You'll notice that this prints to the console output in no particular order (and it changes every time you run your Java program). This is because "PCollection" does not preserve/maintain order at all (for the sake of maximum parallelization).
@ProcessElement public void process(@Element String elem, OutputReceiver<MyProduct> out) { LOG.info("Line read: {}\n", elem); //------------------------------------------------------------------ out.output(getMyProduct(elem)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void print() {\n for (Process process : workload) {\n System.out.println(process);\n }\n }", "public static void oldTest1()\r\n\t{\n\t\tArrayList personlist = new ArrayList();\r\n\t\tpersonlist.add(new Person(\"one\"));\r\n\t\tpersonlist.add(new Person(\"two\"));\r\n\t\tpersonlist.add...
[ "0.6289169", "0.5888968", "0.5750819", "0.56944275", "0.56673783", "0.56603175", "0.5634266", "0.561153", "0.56075567", "0.56006557", "0.55847657", "0.5574067", "0.5539443", "0.5536219", "0.5511192", "0.55026406", "0.5495149", "0.5485029", "0.547777", "0.54747427", "0.5456208...
0.0
-1
Notice that the method signature differs in this DoFn and the one from earlier.
@ProcessElement public void process(ProcessContext c) { MyProduct elem = c.element(); c.output(KV.of(elem.getId(), elem)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "SliceDto operate(SliceDataManager sliceDataManager, SliceDto reqSliceDto) throws MloClientException;", "@Override\n\tpublic void call() {\n\t\t\n\t}", "@Override\n public void apply() {\n }", "public interface MutableDataService<U> extends RetrievalService<U> {\n\n /**\n * Create a resource in t...
[ "0.5058979", "0.501869", "0.49256915", "0.48945835", "0.48611882", "0.4860284", "0.48361567", "0.48294398", "0.48216915", "0.48185575", "0.48157084", "0.47468805", "0.4746347", "0.47403172", "0.4714765", "0.47141808", "0.47072506", "0.46848777", "0.46799022", "0.46706232", "0...
0.0
-1
TODO 3 This method works OK for the input files provided. However, if the Product ID contains a comma or some lines are invalid, then this approach may not work properly. What would be a better way to parse CSV files?
static MyProduct getMyProduct(String line) { // Assuming that the input data is 'valid', we can tokenize each line to three String literals. // These tokens correspond to product ID, units sold, and revenue. String[] tokens = line.split(","); MyProduct.Builder prodBuilder = MyProduct.newBuilder(); // You can "set" the value of a field like this: prodBuilder.setId(tokens[0]); // You can chain multiple calls to setters, too. prodBuilder.setUnitsSold(Integer.parseInt(tokens[1])).setRevenue(Integer.parseInt(tokens[2])); // 'build()' will create a new object based on the values set in the builder object. return prodBuilder.build(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static public List<Product> productReader() throws IOException {\n BufferedReader csvReader = new BufferedReader(new FileReader(PRODUCTS_REFERENCE_FILE));\n String row;\n List<Product> dataList = new ArrayList<>();\n\n row = csvReader.readLine();\n while ((row = csvReader.readLin...
[ "0.6858164", "0.6663647", "0.6555449", "0.6524164", "0.63292956", "0.6287049", "0.6258732", "0.6220116", "0.61392456", "0.60489726", "0.60377324", "0.6020361", "0.5966387", "0.5947696", "0.5882933", "0.5847681", "0.5826655", "0.5819379", "0.5817148", "0.5808339", "0.57879734"...
0.0
-1
SELECT StageBox.x, StageBox.y, Boxes.name FROM StageBox, Boxes WHERE StageBox.boxidx = Boxes.idx AND StageBox.stageidx=1
public int loadFrames(int id, ArrayList<StageData.Box> frames) { String sql = "SELECT "// + TABLE_NAME_BOXES + "." + TABLE_COLUMN_NAME + "," + TABLE_NAME_BOXES + "." + TABLE_COLUMN_INDEX + "," + TABLE_NAME_BOXES + "." + TABLE_COLUMN_NAME + "," + TABLE_NAME_BOXES + "." + TABLE_COLUMN_RACE + "," + TABLE_NAME_BOXES + "." + TABLE_COLUMN_TYPE + "," + TABLE_NAME_BOXES + "." + TABLE_COLUMN_SHAPE + "," + TABLE_NAME_BOXES + "." + TABLE_COLUMN_WIDTH + "," + TABLE_NAME_BOXES + "." + TABLE_COLUMN_HEIGHT + "," + TABLE_NAME_BOXES + "." + TABLE_COLUMN_ANGLE + "," + TABLE_NAME_BOXES + "." + TABLE_COLUMN_DENSITY + "," + TABLE_NAME_BOXES + "." + TABLE_COLUMN_RESTITUTION + "," + TABLE_NAME_BOXES + "." + TABLE_COLUMN_FRICTION + "," + TABLE_NAME_BOXES + "." + TABLE_COLUMN_FILTERBITS + "," + TABLE_NAME_BOXES + "." + TABLE_COLUMN_TEXTUREINDEX + "," + TABLE_NAME_BOXES + "." + TABLE_COLUMN_ANIMATIONINDEX + "," + TABLE_NAME_STAGEBOX + "." + TABLE_COLUMN_X + "," + TABLE_NAME_STAGEBOX + "." + TABLE_COLUMN_Y// + "," // + TABLE_NAME_STAGEBOX + "." + TABLE_COLUMN_PRESENTTIME + " FROM " + TABLE_NAME_BOXES + "," + TABLE_NAME_STAGEBOX + " WHERE " + TABLE_NAME_BOXES + "." + TABLE_COLUMN_INDEX + "=" + TABLE_NAME_STAGEBOX + "." + TABLE_COLUMN_BOXINDEX + " AND " + TABLE_NAME_STAGEBOX + "." + TABLE_COLUMN_STAGEINDEX + "=" + id + " AND " + TABLE_NAME_STAGEBOX + "." + TABLE_COLUMN_PRESENTTIME + "= -1"; try { ResultSet res = querySQL(sql); while(res.next()) { StageData.Box box = new StageData.Box(); box.id = res.getInt(1); box.name = res.getString(2); box.race = covertBoxRace(res.getInt(3)); box.type = covertBoxType(res.getInt(4)); box.shape = convertBoxShape(res.getInt(5)); box.width = res.getInt(6); box.height = res.getInt(7); box.angle = res.getFloat(8); box.density = res.getFloat(9); box.restitution = res.getFloat(10); box.friction = res.getFloat(11); box.filterBits = (short)res.getInt(12); box.texture = res.getInt(13); box.animation = res.getInt(14); box.x = res.getInt(15); box.y = res.getInt(16); frames.add(box); } res.close(); } catch (SQLException e) { Gdx.app.log(Global.APP_TAG, "dbaccess exception - " + e.toString()); return -1; } return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void calcBoxVerts() {\n\t\tif (verts != null) {\n\t\t\tdouble minX = verts[0].getElement(0);\n\t\t\tdouble maxX = minX;\n\t\t\tdouble minY = verts[0].getElement(1);\n\t\t\tdouble maxY = minY;\n\t\t\tdouble minZ = verts[0].getElement(2);\n\t\t\tdouble maxZ = minZ;\n\t\t\tfor (int i = 1; i < verts.length; i+...
[ "0.54534787", "0.52974147", "0.529277", "0.526171", "0.5189668", "0.518056", "0.5135981", "0.5102169", "0.5099085", "0.50449353", "0.5037372", "0.49703598", "0.4948506", "0.49301213", "0.49237776", "0.49213246", "0.4916215", "0.4912094", "0.49079642", "0.48828757", "0.4881207...
0.51923275
4
Set Seed for Initialization of Agents and Populations
public void setSeed(int seed){ this.seed = seed; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void initialize() {\n\t\tinitialize(seedValue0, seedValue1);\n\t}", "public Seed() {\r\n\t\tcards = new Cards();\r\n\t\tseedCards = new ArrayList<Cards>();\r\n\t\tdescription = \"\";\r\n\t\tautoSummary = \"\";\r\n\t}", "Seed(){\r\n seedCells = new ArrayList<>();\r\n edgeCells = new ArrayLi...
[ "0.65155506", "0.6486056", "0.63683736", "0.62447953", "0.62233424", "0.6207705", "0.61316264", "0.6107863", "0.6104313", "0.61003554", "0.6085997", "0.60801125", "0.6073071", "0.6065431", "0.6056414", "0.60558486", "0.6055356", "0.60133135", "0.5983978", "0.596144", "0.59602...
0.64058495
2
Returns the Initialization seed
public int getSeed(){ return this.seed; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static long getSeed() {\r\n return seed;\r\n }", "public int getSeed() {\r\n return seed;\r\n }", "public int getSeed() {\n return seed;\n }", "public int getSeed() {\n return seed;\n }", "public long getSeed() {\n return seed;\n }", "public long getSeed...
[ "0.78930646", "0.7766628", "0.7720611", "0.7720611", "0.7715619", "0.7700297", "0.7658765", "0.7639659", "0.76011026", "0.7548581", "0.7480809", "0.7430172", "0.7179742", "0.7012619", "0.69901496", "0.67159605", "0.67063683", "0.66343004", "0.6587754", "0.656058", "0.6505441"...
0.7226657
12
Method to initialize Populations requested from the user. Depending on the number requested, a Single Population Class is created (when one is set) or a Multi Population Class (over one population) To create the populations, we overload the same method.
public ArrayList<Population> InitializePopulations (int NumberOfPopulations, int NumberOfAgents){ ArrayList<Population> PopulationsList = new ArrayList(); if(NumberOfPopulations == 1){ PopulationsList.add(InitSinglePopulation(NumberOfAgents)); }else{ for(int i = 0; i < NumberOfPopulations; i++){ double temp = rand.nextDouble(); PopulationsList.add(InitSinglePopulation(i, NumberOfAgents, temp)); } } return PopulationsList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void initializePopulation(){\n\t\t// create the population\n\t\tfor(int i = 0; i < POPULATION_SIZE; i++){\n\t\t\t// get a random length for the building sequence\n\t\t\tint randArraySize = randomGenerator.nextInt(possiblePieces.length-1)+1;\n\t\t\t\n\t\t\tBuildingPiece[] pieceSequence = new BuildingPiece[ra...
[ "0.6667392", "0.6522867", "0.63956434", "0.6374002", "0.6363828", "0.6322152", "0.6142106", "0.6128648", "0.6093163", "0.6037591", "0.60314536", "0.5974116", "0.5939253", "0.59356177", "0.5890567", "0.58855224", "0.58140016", "0.58022404", "0.57689416", "0.57672036", "0.57120...
0.6873851
0
Method to create a Single Population.
public Population InitSinglePopulation(int NumberOfAgents) { SinglePopulation TempPopulation = new SinglePopulation(); TempPopulation.setPopulationID(0); for(int j = 0; j < NumberOfAgents; j++){ SinglePopulationAgent TempAgentS = new SinglePopulationAgent(j,rand.nextDouble()); boolean InitAction = (rand.nextDouble() < TempAgentS.getStrategy()) ? true : false; TempAgentS.setAction(InitAction); TempPopulation.AgentList.add(TempAgentS); } TempPopulation.setStrategyList(); TempPopulation.setActionList(); return TempPopulation; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected Population(Infrastructure infra)\n\t\t{\tinds = new Individual[NUMBER_INDIVIDUALS];\n\t\t\tfor(int i=0;i<NUMBER_INDIVIDUALS;i++)\n\t\t\t\tinds[i] = new Individual(infra);\n\t\t\tthis_ind = 0;\n\t\t\tthis_gen = 0;\n\t\t}", "public Population InitSinglePopulation\n (int PopulationID, int ...
[ "0.6127338", "0.5971105", "0.58620024", "0.5844841", "0.5815146", "0.5720398", "0.56773806", "0.56092864", "0.5582343", "0.55551285", "0.55232745", "0.55064577", "0.5383884", "0.529601", "0.52950156", "0.52862626", "0.5267721", "0.5229795", "0.52194875", "0.51982415", "0.5154...
0.58027774
5
Method overloaded to create Multi Population.
public Population InitSinglePopulation (int PopulationID, int NumberOfAgents, double MixedStrategy){ MultiPopulation TempPopulation = new MultiPopulation(); TempPopulation.setPopulationID(PopulationID); TempPopulation.setInitMixedStrategy(MixedStrategy); for(int j = 0; j < NumberOfAgents; j++){ double TempDraw = rand.nextDouble(); boolean TempAction = (TempDraw < MixedStrategy) ? true : false; MultiPopulationAgent TempAgentM = new MultiPopulationAgent(j,PopulationID,TempAction); TempPopulation.AgentList.add(TempAgentM); } TempPopulation.setActionList(); return TempPopulation; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Population(int indivCount) {\n this.indivCount = indivCount;\n layers = new ArrayList<>();\n individuals = new Individual[indivCount];\n }", "Multi createMulti();", "protected Population(Infrastructure infra)\n\t\t{\tinds = new Individual[NUMBER_INDIVIDUALS];\n\t\t\tfor(int i=0;i...
[ "0.5911739", "0.5881375", "0.5847855", "0.57098806", "0.5703853", "0.56730694", "0.564314", "0.5583263", "0.55054295", "0.5486395", "0.54047966", "0.53794366", "0.5359637", "0.52454007", "0.5234072", "0.5234072", "0.5204293", "0.5200257", "0.51795536", "0.51752126", "0.515518...
0.62689126
0