ID of next movie
187089
function(thingy) {
		// simple DOM lookup utility function
		if (typeof(thingy) == 'string') {
			thingy = document.getElementById(thingy);
		}
		if (!thingy.addClass) {
			// extend element with a few useful methods
			thingy.hide = function() { this.style.display = 'none'; };
			thingy.show = function() { this.style.display = ''; };
			thingy.addClass = function(name) { this.removeClass(name); this.className += ' ' + name; };
			thingy.removeClass = function(name) {
				this.className = this.className.replace( new RegExp("\\s*" + name + "\\s*"), " ").replace(/^\s+/, '').replace(/\s+$/, '');
			};
			thingy.hasClass = function(name) {
				return !!this.className.match( new RegExp("\\s*" + name + "\\s*") );
			};
		}
		return thingy;
	}
1116507
def next(self):
        
        # Get next particle details
        x, y = self._move(self)
        colour = self._next_colour(self)
        char = self._next_char(self)
        self._last = char, x, y, colour[0], colour[1], colour[2]
        self.time += 1

        # Trigger any configured events
        if self.time == 1 and self._on_create is not None:
            self._on_create(self)
        elif self.life_time == self.time and self._on_destroy is not None:
            self._on_destroy(self)
        elif self._on_each is not None:
            self._on_each(self)

        return self._last
1083785
private void getNextEventIndex() {
        for (int i = next + 1; i < events.size(); i++) {
            String evName = getValueOr(events.get(i), "event", "");
            if (evName.equals(eventType)) {
                next = i;
                return;
            }
        }
        next = events.size();
    }
174980
public function nextId()
    {
        $timestamp = time() - static::BASE_TIME;

        if ($this->lastTimestamp >= $timestamp) {
            $timestamp = $this->lastTimestamp;

            $sequence = ++ $this->sequence;

            if ($sequence > 0x7ff) {
                $this->lastTimestamp = ++ $timestamp;

                $sequence = $this->sequence = 0;
            }
        } else {
            $this->lastTimestamp = $timestamp;

            $sequence = $this->sequence = 0;
        }

        return ($timestamp << 32) | $this->mask | ($sequence & 0x7ff);
    }
429261
public RTMovie getDetailedInfo(int movieId) throws RottenTomatoesException {
        properties.clear();
        properties.put(ApiBuilder.PROPERTY_ID, String.valueOf(movieId));
        properties.put(ApiBuilder.PROPERTY_URL, URL_MOVIES_INFO);

        return response.getResponse(RTMovie.class, properties);
    }
1025755
def next_idx(self):
        
        idx_vals = [s.idx.val for s in self.sers]
        if not idx_vals:
            return 0
        return max(idx_vals)+1
1165000
def _get_next_nn_id(self):
        """"""
        self._nn_id = self._nn_id + 1 if self._nn_id < 126 else 1
        return self._nn_id * 2
329257
def iter_next(self):
        """"""
        self.cursor += self.batch_size
        return self.cursor < self.num_data
194402
def find_next_video_in_playlist(self, playlist_id, cur_video_id):
        
        url = 'https://openapi.youku.com/v2/playlists/video/next.json'
        params = {
            'client_id': self.client_id,
            'playlist_id': playlist_id,
            'video_id': cur_video_id
        }
        r = requests.get(url, params=params)
        check_error(r)
        return r.json()
1086302
def get_film(film_id):
    '''  '''
    result = _get(film_id, settings.FILMS)
    return Film(result.content)
941727
public List<RTMovie> getMoviesSimilar(int movieId, int limit) throws RottenTomatoesException {
        properties.clear();
        properties.put(ApiBuilder.PROPERTY_ID, String.valueOf(movieId));
        properties.put(ApiBuilder.PROPERTY_URL, URL_MOVIES_SIMILAR);
        properties.put(ApiBuilder.PROPERTY_LIMIT, ApiBuilder.validateLimit(limit));

        WrapperLists wrapper = response.getResponse(WrapperLists.class, properties);
        if (wrapper != null && wrapper.getMovies() != null) {
            return wrapper.getMovies();
        } else {
            return Collections.emptyList();
        }
    }
1053160
def filmography
      #@return [Hash]
      #     writer: [Movie]
      #     actor: [Movie]
      #     director: [Movie]
      #     composer: [Movie]
      #as_writer = main_document.at("#filmo-head-Writer").next_element.search('b a').map { |e| e.get_attribute('href')[/tt(\d+)/, 1] } rescue []
      #as_actor = main_document.at("#filmo-head-Actor").next_element.search('b a').map { |e| e.get_attribute('href')[/tt(\d+)/, 1] } rescue []
      #as_director = main_document.at("#filmo-head-Director").next_element.search('b a').map { |e| e.get_attribute('href')[/tt(\d+)/, 1] } rescue []
      #as_composer = main_document.at("#filmo-head-Composer").next_element.search('b a').map { |e| e.get_attribute('href')[/tt(\d+)/, 1] } rescue []
      #{ writer: as_writer.map { |m| Movie.new(m) }, actor: as_actor.map { |m| Movie.new(m) }, director: as_director.map { |m| Movie.new(m) }, composer: as_composer.map { |m| Movie.new(m) } }
      films=main_document.css(".filmo-row b a").map { |e| e.get_attribute('href')[/tt(\d+)/, 1] } rescue []
      films.map { |f| Movie.new(f.to_i) }
    end
38136
def next_frame_id(self):
        
        # Python 2/3 compatible way of converting 1 to "\x01" in py2 or b"\x01"
        # in py3.
        fid = bytes(bytearray((self._frame_id,)))
        self._frame_id += 1
        if self._frame_id > 0xFF:
            self._frame_id = 1
        try:
            del self._rx_frames[fid]
        except KeyError:
            pass
        return fid
1142827
def ls():
    """"""
    if not os.path.exists(ARGS.database):
        exit('Error: The database does not exist; you must create it first.')
    with sqlite3.connect(ARGS.database) as connection:
        connection.text_factory = str
        cursor = connection.cursor()
        if ARGS.pattern:
            if not ARGS.strict:
                ARGS.pattern = '%{0}%'.format(ARGS.pattern)
            cursor.execute('SELECT * FROM Movies WHERE Name LIKE (?)',
                           [ARGS.pattern])
        else:
            cursor.execute('SELECT * FROM Movies')
        movies = sorted([row for row in cursor])
    if ARGS.name:
        print '\n'.join([movie[0] for movie in movies])
    elif ARGS.location:
        print '\n'.join([movie[1] for movie in movies])
    elif ARGS.size:
        print '\n'.join([prefix_size(int(movie[2])) for movie in movies])
    elif ARGS.files:
        for movie in movies:
            print ', '.join(movie[3].split('##'))
    else:
        for i, movie in enumerate(movies):
            print 'Name:\t\t{0}'.format(movie[0])
            print 'Location:\t{0}'.format(movie[1])
            print 'Size:\t\t{0}'.format(prefix_size(int(movie[2])))
            print 'Files:\t\t{0}'.format(', '.join(movie[3].split('##')))
            if not i == len(movies) - 1:
                print
66796
def search_by_id(movie_id)
      movie = @badfruit.get_movie_info(movie_id, "main")
      raise 'Movie not found' if movie.nil? || movie.empty?
      @badfruit.parse_movie_array(JSON.parse(movie))
    end
1103864
def next(self):
        
        curr_page = self.currentPage()
        if not curr_page:
            return
        elif not curr_page.validatePage():
            return

        pageId = curr_page.nextId()
        try:
            next_page = self._pages[pageId]
        except KeyError:
            return

        self._currentId = pageId
        self._navigation.append(pageId)

        y = curr_page.y()
        next_page.move(self.width(), y)

        # animate the last page in
        anim_in = QtCore.QPropertyAnimation(self)
        anim_in.setTargetObject(curr_page)
        anim_in.setPropertyName('pos')
        anim_in.setStartValue(curr_page.pos())
        anim_in.setEndValue(QtCore.QPoint(-curr_page.width(), y))
        anim_in.setDuration(self.animationSpeed())
        anim_in.setEasingCurve(QtCore.QEasingCurve.Linear)

        # animate the current page out
        anim_out = QtCore.QPropertyAnimation(self)
        anim_out.setTargetObject(next_page)
        anim_out.setPropertyName('pos')
        anim_out.setStartValue(next_page.pos())
        anim_out.setEndValue(curr_page.pos())
        anim_out.setDuration(self.animationSpeed())
        anim_out.setEasingCurve(QtCore.QEasingCurve.Linear)

        # create the anim group
        anim_grp = QtCore.QParallelAnimationGroup(self)
        anim_grp.addAnimation(anim_in)
        anim_grp.addAnimation(anim_out)
        anim_grp.finished.connect(curr_page.hide)
        anim_grp.finished.connect(anim_grp.deleteLater)

        next_page.show()

        # update the button states
        self._buttons[self.WizardButton.BackButton].setVisible(True)
        self._buttons[self.WizardButton.NextButton].setVisible(self.canGoForward())
        self._buttons[self.WizardButton.RetryButton].setVisible(self.canRetry())
        self._buttons[self.WizardButton.CommitButton].setVisible(next_page.isCommitPage())
        self._buttons[self.WizardButton.FinishButton].setVisible(next_page.isFinalPage())
        self.adjustSize()

        # initialize the new page
        self.currentIdChanged.emit(pageId)
        next_page.initializePage()
        anim_grp.start()
1366471
def _search(self, mdb, query, filename, year=None, auto=False):
        
        choices = []
        for datasource, movie in mdb.search(query, year=year):
            if auto:
                return datasource, movie
            if movie.get('directors'):
                directors = ' by '
                if len(movie['directors']) > 1:
                    directors += '%s and %s' % (', '.join(movie['directors'][0:-1]),
                                                          movie['directors'][-1])
                else:
                    directors += movie['directors'][0]
            else:
                directors = ''
            fmt = u'<b>{title}</b> ({year}){directors} [{datasource}]'
            choices.append(option((datasource, movie), fmt, title=movie['title'],
                                                            year=movie.get('year', 'Unknown'),
                                                            directors=directors,
                                                            datasource=datasource.name))

        if not choices:
            printer.p('No results to display for the file: {fn}', fn=filename)
            return None, None

        choices.append(option(('manual', None), 'Enter information manually'))
        choices.append(option(('abort', None), 'None of these'))
        printer.p('Please choose the relevant movie for the file: {fn}', fn=filename, end='\n\n')
        return printer.choice(choices)