Perform fling action.
        Usage:
        d().fling()  # default vertically, forward
        d().fling.horiz.forward()
        d().fling.vert.backward()
        d().fling.toBeginning(max_swipes=100) # vertically
        d().fling.horiz.toEnd()
886
def fling(self):
        '''
        
        '''
        @param_to_property(
            dimention=["vert", "vertically", "vertical", "horiz", "horizental", "horizentally"],
            action=["forward", "backward", "toBeginning", "toEnd"]
        )
        def _fling(dimention="vert", action="forward", max_swipes=1000):
            vertical = dimention in ["vert", "vertically", "vertical"]
            if action == "forward":
                return self.jsonrpc.flingForward(self.selector, vertical)
            elif action == "backward":
                return self.jsonrpc.flingBackward(self.selector, vertical)
            elif action == "toBeginning":
                return self.jsonrpc.flingToBeginning(self.selector, vertical, max_swipes)
            elif action == "toEnd":
                return self.jsonrpc.flingToEnd(self.selector, vertical, max_swipes)

        return _fling
358435
@Override
    public void backward() {
        modInX.getOutputAdj().elemAdd(yAdj);
        modInW.getOutputAdj().elemSubtract(yAdj);
    }
1360800
def _move(self, roll=0, pitch=0, gaz=0, yaw=0):
        '''
        
        '''
        self.send(at.PCMD(at.PCMD.flag.progressive, roll, pitch, gaz, yaw))
907522
function frontFlip(options, callback) {
  if (typeof options === 'function') {
    callback = options;
    options = {};
  }
  this.logger('RollingSpider#frontFlip');
  if (this.status.flying) {
    this.writeTo(
      'fa0b',
      new Buffer([0x02, ++this.steps.fa0b & 0xFF, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]),
      callback
    );
  } else {
    this.logger('Calling RollingSpider#frontFlip when it\'s not in the air isn\'t going to do anything');
    if (typeof callback === 'function') {
      callback();
    }
  }
  if (callback) {
    callback();
  }
}
219440
public boolean onTouchEvent(final MotionEvent event) {
    switch (event.getActionMasked()) {
      case MotionEvent.ACTION_MOVE: {
        // update pointers
        updatePointersOnMove(event);
        // start a new gesture if not already started
        if (!mGestureInProgress && mPointerCount > 0 && shouldStartGesture()) {
          startGesture();
        }
        // notify listener
        if (mGestureInProgress && mListener != null) {
          mListener.onGestureUpdate(this);
        }
        break;
      }

      case MotionEvent.ACTION_DOWN:
      case MotionEvent.ACTION_POINTER_DOWN:
      case MotionEvent.ACTION_POINTER_UP:
      case MotionEvent.ACTION_UP: {
        // restart gesture whenever the number of pointers changes
        mNewPointerCount = getPressedPointerCount(event);
        stopGesture();
        updatePointersOnTap(event);
        if (mPointerCount > 0 && shouldStartGesture()) {
          startGesture();
        }
        break;
      }

      case MotionEvent.ACTION_CANCEL: {
        mNewPointerCount = 0;
        stopGesture();
        reset();
        break;
      }
    }
    return true;
  }
1371612
def fling_forward_horizontally(self, *args, **selectors):
        
        return self.device(**selectors).fling.horiz.forward()
262898
def possible_moves(self, position):
        
        for move in itertools.chain(self.forward_moves(position),
                                    self.capture_moves(position),
                                    self.en_passant_moves(position)):
            yield move
931612
function moveSelection(forward, reset) {
		var p, _p, cur;
		
		if (!$('[key]', self.cwd).length) {
			return;
		}
		
		if (self.fm.selected.length == 0) {
			p = $('[key]:'+(forward ? 'first' : 'last'), self.cwd);
			self.fm.select(p);
		} else if (reset) {
			p  = $('.ui-selected:'+(forward ? 'last' : 'first'), self.cwd);
			_p = p[forward ? 'next' : 'prev']('[key]');
			if (_p.length) {
				p = _p;
			}
			self.fm.select(p, true);
		} else {
			if (self.pointer) {
				cur = $('[key="'+self.pointer+'"].ui-selected', self.cwd);
			}
			if (!cur || !cur.length) {
				cur = $('.ui-selected:'+(forward ? 'last' : 'first'), self.cwd);
			}
			p = cur[forward ? 'next' : 'prev']('[key]');

			if (!p.length) {
				p = cur;
			} else {
				if (!p.hasClass('ui-selected')) {
					self.fm.select(p);
				} else {
					if (!cur.hasClass('ui-selected')) {
						self.fm.unselect(p);
					} else {
						_p = cur[forward ? 'prev' : 'next']('[key]')
						if (!_p.length || !_p.hasClass('ui-selected')) {
							self.fm.unselect(cur);
						} else {
							while ((_p = forward ? p.next('[key]') : p.prev('[key]')) && p.hasClass('ui-selected')) {
								p = _p;
							}
							self.fm.select(p);
						}
					}
				}
			} 
		}
		self.pointer = p.attr('key');
		self.fm.checkSelectedPos(forward);
	}
208954
def scroll_backward_horizontally(self, steps=10, *args, **selectors):
        
        return self.device(**selectors).scroll.horiz.backward(steps=steps)
659132
private void doStep(boolean forward) {

        // increment or decrement sequence
        if(forward)
            sequenceIndex++;
        else
            sequenceIndex--;

        // check sequence bounds; rollover if needed
        if(sequenceIndex >= stepSequence.length)
            sequenceIndex = 0;
        else if(sequenceIndex < 0)
            sequenceIndex = (stepSequence.length - 1);

        // start cycling GPIO pins to move the motor forward or reverse
        for(int pinIndex = 0; pinIndex < pins.length; pinIndex++) {
            // apply step sequence
            double nib = Math.pow(2, pinIndex);
            if((stepSequence[sequenceIndex] & (int)nib) > 0)
                pins[pinIndex].setState(onState);
            else
                pins[pinIndex].setState(offState);
        }
        try {
            Thread.sleep(stepIntervalMilliseconds, stepIntervalNanoseconds);
        }
        catch (InterruptedException e) {}
    }
1257667
void mergeRolledBackTransaction(Object[] list, int start, int limit) {

        for (int i = start; i < limit; i++) {
            RowAction rowact = (RowAction) list[i];

            if (rowact == null || rowact.type == RowActionBase.ACTION_NONE
                    || rowact.type == RowActionBase.ACTION_DELETE_FINAL) {
                continue;
            }

            Row row = rowact.memoryRow;

            if (row == null) {
                PersistentStore store =
                    rowact.session.sessionData.getRowStore(rowact.table);

                row = (Row) store.get(rowact.getPos(), false);
            }

            if (row == null) {
                continue;
            }

            synchronized (row) {
                rowact.mergeRollback(row);
            }
        }

//        } catch (Throwable t) {
//            System.out.println("throw in merge");
//            t.printStackTrace();
//        }
    }
480925
def swipe_bottom(self, steps=10, *args, **selectors):
        
        self.device(**selectors).swipe.down(steps=steps)
965071
@Override
	public void onMapTouchMove(TouchEvent<?> event) {
		onDrag(event);
		event.stopPropagation();
		event.preventDefault();
	}
447278
@Override
  public boolean onGenericMotionEvent(MotionEvent event) {
    if ((event.getSource() & InputDevice.SOURCE_CLASS_POINTER) != 0) {
      switch (event.getAction()) {
        case MotionEvent.ACTION_SCROLL: {
          if (!mIsBeingDragged) {
            final float vscroll = event.getAxisValue(MotionEvent.AXIS_VSCROLL);
            final float hscroll = event.getAxisValue(MotionEvent.AXIS_HSCROLL);
            if (vscroll != 0) {
              final int verticalScrollRange = getVerticalScrollRange();
              final int horizontalScrollRange = getHorizontalScrollRange();
              int oldScrollY = getScrollY();
              int oldScrollX = getScrollX();
              int newScrollY = (int) (oldScrollY - vscroll);
              int newScrollX = (int) (oldScrollX - hscroll);
              if (newScrollY < 0) {
                newScrollY = 0;
              } else if (newScrollY > verticalScrollRange) {
                newScrollY = verticalScrollRange;
              }
              if (newScrollX < 0) {
                newScrollX = 0;
              } else if (newScrollX > horizontalScrollRange) {
                newScrollX = horizontalScrollRange;
              }
              if (newScrollY != oldScrollY || newScrollX != oldScrollX) {
                super.scrollTo(newScrollX, newScrollY);
                return true;
              }
            }
          }
        }
      }
    }
    return super.onGenericMotionEvent(event);
  }
1333146
def forward(self, step):
        
        x = self.pos_x + math.cos(math.radians(self.rotation)) * step
        y = self.pos_y + math.sin(math.radians(self.rotation)) * step
        prev_brush_state = self.brush_on
        self.brush_on = True
        self.move(x, y)
        self.brush_on = prev_brush_state
417615
def scroll_to_end_horizontally(self, steps=10, *args, **selectors):
        
        return self.device(**selectors).scroll.horiz.toEnd(steps=steps)
1335494
function moveHandles ( upward, proposal, locations, handleNumbers ) {

            var proposals = locations.slice();

            var b = [!upward, upward];
            var f = [upward, !upward];

            // Copy handleNumbers so we don't change the dataset
            handleNumbers = handleNumbers.slice();

            // Check to see which handle is 'leading'.
            // If that one can't move the second can't either.
            if ( upward ) {
                handleNumbers.reverse();
            }

            // Step 1: get the maximum percentage that any of the handles can move
            if ( handleNumbers.length > 1 ) {

                handleNumbers.forEach(function(handleNumber, o) {

                    var to = checkHandlePosition(proposals, handleNumber, proposals[handleNumber] + proposal, b[o], f[o]);

                    // Stop if one of the handles can't move.
                    if ( to === false ) {
                        proposal = 0;
                    } else {
                        proposal = to - proposals[handleNumber];
                        proposals[handleNumber] = to;
                    }
                });
            }

            // If using one handle, check backward AND forward
            else {
                b = f = [true];
            }

            var state = false;

            // Step 2: Try to set the handles with the found percentage
            handleNumbers.forEach(function(handleNumber, o) {
                state = setHandle(handleNumber, locations[handleNumber] + proposal, b[o], f[o]) || state;
            });

            // Step 3: If a handle moved, fire events
            if ( state ) {
                handleNumbers.forEach(function(handleNumber){
                    fireEvent('update', handleNumber);
                    fireEvent('slide', handleNumber);
                });
            }
        }