Get event manager from media descriptor object.
    NOTE: this function doesn't increment reference counting.
    @param p_md: a media descriptor object.
    @return: event manager object.
19825
def libvlc_media_event_manager(p_md):
    '''
    '''
    f = _Cfunctions.get('libvlc_media_event_manager', None) or \
        _Cfunction('libvlc_media_event_manager', ((1,),), class_result(EventManager),
                    ctypes.c_void_p, Media)
    return f(p_md)
1011575
def get_media_descriptions_metadata(self):
        
        metadata = dict(self._media_descriptions_metadata)
        metadata.update({'existing_string_values': [t['text'] for t in self.my_osid_object_form._my_map['mediaDescriptions']]})
        return Metadata(**metadata)
6629
public MidiEvent[] getMidiEventsFor(MultiNote notes, KeySignature key, long elapsedTime) throws InvalidMidiDataException
  {
    Vector notesVector = notes.getNotesAsVector();
    MidiEvent[] events = new MidiEvent[2*notesVector.size()+1];
    for (int j=0; j<notesVector.size(); j++)
    {
      Note note = (Note)(notesVector.elementAt(j));
      float noteLength = getNoteLengthInTicks(note);//, defaultLength);
      if (!note.isRest())
      {
        ShortMessage myNoteOn = new ShortMessage();
        myNoteOn.setMessage(ShortMessage.NOTE_ON, getMidiNoteNumber(note, key), 50);
        events[j] = new MidiEvent(myNoteOn,elapsedTime);
      }
    }

    events[notesVector.size()] = new MidiEvent(new NotationMarkerMessage((MultiNote)notes), elapsedTime);

    for (int j=0; j<notesVector.size(); j++)
    {
      Note note = (Note)(notesVector.elementAt(j));
      long noteLength = getNoteLengthInTicks(note);//, defaultLength);
      if (!note.isRest())
      {
        ShortMessage myNoteOff = new ShortMessage();
        myNoteOff.setMessage(ShortMessage.NOTE_OFF , getMidiNoteNumber(note, key), 50);
        events[notesVector.size()+j+1] = new MidiEvent(myNoteOff,elapsedTime+noteLength);
      }
    }
    return events;
  }
868621
private static Media getMediaDpi(Media media)
    {
        Check.notNull(media);

        final DpiType current = dpi;
        if (current == null || current == DpiType.MDPI)
        {
            return media;
        }
        return getClosestDpi(current, media);
    }
637818
public ParameterDescription[] createParameterDescriptions(
                                                     MethodDescriptor md) {
        if (md == null) {
            return null;
        }

        Method method = md.getMethod();
        Class<?>[] paramClasses = method.getParameterTypes();        
        int descriptionCount = paramClasses.length;
        if (acceptsSubstitution(md)) {
            descriptionCount--;
        }

        ParameterDescriptor[] pds = md.getParameterDescriptors();
        ParameterDescription[] descriptions = 
            new ParameterDescription[descriptionCount];

        for (int i = 0; i < descriptions.length; i++) {
                        
            TypeDescription type = createTypeDescription(paramClasses[i]);
            ParameterDescriptor pd = null;
            if (pds != null && i < pds.length) {
                pd = pds[i];
            }            

            descriptions[i] = new ParameterDescription(type, pd, this);
        }
        
        return descriptions;
    }
133430
function watchMedia() {
      for (var mediaName in $mdConstant.MEDIA) {
        $mdMedia(mediaName); // initialize
        $mdMedia.getQuery($mdConstant.MEDIA[mediaName])
            .addListener(invalidateLayout);
      }
      return $mdMedia.watchResponsiveAttributes(
          ['md-cols', 'md-row-height', 'md-gutter'], attrs, layoutIfMediaMatch);
    }
44575
def libvlc_media_get_mrl(p_md):
    '''
    '''
    f = _Cfunctions.get('libvlc_media_get_mrl', None) or \
        _Cfunction('libvlc_media_get_mrl', ((1,),), string_result,
                    ctypes.c_void_p, Media)
    return f(p_md)
988152
def libvlc_media_player_get_chapter_count_for_title(p_mi, i_title):
    '''
    '''
    f = _Cfunctions.get('libvlc_media_player_get_chapter_count_for_title', None) or \
        _Cfunction('libvlc_media_player_get_chapter_count_for_title', ((1,), (1,),), None,
                    ctypes.c_int, MediaPlayer, ctypes.c_int)
    return f(p_mi, i_title)
310232
def libvlc_media_player_set_media(p_mi, p_md):
    '''
    '''
    f = _Cfunctions.get('libvlc_media_player_set_media', None) or \
        _Cfunction('libvlc_media_player_set_media', ((1,), (1,),), None,
                    None, MediaPlayer, Media)
    return f(p_mi, p_md)
1077303
def libvlc_media_set_meta(p_md, e_meta, psz_value):
    '''
    '''
    f = _Cfunctions.get('libvlc_media_set_meta', None) or \
        _Cfunction('libvlc_media_set_meta', ((1,), (1,), (1,),), None,
                    None, Media, Meta, ctypes.c_char_p)
    return f(p_md, e_meta, psz_value)
741844
def libvlc_video_get_marquee_string(p_mi, option):
    '''
    '''
    f = _Cfunctions.get('libvlc_video_get_marquee_string', None) or \
        _Cfunction('libvlc_video_get_marquee_string', ((1,), (1,),), string_result,
                    ctypes.c_void_p, MediaPlayer, ctypes.c_uint)
    return f(p_mi, option)
438734
public static String getCMDKey(final MetaData columnMD, final String line) {
        if (!columnMD.isAnyRecordFormatSpecified()) {
            // no <RECORD> elements were specified for this parse, just return the
            // detail id
            return FPConstants.DETAIL_ID;
        }
        final Iterator<Entry<String, XMLRecordElement>> mapEntries = columnMD.xmlRecordIterator();
        // loop through the XMLRecordElement objects and see if we need a
        // different MD object
        while (mapEntries.hasNext()) {
            final Entry<String, XMLRecordElement> entry = mapEntries.next();
            final XMLRecordElement recordXMLElement = entry.getValue();

            if (recordXMLElement.getEndPositition() > line.length()) {
                // make sure our substring is not going to fail
                continue;
            }
            final int subfrm = recordXMLElement.getStartPosition() - 1; // convert
            // to 0
            // based
            final int subto = recordXMLElement.getEndPositition();
            if (line.substring(subfrm, subto).equals(recordXMLElement.getIndicator())) {
                // we found the MD object we want to return
                return entry.getKey();
            }

        }

        // must be a detail line
        return FPConstants.DETAIL_ID;
    }
618699
def _mds_rpc_post(self, device_id, _wrap_with_consumer=True, async_id=None, **params):
        """"""
        self.ensure_notifications_thread()
        api = self._get_api(mds.DeviceRequestsApi)
        async_id = async_id or utils.new_async_id()
        device_request = mds.DeviceRequest(**params)
        api.create_async_request(
            device_id,
            async_id=async_id,
            body=device_request,
        )
        return AsyncConsumer(async_id, self._db) if _wrap_with_consumer else async_id
1256400
function MediaObject(){
  MediaObject.super_.call(this);


  var self = this;


  //
  // Define object properties
  //

  /**
   * Unique identifier of this object
   *
   * @public
   * @readonly
   * @member {external:Number} id
   */
  this.once('_id', function(error, id)
  {
    if(error)
      return Object.defineProperties(this,
      {
        '_createError': {value: error},
        'id': {value: null, enumerable: true}
      });

    Object.defineProperty(this, 'id',
    {
      configurable: true,
      enumerable: true,
      value: id
    });
  })

  //
  // Subscribe and unsubscribe events on the server when adding and removing
  // event listeners on this MediaObject
  //

  var subscriptions = {};

  this.on('removeListener', function(event, listener)
  {
    // Blacklisted events
    if(event[0] == '_'
    || event == 'release'
    || event == 'newListener')
      return;

    var count = EventEmitter.listenerCount(this, event);
    if(count) return;

    var token = subscriptions[event];

    var params =
    {
      object: this,
      subscription: token
    };

    this.emit('_rpc', undefined, 'unsubscribe', params, function(error)
    {
      if(error) return self.emit('error', error);

      delete subscriptions[event];
    });
  });

  this.on('newListener', function(event, listener)
  {
    // Blacklisted events
    if(event[0] == '_'
    || event == 'release')
      return;

    var constructor = this.constructor;

    if(constructor.events.indexOf(event) < 0)
      throw new SyntaxError(constructor.name+" doesn't accept events of type '"+event+"'")

    var count = EventEmitter.listenerCount(this, event);
    if(count) return;

    var params =
    {
      object: this,
      type: event
    };

    this.emit('_rpc', undefined, 'subscribe', params, function(error, token)
    {
      if(error) return self.emit('error', error);

      subscriptions[event] = token;
    });
  });
}
1042106
def get_pmg_structure(phonopy_structure):
    

    lattice = phonopy_structure.get_cell()
    frac_coords = phonopy_structure.get_scaled_positions()
    symbols = phonopy_structure.get_chemical_symbols()
    masses = phonopy_structure.get_masses()
    mms = phonopy_structure.get_magnetic_moments()
    mms = mms or [0] * len(symbols)

    return Structure(lattice, symbols, frac_coords,
                     site_properties={"phonopy_masses": masses,
                                      "magnetic_moments": mms})
527946
public MidiEvent[] getMidiEventsFor(Tempo tempo, long lastPosInTicks) throws InvalidMidiDataException
  {
    TempoMessage mt = new TempoMessage(tempo);
    MidiEvent me = new MidiEvent(mt,lastPosInTicks);
    MidiEvent[] events = null;//{me, new MidiEvent(new TempoMessageWA(), lastPosInTicks)};
    return events;
  }
816121
def libvlc_vlm_seek_media(p_instance, psz_name, f_percentage):
    '''
    '''
    f = _Cfunctions.get('libvlc_vlm_seek_media', None) or \
        _Cfunction('libvlc_vlm_seek_media', ((1,), (1,), (1,),), None,
                    ctypes.c_int, Instance, ctypes.c_char_p, ctypes.c_float)
    return f(p_instance, psz_name, f_percentage)