精华内容
下载资源
问答
  • Descriptor

    2016-08-24 17:48:49
    /// /// Descriptor information. /// public class Descriptor { /// /// Key. /// public K Key { get; set; } /// /// Name. ///
    /// <summary>
        /// Descriptor information.
        /// </summary>
        public class Descriptor<K> {
    
            /// <summary>
            /// Key.
            /// </summary>
            public K Key { get; set; }
    
            /// <summary>
            /// Name.
            /// </summary>
            public String Name { get; set; }
    
            /// <summary>
            /// Description
            /// </summary>
            public String Description { get; set; }
    
            /// <summary>
            /// Get descriptor caption.
            /// </summary>
            public String Caption {
                get {
                    if (String.IsNullOrEmpty(Description))
                        return Name;
    
                    return String.Format("{0} - {1}", Name, Description);
                }
            }
    
            /// <summary>
            /// To String
            /// </summary>
            /// <returns>Default string display on binding list</returns>
            public override string ToString() {
                return Caption;
            }
    
            /// <summary>
            /// Equals
            /// </summary>
            /// <param name="obj">Equals object</param>
            /// <returns>When object has same key return true else return false</returns>
            public override bool Equals(object obj) {
                if (obj is Descriptor<K>) {
                    return ((Descriptor<K>)obj).Key.Equals(Key);
                }
    
                return base.Equals(obj);
            }
    
            /// <summary>
            /// Get hashcode.
            /// </summary>
            /// <returns>Hashcode</returns>
            public override int GetHashCode() {
                return Key.GetHashCode();
            }
        }


            /// <summary>
            /// Get all resource descriptors.
            /// </summary>
            /// <returns>Resource descriptor list</returns>
            public static async Task<IList<Descriptor<Int32>>> GetAllDescriptors() {
                using (MesproContext db = GetContext()) {
                    return await db.Resources
                                   .OrderBy(m => m.Name)
                                   .Select(m => new Descriptor<Int32>() { Key = m.ID, Name = m.Name, Description = m.Description })
                                   .ToListAsync();
                }
            }


    展开全文
  • Descriptor position

    2020-12-09 03:11:06
    To my surprise, it seems that the number of descriptor doesn't match that of the keypoints. Therefore my question is : which descriptor vector goes with which keypoint location ? <p>For example, ...
  • <p>I want to automatically update resource descriptors, however, the descriptor of the whole package is not updated after I update the resource descriptor. <p>For example: <pre><code> p = Package...
  • Configuration Descriptor

    2019-08-16 10:59:29
    整個Configuration 分成4大部分 : configuration interface, class or vendor specific( 如 HID, ...以一个usb audio 的设备configuration descriptor来举例: typedef struct { configuration_descriptor cd; /...

    整個Configuration 分成4大部分 :

    1. configuration
    2. interface,
    3. class or vendor specific( 如 HID, Audio)
    4. endpoint
      在这里插入图片描述
      以一个usb audio 的设备configuration descriptor来举例:
      typedef struct
      {
      configuration_descriptor cd; // Configuration descriptor
      interface_descriptor id0; // Audio control interface
      audio_header_descriptor ahd; // Audio control header
      input_terminal_descriptor itd; // Audio input terminal
      feature_unit_descriptor fud; // Audio feature unit
      output_terminal_descriptor otd; // Audio output terminal
      interface_descriptor id1_0; // Audio zero-bandwidth interface
      interface_descriptor id1_1; // Audio streaming interface
      stream_interface_descriptor sid; // Audio stream descriptor
      typeI_format_descriptor tfd; // Audio format descriptor
      stream_endpoint_descriptor sed; // Streaming endpoint descriptor
      audio_endpoint_descriptor aed; // Audio endpoint descriptor
      interface_descriptor id2; // HID interface descriptor
      hid_descriptor hd; // HID descriptor
      endpoint_descriptor ed1; // GET_REPORT input endpoint
      endpoint_descriptor ed2; // SET_REPORT output endpoint
      } complete_configuration; // End of complete_configuration

    configuration_descriptor:
    { // Standard configuration descriptor
    0x09, // bLength (9)
    0x02, // bDescriptorType (CONFIGURATION)
    0x9100, // wTotallength (145)
    0x03, // bNumInterfaces (3)
    0x01, // bConfigurationValue (1)
    0x00, // iConfiguration (none)
    0x80, // bmAttributes (bus-powered)
    0x32, // bMaxPower (100 mA)
    },
    有3个interface,configuration No is 1, 没有字符串描述

    第一个interface 是  interface_descriptor id0;              // Audio control interface
    {                                   // Audio control interface
      0x09,                            // bLength (9)
      0x04,                            // bDescriptorType (INTERFACE)
      0x00,                            // bInterfaceNumber (0)
      0x00,                            // bAlternateSetting (none)
      0x00,                            // bNumEndpoints (none)
      0x01,                            // bInterfaceClass (AUDIO)
      0x01,                            // bInterfaceSubClass (AUDIO_CONTROL)
      0x00,                            // bInterfaceProtocol (none)
      0x00                             // iInterface (none)
    

    },
    interface 序号是0, endpoints 个数为0, AUDIO CLASS, AUDIO_CONTROL
    包含一个Header, Input_terminal further unit,OUTPUT_TERMINAL
    因为interface是audio 类,后边跟类描述符
    { // Audio class-specific interface header
    0x09, // bLength (9)
    0x24, // bDescriptorType (CS_INTERFACE)
    0x01, // bDescriptorSubtype (HEADER)
    0x0001, // bcdADC (1.0)
    0x2B00, // wTotalLength (43)
    0x01, // bInCollection (1 streaming interface)
    0x01 // baInterfaceNr (interface 1 is stream)
    },
    { // Audio class-specific input terminal
    0x0C, // bLength (12)
    0x24, // bDescriptorType (CS_INTERFACE)
    0x02, // bDescriptorSubtype (INPUT_TERMINAL)
    0x01, // bTerminalID (1)
    0x1007, // wTerminalType (radio receiver)
    0x00, // bAssocTerminal (none)
    0x02, // bNrChannels (2)
    0x0300, // wChannelConfig (left, right)
    0x00, // iChannelNames (none)
    0x00 // iTerminal (none)
    },
    { // Audio class-specific feature unit
    0x0D, // bLength (13)
    0x24, // bDescriptorType (CS_INTERFACE)
    0x06, // bDescriptorSubtype (FEATURE_UNIT)
    0x02, // bUnitID (2)
    0x01, // bSourceID (input terminal 1)
    0x02, // bControlSize (2 bytes)
    0x0100, // Master controls
    0x0000, // Channel 0 controls
    0x0000, // Channel 1 controls
    0x00 // iFeature (none)
    },
    { // Audio class-specific output terminal
    0x09, // bLength (9)
    0x24, // bDescriptorType (CS_INTERFACE)
    0x03, // bDescriptorSubtype (OUTPUT_TERMINAL)
    0x03, // bTerminalID (3)
    0x0101, // wTerminalType (USB streaming)
    0x00, // bAssocTerminal (none)
    0x02, // bSourceID (feature unit 2)
    0x00 // iTerminal (none)
    },

    第二个interface { // Audio zero-bandwidth interface
    0x09, // bLength (9)
    0x04, // bDescriptorType (INTERFACE)
    0x01, // bInterfaceNumber (1)
    0x00, // bAlternateSetting (0)
    0x00, // bNumEndpoints (0)
    0x01, // bInterfaceClass (AUDIO)
    0x02, // bInterfaceSubClass (AUDIO_STREAMING)
    0x00, // bInterfaceProtocol (none)
    0x00 // iInterface (none)
    },

    第三个interface
    { // Audio streaming interface (alternate)
    0x09, // bLength (9)
    0x04, // bDescriptorType (INTERFACE)
    0x01, // bInterfaceNumber (1)
    0x01, // bAlternateSetting (1)
    0x01, // bNumEndpoints (1)
    0x01, // bInterfaceClass (AUDIO)
    0x02, // bInterfaceSubClass (AUDIO_STREAMING)
    0x00, // bInterfaceProtocol (none)
    0x00 // iInterface (none)
    },
    { // Audio class-specific stream interface
    0x07, // bLength (7)
    0x24, // bDescriptorType (CS_INTERFACE)
    0x01, // bDescriptorSubtype (AS_GENERAL)
    0x03, // bTerminalLink (terminal 3)
    0x00, // bDelay (none)
    0x0100 // wFormatTag (PCM format)
    },
    { // Audio class-specific type I format
    0x0B, // bLength (11)
    0x24, // bDescriptorType (CS_INTERFACE)
    0x02, // bDescriptorSubtype (FORMAT_TYPE)
    0x01, // bFormatType (TYPE_I)
    0x02, // bNrChannels (2)
    0x02, // bSubFrameSize (2)
    // The next field should be 10, but 16 works with more standard software
    0x10, // bBitResolution (16)
    0x01, // bSamFreqType (1 sampling frequency)
    0x80, // 48,000 Hz (byte 0)
    0xBB, // 48,000 Hz (byte 1)
    0x00 // 48,000 Hz (byte 2)
    },
    { // Audio streaming isochronous endpoint
    0x09, // bLength (9)
    0x05, // bDescriptorType (ENDPOINT)
    0x83, // bEndpointAddress (EP3 in)
    0x05, // bmAttributes (asynchronous)
    0x0002, // wMaxPacketSize (512)
    0x01, // bInterval (1 millisecond)
    0x00, // bRefresh (0)
    0x00 // bSynchAddress (no synchronization)
    },
    { // Audio isochronous endpoint
    0x07, // bLength (7)
    0x25, // bDescriptorType (CS_ENDPOINT)
    0x01, // bDescriptorSubtype (EP_GENERAL)
    0x00, // bmAttributes (none)
    0x02, // bLockDelayUnits (PCM samples)
    0x0000 // wLockDelay (0)
    },

    HID interface 还有endpoints
    { // HID interface
    0x09, // bLength (9)
    0x04, // bDescriptorType (INTERFACE)
    0x02, // bInterfaceNumber (2)
    0x00, // bAlternateSetting (0)
    0x02, // bNumEndpoints (2)
    0x03, // bInterfaceClass (HID)
    0x00, // bInterfaceSubClass (none)
    0x00, // bInterfaceProtocol (none)
    0x00 // iInterface (none)
    },
    { // HID descriptor
    0x09, // bLength (9)
    0x21, // bDescriptorType (HID_DESCRIPTOR)
    0x1101, // bcdHID (1.11)
    0x00, // bCountryCode (none)
    0x01, // bNumDescriptors (1 class descriptor)
    0x22, // bClassDescriptorType (report descr.)
    LE(HID_REPORT_SIZE) // wDescriptorLength (203)
    },
    { // HID interrupt in endpoint
    0x07, // bLength (7)
    0x05, // bDescriptorType (ENDPOINT)
    0x81, // bEndpointAddress (EP1 in)
    0x03, // bmAttributes (interrupt)
    0x4000, // wMaxPacketSize (64)
    0x0A // bInterval (10 milliseconds)
    },
    { // HID interrupt out endpoint
    0x07, // bLength (7)
    0x05, // bDescriptorType (ENDPOINT)
    0x02, // bEndpointAddress (EP2 out)
    0x03, // bmAttributes (interrupt)
    0x4000, // wMaxPacketSize (64)
    0x01 // bInterval (1 millisecond)
    }

    HID report descriptor 一般独立于 configuration之外
    HidReportDesc
    {

    0x06, 0x00, 0xFF, // USAGE_PAGE (Vendor Defined Page 1)
    0x09, 0x01, // USAGE (Vendor Usage 1)
    0xA1, 0x01, // COLLECTION (Application)
    0xC0 // END_COLLECTION

    };

    展开全文
  • @descriptor

    2018-10-08 14:02:01
    const log = (target, name, descriptor) =&gt; { //ES6实现AOP const _handler = descriptor.value; descriptor.value = function(){ console.log(arguments); _handler.apply(this,arguments); }; ...
    const log = (target, name, descriptor) => {
      //ES6实现AOP
      const _handler = descriptor.value;
      descriptor.value = function(){
        console.log(arguments);
       _handler.apply(this,arguments);
      };
      return descriptor;
    }
    
    class Math {
      @log
      add(a, b) {
        return a + b;
      }
      add2(a, b) {
        return a + b;
      }
      add3(a, b) {
        return a + b;
      }
    }
    //传统方式
    !function(){
    const _handler = Math.prototype.add2;
    Math.prototype.add2 = function(){
        console.log(arguments);
       _handler.apply(this,arguments);
    };
    }();
    
    const math = new Math();
    math.add(1, 2);
    math.add2(1, 2);

     

    展开全文
  • add descriptor loader

    2020-12-01 13:33:02
    create ProtoSchema from descriptor file". <p>A "descriptor file" is a set of descriptors. A descriptor is a binary representation of the .proto file. Typically one (or more) of the ...
  • Deployment descriptor

    2019-03-13 22:58:52
    A deployment descriptor (DD) refers to a configuration file for an artifact that is deployed to some container/engine. In the Java Platform, Enterprise Edition, a deployment descriptor describes how a...

    A deployment descriptor (DD) refers to a configuration file for an artifact that is deployed to some container/engine.

    In the Java Platform, Enterprise Edition, a deployment descriptor describes how a component, module or application (such as a web application or enterprise application) should be deployed.[1] It directs a deployment tool to deploy a module or application with specific container options, security settings and describes specific configuration requirements. XML is used for the syntax of these deployment descriptor files.

    For web applications, the deployment descriptor must be called web.xml and must reside in the WEB-INF directory in the web application root. For Java EE applications, the deployment descriptor must be named application.xml and must be placed directly in the META-INF directory at the top level of the application .ear file.

    In Java EE, there are two types of deployment descriptors: “Java EE deployment descriptors” and “runtime deployment descriptors”.[1] The Java EE deployment descriptors are defined by the language specification,[2] whereas the runtime descriptors are defined by the vendor of each container implementation. For example, the web.xml file is a standard Java EE deployment descriptor, specified in the Java Servlet specification, but the sun-web.xml file contains configuration data specific to the Sun GlassFish Enterprise Server implementation.[3]

    Reference:
    https://en.wikipedia.org/wiki/Deployment_descriptor

    展开全文
  • s typical to allocate identical descriptor sets per frame in flight. Currently, to allocate multiple descriptor sets of the same layout you have to duplicate the layout in <code>...
  • python descriptor

    2015-12-22 21:39:34
    python descriptor
  • too many Bad file descriptor

    2020-12-02 09:39:01
    03-23 10:03:03.453 424 424 W pgagroal.main accept: 4 Bad file descriptor 03-23 10:03:03.453 424 424 W pgagroal.main accept: 4 Bad file descriptor 03-23 10:03:03.453 424 424 W pgagroal.main accept: 4 ...
  • lhs array descriptor

    2020-12-09 02:03:30
    m planning to add sl_json_ast.t and sl_syn_ast.t, which will use the new descriptor, soon. <p>Note: The commits making up the addition of lhs array descriptor have been cherry-pick'ed to a ...
  • <div><ul><li>Created a class for each Descriptor: HasManyRelationDescriptor, BelongsToRelationDescriptor, HasOneRelationDescriptor.</li></ul> <p>Large but simple refactor which should help with a lot ...
  • Descriptor index broken

    2020-12-26 03:48:53
    </code> before the beginning of the actual content, breaking everything in the descriptor index table. See https://drafts.csswg.org/css-device-adapt/#viewport-descriptor-table for an example.</p><p>该...
  • 本文整理汇总了Python中google.protobuf.descriptor.FieldDescriptor方法的典型用法代码示例。如果您正苦于以下问题:Python descriptor.FieldDescriptor方法的具体用法?Python descriptor.FieldDescriptor怎么用?...
  • FileDescriptor详解

    2020-05-29 11:03:27
    FileDescriptor 介绍 FileDescriptor 是“文件描述符”。 FileDescriptor 可以被用来表示开放文件、开放套接字等。 以FileDescriptor表示文件来说:当FileDescriptor表示某文件时,我们可以通俗的将FileDescriptor...
  • <div><p>According to the final decision of <a href="https://github.com/gpuweb/gpuweb/issues/109">issue 109, modify compute pipeline descriptor and render pipeline descriptor to have seperated pipeline...
  • deployment descriptor

    2019-03-18 10:36:40
    servlet写好这后你要部署...Descriptor是接口 所有超级接口: Cloneable, Serializable 所有已知实现类: DescriptorSupport, ImmutableDescriptor --------------------------------------------------------...
  • Deployment Descriptor

    2019-03-27 10:45:00
    部署描述符(Deployment Descriptor)指的是配置文件对于一个假象部署到一些容器/发动机。 在Java平台,企业版部署描述符描述组件、模块或应用程序(例如web应用程序或者企业应用程序)应该被部署。它指导部署工具...
  • Python descriptor

    2017-10-07 11:10:30
    从attribute到property, 现在又出现了descriptor. 刚读到Fluent Python里的这一章(Chapter 20)时, 内心阴影面积着实很大, 要理清它们的关系确实不那么容易.什么是descriptor?一种协议, 协议方法有仨: __get__, __set...
  • <div><p>This request is for the validation layer to report whenever a descriptor set is used after it's descriptor set layout has been destroyed. Spec section 2.3.1 says: <p>VkDescriptorSetLayout ...
  • <p>So, I extracted the tar and find plugin-descriptor.properties. It exists. <pre><code> $ wget https://github.com/jprante/elasticsearch-langdetect/archive/2.3.3.0.tar.gz $ tar zxvf 2.3.3.0.tar.gz $ ...
  • 主要向我们详细介绍了Python描述器descriptor,需要的朋友可以参考下
  • Python 在 2.2 版本中引入了descriptor(描述符)功能,也正是基于这个功能实现了新式类(new-styel class)的对象模型,同时解决了之前版本中经典类 (classic class) 系统中出现的多重继承中的 MRO(Method Resolution...
  • 前面说了descriptor,这个东西其实和Java的setter,getter有点像。但这个descriptor和上文中我们开始提到的函数方法这些东西有什么关系呢?所有的函数都可以是descriptor,因为它有__get__方法。代码如下:>>&...
  • ACM save device descriptor

    2020-11-27 02:46:34
    <div><p>I have been doing some tests with my ACM-derived device, and it seems like the device descriptor can only be checked during the Init() phase (set address 0, get USB_DEVICE_DESCRIPTOR )....

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 20,235
精华内容 8,094
关键字:

descriptor