text:
Q: Table of OIDs for certificate's subject? Is there any table where we can find all correspondences between OIDs and attributes they represent in the subject field of certificate. For example, I know that "1.3.6.1.4.1.311.20.2" means certificate's template name, "2.5.29.30" - name restrictions. Where can we find other oids especially for main attributes such as CN, C, S, L, O, OU...?

A: Found it here http://technet.microsoft.com/en-us/library/cc772812(WS.10).aspx

A: A very good reference is Peter Gutmann's dumpasn1 tool. It has an extensive configuration file which is a database for many PKI related OIDs.
Alternatively OpenSSL's database of OID isn't human readable in its original or processed. But using OpenSSL functions like OBJ_nid2obj or OBJ_obj2nid in combination with BJ_nid2ln and OBJ_nid2sn you can easily make lookups.

A: More...
    '2.16.840.1.113730.3' => 'directory',
    '2.16.840.1.113730.4.1' => 'serverGatedCrypto',
    '2.16.840.1.113733.1.6.3' => 'Unknown Verisign extension',
    '2.16.840.1.113733.1.6.6' => 'Unknown Verisign extension',
    '2.16.840.1.113733.1.7.1.1' => 'Verisign certificatePolicy',
    '2.16.840.1.113733.1.7.1.1.1' => 'Unknown Verisign policy qualifier',
    '2.16.840.1.113733.1.7.1.1.2' => 'Unknown Verisign policy qualifier',
    '2.23.133' => 'TCPA',
    '2.23.133.1' => 'tcpa_specVersion',
    '2.23.133.2' => 'tcpa_attribute',
    '2.23.133.2.1' => 'tcpa_at_tpmManufacturer',
    '2.23.133.2.10' => 'tcpa_at_securityQualities',
    '2.23.133.2.11' => 'tcpa_at_tpmProtectionProfile',
    '2.23.133.2.12' => 'tcpa_at_tpmSecurityTarget',
    '2.23.133.2.13' => 'tcpa_at_foundationProtectionProfile',
    '2.23.133.2.14' => 'tcpa_at_foundationSecurityTarget',
    '2.23.133.2.15' => 'tcpa_at_tpmIdLabel',
    '2.23.133.2.2' => 'tcpa_at_tpmModel',
    '2.23.133.2.3' => 'tcpa_at_tpmVersion',
    '2.23.133.2.4' => 'tcpa_at_platformManufacturer',
    '2.23.133.2.5' => 'tcpa_at_platformModel',
    '2.23.133.2.6' => 'tcpa_at_platformVersion',
    '2.23.133.2.7' => 'tcpa_at_componentManufacturer',
    '2.23.133.2.8' => 'tcpa_at_componentModel',
    '2.23.133.2.9' => 'tcpa_at_componentVersion',
    '2.23.133.3' => 'tcpa_protocol',
    '2.23.133.3.1' => 'tcpa_prtt_tpmIdProtocol',
    '2.23.42.0' => 'contentType',
    '2.23.42.0.0' => 'PANData',
    '2.23.42.0.1' => 'PANToken',
    '2.23.42.0.2' => 'PANOnly',
    '2.23.42.1' => 'msgExt',
    '2.23.42.10' => 'national',
    '2.23.42.10.192' => 'Japan',
    '2.23.42.2' => 'field',
    '2.23.42.2.0' => 'fullName',
    '2.23.42.2.1' => 'givenName',
    '2.23.42.2.10' => 'amount',
    '2.23.42.2.2' => 'familyName',
    '2.23.42.2.3' => 'birthFamilyName',
    '2.23.42.2.4' => 'placeName',
    '2.23.42.2.5' => 'identificationNumber',
    '2.23.42.2.6' => 'month',
    '2.23.42.2.7' => 'date',
    '2.23.42.2.7.11' => 'accountNumber',
    '2.23.42.2.7.12' => 'passPhrase',
    '2.23.42.2.8' => 'address',
    '2.23.42.2.9' => 'telephone',
    '2.23.42.3' => 'attribute',
    '2.23.42.3.0' => 'cert',
    '2.23.42.3.0.0' => 'rootKeyThumb',
    '2.23.42.3.0.1' => 'additionalPolicy',
    '2.23.42.4' => 'algorithm',
    '2.23.42.5' => 'policy',
    '2.23.42.5.0' => 'root',
    '2.23.42.6' => 'module',
    '2.23.42.7' => 'certExt',
    '2.23.42.7.0' => 'hashedRootKey',
    '2.23.42.7.1' => 'certificateType',
    '2.23.42.7.2' => 'merchantData',
    '2.23.42.7.3' => 'cardCertRequired',
    '2.23.42.7.4' => 'tunneling',
    '2.23.42.7.5' => 'setExtensions',
    '2.23.42.7.6' => 'setQualifier',
    '2.23.42.8' => 'brand',
    '2.23.42.8.1' => 'IATA-ATA',
    '2.23.42.8.30' => 'Diners',
    '2.23.42.8.34' => 'AmericanExpress',
    '2.23.42.8.4' => 'VISA',
    '2.23.42.8.5' => 'MasterCard',
    '2.23.42.8.6011' => 'Novus',
    '2.23.42.9' => 'vendor',
    '2.23.42.9.0' => 'GlobeSet',
    '2.23.42.9.1' => 'IBM',
    '2.23.42.9.10' => 'Griffin',
    '2.23.42.9.11' => 'Certicom',
    '2.23.42.9.12' => 'OSS',
    '2.23.42.9.13' => 'TenthMountain',
    '2.23.42.9.14' => 'Antares',
    '2.23.42.9.15' => 'ECC',
    '2.23.42.9.16' => 'Maithean',
    '2.23.42.9.17' => 'Netscape',
    '2.23.42.9.18' => 'Verisign',
    '2.23.42.9.19' => 'BlueMoney',
    '2.23.42.9.2' => 'CyberCash',
    '2.23.42.9.20' => 'Lacerte',
    '2.23.42.9.21' => 'Fujitsu',
    '2.23.42.9.22' => 'eLab',
    '2.23.42.9.23' => 'Entrust',
    '2.23.42.9.24' => 'VIAnet',
    '2.23.42.9.25' => 'III',
    '2.23.42.9.26' => 'OpenMarket',
    '2.23.42.9.27' => 'Lexem',
    '2.23.42.9.28' => 'Intertrader',
    '2.23.42.9.29' => 'Persimmon',
    '2.23.42.9.3' => 'Terisa',
    '2.23.42.9.30' => 'NABLE',
    '2.23.42.9.31' => 'espace-net',
    '2.23.42.9.32' => 'Hitachi',
    '2.23.42.9.33' => 'Microsoft',
    '2.23.42.9.34' => 'NEC',
    '2.23.42.9.35' => 'Mitsubishi',
    '2.23.42.9.36' => 'NCR',
    '2.23.42.9.37' => 'e-COMM',
    '2.23.42.9.38' => 'Gemplus',
    '2.23.42.9.4' => 'RSADSI',
    '2.23.42.9.5' => 'VeriFone',
    '2.23.42.9.6' => 'TrinTech',
    '2.23.42.9.7' => 'BankGate',
    '2.23.42.9.8' => 'GTE',
    '2.23.42.9.9' => 'CompuSource',
    '2.5.29.1' => 'authorityKeyIdentifier',
    '2.5.29.10' => 'basicConstraints',
    '2.5.29.11' => 'nameConstraints',
    '2.5.29.12' => 'policyConstraints',
    '2.5.29.13' => 'basicConstraints',
    '2.5.29.14' => 'subjectKeyIdentifier',
    '2.5.29.15' => 'keyUsage',
    '2.5.29.16' => 'privateKeyUsagePeriod',
    '2.5.29.17' => 'subjectAltName',
    '2.5.29.18' => 'issuerAltName',
    '2.5.29.19' => 'basicConstraints',
    '2.5.29.2' => 'keyAttributes',
    '2.5.29.20' => 'cRLNumber',
    '2.5.29.21' => 'cRLReason',
    '2.5.29.22' => 'expirationDate',
    '2.5.29.23' => 'instructionCode',
    '2.5.29.24' => 'invalidityDate',
    '2.5.29.26' => 'issuingDistributionPoint',
    '2.5.29.27' => 'deltaCRLIndicator',
    '2.5.29.28' => 'issuingDistributionPoint',
    '2.5.29.29' => 'certificateIssuer',
    '2.5.29.3' => 'certificatePolicies',
    '2.5.29.30' => 'nameConstraints',
    '2.5.29.31' => 'cRLDistributionPoints',
    '2.5.29.32' => 'certificatePolicies',
    '2.5.29.33' => 'policyMappings',
    '2.5.29.34' => 'policyConstraints',
    '2.5.29.35' => 'authorityKeyIdentifier',
    '2.5.29.36' => 'policyConstraints',
    '2.5.29.37' => 'extKeyUsage',
    '2.5.29.4' => 'keyUsageRestriction',
    '2.5.29.5' => 'policyMapping',
    '2.5.29.6' => 'subtreesConstraint',
    '2.5.29.7' => 'subjectAltName',
    '2.5.29.8' => 'issuerAltName',
    '2.5.29.9' => 'subjectDirectoryAttributes',
    '2.5.4.0' => 'objectClass',
    '2.5.4.1' => 'aliasObjectName',
    '2.5.4.12' => 'title',
    '2.5.4.13' => 'description',
    '2.5.4.14' => 'searchGuide',
    '2.5.4.15' => 'businessCategory',
    '2.5.4.16' => 'postalAddress',
    '2.5.4.17' => 'postalCode',
    '2.5.4.18' => 'postOfficeBox',
    '2.5.4.19' => 'physicalDeliveryOfficeName',
    '2.5.4.2' => 'knowledgeInformation',
    '2.5.4.20' => 'telephoneNumber',
    '2.5.4.21' => 'telexNumber',
    '2.5.4.22' => 'teletexTerminalIdentifier',
    '2.5.4.23' => 'facsimileTelephoneNumber',
    '2.5.4.24' => 'x121Address',
    '2.5.4.25' => 'internationalISDNNumber',
    '2.5.4.26' => 'registeredAddress',
    '2.5.4.27' => 'destinationIndicator',
    '2.5.4.28' => 'preferredDeliveryMehtod',
    '2.5.4.29' => 'presentationAddress',
    '2.5.4.30' => 'supportedApplicationContext',
    '2.5.4.31' => 'member',
    '2.5.4.32' => 'owner',
    '2.5.4.33' => 'roleOccupant',
    '2.5.4.34' => 'seeAlso',
    '2.5.4.35' => 'userPassword',
    '2.5.4.36' => 'userCertificate',
    '2.5.4.37' => 'caCertificate',
    '2.5.4.38' => 'authorityRevocationList',
    '2.5.4.39' => 'certificateRevocationList',
    '2.5.4.40' => 'crossCertificatePair',
    '2.5.4.41' => 'givenName',
    '2.5.4.42' => 'givenName',
    '2.5.4.5' => 'serialNumber',
    '2.5.4.52' => 'supportedAlgorithms',
    '2.5.4.53' => 'deltaRevocationList',
    '2.5.4.58' => 'crossCertificatePair',
    '2.5.4.9' => 'streetAddress',
    '2.5.8' => 'X.500-Algorithms',
    '2.5.8.1' => 'X.500-Alg-Encryption',
    '2.5.8.1.1' => 'rsa',
    '2.16.76.1.1' => 'DPC',
    '2.16.76.1.1.0' => 'DPC da AC Raiz',
    '2.16.76.1.1.1' => 'DPC da AC Presidência',
    '2.16.76.1.1.2' => 'DPC da AC Serpro',
    '2.16.76.1.1.3' => 'DPC da SERASA Autoridade Certificadora Principal - ACP',
    '2.16.76.1.1.4' => 'DPC da SERASA Autoridade Certificadora - AC',
    '2.16.76.1.1.5' => 'DPC da AC CertiSign na ICPBrasil',
    '2.16.76.1.1.6' => 'DPC da AC CertiSign SPB na ICPBrasil',
    '2.16.76.1.1.7' => 'DPC da SERASA Certificadora Digital',
    '2.16.76.1.1.8' => 'DPC da AC SRF',
    '2.16.76.1.1.9' => 'DPC da AC CAIXA',
    '2.16.76.1.1.10' => 'DPC da AC CAIXA IN',
    '2.16.76.1.1.11' => 'DPC da AC CAIXA PJ',
    '2.16.76.1.1.12' => 'DPC da AC CAIXA PF',
    '2.16.76.1.1.13' => 'DPC da AC SERPRO SRF',
    '2.16.76.1.1.14' => 'DPC da Autoridade Certificadora CertiSign Múltipla',
    '2.16.76.1.1.15' => 'DPC da Autoridade Certificadora CertiSign para Secretaria da Receita Federal',
    '2.16.76.1.1.16' => 'DPC da AC SERASA SRF',
    '2.16.76.1.1.17' => 'DPC da Autoridade Certificadora Imprensa Oficial  SP',
    '2.16.76.1.1.18' => 'DPC da Autoridade Certificadora PRODEMGE',
    '2.16.76.1.1.19' => 'DPC da Autoridade Certificadora do Sistema Justiça Federal - ACJUS',
    '2.16.76.1.1.20' => 'Declaração de Práticas de Certificação da Autoridade Certificadora do SERPRO Final - DPC SERPRO ACF',
    '2.16.76.1.1' => 'DPC',
    '2.16.76.1.1.21' => 'Declaração de Práticas de Certificação da Autoridade Certificadora SINCOR',
    '2.16.76.1.1.22' => 'Declaração de Práticas de Certificação da Autoridade Certificadora Imprensa Oficial SP SRF',
    '2.16.76.1.1.23' => 'Declaração de Práticas de Certificação da AC FENACOR',
    '2.16.76.1.1.24' => 'Declaração de Práticas de Certificação da Autoridade Certificadora SERPRO JUS',
    '2.16.76.1.1.25' => 'DPC da AC Caixa Justiça',
    '2.16.76.1.1.26' => 'DPC da Autoridade Certificadora Imprensa Oficial SP (AC IMESP)',
    '2.16.76.1.1.27' => 'DPC da Autoridade Certificadora PRODEMGE SRF',
    '2.16.76.1.1.28' => 'Declaração de Práticas de Certificação da Autoridade Certificadora CertSign para a Justiça',
    '2.16.76.1.1.29' => 'DPC da AC SERASA JUS',
    '2.16.76.1.2' => 'PC',
    '2.16.76.1.2.1' => 'A1',
    '2.16.76.1.2.1.1' => 'Política de Certificados da ACSERPRO para certificados SERPROSPB  PC SERPROSPB',
    '2.16.76.1.2.1.2' => 'Política de Certificados para certificados da SERASA Autoridade Certificadora',
    '2.16.76.1.2.1.3' => 'Política de Certificados da Autoridade Certificadora da Presidência da República - PCA1',
    '2.16.76.1.2.1.4' => 'Política de Certificado da Autoridade Certificadora CertiSign Certificadora Digital para o Sistema de Pagamentos Brasileiro  na ICPBrasil PC da AC CertiSign SPB na ICPBrasil',
    '2.16.76.1.2.1.5' => 'Política de Certificados SEPROA1',
    '2.16.76.1.2.1.6' => 'Política de Certificado Digital para Certificado de Assinatura Digital Tipo A1 - SERASA CD',
    '2.16.76.1.2.1.7' => 'Política de Certificado de Assinatura Digital do Tipo A1 da AC Caixa IN',
    '2.16.76.1.2.1.8' => 'Política de Certificado de Assinatura Digital do Tipo A1 da AC Caixa PF',
    '2.16.76.1.2.1.9' => 'Política de Certificado de Assinatura Digital do Tipo A1 da AC Caixa PJ',
    '2.16.76.1.2.1.10' => 'Política de Certificados da Autoridade Certificadora do SerproSRF para certificados de assinatura digital do tipo A1 (PCSerproSRFA1)',
    '2.16.76.1.2.1.11' => 'Política de Certificado de Assinatura Digital do Tipo A1 da Autoridade Certificadora CertiSign Múltipla na Infraestrutura de Chaves Públicas Brasileira',
    '2.16.76.1.2.1.12' => 'Política de Certificado de Assinatura Digital Tipo A1 da Autoridade Certificadora CertiSign para a Secretaria da Receita Federal',
    '2.16.76.1.2.1.13' => 'Política de Certificado de Assinatura Digital Tipo A1 da AC SERASA SRF',
    '2.16.76.1.2.1.14' => 'Política de Certificado de Assinatura Digital Tipo A1 da Autoridade Certificadora Imprensa Oficial  SP',
    '2.16.76.1.2.1.15' => 'Política de Certificado de Assinatura Digital Tipo A1 da Autoridade Certificadora PRODEMGE',
    '2.16.76.1.2.1.16' => 'Política de Certificados SERPRO do Tipo A1 - PC SERPRO ACF A1',
    '2.16.76.1.2.1.17' => 'Política de Certificados do SERPRO - SPB - PC SERPRO ACF SPB',
    '2.16.76.1.2.1.18' => 'Política de Certificado de Assinatura Digital Tipo A1 da Autoridade Certificadora SINCOR',
    '2.16.76.1.2.1.19' => 'Política de Certificado de Assinatura Digital Tipo A1 da Autoridade Certificadora SINCOR para Corretores de Seguros',
    '2.16.76.1.2' => 'PC',
    '2.16.76.1.2.1' => 'A1',
    '2.16.76.1.2.1.20' => 'Política de Certificado de Assinatura Digital Tipo A1 da Autoridade Certificadora Imprensa Oficial SP SRF',
    '2.16.76.1.2.1.21' => 'Política de Certificados SERPROJUS do tipo A1  PCSERPROJUSA1',
    '2.16.76.1.2.1.22' => 'Política de Certificado de Assinatura Digital do Tipo A1 da AC Caixa Justiça',
    '2.16.76.1.2.1.23' => 'Política de Certificado de Assinatura Tipo A1 da Autoridade Certificadora PRODEMGE SRF',
    '2.16.76.1.2.1.24' => 'Política de Certificado de Assinatura Digital Tipo A1 da Autoridade Certificadora CertiSign para a Justiça',
    '2.16.76.1.2.1.25' => 'Política de Certificado Digital da AC SERASAJUS para Certificados Tipo A1',
    '2.16.76.1.2' => 'PC',
    '2.16.76.1.2.2' => 'A2',
    '2.16.76.1.2.2.1' => 'Política de Certificado Digital para Certificado de Assinatura Digital Tipo A2 - SERASA CD',
    '2.16.76.1.2.2.2' => 'Política de Certificado Digital para Certificado de Assinatura Digital Tipo A2 da AC SERASA SRF',
    '2.16.76.1.2.2.3' => 'Política de Certificado de Assinatura Digital do Tipo A2 da Autoridade Certificadora CertiSign últipla na Infraestrutura de Chaves Públicas Brasileira',
    '2.16.76.1.2.2.4' => 'Política de Certificado de Assinatura Digital do Tipo A2 da Autoridade Certificadora Imprensa Oficial  SP',
    '2.16.76.1.2.2.5' => 'Política de Certificado de Assinatura Digital do Tipo A2 da AC Caixa Justiça',
    '2.16.76.1.2.2.6' => 'Política de Certificado de Assinatura Digital Tipo A2 da Autoridade Certificadora CertiSign para a Justiça',
    '2.16.76.1.2.2.7' => 'Política de Certificado Digital da AC SERASAJUS para Certificados Tipo A2',
    '2.16.76.1.2' => 'PC',
    '2.16.76.1.2.3' => 'A3',
    '2.16.76.1.2.3.1' => 'Política de Certificados da Autoridade Certificadora da Presidência da República - PC ACPR',
    '2.16.76.1.2.3.2' => 'Política de Certificados da Autoridade Certificadora do SERPRO para certificados SERPRO do tipo A3 - PCSERPROA3',
    '2.16.76.1.2.3.3' => 'Política de Certificado Digital para Certificado de Assinatura Digital Tipo A3 - SERASA CD',
    '2.16.76.1.2.3.4' => 'Política de Certificados da Autoridade Certificadora do SerproSRF para certificados de assinatura digital do tipo A3 (PCSerproSRFA3)',
    '2.16.76.1.2.3.5' => 'Política de Certificado de Assinatura Digital do Tipo A3 da Autoridade Certificadora CertiSign Múltipla na Infraestrutura de Chaves Públicas Brasileira',
    '2.16.76.1.2.3.6' => 'Política de Certificado de Assinatura Digital Tipo A3 da Autoridade Certificadora CertiSign para a Secretaria da Receita Federal na Infraestrutura de Chaves Públicas Brasileira',
    '2.16.76.1.2.3.7' => 'Política de Certificado de Assinatura Digital do Tipo A3 da AC Caixa IN',
    '2.16.76.1.2.3.8' => 'Política de Certificado de Assinatura Digital do Tipo A3 da AC Caixa PF',
    '2.16.76.1.2.3.9' => 'Política de Certificado de Assinatura Digital do Tipo A3 da AC Caixa PJ',
    '2.16.76.1.2.3.10' => 'Política de Certificado de Assinatura Digital do Tipo A3 da AC SERASA SRF',
    '2.16.76.1.2.3.11' => 'Política de Certificado de Assinatura Digital do Tipo A3 da Autoridade Certificadora Imprensa Oficial  SP',
    '2.16.76.1.2.3.12' => 'Política de Certificado de Assinatura Digital do Tipo A3 da Autoridade Certificadora PRODEMGE',
    '2.16.76.1.2.3.13' => 'Política de Certificados SERPRO do Tipo A3 - PC SERPRO A3',
    '2.16.76.1.2.3.14' => 'Política de Certificado de Assinatura Digital Tipo A3 da Autoridade Certificadora SINCOR',
    '2.16.76.1.2.3.15' => 'Política de Certificado de Assinatura Digital Tipo A3 da Autoridade Certificadora SINCOR para Corretores de Seguros',
    '2.16.76.1.2.3.16' => 'Política de Certificado de Assinatura Digital Tipo A3 da Autoridade Certificadora Imprensa Oficial SP SRF',
    '2.16.76.1.2' => 'PC',
    '2.16.76.1.2.3' => 'A3',
    '2.16.76.1.2.3.17' => 'Política de Certificado da AC FENACOR A3',
    '2.16.76.1.2.3.18' => 'Política de Certificados SERPROJUS do tipo A3 PCSERPROJUSA3',
    '2.16.76.1.2.3.19' => 'Política de Certificado de Assinatura Digital do Tipo A3 da AC Caixa Justiça',
    '2.16.76.1.2.3.20' => 'Política de Certificado de Assinatura Tipo A3 da Autoridade Certificadora PRODEMGE SRF',
    '2.16.76.1.2.3.21' => 'Política de Certificado de Assinatura Digital Tipo A3 da Autoridade Certificadora CertiSign para a Justiça',
    '2.16.76.1.2.3.22' => 'Política de Certificado Digital da AC SERASAJUS para Certificados Tipo A3',
    '2.16.76.1.2' => 'PC',
    '2.16.76.1.2.4' => 'A4',
    '2.16.76.1.2.4.1' => 'Política de Certificado Digital para Certificado de Assinatura Digital Tipo A4 - SERASA CD;',
    '2.16.76.1.2.4.2' => 'VAGO',
    '2.16.76.1.2.4.3' => 'Política de Certificado de Assinatura Digital do Tipo A4 da Autoridade Certificadora CertiSign Múltipla na Infraestrutura de Chaves Públicas Brasileira',
    '2.16.76.1.2.4.4' => 'Política de Certificado de Assinatura Digital Tipo A4  da Autoridade Certificadora CertiSign para a Secretaria da Receita Federal na Infraestrutura de Chaves Públicas Brasileira',
    '2.16.76.1.2.4.5' => 'Política de Certificado de Assinatura Digital Tipo A4 da Autoridade Certificadora Imprensa Oficial  SP',
    '2.16.76.1.2.4.6' => 'Política de Certificado de Assinatura Digital Tipo A4 da Autoridade Certificadora Imprensa Oficial - SP SRF',
    '2.16.76.1.2.4.7' => 'Política de Certificado de Assinatura Tipo A4 da Autoridade Certificadora PRODEMGE SRF',
    '2.16.76.1.2.4.8' => 'Política de Certificado de Assinatura Digital Tipo A4 da Autoridade Certificadora CertiSign para a Justiça',
    '2.16.76.1.2.4.9' => 'VAGO',
    '2.16.76.1.2.4.10' => 'Política de Certificado Digital a AC SERASAJUS para Certificados Tipo A4',
    '2.16.76.1.2' => 'PC',
    '2.16.76.1.2.101' => 'S1',
    '2.16.76.1.2.101.1' => 'Política de Certificado Digital para Certificado de Sigilo Tipo S1-SERASA CD',
    '2.16.76.1.2.101.2' => 'Política de Certificado de Sigilo Tipo S1 da Autoridade Certificadora Imprensa Oficial  SP',
    '2.16.76.1.2.101.3' => 'Política de Certificado de Sigilo do Tipo S1 da Autoridade Certificadora CertiSign Múltipla',
    '2.16.76.1.2.101.4' => 'Política de Certificado de Sigilo do Tipo S1 da Autoridade Certificadora PRODEMGE',
    '2.16.76.1.2.101.5' => 'Política de Certificado de Assinatura Digital do Tipo S1 da AC Caixa Justiça',
    '2.16.76.1.2.101.6' => 'Política de Certificado de Assinatura Digital Tipo S1 da Autoridade Certificadora CertiSign para a Justiça',
    '2.16.76.1.2.101.7' => 'Política de Certificado Digital da AC SERASAJUS para Cerficados Tipo S1',
    '2.16.76.1.2' => 'PC',
    '2.16.76.1.2.102' => 'S2',
    '2.16.76.1.2.102.1' => 'Política de Certificado Digital para Certificado de Sigilo Tipo S2 - SERASA CD',
    '2.16.76.1.2.102.2' => 'Política de Certificado de Sigilo Tipo S2 da Autoridade Certificadora Imprensa Oficial  SP',
    '2.16.76.1.2.102.3' => 'Política de Certificado de Sigilo do Tipo S2 da Autoridade Certificadora CertiSign Múltipla',
    '2.16.76.1.2.102.4' => 'Política de Certificado de Assinatura Digital do Tipo S2 da AC Caixa Justiça',
    '2.16.76.1.2.102.5' => 'Política de Certificado de Assinatura Digital Tipo S2 da Autoridade Certificadora CertiSign para a Justiça',
    '2.16.76.1.2.102.6' => 'Política de Certificado Digital da AC SERASAJUS para Certificados Tipo S2',
    '2.16.76.1.2' => 'PC',
    '2.16.76.1.2.103' => 'S3',
    '2.16.76.1.2.103.1' => 'Política de Certificado Digital para Certificado de Sigilo Tipo S3 - SERASA CD',
    '2.16.76.1.2.103.2' => 'VAGO',
    '2.16.76.1.2.103.3' => 'Política de Certificado de Sigilo do Tipo S3 da Autoridade Certificadora CertiSign Múltipla',
    '2.16.76.1.2.103.4' => 'Política de Certificado de Sigilo Tipo S3 da Autoridade Certificadora Imprensa Oficial  SP',
    '2.16.76.1.2.103.5' => 'Política de Certificado de Sigilo Tipo S3 da Autoridade Certificadora PRODEMGE',
    '2.16.76.1.2.103.6' => 'Política de Certificado de Assinatura Digital do Tipo S3 da AC Caixa Justiça',
    '2.16.76.1.2.103.7' => 'Política de Certificado de Assinatura Digital Tipo S3 da Autoridade Certificadora CertiSign para a Justiça',
    '2.16.76.1.2.103.8' => 'Política de Certificado Digital da AC SERASAJUS para Certificados Tipo S3',
    '2.16.76.1.2' => 'PC',
    '2.16.76.1.2.104' => 'S4',
    '2.16.76.1.2.104.1' => 'Política de Certificado Digital para Certificado de Sigilo Tipo S4 - SERASA CD',
    '2.16.76.1.2.104.2' => 'VAGO',
    '2.16.76.1.2.104.3' => 'Política de Certificado de Sigilo do Tipo S4 da Autoridade Certificadora CertiSign Múltipla',
    '2.16.76.1.2.104.4' => 'Política de Certificado de Sigilo Tipo S4 da Autoridade Certificadora Imprensa Oficial  SP',
    '2.16.76.1.2.104.5' => 'Política de Certificado de Assinatura Digital Tipo S4 da Autoridade Certificadora CertiSign para a Justiça',
    '2.16.76.1.2.104.6' => 'Política de Certificado Digital da AC SERASAJUS para Certificados Tipo S4',
    '2.16.76.1.2' => 'PC',
    '2.16.76.1.2.201' => 'PC de AC',
    '2.16.76.1.2.201.1' => 'PC da Serasa Autoridade Certificadora Principal - ACP',
    '2.16.76.1.2.201.2' => 'PC da AC CertiSign na ICPBrasil',
    '2.16.76.1.2.201.3' => 'PC da AC SRF',
    '2.16.76.1.2.201.4' => 'Política de Certificados da Autoridade Certificadora Caixa',
    '2.16.76.1.2.201.5' => 'PC da Autoridade Certificadora do Sistema Justiça Federal - AC JUS',
    '2.16.76.1.2.201.6' => 'PC da Autoridade Certificadora do SERPRO (AC SERPRO)',
    '2.16.76.1.2.201.7' => 'PC da Autoridade Certificadora Imprensa Oficial SP (AC IMESP)',
    '2.16.76.1.3' => 'Atributos Obrigatórios de Certificados',
    '2.16.76.1.3.1' => 'campo otherName em certificado de pessoa física',
    '2.16.76.1.3.2' => 'campo otherName em certificado de pessoa jurídica',
    '2.16.76.1.3.3' => 'campo otherName em certificado de pessoa jurídica',
    '2.16.76.1.3.4' => 'campo otherName em certificado de pessoa jurídica',
    '2.16.76.1.3.5' => 'campo otherName em certificado de pessoa física',
    '2.16.76.1.3.6' => 'campo otherName em certificado de pessoa física',
    '2.16.76.1.3.7' => 'campo otherName em certificado de pessoa jurídica',
    '2.16.76.1.4' => 'Atributos Opcionais de Certificados',
    '2.16.76.1.4.1' => 'Entidades Sindicais',
    '2.16.76.1.4.1.1' => 'SINCOR',
    '2.16.76.1.4.1.1.1' => 'Número de registro do corretor associado');

A: In nfephp (git) you can find in Certificate class:
$oidsTable = array(
    '2.5.4.3' => 'CN',
    '2.5.4.4' => 'Surname',
    '2.5.4.6' => 'C',
    '2.5.4.7' => 'Cidade',
    '2.5.4.8' => 'Estado',
    '2.5.4.9' => 'StreetAddress',
    '2.5.4.10' => 'O',
    '2.5.4.11' => 'OU',
    '2.5.4.12' => 'Title',
    '2.5.4.20' => 'TelephoneNumber',
    '2.5.4.42' => 'GivenName',
    '2.5.29.14' => 'id-ce-subjectKeyIdentifier',
    '2.5.29.15' => 'id-ce-keyUsage',
    '2.5.29.17' => 'id-ce-subjectAltName',
    '2.5.29.19' => 'id-ce-basicConstraints',
    '2.5.29.20' => 'id-ce-cRLNumber',
    '2.5.29.31' => 'id-ce-CRLDistributionPoints',
    '2.5.29.32' => 'id-ce-certificatePolicies',
    '2.5.29.35' => 'id-ce-authorityKeyIdentifier',
    '2.5.29.37' => 'id-ce-extKeyUsage',
    '1.2.840.113549.1.9.1' => 'Email',
    '1.2.840.113549.1.1.1' => 'RSAEncryption',
    '1.2.840.113549.1.1.2' => 'md2WithRSAEncryption',
    '1.2.840.113549.1.1.4' => 'md5withRSAEncryption',
    '1.2.840.113549.1.1.5' => 'SHA-1WithRSAEncryption',
    '1.2.840.10040.4.3' => 'id-dsa-with-sha-1',
    '1.3.6.1.5.5.7.3.2' => 'id_kp_clientAuth',
    '1.3.6.1.5.5.7.3.4' => 'id_kp_securityemail',
    '1.3.6.1.5.5.7.2.1' => 'id_certificatePolicies',
    '2.16.840.1.113730.1.1' => 'netscape-cert-type',
    '2.16.840.1.113730.1.2' => 'netscape-base-url',
    '2.16.840.1.113730.1.3' => 'netscape-revocation-url',
    '2.16.840.1.113730.1.4' => 'netscape-ca-revocation-url',
    '2.16.840.1.113730.1.7' => 'netscape-cert-renewal-url',
    '2.16.840.1.113730.1.8' => 'netscape-ca-policy-url',
    '2.16.840.1.113730.1.12' => 'netscape-ssl-server-name',
    '2.16.840.1.113730.1.13' => 'netscape-comment',
    '2.16.76.1.2.1' => 'A1',
    '2.16.76.1.2.3' => 'A3',
    '2.16.76.1.2.1.16' => 'Certification Practice Statement pointer',
    '2.16.76.1.3.1' => 'Dados do cert parte 1',
    '2.16.76.1.3.5' => 'Dados do cert parte 2',
    '2.16.76.1.3.6' => 'Dados do cert parte 3',
    '0.9.2342.19200300.100.1.25' => 'domainComponent',
    '1.2.36.68980861.1.1.10' => 'Signet pilot',
    '1.2.36.68980861.1.1.11' => 'Signet intraNet',
    '1.2.36.68980861.1.1.2' => 'Signet personal',
    '1.2.36.68980861.1.1.20' => 'Signet securityPolicy',
    '1.2.36.68980861.1.1.3' => 'Signet business',
    '1.2.36.68980861.1.1.4' => 'Signet legal',
    '1.2.36.75878867.1.100.1.1' => 'Certificates Australia policyIdentifier',
    '1.2.752.34.1' => 'seis-cp',
    '1.2.752.34.1.1' => 'SEIS certificatePolicy-s10',
    '1.2.752.34.2' => 'SEIS pe',
    '1.2.752.34.3' => 'SEIS at',
    '1.2.752.34.3.1' => 'SEIS at-personalIdentifier',
    '1.2.840.10040.2.1' => 'holdinstruction-none',
    '1.2.840.10040.2.2' => 'holdinstruction-callissuer',
    '1.2.840.10040.2.3' => 'holdinstruction-reject',
    '1.2.840.10040.4.1' => 'dsa',
    '1.2.840.10040.4.3' => 'dsaWithSha1',
    '1.2.840.10045.1' => 'fieldType',
    '1.2.840.10045.1.1' => 'prime-field',
    '1.2.840.10045.1.2' => 'characteristic-two-field',
    '1.2.840.10045.1.2.1' => 'ecPublicKey',
    '1.2.840.10045.1.2.3' => 'characteristic-two-basis',
    '1.2.840.10045.1.2.3.1' => 'onBasis',
    '1.2.840.10045.1.2.3.2' => 'tpBasis',
    '1.2.840.10045.1.2.3.3' => 'ppBasis',
    '1.2.840.10045.2' => 'publicKeyType',
    '1.2.840.10045.2.1' => 'ecPublicKey',
    '1.2.840.10046.2.1' => 'dhPublicNumber',
    '1.2.840.113533.7' => 'nsn',
    '1.2.840.113533.7.65' => 'nsn-ce',
    '1.2.840.113533.7.65.0' => 'entrustVersInfo',
    '1.2.840.113533.7.66' => 'nsn-alg',
    '1.2.840.113533.7.66.10' => 'cast5CBC',
    '1.2.840.113533.7.66.11' => 'cast5MAC',
    '1.2.840.113533.7.66.12' => 'pbeWithMD5AndCAST5-CBC',
    '1.2.840.113533.7.66.13' => 'passwordBasedMac',
    '1.2.840.113533.7.66.3' => 'cast3CBC',
    '1.2.840.113533.7.67' => 'nsn-oc',
    '1.2.840.113533.7.67.0' => 'entrustUser',
    '1.2.840.113533.7.68' => 'nsn-at',
    '1.2.840.113533.7.68.0' => 'entrustCAInfo',
    '1.2.840.113533.7.68.10' => 'attributeCertificate',
    '1.2.840.113549.1.1' => 'pkcs-1',
    '1.2.840.113549.1.1.1' => 'rsaEncryption',
    '1.2.840.113549.1.1.2' => 'md2withRSAEncryption',
    '1.2.840.113549.1.1.3' => 'md4withRSAEncryption',
    '1.2.840.113549.1.1.4' => 'md5withRSAEncryption',
    '1.2.840.113549.1.1.5' => 'sha1withRSAEncryption',
    '1.2.840.113549.1.1.6' => 'rsaOAEPEncryptionSET',
    '1.2.840.113549.1.9.16.2.11' => 'SMIMEEncryptionKeyPreference',
    '1.2.840.113549.1.12' => 'pkcs-12',
    '1.2.840.113549.1.12.1' => 'pkcs-12-PbeIds',
    '1.2.840.113549.1.12.1.1' => 'pbeWithSHAAnd128BitRC4',
    '1.2.840.113549.1.12.1.2' => 'pbeWithSHAAnd40BitRC4',
    '1.2.840.113549.1.12.1.3' => 'pbeWithSHAAnd3-KeyTripleDES-CBC',
    '1.2.840.113549.1.12.1.4' => 'pbeWithSHAAnd2-KeyTripleDES-CBC',
    '1.2.840.113549.1.12.1.5' => 'pbeWithSHAAnd128BitRC2-CBC',
    '1.2.840.113549.1.12.1.6' => 'pbeWithSHAAnd40BitRC2-CBC',
    '1.2.840.113549.1.12.10' => 'pkcs-12Version1',
    '1.2.840.113549.1.12.10.1' => 'pkcs-12BadIds',
    '1.2.840.113549.1.12.10.1.1' => 'pkcs-12-keyBag',
    '1.2.840.113549.1.12.10.1.2' => 'pkcs-12-pkcs-8ShroudedKeyBag',
    '1.2.840.113549.1.12.10.1.3' => 'pkcs-12-certBag',
    '1.2.840.113549.1.12.10.1.4' => 'pkcs-12-crlBag',
    '1.2.840.113549.1.12.10.1.5' => 'pkcs-12-secretBag',
    '1.2.840.113549.1.12.10.1.6' => 'pkcs-12-safeContentsBag',
    '1.2.840.113549.1.12.2' => 'pkcs-12-ESPVKID',
    '1.2.840.113549.1.12.2.1' => 'pkcs-12-PKCS8KeyShrouding',
    '1.2.840.113549.1.12.3' => 'pkcs-12-BagIds',
    '1.2.840.113549.1.12.3.1' => 'pkcs-12-keyBagId',
    '1.2.840.113549.1.12.3.2' => 'pkcs-12-certAndCRLBagId',
    '1.2.840.113549.1.12.3.3' => 'pkcs-12-secretBagId',
    '1.2.840.113549.1.12.3.4' => 'pkcs-12-safeContentsId',
    '1.2.840.113549.1.12.3.5' => 'pkcs-12-pkcs-8ShroudedKeyBagId',
    '1.2.840.113549.1.12.4' => 'pkcs-12-CertBagID',
    '1.2.840.113549.1.12.4.1' => 'pkcs-12-X509CertCRLBagID',
    '1.2.840.113549.1.12.4.2' => 'pkcs-12-SDSICertBagID',
    '1.2.840.113549.1.12.5' => 'pkcs-12-OID',
    '1.2.840.113549.1.12.5.1' => 'pkcs-12-PBEID',
    '1.2.840.113549.1.12.5.1.1' => 'pkcs-12-PBEWithSha1And128BitRC4',
    '1.2.840.113549.1.12.5.1.2' => 'pkcs-12-PBEWithSha1And40BitRC4',
    '1.2.840.113549.1.12.5.1.3' => 'pkcs-12-PBEWithSha1AndTripleDESCBC',
    '1.2.840.113549.1.12.5.1.4' => 'pkcs-12-PBEWithSha1And128BitRC2CBC',
    '1.2.840.113549.1.12.5.1.5' => 'pkcs-12-PBEWithSha1And40BitRC2CBC',
    '1.2.840.113549.1.12.5.1.6' => 'pkcs-12-PBEWithSha1AndRC4',
    '1.2.840.113549.1.12.5.1.7' => 'pkcs-12-PBEWithSha1AndRC2CBC',
    '1.2.840.113549.1.12.5.2' => 'pkcs-12-EnvelopingID',
    '1.2.840.113549.1.12.5.2.1' => 'pkcs-12-RSAEncryptionWith128BitRC4',
    '1.2.840.113549.1.12.5.2.2' => 'pkcs-12-RSAEncryptionWith40BitRC4',
    '1.2.840.113549.1.12.5.2.3' => 'pkcs-12-RSAEncryptionWithTripleDES',
    '1.2.840.113549.1.12.5.3' => 'pkcs-12-SignatureID',
    '1.2.840.113549.1.12.5.3.1' => 'pkcs-12-RSASignatureWithSHA1Digest',
    '1.2.840.113549.1.3' => 'pkcs-3',
    '1.2.840.113549.1.3.1' => 'dhKeyAgreement',
    '1.2.840.113549.1.5' => 'pkcs-5',
    '1.2.840.113549.1.5.1' => 'pbeWithMD2AndDES-CBC',
    '1.2.840.113549.1.5.10' => 'pbeWithSHAAndDES-CBC',
    '1.2.840.113549.1.5.3' => 'pbeWithMD5AndDES-CBC',
    '1.2.840.113549.1.5.4' => 'pbeWithMD2AndRC2-CBC',
    '1.2.840.113549.1.5.6' => 'pbeWithMD5AndRC2-CBC',
    '1.2.840.113549.1.5.9' => 'pbeWithMD5AndXOR',
    '1.2.840.113549.1.7' => 'pkcs-7',
    '1.2.840.113549.1.7.1' => 'data',
    '1.2.840.113549.1.7.2' => 'signedData',
    '1.2.840.113549.1.7.3' => 'envelopedData',
    '1.2.840.113549.1.7.4' => 'signedAndEnvelopedData',
    '1.2.840.113549.1.7.5' => 'digestData',
    '1.2.840.113549.1.7.6' => 'encryptedData',
    '1.2.840.113549.1.7.7' => 'dataWithAttributes',
    '1.2.840.113549.1.7.8' => 'encryptedPrivateKeyInfo',
    '1.2.840.113549.1.9' => 'pkcs-9',
    '1.2.840.113549.1.9.1' => 'emailAddress',
    '1.2.840.113549.1.9.10' => 'issuerAndSerialNumber',
    '1.2.840.113549.1.9.11' => 'passwordCheck',
    '1.2.840.113549.1.9.12' => 'publicKey',
    '1.2.840.113549.1.9.13' => 'signingDescription',
    '1.2.840.113549.1.9.14' => 'extensionReq',
    '1.2.840.113549.1.9.15' => 'sMIMECapabilities',
    '1.2.840.113549.1.9.15.1' => 'preferSignedData',
    '1.2.840.113549.1.9.15.2' => 'canNotDecryptAny',
    '1.2.840.113549.1.9.15.3' => 'receiptRequest',
    '1.2.840.113549.1.9.15.4' => 'receipt',
    '1.2.840.113549.1.9.15.5' => 'contentHints',
    '1.2.840.113549.1.9.15.6' => 'mlExpansionHistory',
    '1.2.840.113549.1.9.16' => 'id-sMIME',
    '1.2.840.113549.1.9.16.0' => 'id-mod',
    '1.2.840.113549.1.9.16.0.1' => 'id-mod-cms',
    '1.2.840.113549.1.9.16.0.2' => 'id-mod-ess',
    '1.2.840.113549.1.9.16.1' => 'id-ct',
    '1.2.840.113549.1.9.16.1.1' => 'id-ct-receipt',
    '1.2.840.113549.1.9.16.2' => 'id-aa',
    '1.2.840.113549.1.9.16.2.1' => 'id-aa-receiptRequest',
    '1.2.840.113549.1.9.16.2.2' => 'id-aa-securityLabel',
    '1.2.840.113549.1.9.16.2.3' => 'id-aa-mlExpandHistory',
    '1.2.840.113549.1.9.16.2.4' => 'id-aa-contentHint',
    '1.2.840.113549.1.9.2' => 'unstructuredName',
    '1.2.840.113549.1.9.20' => 'friendlyName',
    '1.2.840.113549.1.9.21' => 'localKeyID',
    '1.2.840.113549.1.9.22' => 'certTypes',
    '1.2.840.113549.1.9.22.1' => 'x509Certificate',
    '1.2.840.113549.1.9.22.2' => 'sdsiCertificate',
    '1.2.840.113549.1.9.23' => 'crlTypes',
    '1.2.840.113549.1.9.23.1' => 'x509Crl',
    '1.2.840.113549.1.9.3' => 'contentType',
    '1.2.840.113549.1.9.4' => 'messageDigest',
    '1.2.840.113549.1.9.5' => 'signingTime',
    '1.2.840.113549.1.9.6' => 'countersignature',
    '1.2.840.113549.1.9.7' => 'challengePassword',
    '1.2.840.113549.1.9.8' => 'unstructuredAddress',
    '1.2.840.113549.1.9.9' => 'extendedCertificateAttributes',
    '1.2.840.113549.2' => 'digestAlgorithm',
    '1.2.840.113549.2.2' => 'md2',
    '1.2.840.113549.2.4' => 'md4',
    '1.2.840.113549.2.5' => 'md5',
    '1.2.840.113549.3' => 'encryptionAlgorithm',
    '1.2.840.113549.3.10' => 'desCDMF',
    '1.2.840.113549.3.2' => 'rc2CBC',
    '1.2.840.113549.3.3' => 'rc2ECB',
    '1.2.840.113549.3.4' => 'rc4',
    '1.2.840.113549.3.5' => 'rc4WithMAC',
    '1.2.840.113549.3.6' => 'DESX-CBC',
    '1.2.840.113549.3.7' => 'DES-EDE3-CBC',
    '1.2.840.113549.3.8' => 'RC5CBC',
    '1.2.840.113549.3.9' => 'RC5-CBCPad',
    '1.2.840.113556.4.3' => 'microsoftExcel',
    '1.2.840.113556.4.4' => 'titledWithOID',
    '1.2.840.113556.4.5' => 'microsoftPowerPoint',
    '1.3.133.16.840.9.84' => 'x9-84',
    '1.3.133.16.840.9.84.0' => 'x9-84-Module',
    '1.3.133.16.840.9.84.0.1' => 'x9-84-Biometrics',
    '1.3.133.16.840.9.84.0.2' => 'x9-84-CMS',
    '1.3.133.16.840.9.84.0.3' => 'x9-84-Identifiers',
    '1.3.133.16.840.9.84.1' => 'biometric',
    '1.3.133.16.840.9.84.1.0' => 'id-unknown-Type',
    '1.3.133.16.840.9.84.1.1' => 'id-body-Odor',
    '1.3.133.16.840.9.84.1.10' => 'id-palm',
    '1.3.133.16.840.9.84.1.11' => 'id-retina',
    '1.3.133.16.840.9.84.1.12' => 'id-signature',
    '1.3.133.16.840.9.84.1.13' => 'id-speech-Pattern',
    '1.3.133.16.840.9.84.1.14' => 'id-thermal-Image',
    '1.3.133.16.840.9.84.1.15' => 'id-vein-Pattern',
    '1.3.133.16.840.9.84.1.16' => 'id-thermal-Face-Image',
    '1.3.133.16.840.9.84.1.17' => 'id-thermal-Hand-Image',
    '1.3.133.16.840.9.84.1.18' => 'id-lip-Movement',
    '1.3.133.16.840.9.84.1.19' => 'id-gait',
    '1.3.133.16.840.9.84.1.2' => 'id-dna',
    '1.3.133.16.840.9.84.1.3' => 'id-ear-Shape',
    '1.3.133.16.840.9.84.1.4' => 'id-facial-Features',
    '1.3.133.16.840.9.84.1.5' => 'id-finger-Image',
    '1.3.133.16.840.9.84.1.6' => 'id-finger-Geometry',
    '1.3.133.16.840.9.84.1.7' => 'id-hand-Geometry',
    '1.3.133.16.840.9.84.1.8' => 'id-iris-Features',
    '1.3.133.16.840.9.84.1.9' => 'id-keystroke-Dynamics',
    '1.3.133.16.840.9.84.2' => 'processing-algorithm',
    '1.3.133.16.840.9.84.3' => 'matching-method',
    '1.3.133.16.840.9.84.4' => 'format-Owner',
    '1.3.133.16.840.9.84.4.0' => 'cbeff-Owner',
    '1.3.133.16.840.9.84.4.1' => 'ibia-Owner',
    '1.3.133.16.840.9.84.4.1.1' => 'id-ibia-SAFLINK',
    '1.3.133.16.840.9.84.4.1.10' => 'id-ibia-SecuGen',
    '1.3.133.16.840.9.84.4.1.11' => 'id-ibia-PreciseBiometric',
    '1.3.133.16.840.9.84.4.1.12' => 'id-ibia-Identix',
    '1.3.133.16.840.9.84.4.1.13' => 'id-ibia-DERMALOG',
    '1.3.133.16.840.9.84.4.1.14' => 'id-ibia-LOGICO',
    '1.3.133.16.840.9.84.4.1.15' => 'id-ibia-NIST',
    '1.3.133.16.840.9.84.4.1.16' => 'id-ibia-A3Vision',
    '1.3.133.16.840.9.84.4.1.17' => 'id-ibia-NEC',
    '1.3.133.16.840.9.84.4.1.18' => 'id-ibia-STMicroelectronics',
    '1.3.133.16.840.9.84.4.1.2' => 'id-ibia-Bioscrypt',
    '1.3.133.16.840.9.84.4.1.3' => 'id-ibia-Visionics',
    '1.3.133.16.840.9.84.4.1.4' => 'id-ibia-InfineonTechnologiesAG',
    '1.3.133.16.840.9.84.4.1.5' => 'id-ibia-IridianTechnologies',
    '1.3.133.16.840.9.84.4.1.6' => 'id-ibia-Veridicom',
    '1.3.133.16.840.9.84.4.1.7' => 'id-ibia-CyberSIGN',
    '1.3.133.16.840.9.84.4.1.8' => 'id-ibia-eCryp.',
    '1.3.133.16.840.9.84.4.1.9' => 'id-ibia-FingerprintCardsAB',
    '1.3.133.16.840.9.84.4.2' => 'x9-Owner',
    '1.3.14.2.26.5' => 'sha',
    '1.3.14.3.2.1.1' => 'rsa',
    '1.3.14.3.2.10' => 'desMAC',
    '1.3.14.3.2.11' => 'rsaSignature',
    '1.3.14.3.2.12' => 'dsa',
    '1.3.14.3.2.13' => 'dsaWithSHA',
    '1.3.14.3.2.14' => 'mdc2WithRSASignature',
    '1.3.14.3.2.15' => 'shaWithRSASignature',
    '1.3.14.3.2.16' => 'dhWithCommonModulus',
    '1.3.14.3.2.17' => 'desEDE',
    '1.3.14.3.2.18' => 'sha',
    '1.3.14.3.2.19' => 'mdc-2',
    '1.3.14.3.2.2' => 'md4WitRSA',
    '1.3.14.3.2.2.1' => 'sqmod-N',
    '1.3.14.3.2.20' => 'dsaCommon',
    '1.3.14.3.2.21' => 'dsaCommonWithSHA',
    '1.3.14.3.2.22' => 'rsaKeyTransport',
    '1.3.14.3.2.23' => 'keyed-hash-seal',
    '1.3.14.3.2.24' => 'md2WithRSASignature',
    '1.3.14.3.2.25' => 'md5WithRSASignature',
    '1.3.14.3.2.26' => 'sha1',
    '1.3.14.3.2.27' => 'dsaWithSHA1',
    '1.3.14.3.2.28' => 'dsaWithCommonSHA1',
    '1.3.14.3.2.29' => 'sha-1WithRSAEncryption',
    '1.3.14.3.2.3' => 'md5WithRSA',
    '1.3.14.3.2.3.1' => 'sqmod-NwithRSA',
    '1.3.14.3.2.4' => 'md4WithRSAEncryption',
    '1.3.14.3.2.6' => 'desECB',
    '1.3.14.3.2.7' => 'desCBC',
    '1.3.14.3.2.8' => 'desOFB',
    '1.3.14.3.2.9' => 'desCFB',
    '1.3.14.3.3.1' => 'simple-strong-auth-mechanism',
    '1.3.14.7.2.1.1' => 'ElGamal',
    '1.3.14.7.2.3.1' => 'md2WithRSA',
    '1.3.14.7.2.3.2' => 'md2WithElGamal',
    '1.3.36.3' => 'algorithm',
    '1.3.36.3.1' => 'encryptionAlgorithm',
    '1.3.36.3.1.1' => 'des',
    '1.3.36.3.1.1.1.1' => 'desECBPad',
    '1.3.36.3.1.1.1.1.1' => 'desECBPadISO',
    '1.3.36.3.1.1.2.1' => 'desCBCPad',
    '1.3.36.3.1.1.2.1.1' => 'desCBCPadISO',
    '1.3.36.3.1.2' => 'idea',
    '1.3.36.3.1.2.1' => 'ideaECB',
    '1.3.36.3.1.2.1.1' => 'ideaECBPad',
    '1.3.36.3.1.2.1.1.1' => 'ideaECBPadISO',
    '1.3.36.3.1.2.2' => 'ideaCBC',
    '1.3.36.3.1.2.2.1' => 'ideaCBCPad',
    '1.3.36.3.1.2.2.1.1' => 'ideaCBCPadISO',
    '1.3.36.3.1.2.3' => 'ideaOFB',
    '1.3.36.3.1.2.4' => 'ideaCFB',
    '1.3.36.3.1.3' => 'des-3',
    '1.3.36.3.1.3.1.1' => 'des-3ECBPad',
    '1.3.36.3.1.3.1.1.1' => 'des-3ECBPadISO',
    '1.3.36.3.1.3.2.1' => 'des-3CBCPad',
    '1.3.36.3.1.3.2.1.1' => 'des-3CBCPadISO',
    '1.3.36.3.2' => 'hashAlgorithm',
    '1.3.36.3.2.1' => 'ripemd160',
    '1.3.36.3.2.2' => 'ripemd128',
    '1.3.36.3.2.3' => 'ripemd256',
    '1.3.36.3.2.4' => 'mdc2singleLength',
    '1.3.36.3.2.5' => 'mdc2doubleLength',
    '1.3.36.3.3' => 'signatureAlgorithm',
    '1.3.36.3.3.1' => 'rsa',
    '1.3.36.3.3.1.1' => 'rsaMitSHA-1',
    '1.3.36.3.3.1.2' => 'rsaMitRIPEMD160',
    '1.3.36.3.3.2' => 'ellipticCurve',
    '1.3.36.3.4' => 'signatureScheme',
    '1.3.36.3.4.1' => 'iso9796-1',
    '1.3.36.3.4.2.1' => 'iso9796-2',
    '1.3.36.3.4.2.2' => 'iso9796-2rsa',
    '1.3.36.4' => 'attribute',
    '1.3.36.5' => 'policy',
    '1.3.36.6' => 'api',
    '1.3.36.6.1' => 'manufacturerSpecific',
    '1.3.36.6.2' => 'functionalitySpecific',
    '1.3.36.7' => 'api',
    '1.3.36.7.1' => 'keyAgreement',
    '1.3.36.7.2' => 'keyTransport',
    '1.3.6.1.4.1.2428.10.1.1' => 'UNINETT policyIdentifier',
    '1.3.6.1.4.1.2712.10' => 'ICE-TEL policyIdentifier',
    '1.3.6.1.4.1.3029.32.1' => 'cryptlibEnvelope',
    '1.3.6.1.4.1.3029.32.2' => 'cryptlibPrivateKey',
    '1.3.6.1.4.1.311' => 'Microsoft OID',
    '1.3.6.1.4.1.311.10' => 'Crypto 2.0',
    '1.3.6.1.4.1.311.10.1' => 'certTrustList',
    '1.3.6.1.4.1.311.10.1.1' => 'szOID_SORTED_CTL',
    '1.3.6.1.4.1.311.10.10' => 'Microsoft CMC OIDs',
    '1.3.6.1.4.1.311.10.10.1' => 'szOID_CMC_ADD_ATTRIBUTES',
    '1.3.6.1.4.1.311.10.11' => 'Microsoft certificate property OIDs',
    '1.3.6.1.4.1.311.10.11.1' => 'szOID_CERT_PROP_ID_PREFIX',
    '1.3.6.1.4.1.311.10.12' => 'CryptUI',
    '1.3.6.1.4.1.311.10.12.1' => 'szOID_ANY_APPLICATION_POLICY',
    '1.3.6.1.4.1.311.10.2' => 'nextUpdateLocation',
    '1.3.6.1.4.1.311.10.3.1' => 'certTrustListSigning',
    '1.3.6.1.4.1.311.10.3.10' => 'szOID_KP_QUALIFIED_SUBORDINATION',
    '1.3.6.1.4.1.311.10.3.11' => 'szOID_KP_KEY_RECOVERY',
    '1.3.6.1.4.1.311.10.3.12' => 'szOID_KP_DOCUMENT_SIGNING',
    '1.3.6.1.4.1.311.10.3.2' => 'timeStampSigning',
    '1.3.6.1.4.1.311.10.3.3' => 'serverGatedCrypto',
    '1.3.6.1.4.1.311.10.3.3.1' => 'szOID_SERIALIZED',
    '1.3.6.1.4.1.311.10.3.4' => 'encryptedFileSystem',
    '1.3.6.1.4.1.311.10.3.4.1' => 'szOID_EFS_RECOVERY',
    '1.3.6.1.4.1.311.10.3.5' => 'szOID_WHQL_CRYPTO',
    '1.3.6.1.4.1.311.10.3.6' => 'szOID_NT5_CRYPTO',
    '1.3.6.1.4.1.311.10.3.7' => 'szOID_OEM_WHQL_CRYPTO',
    '1.3.6.1.4.1.311.10.3.8' => 'szOID_EMBEDDED_NT_CRYPTO',
    '1.3.6.1.4.1.311.10.3.9' => 'szOID_ROOT_LIST_SIGNER',
    '1.3.6.1.4.1.311.10.4.1' => 'yesnoTrustAttr',
    '1.3.6.1.4.1.311.10.5.1' => 'szOID_DRM',
    '1.3.6.1.4.1.311.10.5.2' => 'szOID_DRM_INDIVIDUALIZATION',
    '1.3.6.1.4.1.311.10.6.1' => 'szOID_LICENSES',
    '1.3.6.1.4.1.311.10.6.2' => 'szOID_LICENSE_SERVER',
    '1.3.6.1.4.1.311.10.7' => 'szOID_MICROSOFT_RDN_PREFIX',
    '1.3.6.1.4.1.311.10.7.1' => 'szOID_KEYID_RDN',
    '1.3.6.1.4.1.311.10.8.1' => 'szOID_REMOVE_CERTIFICATE',
    '1.3.6.1.4.1.311.10.9.1' => 'szOID_CROSS_CERT_DIST_POINTS',
    '1.3.6.1.4.1.311.12' => 'Catalog',
    '1.3.6.1.4.1.311.12.1.1' => 'szOID_CATALOG_LIST',
    '1.3.6.1.4.1.311.12.1.2' => 'szOID_CATALOG_LIST_MEMBER',
    '1.3.6.1.4.1.311.12.2.1' => 'CAT_NAMEVALUE_OBJID',
    '1.3.6.1.4.1.311.12.2.2' => 'CAT_MEMBERINFO_OBJID',
    '1.3.6.1.4.1.311.13' => 'Microsoft PKCS10 OIDs',
    '1.3.6.1.4.1.311.13.1' => 'szOID_RENEWAL_CERTIFICATE',
    '1.3.6.1.4.1.311.13.2.1' => 'szOID_ENROLLMENT_NAME_VALUE_PAIR',
    '1.3.6.1.4.1.311.13.2.2' => 'szOID_ENROLLMENT_CSP_PROVIDER',
    '1.3.6.1.4.1.311.13.2.3' => 'OS Version',
    '1.3.6.1.4.1.311.15' => 'Microsoft Java',
    '1.3.6.1.4.1.311.16' => 'Microsoft Outlook/Exchange',
    '1.3.6.1.4.1.311.16.4' => 'Outlook Express',
    '1.3.6.1.4.1.311.17' => 'Microsoft PKCS12 attributes',
    '1.3.6.1.4.1.311.17.1' => 'szOID_LOCAL_MACHINE_KEYSET',
    '1.3.6.1.4.1.311.18' => 'Microsoft Hydra',
    '1.3.6.1.4.1.311.19' => 'Microsoft ISPU Test',
    '1.3.6.1.4.1.311.2' => 'Authenticode',
    '1.3.6.1.4.1.311.2.1.10' => 'spcAgencyInfo',
    '1.3.6.1.4.1.311.2.1.11' => 'spcStatementType',
    '1.3.6.1.4.1.311.2.1.12' => 'spcSpOpusInfo',
    '1.3.6.1.4.1.311.2.1.14' => 'certExtensions',
    '1.3.6.1.4.1.311.2.1.15' => 'spcPelmageData',
    '1.3.6.1.4.1.311.2.1.18' => 'SPC_RAW_FILE_DATA_OBJID',
    '1.3.6.1.4.1.311.2.1.19' => 'SPC_STRUCTURED_STORAGE_DATA_OBJID',
    '1.3.6.1.4.1.311.2.1.20' => 'spcLink',
    '1.3.6.1.4.1.311.2.1.21' => 'individualCodeSigning',
    '1.3.6.1.4.1.311.2.1.22' => 'commercialCodeSigning',
    '1.3.6.1.4.1.311.2.1.25' => 'spcLink',
    '1.3.6.1.4.1.311.2.1.26' => 'spcMinimalCriteriaInfo',
    '1.3.6.1.4.1.311.2.1.27' => 'spcFinancialCriteriaInfo',
    '1.3.6.1.4.1.311.2.1.28' => 'spcLink',
    '1.3.6.1.4.1.311.2.1.29' => 'SPC_HASH_INFO_OBJID',
    '1.3.6.1.4.1.311.2.1.30' => 'SPC_SIPINFO_OBJID',
    '1.3.6.1.4.1.311.2.1.4' => 'spcIndirectDataContext',
    '1.3.6.1.4.1.311.2.2' => 'CTL for Software Publishers Trusted CAs',
    '1.3.6.1.4.1.311.2.2.1' => 'szOID_TRUSTED_CODESIGNING_CA_LIST',
    '1.3.6.1.4.1.311.2.2.2' => 'szOID_TRUSTED_CLIENT_AUTH_CA_LIST',
    '1.3.6.1.4.1.311.2.2.3' => 'szOID_TRUSTED_SERVER_AUTH_CA_LIST',
    '1.3.6.1.4.1.311.20' => 'Microsoft Enrollment Infrastructure',
    '1.3.6.1.4.1.311.20.1' => 'szOID_AUTO_ENROLL_CTL_USAGE',
    '1.3.6.1.4.1.311.20.2' => 'szOID_ENROLL_CERTTYPE_EXTENSION',
    '1.3.6.1.4.1.311.20.2.1' => 'szOID_ENROLLMENT_AGENT',
    '1.3.6.1.4.1.311.20.2.2' => 'szOID_KP_SMARTCARD_LOGON',
    '1.3.6.1.4.1.311.20.2.3' => 'szOID_NT_PRINCIPAL_NAME',
    '1.3.6.1.4.1.311.20.3' => 'szOID_CERT_MANIFOLD',
    '1.3.6.1.4.1.311.21' => 'Microsoft CertSrv Infrastructure',
    '1.3.6.1.4.1.311.21.1' => 'szOID_CERTSRV_CA_VERSION',
    '1.3.6.1.4.1.311.21.20' => 'Client Information',
    '1.3.6.1.4.1.311.25' => 'Microsoft Directory Service',
    '1.3.6.1.4.1.311.25.1' => 'szOID_NTDS_REPLICATION',
    '1.3.6.1.4.1.311.3' => 'Time Stamping',
    '1.3.6.1.4.1.311.3.2.1' => 'SPC_TIME_STAMP_REQUEST_OBJID',
    '1.3.6.1.4.1.311.30' => 'IIS',
    '1.3.6.1.4.1.311.31' => 'Windows updates and service packs',
    '1.3.6.1.4.1.311.31.1' => 'szOID_PRODUCT_UPDATE',
    '1.3.6.1.4.1.311.4' => 'Permissions',
    '1.3.6.1.4.1.311.40' => 'Fonts',
    '1.3.6.1.4.1.311.41' => 'Microsoft Licensing and Registration',
    '1.3.6.1.4.1.311.42' => 'Microsoft Corporate PKI (ITG)',
    '1.3.6.1.4.1.311.88' => 'CAPICOM',
    '1.3.6.1.4.1.311.88.1' => 'szOID_CAPICOM_VERSION',
    '1.3.6.1.4.1.311.88.2' => 'szOID_CAPICOM_ATTRIBUTE',
    '1.3.6.1.4.1.311.88.2.1' => 'szOID_CAPICOM_DOCUMENT_NAME',
    '1.3.6.1.4.1.311.88.2.2' => 'szOID_CAPICOM_DOCUMENT_DESCRIPTION',
    '1.3.6.1.4.1.311.88.3' => 'szOID_CAPICOM_ENCRYPTED_DATA',
    '1.3.6.1.4.1.311.88.3.1' => 'szOID_CAPICOM_ENCRYPTED_CONTENT',
    '1.3.6.1.5.5.7' => 'pkix',
    '1.3.6.1.5.5.7.1' => 'privateExtension',
    '1.3.6.1.5.5.7.1.1' => 'authorityInfoAccess',
    '1.3.6.1.5.5.7.12.2' => 'CMC Data',
    '1.3.6.1.5.5.7.2' => 'policyQualifierIds',
    '1.3.6.1.5.5.7.2.1' => 'cps',
    '1.3.6.1.5.5.7.2.2' => 'unotice',
    '1.3.6.1.5.5.7.3' => 'keyPurpose',
    '1.3.6.1.5.5.7.3.1' => 'serverAuth',
    '1.3.6.1.5.5.7.3.2' => 'clientAuth',
    '1.3.6.1.5.5.7.3.3' => 'codeSigning',
    '1.3.6.1.5.5.7.3.4' => 'emailProtection',
    '1.3.6.1.5.5.7.3.5' => 'ipsecEndSystem',
    '1.3.6.1.5.5.7.3.6' => 'ipsecTunnel',
    '1.3.6.1.5.5.7.3.7' => 'ipsecUser',
    '1.3.6.1.5.5.7.3.8' => 'timeStamping',
    '1.3.6.1.5.5.7.4' => 'cmpInformationTypes',
    '1.3.6.1.5.5.7.4.1' => 'caProtEncCert',
    '1.3.6.1.5.5.7.4.2' => 'signKeyPairTypes',
    '1.3.6.1.5.5.7.4.3' => 'encKeyPairTypes',
    '1.3.6.1.5.5.7.4.4' => 'preferredSymmAlg',
    '1.3.6.1.5.5.7.4.5' => 'caKeyUpdateInfo',
    '1.3.6.1.5.5.7.4.6' => 'currentCRL',
    '1.3.6.1.5.5.7.48.1' => 'ocsp',
    '1.3.6.1.5.5.7.48.2' => 'caIssuers',
    '1.3.6.1.5.5.8.1.1' => 'HMAC-MD5',
    '1.3.6.1.5.5.8.1.2' => 'HMAC-SHA',
    '2.16.840.1.101.2.1.1.1' => 'sdnsSignatureAlgorithm',
    '2.16.840.1.101.2.1.1.10' => 'mosaicKeyManagementAlgorithm',
    '2.16.840.1.101.2.1.1.11' => 'sdnsKMandSigAlgorithm',
    '2.16.840.1.101.2.1.1.12' => 'mosaicKMandSigAlgorithm',
    '2.16.840.1.101.2.1.1.13' => 'SuiteASignatureAlgorithm',
    '2.16.840.1.101.2.1.1.14' => 'SuiteAConfidentialityAlgorithm',
    '2.16.840.1.101.2.1.1.15' => 'SuiteAIntegrityAlgorithm',
    '2.16.840.1.101.2.1.1.16' => 'SuiteATokenProtectionAlgorithm',
    '2.16.840.1.101.2.1.1.17' => 'SuiteAKeyManagementAlgorithm',
    '2.16.840.1.101.2.1.1.18' => 'SuiteAKMandSigAlgorithm',
    '2.16.840.1.101.2.1.1.19' => 'mosaicUpdatedSigAlgorithm',
    '2.16.840.1.101.2.1.1.2' => 'mosaicSignatureAlgorithm',
    '2.16.840.1.101.2.1.1.20' => 'mosaicKMandUpdSigAlgorithms',
    '2.16.840.1.101.2.1.1.21' => 'mosaicUpdatedIntegAlgorithm',
    '2.16.840.1.101.2.1.1.22' => 'mosaicKeyEncryptionAlgorithm',
    '2.16.840.1.101.2.1.1.3' => 'sdnsConfidentialityAlgorithm',
    '2.16.840.1.101.2.1.1.4' => 'mosaicConfidentialityAlgorithm',
    '2.16.840.1.101.2.1.1.5' => 'sdnsIntegrityAlgorithm',
    '2.16.840.1.101.2.1.1.6' => 'mosaicIntegrityAlgorithm',
    '2.16.840.1.101.2.1.1.7' => 'sdnsTokenProtectionAlgorithm',
    '2.16.840.1.101.2.1.1.8' => 'mosaicTokenProtectionAlgorithm',
    '2.16.840.1.101.2.1.1.9' => 'sdnsKeyManagementAlgorithm',
    '2.16.840.1.113730.1' => 'cert-extension',
    '2.16.840.1.113730.1.1' => 'netscape-cert-type',
    '2.16.840.1.113730.1.10' => 'EntityLogo',
    '2.16.840.1.113730.1.11' => 'UserPicture',
    '2.16.840.1.113730.1.12' => 'netscape-ssl-server-name',
    '2.16.840.1.113730.1.13' => 'netscape-comment',
    '2.16.840.1.113730.1.2' => 'netscape-base-url',
    '2.16.840.1.113730.1.3' => 'netscape-revocation-url',
    '2.16.840.1.113730.1.4' => 'netscape-ca-revocation-url',
    '2.16.840.1.113730.1.7' => 'netscape-cert-renewal-url',
    '2.16.840.1.113730.1.8' => 'netscape-ca-policy-url',
    '2.16.840.1.113730.1.9' => 'HomePage-url',
    '2.16.840.1.113730.2' => 'data-type',
    '2.16.840.1.113730.2.1' => 'GIF',
    '2.16.840.1.113730.2.2' => 'JPEG',
    '2.16.840.1.113730.2.3' => 'URL',
    '2.16.840.1.113730.2.4' => 'HTML',
    '2.16.840.1.113730.2.5' => 'netscape-cert-sequence',
    '2.16.840.1.113730.2.6' => 'netscape-cert-url',

A: There does seem to be a web resource which collates it form as many registering authorities as possible.
This is:-   http://www.oid-info.com
From their webpage:

The OID Resolution System (ORS) was developed from 2004 onwards, and allows an application to obtain (online) application-specific information related to any node identified by an OID.
The ORS enables any one of the OID nodes to be mapped into DNS name zone files, and information about it can be obtained by a DNS look-up for further application processing. The system was initially designed to support RFID tag activity, but also has applications in many other application areas.


text:
Q: $\left(\frac{\sin(\frac{n\theta}{2})}{\sin(\frac{\theta}{2})}\right)^2=\left|\sum_{k=1}^{|n|}e^{ik\theta}\right|^2$ I'm having trouble proving $$\left(\frac{\sin(\frac{n\theta}{2})}{\sin(\frac{\theta}{2})}\right)^2=\left|\sum_{k=1}^{|n|}e^{ik\theta}\right|^2$$ where $n\in\mathbb{Z}$ and $\theta\in\mathbb{R}$. Can anyone suggest a hint?

A: Using Euler's Formula , $e^{ix}= \cos x+i\sin x$
So, $e^{-ix}= \cos(-x)+i\sin (-x)=\cos x-i\sin x\implies 2i\sin x=e^{ix}-e^{-ix}$
$$\text{ If }n>0,\sum_{k=1}^{|n|}e^{ik\theta}= \sum_{k=1}^n e^{ik\theta}=e^{i\theta}\left( \frac{e^{in\theta}-1}{e^{i\theta}-1}\right)$$
$$=\frac{e^{in\frac\theta2}}{e^{i\frac\theta2}}\frac{(e^{in\frac\theta2}-e^{-in\frac\theta2})}{(e^{i\frac\theta2}-e^{-i\frac\theta2})}$$
$$=e^{i\frac{(n-1)\theta}2}\frac{2i\sin \frac{n\theta}2}{2i\sin \frac{\theta}2}$$
$$=\left(\cos \frac{(n-1)\theta}2+i\sin \frac{(n-1)\theta}2\right) \frac{\sin \frac{n\theta}2}{\sin \frac{\theta}2}$$
Taking modulus  $$\left|\sum_{k=1}^{|n|}e^{ik\theta}\right|$$
$$=\left|\left(\cos \frac{(n-1)\theta}2+i\sin \frac{(n-1)\theta}2\right) \frac{\sin \frac{n\theta}2}{\sin \frac{\theta}2}\right|$$
$$=\left| \cos \frac{(n-1)\theta}2+i\sin \frac{(n-1)\theta}2 \right|\left|\frac{\sin \frac{n\theta}2}{\sin \frac{\theta}2}\right|$$
$$=\left|\frac{\sin \frac{n\theta}2}{\sin \frac{\theta}2}\right|$$
Similarly, for $n<0$

A: Try this-
We know the Euler's Formula-$e^{ix} = \cos x + i\sin x \ $-http://en.wikipedia.org/wiki/Euler%27s_formula.
Link this to summation of sines in as arithmetic progression. Try Proving this!
From wiki:-
Sum of sines and cosines with arguments in arithmetic progression:if $\alpha\ne0$, then
\begin{align} & \sin{\varphi} + \sin{(\varphi + \alpha)} + \sin{(\varphi + 2\alpha)} + \cdots {} \\[8pt] & {} \qquad\qquad \cdots + \sin{(\varphi + n\alpha)} = \frac{\sin{\left(\frac{(n+1) \alpha}{2}\right)} \cdot \sin{(\varphi + \frac{n \alpha}{2})}}{\sin{\frac{\alpha}{2}}} \quad\hbox{and}\\[10pt] & \cos{\varphi} + \cos{(\varphi + \alpha)} + \cos{(\varphi + 2\alpha)} + \cdots {} \\[8pt] & {} \qquad\qquad \cdots + \cos{(\varphi + n\alpha)} = \frac{\sin{\left(\frac{(n+1) \alpha}{2}\right)} \cdot \cos{(\varphi + \frac{n \alpha}{2})}}{\sin{\frac{\alpha}{2}}}. \end{align}

A: Using the sum of sines and cosines with arguments in arithmetic progression as given above: if $\theta\ne0$ and let $\varphi =0$, then we have,
\begin{align} &S =\sin{(\theta)} + \sin{(2\theta)} + \cdots + \sin{(n\theta)} = \frac{\sin{\left(\frac{(n+1) \theta}{2}\right)} \cdot \sin{(\frac{n \theta}{2})}}{\sin{\frac{\theta}{2}}} \quad\hbox{and}\\[10pt] &C =\cos{(\theta)} + \cos{(2\theta)} + \cdots+ \cos{(n\theta)} = \frac{\cos{\left(\frac{(n+1) \theta}{2}\right)} \cdot \sin{(\frac{n \theta}{2})}}{\sin{\frac{\theta}{2}}}. \end{align}
From Euler's Formula and the definition of absolute value of a complex number, we can write $$\left|\sum_{k=1}^{|n|}e^{ik\theta}\right|^2 = C^2 + S^2$$
$$= \frac{\sin{\left(\frac{n \theta}{2}\right)}^2}{\sin{\frac{\theta}{2}}^2}\cdot\left(\cos{(\frac{(n+1) \theta}{2})}^2 + \sin{(\frac{(n+1) \theta}{2})}^2\right)$$
$$ = \left(\frac{\sin{\frac{n \theta}{2}}}{\sin{\frac{\theta}{2}}}\right)^2$$

A: In order to proof
$$\sum_{k=1}^{n}{\sin \left(\varphi + k\alpha \right)}=\frac{\sin\left(\frac{\left(n+1\right)\alpha}{2}\right)\cdot\sin\left(\varphi+\frac{n\alpha}{2}\right)}{\sin \frac{\alpha}{2}}$$
observe
$$\sin \frac{\alpha}{2}\cdot \sin \left(\varphi + k\alpha\right)=\frac{1}{2}\left[\cos \left(\varphi + k\alpha - \frac{\alpha}{2}\right)-\cos \left(\varphi+k\alpha+\frac{\alpha}{2}\right)\right]$$
because $\sin u \cdot \sin v = \frac{1}{2}\left[\cos \left(u-v\right) - \cos \left(u + v\right)\right]$.
Then $\sin \frac{\alpha}{2}\cdot\sum_{k=1}^{n}{\sin \left(\varphi + k\alpha \right)}$ is a telescopic series:
$$\sin \frac{\alpha}{2}\cdot\sum_{k=1}^{n}{\sin \left(\varphi + k\alpha \right)} = \frac{1}{2}\left[\cos \left(\varphi + \frac{\alpha}{2}\right)-\cos \left(\varphi + n\alpha +\frac{\alpha}{2}\right)\right].$$
And use $\sin u \cdot \sin v = \frac{1}{2}\left[\cos \left(u-v\right) - \cos \left(u + v\right)\right]$ again in order to reduce the last expresion.
Also, for the identity
$$\sum_{k=1}^{n}{\cos \left(\varphi + k\alpha \right)}=\frac{\sin\left(\frac{\left(n+1\right)\alpha}{2}\right)\cdot\cos\left(\varphi+\frac{n\alpha}{2}\right)}{\sin \frac{\alpha}{2}}$$
we can use the identity $\cos u \sin v =\frac{1}{2}\left[\sin \left(u+v\right)-\sin \left(u-v\right)\right]$:
$$\cos \left(\varphi + k\alpha\right)\cdot \sin \frac{\alpha}{2}=\frac{1}{2}\left[\sin \left(\varphi + k\alpha + \frac{\alpha}{2}\right) - \sin \left(\varphi + k\alpha - \frac{\alpha}{2}\right)\right].$$
And so on.

redpajama_set_name: RedPajamaStackExchange


text:
Q: how do i automatically click the link when page loads in rails In controller
if params[:name]==params[:name]
  @categories=Category.where(:hotel_id=>params[:hotel_id])
  @menus=Menu.where(:category_id=> params[:id]).sorted
  @cart = current_cart
end

In index page:
<%@categories.each do |d|%>
<%= link_to d.name ,{:action=>'index',:id=>d.id,:hotel_id=>d.hotel_id},class: "btn-orange" %>
<%end%>

I am getting all the categories and it's respected menu items from database. how do i automatically click the first category link when page loads.

A: To answer your question bluntly, you'll have to use JQuery to invoke the click event:
#app/assets/javascripts/application.js
var loaded = function(){
   $("a.first_link").trigger("click");
};
$(document).on("page:load ready", loaded);

--
Structure
Needless to say, this does not mean you'll be making a robust, efficient system. Instead, it means you'll be calling an event which you shouldn't need to.
As mentioned in the comments, it looks like your controller is the place where this type of business logic should occur:
#config/routes.rb
resources :hotels do
   resources :categories
end

#app/models/hotel.rb
class Hotel < ActiveRecord::Base
   has_many :categories
end

#app/models/category.rb
class Category < ActiveRecord::Base
   has_many :menus
end

#app/controllers/categories_controller.rb
class CategoriesController < ApplicationController
   before_action :set_cart

   def index
      @hotel =      Hotel.find params[:hotel_id]
      @categories = @hotel.categories
      @menus =      @categories.find(params[:id]).menus.sorted
   end

   private

   def set_cart
      @cart = current_cart
   end
end

A: You can use trigger to call action on jquery, as the following:
$(documnet).on("page:load ready", function(){
  $("a.first_link").trigger("click");
})

You can read more trigger, and load page event.

A: use each_with_index to get/detect the first element(this is what you want) and then click it using jquery
view file
<%@categories.each_with_index do |d,index|%>

<%= link_to d.name ,{:action=>'index',:id=>d.id,:hotel_id=>d.hotel_id},id:first_"#{index}",class: "btn-orange" %>

<%end%>

====================js code to click when page is ready============

$(document).ready(function(){

setTimeout(function() {
   //click after 2 seconds when page loads or remove it or use=> $('#first_0').trigger('click'); directly without setTimeout in document.ready()
   $("#first_0").click();
}, 2000);

})//document ends


text:
Q: CI/CD tests involving pyspark - JAVA_HOME is not set I am working on a project which uses pyspark, and would like to set up automated tests.
Here's what my .gitlab-ci.yml file looks like:
image: "myimage:latest"

stages:
  - Tests

pytest:
  stage: Tests
  script:
  - pytest tests/.

I built the docker image myimage using a Dockerfile such as the following (see this excellent answer):
FROM python:3.7
RUN  python --version

# Create app directory
WORKDIR /app

# copy requirements.txt
COPY local-src/requirements.txt ./

# Install app dependencies
RUN pip install -r requirements.txt

# Bundle app source
COPY src /app

However, when I run this, the gitlab CI job errors with the following:
/usr/local/lib/python3.7/site-packages/pyspark/java_gateway.py:95: in launch_gateway
    raise Exception("Java gateway process exited before sending the driver its port number")
E   Exception: Java gateway process exited before sending the driver its port number
------------------------------- Captured stderr --------------------------------
JAVA_HOME is not set

I understand that pyspark requires me to have JAVA8 or higher installed on my computer. I have this set up alright locally, but...what about during the CI process? How can I install Java so it works?
I have tried adding
RUN sudo add-apt-repository ppa:webupd8team/java
RUN sudo apt-get update
RUN apt-get install oracle-java8-installer

to the Dockerfile which created the image, but got the error
/bin/sh: 1: sudo: not found

.
How can I modify the Dockerfile so that tests using pyspark will work?

A: Solution that worked for me: add
RUN apt-get update
RUN apt-get install default-jdk -y

before
RUN pip install -r requirements.txt

It then all worked as expected with no further modifications needed!
EDIT
To make this work, I've had to update my base image to python:3.7-stretch

A: Write in your .bash_profile:
export JAVA_HOME=(the home directory in your jdk i.e. /Library/Java/JavaVirtualMachines/[yourjdk]/Contents/Home)


text:
Q: Interacting QFT construction on curved spacetime As far as I can tell, most of the concrete models considered in (rigorous) QFT on curved spacetime are either free or perturbative. In fact the only construction of an interacting QFT on curved spacetime that I am aware of is by Figari, Höegh-Krohn and Nappi (PDF), developed further by Barata, Jäkel and Mund, for $P(\phi)_2$ theories on de Sitter space. This work uses the Euclidean approach via a novel kind of OS reconstruction.
In generic globally hyperbolic spacetimes, Euclidean methods no longer work. Given their usefulness, this is quite a blow to the constructive programme and I assume some new ideas will be needed. (There's a very interesting article about the unitary (un)implementability of dynamics for QFT on curved spacetime that indicates how some very basic concepts seem to break down for such theories.) There is some recent AQFT work on constructing the C*-algebras of interacting fields, I am also vaguely aware that Wald and Hollands suggested using OPEs, but it is not clear to me how successful these ideas have been or will be in producing actual models.
My question then is for those more in the know: are there at present any ideas in the community for constructing say $\phi^4$ theory on a general globally hyperbolic $2D$ spacetime, i.e. when Euclidean methods break down (besides the C* and OPE frameworks already mentioned)?
EDIT: Here is a reason to expect such a thing to be possible at least sometimes. The main problems in constructive QFT come from controlling the UV and IR behaviour of the theory. On the one hand, the UV behaviour of a theory on curved spacetime should really be very similar to flat spacetime since every space looks locally flat at small scales (perhaps if we forget about singularities for the moment), while we could try to sidestep the IR problems by working on spacetimes with compact Cauchy slices (this isn't completely general, but it's a start). On the other hand, the historically first constructions of $\phi^4$ on Minkowski space by Glimm and Jaffe proceeded directly in real time without Euclidean methods (see e.g. Summers' review). Of course Minkowski space does have a lot of symmetry, so I don't really know what to make of this argument.

A: Not a real answer, I'll be linking to non-rigorous discussion, but I hope it helps since it provides a discussion of the IR behavior of interacting theories.
The closest I know to your query is "Massless Thirring model in curved space: Thermal states and conformal anomaly", by Birrel and Davies back in 1978 (DOI: 10.1103/PhysRevD.18.4408). This paper discusses an interacting theory in 2D spacetime. However, it is a very particular theory, namely Massless Thirring Model. This model is a four-fermion interaction. Interestingly, the massless case is exactly solvable via Bethe Ansatz, and since 2D spacetime is conformally flat, you also have the exact solution for general 2D spacetime. With this in mind, the authors set up to show that for 2D Schwarzschild the interaction does not affect the thermal nature of the state. This was in the context of the recent discovery of Hawking radiation and trying to see whether interactions would alter the conclusions, which they show at least in this case it does not. For your purposes, it would indicate that the IR sector is tameable in 2D at least.
The other paper, more distant from what you seek, is "Interacting Quantum Fields Around a Black Hole", by, yes, Stephen Hawking in 1981 (DOI: 10.1007/BF01208279). In this paper, he studies $\lambda \phi^4$ theories only in Schwarzschild spacetime (4D, though given the actual spacetime I don't think this is an issue). The other issue is that because of the symmetries Hawking uses Euclidean methods. Now, this is far off from what you seek, but the reason I include it here is because of the discussion. You see, $\lambda \phi^4$ theories are known to exhibit phase transition in finite temperature flat spacetime. Hawking thus asks whether one could use the Hawking temperature to induce a phase transition in such a theory in the region close to the event horizon, where the temperature gets arbitrarily high. While he cannot provide a definite answer, his calculations suggest that in fact, you cannot. As of today, I know of no one who has provided a concrete solution here, but if Hawking is correct that would suggest that there are important differences between the flat thermal state and the Schwarzschild one, and an example of interesting behavior in the IR sector for interacting theories in curved spacetimes.


text:
Q: Help me to Improve my method of creating a diagonal matrix? Based on a past exam question:
Q:Consider the matrix
$$A = \pmatrix{5&-6&0\\4&-5&0\\-1&1&2}$$
with entries from $\mathbb{C}$. Find a diagonal matrix $D$ and an invertible matrix $P$ such that $P^{−1}AP = D$.

A: My attempt was as follows
Using the characteristic polynomial $\chi_A(\lambda)= 0$. I found the eigenvalues to be $\lambda= 2, -1, 1$. All of multiplicity = $1$.
Next use the formula $(\lambda I_n - A)$ and find the basis of the $U_\lambda$ eigenspace for each $\lambda= 2, -1, 1$.
This is done by performing the calculation $(\lambda I_n - A) = A'$, reducing A' by elemenry row operations, and then finding a vector $U=(u_1,u_2,u_3)$ such that using the $A'*U=0$.
I found this to be:
"the basis of $U_2$ is $\left\lbrace \pmatrix{0\\0\\1} \right\rbrace$"
"the basis of $U_{-1} is \left\lbrace \pmatrix{0\\0\\0} \right\rbrace$"
"the basis of $U_{1} is \left\lbrace \pmatrix{-1/2\\1/2\\1} \right\rbrace$"
Since unless stated otherwise, we are working with the standard basis, hence the transition matrix is
$$P = \pmatrix{0&0&1\\0&0&0\\-1/2&1/2&1}$$
$P^-1$ can be found by the forumal $${1/det(P)} * Cof(P)^T$$
Where the $det(P)$ = the determinant of $p$, and $cof(P)^T$ is the transpose of the cofactor matrix
However I found the $det(P)=0$ meaning by the formula, $0=D$, and the diagonal matrix does not exist?

I assume my method to find Eigenvectors are at fault, I ask for advise on how to properly find the basis of the eigenspaces or the eigenvectors, and what the true answer is.

A: the eigenvector is never (0,0,0)...
$U_{-1}\cdots\\
(A-(-1)I)U_{-1} =0\\ \begin{bmatrix}6&-6&0\\4&-4&0\\-1&1&3\end{bmatrix}U_{-1}=0\\
$
$U_{-1}=\begin{bmatrix}1\\1\\0\end{bmatrix}$
$U_1\cdots\\
(A-I)U_1 =0\\ \begin{bmatrix}4&-6&0\\4&-6&0\\-1&1&1\end{bmatrix}U_1=0\\
$
$U_1=\begin{bmatrix}3\\2\\1\end{bmatrix}$

A: Check your working, it is very easy to make a mistake with diagonal matrices, you never have a zero eigenvector


text:
Q: Interface With Class Enums Is there a way to interface with or inherit the enum of another class? Obviously I can move the enum outside of the class, but I am curious if a reference can be made:
public class deferment
{
    public enum test
    {
        test = 0,
        live
    }
}
public class defermentLog
{
    public enum test1 : deferment:test //this is where I want to reference
    {
    }
    public test1 action()
    {
        return test1.live;
    }
}

A: In that case, yes, you can.
namespace ConsoleTests
{
    using TestAlias = Class1.test;

    public class Class1
    {
        public enum test
        {
            test,
            live
        }
    }

    public class Class2
    {
        public void x()
        {
            TestAlias t = TestAlias.live;
        }
    }
}

Its called a type alias, and its defined like this: using TestAlias= Class1.test;
It should be noted though that you have to define that alias in the file that you use it and it does not copy over to other files, so you have to define it in every one you use it.


text:
Q: How can I call a module in a Perl one-liner? Say I have a data file that I want to process; I want to take the maximum value of each of the column and append it to the end of each line.
INPUT:
T1 T2 T3
35.82 34.67 31.68
32.20 34.52 33.59
37.41 38.64 37.56

OUTPUT:
T1 T2 T3
35.82 34.67 31.68 35.82
32.20 34.52 33.59 34.52
37.41 38.64 37.56 38.64

I'm trying to implement this as a one-liner. So far, this is what I've come up with, although it complains that  &main::max is undefined:
perl -MList::Util -ani.bak -e "print qq(@F).q( ).max(@F).qq(\n)" file1.txt

It seems that I haven't loaded the List::Util module. What's wrong? And is the header column an issue?
perlrun doesn't have a decent example on how to do this (actually it does, my documentation was a little hard to read).

A: perl -M"List::Util 'max'" -ani.bak -e "print qq(@F).q( ).max(@F).qq(\n)" file1.txt

A: You loaded List::Util, but the module doesn't export symbols by default. Skip the header line by checking whether $. is 1.
$ perl -MList::Util=max -ape 's/$/" " . max(@F)/e unless $.==1' input
T1 T2 T3
35.82 34.67 31.68 35.82
32.20 34.52 33.59 34.52
37.41 38.64 37.56 38.64
The perlrun documentation explains:

A little builtin syntactic sugar means you can also say -mmodule=foo,bar or -Mmodule=foo,bar as a shortcut for -Mmodule qw(foo bar). This avoids the need to use quotes when importing symbols. The actual code generated by -Mmodule=foo,bar is use module split(/,/,q{foo,bar}). Note that the = form removes the distinction between -m and -M.

A: List::Util was loaded, but it doesn't export the max function by default:
perl -MList::Util -ani.bak -e "print qq(@F).q( ).List::Util::max(@F).qq(\n)" file1.txt

A: if Perl is not a must, here's an awk one-liner
$ awk '{for(i=1;i<=NF;i++)if($i>t){t=$i};print $0,t;t=0}' file
35.82 34.67 31.68 35.82
32.20 34.52 33.59 34.52
37.41 38.64 37.56 38.64


text:
Q: Troubles with admob mediators I'm having some troubles with monetization of my Android apps, The question is I can"t understand how to use the mediation service :(
I'm trying to make a video rewards thing, right, I saw this video https://www.youtube.com/watch?v=TIiY1VIIQwg of admob garage, and it said that first step is set up mediated networks, then I had to watch this another video that should taught how https://www.youtube.com/watch?v=sFew8Squ4pE, but the example use a fake network, and now I'm really lost.
I wanna to use 2 of this mediators, the Chartboost and Unity Ads, when I click to add any in admob, the Unity Ads for example, the admob show me this , So my first and silly question is I have to have a account in each network that I wanna to use in order to create this API Key? for example, in this case I had to have a Unity Ads account and a Chartboost account? And another thing, my app is not a game, so what I have to put in Game ID? Done all that and then? I mean how I'll receive? by admob or separatelly by each network account?
Please anyone can help me?
Note - I wanna continue to using the admob for now, I don't want to change for other, the Appodeal for example.

A: I'm the guy in the videos you linked. Let me see if I can answer your questions.

I have to have a account in each network that I wanna to use in order to create this API Key? for example, in this case I had to have a Unity Ads account and a Chartboost account?

Yes. In order to use AdMob mediation to show ads from Unity and Chartboost, you need to have an account with both Unity and Chartboost, just like you would if you were using their SDKs directly. Mediation uses the same Unity and Chartboost SDKs that people use normally, and they require you to have an account with those networks, with valid game IDs, placement IDs, and so on.

And another thing, my app is not a game, so what I have to put in Game ID?

"Game ID" is a term Unity uses, since most of their apps are games. It identifies the app that's making the ad requests. I believe you can use Unity ads with non-game apps, but you'd need to check with them.

Done all that and then? I mean how I'll receive? by admob or separatelly by each network account?

You'd get checks from each individual network. AdMob mediation manages how and when ads are requested from each network by your app, but it doesn't affect how money is transferred or collected. You'd still be paid by each network for the ads you showed from that network.
BTW, last week AdMob launched its own rewarded video ads, which means you can now get rewarded video ads directly from AdMob, with no mediation required. So you're welcome to start with that, and add mediation later as you go.


text:
Q: Variable is set but prints out nil I am setting a variable in another viewcontroller and it is working inside didSet but in viewdidload it prints out nil
ViewController 1
    let methodView = MethodViewController()
    methodView.items = itemsSelected
    presentDetail(newVC)

ViewController 2
class MethodViewController: UIViewController {

    var items: [[String: Any]]? {
        didSet {
           print(items) // PRINTS OUT ITEMS NORMALLY
        }
    }

    override func viewDidLoad() {
        super.viewDidLoad()

        print(items) // PRINTS OUT NIL
    }
}

A: it is returning nil because you are setting the items by using one instance and when you present the screen and display your methodViewController. then you pass a new instance for same. instead set the items by using the same instance which you are using to present your controller
override func viewDidLoad() {
    super.viewDidLoad()

// Do any additional setup after loading the view.

let methodView = StackProgramViewController() //instance 1 //your case methodView
methodView.items = itemsSelected //value is set and printed

}

@IBAction func present(_ sender: Any) {

let newVc = self.storyboard?.instantiateViewController(withIdentifier: "stack") as! StackProgramViewController //instance 2 while presenting //your case newVc

newVc.items = itemsSelected //set value here with second instance nstaead of creating methodView
present(newVc, animated: true, completion: nil)

}

hope it helps

A: Why not use an initializer method on your class, and then pass it explicitly to the present method like so:
MethodViewController
class MethodViewController: UIViewController {

    var items: [[String: Any]]?

    init(withItems items:[[String: Any]]?) {
        self.items = items
        super.init(nibName: "MethodViewController", bundle: nil)
    }

    required init?(coder aDecoder: NSCoder) {
        super.init(coder: aDecoder)
    }

    override func viewDidLoad() {
        super.viewDidLoad()
        print(items);
    }
}

Previous View Controller
class ViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
    }

    override func viewDidAppear(_ animated: Bool) {
        super.viewDidAppear(animated)
        let items = [["Stack":"Overflow"]]
        let methodView = MethodViewController(withItems: items)
        self.present(methodView, animated: true, completion: nil)
    }
}

I have tested it and it will print out the items passed, also note the require init() method which the compiler forces you to have. You will also need to specify the bundle and nibName depending on how you set up your views.
I should note this approach is if you aren't trying to load from the storyboard, but rather from a separate .xib file with the same name.


text:
Q: Access a view from another Cocoa application Is it possible to access a view element from another application in OS X? For example there are two apps and one has an NSTextView. It is technically possible that the second app can read the text from the first app's text view?
A similar case in Windows when you call GetWindowTextA() for a window which is not in your application.

A: It's not possible (with public APIs).
You might have a remote chance controlling another app using accessibility, but no such thing as directly accessing the NSTextField of another app in another process.

A: You could try and bind the textView's value to the NSUserDefaults standard defaults in app 1.
And in app 2, read the entry.  Have a look at Preferences Utilities Reference in how to read another apps preference.
Here is a quick example that gets the download path from Safari.
    #import "AppDelegate.h"
     CFStringRef  theValue;
    @implementation AppDelegate

    - (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{

    //-- THE PREFERENCE FOR ANOTHER APP
    CFStringRef appID =CFSTR("com.apple.Safari");

      //-- THE PREFERENCE KEY FOR ANOTHER APP:| GETS THE DOWNLOAD FOLDER PATH
    CFStringRef theKey  = CFSTR("DownloadsPath");

    Boolean didSynch;

    //-- TRY AND MAKE SURE THE OTHER APP SYNCHRONISES ITS PREFENCES;
    //--Writes to permanent storage all pending changes to the preference data for the application, and reads the latest preference data from permanent storage
    didSynch = CFPreferencesAppSynchronize (
                                         appID
                                         );
    if (didSynch) {
        //-- CALL METHOD TO READ THE PREFERENCE KEY VALUE
        [self readPrefValue :theKey : appID];

        NSLog(@"theValue %@",theValue);
    }

    CFRelease(theValue);
    CFRelease(appID);
    CFRelease(theKey);
}

    - (void)readPrefValue :(CFStringRef) Key : (CFStringRef) appID
    {
       theValue = CFPreferencesCopyValue (
                                           Key,
                                           appID,
                                           kCFPreferencesCurrentUser,
                                           kCFPreferencesAnyHost
                                           );
    }

    @end


text:
Q: Log disk clean up VBScript So i have a little script that runs a disk clean up, but i want to log this. Is it possible via f.writeline or something? I already tryed to add some write lines but that didnt work, so i removed these..
Option Explicit
On Error Resume Next

SetRegKeys
DoCleanup

Sub DoCleanup()
Dim WshShell
Set WshShell=CreateObject("WScript.Shell")
WshShell.Run "C:\WINDOWS\SYSTEM32\cleanmgr /sagerun:1"
End Sub

Sub SetRegKeys
Dim strKeyPath
Dim strComputer
Dim objReg
Dim arrSubKeys
Dim SubKey
Dim strValueName
Dim fso
Const HKLM=&H80000002

strKeyPath="SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches"
strComputer="."
strValueName="StateFlags0001"

Set objReg=GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv")
objReg.Enumkey HKLM ,strKeyPath,arrSubKeys

For Each SubKey In arrSubKeys

objReg.SetDWORDValue HKLM,strKeyPath & "\" & SubKey,strValueName,2

Next

End Sub

Thanks!

A: I have a standard subroutine that I use to log to an output file (path "logfileName" specified at the top of the script) that also appends the time on each line:
Sub Logwrite (aMsg)
   Dim a
   Const ForAppending = 8

   ' This Appends a line of text to a Logwrite file
   ' creating it if required
   If Len(aMsg) = 0 Then
      If fso.FileExists(logfileName) Then fso.DeleteFile(logfileName)
      Exit Sub
   End If

   Set a = fso.OpenTextFile(logfileName, ForAppending, TRUE, 0)
   a.WriteLine(Now() & " -- " & aMsg)
   a.Close
   Set a = Nothing

End Sub

For example, you can call the subroutine in the For Each loop, and you can specify the message that gets logged:
For Each SubKey In arrSubKeys

   objReg.SetDWORDValue HKLM,strKeyPath & "\" & SubKey,strValueName,2
   Logwrite "Set value for " & strKeyPath & "\" & SubKey & " to " & strValueName

Next

Note that if I want to erase the previous file if it exists, then I will first call the subroutine at the top of the script with a blank message to log -- Logwrite "" -- which tells it to delete the previous log file.
Hope this helps!


text:
Q: Would regex be a good choice to parse SMTP received lines I want to parse elements of RFC822 (SMTP) "Received" lines, which are defined formally in the spec, e.g.:

atom        =  1*

[...]

received    =  "Received"    ":"            ; one per relay
                       ["from" domain]           ; sending host
                       ["by"   domain]           ; receiving host
                       ["via"  atom]             ; physical path
                      *("with" atom)             ; link/mail protocol
                       ["id"   msg-id]           ; receiver msg id
                       ["for"  addr-spec]        ; initial form
                       ";"    date-time         ; time received

[...]

msg-id      =  ""            ; Unique message id

[...]

addr-spec   =  local-part "@" domain        ; global address

etc. for domain, date-time, etc.

Here's a real example:
Received: from ll-194.132.162.89.kv.sovam.net.ua (ll-194.132.162.89.kv.sovam.net.ua [83.170.243.194] (may be forged)) by raq2073.uk2.net (8.10.2/8.10.2) with ESMTP id lASHDDE10765 for <johnsmithsvt@matts.co.uk>; Wed, 28 Nov 2007 17:13:13 GMT
Would regex be a good strategy to capture the parts of a received line?
I realize that many SMTP servers don't format received lines properly (in real life).
Otherwise, does anyone know of a library in Java that does this well?
Edit Here's a fiddle showing a regex and tests that I've banged on for a while, which seems to work.
Received:\s+(?:from\s+(.+?))?(?:\(qmail (.+?)\))?(?:\s+by\s+(.+?))?(?:\\s+via\s+(.+?))?(?:\s+with\s+(.+?))?(?:\;?\s+id\s+(.+?))?(?:\s+for\s+(.+?))?(?:;\s*(?!.*\;.*)(.+))?$

A: The choice really depends on exactly what you want to achieve.
For capturing specific parts of a Receiver-line (e.g. 'give me the From-part'), regexes are awesome.
If you need a full-fledged parser for this grammar, then regexes alone will not suffice. Especially the addr-spec has so many special cases that a regex cannot hope to handle each one correctly (explanation). Regexes are not parsers.
Last time I needed an actual parser, I wrote my own using JavaCC. I would only recommend going down that road if you know a thing or two about grammars and parsing.


text:
Q: How do I use @docRoot in JavaDoc? I am using JavaDoc comments in an Eclipse project. I have an image (png) I make a path to an  element that is in a folder in the project. The problem is that it is hard-coded: C:\FilePath\...\image.png. If another person wants to view this project on their computer it will not show that image because of the hard-coded path.
I stumbled on @docRoot but I cannot find anywhere that shows how to use it. Examples would be much appreciated. I need to make a relative path to the same location in my project so I can display that png on any computer.

A: Here is an extract from javadoc in the file Button.class of the android-sdk installation.
 * . . .   For more information and an example, see State List
 * Drawable . . .

Here @docRoot is used to compose a reference to an html tutorial.
In my case @docRoot translates to the following path:
file:/C:/Users/<username>/AppData/Local/Android/android-sdk/docs/reference/

I ended the path with '/' though in reality there seems to be a problem and the last slash is missing from @docRoot, making all those references bad paths.
If you use it make sure you add the slash after {@docRoot}. I still haven't found if it is possible to change @docRoot.

A: In Eclipse JDT 4.4.1 I had to use:
    /**
     * @see Process Test Coverage Report
     */
    public void calculateCoverageForAllTests() throws Exception {
        ...
    }

because {@docRoot} did not seem to work in the Javadoc view and hovers:
    /**
     * @see Process Test Coverage Report
     */

and produced the following error :

Unable to load page
Problem occurred while loading the URL
  file:///home-falko/camunda/eclipse-workspace/compensation-triggered-from-outside/src/test/java/com/camunda/demo/compensation_triggered_from_outside/{@docRoot}/target/process-test-coverage/report.html

although this should be working according to the Eclipse JDT 3.5 Release Notes


text:
Q: How can I make a page reloading in the middle of the process using PHP? Here is my code:
public function save_problem(Request $request)
{
    $doesnot_turn_on = isset($request->doesnot_turn_on) ? $request->doesnot_turn_on : "";
    $res = setcookie('guarantee_ticket', json_encode(["title"=>$request->problem_title, "description"=>$request->problem_description, "turn_on" => $doesnot_turn_on, "unique_product_id" => $request->unique_product_id]), time() + 200000, "/");
    if ( Auth::check() ){
        return $this->register_guarantee_ticket();
    } else {
        return \redirect()->route('short_register',["des" => route('register_guarantee_ticket')]);
    }
}

public function register_guarantee_ticket()
{
    $problem = json_decode($_COOKIE['guarantee_ticket']);

    .
    .

As you can see, when Auth::check() is true, then register_guarantee_ticket() will be called while still $_COOKIE['guarantee_ticket'] isn't defined and it (cookie) needs a page reloading to be defined.
How can I make that page reloading with PHP?
I know header("Location: ...") will be used for redirecting. But how can I keep the process and do also a redirect?

A: The problem is why you need reloading the page while the request is processing (that's impossible in HTTP mechanism)
So I have an idea for you to fix this (by passing cookie data to sub-function) :
public function save_problem(Request $request)
{
    $doesnot_turn_on = isset($request->doesnot_turn_on) ? $request->doesnot_turn_on : "";
    $cookie_data = ["title"=>$request->problem_title, "description"=>$request->problem_description, "turn_on" => $doesnot_turn_on, "unique_product_id" => $request->unique_product_id];
    $res = setcookie('guarantee_ticket', json_encode($cookie_data), time() + 200000, "/");
    if ( Auth::check() ){
        return $this->register_guarantee_ticket();
    } else {
        return \redirect()->route('short_register',["des" => route('register_guarantee_ticket')]);
    }
}

public function register_guarantee_ticket($cookie_data)
{
    $problem = $cookie_data; // No need this assign, but I put it here to point out you should pass cookie data directly to sub-function

    .
    .


text:
Q: Move files by folders I have

D:\folder\1.jpg,
  D:\folder\2.jpg,
  D:\folder\3.jpg
  .... so on

I need

D:\folder\1\1.jpg,
  D:\folder\2\1.jpg,
  D:\folder\3\1.jpg
  ....

This code
 FOR /R %I IN (*.jpg) DO (md %~nI; move %I %~dI%~pI%~nI\1.jpg)

create folders like D:\folder\1\1.jpg\
What I do wrong?

A: use this
FOR %I IN (*.jpg) DO (
  MD %~nI & copy %I %~nI\1.jpg & del %I)

use & for pipe the continuous command. also in move you can not rename so i just use copy

A: Your command creates folders like D:\folder\1\1.jpg\ because ; is a parameter delimiter and cannot be used for daisy-chaining commands. For the latter you have to use &.
There are several other issues with your command, too.

*

*You create the destination folder in the current working directory (md %I) but then move the file using the full path (%~dI%~pI%~nI\1.jpg). This will fail as soon as there are subfolders with .jpg files in the current working directory.

*You don't quote the variables, so the command will also fail when a path or file name contains spaces.

*Moving the files to subfolders creates an endless loop with the recursive folder traversal (for /r).

I'd suggest to run two separate loops, one for creating the destination folders and the second for moving the files:
for /r %I in (*.jpg) do @mkdir "%~dpnI"
for /r %I in (*.jpg) do @move "%~fI" "%~dpnI\1%~xI"


text:
Q: SQL query where ALL records in a join match a condition? I have what seems to be a simple problem, but can not figure out the proper solution via SQL. I'm using postgresql specifically.
Take the following:
SELECT *
FROM users INNER JOIN tags
  ON (tags.user_id = users.id)
WHERE tags.name IN ('word1', 'word2')

This does not do what I need. I want to find users whose tags are ONLY included in the list. If the user has a tag that is not in the list, the user should not be included.
'user1' tags: word1, word2, word3
'user2' tags: word1
'user3' tags: word1, word2
Given: word1 and word2. I want to prepare a query that returns 'user2' and 'user3'. 'user1' is excluded because it has a tag that is not in the list.
Hopefully I made this clear. Thanks for your help!

A: Relying on COUNT(*) = 2 will require that there can be no duplicates of user_id and name in the tags table.  If that's the case, I'd go that route.  Otherwise, this should work:
SELECT u.*
FROM users AS u
WHERE u.id NOT IN (
    SELECT DISTINCT user_id FROM tags WHERE name NOT IN ('word1', 'word2')
) AND EXISTS (SELECT user_id FROM tags WHERE user_id = u.id)

A: SELECT  user_id
FROM    users
WHERE   id IN
        (
        SELECT  user_id
        FROM    tags
        )
        AND id NOT IN
        (
        SELECT  user_id
        FROM    tags
        WHERE   name NOT IN ('word1', 'word2')
        )

or
SELECT  u.*
FROM    (
        SELECT  DISTINCT user_id
        FROM    tags
        WHERE   name IN ('word1', 'word2')
        ) t
JOIN    users u
ON      u.id = t.user_id
        AND t.user_id NOT IN
        (
        SELECT  user_id
        FROM    tags
        WHERE   name NOT IN ('word1', 'word2')
        )

A: SELECT distinct users.id
FROM users
INNER JOIN tags ON (tags.user_id = users.id)
group by users.id
having count(*) = 2
and min(tags.name) = 'word1'
and max(tags.name) = 'word2'

A: To get all users that don't have a tag that is not in the list, use the query below. Could be that users are returned that have no tag or only one tag matching the words, but I understand that is the desired functionality.
SELECT
  u.*
FROM
  users u
  LEFT JOIN tags t
    ON t.user_id = u.userid AND
       t.name NOT IN ('word1', 'word2')
WHERE
  t.user_id IS NULL

A: SELECT u.*
FROM users u
INNER JOIN (
  SELECT user_id FROM tags WHERE name IN ('word1', 'word2')
  EXCEPT
  SELECT user_id FROM tags WHERE name NOT IN ('word1', 'word2')
) s ON u.id = s.user_id


text:
Q: WAV file with QML SoundEffect audio playback is distorted My first go at using SoundEffect with QML, and I'm getting mixed results with no clear understanding of why. I can successfully use QML SoundEffect in user interface within an embedded C++ device. The thing I cannot solve is why some WAV files will play perfectly clear, and some will not.
I'm certain my code is correct...its something about how the audio is interpreted. I cannot share the WAV files I'm using...but here's what's happening:
I have two WAV files:
wav_file1_that_works.wav (which is 83kb)
and
wav_file2_that_does_not work.wav (which is 110kb)
Both of these files play just fine in VLC or Media Player or whatever. But when ran through the QML function to play as a feedback for touch on the device, the first WAV file plays just fine, while the second one does not. It does not appear to be a hardware issue as this same issue comes up exactly the same when working on virtual environment. I'm suspecting there is some limitation to using WAV audio within the QT/QML environment? But I cannot find any limits in the documentation. My only suspicion is the file size, or some other specific sound file requirement.
First I declare the sound link to the file:
SoundEffect {
        id: playSound
        source: "qrc:/wav_file2_that_does_not work.wav"
    }

Then on the UI event it's played (not the exact code, but the event certainly works like this:
MyUiItem {

        onMyUiTouched: {

            playSound.play();
        }
    }

and file 1 plays perfectly, and file 2 plays, but with a very distorted scratchy sounds.
I probably don't know enough about how WAV file encoding works, but on the surface both files seems to be encoded correctly.

A: I solved this by refactoring how the app compiles as my WAV file was getting compressed.  So unfortunately this was something I discovered that if I let my enterprise deployment system do its thing it compresses everything including all multi-media unless I apply certain parameters to not compress. And so now this works. Thanks for the help.


text:
Q: Can I have hyperlinks a different color for printing? Is it possible to print hyperlinks in the same colour as the surrounding text when printing a hard copy of a PDF?
When a PDF is printed on paper I would like the links to be the same colour as the surrounding text. Is this possible?

A: I use a compile-time switch.  That is, I have this in my file header.
\usepackage{etoolbox}
% Are printing a hard copy or not?
\newbool{hardcopybool}
  % set the default by uncommenting one or the other
  % \booltrue{hardcopybool}
  \boolfalse{hardcopybool}  % the default
% You can cause hyperlinks to be black by invoking with
%   pdflatex "\def\hardcopy{}\input{book}"
% See http://stackoverflow.com/a/1466610
\ifdefined\hardcopy
  \booltrue{hardcopybool}
\fi
\ifbool{hardcopybool}{\typeout{!!! PRINTING HARD COPY}}{}

and later I have this as part of my import of hyperref.
  \usepackage[
                colorlinks=true,
                \ifbool{hardcopybool}{linkcolor=black,citecolor=black,filecolor=black,urlcolor=black}{linkcolor=darkcolor,citecolor=darkcolor,filecolor=darkcolor,urlcolor=darkcolor}, % usual colors for online version of book is links are blue.  but for hard copy links are black

A: It's a pity the ocgcolorlinks option is fragile – that would be my ideal rather than having 2 versions of the file.
That said the solution using \ifbool{hardcopybool} can be simplified down to:
\usepackage[\ifbool{hardcopybool}{hidelinks=true}{colorlinks=true}]{hyperref}

with a minimal version of the \usepackage line. If you want to add specific colours to links, you can add those back in to the "else" part of the \ifbool.
Why hidelinks=true rather than `colorlinks=false'? Because this way you avoid ugly boxes around hyperlinks.

A: hyperref has the option ocgcolorlinks which does exactly what you want.
From hyperref's README

Experimental option ocgcolorlinks
The idea are colored links, when viewed, but printed without colors.
This new experimental option ocgcolorlinks uses Optional Content Groups, a feature introduced in PDF 1.5.

*

*The option must be given for package loading:
  \usepackage[ocgcolorlinks]{hyperref}

*Main disadvantage: Links cannot be broken across lines.
....

Beware of the fact, that, however, "Links cannot be broken across lines" with this option, so, if you need this, you'd better use colorlinks option and print in "black and white".

A: use colorlinks=false this =nocolor. colorlinks=true this=linkcolor here blue.
for example
\usepackage[colorlinks=false,linkcolor=bleu]{hyperref}

nocolor and
\usepackage[colorlinks=true,linkcolor=bleu]{hyperref}

bleu


text:
Q: JFileChooser showSaveDialog show an error message when file name is blank or empty The code works to check for non-empty/whitespace AbsolutePath, but not when the AbsolutePath is simply blank. Clicking save does nothing and the JFileChooser stays in showSaveDialog().
I want to show a JOptionPane error message when the user attempts to save the file with an empty-whitespace file name.
    try {
        JFileChooser chooser = new JFileChooser("./");
        FileNameExtensionFilter filter = new FileNameExtensionFilter("files (txt)", "txt");
        chooser.setFileFilter(filter);
        chooser.setMultiSelectionEnabled(false);
        chooser.setSelectedFile(new File(fileName));

        int value = chooser.showSaveDialog(this);
        if (value == JFileChooser.APPROVE_OPTION) {
            String filename = chooser.getSelectedFile().getAbsolutePath();
            if (chooser.getSelectedFile().getName().trim().equals("")
                    || !chooser.getSelectedFile().getName().endsWith(".txt")
                    || chooser.getSelectedFile().getName().replaceAll(".txt", "").trim().equals("")) {
                throw new IllegalArgumentException();
            }
            saveFile(filename);
        }

    } catch (IllegalArgumentException e) {
        JOptionPane.showMessageDialog(this, "Fail! File was not saved", "Error", JOptionPane.ERROR_MESSAGE);
    }

A: Clicking save does nothing and the JFileChooser stays in showSaveDialog(). as @camickr said above: this is the built in functionality of the JFileChooser and has nothing to do with your code. The file chooser doesn't close unless you enter a filename (and click Save) or use the Cancel button..


text:
Q: Laravel error on deployment: The [sqs] queue connection has not been configured I have a fairly basic laravel site. Everytime Envoyer runs and deploys the site, I get a ton (150+) errors that say this:
InvalidArgumentException [...redacted project dir...]/current/artisan queue:work sqs --tries=5
The [sqs] queue connection has not been configured.

I'm not even using SQS so I have no idea where the error is coming from. Only deployment hooks I have in Envoyer that might be related are these:

My .env looks like this with things regarding the drivers and queue and such:
BROADCAST_DRIVER=log
CACHE_DRIVER=file
QUEUE_CONNECTION=database
SESSION_DRIVER=database
SESSION_LIFETIME=120

I'm lost here. Any help would be greatly appreciated! If you need to see anything else please let me know.


text:
Q: Issues in installing yum-utils on centos 7.4.1708 My centos version is 7.1.1503. When I tried installing yum-utils using yum-install it's trying the repo http://centos.myfahim.com/centos/7.4.1708/os/x86_64/repodata/repomd.xml and other mirrors on centos version 7.4.1708 and got failed. While debugging its mentioned centos 7.4.1708 is deprecated and recommended to go with 7 instead.
Why it's trying with centos 7.4.1708 instead of 7.1 and how to fix this?

A: I got that installed by overriding the version by adding repo details in centos repo file in /etc/yum.repos.d under extras
[extras7]
name=New url for centos 7
baseurl=http://mirror.centos.org/centos/7/extras/x86_64/
enabled=1


text:
Q: Run Multiple test classes using testNG.xml with different priority I am trying to run multiple test classes using testNG .xml file
Class A
'''
@Test( priority = 1 )
public void testA1() {
    System.out.println("testA1");
}

@Test( priority = 2 )
public void testA2() {
    System.out.println("testA2");
}

@Test( priority = 3 )
public void testA3() {
    System.out.println("testA3");
}

Class B
'''
@Test( priority = 1 )
public void testA1() {
    System.out.println("testA1");
}

@Test( priority = 2 )
public void testA2() {
    System.out.println("testA2");
}

@Test( priority = 3 )
public void testA3() {
    System.out.println("testA3");
}

Output :
It should execute Class A with test set priority 1, 2 and 3
Then It should execute Class B with the same Priority 1, 2 and 3
TestNG.XML
'''
<suite name="REGRESSION_TEST_SET" thread-count="1" parallel="tests" >
    <test  name="AUTOMATION" group-by-instances="true">

        <classes>

            <class name="ClassA" />
            <class name="ClassB" />

        </classes>

    </test>

</suite>

A: For running all test method of one class first and then for the other classes, testng.xml file structure needs to be changed. You need to specify test method from each class in the order of their execution.

Without this change, xml file will run as per priority ex testA1() and then testB1().

Please find the xml file required to achieve tests class wise :

<suite name="REGRESSION_TEST_SET" thread-count="1" parallel="tests" >
<test  name="AUTOMATION" group-by-instances="true">
 <classes>
        <class name="ClassA" />
          <methods>
                <include name="testA1"/>
                <include name="testA2"/>
                <include name="testA3"/>
          </methods>
       </class>

        <class name="ClassB" />
          <methods>
                <include name="testB1"/>
                <include name="testB2"/>
                <include name="testB3"/>
          </methods>
       </class>
    </classes>
</test>


text:
Q: Internet Explorer restricted this web page from running scripts or ActiveX controls pop up window This pop up window appearing in SharePoint Online intranet page: Internet Explorer restricted this web page from running scripts or ActiveX controls.
It is affecting almost for more than 5000 users. I know, how I can configure it to my computer from IE Options->Tools->Advanced->Security and then check for Allow active content to run in files on My Computer. But this is applying only for my computer. How can I enable it for all users? Is there any possible solution?

A: To apply IE settings for all users you need to ask your system administrator to create/modify the domain policy to Allow active content to run in files
BTW, I think it isn't a SharePoint question!!