Returns ``True`` if the post is the last post of the topic.
505978
def is_topic_tail(self):
        
        return self.topic.last_post.id == self.id if self.topic.last_post else False
1325968
function get_topic($all_posts = false)
	{
		if(!$this->_topic)
		{
			if($this->post_id)
			{
				//existing post, load existing topic
				$this->_topic = topic::get($this->topic_id, $all_posts);

				//insert $this into topic->posts array
				if($all_posts)
				{
					//this post was also loaded from database, replace it with $this
					for($i=0; $i<sizeof($this->_topic->posts); $i++)
					{
						if($this->_topic->posts[$i]->post_id == $this->post_id)
						{
							//found it
							$this->_topic->posts[$i] = &$this;
							break;
						}
					}
				}
				else
				{
					//no posts were loaded in topic::get(), add our post to topic->posts
					$this->_topic->posts[] = &$this;
				}
			}
			else
			{
				//new post, generate topic
				$this->_topic = topic::from_post($this);
			}
		}
		return $this->_topic;
	}
244102
public function last()
    {
        return !empty($this->documents) ? $this->documents[count($this->documents) - 1] : false;
    }
636083
function last() {
		return $this->skip(($ofs=count($this->query)-$this->ptr)?$ofs-1:0);
	}
324631
def lastmod(self, category):
        """"""
        lastitems = EntryModel.objects.published().order_by('-modification_date').filter(categories=category).only('modification_date')
        return lastitems[0].modification_date
85355
def status(self, *args, priority=0):
        ''
        k = (priority, args)
        self.statuses[k] = self.statuses.get(k, 0) + 1

        if self.statusHistory:
            prevpri, prevargs, prevn = self.statusHistory[-1]
            if prevpri == priority and prevargs == args:
                self.statusHistory[-1][2] += 1
                return True

        self.statusHistory.append([priority, args, 1])
        return True
765782
def tombstone_topic(self, topic, node):
        """"""
        nsq.assert_valid_topic_name(topic)
        return self._request('POST', '/topic/tombstone',
                             fields={'topic': topic, 'node': node})
1048935
def is_published(self):
        """"""
        return self.status == Status.published and self.timestamp <= arrow.now()
1348718
public long lastIndex() {
    assertSegmentOpen();
    return !isEmpty() ? offsetIndex.lastOffset() + descriptor.index() + skip : descriptor.index() - 1;
  }
912982
private boolean linkLast(Node<E> node) {
        // assert lock.isHeldByCurrentThread();
        if (count >= capacity)
            return false;
        Node<E> l = last;
        node.prev = l;
        last = node;
        if (first == null)
            first = node;
        else
            l.next = node;
        ++count;
        notEmpty.signal();
        return true;
    }
240181
def last_librarian?
      if has_role?('Librarian')
        role = Role.where(name: 'Librarian').first
        return true if role.users.count == 1
        false
      end
    end
849673
def indicate_last(items):
    
    last_index = len(items) - 1
    for (i, item) in enumerate(items):
        yield (i == last_index, item)
1192260
function isQuery(topic) {
  var queryPrefix = 'query/';
  if (topic.slice(0, queryPrefix.length) === queryPrefix) {
    return true;
  }

  var queryPrefix = 'query:';
  if (topic.slice(0, queryPrefix.length) === queryPrefix) {
    return true;
  }

  return false;
}
276690
def is_done(self):
        """"""
        return self.position.is_game_over() or self.position.n >= FLAGS.max_game_length
1127204
public function isSubmitted()
    {
        $postParams = $this->request->getParsedBody();
        if(count($postParams)> 0)
        {
  
            $this->setFieldValues($postParams);  
        }
        return (count($postParams)> 0);
    }
1167237
public function is_timed_discussion() : bool {
        global $CFG;

        return !empty($CFG->forum_enabletimedposts) &&
              ($this->get_time_start() || $this->get_time_end());
    }
815679
def update_trackers(self):
        
        direct_approved_topics = self.topics.filter(approved=True).order_by('-last_post_on')

        # Compute the direct topics count and the direct posts count.
        self.direct_topics_count = direct_approved_topics.count()
        self.direct_posts_count = direct_approved_topics.aggregate(
            total_posts_count=Sum('posts_count'))['total_posts_count'] or 0

        # Forces the forum's 'last_post' ID and 'last_post_on' date to the corresponding values
        # associated with the topic with the latest post.
        if direct_approved_topics.exists():
            self.last_post_id = direct_approved_topics[0].last_post_id
            self.last_post_on = direct_approved_topics[0].last_post_on
        else:
            self.last_post_id = None
            self.last_post_on = None

        # Any save of a forum triggered from the update_tracker process will not result in checking
        # for a change of the forum's parent.
        self._simple_save()