Mark notes

        :param noteids: The noteids to delete
        :param mark_as: Mark notes as (read/unread/starred/notstarred/spam)
421913
def mark_notes(self, noteids, mark_as):

        

        if self.standard_grant_type is not "authorization_code":
            raise DeviantartError("Authentication through Authorization Code (Grant Type) is required in order to connect to this endpoint.")

        response = self._req('/notes/mark', post_data={
            'noteids[]' : noteids,
            'mark_as' : mark_as
        })

        return response
155024
public static function delete_notes($notes = array()) {
        global $CFG;

        $params = self::validate_parameters(self::delete_notes_parameters(), array('notes' => $notes));

        // Check if note system is enabled.
        if (!$CFG->enablenotes) {
            throw new moodle_exception('notesdisabled', 'notes');
        }
        $warnings = array();
        foreach ($params['notes'] as $noteid) {
            $note = note_load($noteid);
            if (isset($note->id)) {
                // Ensure the current user is allowed to run this function.
                $context = context_course::instance($note->courseid);
                self::validate_context($context);
                require_capability('moodle/notes:manage', $context);
                note_delete($note);
            } else {
                $warnings[] = array('item'=>'note', 'itemid'=>$noteid, 'warningcode'=>'badid', 'message'=>'Note does not exist');
            }
        }
        return $warnings;
    }
1100861
def _FormatNotes(self, event):
    
    inode = event.inode
    if inode is None:
      inode = '-'

    notes = getattr(event, 'notes', '')
    if not notes:
      display_name = getattr(event, 'display_name', '')
      notes = 'File: {0:s} inode: {1!s}'.format(display_name, inode)
    return self._SanitizeField(notes)
1096408
def marks(value):
        
        for i, entry in enumerate(value):
            _assert_is_type('marks[{0}]'.format(i), entry, Mark)
980680
def _format_notes(self, record):
        
        notes = []
        for note in record["notes"]:
            if note.get("type"):
                n = {}
                n["type"] = note["type"]
                try:
                    if note["jsonmodel_type"] == "note_singlepart":
                        n["content"] = note["content"][0]
                    else:
                        n["content"] = note["subnotes"][0]["content"]
                except (IndexError, KeyError):
                    n["content"] = ""

                notes.append(n)

        return notes
1152503
function (notes, settings) {
  var restBuffer = 0;

  var events = _.reduce(notes, function (arr, obj) {
    var time = noteLength(obj.duration, settings);

    if (obj.note) {
      arr.push(makeNoteEvent(restBuffer, true, 0, noteValue(obj.note), settings.noteVelocity)); // On
      arr.push(makeNoteEvent(time, false, 0, noteValue(obj.note), settings.noteVelocity)); // Off
      restBuffer = 0;
    }
    else {
      restBuffer += time;
    }

    return arr;
  }, []);

  return Buffer.concat(events);
}
1063437
def _sync_notes(self, notes_json):
        """""""
        for note_json in notes_json:
            note_id = note_json['id']
            task_id = note_json['item_id']
            if task_id not in self.tasks:
                # ignore orphan notes
                continue
            task = self.tasks[task_id]
            self.notes[note_id] = Note(note_json, task)
485138
def mark_all(request):
    
    action = request.POST.get('action', None)
    success = True

    if action == 'read':
        request.user.notifications.read_all()
        msg = _("Marked all notifications as read")
    elif action == 'unread':
        request.user.notifications.unread_all()
        msg = _("Marked all notifications as unread")
    else:
        msg = _("Invalid mark action")
        success = False

    ctx = {'msg': msg, 'success': success, 'action': action}

    return notification_redirect(request, ctx)
486900
def is_valid_note(note):
    """"""
    if not _note_dict.has_key(note[0]):
        return False
    for post in note[1:]:
        if post != 'b' and post != '#':
            return False
    return True
357345
def stop_Note(self, note, channel=1):
        
        if hasattr(note, 'channel'):
            channel = note.channel
        self.stop_event(int(note) + 12, int(channel))
        self.notify_listeners(self.MSG_STOP_INT, {'channel': int(channel),
            'note': int(note) + 12})
        self.notify_listeners(self.MSG_STOP_NOTE, {'channel': int(channel),
            'note': note})
        return True
191722
def create_credit_notes(credit_notes)
      b = Builder::XmlMarkup.new
      request_xml = b.CreditNotes {
        credit_notes.each do | credit_note |
          credit_note.to_xml(b)
        end
      }

      response_xml = http_put(@client, "#{@xero_url}/CreditNotes", request_xml, {})

      response = parse_response(response_xml, {:request_xml => request_xml}, {:request_signature => 'PUT/credit_notes'})
      response.credit_notes.each_with_index do | response_credit_note, index |
        credit_notes[index].credit_note_id = response_credit_note.credit_note_id if response_credit_note && response_credit_note.credit_note_id
      end
      response
    end
1180719
def note_delete(self, note_id):
        
        return self._get('notes/{0}.json'.format(note_id), method='DELETE',
                         auth=True)
633226
def notes(self):
        """"""
        endpoint = '/'.join((self.endpoint, self.id, 'notes'))
        return self.noteFactory.find(
            endpoint=endpoint,
            api_key=self.api_key,
        )
346951
def markWatched(self):
        
        key = '/:/scrobble?key=%s&identifier=com.plexapp.plugins.library' % self.ratingKey
        self._server.query(key)
        self.reload()
725743
def whoarewe(self,
	             note=None,
	             loglevel=logging.DEBUG):
		
		shutit = self.shutit
		shutit.handle_note(note)
		res = self.send_and_get_output(' command id -n -g',
		                               echo=False,
		                               loglevel=loglevel).strip()
		shutit.handle_note_after(note=note)
		return res
643130
def _mark_in_progress(self, node_id):
        
        self.queued.remove(node_id)
        self.in_progress.add(node_id)
861217
public function getDeleteNote(int $character_id, int $note_id)
    {

        CharacterInfo::deleteNote($character_id, $note_id);

        return redirect()->back()
            ->with('success', 'Note deleted!');

    }