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
Encodes a tree to a single string.
public String serialize(TreeNode root) { if(root == null) { return ""; } if(root.left == null && root.right == null) { return "" + root.val; } String s = serialize(root.left); s = "(" + s + ")" + "(" + root.val + ")"; s += "(" + serialize(root.right) + ")"; return s; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void encodeTree(){\n StringBuilder builder = new StringBuilder();\n encodeTreeHelper(root,builder);\n }", "public TreeNode encode(Node root) {\n return en(root);\n }", "public String toTreeString() {\n return toTreeString(overallRoot);\n }", "public String tree2Str(Tree...
[ "0.79797685", "0.7266544", "0.6766947", "0.67098355", "0.65929043", "0.6520053", "0.651422", "0.6502086", "0.6480438", "0.6466228", "0.6452631", "0.6446793", "0.64218706", "0.6407569", "0.64030504", "0.64030504", "0.64030504", "0.6394578", "0.6385417", "0.6381468", "0.6373514...
0.6446198
12
Decodes your encoded data to tree.
public TreeNode deserialize(String data) { if(!data.contains("(") && !data.contains(")")) { if(data.length() == 0) { return null; }else { return new TreeNode(Integer.valueOf(data)); } } int count = 0; int index = 0; int start = 0; while(index < data.length()) { if(data.charAt(index) == '(') { count ++; } if(data.charAt(index) == ')') { count --; } if(count == 0) { start = index; break; } index ++; } start ++; int temp = start + 1; while(temp < data.length()) { if(data.charAt(temp) == ')') { break; } temp ++; } TreeNode root = new TreeNode(Integer.valueOf(data.substring(start + 1, temp))); root.left = deserialize(data.substring(1, start - 1)); root.right = deserialize(data.substring(temp + 2, data.length() - 1)); return root; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public TreeNode deserialize(String data) {\n byte[] bytes = Base64.getDecoder().decode(data);\n IntBuffer intBuf = ByteBuffer.wrap(bytes)\n .order(ByteOrder.BIG_ENDIAN).asIntBuffer();\n int[] nums = new int[intBuf.remaining()];\n intBuf.get(nums);\n //for (int i = 0; i...
[ "0.6894664", "0.6808548", "0.650279", "0.64891165", "0.64851105", "0.6415433", "0.6362339", "0.63083476", "0.6284537", "0.622987", "0.6213446", "0.6161982", "0.6147146", "0.6140804", "0.6133282", "0.6078927", "0.6073399", "0.6069482", "0.6064389", "0.60632867", "0.6053727", ...
0.58938473
34
given a key, return the node/bucket associated
private Node _locate(Object key){ int hashCode = key.hashCode(); int bucketNum = hashCode % _numBuckets; return _locate(key, bucketNum); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Node _locate(Object key, int bucketNum){\n\t\tNode bucketList = _buckets[bucketNum];\r\n\t\twhile(bucketList != null)\r\n\t\t{\r\n\t\t\tif(key == bucketList._key){\t\t\t\t// If the key matches the key of the current node\r\n\t\t\t\tbreak;\t\t\t\t\t\t\t\t// in bucketList, then return the bucketList.\r\n\t\t...
[ "0.71577233", "0.6909171", "0.6814438", "0.6803315", "0.6751971", "0.67115253", "0.66648376", "0.6656912", "0.6624531", "0.66192746", "0.66135013", "0.65894395", "0.65642", "0.6558087", "0.65086025", "0.6487823", "0.6485923", "0.64411664", "0.64212906", "0.6409452", "0.640574...
0.7489827
0
given a key and bucket number return the node associated
private Node _locate(Object key, int bucketNum){ Node bucketList = _buckets[bucketNum]; while(bucketList != null) { if(key == bucketList._key){ // If the key matches the key of the current node break; // in bucketList, then return the bucketList. } bucketList = bucketList._nextNode; // Otherwise move to the next node. } return bucketList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Node _locate(Object key){\n\t\tint hashCode = key.hashCode();\r\n\t\tint bucketNum = hashCode % _numBuckets;\r\n\t\treturn _locate(key, bucketNum);\r\n\t}", "private LinkedList<Entry> chooseBucket(Object key) { \t\n // hint: use key.hashCode() to calculate the key's hashCode using its built in ...
[ "0.7436463", "0.6944765", "0.65451384", "0.64785045", "0.638479", "0.6270055", "0.62449783", "0.6232887", "0.6224324", "0.61769", "0.6124526", "0.61164844", "0.60994655", "0.6068473", "0.60395277", "0.60387737", "0.6030958", "0.59997886", "0.5989603", "0.5968423", "0.5928811"...
0.76039785
0
if a key already exists, replace the associated value with a new value, otherwise create a new key with associated value.
public void add(Object key, Object value){ int bucketLoc = key.hashCode() % _numBuckets; if(_locate(key) == null){ Node newNode = new Node(key,value,_buckets[bucketLoc]); _buckets[bucketLoc] = newNode; _count++; _loadFactor = (double) _count / (double) _numBuckets; if(_loadFactor > _maxLoadFactor){ _increaseTableSize(); } }else{ _buckets[bucketLoc]._value = value; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Key replaceKey(Entry<Key, Value> entry, Key key) throws InvalidKeyException;", "@Override\n public T put(String key, T value) {\n T old = null;\n // Do I have an entry for it already?\n Map.Entry<String, T> entry = entries.get(key);\n // Was it already there?\n if (entry != ...
[ "0.6652233", "0.6628335", "0.66056126", "0.6596234", "0.648704", "0.6404085", "0.6402029", "0.63410294", "0.63368636", "0.6330906", "0.6271388", "0.6258899", "0.6258899", "0.62588704", "0.6240841", "0.6214486", "0.62009364", "0.6197342", "0.6159228", "0.6144953", "0.61355484"...
0.0
-1
increase the _buckets array by double plus 1 (to make it odd)
public void _increaseTableSize(){ Node[] largerBuckets = new Node[_numBuckets * 2 + 1]; Node[] oldBuckets = _buckets; _buckets = largerBuckets; _numBuckets = _numBuckets * 2 + 1; _count = 0; _loadFactor = 0.0; int i = 0; for(Node eachNode : oldBuckets){ _buckets[i] = eachNode; i++; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void insertToBucket()\n {\n int value = 0;\n value = valueCheck(value);\n \n //inserts value in the array to the buckets\n if(value == 0)\n {\n zero.add(a[k]);\n a[k] = 0;\n }\n if(value == 1)\n {\n one.add(a[...
[ "0.6714259", "0.65596867", "0.6395842", "0.63109636", "0.612469", "0.61138695", "0.60728085", "0.5994102", "0.59876287", "0.5972476", "0.59521854", "0.5875984", "0.58308095", "0.5827754", "0.58193547", "0.57874686", "0.57803977", "0.5775391", "0.57344276", "0.57285875", "0.56...
0.6553501
2
get the value of a node given the key
public Object get(Object key){ Node tempNode = _locate(key); if(tempNode != null){ return tempNode._value; }else{ return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public T getValue(String key) {\r\n\t\tNode node = getNode(root, key, 0);\r\n\t\treturn node == null ? null : node.value;\r\n\t}", "public Value get(String key) {\n Node x = get(root, key, 0);\n if (x == null) return null; //node does not exist\n else return (Value) x.val; //found node, but ...
[ "0.83113974", "0.8217724", "0.81723446", "0.7926984", "0.7826818", "0.7823639", "0.78197134", "0.77153546", "0.7655337", "0.7642205", "0.7597752", "0.7588787", "0.75158167", "0.7501304", "0.74183947", "0.7416977", "0.74067247", "0.7406652", "0.740636", "0.74001193", "0.737850...
0.80722934
3
display all the nodes/buckets in _buckets
public void dump(){ for(int n=0; n<_numBuckets; n++){ Node current = _buckets[n]; if(current != null){ System.out.println(n + ": " + current.toString()); }else{ System.out.println(n + ": null"); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic String toString(){\n\t\tString s = \"{\";\r\n\t\tboolean first = true;\r\n\t\tfor(int n=0; n<_numBuckets; n++)\r\n\t\t{\r\n\t\t\tNode node = _buckets[n];\r\n\t\t\tif(node != null)\r\n\t\t\t{\r\n\t\t\t\tif(first)\r\n\t\t\t\t\tfirst = false;\r\n\t\t\t\telse\r\n\t\t\t\t\ts += \", \";\r\n\t\t\t\t...
[ "0.74347854", "0.69650996", "0.640419", "0.6337587", "0.6278845", "0.6275701", "0.6155704", "0.6057339", "0.58827364", "0.5770537", "0.576094", "0.57297313", "0.5701157", "0.56738615", "0.5672475", "0.5660907", "0.56353575", "0.5613456", "0.5598881", "0.5587432", "0.55825824"...
0.7308633
1
more useful toString method that shows only the nodes in the _buckets array
@Override public String toString(){ String s = "{"; boolean first = true; for(int n=0; n<_numBuckets; n++) { Node node = _buckets[n]; if(node != null) { if(first) first = false; else s += ", "; s += node.toString(); } } s += "}"; return s; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void dump(){\n\t\tfor(int n=0; n<_numBuckets; n++){\r\n\t\t\tNode current = _buckets[n];\r\n\t\t\tif(current != null){\r\n\t\t\t\tSystem.out.println(n + \": \" + current.toString());\r\n\t\t\t}else{\r\n\t\t\t\tSystem.out.println(n + \": null\");\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n\tpublic String toS...
[ "0.7671741", "0.7480511", "0.7133709", "0.70078343", "0.6769081", "0.6734883", "0.67244625", "0.670923", "0.66965", "0.6626328", "0.6621995", "0.6613633", "0.65962183", "0.6577953", "0.65718424", "0.6558401", "0.6549356", "0.6531132", "0.65003", "0.6427381", "0.64057654", "...
0.8874604
0
Creates new form VentanaProducto
public VentanaProducto(java.awt.Frame parent, boolean modal) { super(parent, modal); initComponents(); setLocationRelativeTo(null); visibilidad(false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public VentanaCrearProducto(ControladorProducto controladorProducto) {\n initComponents();\n this.controladorProducto=controladorProducto;\n txtCodigoCrearProducto.setText(String.valueOf(this.controladorProducto.getCodigo()));\n this.setSize(1000,600);\n }", "@GetMapping(\"/product...
[ "0.7400511", "0.7223689", "0.71126515", "0.71116763", "0.7004844", "0.6980457", "0.69566506", "0.68455213", "0.6844758", "0.6820614", "0.68175465", "0.6811651", "0.67326206", "0.66724277", "0.66269034", "0.6622402", "0.65901184", "0.65818596", "0.6570259", "0.65475714", "0.65...
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(); lblID = new javax.swing.JLabel(); lblNombre = new javax.swing.JLabel(); lblPrecio = new javax.swing.JLabel(); lblDescripcion = new javax.swing.JLabel(); lblCategoria = new javax.swing.JLabel(); lblFecha = new javax.swing.JLabel(); txtID = new javax.swing.JTextField(); txtNombre = new javax.swing.JTextField(); txtPrecio = new javax.swing.JTextField(); txtDescripcion = new javax.swing.JTextField(); txtCategoria = new javax.swing.JTextField(); txtFecha = new javax.swing.JTextField(); jScrollPane1 = new javax.swing.JScrollPane(); tablaDatos = new javax.swing.JTable(); jLabel1 = new javax.swing.JLabel(); panelBotones = new javax.swing.JPanel(); btnCerrar = new javax.swing.JButton(); jToolBar1 = new javax.swing.JToolBar(); btnNuevo = new javax.swing.JButton(); btnGuardar = new javax.swing.JButton(); btnEliminar = new javax.swing.JButton(); btnActualizar = new javax.swing.JButton(); btnBuscar = new javax.swing.JButton(); jLabel2 = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); lblID.setText("ID:"); lblNombre.setText("Nombre:"); lblPrecio.setText("Precio:"); lblDescripcion.setText("Descripción:"); lblCategoria.setText("Categoría:"); lblFecha.setText("Fecha registro:"); txtID.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { txtIDActionPerformed(evt); } }); txtFecha.setEnabled(false); tablaDatos.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { }, new String [] { } )); jScrollPane1.setViewportView(tablaDatos); jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/vista/iconos/grandeProducto.png"))); // NOI18N javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(85, 85, 85) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(lblFecha) .addComponent(lblCategoria) .addComponent(lblDescripcion) .addComponent(lblPrecio) .addComponent(lblNombre) .addComponent(lblID)) .addGap(30, 30, 30) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(txtID) .addComponent(txtNombre) .addComponent(txtPrecio) .addComponent(txtDescripcion) .addComponent(txtCategoria) .addComponent(txtFecha, javax.swing.GroupLayout.PREFERRED_SIZE, 186, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 141, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(64, 64, 64)) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addComponent(jScrollPane1)) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(txtID, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(lblID)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(txtNombre, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(lblNombre)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(txtPrecio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(lblPrecio)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(txtDescripcion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(lblDescripcion)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(txtCategoria, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(lblCategoria)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(txtFecha, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(lblFecha))) .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(36, 36, 36) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); btnCerrar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/vista/iconos/cerrar.png"))); // NOI18N btnCerrar.setText("Cerrar"); btnCerrar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnCerrarActionPerformed(evt); } }); javax.swing.GroupLayout panelBotonesLayout = new javax.swing.GroupLayout(panelBotones); panelBotones.setLayout(panelBotonesLayout); panelBotonesLayout.setHorizontalGroup( panelBotonesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(panelBotonesLayout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(btnCerrar) .addGap(28, 28, 28)) ); panelBotonesLayout.setVerticalGroup( panelBotonesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(panelBotonesLayout.createSequentialGroup() .addComponent(btnCerrar) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jToolBar1.setRollover(true); btnNuevo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/vista/iconos/nuevo.png"))); // NOI18N btnNuevo.setText("Nuevo"); btnNuevo.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnNuevoActionPerformed(evt); } }); jToolBar1.add(btnNuevo); btnGuardar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/vista/iconos/guardar.png"))); // NOI18N btnGuardar.setText("Guardar"); btnGuardar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnGuardarActionPerformed(evt); } }); jToolBar1.add(btnGuardar); btnEliminar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/vista/iconos/eliminar.png"))); // NOI18N btnEliminar.setText("Eliminar"); btnEliminar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnEliminarActionPerformed(evt); } }); jToolBar1.add(btnEliminar); btnActualizar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/vista/iconos/actualizar.png"))); // NOI18N btnActualizar.setText("Actualizar"); btnActualizar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnActualizarActionPerformed(evt); } }); jToolBar1.add(btnActualizar); btnBuscar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/vista/iconos/buscar.png"))); // NOI18N btnBuscar.setText("Buscar"); btnBuscar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnBuscarActionPerformed(evt); } }); jToolBar1.add(btnBuscar); jLabel2.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N jLabel2.setText("Productos"); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(jToolBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 527, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 18, Short.MAX_VALUE) .addComponent(panelBotones, javax.swing.GroupLayout.PREFERRED_SIZE, 103, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup() .addGap(298, 298, 298) .addComponent(jLabel2) .addGap(0, 0, Short.MAX_VALUE)) .addComponent(jPanel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jToolBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(panelBotones, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(33, 33, 33) .addComponent(jLabel2) .addGap(18, 18, 18) .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(35, Short.MAX_VALUE)) ); 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.73195875", "0.7291065", "0.7291065", "0.7291065", "0.7286258", "0.7248489", "0.7213822", "0.7208757", "0.7195916", "0.7190243", "0.7184025", "0.71591616", "0.7148041", "0.70930153", "0.7080625", "0.7056986", "0.6987694", "0.69770867", "0.6955136", "0.69538426", "0.69452894...
0.0
-1
ArrayList a = new ArrayList(); a.add(3); a.add(4); a.add(5); a.add(5); a.add(2); a.add(1); a.add(0); insertSort(a); System.out.println(a);
public static void main(String[] args) { int[] a = new int[] {3,1,2,1,5,9}; quickSort(a); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void insertionSort(ArrayList <Integer> list){\n System.out.println();\n System.out.println(\"Insertion Sort\");\n System.out.println();\n\n int current = 0;\n int len = list.size();\n for (int n = 1; n < len; n++) {\n current = list.get(n);\n i...
[ "0.7694013", "0.751507", "0.7391771", "0.7264017", "0.72529674", "0.72490466", "0.71884805", "0.714399", "0.7128903", "0.7105268", "0.709868", "0.7034462", "0.7034344", "0.7009143", "0.6983083", "0.6929261", "0.6893401", "0.68292063", "0.67883646", "0.67643046", "0.67638934",...
0.0
-1
The json encoded discovery.
public String getData() { return data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getDiscoveryEndpoint() {\n return discoveryEndpoint;\n }", "public String discoveryStatus() {\n return this.discoveryStatus;\n }", "@GetMapping(value = \"/getInfo\")\n @ResponseBody\n public String getInfo() {\n System.out.println(\"discoveryClient.getServices().s...
[ "0.62118006", "0.5944925", "0.5786228", "0.56464666", "0.5572943", "0.55616236", "0.5445494", "0.54240054", "0.54240054", "0.54240054", "0.54240054", "0.54240054", "0.54240054", "0.54240054", "0.54240054", "0.54240054", "0.54240054", "0.5413513", "0.5406174", "0.5309382", "0....
0.0
-1
"Send Message" for type Info
public void sendMessage(logic.MessageType messageType, int addresseeId) { new Handler(this.node, messageType, addresseeId).start(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void SendMessage(Object m, MessageType type)\n\t{\n\t\tMessage message = new Message();\n\t\tmessage.messageType = type;\n\t\tmessage.message = m;\n\t\t\n\t\ttry {\n\t\t\tout.writeObject(message);\n\t\t\tout.flush();\n\t\t} catch (IOException e) {\n\t\t\tApplicationManager.textChat.write(\"Cant send messag...
[ "0.6869105", "0.67529994", "0.6603546", "0.6598278", "0.659219", "0.6548673", "0.651994", "0.6515541", "0.64986414", "0.64978015", "0.6493473", "0.6441682", "0.64189076", "0.64159656", "0.64131534", "0.63899314", "0.6378256", "0.6378256", "0.63573354", "0.6352615", "0.634325"...
0.6173385
37
"Send Message" for type Leader Special
public void sendMessage(logic.MessageType messageType, HashSet<Integer> mailingList) { if (mailingList.isEmpty()) { if (DEBUG) System.out.println("Mailing List is Empty"); return; } new Handler(this.node, messageType, mailingList).start(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void sendMsg(){\r\n\t\tsuper.getPPMsg(send);\r\n\t}", "@Override\n\tpublic void sendMessage() {\n\t\t\n\t}", "public void doSendMsg() {\n FacesContext fctx = FacesContext.getCurrentInstance();\n HttpSession sess = (HttpSession) fctx.getExternalContext().getSession(false);\n SEHRMessagingListene...
[ "0.6885281", "0.6850906", "0.6731524", "0.6711345", "0.669749", "0.6674456", "0.6632849", "0.65734285", "0.6546662", "0.6545894", "0.65340227", "0.65151054", "0.6513003", "0.6512253", "0.6503186", "0.65004444", "0.64954317", "0.646793", "0.6437413", "0.6424993", "0.6411685", ...
0.0
-1
If value of leader from exchanging messages is bigger, propagate that leader in "broadcast" If value is the same but their leader ID is bigger, also send message
@Override public synchronized void run() { if ((infoMessage.getStoredValue() > node.getLeaderValue()) || ((infoMessage.getStoredValue() == node.getStoredValue()) && (infoMessage.getLeaderId() > node.getLeaderID()))) { node.setLeaderID(infoMessage.getLeaderId()); node.setLeaderValue(infoMessage.getStoredValue()); node.setStoredId(node.getNodeID()); node.setStoredValue(node.getNodeValue()); System.out.println("INFO HANDLER: 1) Leader changed in Node " + node.getNodeID() + " to: " + node.getLeaderID() + " due to exchanging messages with " + infoMessage.getIncomingId()); // End to Exchanging Leaders Timer && Processing node.networkEvaluation.setEndExchangingLeadersTimer(infoMessage.getIncomingId()); node.networkEvaluation.getExchangingLeaderTimer(infoMessage.getIncomingId()); // Metric 3 - Without Leader Timer node.networkEvaluation.setEndWithoutLeaderTimer(); node.networkEvaluation.getWithoutLeaderTimer(); // send "special "Leader message to all neighbours except one that passed the // info to me Iterator<Integer> i = node.getNeighbors().iterator(); HashSet<Integer> toSend = new HashSet<Integer>(); while (i.hasNext()) { Integer temp = i.next(); if (temp != infoMessage.getIncomingId()) { toSend.add(temp); } } // If I have no neighbours except node I exchanged info messages with, no need // to send leader messages if (!(toSend.isEmpty())) { if (DEBUG) System.out.println("INFO HANDLER: 2) Sending special leader to all nodes."); sendMessage(logic.MessageType.LEADER_SPECIAL, toSend); } return; } else if ((infoMessage.getStoredValue() == node.getLeaderValue()) // Prevents infinite message passing && (infoMessage.getLeaderId() == node.getLeaderID())) { if (DEBUG) System.out.println("INFO HANDLER: 3) Same Leader! Agreement Reached."); // End to Exchanging Leaders Timer && Processing node.networkEvaluation.setEndExchangingLeadersTimer(infoMessage.getIncomingId()); node.networkEvaluation.getExchangingLeaderTimer(infoMessage.getIncomingId()); // Metric 3 - Without Leader Timer node.networkEvaluation.setEndWithoutLeaderTimer(); node.networkEvaluation.getWithoutLeaderTimer(); return; } // If not, send a message back saying that the other node should send the leader // message instead with my leader else { if (DEBUG) System.out.println("INFO HANDLER: 4) Sending back stronger leader.\n-----------------------------"); sendMessage(logic.MessageType.INFO, infoMessage.getIncomingId()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void sendMessagetoRespectivePlayer(int num) {\n Message msg1;\n if(flag == \"player1\"){\n prevP1 = num;\n int newPositionGroup = num / 10;\n if(winningHoleGroup == newPositionGroup){\n msg1 = p1Handler.obtainMessage(3);\n }\n ...
[ "0.6108111", "0.6030346", "0.577679", "0.5686895", "0.561943", "0.5617628", "0.54607934", "0.5439944", "0.54120296", "0.5408602", "0.53805524", "0.53763866", "0.5354009", "0.5316979", "0.5236529", "0.5234131", "0.5222752", "0.52066207", "0.5191337", "0.51744765", "0.5166697",...
0.6476924
0
Throttle: 1 to 1, Strafe: 1 to 1, rotate 1 to 1
public void swerveDrive(double throttle, double strafe, double rotate){ double a = strafe - rotate * kLengthComponent; double b = strafe + rotate * kLengthComponent; double c = throttle - rotate * kWidthComponent; double d = throttle + rotate * kWidthComponent; // wheel speed ws[0] = Math.hypot(b, d); ws[1] = Math.hypot(b, c); ws[2] = Math.hypot(a, d); ws[3] = Math.hypot(a, c); // wheel Rotate wa[0] = Math.atan2(b, d) * 0.5 / Math.PI; wa[1] = Math.atan2(b, c) * 0.5 / Math.PI; wa[2] = Math.atan2(a, d) * 0.5 / Math.PI; wa[3] = Math.atan2(a, c) * 0.5 / Math.PI; // normalize wheel speed final double maxWheelSpeed = Math.max(Math.max(ws[0], ws[1]), Math.max(ws[2], ws[3])); if (maxWheelSpeed > 1.0) { for (int i = 0; i < 4; i++) { ws[i] /= maxWheelSpeed; } } frontLeft.swerveDrive(ws[0], wa[0]); frontRight.swerveDrive(ws[1], wa[1]); backLeft.swerveDrive(ws[2], wa[2]); backRight.swerveDrive(ws[3], wa[3]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void rotateDrive(double throttle, double error) {\n double output = visionDrive.getOutput(error);\n left.set(ControlMode.PercentOutput, throttle - output);\n right.set(ControlMode.PercentOutput, throttle + output);\n }", "public void drive(double throttle, double rotation) {\n\t\t...
[ "0.59822714", "0.5964658", "0.57200915", "0.5623057", "0.55898094", "0.55531013", "0.55359733", "0.5484769", "0.5433254", "0.54248023", "0.541387", "0.54104865", "0.53839403", "0.5352544", "0.5337714", "0.5332333", "0.531279", "0.5286175", "0.52775365", "0.5269996", "0.525438...
0.59339845
2
method which calculates if 1 number is evenly divisible by another
public static boolean evenlyDivisible (int num1, int num2) { if(num1 % num2 == 0) { return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static boolean dividesEvenly(int a, int b) {\n if ((a % b) == 0) {\n return true;\n } else {\n return false;\n }\n }", "public boolean isDivisibleBy(int x, int y)\n\t{\n\t\tif(x % y == 0){\n\t\t\treturn true;\n\t\t}\n\t\telse{\n\t\t\t//System.out.println(\"isD...
[ "0.7177015", "0.70195204", "0.6887225", "0.66932786", "0.65345573", "0.65272874", "0.647969", "0.64648914", "0.64497596", "0.64393693", "0.6429438", "0.63408285", "0.6331101", "0.63296384", "0.6307979", "0.6287426", "0.6262458", "0.6253103", "0.62507856", "0.6237855", "0.6234...
0.76336145
0
sums up integers values between parameters
public static int sumRange(int a, int b) { int sum = 0; int big = 0; int small = 0; if (a > b) { big = a; small = b; } else { big = b; small = a; } for(int i = small; i <= big; i++) { //System.out.println( i ); sum += i; } return sum; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static int sum(int... args) {\n\t\tint sum = 0;\n\t\tfor (int arg : args)\n\t\t\tsum += arg;\n\t\treturn sum;\n\t}", "public void sumValues(){\n\t\tint index = 0;\n\t\tDouble timeIncrement = 2.0;\n\t\tDouble timeValue = time.get(index);\n\t\tDouble packetValue;\n\t\twhile (index < time.size()){\n\t\t\tDouble pac...
[ "0.69951355", "0.6656443", "0.661816", "0.6560206", "0.653577", "0.6526893", "0.6526893", "0.64985853", "0.6473934", "0.6438867", "0.6408902", "0.64085156", "0.6341624", "0.6338366", "0.63236266", "0.6299051", "0.6282545", "0.62782925", "0.62542576", "0.6248843", "0.6243768",...
0.5722305
92
sums up integers from 0 to parameter
public static int sumRange(int c) { int sum = 0; for(int i = 0; i <= c; i++) { //System.out.println( i ); sum += i; } return sum; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int sumUpTo(int integer) {\n int out = 0;\n if (integer >= 0)\n {\n for (int count = 0 ; count <= integer ; count++ )\n {\n out = out + count;\n }\n }\n else // if integer is negative\n {\n for (int i...
[ "0.6950774", "0.68027043", "0.66229755", "0.66060036", "0.65603876", "0.6516892", "0.64924026", "0.6489098", "0.6475388", "0.64512235", "0.6416013", "0.6413974", "0.6409392", "0.6396296", "0.63732016", "0.63325447", "0.6328487", "0.6324068", "0.6323262", "0.63165915", "0.6314...
0.58053243
81
Answers whether one class is or inherits from another
public static boolean inheritsFrom(Class baseClass, Class targetClass) { while (baseClass != null) { // If we've found who we're looking for, then we're golden if (baseClass == targetClass) { return true; } // In case target is an interface we need to explore the interface chain as well. if (targetClass.isInterface()) { for (Class intf : baseClass.getInterfaces()) { if (inheritsFrom(intf, targetClass)) return true; } } // Try heading up one level baseClass = baseClass.getSuperclass(); } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isDerived();", "boolean isSubclass(Concept x, Concept y);", "public boolean isSubclassOf(ClassReference other) {\n\t\t//TODO: Review this code thoroughly, it hasn't been looked at in a while\n\t\tif (this.equals(other) || this.equals(NULL) || other.equals(NULL)) {\n\t\t\treturn true;\n\t\t}\n\t\tboolea...
[ "0.72659063", "0.71360886", "0.7109254", "0.70503145", "0.69571066", "0.6910984", "0.6754501", "0.67025435", "0.669243", "0.660181", "0.65688485", "0.6541581", "0.65251815", "0.6518106", "0.646586", "0.6435502", "0.6429161", "0.63996357", "0.63654554", "0.6356809", "0.6351816...
0.6589727
10
Searches the inheritance tree for the first class for which the predicate returns true
public static boolean searchInheritance(Class clazz, Predicate<Class<?>> predicate) { return searchInheritance(clazz, predicate, new HashSet<Class<?>>()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static <T> Optional<T> find(ClassPath path, ClassNode in, Function<ClassNode, Optional<T>> get) {\n Optional<T> v = get.apply(in);\n if (v.isPresent()) {\n return v;\n }\n return supers(in).map(s -> {\n Optional<ClassNode> superClass = path.findClass(new Cl...
[ "0.6384131", "0.6038083", "0.5955344", "0.58781683", "0.58678126", "0.5735517", "0.56538826", "0.564132", "0.56270754", "0.5624974", "0.56060654", "0.55552197", "0.5549519", "0.5500567", "0.5492193", "0.54862136", "0.54847217", "0.5435971", "0.5435053", "0.5418646", "0.541675...
0.70305526
0
Creates a new instance of NormalizedLaboTest
public AllLaboTest() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public TestPrelab2()\n {\n }", "Lab create();", "TrainingTest createTrainingTest();", "public Tests(){\n \n }", "public PerezosoTest()\n {\n }", "LoadTest createLoadTest();", "public AcuityTest() {\r\n }", "public ClimbingClubTest()\n {\n \n }", "public Ecrive...
[ "0.6636021", "0.58863825", "0.5821529", "0.57989764", "0.5769", "0.5737073", "0.5727607", "0.5668961", "0.56239545", "0.56218934", "0.5611843", "0.5568413", "0.5563423", "0.5559937", "0.55557024", "0.5553501", "0.55231726", "0.55135834", "0.551255", "0.55111563", "0.5502342",...
0.7194809
0
/ access modifiers changed from: protected
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_parent_manger); if (Build.VERSION.SDK_INT >= 21) { Window window = getWindow(); window.clearFlags(201326592); window.getDecorView().setSystemUiVisibility(1792); window.addFlags(Integer.MIN_VALUE); window.setStatusBarColor(0); window.setNavigationBarColor(0); } if (Build.VERSION.SDK_INT >= 23) { getWindow().getDecorView().setSystemUiVisibility(9216); } this.iv_back = (ImageView) findViewById(R.id.iv_back); this.iv_back.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { ParentMangerActivity.this.finish(); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override...
[ "0.7375736", "0.7042321", "0.6922649", "0.6909494", "0.68470824", "0.6830288", "0.68062353", "0.6583185", "0.6539446", "0.65011257", "0.64917654", "0.64917654", "0.64733833", "0.6438831", "0.64330196", "0.64330196", "0.64295477", "0.6426414", "0.6420484", "0.64083177", "0.640...
0.0
-1
/ access modifiers changed from: protected
public void onResume() { super.onResume(); LogAgentHelper.onActive(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override...
[ "0.7375736", "0.7042321", "0.6922649", "0.6909494", "0.68470824", "0.6830288", "0.68062353", "0.6583185", "0.6539446", "0.65011257", "0.64917654", "0.64917654", "0.64733833", "0.6438831", "0.64330196", "0.64330196", "0.64295477", "0.6426414", "0.6420484", "0.64083177", "0.640...
0.0
-1
/ access modifiers changed from: protected
public void onPause() { super.onPause(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override...
[ "0.7375736", "0.7042321", "0.6922649", "0.6909494", "0.68470824", "0.6830288", "0.68062353", "0.6583185", "0.6539446", "0.65011257", "0.64917654", "0.64917654", "0.64733833", "0.6438831", "0.64330196", "0.64330196", "0.64295477", "0.6426414", "0.6420484", "0.64083177", "0.640...
0.0
-1
fixes the rotation by setting the angle to zero and applying the rotation transformation to the xpoints and ypoints arrays
public void setRotate() { int npoints = xpoints.length; double[] tempxpoints = new double[xpoints.length]; double[] tempypoints = new double[xpoints.length]; double radians = Math.toRadians(angle%360); double y = pivotY; double x = pivotX; for(int i = 0; i<xpoints.length; i++) { tempxpoints[i] = (Math.cos(radians)*(xpoints[i]-x)-Math.sin(radians)*(ypoints[i]-y)+x); tempypoints[i] = (Math.sin(radians)*(xpoints[i]-x)+Math.cos(radians)*(ypoints[i]-y)+y); } xpoints = tempxpoints; ypoints = tempypoints; angle = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void rotateTransformPoints(double angle) {\n int i;\n for(i=1; i<9;i++) {\n GeoVector vec = new GeoVector(this.transformPointers[i].getX(), this.transformPointers[i].getY(), this.aux_obj.getCenterX(), this.aux_obj.getCenterY());\n vec.rotate(((angle*-1.0) * (2.0*Math.PI)...
[ "0.7066976", "0.5924776", "0.5921815", "0.58964217", "0.5881611", "0.58304626", "0.57386845", "0.57263935", "0.57200533", "0.5716808", "0.5714499", "0.5658244", "0.5655041", "0.56429565", "0.56393486", "0.56080383", "0.5590696", "0.5578231", "0.5572252", "0.555668", "0.553515...
0.6838228
1
Rotates the body theta degrees around the pivot and returns new body
public Polygon getBody() { return getRotatedBody(angle); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic float getOrientation() {\n\t\treturn body.getAngle();\n\t}", "void rotateTurtle(int turtleIndex, double degrees);", "public IBlockState setRotation(World world, BlockPos pos, IBlockState state, EnumFacing face, boolean hasHalf, boolean topHalf);", "public static double rotation()\r\n\t{\r...
[ "0.6166218", "0.6111982", "0.5858186", "0.5745278", "0.5716645", "0.5709026", "0.56833655", "0.56289005", "0.562549", "0.5592867", "0.55918044", "0.5579635", "0.5577172", "0.55612814", "0.5551474", "0.55270696", "0.5497164", "0.5494875", "0.5474796", "0.54689133", "0.54300475...
0.51924485
60
TODO Autogenerated method stub
public boolean collidesWith(Ellipse2D.Double body, int bodyColor) { Area currentBody = new Area(getRotatedBody(angle)); Area playerArea = new Area(body); playerArea.intersect(currentBody); return !(playerArea.isEmpty() || this.getColorType() == bodyColor) ; //return false; }
{ "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
par1: entityType by command /emotes
public ParticleEmotion(World world, Entity host, double posX, double posY, double posZ, float height, int hostType, int emoType) { super(world, posX, posY, posZ); this.host = host; this.setSize(0F, 0F); this.setPosition(posX, posY, posZ); this.prevPosX = posX; this.prevPosY = posY; this.prevPosZ = posZ; this.motionX = 0D; this.motionZ = 0D; this.motionY = 0D; this.particleType = emoType; this.particleScale = this.rand.nextFloat() * 0.05F + 0.275F; this.particleAlpha = 0F; this.playSpeed = 1F; this.playSpeedCount = 0F; this.stayTick = 10; this.stayTickCount = 0; this.fadeTick = 0; this.fadeState = 0; //0:fade in, 1:normal, 2:fade out, 3:set dead this.frameSize = 1; this.addHeight = height; this.hostType = hostType; //0:any entity, 1:entity, 2:block this.particleAge = -1; //prevent showing the emo's initial moving from posY = 0 this.canCollide = false; //set icon position switch(this.particleType) { case 1: //小愛心 this.particleIconX = 0.0625F; this.particleIconY = 0F; this.particleMaxAge = 7; this.playTimes = 4; //no stay this.stayTick = 0; break; case 2: //噴汗 this.particleIconX = 0.0625F; this.particleIconY = 0.5F; this.particleMaxAge = 7; this.playTimes = 3; //cancel fade in this.particleAlpha = 1F; this.fadeState = 1; this.fadeTick = 5; //no stay this.stayTick = 0; break; case 3: //問號 this.particleIconX = 0.125F; this.particleIconY = 0F; this.particleMaxAge = 7; this.playTimes = 1; //short fade in this.fadeTick = 3; break; case 4: //驚嘆號 this.particleIconX = 0.125F; this.particleIconY = 0.5F; this.particleMaxAge = 7; this.playTimes = 1; //short fade in this.fadeTick = 3; //long stay this.stayTick = 20; break; case 5: //點點點 this.particleIconX = 0.1875F; this.particleIconY = 0F; this.particleMaxAge = 7; this.playTimes = 1; //long stay this.stayTick = 20; //slow play this.playSpeed = 0.5F; break; case 6: //冒青筋 this.particleIconX = 0.1875F; this.particleIconY = 0.5F; this.particleMaxAge = 7; this.playTimes = 1; //short fade in this.fadeTick = 3; break; case 7: //音符 this.particleIconX = 0.25F; this.particleIconY = 0F; this.particleMaxAge = 15; this.playTimes = 1; //cancel fade in this.particleAlpha = 1F; this.fadeState = 1; this.fadeTick = 3; //short stay this.stayTick = 3; //slow play this.playSpeed = 0.7F; break; case 8: //cry this.particleIconX = 0.3125F; this.particleIconY = 0F; this.particleMaxAge = 7; this.playTimes = 3; //short fade in this.fadeTick = 3; //no stay this.stayTick = 0; //slow play this.playSpeed = 0.5F; break; case 9: //流口水 this.particleIconX = 0.3125F; this.particleIconY = 0.5F; this.particleMaxAge = 7; this.playTimes = 2; //short fade in this.fadeTick = 3; //no stay this.stayTick = 1; //slow play this.playSpeed = 0.5F; break; case 10: //混亂 this.particleIconX = 0.375F; this.particleIconY = 0F; this.particleMaxAge = 7; this.playTimes = 4; //cancel fade in this.particleAlpha = 1F; this.fadeState = 1; this.fadeTick = 3; //short stay this.stayTick = 1; break; case 11: //尋找 this.particleIconX = 0.375F; this.particleIconY = 0.5F; this.particleMaxAge = 7; this.playTimes = 2; //cancel fade in this.particleAlpha = 1F; this.fadeState = 1; this.fadeTick = 3; //short stay this.stayTick = 0; //slow play this.playSpeed = 0.75F; break; case 12: //驚嚇 this.particleIconX = 0.4375F; this.particleIconY = 0F; this.particleMaxAge = 14; this.playTimes = 1; //cancel fade in this.particleAlpha = 1F; this.fadeState = 1; this.fadeTick = 3; //long stay this.stayTick = 20; //slow play this.playSpeed = 0.75F; //large frame this.frameSize = 2; break; case 13: //點頭 this.particleIconX = 0.5F; this.particleIconY = 0F; this.particleMaxAge = 7; this.playTimes = 2; //cancel fade in this.particleAlpha = 1F; this.fadeState = 1; this.fadeTick = 3; //no stay this.stayTick = 0; //slow play this.playSpeed = 0.75F; break; case 14: //+_+ this.particleIconX = 0.5F; this.particleIconY = 0.5F; this.particleMaxAge = 7; this.playTimes = 2; //short fade in this.fadeTick = 3; //no stay this.stayTick = 0; break; case 15: //kiss this.particleIconX = 0.5625F; this.particleIconY = 0F; this.particleMaxAge = 7; this.playTimes = 1; //short fade in this.fadeTick = 3; //long stay this.stayTick = 15; //slow play this.playSpeed = 0.7F; break; case 16: //lol this.particleIconX = 0.5625F; this.particleIconY = 0.5F; this.particleMaxAge = 7; this.playTimes = 3; //cancel fade in this.particleAlpha = 1F; this.fadeState = 1; this.fadeTick = 3; //no stay this.stayTick = 0; break; case 17: //奸笑 this.particleIconX = 0.625F; this.particleIconY = 0F; this.particleMaxAge = 15; this.playTimes = 1; //short fade in this.fadeTick = 3; //slow play this.playSpeed = 0.5F; break; case 18: //殘念 this.particleIconX = 0.6875F; this.particleIconY = 0F; this.particleMaxAge = 7; this.playTimes = 1; //no stay this.stayTick = 0; //slow play this.playSpeed = 0.4F; break; case 19: //舔舔 this.particleIconX = 0.6875F; this.particleIconY = 0.5F; this.particleMaxAge = 7; this.playTimes = 3; //cancel fade in this.particleAlpha = 1F; this.fadeState = 1; this.fadeTick = 3; //no stay this.stayTick = 0; //slow play this.playSpeed = 0.75F; break; case 20: //orz this.particleIconX = 0.75F; this.particleIconY = 0F; this.particleMaxAge = 7; this.playTimes = 1; //short fade in this.fadeTick = 3; //long stay this.stayTick = 20; //slow play this.playSpeed = 0.5F; break; case 21: //O this.particleIconX = 0.75F; this.particleIconY = 0.5F; this.particleMaxAge = 0; this.playTimes = 1; //long stay this.stayTick = 40; break; case 22: //X this.particleIconX = 0.75F; this.particleIconY = 0.5625F; this.particleMaxAge = 0; this.playTimes = 1; //long stay this.stayTick = 40; break; case 23: //!? this.particleIconX = 0.75F; this.particleIconY = 0.625F; this.particleMaxAge = 0; this.playTimes = 1; //long stay this.stayTick = 40; break; case 24: //rock this.particleIconX = 0.75F; this.particleIconY = 0.6875F; this.particleMaxAge = 0; this.playTimes = 1; //long stay this.stayTick = 40; break; case 25: //paper this.particleIconX = 0.75F; this.particleIconY = 0.75F; this.particleMaxAge = 0; this.playTimes = 1; //long stay this.stayTick = 40; break; case 26: //scissors this.particleIconX = 0.75F; this.particleIconY = 0.8125F; this.particleMaxAge = 0; this.playTimes = 1; //long stay this.stayTick = 40; break; case 27: //-w- this.particleIconX = 0.75F; this.particleIconY = 0.875F; this.particleMaxAge = 0; this.playTimes = 1; //long stay this.stayTick = 40; break; case 28: //-口- this.particleIconX = 0.75F; this.particleIconY = 0.9375F; this.particleMaxAge = 0; this.playTimes = 1; //long stay this.stayTick = 40; break; case 29: //blink this.particleIconX = 0.8125F; this.particleIconY = 0F; this.particleMaxAge = 7; this.playTimes = 1; //short fade in this.fadeTick = 3; //slow play this.playSpeed = 0.35F; //long stay this.stayTick = 20; break; case 30: //哼 this.particleIconX = 0.8125F; this.particleIconY = 0.5F; this.particleMaxAge = 7; this.playTimes = 1; //short fade in this.fadeTick = 3; //slow play this.playSpeed = 0.75F; //short stay this.stayTick = 3; break; case 31: //臉紅紅 this.particleIconX = 0.875F; this.particleIconY = 0F; this.particleMaxAge = 3; this.particleScale += 0.2F; this.playTimes = 1; //short fade in this.fadeTick = 3; //slow play this.playSpeed = 0.75F; //long stay this.stayTick = 30; break; case 32: //尷尬 this.particleIconX = 0.875F; this.particleIconY = 0.25F; this.particleMaxAge = 5; this.playTimes = 4; //slow play this.playSpeed = 0.75F; //no stay this.stayTick = 0; break; case 33: //:P this.particleIconX = 0.875F; this.particleIconY = 0.625F; this.particleMaxAge = 4; this.playTimes = 1; //slow play this.playSpeed = 0.25F; //long stay this.stayTick = 30; break; case 34: //||| this.particleIconX = 0.875F; this.particleIconY = 0.9375F; this.particleMaxAge = 0; this.particleScale += 0.3F; this.playTimes = 1; //long stay this.stayTick = 50; break; default: //汗 this.particleIconX = 0F; this.particleIconY = 0F; this.particleMaxAge = 15; this.playTimes = 1; break; } //init position this.px = posX; this.py = posY; this.pz = posZ; this.addx = 0D; this.addy = 0D; this.addz = 0D; calcParticlePosition(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "PiEntityType entityType();", "public String entityType();", "public void setEntityType(String entityType){\r\n this.entityType = entityType;\r\n }", "public void setEntityType(String entityType) {\n this.entityType = entityType;\n }", "public void setEntityType(String entityType) {\n t...
[ "0.62187845", "0.6033471", "0.56736887", "0.54753864", "0.5372139", "0.5336625", "0.53282434", "0.5271813", "0.52583194", "0.51602936", "0.5139985", "0.50836116", "0.5067757", "0.503872", "0.5029594", "0.5014745", "0.49590716", "0.49493766", "0.49048233", "0.4876064", "0.4858...
0.0
-1
layer: 0:particle 1:terrain 2:items 3:custom
@Override public int getFXLayer() { return 3; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface IParticleProviderModel extends IBakedModel {\n\n// /**\n// * Gets the textures to use for hit particles at the given face and hit vector.\n// *\n// * @param hitVec The vector.\n// * @param faceHit The face.\n// * @param world The world.\n// * @param pos The positi...
[ "0.5841241", "0.5815255", "0.5693659", "0.5636703", "0.5606781", "0.55822617", "0.5497792", "0.5447641", "0.53806293", "0.5368199", "0.5332277", "0.530282", "0.5263783", "0.5253839", "0.5253781", "0.5251596", "0.52372515", "0.52274376", "0.5205933", "0.5203622", "0.5189894", ...
0.52071774
18
Called to update the entity's position/logic.
@Override public void onUpdate() { //update pos this.prevPosX = this.posX; this.prevPosY = this.posY; this.prevPosZ = this.posZ; if(host != null) { updateHostPosition(); } //fade state switch (this.fadeState) { case 0: //fade in this.fadeTick++; this.particleAlpha = this.fadeTick * 0.2F; if (this.fadeTick > 5) this.fadeState = 1; break; case 1: //age++ this.playSpeedCount += this.playSpeed; this.particleAge = this.frameSize * (int)this.playSpeedCount; this.particleAlpha = 1F; break; case 2: //fade out this.fadeTick--; this.particleAlpha = this.fadeTick * 0.2F; if (this.fadeTick < 1) { this.setExpired(); return; } break; default: this.setExpired(); return; } //stay at last frame if (this.particleAge >= particleMaxAge) { this.particleAge = this.particleMaxAge; //count stay ticks if (this.stayTickCount > this.stayTick) { this.particleAge = this.particleMaxAge + 1; //next loop flag this.stayTickCount = 0; } else { this.stayTickCount += 1; } } //loop play if (this.particleAge > this.particleMaxAge) { //loop times-- if (--this.playTimes <= 0) { this.fadeState = 2; //change to fade out } else { this.particleAge = 0; this.playSpeedCount = 0F; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void updatePosition() {\n\t\t\n\t}", "private void updatePosition(){\n updateXPosition(true);\n updateYPosition(true);\n }", "public void updateEntity();", "protected void onUpdated( E entity, GameState state, int index )\r\n\t{\r\n\t\t\r\n\t}", "protected void updatePo...
[ "0.7448587", "0.7129747", "0.7108645", "0.7079519", "0.7005564", "0.69062275", "0.6854345", "0.6854345", "0.6847583", "0.6847583", "0.68027306", "0.6794694", "0.6794694", "0.6777653", "0.6777653", "0.6777653", "0.6777653", "0.6777653", "0.67648363", "0.67648363", "0.6761938",...
0.0
-1
Creates save ANA task.
public SaveANA(Integer fileID, File output, FileType type) { fileID_ = fileID; output_ = output; type_ = type; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void saveTask( org.openxdata.server.admin.model.TaskDef task, AsyncCallback<Void> callback );", "private void saveTask(){\n \tZadatakApp app = (ZadatakApp)getApplicationContext();\n \t\n \tTask task = new Task();\n \ttask.set(Task.Attributes.Name, nameText);\n \ttask.set(Task.Attributes.Duedate, d...
[ "0.6955389", "0.68854415", "0.60150194", "0.60150194", "0.60150194", "0.59959525", "0.5956687", "0.59073555", "0.5906845", "0.5893933", "0.5859875", "0.58227295", "0.5804184", "0.5801337", "0.5712554", "0.5636117", "0.56355125", "0.56164145", "0.561256", "0.56023276", "0.5595...
0.0
-1
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { return inflater.inflate(R.layout.fragment_conversation, container, false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup...
[ "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
This interface must be implemented by activities that contain this fragment to allow an interaction in this fragment to be communicated to the activity and potentially other fragments contained in that activity. See the Android Training lesson Communicating with Other Fragments for more information.
public interface OnListFragmentInteractionListener { // TODO: Update argument type and name void onListFragmentInteraction(String message); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface OnFragmentInteractionListener {\n void onFragmentMessage(String TAG, Object data);\n}", "public interface FragmentInteraction {\n void switchToBoardView();\n void switchToPinsView();\n void switchToPins(PDKBoard pdkBoard);\n void switchToDescription(PDKPin pin);\n}", "public int...
[ "0.7323964", "0.7208376", "0.7135902", "0.7123761", "0.7122124", "0.7014494", "0.6975465", "0.6975465", "0.6975465", "0.69735974", "0.69673824", "0.69654065", "0.69605833", "0.6953627", "0.69435406", "0.6934294", "0.6929645", "0.69277054", "0.6922256", "0.6909942", "0.6902554...
0.0
-1
TODO: Update argument type and name
void onListFragmentInteraction(String message);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public String getFirstArg() {\n return name;\r\n }", "@Override\n public int getNumberArguments() {\n return 1;\n }", "java.lang.String getArg();", "@Override\n public int getArgLength() {\n return 4;\n }", "Argument createArgument();", "@Override\r\n\tpublic ...
[ "0.7164074", "0.6946075", "0.6714363", "0.65115863", "0.63969076", "0.6375468", "0.63481104", "0.63162106", "0.6260299", "0.6208487", "0.6208487", "0.62070644", "0.6197276", "0.61806154", "0.6177103", "0.61530507", "0.61472267", "0.61243707", "0.60771817", "0.6054482", "0.599...
0.0
-1
TODO Autogenerated method stub
@Override public int getCount() { if(arrText != null && arrText.length != 0){ return arrText.length; } return 0; }
{ "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
TODO Autogenerated method stub
@Override public Object getItem(int position) { return arrText[position]; }
{ "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
TODO Autogenerated method stub
@Override public long getItemId(int position) { return position; }
{ "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
ViewHolder holder = null;
@Override public View getView(int position, View convertView, ViewGroup parent) { final ViewHolder holder; if (convertView == null) { holder = new ViewHolder(); LayoutInflater inflater = RequestPickup.this.getLayoutInflater(); convertView = inflater.inflate(R.layout.list_request_pickup, null); holder.textView1 = (TextView) convertView.findViewById(R.id.text_view_category_unit_price); holder.editText1 = (EditText) convertView.findViewById(R.id.edit_text_quantity); convertView.setTag(holder); } else { holder = (ViewHolder) convertView.getTag(); } holder.ref = position; holder.textView1.setText(arrText[position]); holder.editText1.setText(String.valueOf(arrTemp[position])); holder.editText1.addTextChangedListener(new TextWatcher() { @Override public void onTextChanged(CharSequence arg0, int arg1, int arg2, int arg3) { // TODO Auto-generated method stub } @Override public void beforeTextChanged(CharSequence arg0, int arg1, int arg2, int arg3) { // TODO Auto-generated method stub } @Override public void afterTextChanged(Editable arg0) { // TODO Auto-generated method stub if(arg0.length()>0) arrTemp[holder.ref] = Double.parseDouble(arg0.toString()); //Bug here : in case we erase entire double value 0.0 } }); return convertView; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onBindViewHolder(MyHolder holder, int position) {\n\n }", "@Override\n public void onBindViewHolder(ViewHolder holder, int position) {\n\n }", "public MyHolder(View itemView) {\n super(itemView);\n item = itemView.findViewById(R.id.item);\n ...
[ "0.70982504", "0.70535123", "0.7007639", "0.69291645", "0.68764514", "0.68493676", "0.68368083", "0.67504215", "0.6632833", "0.65809065", "0.65574634", "0.65559375", "0.653028", "0.65267295", "0.6507221", "0.65015715", "0.6446455", "0.6445388", "0.6442153", "0.64356637", "0.6...
0.0
-1
TODO Autogenerated method stub
@Override public void onTextChanged(CharSequence arg0, int arg1, int arg2, int arg3) { }
{ "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
TODO Autogenerated method stub
@Override public void beforeTextChanged(CharSequence arg0, int arg1, int arg2, int arg3) { }
{ "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
TODO Autogenerated method stub
@Override public void afterTextChanged(Editable arg0) { if(arg0.length()>0) arrTemp[holder.ref] = Double.parseDouble(arg0.toString()); //Bug here : in case we erase entire double value 0.0 }
{ "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
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.request_pickup, 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.724751", "0.72030395", "0.71962166", "0.71781456", "0.71080285", "0.70414597", "0.7039569", "0.70127094", "0.7010955", "0.69814765", "0.69462436", "0.6940127", "0.69346195", "0.6918375", "0.6918375", "0.6892324", "0.688513", "0.687655", "0.68764484", "0.68626994", "0.68626...
0.0
-1
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml.
@Override public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n ...
[ "0.79052806", "0.7806316", "0.7767438", "0.772778", "0.76324606", "0.7622031", "0.758556", "0.7531728", "0.7489057", "0.74576724", "0.74576724", "0.743964", "0.7422121", "0.74037784", "0.73926556", "0.7387903", "0.73803806", "0.73715395", "0.7362778", "0.7357048", "0.7346653"...
0.0
-1
Create a metadata response.
public MetadataResponse() { data = new HashMap<String, Object>(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "com.google.cloud.talent.v4beta1.ResponseMetadata getMetadata();", "public MetadataResponse() {\n }", "protected Map<String, String> getMetaData(Response response) {\r\n\t\tMap<String, String> metadata = new HashMap<String, String>();\r\n Request request = response.getRequest();\r\n\r\n User au...
[ "0.68729067", "0.67890304", "0.6683547", "0.66619176", "0.6624108", "0.6624108", "0.6624108", "0.6624108", "0.6624108", "0.6624108", "0.6624108", "0.6624108", "0.6624108", "0.6624108", "0.6624108", "0.6624108", "0.6624108", "0.6624108", "0.657772", "0.6548558", "0.65439165", ...
0.7257632
0
TODO Autogenerated method stub
public static void main(String[] args) { int a=10; int b=20; int c=a&b; //Here sigle (&)And operator represents bitwise operator. int d=a|b; //Here Single (|)or operator represents bitwise operator. System.out.println(c); System.out.println(d); }
{ "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
Initializes fields and assigns button listeners.
@Override public void onCreate (Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.register); this.user = (EditText) findViewById(R.id.email); this.password = (EditText) findViewById(R.id.pass); this.rpassword = (EditText) findViewById(R.id.repeat_pass); this.name = (EditText) findViewById(R.id.name); spinnerDialog = new LoadingSpinnerDialog(); receiver = null; // Create an ArrayAdapter using the string array and a default spinner layout ArrayAdapter<CharSequence> adapter = ArrayAdapter .createFromResource(this, R.array.genders, android.R.layout.simple_spinner_item); // Specify the layout to use when the list of choices appears adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); // Apply the adapter to the spinner this.datePicker = new DatePickerFragment(); this.gender = (Spinner) findViewById(R.id.gender); gender.setAdapter(adapter); gender.setOnItemSelectedListener(this); genderSelected = "Male"; this.register = (Button) findViewById(R.id.register); this.date = (Button) findViewById(R.id.date); this.register.setOnClickListener(this); this.date.setOnClickListener(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void buttonInit() {\n panel.add(createButton);\n panel.add(editButton);\n panel.add(changeButton);\n createButton.addActionListener(this);\n editButton.addActionListener(this);\n changeButton.addActionListener(this);\n submitNewUser.addActionListener(this);\...
[ "0.7789876", "0.76350933", "0.762147", "0.7616784", "0.75159687", "0.7462709", "0.74332315", "0.740395", "0.73943996", "0.7365118", "0.7362505", "0.7353356", "0.7351136", "0.734519", "0.72701234", "0.7263658", "0.7260185", "0.7239652", "0.7238223", "0.714578", "0.71398866", ...
0.0
-1
Unregisters receiver and deletes account if they exist.
@Override protected void onStop () { super.onStop(); if (receiver != null) { cleanupReceiver(); cleanupAccount(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void unregisterReceiver() {\n try {\n mContext.unregisterReceiver(mReceiver);\n } catch (IllegalArgumentException e) {\n }\n }", "@Override\n\t\t\t\t\tpublic void myUnregisterReceiver(BroadcastReceiver receiver)\n\t\t\t\t\t{\n\t\t\t\t\t\tunregisterReceiver(receiver);\n\t...
[ "0.7032271", "0.68823606", "0.66368526", "0.66024417", "0.65180206", "0.64364254", "0.64159924", "0.6321253", "0.63152355", "0.6308516", "0.62963134", "0.6288176", "0.62808585", "0.6259517", "0.62465984", "0.62390536", "0.6221611", "0.6191422", "0.6183357", "0.6177542", "0.61...
0.6121939
21
Helper for cleaning up the receiver.
private void cleanupReceiver () { if (receiver != null) { unregisterReceiver(receiver); receiver = null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void cleanup()\n {\n \tsuper.cleanup();\n _channelHandler.cleanup();\n }", "@Override\n\tpublic void cleanUp() {\n\t\tofferingStrategy = null;\n\t\tacceptConditions = null;\n\t\topponentModel = null;\n\t\tnegotiationSession = null;\n\t\tutilitySpace = null;\n\t\tdagent = null;\n\t}", "pr...
[ "0.74756473", "0.69950384", "0.6866985", "0.68461317", "0.6800436", "0.6767431", "0.6763515", "0.6763515", "0.674426", "0.6712942", "0.67017066", "0.6700099", "0.6698644", "0.6693848", "0.66415304", "0.663674", "0.6629785", "0.6622252", "0.66124606", "0.6610312", "0.65895194"...
0.8280054
0
Helper for deleting account that has not been registered with server.
private void cleanupAccount () { if (account != null) { AccountManager accountManager = (AccountManager) this.getSystemService(ACCOUNT_SERVICE); accountManager.removeAccount(account, null, null); account = null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@VisibleForTesting\n void removeAllAccounts();", "boolean delete(Account account);", "@Test\n public void deleteAccount() {\n Account accountToBeDeleted = new Account(\"deleteMe\", \"deleteMe\", false,\n \"Fontys Stappegoor\", \"deleteme@trackandtrace.com\");\n accountQueries...
[ "0.72140145", "0.7136277", "0.71216065", "0.69502646", "0.68437344", "0.6712593", "0.6705214", "0.6667844", "0.6655079", "0.66398144", "0.663658", "0.6616843", "0.6576393", "0.65663266", "0.65530944", "0.6543151", "0.64635813", "0.6404104", "0.64012784", "0.6396649", "0.63432...
0.69491935
4
Called when a view has been clicked. Handles register and date selections.
@Override public void onClick (View v) { if (v == register) { // Validate matching passwords. if (password.getText().toString().equals(rpassword.getText().toString())) { if (!genderSelected.equals("Select")) { String AUTHORITY = getResources().getString(R.string.authority); Bundle extras = new Bundle(); // pack bundle with user extras extras.putString("request_type", "0"); extras.putString("user", user.getText().toString()); extras.putString("password", password.getText().toString()); extras.putString("birthday", datePicker.getYear() + "-" + (datePicker.getMonth() + 1) + "-" + datePicker.getDay()); extras.putString("gender", genderSelected); extras.putString("name", name.getText().toString()); // Attempt to create a sync account Account account = FriendFinder .createSyncAccount(this, user.getText().toString(), password.getText().toString()); // Allow synchronization. ContentResolver.setSyncAutomatically(account, AUTHORITY, true); // Attempt to synchronize. extras.putBoolean(ContentResolver.SYNC_EXTRAS_EXPEDITED, true); extras.putBoolean(ContentResolver.SYNC_EXTRAS_FORCE, true); extras.putBoolean(ContentResolver.SYNC_EXTRAS_MANUAL, true); ContentResolver.requestSync(account, AUTHORITY, extras); spinnerDialog.show(getFragmentManager(), "Registering User"); receiver = new RegistrationReceiver(); IntentFilter intentFilter = new IntentFilter(); intentFilter.addAction("registration"); registerReceiver(receiver, intentFilter); } else { Toast.makeText(this, "Please select a gender.", Toast.LENGTH_LONG).show(); } } else { Toast.makeText(this, "Passwords do not match.", Toast.LENGTH_LONG).show(); } } else if (v == date) { // display datepicker. datePicker.show(getFragmentManager(), "Date Picker"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\tpublic void onSelectedDayChange(CalendarView view, int year, int month,\n\t\t\t\tint dayOfMonth) {;\n\t\t\t// TODO Auto-generated method stub\n\t\t\tmonth++; // month fix, gives february when click on march so I added + 1\n\t\t\tToast.makeText(getBaseContext(),\"Selected Date is\\n\\n\"\n\t\t\t\t+mo...
[ "0.6935505", "0.6933252", "0.6801875", "0.66768074", "0.66596127", "0.664201", "0.6641798", "0.6622245", "0.66054", "0.65968376", "0.65774643", "0.65661216", "0.6555653", "0.65210295", "0.6504755", "0.649335", "0.64421225", "0.64347297", "0.6402993", "0.63974565", "0.63941914...
0.0
-1
Callback method to be invoked when an item in this view has been selected. This callback is invoked only when the newly selected position is different from the previously selected position or if there was no selected item. Implementers can call getItemAtPosition(position) if they need to access the data associated with the selected item.
@Override public void onItemSelected (AdapterView<?> parent, View view, int position, long id) { genderSelected = parent.getItemAtPosition(position).toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onItemSelecting(AdapterView<?> parent, View view, int oldPosition, int newPosition);", "public interface OnSelectedItemListener {\n /**\n * On selected item.\n *\n * @param view the view\n * @param position the position\n */\n void onSelectedItem(...
[ "0.71915025", "0.69593257", "0.6854385", "0.68435663", "0.6835918", "0.68209386", "0.6812162", "0.6764481", "0.6761904", "0.67496395", "0.6722865", "0.66881865", "0.66779983", "0.66779983", "0.66717494", "0.6660677", "0.66602093", "0.66347045", "0.66248465", "0.6624443", "0.6...
0.0
-1
Callback method to be invoked when the selection disappears from this view. The selection can disappear for instance when touch is activated or when the adapter becomes empty.
@Override public void onNothingSelected (AdapterView<?> parent) { // don't care, not used. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onValueDeselected() {\n }", "@Override\n public void onValueDeselected() {\n\n }", "@Override\n public void onValueDeselected() {\n\n }", "@Override\n public void onValueDeselected() {\n\n }", "@Override\n public void on...
[ "0.7085348", "0.7068426", "0.7068426", "0.7068426", "0.7068426", "0.69063455", "0.68934625", "0.6718448", "0.6667161", "0.664329", "0.6583712", "0.6578088", "0.6564042", "0.64338726", "0.6382039", "0.63625544", "0.6359697", "0.63391787", "0.633393", "0.62513304", "0.6232279",...
0.0
-1
Assigns default values to fields. Returns a datePicker dialog.
@Override public Dialog onCreateDialog (Bundle savedInstanceState) { // Use the current time as the default values for the picker final Calendar c = Calendar.getInstance(); year = c.get(Calendar.YEAR); month = c.get(Calendar.MONTH); day = c.get(Calendar.DAY_OF_MONTH); // Create a new instance of TimePickerDialog and return it return new DatePickerDialog(getActivity(), this, year, month, day); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void chooseDateDialog() {\n Calendar c = Calendar.getInstance();\n int year = c.get(Calendar.YEAR);\n int month = c.get(Calendar.MONTH);\n int day = c.get(Calendar.DATE);\n\n DatePickerDialog datePickerDialog =\n new DatePickerDialog(Objects.requireNonNull(...
[ "0.69028723", "0.6824004", "0.6762678", "0.67219657", "0.6714656", "0.66755956", "0.6668729", "0.6668698", "0.66505456", "0.66330916", "0.6622235", "0.6618456", "0.66182536", "0.66172713", "0.66056603", "0.6583409", "0.65753716", "0.6543707", "0.6543707", "0.65334535", "0.653...
0.63731694
70
If registration is succesful, we move to the next activity. Otherwise we clean up our receiver and account, and await the user to try again.
@Override public void onReceive (Context context, Intent intent) { spinnerDialog.dismiss(); // Server error, cleanup and toast. if (intent.getExtras().getBoolean("ioerr", false)) { Toast.makeText(Register.this, "Error connecting to server.", Toast.LENGTH_LONG) .show(); cleanupReceiver(); cleanupAccount(); } // Success. Move to next activity and kill this one to preserve state. else if (intent.getExtras().getBoolean("success", false)) { cleanupAccount(); finish(); cleanupReceiver(); } // Error from server meaning email address is taken. else { //fixme longterm add checks for valid email beforehand cleanupReceiver(); cleanupAccount(); Toast.makeText(Register.this, "Email is already in use.", Toast.LENGTH_LONG).show(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void onSignupSuccess() {\n startActivity(currentActivity, UserLoginActivity.class);\n finish();\n }", "private void registerSuccess(){\n Intent intent = new Intent(getApplicationContext(), MainActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\n get...
[ "0.67897505", "0.6708441", "0.6664589", "0.64764476", "0.6339125", "0.62830365", "0.62680686", "0.6259715", "0.6250226", "0.6246524", "0.6237174", "0.6217497", "0.62090963", "0.61990917", "0.61832774", "0.61794126", "0.6164123", "0.61500716", "0.6141207", "0.6088966", "0.6075...
0.5895207
44
Returns the number of elements needed on a certain level given the side.
public static int getNumElement(int level, int side) { if (level <= side) { return side + (level - 1) * 2; } return 5 * side - 2 * level; // 3 * side - 2 * (level - side) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int getNumSpacePerSide(int level, int side) {\n return (3 * side - 2 - getNumElement(level, side)) / 2;\n }", "public int countElemsLevel(int level){\n //if is empty, has no elements\n if(this.isEmpty()){\n return 0;\n \n }else{\n //if...
[ "0.748805", "0.6717876", "0.6604454", "0.6475208", "0.6294225", "0.6103372", "0.6085662", "0.6079392", "0.6020369", "0.6008918", "0.59961414", "0.5978135", "0.59588385", "0.5956356", "0.59490824", "0.5918562", "0.59161836", "0.5887497", "0.58567166", "0.5842175", "0.58051074"...
0.78841966
0
Returns the number of nothing/spaces on each side for each row.
public static int getNumSpacePerSide(int level, int side) { return (3 * side - 2 - getNumElement(level, side)) / 2; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int countEmptyCells() {\n int result = 0;\n for (int[] row : field)\n for (int cell : row)\n if (cell == EMPTY_MARK)\n result++;\n return result;\n }", "int colCount();", "public int countEmptyCells()\n\t{\n\t\tint count = 0;\n\t\tfor(...
[ "0.72598326", "0.68961763", "0.68185735", "0.66958266", "0.6605694", "0.6438949", "0.6438949", "0.64037234", "0.636969", "0.635579", "0.6355192", "0.6355192", "0.6320569", "0.6265611", "0.6254664", "0.62516487", "0.6246857", "0.6234596", "0.62289023", "0.6202885", "0.6202682"...
0.0
-1
Returns a random style of the tile.
private static TETile getRandomTile() { Random r = new Random(); int tileNum = r.nextInt(5); switch (tileNum) { case 0: return Tileset.FLOWER; case 1: return Tileset.MOUNTAIN; case 2: return Tileset.TREE; case 3: return Tileset.GRASS; case 4: return Tileset.SAND; default: return Tileset.SAND; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static TETile randomTile() {\n int tileNum = RANDOM.nextInt(5);\n switch (tileNum) {\n case 0: return Tileset.TREE;\n case 1: return Tileset.FLOWER;\n case 2: return Tileset.GRASS;\n case 3: return Tileset.SAND;\n case 4: return Tileset.M...
[ "0.681302", "0.6711094", "0.6693269", "0.63863516", "0.6199077", "0.6189034", "0.61784303", "0.6102742", "0.60824585", "0.6076423", "0.60314214", "0.5997487", "0.59134835", "0.5882463", "0.58393914", "0.58315474", "0.5811372", "0.579812", "0.5782357", "0.576037", "0.5748092",...
0.6915433
0
Returns a new starting position (left bottom corner) of the left neighbor
private static Position getLeftNeighbor(Position curr, int side) { int newX = curr.getX() - getNumElement(0, side) - getNumSpacePerSide(0, side) - 1; int newY = curr.getY() - side; return new Position(newX, newY); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Location left() {\n return new Location(row, column - 1);\n }", "public Board getLeftNeighbor() {\r\n\t\treturn leftNeighbor;\r\n\t}", "public BoardCoordinate getLeft() {\n return new BoardCoordinate(x-1, y);\n }", "public Player getLeftNeighbor() {\n\t\tif(players.indexOf(current)...
[ "0.6844812", "0.6785907", "0.6648128", "0.66038364", "0.65870696", "0.65685415", "0.637181", "0.6338072", "0.6334611", "0.62606484", "0.6222186", "0.6179455", "0.6110561", "0.6102975", "0.6088367", "0.6075181", "0.60740256", "0.605019", "0.6042833", "0.6024359", "0.6014928", ...
0.76545084
0
Returns a new starting position (right bottom corner) of the right neighbor
private static Position getRightBottomNeighbor(Position curr, int side) { int newX = curr.getX() + getNumElement(0, side) + getNumSpacePerSide(0, side) + 1; int newY = curr.getY() - side; return new Position(newX, newY); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Location right() {\n return new Location(row, column + 1);\n\n }", "public Shard getRightNeighbor() {\r\n double middleLon = west + Math.abs(west - east) / 2;\r\n double nextLon = middleLon + Math.abs(west - east);\r\n\r\n return new Shard(new Coordinates(coordinates.getLat(...
[ "0.7095661", "0.705691", "0.6607285", "0.65683085", "0.6565632", "0.647446", "0.64599687", "0.6397316", "0.639059", "0.63315845", "0.63222116", "0.626618", "0.62581754", "0.62578094", "0.6248817", "0.62060535", "0.6197372", "0.6195412", "0.6185618", "0.6176789", "0.6165696", ...
0.7543258
0
Returns a new starting position (bottom corner) of the bottom neighbor
private static Position getBottomNeighbor(Position curr, int side) { int newX = curr.getX(); int newY = curr.getY() - side * 2; return new Position(newX, newY); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getBottom() {\n return position[0] + (size - 1) / 2;\n }", "private static Position getRightBottomNeighbor(Position curr, int side) {\n int newX = curr.getX() + getNumElement(0, side) + getNumSpacePerSide(0, side) + 1;\n int newY = curr.getY() - side;\n return new Positi...
[ "0.6737426", "0.6540957", "0.6357233", "0.6232088", "0.62119466", "0.6205895", "0.61459756", "0.60321844", "0.59614843", "0.59205407", "0.58217", "0.5796871", "0.57862216", "0.57813585", "0.5760568", "0.5743379", "0.5740895", "0.5722789", "0.5687779", "0.56562084", "0.5590632...
0.7444017
0
Given a position, return true if this Hex can fit in the map.
private static boolean isFullHex(Position p, int side) { int x = p.getX(); int y = p.getY(); // ensure the left bottom corner is in range if (x >= 0 && x <= WIDTH && y >= 0 && y <= HEIGHT) { // ensure the right bottom corner is in range return ((x + 3 * side - 2) <= WIDTH) && (y + side * 2 <= HEIGHT); } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean canPlaceRobber(HexLocation hexLoc);", "private boolean isValidPosition(Point pos){\r\n return (0 <= pos.getFirst() && pos.getFirst() < 8 && \r\n 0 <= pos.getSecond() && pos.getSecond() < 8);\r\n }", "public boolean canMoveTo(Position position){\n if(position.x > mapSize....
[ "0.6401506", "0.6371599", "0.6344087", "0.6106141", "0.5976257", "0.5931574", "0.5931011", "0.59247464", "0.59240806", "0.5923965", "0.59041935", "0.59041935", "0.59041935", "0.59041935", "0.5900577", "0.5900577", "0.5900577", "0.5845697", "0.579647", "0.5782743", "0.5782291"...
0.6061159
4
Draw a vertical group of Hexes given a starting position at the right top
private static void drawRandomVerticalHexes(Position startP, int side, int n) { while (n > 0 && isFullHex(startP, side)) { TETile randomStyle = getRandomTile(); addHexagon(side, startP, world, randomStyle); startP = getLeftNeighbor(startP, side); n--; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void paint(Graphics g){\n \n for (int r=0; r < hexes.length; r++){ \n for (int c=0; c < hexes[r].length; c++){\n int x = (c*(55+HORIZONTAL_GAP))+(200-((2-(Math.abs(r-2)))*(55+HORIZONTAL_GAP)/2));\n int y = (r*(45+VERTICAL_GAP))+50;\n g.drawImage(hexes[r][c]...
[ "0.63807565", "0.5939568", "0.5685229", "0.5651486", "0.5564334", "0.5536179", "0.54437184", "0.5424288", "0.53952605", "0.5355612", "0.5304642", "0.5282826", "0.52592874", "0.5257477", "0.52553463", "0.52460015", "0.52410537", "0.5236461", "0.5218265", "0.5185095", "0.517942...
0.63839674
0
Accessor for the name of this token
public String getName() { return _name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Optional<String> tokenName() {\n return Codegen.stringProp(\"tokenName\").config(config).get();\n }", "TokenTypes.TokenName getName();", "public Token getName()\n {\n if (isVersion())\n {\n return getVersion();\n }\n\n return getModule();\n }", "p...
[ "0.80704385", "0.80247265", "0.7813001", "0.7428691", "0.7376588", "0.73643607", "0.73629326", "0.73352253", "0.73352253", "0.73352253", "0.73352253", "0.73352253", "0.73352253", "0.73352253", "0.73352253", "0.73352253", "0.73352253", "0.73352253", "0.73352253", "0.73352253", ...
0.0
-1
Accessor for the lexeme of this token
public String getLexeme() { return _lexeme; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String returnLexeme(){ return lexeme; }", "public void printToken(){\r\n System.out.println(\"Kind: \" + kind + \" , Lexeme: \" + lexeme);\r\n }", "public String token() {\n return this.token;\n }", "public String getLemma() {\n return this.lemma;\n }", "@Override\n\tpubl...
[ "0.73355836", "0.6380289", "0.61969453", "0.6129217", "0.60684603", "0.60532033", "0.60471785", "0.6024144", "0.60053295", "0.59783566", "0.5953532", "0.5947448", "0.5884566", "0.5880809", "0.5796004", "0.579355", "0.5790814", "0.5785967", "0.5782466", "0.5780025", "0.5763139...
0.7136364
1
Return a string representation of the token: "[name] lexeme"
public String toString() { return "[" + _name + "] " + _lexeme; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void printToken(){\r\n System.out.println(\"Kind: \" + kind + \" , Lexeme: \" + lexeme);\r\n }", "TokenTypes.TokenName getName();", "@Override\n public String toString() {\n return token.toString();\n }", "public String returnLexeme(){ return lexeme; }", "publi...
[ "0.69516575", "0.6604517", "0.63831127", "0.63631505", "0.60979575", "0.603172", "0.59761053", "0.5935804", "0.5935804", "0.5935804", "0.5935804", "0.5935804", "0.5935804", "0.5935804", "0.5935804", "0.5935804", "0.5935804", "0.5916613", "0.57618535", "0.57438886", "0.5739260...
0.6688841
1
============================================================================= Warning: if you define media.setMediaType as 'g' and call insertMedia(Media media), you do not need this function
public void insertGame(String platform, float version, int mediaID) { PreparedStatement pstatement; int result; pstatement = null; //resultSet = null; try { Connection connection = ConnectionManager.getConnection(); pstatement = connection.prepareStatement("INSERT INTO Games (platform, version, gameID) VALUES (?, ?, ?)"); // instantiate parameters pstatement.clearParameters(); pstatement.setString(1, platform); pstatement.setFloat(2, version); pstatement.setInt(3, mediaID); result = pstatement.executeUpdate(); //System.out.println("3"); pstatement.close(); connection.close(); } catch(SQLException sqle) { System.out.println("SQLState = " + sqle.getSQLState() + "\n" + sqle.getMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Builder addAssociatedMedia(MediaObject value);", "@DISPID(1093) //= 0x445. The runtime will prefer the VTID if present\n @VTID(13)\n void media(\n java.lang.String p);", "public void addMedia(Media media)\n\t\t{\n\t\t\tMedia newMedia = addNewMedia(media.getId());\n\t\t\tnewMedia.setSrcId(media.getSrcId())...
[ "0.68563163", "0.6704634", "0.66928416", "0.66834164", "0.6683201", "0.6669417", "0.6644842", "0.66401845", "0.6586058", "0.6521461", "0.65172386", "0.65086746", "0.6502565", "0.64648134", "0.6433462", "0.6407085", "0.63106054", "0.62888885", "0.6250012", "0.6245913", "0.6208...
0.0
-1
============================================================================= Warning: if you define media.setMediaType as 'm' and call insertMedia(Media media), you do not need this function
public void insertMovie(int movieID) { PreparedStatement pstatement; int result; pstatement = null; //resultSet = null; try { Connection connection = ConnectionManager.getConnection(); pstatement = connection.prepareStatement("INSERT INTO Movies (movieID) VALUES (?)"); // instantiate parameters pstatement.clearParameters(); pstatement.setInt(1, movieID); result = pstatement.executeUpdate(); //System.out.println("3"); pstatement.close(); connection.close(); } catch(SQLException sqle) { System.out.println("SQLState = " + sqle.getSQLState() + "\n" + sqle.getMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addMedia(Media media)\n\t\t{\n\t\t\tMedia newMedia = addNewMedia(media.getId());\n\t\t\tnewMedia.setSrcId(media.getSrcId());\n\t\t\tnewMedia.setType(media.getType());\n\t\t\tnewMedia.setStatus(media.getStatus());\n\t\t}", "public void importMedia(){\r\n \r\n }", "public void setMedia(JRMe...
[ "0.709546", "0.6881096", "0.68803513", "0.6845775", "0.68373847", "0.6807765", "0.6651184", "0.6623359", "0.6579769", "0.65518683", "0.6551519", "0.6526835", "0.649037", "0.64166677", "0.64045125", "0.6400758", "0.639831", "0.63964313", "0.6353604", "0.63520056", "0.63478905"...
0.0
-1
============================================================================ Search by keyword with 2 booleans to tell if you want to search if it was previously rented or has won awards. Also needs the email of the user just to check if it was prevRented by that user.
public List<Media> searchGenres(String genre,boolean notPrevRented,boolean wonAwards,String emailOfUser) { List<Media> mediaSearched; List<Integer> mediaIDList; PreparedStatement pState; ResultSet rSet; Media media; mediaSearched = new ArrayList<Media>(); mediaIDList = new ArrayList<Integer>(); pState = null; rSet = null; try { Connection connection = ConnectionManager.getConnection(); if (notPrevRented && !wonAwards) { pState = connection.prepareStatement("SELECT * FROM Media M WHERE M.genre LIKE ? AND M.mediaID NOT IN (SELECT mediaID FROM rental_info WHERE email = ?)"); pState.clearParameters(); pState.setString(1, "%"+genre+"%"); pState.setString(2, emailOfUser); } else if (wonAwards && !notPrevRented) { pState = connection.prepareStatement("SELECT * FROM Media M, Won W WHERE M.genre LIKE ? AND W.movieID = M.mediaID"); pState.clearParameters(); pState.setString(1, "%"+genre+"%"); } else if (notPrevRented && wonAwards) { pState = connection.prepareStatement("SELECT * FROM Media M, Won W WHERE W.movieID = M.mediaID AND M.genre LIKE ? AND M.mediaID NOT IN (SELECT mediaID FROM rental_info WHERE email = ?)"); pState.clearParameters(); pState.setString(1, "%"+genre+"%"); pState.setString(2, emailOfUser); } else { pState = connection.prepareStatement("SELECT * FROM Media M WHERE M.genre LIKE ?"); pState.clearParameters(); pState.setString(1, "%"+genre+"%"); } rSet = pState.executeQuery(); while(rSet.next()) { mediaIDList.add(rSet.getInt("mediaID")); } rSet.close(); pState.close(); connection.close(); mediaSearched = getMedia(mediaIDList); return mediaSearched; } catch(SQLException e) { System.out.println("SQLState = " + e.getSQLState() + "\n" + e.getMessage()); return mediaSearched; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Media> keywordSearch(String keyword, boolean notPrevRented,boolean wonAwards,String emailOfUser)\n\t{\n\tList<Media>\t\t\tmediaSearched;\n\tList<Integer>\t\tmediaIDList;\n\tPreparedStatement \tpState;\n\tResultSet\t\t\trSet;\n\tMedia\t\t\t\tmedia;\n\t\n\tmediaSearched = new ArrayList<Media>();\n\tmedia...
[ "0.63531286", "0.55666846", "0.5267545", "0.52522683", "0.5172364", "0.5117319", "0.5078661", "0.5058075", "0.50019735", "0.49825716", "0.4959796", "0.49463362", "0.4914451", "0.49121207", "0.49093726", "0.48943588", "0.48307002", "0.4828549", "0.4796069", "0.4759774", "0.475...
0.46519592
46
========================================================================================================= Search by keyword with 2 booleans to tell if you want to search if it was previously rented or has won awards. Also needs the email of the user just to check if it was prevRented by that user.
public List<Media> keywordSearch(String keyword, boolean notPrevRented,boolean wonAwards,String emailOfUser) { List<Media> mediaSearched; List<Integer> mediaIDList; PreparedStatement pState; ResultSet rSet; Media media; mediaSearched = new ArrayList<Media>(); mediaIDList = new ArrayList<Integer>(); pState = null; rSet = null; try { Connection connection = ConnectionManager.getConnection(); if (notPrevRented && !wonAwards) { pState = connection.prepareStatement("SELECT DISTINCT m.* FROM Media m, Games g, Movies mo, Workers w, Works_On wo " + "WHERE (m.title LIKE ? OR m.genre LIKE ? " + "OR (m.mediaID = g.gameID AND g.platform LIKE ?) " + "OR (m.mediaID = mo.movieID AND mo.movieID = wo.movieID AND wo.workerID = w.workerID AND " + "w.wname LIKE ?)) " + "AND m.mediaID NOT IN (SELECT mediaID FROM rental_info WHERE email = ?)"); pState.clearParameters(); pState.setString(1, "%"+keyword+"%"); pState.setString(2, "%"+keyword+"%"); pState.setString(3, "%"+keyword+"%"); pState.setString(4, "%"+keyword+"%"); pState.setString(5, emailOfUser); } else if (wonAwards && !notPrevRented) { pState = connection.prepareStatement("SELECT DISTINCT m.* FROM Media m, Games g, Movies mo, Workers w, " + "Works_On wo, Won won " + "WHERE (m.title LIKE ? OR m.genre LIKE ? " + "OR (m.mediaID = mo.movieID AND mo.movieID = wo.movieID AND wo.workerID = w.workerID AND " + "w.wname LIKE ?)) AND won.movieID = m.mediaID"); pState.clearParameters(); pState.setString(1, "%"+keyword+"%"); pState.setString(2, "%"+keyword+"%"); pState.setString(3, "%"+keyword+"%"); } else if (notPrevRented && wonAwards) { pState = connection.prepareStatement("SELECT DISTINCT m.* FROM Media m, Games g, Movies mo, Workers w, " + "Works_On wo, Won won " + "WHERE (m.title LIKE ? OR m.genre LIKE ? " + "OR (m.mediaID = mo.movieID AND mo.movieID = wo.movieID AND wo.workerID = w.workerID AND " + "w.wname LIKE ?)) AND won.movieID = m.mediaID AND m.mediaID NOT IN (SELECT mediaID FROM rental_info WHERE email = ?)"); pState.clearParameters(); pState.setString(1, "%"+keyword+"%"); pState.setString(2, "%"+keyword+"%"); pState.setString(3, "%"+keyword+"%"); pState.setString(4, emailOfUser); } else { pState = connection.prepareStatement("SELECT DISTINCT m.* FROM Media m, Games g, Movies mo, Workers w, Works_On wo " + "WHERE (m.title LIKE ? OR m.genre LIKE ? " + "OR (m.mediaID = g.gameID AND g.platform LIKE ?) " + "OR (m.mediaID = mo.movieID AND mo.movieID = wo.movieID AND wo.workerID = w.workerID AND " + "w.wname LIKE ?)) "); pState.clearParameters(); pState.setString(1, "%"+keyword+"%"); pState.setString(2, "%"+keyword+"%"); pState.setString(3, "%"+keyword+"%"); pState.setString(4, "%"+keyword+"%"); } rSet = pState.executeQuery(); while(rSet.next()) { mediaIDList.add(rSet.getInt("mediaID")); } rSet.close(); pState.close(); connection.close(); mediaSearched = getMedia(mediaIDList); return mediaSearched; } catch(SQLException e) { System.out.println("SQLState = " + e.getSQLState() + "\n" + e.getMessage()); return mediaSearched; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String searchUserWithKeyword(){\r\n\t\tlog.info(\"Starting to search user(s) with keyword = \"+ searchkeyword);\r\n\t\tthis.clearErrorsAndMessages();\r\n\t\tusersList = new ArrayList<Users>();\r\n\t\tusersList.clear();\t\t\r\n\t\ttry {\t\t\r\n\t\t\tusersList = userService.findUsersWithNameLike(searchkeyword...
[ "0.56795", "0.54186714", "0.53673047", "0.5268478", "0.52262545", "0.5129726", "0.51186496", "0.5090665", "0.5072765", "0.5038385", "0.50292796", "0.50148106", "0.49841106", "0.49653682", "0.4922996", "0.49187258", "0.49134043", "0.48869", "0.48847705", "0.4876537", "0.486329...
0.64161736
0
Created by yfyuan on 2016/8/26.
@Component public interface CategoryDao { List<DashboardCategory> getCategoryList(); int save(DashboardCategory dashboardCategory); long countExistCategoryName(Map<String, Object> map); int update(DashboardCategory dashboardCategory); int delete(Long id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r...
[ "0.6125102", "0.6049762", "0.5894781", "0.58806396", "0.5873345", "0.5873345", "0.57904077", "0.5788893", "0.5767388", "0.5704523", "0.5701468", "0.56846017", "0.56648743", "0.566029", "0.5660073", "0.5649378", "0.564439", "0.56322426", "0.5624743", "0.56234676", "0.56234676"...
0.0
-1
Is the button now checked?
public void onRadioButtonClicked(View view) { boolean checked = ((RadioButton) view).isChecked(); // Check which radio button was clicked switch(view.getId()) { case R.id.radio_administrative: if (checked) KeyID=0; break; case R.id.radio_guest: if (checked) KeyID=1; break; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isChecked();", "boolean isChecked();", "boolean getIsChecked();", "public boolean ButtonStatusToRoundTrip(){\n\n wait.until(ExpectedConditions.elementSelectionStateToBe(roundTripButton,false));\n roundTripButton.click();\n System.out.println(\"Round Trip button is clicked\");\n ...
[ "0.751638", "0.751638", "0.73180526", "0.720519", "0.70841265", "0.7049289", "0.704204", "0.7012434", "0.6994069", "0.6956653", "0.69395673", "0.688862", "0.6882422", "0.68742406", "0.6862981", "0.6860526", "0.6757617", "0.6737411", "0.669353", "0.66571903", "0.66571903", "...
0.0
-1
end Method process getOuputFileName extracts the name of the cas, and returns the path defined by [homeDir]/this.outputDir.casName.cm.xml
private String getOutputFileName(JCas pJCas) { String returnValue = null; String name = getSourceName(pJCas); if ((this.outputProjectDirectorySaved.startsWith("/")) || (this.outputProjectDirectorySaved.startsWith("\\")) || (this.outputProjectDirectorySaved.indexOf(":") == 1)) returnValue = this.outputProjectDirectorySaved + "/" + name + ".txt.knowtator.xml"; else returnValue = this.homeDir + "/" + this.eHostWorkSpaceName + "/" + this.projectName + "/saved/" + name + ".txt.knowtator.xml"; return returnValue; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected String getResultFileName();", "public String getOutputFileName() {\n return outputFileName.getText();\n }", "public String getFileNameOut() {\r\n\t\treturn fileNameOut;\r\n\t}", "@Override\n\tpublic String generatePathStr(String component,\n\t\t\tString outputName) throws RemoteE...
[ "0.62382376", "0.609157", "0.60445255", "0.5966835", "0.5944676", "0.58861834", "0.5872345", "0.57968247", "0.57807684", "0.57806045", "0.56873804", "0.56858563", "0.5673747", "0.5664144", "0.5625069", "0.5560689", "0.5542846", "0.553775", "0.55249596", "0.5522328", "0.549597...
0.71171623
0
end Method getOutputFileName() getSourceName extracts the name of the cas, devoid of a class path
private String getSourceName(JCas pJCas) { String sourceURI = getReferenceLocation(pJCas); String name = null; if (sourceURI != null) { File aFile = new File(sourceURI); name = aFile.getName(); } else { name = "knowtator_" + String.valueOf(this.inputFileCounter++); } return name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String getOutputFileName(JCas pJCas) {\n String returnValue = null;\n \n String name = getSourceName(pJCas);\n \n if ((this.outputProjectDirectorySaved.startsWith(\"/\")) || (this.outputProjectDirectorySaved.startsWith(\"\\\\\"))\n || (this.outputProjectDirectorySaved.inde...
[ "0.6953044", "0.67044437", "0.66305107", "0.6618801", "0.6575801", "0.64762557", "0.6387478", "0.624555", "0.61728835", "0.60994744", "0.60918444", "0.6086861", "0.6067556", "0.60184216", "0.60184216", "0.60184216", "0.60184216", "0.60184216", "0.60184216", "0.60184216", "0.6...
0.7383748
0
Display an error page. Expects a template XHTML file on the classpath at /resources/conf/error[code].xhtml. If this does not exist, the generic /resources/conf/error.xhtml will be looked for. If this does not exist, an exception will be thrown.
public void errorPage(Throwable exception) { errorPage(0, exception.getMessage(), exception); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void errorPage(int code, String message, Throwable exception) {\n\n\t\tString errPage = Configuration.valueFor(\"xr.load.error-pages\") + \"/error-\" + code + \".xhtml\";\n\n\t\tAssetInfo info = ToolKit.get().getApplication().getAssetManager().locateAsset(new AssetKey<String>(errPage));\n\t\tif (info == nul...
[ "0.73003167", "0.60778755", "0.5841401", "0.5824669", "0.578835", "0.5771149", "0.5771149", "0.56333494", "0.5607184", "0.5593627", "0.5572124", "0.55477446", "0.5518023", "0.54742724", "0.5465849", "0.54593945", "0.5436305", "0.5362931", "0.5358459", "0.53581446", "0.5303858...
0.5691745
7
Display an error page. Expects a template XHTML file on the classpath at /resources/conf/error[code].xhtml. If this does not exist, the generic /resources/conf/error.xhtml will be looked for. If this does not exist, an exception will be thrown.
public void errorPage(String message) { errorPage(0, message, null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void errorPage(int code, String message, Throwable exception) {\n\n\t\tString errPage = Configuration.valueFor(\"xr.load.error-pages\") + \"/error-\" + code + \".xhtml\";\n\n\t\tAssetInfo info = ToolKit.get().getApplication().getAssetManager().locateAsset(new AssetKey<String>(errPage));\n\t\tif (info == nul...
[ "0.7300173", "0.6078489", "0.584134", "0.5825441", "0.5789214", "0.57723427", "0.57723427", "0.56919867", "0.563489", "0.56081384", "0.55724365", "0.5547722", "0.5519136", "0.5475213", "0.5465928", "0.5459646", "0.5437138", "0.5363571", "0.53599995", "0.5358594", "0.5303937",...
0.55939704
10
Display an error page. Expects a template XHTML file on the classpath at /resources/conf/error[code].xhtml. If this does not exist, the generic /resources/conf/error.xhtml will be looked for. If this does not exist, an exception will be thrown.
public void errorPage(int code, String message, Throwable exception) { String errPage = Configuration.valueFor("xr.load.error-pages") + "/error-" + code + ".xhtml"; AssetInfo info = ToolKit.get().getApplication().getAssetManager().locateAsset(new AssetKey<String>(errPage)); if (info == null) { errPage = Configuration.valueFor("xr.load.error-pages") + "/error.xhtml"; info = ToolKit.get().getApplication().getAssetManager().locateAsset(new AssetKey<String>(errPage)); if (info == null) { throw new RuntimeException("No resource " + Configuration.valueFor("xr.load.error-pages") + "/error.xhtml could " + "be found. This is needed a template to use for the error page." + "Create one, and use ${errorMessage}, ${errorTrace} and ${errorCode} as " + "place holders in the content. These will get replaced at runtime."); } } try { BufferedReader reader = new BufferedReader(new InputStreamReader(info.openStream())); StringBuilder bui = new StringBuilder(); try { String line; while ((line = reader.readLine()) != null) { bui.append(line); } } finally { reader.close(); } // Replace the content String content = bui.toString().replace("${errorCode}", code == 0 ? "" : String.valueOf(code)); content = content.replace("${errorMessage}", message == null ? "" : message); if (exception != null) { StringWriter traceWriter = new StringWriter(); exception.printStackTrace(new PrintWriter(traceWriter)); content = content.replace("${errorTrace}", traceWriter.toString()); } ByteArrayInputStream bain = new ByteArrayInputStream(content.getBytes("UTF-8")); setDocument(bain, errPage); } catch (IOException ioe) { throw new RuntimeException("Could not read error page."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void showError(String error);", "protected void initErrorTemplate(ServletConfig config) throws ServletException {\n if (errorTemplateFile == null) {\n errorTemplateFile = config.getInitParameter(\"wings.error.template\");\n }\n }", "private void action_error(HttpServletRe...
[ "0.6078393", "0.58403856", "0.5826265", "0.57890224", "0.57717776", "0.57717776", "0.56920624", "0.56342673", "0.5607731", "0.55942816", "0.557257", "0.5548556", "0.5518448", "0.54747933", "0.5466046", "0.54598325", "0.5436438", "0.5362675", "0.5359646", "0.53588223", "0.5303...
0.73009056
0
Get the form an element is part of.
public XhtmlForm getForm(Element el) { ReplacedElementFactory ref = getSharedContext().getReplacedElementFactory(); if (ref != null && ref instanceof XHTMLReplacedElementFactoryImpl) { return ((XHTMLReplacedElementFactoryImpl) ref).getForm(el); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected final Form getForm() {\n\t\treturn itsForm;\n\t}", "public String getForm() {\r\n\t\treturn form;\r\n\t}", "public Form getForm() {\n return form;\n }", "public XmlNsForm getElementFormDefault();", "public ResourcesMetadata getForm()\n\t\t{\n\t\t\treturn m_form;\n\t\t}", "public final...
[ "0.7043089", "0.68910486", "0.6869414", "0.6729166", "0.6586796", "0.6447276", "0.6410353", "0.63939077", "0.6369031", "0.6356918", "0.6347297", "0.6176299", "0.615593", "0.6116939", "0.60878366", "0.6020579", "0.6020579", "0.6014598", "0.5988519", "0.5967783", "0.59585357", ...
0.71181476
0
For subclasses to override
protected void onInit() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "@Override\n protected void checkSubclass() {\n }", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n protected void checkSubc...
[ "0.7128159", "0.70202625", "0.6992359", "0.6923187", "0.6921287", "0.6802686", "0.6802686", "0.6802686", "0.6772789", "0.6772789", "0.6772789", "0.6772789", "0.6772789", "0.6772789", "0.6772789", "0.6772789", "0.6772789", "0.6772789", "0.6772789", "0.6772789", "0.6772789", ...
0.0
-1
For subclasses to override
protected void onHover(Element el) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "@Override\n protected void checkSubclass() {\n }", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n protected void checkSubc...
[ "0.7128159", "0.70202625", "0.6992359", "0.6923187", "0.6921287", "0.6802686", "0.6802686", "0.6802686", "0.6772789", "0.6772789", "0.6772789", "0.6772789", "0.6772789", "0.6772789", "0.6772789", "0.6772789", "0.6772789", "0.6772789", "0.6772789", "0.6772789", "0.6772789", ...
0.0
-1
write your code here
public static void main(String[] args) throws Exception { Scanner scn=new Scanner(System.in); int n1=scn.nextInt(); int[] a1=new int[n1]; for(int i=0;i<a1.length;i++){ a1[i]=scn.nextInt(); } int n2=scn.nextInt(); int[] a2=new int[n2]; for(int i=0;i<a2.length;i++){ a2[i]=scn.nextInt(); } int[] diff=new int[n2]; int c=0; int i=a1.length-1; int j=a2.length-1; int k=diff.length-1; while(k >= 0){ int d=0; int a1v= i >= 0? a1[i]: 0; if(a2[j] +c >= a1v){ d= a2[j] + c -a1v; c=0; }else{ d= a2[j] + c + 10 -a1v; c=-1; } diff[k] = d; i--; j--; k--; } int idx = 0; while(idx < diff.length){ if(diff[idx] == 0){ idx++; }else{ break; } } while(idx < diff.length){ System.out.println(diff[idx]); idx++; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void logic(){\r\n\r\n\t}", "public static void generateCode()\n {\n \n }", "@Override\n\tprotected void logic() {\n\n\t}", "private static void cajas() {\n\t\t\n\t}", "void pramitiTechTutorials() {\n\t\n}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\r\n\tpub...
[ "0.61019534", "0.6054925", "0.58806974", "0.58270746", "0.5796887", "0.56999695", "0.5690986", "0.56556827", "0.5648637", "0.5640487", "0.56354505", "0.56032085", "0.56016207", "0.56006724", "0.5589654", "0.5583692", "0.55785793", "0.55733466", "0.5560209", "0.55325305", "0.5...
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.register_device, 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.7249201", "0.7204109", "0.7197405", "0.71792436", "0.7109801", "0.7041446", "0.7040234", "0.70145714", "0.7011273", "0.6983118", "0.6946729", "0.6940447", "0.6936383", "0.6920103", "0.6920103", "0.6893587", "0.6885479", "0.6877562", "0.6877041", "0.6864375", "0.6864375", ...
0.0
-1
/ Reusable method:> Verify Page Header displayed at webpage
public void Verify_Page_Header_Visibility() { if(Page_header.isDisplayed()) System.out.println("header visible at webpage"); else System.out.println("header not visible at webpage"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void Verify_Expected_Header_Visibility()\r\n\t{\r\n\t\tString Runtime_Header_text=Page_header.getText();\r\n\t\tif(Runtime_Header_text.equals(Exp_page_header))\r\n\t\t\tSystem.out.println(\"Expected Header visible at webpage\");\r\n\t\telse\r\n\t\t\tSystem.out.println(\"Expected Header not visible at webpag...
[ "0.82304186", "0.7432842", "0.7052289", "0.6965917", "0.692292", "0.68227947", "0.68227947", "0.6808869", "0.6801031", "0.6796141", "0.6702792", "0.65674776", "0.65674776", "0.65674776", "0.65625423", "0.6529878", "0.6518914", "0.6454745", "0.64232904", "0.6413354", "0.641335...
0.80893195
1
Reusable Method:> Verify Expected Header visible at webpage
public void Verify_Expected_Header_Visibility() { String Runtime_Header_text=Page_header.getText(); if(Runtime_Header_text.equals(Exp_page_header)) System.out.println("Expected Header visible at webpage"); else System.out.println("Expected Header not visible at webpage"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void Verify_Page_Header_Visibility()\r\n\t{\r\n\t\t if(Page_header.isDisplayed())\r\n\t\t\t System.out.println(\"header visible at webpage\");\r\n\t\t else\r\n\t\t\t System.out.println(\"header not visible at webpage\");\r\n\t\t\r\n\t}", "boolean hasHeader();", "@Then(\"^check the heading of the page$\"...
[ "0.82031065", "0.7014159", "0.69696856", "0.68825984", "0.6845062", "0.683437", "0.67090553", "0.66082644", "0.6600331", "0.647844", "0.64711165", "0.64711165", "0.64711165", "0.6433688", "0.64281154", "0.6366317", "0.6339757", "0.63101166", "0.6303854", "0.6302565", "0.62551...
0.8839959
0
reusable method:> verify home error message displayed
public void Verify_Home_error_msg_displayed_on_Empty_Search() { String Runtime_text=Home_error_msg.getText(); if(Runtime_text.contains(Exp_home_err_msg)) System.out.println("As expected error msg displayed at webpage"); else System.out.println("Expected home error message displayed at webpage"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void deviceAndPhonVerificationErrMsg()\n\t{\n\t\tLog.info(\"======== Device Verification Error Message ========\");\n\n\t\ttry {\n\t\t\tsoftAssert.assertTrue(verifyPhoneErrMsg.getText().contains(\"failed\"));\n\t\t\tsoftAssert.assertAll();\n\t\t} catch (Exception e){} \n\t\t\n\t\tLog.info(\"======== Clickin...
[ "0.68926924", "0.68874705", "0.6711096", "0.6710604", "0.6546286", "0.6533543", "0.65233845", "0.65027124", "0.6496933", "0.64685637", "0.64644676", "0.6431888", "0.6402307", "0.6402307", "0.63979256", "0.63816005", "0.63816005", "0.6372079", "0.6372079", "0.6329526", "0.6303...
0.7209088
0
If this is the first time screen display initialize views
@Override public void onPageSelected(int position) { if (mIsFirstAppRun) { mTxtTitle.setText(getString(R.string.get_started)); mTxtSubTitle.setText(getString(R.string.initial_time)); } else { // If pager page change set data base on its position mTxtTitle.setText("(" + (position + 1) + "/" + mWorkoutIds.size() + ") " + mWorkoutNames.get(position)); mTxtSubTitle.setText(mWorkoutTimes.get(position)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void viewInit() {\n }", "@Override \n protected void startup() {\n GretellaView view = new GretellaView(this);\n show( view );\n view.initView(); \n }", "@Override protected void startup() {\n show(new FrontView());\n //show(new RestaurantManagementVie...
[ "0.7628868", "0.74603075", "0.7458465", "0.74331856", "0.73732746", "0.73563886", "0.73318285", "0.72733355", "0.72519916", "0.7186146", "0.7186146", "0.71751064", "0.71662956", "0.7128482", "0.70821434", "0.7080772", "0.7080772", "0.7069311", "0.70690155", "0.7064802", "0.70...
0.0
-1
Check ad visibility. If visible, create adRequest
@Override protected Void doInBackground(Void... params) { if(mIsAdmobVisible) { // Create an ad request if (Utils.IS_ADMOB_IN_DEBUG) { adRequest = new AdRequest.Builder(). addTestDevice(AdRequest.DEVICE_ID_EMULATOR).build(); } else { adRequest = new AdRequest.Builder().build(); } // When interstitialTrigger equals ARG_TRIGGER_VALUE, display interstitial ad interstitialAd = new InterstitialAd(ActivityStopWatch.this); interstitialAd.setAdUnitId(ActivityStopWatch.this.getResources() .getString(R.string.interstitial_ad_unit_id)); interstitialTrigger = Utils.loadPreferences(Utils.ARG_TRIGGER, ActivityStopWatch.this); if(interstitialTrigger == Utils.ARG_TRIGGER_VALUE) { if(Utils.IS_ADMOB_IN_DEBUG) { interstitialAdRequest = new AdRequest.Builder() .addTestDevice(AdRequest.DEVICE_ID_EMULATOR) .build(); }else { interstitialAdRequest = new AdRequest.Builder().build(); } Utils.savePreferences(Utils.ARG_TRIGGER, 0, ActivityStopWatch.this); }else{ Utils.savePreferences(Utils.ARG_TRIGGER, (interstitialTrigger+1), ActivityStopWatch.this); } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void requestFreshAd() {\n // Get a message from AdMob to the developer here. Only run once and only run on the emulator.\n Context context = getContext();\n if (AdManager.getUserId(context) == null && !checkedForMessages) // null means this is emulator.\n {\n // go ge...
[ "0.6038247", "0.5669345", "0.56408066", "0.5605579", "0.5560122", "0.5546525", "0.5418706", "0.5364202", "0.5327309", "0.5294298", "0.5232945", "0.5198794", "0.5177623", "0.51365733", "0.5117823", "0.510521", "0.5086481", "0.5083038", "0.5073717", "0.50446904", "0.5038405", ...
0.49208355
43
TODO Autogenerated method stub When data still retrieve from database display loading view and hide other view
@Override protected void onPreExecute() { mLytContainerLayout.setVisibility(View.GONE); mToolbar.setVisibility(View.GONE); mPrgLoading.setVisibility(View.VISIBLE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void loadData() {\n if (this.model != null) {\n\n this.dataLayout.setVisibility(View.VISIBLE);\n this.emptyText.setVisibility(View.GONE);\n\n\n if (this.model.getSolution() != null) {\n this.solutionView.setText(this.model.getSolution());\n }\n if...
[ "0.67012674", "0.6618403", "0.6601466", "0.64066255", "0.6329147", "0.62893575", "0.62792706", "0.627505", "0.6204477", "0.6178232", "0.6176781", "0.6173981", "0.61580825", "0.6121913", "0.61167645", "0.61127096", "0.6063994", "0.6060561", "0.6045251", "0.60372764", "0.603722...
0.5837595
46
TODO Autogenerated method stub
@Override protected Void doInBackground(Void... params) { try { Thread.sleep(1000); } catch (InterruptedException e) { e.printStackTrace(); } // Get workout image from database getWorkoutGalleryImagesFromDatabase(); return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void 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
TODO Autogenerated method stub After fetching gallery images, add them to view pager in background process
@Override protected void onPostExecute(Void result) { startViewPagerThread(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void galleryAddPic() {\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View view = inflater.inflate(R.layout.gallery_pager, container, false);\n\n this.pager = view.findViewById(...
[ "0.7018693", "0.69285846", "0.685535", "0.6802411", "0.6729468", "0.6683059", "0.65859467", "0.64848524", "0.6423233", "0.6420838", "0.639659", "0.6361939", "0.63595283", "0.6341176", "0.63404375", "0.63372374", "0.6277101", "0.6262473", "0.62569195", "0.6247921", "0.62396955...
0.0
-1
Method to add gallery images to view pager in UI thread
private void startViewPagerThread() { runOnUiThread(new Runnable() { @Override public void run() { int i = 0; View[] viewFlippers = new View[mWorkoutIds.size()]; while (i < mWorkoutIds.size()) { viewFlippers[i] = new ViewWorkout(ActivityStopWatch.this, mWorkoutGalleries.get(mWorkoutIds.get(i))); i++; } mCircularBarPager.setViewPagerAdapter(new AdapterPagerWorkout( viewFlippers)); mLytContainerLayout.setVisibility(View.VISIBLE); mToolbar.setVisibility(View.VISIBLE); mPrgLoading.setVisibility(View.GONE); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void galleryAddPic() {\n\t}", "public void run() {\n runOnUiThread(new Runnable() {\n public void run() {\n imageSwitcher.setImageResource(gallery[position]);\n position++;\n if (position == 8) {\n ...
[ "0.7136296", "0.7121856", "0.6815928", "0.65204763", "0.6492256", "0.6289219", "0.6260779", "0.62397146", "0.6208518", "0.6207421", "0.61432487", "0.6139287", "0.6129246", "0.61178017", "0.6108225", "0.6070216", "0.6049822", "0.6047574", "0.5985437", "0.5972395", "0.5961701",...
0.58668196
29
Method to get workout gallery images from database
private void getWorkoutGalleryImagesFromDatabase(){ ArrayList<ArrayList<Object>> data; for(int i = 0; i < mWorkoutIds.size(); i++) { data = mDbHelperWorkouts.getImages(mWorkoutIds.get(i)); ArrayList<String> gallery = new ArrayList<String>(); // If image gallery is not available for selected workout id, // add workout image to the gallery if(data.size() > 0) { // store data to arraylist variable for (int j = 0; j < data.size(); j++) { ArrayList<Object> row = data.get(j); gallery.add(row.get(0).toString()); } }else{ gallery.add(mWorkoutImages.get(i)); } mWorkoutGalleries.put(mWorkoutIds.get(i), gallery); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void getImagesFromDatabase() {\n try {\n mCursor = mDbAccess.getPuzzleImages();\n\n if (mCursor.moveToNext()) {\n for (int i = 0; i < mCursor.getCount(); i++) {\n String imagetitle = mCursor.getString(mCursor.getColumnIndex(\"imagetitle\"));\n ...
[ "0.71217376", "0.6448778", "0.6424593", "0.639729", "0.63427246", "0.62525547", "0.6241317", "0.6193796", "0.61876214", "0.6149768", "0.61343306", "0.61018944", "0.60652864", "0.604919", "0.6008754", "0.600789", "0.5981487", "0.5958445", "0.5949882", "0.5945133", "0.5935776",...
0.8497808
0
Method to set count down timer
private void startTimer(String time){ String[] splitTime = time.split(":"); int splitMinute = Integer.valueOf(splitTime[0]); int splitSecond = Integer.valueOf(splitTime[1]); Long mMilisSecond = (long) (((splitMinute * 60) + splitSecond) * 1000); int max = (((splitMinute * 60) + splitSecond) * 1000); mCircularBarPager.getCircularBar().setMax(max); mStep = (int) ((max * INTERVAL) / mMilisSecond); mCounter = new Counter(mMilisSecond, INTERVAL); mStart = mEnd; mEnd = mEnd + mStep; mCounter.start(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void startTimerAfterCountDown() {\n \t\thandler = new Handler();\n \t\tprepareTimeCountingHandler();\n \t\thandler.post(new CounterRunnable(COUNT_DOWN_TIME));\n \t}", "private void countdown(){\n timer = new CountDownTimer(timeLeft, 1000) {\n @Override\n public void onTick(lo...
[ "0.74446744", "0.7159988", "0.7128846", "0.70529205", "0.6991966", "0.6967132", "0.67811686", "0.67477155", "0.66104275", "0.65677845", "0.65661633", "0.65653956", "0.65549", "0.6545523", "0.6539002", "0.6525027", "0.65186703", "0.6502306", "0.6498797", "0.6468775", "0.644114...
0.0
-1
Turn off activity screen on
@Override public void onPositive(MaterialDialog dialog) { getWindow().clearFlags( WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); finish(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void turnOff() {\n update(0,0,0);\n this.status = false;\n }", "public static void preventScreenDisabling(Activity activity) {\r\n activity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);\r\n }", "public void turnOff() {\n\t\tisOn = false;\n\t}", ...
[ "0.7793738", "0.7467491", "0.7322817", "0.72931004", "0.7224162", "0.7191098", "0.7142151", "0.71391374", "0.7135858", "0.70603794", "0.7058052", "0.7016775", "0.6779751", "0.67623675", "0.6725355", "0.6706655", "0.6702833", "0.66253114", "0.66215014", "0.66121423", "0.660121...
0.0
-1
Set current view pager with current workout
@Override public void onTick(long millisUntilFinished) { mCirclePageIndicator.setCurrentItem(mCurrentWorkout); isRunning = true; mStart = mEnd; mEnd = mEnd + mStep; mCircularBarPager.getCircularBar().animateProgress(mStart, mEnd, INTERVAL); // Convert time format from millisUntilFinished to "00:00" format mTimer = String.format("%02d:%02d", TimeUnit.MILLISECONDS.toMinutes(millisUntilFinished), TimeUnit.MILLISECONDS.toSeconds(millisUntilFinished) - TimeUnit.MINUTES.toSeconds( TimeUnit.MILLISECONDS.toMinutes(millisUntilFinished))); if(mIsFirstAppRun){ mTxtBreakTime.setText(mTimer); }else{ if(mIsBreak){ mTxtSubTitle.setText(mTimer); } else { mTxtBreakTime.setText(mTimer); mTxtSubTitle.setText(getResources().getString(R.string.initial_time)); } } if (millisUntilFinished < mAlert && paramAlert==1){ mMediaPlayer.start(); if(mIsFirstAppRun){ saySomething(getString(R.string.first_step) + " " + mWorkoutNames.get(0)); } if(!mIsBreak) { if(mCurrentData == (mWorkoutIds.size() - 1)) { saySomething(getString(R.string.last_step) + " " + mWorkoutNames.get(mCurrentData)); }else{ saySomething(getString(R.string.next_step) + " " + mWorkoutNames.get(mCurrentData)); } } paramAlert+=1; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void startViewPagerThread() {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n int i = 0;\n View[] viewFlippers = new View[mWorkoutIds.size()];\n while (i < mWorkoutIds.size()) {\n viewFlippers[...
[ "0.5984447", "0.58517665", "0.5800215", "0.5606538", "0.5549866", "0.54080886", "0.5341365", "0.5320319", "0.5298687", "0.5282165", "0.5262207", "0.5241812", "0.52247214", "0.5207102", "0.52067703", "0.5186387", "0.5183849", "0.51763284", "0.517339", "0.5147249", "0.51454884"...
0.0
-1
Method to pause count down timer
public String timerPause(){ return mTimer; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void timerPause() {\n timerStop();\n\n // Start the pause timer\n pauseTimer_startTime = System.currentTimeMillis();\n pauseTimerHandler.postDelayed(pauseTimerRunnable, 0);\n }", "public void newTurnPauseCountdown()\n {\n pauseNewTurn = true;\n pauseNewTurn...
[ "0.75121456", "0.737356", "0.7214523", "0.71443796", "0.70301", "0.70045686", "0.6966679", "0.69142413", "0.6865547", "0.6851531", "0.68180007", "0.6789465", "0.67818356", "0.67643404", "0.6757459", "0.67287016", "0.67209864", "0.66938365", "0.66736436", "0.66736436", "0.6673...
0.0
-1
Method to check count down timer status
public Boolean timerCheck(){ return isRunning; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "TimerStatus onTimer();", "boolean hasWaitTime();", "boolean doCommandDeviceTimerGet();", "public void countDown() {\n makeTimer();\n int delay = 100;\n int period = 30;\n timer.scheduleAtFixedRate(new TimerTask() {\n public void run() {\n tick();\n ...
[ "0.67091566", "0.66017425", "0.63292396", "0.6241871", "0.6233393", "0.6218327", "0.6212009", "0.61239445", "0.6105242", "0.60899913", "0.60451216", "0.5995688", "0.5972981", "0.5928435", "0.5922504", "0.5913806", "0.5889323", "0.58685845", "0.5862659", "0.5835105", "0.581247...
0.6998274
0
Method to convert message to speech
private void saySomething(String message){ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { ttsGreater21(message); } else { ttsUnder20(message); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface Text2Speech {\n\t\n\t/**\n\t * Supported formats.\n\t */\n\tenum OutputFormat {\n\t\t/**\n\t\t * MP3 format.\n\t\t */\n\t\tMP3,\n\t\t/**\n\t\t * Ogg-vorbis format.\n\t\t */\n\t\tOGG\n\t}\n\t\n\t/**\n\t * Produce MP3 with specified phrase.\n\t * \n\t * @param phrase Some sentence.\n\t * @return MP3...
[ "0.658674", "0.65087306", "0.6461957", "0.64285415", "0.64181256", "0.6399537", "0.63765883", "0.63454366", "0.6256342", "0.624712", "0.61628604", "0.6037727", "0.5957159", "0.5954676", "0.5938959", "0.592282", "0.58411795", "0.5803664", "0.5796512", "0.57785916", "0.5753018"...
0.0
-1
Method to get the next workout
private void getNextWorkout(){ mCurrentWorkout += 1; mCurrentData += 1; if (mCurrentData > 1) { mTxtTitle.setText("(" + mCurrentWorkout + "/" + mWorkoutNames.size() + ") " + mWorkoutNames.get(mCurrentData - 1)); mIsPlay = true; mIsBreak = true; // int is = Integer.parseInt(mWorkoutIds.get(mCurrentData - 1)); startTimer(mWorkoutTimes.get(mCurrentData - 1)); } mCirclePageIndicator.setCurrentItem(mCurrentData - 1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public WorkerInfo getNextWorker() {\n\t\tsynchronized (nextWorkerLock) {\n\t\t\tWorkerInfo worker = this.workers[this.nextWorker++];\n\t\t\tthis.nextWorker %= this.workers.length;\n\t\t\treturn worker;\n\t\t}\n\t\t\n\t}", "public final Workout getWorkout(int index) {\r\n\t\treturn workoutList.get(index);\r\n\t}"...
[ "0.64031804", "0.6340393", "0.61379075", "0.6093075", "0.6075411", "0.6064996", "0.5945242", "0.59243613", "0.5905575", "0.58669466", "0.5808431", "0.57940674", "0.57192785", "0.571826", "0.5710632", "0.5707665", "0.5649458", "0.56467646", "0.5596158", "0.55469036", "0.553998...
0.75955653
0