Selects the first season of this show that is on the Plex Server
 Does not select season 0

 @return [Season] season with the lowest index (but not 0)
179289
def first_season
      seasons.inject { |a, b| a.index.to_i < b.index.to_i && a.index.to_i > 0 ? a : b }
    end
911226
def version
      SelectVersionsQuery.new.fetch_first || Version.new('0')
    rescue Cassandra::Errors::InvalidError
      raise uninitialized_error
    end
409124
def first_set
      first = steps[0]

      if first.is_a?(Rule)
        return first.first_set
      elsif first
        return [first]
      else
        return []
      end
    end
439702
def _find_initial_index(self):
        
        index = 0
        for season in self._season:
            if season == 'Career':
                self._index = index
                break
            index += 1
159775
def select_first_field
      # this results in on_leave of last field being executed when form starts.
      #@active_index = -1 # FIXME HACK
      #select_next_field
      ix =  @focusables.first
      return unless ix # no focussable field

      # if the user is on a field other than current then fire on_leave
      if @active_index.nil? || @active_index < 0
      elsif @active_index != ix
        f = @widgets[@active_index]
        begin
          #$log.debug " select first field, calling on_leave of #{f} #{@active_index} "
          on_leave f
        rescue => err
         $log.error " Caught EXCEPTION select_first_field on_leave #{err}"
         Ncurses.beep
         #$error_message = "#{err}"
         $error_message.value = "#{err}"
         return
        end
      end
      select_field ix
    end
51001
def first(self):
        

        if not self._stream:
            raise InvalidUsage('first() is only available when stream=True')

        try:
            content = next(self.all())
        except StopIteration:
            raise NoResults("No records found")

        return content
281468
def command_select
      command = command_search( @commands, ARGV[0] )
      if command != nil then
        # remove command name from ARGV and search next.
        ARGV.delete_at( 0 )
        ARGV.each do |arg|
	  cmd = command_search( command.subcmd, arg )
	  break if cmd == nil
	  ARGV.delete_at( 0 )
	  command = cmd
        end
      end
      return command
    end
983088
def episode(number)
      episodes.detect { |epi| epi.index.to_i == number.to_i }
    end
862558
def first_region(subj)
      res = '-'
      unless subj.regions.count.zero?
        res = subj.regions.first.title
      end
      res.html_safe
    end
51149
def select(actor, targets)
    targets.find_all {|target| actor.size >= target.size}
  end
699109
def select(&block)
      return self.to_enum(:select) unless block_given?
      rows = []
      i = 0
      self.each_row do |row|
        if row.instance_eval(&block)
          rows.push(row)
        end
      end
      Mikon::DataFrame.new(rows)
    end
101217
function first() {
    var i,
        args = new Array(arguments.length);
    for (i = 0; i < args.length; i++) {
      args[i] = arguments[i];
    }
    this.select.apply(this, args);
    this._method = 'first';
    this.limit(1);
    return this;
  }
217408
public function getAccountStates(
        $tvshow_id,
        $season_number,
        $episode_number
    ) {
        return $this->get(
            sprintf(
                'tv/%s/season/%s/episode/%s/account_states',
                $tvshow_id,
                $season_number,
                $episode_number
            )
        );
    }
771418
def select_left_item
      return :UNHANDLED if @items.nil? or @items.empty? or @active_index.nil?
      index = nil
      crow = @items[@active_index].row 
      ccol = @items[@active_index].col 
      @items.each_with_index { |e, i| index = i if e.row == crow && e.col < ccol }
      if index
        select_item index
      else
        return :UNHANDLED
      end
    end
665460
public T getFirst() {
        Optional<Rsp<T>> retval=values().stream().filter(rsp -> rsp.getValue() != null).findFirst();
        return retval.isPresent()? retval.get().getValue() : null;
    }
482269
def first(self, **kwargs):
        
        result = result = self._get(limit=1, **kwargs)
        if result:
            return result[0]
        else:
            raise self.source_class.DoesNotExist(repr(kwargs))
604395
def first_active(self):
        
        result = None
        for actor in self.actors:
            if not actor.skip:
                result = actor
                break
        return result