GetShift
 Returns a single `Shift` specified by id.
 @param id UUID for the &#x60;Shift&#x60; being retrieved.
 @param [Hash] opts the optional parameters
 @return [GetShiftResponse]
960035
def get_shift(id, opts = {})
      data, _status_code, _headers = get_shift_with_http_info(id, opts)
      return data
    end
1206328
public static function retrieve($id, $opts = null)
    {
        $opts = \Stripe\Util\RequestOptions::parse($opts);
        $instance = new static($id, $opts);
        $instance->refresh();
        return $instance;
    }
724831
function greaterShift(x, y, shift) {
  var i, kx=x.length, ky=y.length;
  k=((kx+shift)<ky) ? (kx+shift) : ky;
  for (i=ky-1-shift; i<kx && i>=0; i++)
    if (x[i]>0)
      return 1; //if there are nonzeros in x to the left of the first column of y, then x is bigger
  for (i=kx-1+shift; i<ky; i++)
    if (y[i]>0)
      return 0; //if there are nonzeros in y to the left of the first column of x, then x is not bigger
  for (i=k-1; i>=shift; i--)
    if      (x[i-shift]>y[i]) return 1;
    else if (x[i-shift]<y[i]) return 0;
  return 0;
}
495493
def status_unmute(self, id):
        
        id = self.__unpack_id(id)
        url = '/api/v1/statuses/{0}/unmute'.format(str(id))
        return self.__api_request('POST', url)
553611
public static long[] shiftRightI(long[] v, int off) {
    if(off == 0) {
      return v;
    }
    if(off < 0) {
      return shiftLeftI(v, -off);
    }
    // Break shift into integers to shift and bits to shift
    final int shiftWords = off >>> LONG_LOG2_SIZE;
    final int shiftBits = off & LONG_LOG2_MASK;

    if(shiftWords >= v.length) {
      return zeroI(v);
    }
    // Simple case - multiple of word size
    if(shiftBits == 0) {
      // Move whole words down
      System.arraycopy(v, shiftWords, v, 0, v.length - shiftWords);
      // Fill top words with zeros
      Arrays.fill(v, v.length - shiftWords, v.length, 0);
      return v;
    }
    // Overlapping case
    final int unshiftBits = Long.SIZE - shiftBits;
    // Bottom-up to not overlap the operations.
    for(int i = 0; i < v.length - shiftWords - 1; i++) {
      final int src = i + shiftWords;
      v[i] = (v[src + 1] << unshiftBits) | (v[src] >>> shiftBits);
    }
    // The last original word
    v[v.length - shiftWords - 1] = v[v.length - 1] >>> shiftBits;
    // Fill whole words "lost" by the shift
    Arrays.fill(v, v.length - shiftWords, v.length, 0);
    return v;
  }
1010762
def get_by_id(cls, id):
        

        if any((isinstance(id, basestring) and id.isdigit(), isinstance(id,
               (int, float)))):
            return cls.query.get(int(id))
        return None
775293
function ShiftJISEncoder(options) {
    var fatal = options.fatal;
    /**
     * @param {Stream} stream Input stream.
     * @param {number} code_point Next code point read from the stream.
     * @return {(number|!Array.<number>)} Byte(s) to emit.
     */
    this.handler = function(stream, code_point) {
      // 1. If code point is end-of-stream, return finished.
      if (code_point === end_of_stream)
        return finished;

      // 2. If code point is an ASCII code point or U+0080, return a
      // byte whose value is code point.
      if (isASCIICodePoint(code_point) || code_point === 0x0080)
        return code_point;

      // 3. If code point is U+00A5, return byte 0x5C.
      if (code_point === 0x00A5)
        return 0x5C;

      // 4. If code point is U+203E, return byte 0x7E.
      if (code_point === 0x203E)
        return 0x7E;

      // 5. If code point is in the range U+FF61 to U+FF9F, return a
      // byte whose value is code point − 0xFF61 + 0xA1.
      if (inRange(code_point, 0xFF61, 0xFF9F))
        return code_point - 0xFF61 + 0xA1;

      // 6. If code point is U+2212, set it to U+FF0D.
      if (code_point === 0x2212)
        code_point = 0xFF0D;

      // 7. Let pointer be the index shift_jis pointer for code point.
      var pointer = indexShiftJISPointerFor(code_point);

      // 8. If pointer is null, return error with code point.
      if (pointer === null)
        return encoderError(code_point);

      // 9. Let lead be floor(pointer / 188).
      var lead = floor(pointer / 188);

      // 10. Let lead offset be 0x81, if lead is less than 0x1F, and
      // 0xC1 otherwise.
      var lead_offset = (lead < 0x1F) ? 0x81 : 0xC1;

      // 11. Let trail be pointer % 188.
      var trail = pointer % 188;

      // 12. Let offset be 0x40, if trail is less than 0x3F, and 0x41
      // otherwise.
      var offset = (trail < 0x3F) ? 0x40 : 0x41;

      // 13. Return two bytes whose values are lead + lead offset and
      // trail + offset.
      return [lead + lead_offset, trail + offset];
    };
  }
79013
function f_id(_ihale_id, _tahta_id, _opts) {

        function f_ihale_detaylarini_bagla(_ihale, _optsIhale) {

            //ihale yoksa null dön
            if (!_ihale) {
                return null;
            }

            var olusan_ihale = schema.f_create_default_object(schema.SCHEMA.IHALE);
            olusan_ihale = _.extend(olusan_ihale, _ihale);

            return result.dbQ.Q.all([
                    _optsIhale.bYapanKurum ? f_yapan_kurum(_ihale.Id) : {Id: 0},
                    _optsIhale.bTakip ? result.dbQ.sismember(result.kp.tahta.ssetTakiptekiIhaleleri(_tahta_id), _ihale.Id) : 0,
                    opts.bArrKalemleri ? f_kalem_tumu(_ihale.Id, _tahta_id, _optsIhale.optKalem) : []])
                .then(function (_arrResults) {
                    olusan_ihale.Kurum = _arrResults[0];
                    olusan_ihale.Takip = _arrResults[1];
                    olusan_ihale.Kalemler = _arrResults[2];
                    return olusan_ihale;
                });

            /* arrPromises.push(_optsIhale.bYapanKurum
             ? f_yapan_kurum(_ihale.Id)
             : null);

             arrPromises.push(_optsIhale.bTakip
             ? result.dbQ.sismember(result.kp.tahta.ssetTakiptekiIhaleleri(_tahta_id), _ihale.Id)
             : 0);

             arrPromises.push(opts.bArrKalemleri
             ? f_kalem_tumu(_ihale.Id, _tahta_id, _optsIhale.optKalem)
             : []);

             return arrPromises.allX()
             .then(function (_arrResults) {
             console.log("_arrResults")
             console.log(JSON.stringify(_arrResults))

             olusan_ihale.Kurum = _arrResults[0];
             //olusan_ihale.Kurum_Id = olusan_ihale.Kurum.Id;
             olusan_ihale.Takip = _arrResults[1];
             olusan_ihale.Kalemler = _arrResults[2];
             return olusan_ihale;
             });*/
        }

        var opts = result.OptionsIhale(_opts);

        return (Array.isArray(_ihale_id)
            ? result.dbQ.hmget_json_parse(result.kp.ihale.tablo, _ihale_id)
            : result.dbQ.hget_json_parse(result.kp.ihale.tablo, _ihale_id))
            .then(function (_dbIhale) {
                if (_dbIhale == null) {
                    return null;
                } else {

                    // Ihale dizimizin kurumlarını çekerek herbirine bağlayalım
                    if (Array.isArray(_dbIhale)) {
                        opts.bYapanKurum = false;

                        return _dbIhale
                            .mapX(null, f_ihale_detaylarini_bagla, opts)
                            .allX()
                            .then(function (dbIhaleBilgilerle) {
                                return f_yapan_kurum(_ihale_id)
                                    .then(function (dbYapanKurumlar) {

                                        dbIhaleBilgilerle.forEach(function (_elm, _idx, _arr) {
                                            if (_elm) {
                                                _arr[_idx].Kurum = dbYapanKurumlar[_idx];
                                            }
                                        });

                                        return dbIhaleBilgilerle;
                                    });
                            });

                    } else {
                        return f_ihale_detaylarini_bagla(_dbIhale, opts)
                    }
                }
            });
    }
1371116
int getColumnByXWithShift(int x, int shiftEveryStep) {
        checkForInit();
        int sum = 0;
        // header offset
        int tempX = x - mHeaderRowWidth;
        if (tempX <= sum) {
            return 0;
        }
        for (int count = mColumnWidths.length, i = 0; i < count; i++) {
            int nextSum = sum + mColumnWidths[i] + shiftEveryStep;
            if (tempX > sum && tempX < nextSum) {
                return i;
            } else if (tempX < nextSum) {
                return i - 1;
            }
            sum = nextSum;
        }
        return mColumnWidths.length - 1;
    }
1075884
protected void shiftDown(int shift) {

        int max = getMaximumVerticalScrollPosition();
        if ((m_currentValue + shift) < max) {
            setVerticalScrollPosition(m_currentValue + shift);
        } else {
            setVerticalScrollPosition(max);
        }
    }
32356
def version(self, id, expand=None):
        
        version = Version(self._options, self._session)
        params = {}
        if expand is not None:
            params['expand'] = expand
        version.find(id, params=params)
        return version
782460
public static int positiveRightShift(int key, int shift) {
        int single = 0x3FF >> shift;
        int shiftMask = (single << 22) | (single << 11) | single;
        return shiftMask & (key >> shift);
    }
1284024
def get_job(id_or_uri, opts = {})
      data, _status_code, _headers = get_job_with_http_info(id_or_uri, opts)
      return data
    end
1026818
public UpdateCenterJob getJob(int id) {
        synchronized (jobs) {
            for (UpdateCenterJob job : jobs) {
                if (job.id==id)
                    return job;
            }
        }
        return null;
    }
359887
def _only_shifts(self, modifiers):
        """"""
        if not modifiers or len(modifiers) > 2:
            return False
        if len(modifiers) == 2:
            return 'left shift' in modifiers and 'right shift' in modifiers
        if len(modifiers) == 1:
            return 'left shift' in modifiers or 'right shift' in modifiers
157714
function ShiftJISDecoder(options) {
    var fatal = options.fatal;
    // shift_jis's decoder has an associated shift_jis lead (initially
    // 0x00).
    var /** @type {number} */ shiftjis_lead = 0x00;
    /**
     * @param {Stream} stream The stream of bytes being decoded.
     * @param {number} bite The next byte read from the stream.
     * @return {?(number|!Array.<number>)} The next code point(s)
     *     decoded, or null if not enough data exists in the input
     *     stream to decode a complete code point.
     */
    this.handler = function(stream, bite) {
      // 1. If byte is end-of-stream and shift_jis lead is not 0x00,
      // set shift_jis lead to 0x00 and return error.
      if (bite === end_of_stream && shiftjis_lead !== 0x00) {
        shiftjis_lead = 0x00;
        return decoderError(fatal);
      }

      // 2. If byte is end-of-stream and shift_jis lead is 0x00,
      // return finished.
      if (bite === end_of_stream && shiftjis_lead === 0x00)
        return finished;

      // 3. If shift_jis lead is not 0x00, let lead be shift_jis lead,
      // let pointer be null, set shift_jis lead to 0x00, and then run
      // these substeps:
      if (shiftjis_lead !== 0x00) {
        var lead = shiftjis_lead;
        var pointer = null;
        shiftjis_lead = 0x00;

        // 1. Let offset be 0x40, if byte is less than 0x7F, and 0x41
        // otherwise.
        var offset = (bite < 0x7F) ? 0x40 : 0x41;

        // 2. Let lead offset be 0x81, if lead is less than 0xA0, and
        // 0xC1 otherwise.
        var lead_offset = (lead < 0xA0) ? 0x81 : 0xC1;

        // 3. If byte is in the range 0x40 to 0x7E or 0x80 to 0xFC,
        // set pointer to (lead − lead offset) × 188 + byte − offset.
        if (inRange(bite, 0x40, 0x7E) || inRange(bite, 0x80, 0xFC))
          pointer = (lead - lead_offset) * 188 + bite - offset;

        // 4. Let code point be null, if pointer is null, and the
        // index code point for pointer in index jis0208 otherwise.
        var code_point = (pointer === null) ? null :
              indexCodePointFor(pointer, index('jis0208'));

        // 5. If code point is null and pointer is in the range 8836
        // to 10528, return a code point whose value is 0xE000 +
        // pointer − 8836.
        if (code_point === null && pointer !== null &&
            inRange(pointer, 8836, 10528))
          return 0xE000 + pointer - 8836;

        // 6. If code point is null and byte is an ASCII byte, prepend
        // byte to stream.
        if (code_point === null && isASCIIByte(bite))
          stream.prepend(bite);

        // 7. If code point is null, return error.
        if (code_point === null)
          return decoderError(fatal);

        // 8. Return a code point whose value is code point.
        return code_point;
      }

      // 4. If byte is an ASCII byte or 0x80, return a code point
      // whose value is byte.
      if (isASCIIByte(bite) || bite === 0x80)
        return bite;

      // 5. If byte is in the range 0xA1 to 0xDF, return a code point
      // whose value is 0xFF61 + byte − 0xA1.
      if (inRange(bite, 0xA1, 0xDF))
        return 0xFF61 + bite - 0xA1;

      // 6. If byte is in the range 0x81 to 0x9F or 0xE0 to 0xFC, set
      // shift_jis lead to byte and return continue.
      if (inRange(bite, 0x81, 0x9F) || inRange(bite, 0xE0, 0xFC)) {
        shiftjis_lead = bite;
        return null;
      }

      // 7. Return error.
      return decoderError(fatal);
    };
  }
460166
@SuppressWarnings("unchecked")
  protected <T> T get(DBIDRef id, int index) {
    return (T) data[idmap.mapDBIDToOffset(id)][index];
  }