Mark room as read
769647
def subscriptions_read(self, rid, **kwargs):
        """"""
        return self.__call_api_post('subscriptions.read', rid=rid, kwargs=kwargs)
945316
def participants_in_room(self, message):
        """"""
        room = self.get_room_from_message(message)
        context = {"participants": room.participants, }
        self.say(rendered_template("participants.html", context), message=message, html=True)
292848
def rooms(status=None):
    """"""

    room_query = VCRoom.find(type='vidyo')
    table_data = [['ID', 'Name', 'Status', 'Vidyo ID', 'Extension']]

    if status:
        room_query = room_query.filter(VCRoom.status == VCRoomStatus.get(status))

    for room in room_query:
        table_data.append([unicode(room.id), room.name, room.status.name,
                           unicode(room.data['vidyo_id']), unicode(room.vidyo_extension.extension)])

    table = AsciiTable(table_data)
    for col in (0, 3, 4):
        table.justify_columns[col] = 'right'
    print table.table
474109
def list_rooms(self, message):
        """"""
        context = {"rooms": self.available_rooms.values(), }
        self.say(rendered_template("rooms.html", context), message=message, html=True)
725351
public function markAsRead()
    {
        $entries = $this->get();

        $count = 0;

        foreach ($entries as $entry) {
            if ($entry->markAsRead()) {
                ++$count;
            }
        }

        return $count;
    }
1061474
def addReader(self, selectable):
        """"""
        try:
            self._reads[selectable].resume()
        except KeyError:
            self._reads[selectable] = g = Stream.spawn(self, selectable, 'doRead')
            self.addToGreenletPool(g)
117244
void skipLine() {
        int ch;
        do {
            try {
                ch = reader.read();
            } catch( IOException ex ) {
                throw new LessException( ex );
            }
            incLineColumn( ch );
        } while( ch != '\n' && ch != -1 );
    }
1099948
def im_open(self, room_id, **kwargs):
        """"""
        return self.__call_api_post('im.open', roomId=room_id, kwargs=kwargs)
626414
def selected(self):
        """"""
        self.selected_text = self.currentText()
        self.valid.emit(True, True)
        self.open_dir.emit(self.selected_text)
611288
def add_reading(self, reading):
        """"""

        is_break = False
        utc = None

        if reading.stream in self._break_streams:
            is_break = True

        if reading.stream in self._anchor_streams:
            utc = self._anchor_streams[reading.stream](reading)

        self.add_point(reading.reading_id, reading.raw_time, utc, is_break=is_break)
864011
def mark(self, lineno, count=1):
        
        self.sourcelines[lineno] = self.sourcelines.get(lineno, 0) + count
731010
def _mark_as_read(self, thing_ids, unread=False):
        
        data = {'id': ','.join(thing_ids)}
        key = 'unread_message' if unread else 'read_message'
        response = self.request_json(self.config[key], data=data)
        self.evict([self.config[x] for x in ['inbox', 'messages',
                                             'mod_mail', 'unread']])
        return response
1057210
function readEntries (directoryReader, oldEntries, callback) {
  directoryReader.readEntries(
    (entries) => {
      const newEntries = [...oldEntries, ...entries]
      // According to the FileSystem API spec, readEntries() must be called until it calls the callback with an empty array.
      if (entries.length) {
        setTimeout(() => {
          readEntries(directoryReader, newEntries, callback)
        }, 0)
      // Done iterating this particular directory
      } else {
        callback(newEntries)
      }
    },
    // Make sure we resolve on error anyway
    () =>
      callback(oldEntries)
  )
}
547627
def acquire_read(self):
        
        self.monitor.acquire()
        while self.rwlock < 0 or self.writers_waiting:
            self.readers_ok.wait()
        self.rwlock += 1
        self.monitor.release()
219988
def leave_room(self, sid, namespace, room):
        """"""
        try:
            del self.rooms[namespace][room][sid]
            if len(self.rooms[namespace][room]) == 0:
                del self.rooms[namespace][room]
                if len(self.rooms[namespace]) == 0:
                    del self.rooms[namespace]
        except KeyError:
            pass
841585
def toDict(self):
        
        if six.PY3:
            result = super().toDict()
        else:
            result = AARead.toDict(self)

        result.update({
            'start': self.start,
            'stop': self.stop,
            'openLeft': self.openLeft,
            'openRight': self.openRight,
        })

        return result
132868
def write_str(self, s):
        """"""
        self.write(s)
        self.room -= len(s)