max_stars_count
int64
301
224k
text
stringlengths
6
1.05M
token_count
int64
3
727k
14,668
// Copyright 2021 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/ui/app_list/search/ranking/burn_in_ranker.h" namespace app_list { void BurnInRanker::UpdateResultRanks(ResultsMap& results, ProviderType provider) { // TODO(crbug.com/1279686): Implement. } } // namespace app_list
165
764
{"symbol": "ATT","address": "0x89Fb927240750c1B15d4743cd58440fc5f14A11C","overview":{"en": "ATT is a Decentralized Information Communication Protocol based on Blockchain Technology."},"email": "<EMAIL>","website": "https://www.attnetwork.org/","state": "NORMAL","links": {"blog": "","twitter": "https://twitter.com/AChainGalaxy","telegram": "https://t.me/AchainGalaxyOfficial","github": "https://github.com/attnetwork/att_server"}}
141
462
<gh_stars>100-1000 # -*- test-case-name: txdav.base.propertystore.test.test_xattr -*- ## # Copyright (c) 2010-2017 Apple Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. ## """ Property store using filesystem extended attributes. """ from __future__ import absolute_import __all__ = [ "PropertyStore", ] import sys import errno import urllib from zlib import compress, decompress, error as ZlibError from cPickle import UnpicklingError, loads as unpickle from xattr import xattr from twisted.python.reflect import namedAny from txdav.xml.base import encodeXMLName from txdav.xml.parser import WebDAVDocument from txdav.base.propertystore.base import AbstractPropertyStore, PropertyName, \ validKey from txdav.idav import PropertyStoreError # # RFC 2518 Section 12.13.1 says that removal of non-existing property is not an # error. python-xattr on Linux fails with ENODATA in this case. On OS X, the # xattr library fails with ENOATTR, which some versions of CPython do not # expose. Its value is 93. # if sys.platform == "darwin" or sys.platform[:7] == "freebsd": _ERRNO_NO_ATTR = getattr(errno, "ENOATTR", 93) else: _ERRNO_NO_ATTR = errno.ENODATA class PropertyStore(AbstractPropertyStore): """ Property store using filesystem extended attributes. This implementation uses <NAME>'s xattr package, available from:: http://undefined.org/python/#xattr """ # Mimic old xattr-prefix behavior by importing it directly. deadPropertyXattrPrefix = namedAny( "txweb2.dav.xattrprops.xattrPropertyStore.deadPropertyXattrPrefix" ) # There is a 127 character limit for xattr keys so we need to # compress/expand overly long namespaces to help stay under that limit now # that GUIDs are also encoded in the keys. _namespaceCompress = { "urn:ietf:params:xml:ns:caldav": "CALDAV:", "urn:ietf:params:xml:ns:carddav": "CARDDAV:", "http://calendarserver.org/ns/": "CS:", "http://cal.me.com/_namespace/": "ME:", "http://twistedmatrix.com/xml_namespace/dav/": "TD:", "http://twistedmatrix.com/xml_namespace/dav/private/": "TDP:", } _namespaceExpand = dict( [(v, k) for k, v in _namespaceCompress.iteritems()] ) def __init__(self, defaultuser, pathFactory): """ Initialize a L{PropertyStore}. @param pathFactory: a 0-arg callable that returns the L{CachingFilePath} to set extended attributes on. """ super(PropertyStore, self).__init__(defaultuser) self._pathFactory = pathFactory # self.attrs = xattr(path.path) self.removed = set() self.modified = {} @property def path(self): return self._pathFactory() @property def attrs(self): return xattr(self.path.path) def __str__(self): return "<%s %s>" % (self.__class__.__name__, self.path.path) def _encodeKey(self, effective, compressNamespace=True): qname, uid = effective if compressNamespace: namespace = self._namespaceCompress.get(qname.namespace, qname.namespace) else: namespace = qname.namespace result = urllib.quote(encodeXMLName(namespace, qname.name), safe="{}:") if uid and uid != self._defaultUser: result = uid + result r = self.deadPropertyXattrPrefix + result return r def _decodeKey(self, name): name = urllib.unquote(name[len(self.deadPropertyXattrPrefix):]) index1 = name.find("{") index2 = name.find("}") if (index1 is -1 or index2 is -1 or not len(name) > index2): raise ValueError("Invalid encoded name: %r" % (name,)) if index1 == 0: uid = self._defaultUser else: uid = name[:index1] propnamespace = name[index1 + 1:index2] propnamespace = self._namespaceExpand.get(propnamespace, propnamespace) propname = name[index2 + 1:] return PropertyName(propnamespace, propname), uid # # Required implementations # def _getitem_uid(self, key, uid): validKey(key) effectiveKey = (key, uid) if effectiveKey in self.modified: return self.modified[effectiveKey] if effectiveKey in self.removed: raise KeyError(key) try: try: data = self.attrs[self._encodeKey(effectiveKey)] except IOError, e: if e.errno in [_ERRNO_NO_ATTR, errno.ENOENT]: raise KeyError(key) raise PropertyStoreError(e) except KeyError: # Check for uncompressed namespace if effectiveKey[0].namespace in self._namespaceCompress: try: data = self.attrs[self._encodeKey(effectiveKey, compressNamespace=False)] except IOError, e: raise KeyError(key) try: # Write it back using the compressed format self.attrs[self._encodeKey(effectiveKey)] = data del self.attrs[self._encodeKey(effectiveKey, compressNamespace=False)] except IOError, e: msg = ( "Unable to upgrade property " "to compressed namespace: %s" % (key.toString()) ) self.log.error(msg) raise PropertyStoreError(msg) else: raise # # Unserialize XML data from an xattr. The storage format has changed # over time: # # 1- Started with XML # 2- Started compressing the XML due to limits on xattr size # 3- Switched to pickle which is faster, still compressing # 4- Back to compressed XML for interoperability, size # # We only write the current format, but we also read the old # ones for compatibility. # legacy = False try: data = decompress(data) except ZlibError: legacy = True try: doc = WebDAVDocument.fromString(data) except ValueError: try: doc = unpickle(data) except UnpicklingError: msg = "Invalid property value stored on server: %s %s" % ( key.toString(), data ) self.log.error(msg) raise PropertyStoreError(msg) else: legacy = True if legacy: # XXX untested: CDT catches this though. self._setitem_uid(key, doc.root_element, uid) return doc.root_element def _setitem_uid(self, key, value, uid): validKey(key) effectiveKey = (key, uid) if effectiveKey in self.removed: self.removed.remove(effectiveKey) self.modified[effectiveKey] = value def _delitem_uid(self, key, uid): validKey(key) effectiveKey = (key, uid) if effectiveKey in self.modified: del self.modified[effectiveKey] elif self._encodeKey(effectiveKey) not in self.attrs: raise KeyError(key) self.removed.add(effectiveKey) def _keys_uid(self, uid): seen = set() try: iterattr = iter(self.attrs) except IOError, e: if e.errno != errno.ENOENT: raise iterattr = iter(()) for key in iterattr: if not key.startswith(self.deadPropertyXattrPrefix): continue effectivekey = self._decodeKey(key) if effectivekey[1] == uid and effectivekey not in self.removed: seen.add(effectivekey) yield effectivekey[0] for effectivekey in self.modified: if effectivekey[1] == uid and effectivekey not in seen: yield effectivekey[0] def _removeResource(self): # xattrs are removed when the underlying file is deleted so just clear # out cached changes self.removed.clear() self.modified.clear() # # I/O # def flush(self): # FIXME: The transaction may have deleted the file, and then obviously # flushing would fail. Let's try to detect that scenario. The # transaction should not attempt to flush properties if it is also # deleting the resource, though, and there are other reasons we might # want to know about that the file doesn't exist, so this should be # fixed. self.path.changed() if not self.path.exists(): return attrs = self.attrs removed = self.removed modified = self.modified for key in removed: assert key not in modified try: del attrs[self._encodeKey(key)] except KeyError: pass except IOError, e: if e.errno != _ERRNO_NO_ATTR: raise for key in modified: assert key not in removed value = modified[key] attrs[self._encodeKey(key)] = compress(value.toxml()) self.removed.clear() self.modified.clear() def abort(self): self.removed.clear() self.modified.clear() def copyAllProperties(self, other): """ Copy all the properties from another store into this one. This needs to be done independently of the UID. """ try: iterattr = iter(other.attrs) except IOError, e: if e.errno != errno.ENOENT: raise iterattr = iter(()) for key in iterattr: if not key.startswith(self.deadPropertyXattrPrefix): continue self.attrs[key] = other.attrs[key]
4,821
2,743
# -*- coding: utf-8 -*- # Generated by Django 1.10.7 on 2017-08-03 07:28 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('document_states', '0006_auto_20170803_0651'), ] operations = [ migrations.AlterField( model_name='workflowinstancelogentry', name='user', field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='User'), ), migrations.AlterField( model_name='workflowtransitiontriggerevent', name='event_type', field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='events.EventType', verbose_name='Event type'), ), migrations.AlterField( model_name='workflowtransitiontriggerevent', name='transition', field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='trigger_events', to='document_states.WorkflowTransition', verbose_name='Transition'), ), ]
519
12,718
/* * netevent.h * * Network events * * This file is part of the ReactOS PSDK package. * * Contributors: * Created by <NAME> <<EMAIL>> * * THIS SOFTWARE IS NOT COPYRIGHTED * * This source code is offered for use in the public domain. You may * use, modify or distribute it freely. * * This code is distributed in the hope that it will be useful but * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY * DISCLAIMED. This includes but is not limited to warranties of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * */ #ifndef __NETEVENT_H #define __NETEVENT_H #ifdef __cplusplus extern "C" { #endif #define COULD_NOT_VERIFY_VOLUMES __MSABI_LONG(0xC00037E8) #define DFS_CONNECTION_FAILURE __MSABI_LONG(0x40003842) #define DFS_ERROR_ACTIVEDIRECTORY_OFFLINE __MSABI_LONG(0xC00038BB) #define DFS_ERROR_CLUSTERINFO_FAILED __MSABI_LONG(0xC00038B5) #define DFS_ERROR_COMPUTERINFO_FAILED __MSABI_LONG(0xC00038B4) #define DFS_ERROR_CREATEEVENT_FAILED __MSABI_LONG(0xC00038B3) #define DFS_ERROR_CREATE_REPARSEPOINT_FAILURE __MSABI_LONG(0xC00038A7) #define DFS_ERROR_CREATE_REPARSEPOINT_SUCCESS __MSABI_LONG(0x400038D2) #define DFS_ERROR_CROSS_FOREST_TRUST_INFO_FAILED __MSABI_LONG(0xC00038D6) #define DFS_ERROR_DCINFO_FAILED __MSABI_LONG(0xC00038B6) #define DFS_ERROR_DSCONNECT_FAILED __MSABI_LONG(0x800038BE) #define DFS_ERROR_DUPLICATE_LINK __MSABI_LONG(0xC00038D3) #define DFS_ERROR_HANDLENAMESPACE_FAILED __MSABI_LONG(0xC00038B8) #define DFS_ERROR_LINKS_OVERLAP __MSABI_LONG(0xC00038D0) #define DFS_ERROR_LINK_OVERLAP __MSABI_LONG(0xC00038D1) #define DFS_ERROR_MUTLIPLE_ROOTS_NOT_SUPPORTED __MSABI_LONG(0xC00038C7) #define DFS_ERROR_NO_DFS_DATA __MSABI_LONG(0xC00038C2) #define DFS_ERROR_ON_ROOT __MSABI_LONG(0x800038C6) #define DFS_ERROR_OVERLAPPING_DIRECTORIES __MSABI_LONG(0xC00038A9) #define DFS_ERROR_PREFIXTABLE_FAILED __MSABI_LONG(0xC00038B7) #define DFS_ERROR_REFLECTIONENGINE_FAILED __MSABI_LONG(0xC00038BA) #define DFS_ERROR_REGISTERSTORE_FAILED __MSABI_LONG(0xC00038B9) #define DFS_ERROR_REMOVE_LINK_FAILED __MSABI_LONG(0xC00038CC) #define DFS_ERROR_RESYNCHRONIZE_FAILED __MSABI_LONG(0xC00038CB) #define DFS_ERROR_ROOTSYNCINIT_FAILED __MSABI_LONG(0xC00038B2) #define DFS_ERROR_SECURITYINIT_FAILED __MSABI_LONG(0xC00038AF) #define DFS_ERROR_SITECACHEINIT_FAILED __MSABI_LONG(0xC00038B1) #define DFS_ERROR_SITESUPPOR_FAILED __MSABI_LONG(0xC00038BC) #define DFS_ERROR_TARGET_LIST_INCORRECT __MSABI_LONG(0xC00038CF) #define DFS_ERROR_THREADINIT_FAILED __MSABI_LONG(0xC00038B0) #define DFS_ERROR_TOO_MANY_ERRORS __MSABI_LONG(0xC00038AD) #define DFS_ERROR_TRUSTED_DOMAIN_INFO_FAILED __MSABI_LONG(0xC00038D4) #define DFS_ERROR_UNSUPPORTED_FILESYSTEM __MSABI_LONG(0xC00038A8) #define DFS_ERROR_WINSOCKINIT_FAILED __MSABI_LONG(0xC00038AE) #define DFS_INFO_ACTIVEDIRECTORY_ONLINE __MSABI_LONG(0x400038AC) #define DFS_INFO_CROSS_FOREST_TRUST_INFO_SUCCESS __MSABI_LONG(0x400038D7) #define DFS_INFO_DOMAIN_REFERRAL_MIN_OVERFLOW __MSABI_LONG(0x400038C9) #define DFS_INFO_DS_RECONNECTED __MSABI_LONG(0x400038C1) #define DFS_INFO_FINISH_BUILDING_NAMESPACE __MSABI_LONG(0x400038C5) #define DFS_INFO_FINISH_INIT __MSABI_LONG(0x400038C3) #define DFS_INFO_RECONNECT_DATA __MSABI_LONG(0x400038C4) #define DFS_INFO_TRUSTED_DOMAIN_INFO_SUCCESS __MSABI_LONG(0x400038D5) #define DFS_MAX_DNR_ATTEMPTS __MSABI_LONG(0x40003845) #define DFS_OPEN_FAILURE __MSABI_LONG(0x40003847) #define DFS_REFERRAL_FAILURE __MSABI_LONG(0x40003843) #define DFS_REFERRAL_REQUEST __MSABI_LONG(0x400037EE) #define DFS_REFERRAL_SUCCESS __MSABI_LONG(0x40003844) #define DFS_SPECIAL_REFERRAL_FAILURE __MSABI_LONG(0x40003846) #define DFS_WARN_DOMAIN_REFERRAL_OVERFLOW __MSABI_LONG(0x800038C8) #define DFS_WARN_INCOMPLETE_MOVE __MSABI_LONG(0x800038CA) #define DFS_WARN_METADATA_LINK_INFO_INVALID __MSABI_LONG(0x800038CE) #define DFS_WARN_METADATA_LINK_TYPE_INCORRECT __MSABI_LONG(0x800038CD) #define EVENT_BAD_ACCOUNT_NAME __MSABI_LONG(0xC0001B60) #define EVENT_BAD_SERVICE_STATE __MSABI_LONG(0xC0001B68) #define EVENT_BOOT_SYSTEM_DRIVERS_FAILED __MSABI_LONG(0xC0001B72) #define EVENT_BOWSER_CANT_READ_REGISTRY __MSABI_LONG(0x40001F5D) #define EVENT_BOWSER_ELECTION_RECEIVED __MSABI_LONG(0x00001F4C) #define EVENT_BOWSER_ELECTION_SENT_FIND_MASTER_FAILED __MSABI_LONG(0x40001F4E) #define EVENT_BOWSER_ELECTION_SENT_GETBLIST_FAILED __MSABI_LONG(0x40001F4D) #define EVENT_BOWSER_GETBROWSERLIST_THRESHOLD_EXCEEDED __MSABI_LONG(0x40001F5F) #define EVENT_BOWSER_ILLEGAL_DATAGRAM __MSABI_LONG(0x80001F46) #define EVENT_BOWSER_ILLEGAL_DATAGRAM_THRESHOLD __MSABI_LONG(0xC0001F50) #define EVENT_BOWSER_MAILSLOT_DATAGRAM_THRESHOLD_EXCEEDED __MSABI_LONG(0x40001F5E) #define EVENT_BOWSER_NAME_CONVERSION_FAILED __MSABI_LONG(0xC0001F4A) #define EVENT_BOWSER_NON_MASTER_MASTER_ANNOUNCE __MSABI_LONG(0x80001F45) #define EVENT_BOWSER_NON_PDC_WON_ELECTION __MSABI_LONG(0x40001F5C) #define EVENT_BOWSER_OLD_BACKUP_FOUND __MSABI_LONG(0x40001F58) #define EVENT_BOWSER_OTHER_MASTER_ON_NET __MSABI_LONG(0xC0001F43) #define EVENT_BOWSER_PDC_LOST_ELECTION __MSABI_LONG(0x40001F5B) #define EVENT_BOWSER_PROMOTED_WHILE_ALREADY_MASTER __MSABI_LONG(0x80001F44) #define EVENT_BRIDGE_ADAPTER_BIND_FAILED __MSABI_LONG(0xC0003970) #define EVENT_BRIDGE_ADAPTER_FILTER_FAILED __MSABI_LONG(0xC000396E) #define EVENT_BRIDGE_ADAPTER_LINK_SPEED_QUERY_FAILED __MSABI_LONG(0xC000396C) #define EVENT_BRIDGE_ADAPTER_MAC_ADDR_QUERY_FAILED __MSABI_LONG(0xC000396D) #define EVENT_BRIDGE_ADAPTER_NAME_QUERY_FAILED __MSABI_LONG(0xC000396F) #define EVENT_BRIDGE_BUFFER_POOL_CREATION_FAILED __MSABI_LONG(0xC0003912) #define EVENT_BRIDGE_DEVICE_CREATION_FAILED __MSABI_LONG(0xC000390B) #define EVENT_BRIDGE_ETHERNET_NOT_OFFERED __MSABI_LONG(0xC000390E) #define EVENT_BRIDGE_INIT_MALLOC_FAILED __MSABI_LONG(0xC0003913) #define EVENT_BRIDGE_MINIPORT_INIT_FAILED __MSABI_LONG(0xC000390D) #define EVENT_BRIDGE_MINIPORT_REGISTER_FAILED __MSABI_LONG(0xC000390A) #define EVENT_BRIDGE_MINIPROT_DEVNAME_MISSING __MSABI_LONG(0xC0003909) #define EVENT_BRIDGE_NO_BRIDGE_MAC_ADDR __MSABI_LONG(0xC000390C) #define EVENT_BRIDGE_PACKET_POOL_CREATION_FAILED __MSABI_LONG(0xC0003911) #define EVENT_BRIDGE_PROTOCOL_REGISTER_FAILED __MSABI_LONG(0xC0003908) #define EVENT_BRIDGE_THREAD_CREATION_FAILED __MSABI_LONG(0xC000390F) #define EVENT_BRIDGE_THREAD_REF_FAILED __MSABI_LONG(0xC0003910) #define EVENT_BROWSER_BACKUP_STOPPED __MSABI_LONG(0xC0001F60) #define EVENT_BROWSER_DEPENDANT_SERVICE_FAILED __MSABI_LONG(0xC0001F51) #define EVENT_BROWSER_DOMAIN_LIST_FAILED __MSABI_LONG(0x80001F56) #define EVENT_BROWSER_DOMAIN_LIST_RETRIEVED __MSABI_LONG(0x00001F5A) #define EVENT_BROWSER_ELECTION_SENT_LANMAN_NT_STARTED __MSABI_LONG(0x40001F4F) #define EVENT_BROWSER_ELECTION_SENT_LANMAN_NT_STOPPED __MSABI_LONG(0x40001F61) #define EVENT_BROWSER_ELECTION_SENT_ROLE_CHANGED __MSABI_LONG(0x40001F63) #define EVENT_BROWSER_GETBLIST_RECEIVED_NOT_MASTER __MSABI_LONG(0xC0001F62) #define EVENT_BROWSER_ILLEGAL_CONFIG __MSABI_LONG(0x80001F57) #define EVENT_BROWSER_MASTER_PROMOTION_FAILED __MSABI_LONG(0xC0001F49) #define EVENT_BROWSER_MASTER_PROMOTION_FAILED_NO_MASTER __MSABI_LONG(0xC0001F54) #define EVENT_BROWSER_MASTER_PROMOTION_FAILED_STOPPING __MSABI_LONG(0xC0001F53) #define EVENT_BROWSER_NOT_STARTED_IPX_CONFIG_MISMATCH __MSABI_LONG(0xC0001F64) #define EVENT_BROWSER_OTHERDOMAIN_ADD_FAILED __MSABI_LONG(0xC0001F4B) #define EVENT_BROWSER_ROLE_CHANGE_FAILED __MSABI_LONG(0xC0001F48) #define EVENT_BROWSER_SERVER_LIST_FAILED __MSABI_LONG(0x80001F55) #define EVENT_BROWSER_SERVER_LIST_RETRIEVED __MSABI_LONG(0x00001F59) #define EVENT_BROWSER_STATUS_BITS_UPDATE_FAILED __MSABI_LONG(0xC0001F47) #define EVENT_CALL_TO_FUNCTION_FAILED __MSABI_LONG(0xC0001B5D) #define EVENT_CALL_TO_FUNCTION_FAILED_II __MSABI_LONG(0xC0001B5E) #define EVENT_CIRCULAR_DEPENDENCY_AUTO __MSABI_LONG(0xC0001B6A) #define EVENT_CIRCULAR_DEPENDENCY_DEMAND __MSABI_LONG(0xC0001B69) #define EVENT_COMMAND_NOT_INTERACTIVE __MSABI_LONG(0xC0001EDC) #define EVENT_COMMAND_START_FAILED __MSABI_LONG(0xC0001EDD) #define EVENT_CONNECTION_TIMEOUT __MSABI_LONG(0xC0001B61) #define EVENT_ComputerNameChange __MSABI_LONG(0x8000177B) #define EVENT_DAV_REDIR_DELAYED_WRITE_FAILED __MSABI_LONG(0x800039D0) #define EVENT_DCOM_ASSERTION_FAILURE __MSABI_LONG(0xC000271C) #define EVENT_DCOM_COMPLUS_DISABLED __MSABI_LONG(0xC000271E) #define EVENT_DCOM_INVALID_ENDPOINT_DATA __MSABI_LONG(0xC000271D) #define EVENT_DEPEND_ON_LATER_GROUP __MSABI_LONG(0xC0001B6C) #define EVENT_DEPEND_ON_LATER_SERVICE __MSABI_LONG(0xC0001B6B) #define EVENT_DNSAPI_DEREGISTRATION_FAILED_NOTSUPP __MSABI_LONG(0x80002BAE) #define EVENT_DNSAPI_DEREGISTRATION_FAILED_NOTSUPP_PRIMARY_DN __MSABI_LONG(0x80002BBA) #define EVENT_DNSAPI_DEREGISTRATION_FAILED_OTHER __MSABI_LONG(0x80002BB1) #define EVENT_DNSAPI_DEREGISTRATION_FAILED_OTHER_PRIMARY_DN __MSABI_LONG(0x80002BBD) #define EVENT_DNSAPI_DEREGISTRATION_FAILED_REFUSED __MSABI_LONG(0x80002BAF) #define EVENT_DNSAPI_DEREGISTRATION_FAILED_REFUSED_PRIMARY_DN __MSABI_LONG(0x80002BBB) #define EVENT_DNSAPI_DEREGISTRATION_FAILED_SECURITY __MSABI_LONG(0x80002BB0) #define EVENT_DNSAPI_DEREGISTRATION_FAILED_SECURITY_PRIMARY_DN __MSABI_LONG(0x80002BBC) #define EVENT_DNSAPI_DEREGISTRATION_FAILED_SERVERFAIL __MSABI_LONG(0x80002BAD) #define EVENT_DNSAPI_DEREGISTRATION_FAILED_SERVERFAIL_PRIMARY_DN __MSABI_LONG(0x80002BB9) #define EVENT_DNSAPI_DEREGISTRATION_FAILED_TIMEOUT __MSABI_LONG(0x80002BAC) #define EVENT_DNSAPI_DEREGISTRATION_FAILED_TIMEOUT_PRIMARY_DN __MSABI_LONG(0x80002BB8) #define EVENT_DNSAPI_PTR_DEREGISTRATION_FAILED_NOTSUPP __MSABI_LONG(0x80002BB4) #define EVENT_DNSAPI_PTR_DEREGISTRATION_FAILED_OTHER __MSABI_LONG(0x80002BB7) #define EVENT_DNSAPI_PTR_DEREGISTRATION_FAILED_REFUSED __MSABI_LONG(0x80002BB5) #define EVENT_DNSAPI_PTR_DEREGISTRATION_FAILED_SECURITY __MSABI_LONG(0x80002BB6) #define EVENT_DNSAPI_PTR_DEREGISTRATION_FAILED_SERVERFAIL __MSABI_LONG(0x80002BB3) #define EVENT_DNSAPI_PTR_DEREGISTRATION_FAILED_TIMEOUT __MSABI_LONG(0x80002BB2) #define EVENT_DNSAPI_PTR_REGISTRATION_FAILED_NOTSUPP __MSABI_LONG(0x80002B96) #define EVENT_DNSAPI_PTR_REGISTRATION_FAILED_OTHER __MSABI_LONG(0x80002B99) #define EVENT_DNSAPI_PTR_REGISTRATION_FAILED_REFUSED __MSABI_LONG(0x80002B97) #define EVENT_DNSAPI_PTR_REGISTRATION_FAILED_SECURITY __MSABI_LONG(0x80002B98) #define EVENT_DNSAPI_PTR_REGISTRATION_FAILED_SERVERFAIL __MSABI_LONG(0x80002B95) #define EVENT_DNSAPI_PTR_REGISTRATION_FAILED_TIMEOUT __MSABI_LONG(0x80002B94) #define EVENT_DNSAPI_REGISTERED_ADAPTER __MSABI_LONG(0x40002BC0) #define EVENT_DNSAPI_REGISTERED_ADAPTER_PRIMARY_DN __MSABI_LONG(0x40002BC2) #define EVENT_DNSAPI_REGISTERED_PTR __MSABI_LONG(0x40002BC1) #define EVENT_DNSAPI_REGISTRATION_FAILED_NOTSUPP __MSABI_LONG(0x80002B90) #define EVENT_DNSAPI_REGISTRATION_FAILED_NOTSUPP_PRIMARY_DN __MSABI_LONG(0x80002B9C) #define EVENT_DNSAPI_REGISTRATION_FAILED_OTHER __MSABI_LONG(0x80002B93) #define EVENT_DNSAPI_REGISTRATION_FAILED_OTHER_PRIMARY_DN __MSABI_LONG(0x80002B9F) #define EVENT_DNSAPI_REGISTRATION_FAILED_REFUSED __MSABI_LONG(0x80002B91) #define EVENT_DNSAPI_REGISTRATION_FAILED_REFUSED_PRIMARY_DN __MSABI_LONG(0x80002B9D) #define EVENT_DNSAPI_REGISTRATION_FAILED_SECURITY __MSABI_LONG(0x80002B92) #define EVENT_DNSAPI_REGISTRATION_FAILED_SECURITY_PRIMARY_DN __MSABI_LONG(0x80002B9E) #define EVENT_DNSAPI_REGISTRATION_FAILED_SERVERFAIL __MSABI_LONG(0x80002B8F) #define EVENT_DNSAPI_REGISTRATION_FAILED_SERVERFAIL_PRIMARY_DN __MSABI_LONG(0x80002B9B) #define EVENT_DNSAPI_REGISTRATION_FAILED_TIMEOUT __MSABI_LONG(0x80002B8E) #define EVENT_DNSAPI_REGISTRATION_FAILED_TIMEOUT_PRIMARY_DN __MSABI_LONG(0x80002B9A) #define EVENT_DNSDomainNameChange __MSABI_LONG(0x8000177C) #define EVENT_DNS_CACHE_NETWORK_PERF_WARNING __MSABI_LONG(0x80002B2A) #define EVENT_DNS_CACHE_START_FAILURE_LOW_MEMORY __MSABI_LONG(0xC0002AFF) #define EVENT_DNS_CACHE_START_FAILURE_NO_CONTROL __MSABI_LONG(0xC0002AFA) #define EVENT_DNS_CACHE_START_FAILURE_NO_DLL __MSABI_LONG(0xC0002AF8) #define EVENT_DNS_CACHE_START_FAILURE_NO_DONE_EVENT __MSABI_LONG(0xC0002AFB) #define EVENT_DNS_CACHE_START_FAILURE_NO_ENTRY __MSABI_LONG(0xC0002AF9) #define EVENT_DNS_CACHE_START_FAILURE_NO_RPC __MSABI_LONG(0xC0002AFC) #define EVENT_DNS_CACHE_START_FAILURE_NO_SHUTDOWN_NOTIFY __MSABI_LONG(0xC0002AFD) #define EVENT_DNS_CACHE_START_FAILURE_NO_UPDATE __MSABI_LONG(0xC0002AFE) #define EVENT_DNS_CACHE_UNABLE_TO_REACH_SERVER_WARNING __MSABI_LONG(0x80002B2B) #define EVENT_EQOS_ERROR_MACHINE_POLICY_KEYNAME_SIZE_ZERO __MSABI_LONG(0xC0004142) #define EVENT_EQOS_ERROR_MACHINE_POLICY_KEYNAME_TOO_LONG __MSABI_LONG(0xC0004140) #define EVENT_EQOS_ERROR_MACHINE_POLICY_REFERESH __MSABI_LONG(0xC000413C) #define EVENT_EQOS_ERROR_OPENING_MACHINE_POLICY_ROOT_KEY __MSABI_LONG(0xC000413E) #define EVENT_EQOS_ERROR_OPENING_MACHINE_POLICY_SUBKEY __MSABI_LONG(0xC0004144) #define EVENT_EQOS_ERROR_OPENING_USER_POLICY_ROOT_KEY __MSABI_LONG(0xC000413F) #define EVENT_EQOS_ERROR_OPENING_USER_POLICY_SUBKEY __MSABI_LONG(0xC0004145) #define EVENT_EQOS_ERROR_PROCESSING_MACHINE_POLICY_FIELD __MSABI_LONG(0xC0004146) #define EVENT_EQOS_ERROR_PROCESSING_USER_POLICY_FIELD __MSABI_LONG(0xC0004147) #define EVENT_EQOS_ERROR_SETTING_APP_MARKING __MSABI_LONG(0xC0004149) #define EVENT_EQOS_ERROR_SETTING_TCP_AUTOTUNING __MSABI_LONG(0xC0004148) #define EVENT_EQOS_ERROR_USER_POLICY_KEYNAME_SIZE_ZERO __MSABI_LONG(0xC0004143) #define EVENT_EQOS_ERROR_USER_POLICY_KEYNAME_TOO_LONG __MSABI_LONG(0xC0004141) #define EVENT_EQOS_ERROR_USER_POLICY_REFERESH __MSABI_LONG(0xC000413D) #define EVENT_EQOS_INFO_APP_MARKING_ALLOWED __MSABI_LONG(0x4000407F) #define EVENT_EQOS_INFO_APP_MARKING_IGNORED __MSABI_LONG(0x4000407E) #define EVENT_EQOS_INFO_APP_MARKING_NOT_CONFIGURED __MSABI_LONG(0x4000407D) #define EVENT_EQOS_INFO_LOCAL_SETTING_DONT_USE_NLA __MSABI_LONG(0x40004080) #define EVENT_EQOS_INFO_MACHINE_POLICY_REFRESH_NO_CHANGE __MSABI_LONG(0x40004074) #define EVENT_EQOS_INFO_MACHINE_POLICY_REFRESH_WITH_CHANGE __MSABI_LONG(0x40004075) #define EVENT_EQOS_INFO_TCP_AUTOTUNING_HIGHLY_RESTRICTED __MSABI_LONG(0x4000407A) #define EVENT_EQOS_INFO_TCP_AUTOTUNING_NORMAL __MSABI_LONG(0x4000407C) #define EVENT_EQOS_INFO_TCP_AUTOTUNING_NOT_CONFIGURED __MSABI_LONG(0x40004078) #define EVENT_EQOS_INFO_TCP_AUTOTUNING_OFF __MSABI_LONG(0x40004079) #define EVENT_EQOS_INFO_TCP_AUTOTUNING_RESTRICTED __MSABI_LONG(0x4000407B) #define EVENT_EQOS_INFO_USER_POLICY_REFRESH_NO_CHANGE __MSABI_LONG(0x40004076) #define EVENT_EQOS_INFO_USER_POLICY_REFRESH_WITH_CHANGE __MSABI_LONG(0x40004077) #define EVENT_EQOS_URL_QOS_APPLICATION_CONFLICT __MSABI_LONG(0x40004081) #define EVENT_EQOS_WARNING_MACHINE_POLICY_CONFLICT __MSABI_LONG(0x800040E0) #define EVENT_EQOS_WARNING_MACHINE_POLICY_NO_FULLPATH_APPNAME __MSABI_LONG(0x800040E2) #define EVENT_EQOS_WARNING_MACHINE_POLICY_PROFILE_NOT_SPECIFIED __MSABI_LONG(0x800040DC) #define EVENT_EQOS_WARNING_MACHINE_POLICY_QUOTA_EXCEEDED __MSABI_LONG(0x800040DE) #define EVENT_EQOS_WARNING_MACHINE_POLICY_VERSION __MSABI_LONG(0x800040DA) #define EVENT_EQOS_WARNING_TEST_1 __MSABI_LONG(0x800040D8) #define EVENT_EQOS_WARNING_TEST_2 __MSABI_LONG(0x800040D9) #define EVENT_EQOS_WARNING_USER_POLICY_CONFLICT __MSABI_LONG(0x800040E1) #define EVENT_EQOS_WARNING_USER_POLICY_NO_FULLPATH_APPNAME __MSABI_LONG(0x800040E3) #define EVENT_EQOS_WARNING_USER_POLICY_PROFILE_NOT_SPECIFIED __MSABI_LONG(0x800040DD) #define EVENT_EQOS_WARNING_USER_POLICY_QUOTA_EXCEEDED __MSABI_LONG(0x800040DF) #define EVENT_EQOS_WARNING_USER_POLICY_VERSION __MSABI_LONG(0x800040DB) #define EVENT_EventLogProductInfo __MSABI_LONG(0x80001779) #define EVENT_EventlogAbnormalShutdown __MSABI_LONG(0x80001778) #define EVENT_EventlogStarted __MSABI_LONG(0x80001775) #define EVENT_EventlogStopped __MSABI_LONG(0x80001776) #define EVENT_EventlogUptime __MSABI_LONG(0x8000177D) #define EVENT_FIRST_LOGON_FAILED __MSABI_LONG(0xC0001B65) #define EVENT_FIRST_LOGON_FAILED_II __MSABI_LONG(0xC0001B7E) #define EVENT_FRS_ACCESS_CHECKS_DISABLED __MSABI_LONG(0x800034CD) #define EVENT_FRS_ACCESS_CHECKS_FAILED_UNKNOWN __MSABI_LONG(0xC00034CF) #define EVENT_FRS_ACCESS_CHECKS_FAILED_USER __MSABI_LONG(0x800034CE) #define EVENT_FRS_ASSERT __MSABI_LONG(0xC00034C2) #define EVENT_FRS_BAD_REG_DATA __MSABI_LONG(0x800034EB) #define EVENT_FRS_CANNOT_COMMUNICATE __MSABI_LONG(0xC00034C6) #define EVENT_FRS_CANNOT_CREATE_UUID __MSABI_LONG(0xC00034D4) #define EVENT_FRS_CANNOT_START_BACKUP_RESTORE_IN_PROGRESS __MSABI_LONG(0xC00034D1) #define EVENT_FRS_CANT_OPEN_PREINSTALL __MSABI_LONG(0xC00034EF) #define EVENT_FRS_CANT_OPEN_STAGE __MSABI_LONG(0xC00034EE) #define EVENT_FRS_DATABASE_SPACE __MSABI_LONG(0xC00034C7) #define EVENT_FRS_DISK_WRITE_CACHE_ENABLED __MSABI_LONG(0x800034C8) #define EVENT_FRS_DS_POLL_ERROR_SUMMARY __MSABI_LONG(0x800034FA) #define EVENT_FRS_DUPLICATE_IN_CXTION __MSABI_LONG(0xC00034F6) #define EVENT_FRS_DUPLICATE_IN_CXTION_SYSVOL __MSABI_LONG(0xC00034F5) #define EVENT_FRS_ERROR __MSABI_LONG(0xC00034BC) #define EVENT_FRS_ERROR_REPLICA_SET_DELETED __MSABI_LONG(0x800034F8) #define EVENT_FRS_HUGE_FILE __MSABI_LONG(0x800034D3) #define EVENT_FRS_IN_ERROR_STATE __MSABI_LONG(0xC00034F3) #define EVENT_FRS_JET_1414 __MSABI_LONG(0xC00034C9) #define EVENT_FRS_JOIN_FAIL_TIME_SKEW __MSABI_LONG(0xC00034EC) #define EVENT_FRS_LONG_JOIN __MSABI_LONG(0x800034C4) #define EVENT_FRS_LONG_JOIN_DONE __MSABI_LONG(0x800034C5) #define EVENT_FRS_MOVED_PREEXISTING __MSABI_LONG(0x800034D0) #define EVENT_FRS_NO_DNS_ATTRIBUTE __MSABI_LONG(0x800034D5) #define EVENT_FRS_NO_SID __MSABI_LONG(0xC00034D6) #define EVENT_FRS_OVERLAPS_LOGGING __MSABI_LONG(0xC00034E5) #define EVENT_FRS_OVERLAPS_OTHER_STAGE __MSABI_LONG(0xC00034E9) #define EVENT_FRS_OVERLAPS_ROOT __MSABI_LONG(0xC00034E8) #define EVENT_FRS_OVERLAPS_STAGE __MSABI_LONG(0xC00034E7) #define EVENT_FRS_OVERLAPS_WORKING __MSABI_LONG(0xC00034E6) #define EVENT_FRS_PREPARE_ROOT_FAILED __MSABI_LONG(0xC00034EA) #define EVENT_FRS_REPLICA_IN_JRNL_WRAP_ERROR __MSABI_LONG(0xC00034F9) #define EVENT_FRS_REPLICA_NO_ROOT_CHANGE __MSABI_LONG(0xC00034F4) #define EVENT_FRS_REPLICA_SET_CREATE_FAIL __MSABI_LONG(0xC00034F0) #define EVENT_FRS_REPLICA_SET_CREATE_OK __MSABI_LONG(0x400034F1) #define EVENT_FRS_REPLICA_SET_CXTIONS __MSABI_LONG(0x400034F2) #define EVENT_FRS_RMTCO_TIME_SKEW __MSABI_LONG(0xC00034ED) #define EVENT_FRS_ROOT_HAS_MOVED __MSABI_LONG(0xC00034F7) #define EVENT_FRS_ROOT_NOT_VALID __MSABI_LONG(0xC00034E3) #define EVENT_FRS_STAGE_NOT_VALID __MSABI_LONG(0xC00034E4) #define EVENT_FRS_STAGING_AREA_FULL __MSABI_LONG(0x800034D2) #define EVENT_FRS_STARTING __MSABI_LONG(0x400034BD) #define EVENT_FRS_STOPPED __MSABI_LONG(0x400034BF) #define EVENT_FRS_STOPPED_ASSERT __MSABI_LONG(0xC00034C1) #define EVENT_FRS_STOPPED_FORCE __MSABI_LONG(0xC00034C0) #define EVENT_FRS_STOPPING __MSABI_LONG(0x400034BE) #define EVENT_FRS_SYSVOL_NOT_READY __MSABI_LONG(0x800034CA) #define EVENT_FRS_SYSVOL_NOT_READY_PRIMARY __MSABI_LONG(0x800034CB) #define EVENT_FRS_SYSVOL_READY __MSABI_LONG(0x400034CC) #define EVENT_FRS_VOLUME_NOT_SUPPORTED __MSABI_LONG(0xC00034C3) #define EVENT_INVALID_DRIVER_DEPENDENCY __MSABI_LONG(0xC0001B67) #define EVENT_IPX_CREATE_DEVICE __MSABI_LONG(0xC0002522) #define EVENT_IPX_ILLEGAL_CONFIG __MSABI_LONG(0x8000251F) #define EVENT_IPX_INTERNAL_NET_INVALID __MSABI_LONG(0xC0002520) #define EVENT_IPX_NEW_DEFAULT_TYPE __MSABI_LONG(0x4000251D) #define EVENT_IPX_NO_ADAPTERS __MSABI_LONG(0xC0002523) #define EVENT_IPX_NO_FRAME_TYPES __MSABI_LONG(0xC0002521) #define EVENT_IPX_SAP_ANNOUNCE __MSABI_LONG(0x8000251E) #define EVENT_NBT_BAD_BACKUP_WINS_ADDR __MSABI_LONG(0x800010D0) #define EVENT_NBT_BAD_PRIMARY_WINS_ADDR __MSABI_LONG(0x800010D1) #define EVENT_NBT_CREATE_ADDRESS __MSABI_LONG(0xC00010D3) #define EVENT_NBT_CREATE_CONNECTION __MSABI_LONG(0xC00010D4) #define EVENT_NBT_CREATE_DEVICE __MSABI_LONG(0xC00010D7) #define EVENT_NBT_CREATE_DRIVER __MSABI_LONG(0xC00010CC) #define EVENT_NBT_DUPLICATE_NAME __MSABI_LONG(0xC00010DF) #define EVENT_NBT_DUPLICATE_NAME_ERROR __MSABI_LONG(0xC00010E1) #define EVENT_NBT_NAME_RELEASE __MSABI_LONG(0xC00010E0) #define EVENT_NBT_NAME_SERVER_ADDRS __MSABI_LONG(0xC00010D2) #define EVENT_NBT_NON_OS_INIT __MSABI_LONG(0xC00010D5) #define EVENT_NBT_NO_BACKUP_WINS __MSABI_LONG(0x800010CE) #define EVENT_NBT_NO_DEVICES __MSABI_LONG(0x800010D8) #define EVENT_NBT_NO_RESOURCES __MSABI_LONG(0xC00010E2) #define EVENT_NBT_NO_WINS __MSABI_LONG(0x800010CF) #define EVENT_NBT_OPEN_REG_LINKAGE __MSABI_LONG(0xC00010D9) #define EVENT_NBT_OPEN_REG_NAMESERVER __MSABI_LONG(0x800010DC) #define EVENT_NBT_OPEN_REG_PARAMS __MSABI_LONG(0xC00010CD) #define EVENT_NBT_READ_BIND __MSABI_LONG(0xC00010DA) #define EVENT_NBT_READ_EXPORT __MSABI_LONG(0xC00010DB) #define EVENT_NBT_TIMERS __MSABI_LONG(0xC00010D6) #define EVENT_NDIS_ADAPTER_CHECK_ERROR __MSABI_LONG(0xC00013A7) #define EVENT_NDIS_ADAPTER_DISABLED __MSABI_LONG(0x80001396) #define EVENT_NDIS_ADAPTER_NOT_FOUND __MSABI_LONG(0xC000138B) #define EVENT_NDIS_BAD_IO_BASE_ADDRESS __MSABI_LONG(0xC0001394) #define EVENT_NDIS_BAD_VERSION __MSABI_LONG(0xC000138E) #define EVENT_NDIS_CABLE_DISCONNECTED_ERROR __MSABI_LONG(0x800013A9) #define EVENT_NDIS_DMA_CONFLICT __MSABI_LONG(0x8000139B) #define EVENT_NDIS_DRIVER_FAILURE __MSABI_LONG(0xC000138D) #define EVENT_NDIS_HARDWARE_FAILURE __MSABI_LONG(0xC000138A) #define EVENT_NDIS_INTERRUPT_CONFLICT __MSABI_LONG(0x8000139A) #define EVENT_NDIS_INTERRUPT_CONNECT __MSABI_LONG(0xC000138C) #define EVENT_NDIS_INVALID_DOWNLOAD_FILE_ERROR __MSABI_LONG(0xC000139C) #define EVENT_NDIS_INVALID_VALUE_FROM_ADAPTER __MSABI_LONG(0xC0001392) #define EVENT_NDIS_IO_PORT_CONFLICT __MSABI_LONG(0x80001397) #define EVENT_NDIS_LOBE_FAILUE_ERROR __MSABI_LONG(0x800013A3) #define EVENT_NDIS_MAXFRAMESIZE_ERROR __MSABI_LONG(0x8000139F) #define EVENT_NDIS_MAXINTERNALBUFS_ERROR __MSABI_LONG(0x800013A0) #define EVENT_NDIS_MAXMULTICAST_ERROR __MSABI_LONG(0x800013A1) #define EVENT_NDIS_MAXRECEIVES_ERROR __MSABI_LONG(0x8000139D) #define EVENT_NDIS_MAXTRANSMITS_ERROR __MSABI_LONG(0x8000139E) #define EVENT_NDIS_MEMORY_CONFLICT __MSABI_LONG(0x80001399) #define EVENT_NDIS_MISSING_CONFIGURATION_PARAMETER __MSABI_LONG(0xC0001393) #define EVENT_NDIS_NETWORK_ADDRESS __MSABI_LONG(0xC0001390) #define EVENT_NDIS_OUT_OF_RESOURCE __MSABI_LONG(0xC0001389) #define EVENT_NDIS_PORT_OR_DMA_CONFLICT __MSABI_LONG(0x80001398) #define EVENT_NDIS_PRODUCTID_ERROR __MSABI_LONG(0x800013A2) #define EVENT_NDIS_RECEIVE_SPACE_SMALL __MSABI_LONG(0x40001395) #define EVENT_NDIS_REMOVE_RECEIVED_ERROR __MSABI_LONG(0x800013A5) #define EVENT_NDIS_RESET_FAILURE_CORRECTION __MSABI_LONG(0x800013AA) #define EVENT_NDIS_RESET_FAILURE_ERROR __MSABI_LONG(0x800013A8) #define EVENT_NDIS_RESOURCE_CONFLICT __MSABI_LONG(0xC0001388) #define EVENT_NDIS_SIGNAL_LOSS_ERROR __MSABI_LONG(0x800013A4) #define EVENT_NDIS_TIMEOUT __MSABI_LONG(0x8000138F) #define EVENT_NDIS_TOKEN_RING_CORRECTION __MSABI_LONG(0x400013A6) #define EVENT_NDIS_UNSUPPORTED_CONFIGURATION __MSABI_LONG(0xC0001391) #define EVENT_PS_ADMISSIONCONTROL_OVERFLOW __MSABI_LONG(0x8000371F) #define EVENT_PS_BAD_BESTEFFORT_LIMIT __MSABI_LONG(0x80003714) #define EVENT_PS_BINDING_FAILED __MSABI_LONG(0xC0003718) #define EVENT_PS_GPC_REGISTER_FAILED __MSABI_LONG(0xC00036B0) #define EVENT_PS_INIT_DEVICE_FAILED __MSABI_LONG(0xC000371B) #define EVENT_PS_MISSING_ADAPTER_REGISTRY_DATA __MSABI_LONG(0xC0003719) #define EVENT_PS_NETWORK_ADDRESS_FAIL __MSABI_LONG(0xC0003720) #define EVENT_PS_NO_RESOURCES_FOR_INIT __MSABI_LONG(0xC00036B1) #define EVENT_PS_QUERY_OID_GEN_LINK_SPEED __MSABI_LONG(0xC0003717) #define EVENT_PS_QUERY_OID_GEN_MAXIMUM_FRAME_SIZE __MSABI_LONG(0xC0003715) #define EVENT_PS_QUERY_OID_GEN_MAXIMUM_TOTAL_SIZE __MSABI_LONG(0xC0003716) #define EVENT_PS_REGISTER_ADDRESS_FAMILY_FAILED __MSABI_LONG(0xC000371A) #define EVENT_PS_REGISTER_MINIPORT_FAILED __MSABI_LONG(0xC00036B3) #define EVENT_PS_REGISTER_PROTOCOL_FAILED __MSABI_LONG(0xC00036B2) #define EVENT_PS_RESOURCE_POOL __MSABI_LONG(0xC000371E) #define EVENT_PS_WAN_LIMITED_BESTEFFORT __MSABI_LONG(0x8000371D) #define EVENT_PS_WMI_INSTANCE_NAME_FAILED __MSABI_LONG(0xC000371C) #define EVENT_RDR_AT_THREAD_MAX __MSABI_LONG(0x80000BD2) #define EVENT_RDR_CANT_BIND_TRANSPORT __MSABI_LONG(0x80000BD8) #define EVENT_RDR_CANT_BUILD_SMB_HEADER __MSABI_LONG(0x80000BDB) #define EVENT_RDR_CANT_CREATE_DEVICE __MSABI_LONG(0x80000BBA) #define EVENT_RDR_CANT_CREATE_THREAD __MSABI_LONG(0x80000BBB) #define EVENT_RDR_CANT_GET_SECURITY_CONTEXT __MSABI_LONG(0x80000BDA) #define EVENT_RDR_CANT_READ_REGISTRY __MSABI_LONG(0x80000BD3) #define EVENT_RDR_CANT_REGISTER_ADDRESS __MSABI_LONG(0x80000BD9) #define EVENT_RDR_CANT_SET_THREAD __MSABI_LONG(0x80000BBC) #define EVENT_RDR_CLOSE_BEHIND __MSABI_LONG(0x80000BC3) #define EVENT_RDR_CONNECTION __MSABI_LONG(0x80000BCB) #define EVENT_RDR_CONNECTION_REFERENCE __MSABI_LONG(0x80000BC7) #define EVENT_RDR_CONTEXTS __MSABI_LONG(0x80000BD0) #define EVENT_RDR_DELAYED_SET_ATTRIBUTES_FAILED __MSABI_LONG(0x80000BD6) #define EVENT_RDR_DELETEONCLOSE_FAILED __MSABI_LONG(0x80000BD7) #define EVENT_RDR_DISPOSITION __MSABI_LONG(0x80000BCF) #define EVENT_RDR_ENCRYPT __MSABI_LONG(0x80000BCA) #define EVENT_RDR_FAILED_UNLOCK __MSABI_LONG(0x80000BC1) #define EVENT_RDR_INVALID_LOCK_REPLY __MSABI_LONG(0x80000BBF) #define EVENT_RDR_INVALID_OPLOCK __MSABI_LONG(0x80000BC6) #define EVENT_RDR_INVALID_REPLY __MSABI_LONG(0x80000BBD) #define EVENT_RDR_INVALID_SMB __MSABI_LONG(0x80000BBE) #define EVENT_RDR_MAXCMDS __MSABI_LONG(0x80000BCD) #define EVENT_RDR_OPLOCK_SMB __MSABI_LONG(0x80000BCE) #define EVENT_RDR_PRIMARY_TRANSPORT_CONNECT_FAILED __MSABI_LONG(0x80000BD5) #define EVENT_RDR_RESOURCE_SHORTAGE __MSABI_LONG(0x80000BB9) #define EVENT_RDR_SECURITY_SIGNATURE_MISMATCH __MSABI_LONG(0x80000BDC) #define EVENT_RDR_SERVER_REFERENCE __MSABI_LONG(0x80000BC8) #define EVENT_RDR_SMB_REFERENCE __MSABI_LONG(0x80000BC9) #define EVENT_RDR_TIMEOUT __MSABI_LONG(0x80000BC5) #define EVENT_RDR_TIMEZONE_BIAS_TOO_LARGE __MSABI_LONG(0x80000BD4) #define EVENT_RDR_UNEXPECTED_ERROR __MSABI_LONG(0x80000BC4) #define EVENT_RDR_WRITE_BEHIND_FLUSH_FAILED __MSABI_LONG(0x80000BD1) #define EVENT_READFILE_TIMEOUT __MSABI_LONG(0xC0001B62) #define EVENT_REVERTED_TO_LASTKNOWNGOOD __MSABI_LONG(0xC0001B5F) #define EVENT_RPCSS_ACTIVATION_ERROR __MSABI_LONG(0xC0002717) #define EVENT_RPCSS_CREATEPROCESS_FAILURE __MSABI_LONG(0xC0002710) #define EVENT_RPCSS_DEFAULT_LAUNCH_ACCESS_DENIED __MSABI_LONG(0xC0002713) #define EVENT_RPCSS_LAUNCH_ACCESS_DENIED __MSABI_LONG(0xC0002712) #define EVENT_RPCSS_REMOTE_SIDE_ERROR __MSABI_LONG(0xC0002716) #define EVENT_RPCSS_REMOTE_SIDE_ERROR_WITH_FILE __MSABI_LONG(0xC0002718) #define EVENT_RPCSS_REMOTE_SIDE_UNAVAILABLE __MSABI_LONG(0xC0002719) #define EVENT_RPCSS_RUNAS_CANT_LOGIN __MSABI_LONG(0xC0002714) #define EVENT_RPCSS_RUNAS_CREATEPROCESS_FAILURE __MSABI_LONG(0xC0002711) #define EVENT_RPCSS_SERVER_NOT_RESPONDING __MSABI_LONG(0xC000271B) #define EVENT_RPCSS_SERVER_START_TIMEOUT __MSABI_LONG(0xC000271A) #define EVENT_RPCSS_START_SERVICE_FAILURE __MSABI_LONG(0xC0002715) #define EVENT_RUNNING_LASTKNOWNGOOD __MSABI_LONG(0xC0001B73) #define EVENT_SCOPE_LABEL_TOO_LONG __MSABI_LONG(0x800010DD) #define EVENT_SCOPE_TOO_LONG __MSABI_LONG(0x800010DE) #define EVENT_SECOND_LOGON_FAILED __MSABI_LONG(0xC0001B66) #define EVENT_SERVICE_CONFIG_BACKOUT_FAILED __MSABI_LONG(0xC0001B7D) #define EVENT_SERVICE_CONTROL_SUCCESS __MSABI_LONG(0x40001B7B) #define EVENT_SERVICE_CRASH __MSABI_LONG(0xC0001B77) #define EVENT_SERVICE_CRASH_NO_ACTION __MSABI_LONG(0xC0001B7A) #define EVENT_SERVICE_DIFFERENT_PID_CONNECTED __MSABI_LONG(0x80001B7F) #define EVENT_SERVICE_EXIT_FAILED __MSABI_LONG(0xC0001B6F) #define EVENT_SERVICE_EXIT_FAILED_SPECIFIC __MSABI_LONG(0xC0001B70) #define EVENT_SERVICE_LOGON_TYPE_NOT_GRANTED __MSABI_LONG(0xC0001B81) #define EVENT_SERVICE_NOT_INTERACTIVE __MSABI_LONG(0xC0001B76) #define EVENT_SERVICE_RECOVERY_FAILED __MSABI_LONG(0xC0001B78) #define EVENT_SERVICE_SCESRV_FAILED __MSABI_LONG(0xC0001B79) #define EVENT_SERVICE_SHUTDOWN_FAILED __MSABI_LONG(0xC0001B83) #define EVENT_SERVICE_START_AT_BOOT_FAILED __MSABI_LONG(0xC0001B71) #define EVENT_SERVICE_START_FAILED __MSABI_LONG(0xC0001B58) #define EVENT_SERVICE_START_FAILED_GROUP __MSABI_LONG(0xC0001B5A) #define EVENT_SERVICE_START_FAILED_II __MSABI_LONG(0xC0001B59) #define EVENT_SERVICE_START_FAILED_NONE __MSABI_LONG(0xC0001B5B) #define EVENT_SERVICE_START_HUNG __MSABI_LONG(0xC0001B6E) #define EVENT_SERVICE_START_TYPE_CHANGED __MSABI_LONG(0x40001B80) #define EVENT_SERVICE_STATUS_SUCCESS __MSABI_LONG(0x40001B7C) #define EVENT_SERVICE_STOP_SUCCESS_WITH_REASON __MSABI_LONG(0x40001B82) #define EVENT_SEVERE_SERVICE_FAILED __MSABI_LONG(0xC0001B6D) #define EVENT_SRV_CANT_BIND_DUP_NAME __MSABI_LONG(0xC00009C9) #define EVENT_SRV_CANT_BIND_TO_TRANSPORT __MSABI_LONG(0x800009C8) #define EVENT_SRV_CANT_CHANGE_DOMAIN_NAME __MSABI_LONG(0x800009D0) #define EVENT_SRV_CANT_CREATE_DEVICE __MSABI_LONG(0xC00007D2) #define EVENT_SRV_CANT_CREATE_PROCESS __MSABI_LONG(0xC00007D3) #define EVENT_SRV_CANT_CREATE_THREAD __MSABI_LONG(0xC00007D4) #define EVENT_SRV_CANT_GROW_TABLE __MSABI_LONG(0x800007D9) #define EVENT_SRV_CANT_LOAD_DRIVER __MSABI_LONG(0x800009CC) #define EVENT_SRV_CANT_MAP_ERROR __MSABI_LONG(0x800009CE) #define EVENT_SRV_CANT_OPEN_NPFS __MSABI_LONG(0xC00007D7) #define EVENT_SRV_CANT_RECREATE_SHARE __MSABI_LONG(0x800009CF) #define EVENT_SRV_CANT_START_SCAVENGER __MSABI_LONG(0xC00007DA) #define EVENT_SRV_CANT_UNLOAD_DRIVER __MSABI_LONG(0x800009CD) #define EVENT_SRV_DISK_FULL __MSABI_LONG(0x800007DD) #define EVENT_SRV_DOS_ATTACK_DETECTED __MSABI_LONG(0x800007E9) #define EVENT_SRV_INVALID_REGISTRY_VALUE __MSABI_LONG(0x800009CA) #define EVENT_SRV_INVALID_REQUEST __MSABI_LONG(0xC00007D6) #define EVENT_SRV_INVALID_SD __MSABI_LONG(0x800009CB) #define EVENT_SRV_IRP_STACK_SIZE __MSABI_LONG(0xC00007DB) #define EVENT_SRV_KEY_NOT_CREATED __MSABI_LONG(0xC00009C6) #define EVENT_SRV_KEY_NOT_FOUND __MSABI_LONG(0xC00009C5) #define EVENT_SRV_NETWORK_ERROR __MSABI_LONG(0x800007DC) #define EVENT_SRV_NONPAGED_POOL_LIMIT __MSABI_LONG(0xC00007E1) #define EVENT_SRV_NO_BLOCKING_IO __MSABI_LONG(0x800007E8) #define EVENT_SRV_NO_FREE_CONNECTIONS __MSABI_LONG(0x800007E6) #define EVENT_SRV_NO_FREE_RAW_WORK_ITEM __MSABI_LONG(0x800007E7) #define EVENT_SRV_NO_NONPAGED_POOL __MSABI_LONG(0xC00007E3) #define EVENT_SRV_NO_PAGED_POOL __MSABI_LONG(0xC00007E4) #define EVENT_SRV_NO_TRANSPORTS_BOUND __MSABI_LONG(0xC00009C7) #define EVENT_SRV_NO_VIRTUAL_MEMORY __MSABI_LONG(0xC00007E0) #define EVENT_SRV_NO_WORK_ITEM __MSABI_LONG(0x800007E5) #define EVENT_SRV_OUT_OF_WORK_ITEM_DOS __MSABI_LONG(0x800007EB) #define EVENT_SRV_PAGED_POOL_LIMIT __MSABI_LONG(0xC00007E2) #define EVENT_SRV_RESOURCE_SHORTAGE __MSABI_LONG(0xC00007D1) #define EVENT_SRV_SERVICE_FAILED __MSABI_LONG(0xC00007D0) #define EVENT_SRV_TOO_MANY_DOS __MSABI_LONG(0x800007EA) #define EVENT_SRV_TXF_INIT_FAILED __MSABI_LONG(0x800009D1) #define EVENT_SRV_UNEXPECTED_DISC __MSABI_LONG(0xC00007D5) #define EVENT_STREAMS_ALLOCB_FAILURE __MSABI_LONG(0x80000FA1) #define EVENT_STREAMS_ALLOCB_FAILURE_CNT __MSABI_LONG(0x80000FA2) #define EVENT_STREAMS_ESBALLOC_FAILURE __MSABI_LONG(0x80000FA3) #define EVENT_STREAMS_ESBALLOC_FAILURE_CNT __MSABI_LONG(0x80000FA4) #define EVENT_STREAMS_STRLOG __MSABI_LONG(0xC0000FA0) #define EVENT_TAKE_OWNERSHIP __MSABI_LONG(0xC0001B74) #define EVENT_TCPIP6_STARTED __MSABI_LONG(0x40000C1C) #define EVENT_TCPIP_ADAPTER_REG_FAILURE __MSABI_LONG(0xC000105F) #define EVENT_TCPIP_ADDRESS_CONFLICT1 __MSABI_LONG(0xC0001066) #define EVENT_TCPIP_ADDRESS_CONFLICT2 __MSABI_LONG(0xC0001067) #define EVENT_TCPIP_CREATE_DEVICE_FAILED __MSABI_LONG(0xC0001004) #define EVENT_TCPIP_DHCP_INIT_FAILED __MSABI_LONG(0x8000105E) #define EVENT_TCPIP_INVALID_ADDRESS __MSABI_LONG(0xC000105B) #define EVENT_TCPIP_INVALID_DEFAULT_GATEWAY __MSABI_LONG(0x80001060) #define EVENT_TCPIP_INVALID_MASK __MSABI_LONG(0xC000105C) #define EVENT_TCPIP_IPV4_UNINSTALLED __MSABI_LONG(0x4000106B) #define EVENT_TCPIP_IP_INIT_FAILED __MSABI_LONG(0xC0001064) #define EVENT_TCPIP_MEDIA_CONNECT __MSABI_LONG(0x40001069) #define EVENT_TCPIP_MEDIA_DISCONNECT __MSABI_LONG(0x4000106A) #define EVENT_TCPIP_NO_ADAPTER_RESOURCES __MSABI_LONG(0xC000105D) #define EVENT_TCPIP_NO_ADDRESS_LIST __MSABI_LONG(0xC0001061) #define EVENT_TCPIP_NO_BINDINGS __MSABI_LONG(0xC0001063) #define EVENT_TCPIP_NO_MASK __MSABI_LONG(0xC000105A) #define EVENT_TCPIP_NO_MASK_LIST __MSABI_LONG(0xC0001062) #define EVENT_TCPIP_NO_RESOURCES_FOR_INIT __MSABI_LONG(0xC0001005) #define EVENT_TCPIP_NTE_CONTEXT_LIST_FAILURE __MSABI_LONG(0xC0001068) #define EVENT_TCPIP_TCP_CONNECT_LIMIT_REACHED __MSABI_LONG(0x80001082) #define EVENT_TCPIP_TCP_INIT_FAILED __MSABI_LONG(0xC0001081) #define EVENT_TCPIP_TCP_MPP_ATTACKS_DETECTED __MSABI_LONG(0x80001085) #define EVENT_TCPIP_TCP_TIME_WAIT_COLLISION __MSABI_LONG(0x80001083) #define EVENT_TCPIP_TCP_WSD_WS_RESTRICTED __MSABI_LONG(0x80001084) #define EVENT_TCPIP_TOO_MANY_GATEWAYS __MSABI_LONG(0x80001065) #define EVENT_TCPIP_TOO_MANY_NETS __MSABI_LONG(0xC0001059) #define EVENT_TCPIP_UDP_LIMIT_REACHED __MSABI_LONG(0x800010A9) #define EVENT_TRANSACT_INVALID __MSABI_LONG(0xC0001B64) #define EVENT_TRANSACT_TIMEOUT __MSABI_LONG(0xC0001B63) #define EVENT_TRANSPORT_ADAPTER_NOT_FOUND __MSABI_LONG(0xC000232E) #define EVENT_TRANSPORT_BAD_PROTOCOL __MSABI_LONG(0x40002333) #define EVENT_TRANSPORT_BINDING_FAILED __MSABI_LONG(0xC000232D) #define EVENT_TRANSPORT_QUERY_OID_FAILED __MSABI_LONG(0xC0002330) #define EVENT_TRANSPORT_REGISTER_FAILED __MSABI_LONG(0xC000232C) #define EVENT_TRANSPORT_RESOURCE_LIMIT __MSABI_LONG(0x8000232A) #define EVENT_TRANSPORT_RESOURCE_POOL __MSABI_LONG(0x80002329) #define EVENT_TRANSPORT_RESOURCE_SPECIFIC __MSABI_LONG(0x8000232B) #define EVENT_TRANSPORT_SET_OID_FAILED __MSABI_LONG(0xC000232F) #define EVENT_TRANSPORT_TOO_MANY_LINKS __MSABI_LONG(0x40002332) #define EVENT_TRANSPORT_TRANSFER_DATA __MSABI_LONG(0x40002331) #define EVENT_TRK_INTERNAL_ERROR __MSABI_LONG(0xC00030D4) #define EVENT_TRK_SERVICE_CORRUPT_LOG __MSABI_LONG(0xC00030D7) #define EVENT_TRK_SERVICE_DUPLICATE_VOLIDS __MSABI_LONG(0x400030DB) #define EVENT_TRK_SERVICE_MOVE_QUOTA_EXCEEDED __MSABI_LONG(0x800030DC) #define EVENT_TRK_SERVICE_START_FAILURE __MSABI_LONG(0xC00030D6) #define EVENT_TRK_SERVICE_START_SUCCESS __MSABI_LONG(0x400030D5) #define EVENT_TRK_SERVICE_VOLUME_CLAIM __MSABI_LONG(0x400030DA) #define EVENT_TRK_SERVICE_VOLUME_CREATE __MSABI_LONG(0x400030D9) #define EVENT_TRK_SERVICE_VOL_QUOTA_EXCEEDED __MSABI_LONG(0x800030D8) #define EVENT_UP_DRIVER_ON_MP __MSABI_LONG(0xC00017D4) #define EVENT_WEBCLIENT_CLOSE_DELETE_FAILED __MSABI_LONG(0x80003A36) #define EVENT_WEBCLIENT_CLOSE_PROPPATCH_FAILED __MSABI_LONG(0x80003A37) #define EVENT_WEBCLIENT_CLOSE_PUT_FAILED __MSABI_LONG(0x80003A35) #define EVENT_WEBCLIENT_SETINFO_PROPPATCH_FAILED __MSABI_LONG(0x80003A38) #define EVENT_WMI_CANT_GET_EVENT_DATA __MSABI_LONG(0x80002F49) #define EVENT_WMI_CANT_OPEN_DEVICE __MSABI_LONG(0xC0002EE0) #define EVENT_WMI_CANT_RESOLVE_INSTANCE __MSABI_LONG(0x80002F48) #define EVENT_WMI_INVALID_MOF __MSABI_LONG(0x80002F44) #define EVENT_WMI_INVALID_REGINFO __MSABI_LONG(0x80002F46) #define EVENT_WMI_INVALID_REGPATH __MSABI_LONG(0x80002F47) #define EVENT_WMI_MOF_LOAD_FAILURE __MSABI_LONG(0x80002F45) #define EVENT_WSK_OWNINGTHREAD_PARAMETER_IGNORED __MSABI_LONG(0xC0003E80) #define EXTRA_EXIT_POINT __MSABI_LONG(0xC00037DC) #define EXTRA_EXIT_POINT_DELETED __MSABI_LONG(0xC00037E0) #define EXTRA_EXIT_POINT_NOT_DELETED __MSABI_LONG(0xC00037E1) #define EXTRA_VOLUME __MSABI_LONG(0xC00037DF) #define EXTRA_VOLUME_DELETED __MSABI_LONG(0xC00037E6) #define EXTRA_VOLUME_NOT_DELETED __MSABI_LONG(0xC00037E7) #define KNOWLEDGE_INCONSISTENCY_DETECTED __MSABI_LONG(0xC00037E9) #define LM_REDIR_FAILURE __MSABI_LONG(0x40003841) #define MACHINE_UNJOINED __MSABI_LONG(0xC00037ED) #define MISSING_EXIT_POINT __MSABI_LONG(0xC00037DD) #define MISSING_EXIT_POINT_CREATED __MSABI_LONG(0xC00037E2) #define MISSING_EXIT_POINT_NOT_CREATED __MSABI_LONG(0xC00037E3) #define MISSING_VOLUME __MSABI_LONG(0xC00037DE) #define MISSING_VOLUME_CREATED __MSABI_LONG(0xC00037E4) #define MISSING_VOLUME_NOT_CREATED __MSABI_LONG(0xC00037E5) #define NET_DFS_ENUM __MSABI_LONG(0x400038A4) #define NET_DFS_ENUMEX __MSABI_LONG(0x400038A5) #define NOT_A_DFS_PATH __MSABI_LONG(0x40003840) #define NTFRSPRF_COLLECT_RPC_BINDING_ERROR_CONN __MSABI_LONG(0xC00034DC) #define NTFRSPRF_COLLECT_RPC_BINDING_ERROR_SET __MSABI_LONG(0xC00034DB) #define NTFRSPRF_COLLECT_RPC_CALL_ERROR_CONN __MSABI_LONG(0xC00034DE) #define NTFRSPRF_COLLECT_RPC_CALL_ERROR_SET __MSABI_LONG(0xC00034DD) #define NTFRSPRF_OPEN_RPC_BINDING_ERROR_CONN __MSABI_LONG(0xC00034D8) #define NTFRSPRF_OPEN_RPC_BINDING_ERROR_SET __MSABI_LONG(0xC00034D7) #define NTFRSPRF_OPEN_RPC_CALL_ERROR_CONN __MSABI_LONG(0xC00034DA) #define NTFRSPRF_OPEN_RPC_CALL_ERROR_SET __MSABI_LONG(0xC00034D9) #define NTFRSPRF_REGISTRY_ERROR_CONN __MSABI_LONG(0xC00034E2) #define NTFRSPRF_REGISTRY_ERROR_SET __MSABI_LONG(0xC00034E1) #define NTFRSPRF_VIRTUALALLOC_ERROR_CONN __MSABI_LONG(0xC00034E0) #define NTFRSPRF_VIRTUALALLOC_ERROR_SET __MSABI_LONG(0xC00034DF) #define NWSAP_EVENT_BADWANFILTER_VALUE __MSABI_LONG(0xC000214A) #define NWSAP_EVENT_BIND_FAILED __MSABI_LONG(0xC0002138) #define NWSAP_EVENT_CARDLISTEVENT_FAIL __MSABI_LONG(0xC000214B) #define NWSAP_EVENT_CARDMALLOC_FAILED __MSABI_LONG(0xC000213C) #define NWSAP_EVENT_CREATELPCEVENT_ERROR __MSABI_LONG(0xC0002147) #define NWSAP_EVENT_CREATELPCPORT_ERROR __MSABI_LONG(0xC0002146) #define NWSAP_EVENT_GETSOCKNAME_FAILED __MSABI_LONG(0xC0002139) #define NWSAP_EVENT_HASHTABLE_MALLOC_FAILED __MSABI_LONG(0xC0002144) #define NWSAP_EVENT_INVALID_FILTERNAME __MSABI_LONG(0x8000214D) #define NWSAP_EVENT_KEY_NOT_FOUND __MSABI_LONG(0xC0002134) #define NWSAP_EVENT_LPCHANDLEMEMORY_ERROR __MSABI_LONG(0xC0002149) #define NWSAP_EVENT_LPCLISTENMEMORY_ERROR __MSABI_LONG(0xC0002148) #define NWSAP_EVENT_NOCARDS __MSABI_LONG(0xC000213D) #define NWSAP_EVENT_OPTBCASTINADDR_FAILED __MSABI_LONG(0xC000213B) #define NWSAP_EVENT_OPTEXTENDEDADDR_FAILED __MSABI_LONG(0xC000213A) #define NWSAP_EVENT_OPTMAXADAPTERNUM_ERROR __MSABI_LONG(0xC0002153) #define NWSAP_EVENT_RECVSEM_FAIL __MSABI_LONG(0xC000213F) #define NWSAP_EVENT_SDMDEVENT_FAIL __MSABI_LONG(0xC000214C) #define NWSAP_EVENT_SENDEVENT_FAIL __MSABI_LONG(0xC0002140) #define NWSAP_EVENT_SETOPTBCAST_FAILED __MSABI_LONG(0xC0002137) #define NWSAP_EVENT_SOCKET_FAILED __MSABI_LONG(0xC0002136) #define NWSAP_EVENT_STARTLPCWORKER_ERROR __MSABI_LONG(0xC0002145) #define NWSAP_EVENT_STARTRECEIVE_ERROR __MSABI_LONG(0xC0002141) #define NWSAP_EVENT_STARTWANCHECK_ERROR __MSABI_LONG(0xC0002152) #define NWSAP_EVENT_STARTWANWORKER_ERROR __MSABI_LONG(0xC0002151) #define NWSAP_EVENT_STARTWORKER_ERROR __MSABI_LONG(0xC0002142) #define NWSAP_EVENT_TABLE_MALLOC_FAILED __MSABI_LONG(0xC0002143) #define NWSAP_EVENT_THREADEVENT_FAIL __MSABI_LONG(0xC000213E) #define NWSAP_EVENT_WANBIND_FAILED __MSABI_LONG(0xC0002150) #define NWSAP_EVENT_WANEVENT_ERROR __MSABI_LONG(0xC0002155) #define NWSAP_EVENT_WANHANDLEMEMORY_ERROR __MSABI_LONG(0xC0002154) #define NWSAP_EVENT_WANSEM_FAIL __MSABI_LONG(0xC000214E) #define NWSAP_EVENT_WANSOCKET_FAILED __MSABI_LONG(0xC000214F) #define NWSAP_EVENT_WSASTARTUP_FAILED __MSABI_LONG(0xC0002135) #define PREFIX_MISMATCH __MSABI_LONG(0xC00037EA) #define PREFIX_MISMATCH_FIXED __MSABI_LONG(0xC00037EB) #define PREFIX_MISMATCH_NOT_FIXED __MSABI_LONG(0xC00037EC) #define STATUS_SEVERITY_ERROR 0x3 #define STATUS_SEVERITY_INFORMATIONAL 0x1 #define STATUS_SEVERITY_SUCCESS 0x0 #define STATUS_SEVERITY_WARNING 0x2 #define TITLE_SC_MESSAGE_BOX __MSABI_LONG(0xC0001B75) #ifdef __cplusplus } #endif #endif /* __NETEVENT_H */
34,717
540
/* ---------------------------------------------------------------------------- ** Copyright (c) 2016 <NAME>, All Rights Reserved. ** ** Object.h ** --------------------------------------------------------------------------*/ #pragma once #include "JsonConfig.h" // Constructs a variant that wraps an object #define ObjectVariant(object) ursine::meta::Variant { object, ursine::meta::variant_policy::WrapObject( ) } namespace ursine { namespace meta { class Type; class Object { public: virtual ~Object(void) { } virtual Type GetType(void) const = 0; virtual Object *Clone(void) const = 0; virtual void OnSerialize(Json::object &output) const { } virtual void OnDeserialize(const Json &input) { } }; } }
293
7,471
<gh_stars>1000+ #include "mvContext.h" #include "dearpygui.h" #include "mvViewport.h" #include "mvCallbackRegistry.h" #include <thread> #include <future> #include <chrono> #include "mvProfiler.h" #include <implot.h> #include "mvFontManager.h" #include "mvCallbackRegistry.h" #include "mvPythonTranslator.h" #include "mvPythonExceptions.h" #include "mvGlobalIntepreterLock.h" #include <frameobject.h> #include "mvLog.h" #include "mvToolManager.h" #include <imnodes.h> #include <thread> #include <stb_image.h> #include "mvBuffer.h" #include "mvAppItemCommons.h" #include "mvItemRegistry.h" namespace Marvel { extern mvContext* GContext = nullptr; mv_internal void UpdateInputs(mvInput& input) { MV_PROFILE_SCOPE("Input Routing") // update mouse // mouse move event ImVec2 mousepos = ImGui::GetMousePos(); if (ImGui::IsMousePosValid(&mousepos)) { if (input.mouseGlobalPos.x != mousepos.x || input.mouseGlobalPos.y != mousepos.y) { input.mouseGlobalPos.x = (i32)mousepos.x; input.mouseGlobalPos.y = (i32)mousepos.y; } } // route key events for (i32 i = 0; i < IM_ARRAYSIZE(ImGui::GetIO().KeysDown); i++) { input.keysdown[i] = ImGui::GetIO().KeysDown[i]; input.keyspressed[i] = ImGui::GetIO().KeysDownDuration[i] == 0.0f; input.keysreleased[i] = ImGui::GetIO().KeysDownDurationPrev[i] >= 0.0f && !ImGui::GetIO().KeysDown[i]; // route key down event if (ImGui::GetIO().KeysDownDuration[i] >= 0.0f) input.keysdownduration[i] = (i32)(ImGui::GetIO().KeysDownDuration[i] * 100.0); } // route mouse wheel event if (ImGui::GetIO().MouseWheel != 0.0f) input.mousewheel = (i32)ImGui::GetIO().MouseWheel; // route mouse dragging event for (i32 i = 0; i < 3; i++) { input.mouseDragging[i] = ImGui::IsMouseDragging(i, (f32)input.mouseDragThreshold); if (ImGui::IsMouseDragging(i, (f32)input.mouseDragThreshold)) { input.mouseDragDelta.x = (i32)ImGui::GetMouseDragDelta().x; input.mouseDragDelta.y = (i32)ImGui::GetMouseDragDelta().y; break; } } // route other mouse events (note mouse move callbacks are handled in mvWindowAppItem) for (i32 i = 0; i < IM_ARRAYSIZE(ImGui::GetIO().MouseDown); i++) { input.mousedown[i] = ImGui::GetIO().MouseDown[i]; // route mouse down event if (ImGui::GetIO().MouseDownDuration[i] >= 0.0f) input.mousedownduration[i] = (i32)(ImGui::GetIO().MouseDownDuration[i] * 100.0); else input.mousedownduration[i] = 0; } } mvUUID GenerateUUID() { return ++GContext->id; } void SetDefaultTheme() { ImGuiStyle* style = &ImGui::GetStyle(); ImVec4* colors = style->Colors; colors[ImGuiCol_Text] = MV_BASE_COL_textColor; colors[ImGuiCol_TextDisabled] = MV_BASE_COL_textDisabledColor; colors[ImGuiCol_WindowBg] = mvImGuiCol_WindowBg; colors[ImGuiCol_ChildBg] = mvImGuiCol_ChildBg; colors[ImGuiCol_PopupBg] = mvImGuiCol_PopupBg; colors[ImGuiCol_Border] = mvImGuiCol_Border; colors[ImGuiCol_BorderShadow] = mvImGuiCol_BorderShadow; colors[ImGuiCol_FrameBg] = mvImGuiCol_FrameBg; colors[ImGuiCol_FrameBgHovered] = mvImGuiCol_FrameBgHovered; colors[ImGuiCol_FrameBgActive] = mvImGuiCol_FrameBgActive; colors[ImGuiCol_TitleBg] = mvImGuiCol_TitleBg; colors[ImGuiCol_TitleBgActive] = mvImGuiCol_TitleBgActive; colors[ImGuiCol_TitleBgCollapsed] = mvImGuiCol_TitleBgCollapsed; colors[ImGuiCol_MenuBarBg] = mvImGuiCol_MenuBarBg; colors[ImGuiCol_ScrollbarBg] = mvImGuiCol_ScrollbarBg; colors[ImGuiCol_ScrollbarGrab] = mvImGuiCol_ScrollbarGrab; colors[ImGuiCol_ScrollbarGrabHovered] = mvImGuiCol_ScrollbarGrabHovered; colors[ImGuiCol_ScrollbarGrabActive] = mvImGuiCol_ScrollbarGrabActive; colors[ImGuiCol_CheckMark] = mvImGuiCol_CheckMark; colors[ImGuiCol_SliderGrab] = mvImGuiCol_SliderGrab; colors[ImGuiCol_SliderGrabActive] = mvImGuiCol_SliderGrabActive; colors[ImGuiCol_Button] = mvImGuiCol_Button; colors[ImGuiCol_ButtonHovered] = mvImGuiCol_ButtonHovered; colors[ImGuiCol_ButtonActive] = mvImGuiCol_ButtonActive; colors[ImGuiCol_Header] = mvImGuiCol_Header; colors[ImGuiCol_HeaderHovered] = mvImGuiCol_HeaderHovered; colors[ImGuiCol_HeaderActive] = mvImGuiCol_HeaderActive; colors[ImGuiCol_Separator] = mvImGuiCol_Separator; colors[ImGuiCol_SeparatorHovered] = mvImGuiCol_SeparatorHovered; colors[ImGuiCol_SeparatorActive] = mvImGuiCol_SeparatorActive; colors[ImGuiCol_ResizeGrip] = mvImGuiCol_ResizeGrip; colors[ImGuiCol_ResizeGripHovered] = mvImGuiCol_ResizeGripHovered; colors[ImGuiCol_ResizeGripActive] = mvImGuiCol_ResizeGripHovered; colors[ImGuiCol_Tab] = mvImGuiCol_Tab; colors[ImGuiCol_TabHovered] = mvImGuiCol_TabHovered; colors[ImGuiCol_TabActive] = mvImGuiCol_TabActive; colors[ImGuiCol_TabUnfocused] = mvImGuiCol_TabUnfocused; colors[ImGuiCol_TabUnfocusedActive] = mvImGuiCol_TabUnfocusedActive; colors[ImGuiCol_DockingPreview] = mvImGuiCol_DockingPreview; colors[ImGuiCol_DockingEmptyBg] = mvImGuiCol_DockingEmptyBg; colors[ImGuiCol_PlotLines] = mvImGuiCol_PlotLines; colors[ImGuiCol_PlotLinesHovered] = mvImGuiCol_PlotLinesHovered; colors[ImGuiCol_PlotHistogram] = mvImGuiCol_PlotHistogram; colors[ImGuiCol_PlotHistogramHovered] = mvImGuiCol_PlotHistogramHovered; colors[ImGuiCol_TableHeaderBg] = mvImGuiCol_TableHeaderBg; colors[ImGuiCol_TableBorderStrong] = mvImGuiCol_TableBorderStrong; // Prefer using Alpha=1.0 here colors[ImGuiCol_TableBorderLight] = mvImGuiCol_TableBorderLight; // Prefer using Alpha=1.0 here colors[ImGuiCol_TableRowBg] = mvImGuiCol_TableRowBg; colors[ImGuiCol_TableRowBgAlt] = mvImGuiCol_TableRowBgAlt; colors[ImGuiCol_TextSelectedBg] = mvImGuiCol_TextSelectedBg; colors[ImGuiCol_DragDropTarget] = mvImGuiCol_DragDropTarget; colors[ImGuiCol_NavHighlight] = mvImGuiCol_NavHighlight; colors[ImGuiCol_NavWindowingHighlight] = mvImGuiCol_NavWindowingHighlight; colors[ImGuiCol_NavWindowingDimBg] = mvImGuiCol_NavWindowingDimBg; colors[ImGuiCol_ModalWindowDimBg] = mvImGuiCol_ModalWindowDimBg; imnodes::GetStyle().colors[imnodes::ColorStyle_NodeBackground] = mvColor::ConvertToUnsignedInt(mvColor(62, 62, 62, 255)); imnodes::GetStyle().colors[imnodes::ColorStyle_NodeBackgroundHovered] = mvColor::ConvertToUnsignedInt(mvColor(75, 75, 75, 255)); imnodes::GetStyle().colors[imnodes::ColorStyle_NodeBackgroundSelected] = mvColor::ConvertToUnsignedInt(mvColor(75, 75, 75, 255)); imnodes::GetStyle().colors[imnodes::ColorStyle_NodeOutline] = mvColor::ConvertToUnsignedInt(mvColor(100, 100, 100, 255)); imnodes::GetStyle().colors[imnodes::ColorStyle_TitleBar] = mvColor::ConvertToUnsignedInt(mvImGuiCol_TitleBg); imnodes::GetStyle().colors[imnodes::ColorStyle_TitleBarHovered] = mvColor::ConvertToUnsignedInt(mvImGuiCol_TitleBgActive); imnodes::GetStyle().colors[imnodes::ColorStyle_TitleBarSelected] = mvColor::ConvertToUnsignedInt(mvImGuiCol_FrameBgActive); imnodes::GetStyle().colors[imnodes::ColorStyle_Link] = mvColor::ConvertToUnsignedInt(mvColor(255, 255, 255, 200)); imnodes::GetStyle().colors[imnodes::ColorStyle_LinkHovered] = mvColor::ConvertToUnsignedInt(mvColor(66, 150, 250, 255)); imnodes::GetStyle().colors[imnodes::ColorStyle_LinkSelected] = mvColor::ConvertToUnsignedInt(mvColor(66, 150, 250, 255)); imnodes::GetStyle().colors[imnodes::ColorStyle_Pin] = mvColor::ConvertToUnsignedInt(mvColor(199, 199, 41, 255)); imnodes::GetStyle().colors[imnodes::ColorStyle_PinHovered] = mvColor::ConvertToUnsignedInt(mvColor(255, 255, 50, 255)); imnodes::GetStyle().colors[imnodes::ColorStyle_BoxSelector] = mvColor::ConvertToUnsignedInt(mvColor(61, 133, 224, 30)); imnodes::GetStyle().colors[imnodes::ColorStyle_BoxSelectorOutline] = mvColor::ConvertToUnsignedInt(mvColor(61, 133, 224, 150)); imnodes::GetStyle().colors[imnodes::ColorStyle_GridBackground] = mvColor::ConvertToUnsignedInt(mvColor(35, 35, 35, 255)); imnodes::GetStyle().colors[imnodes::ColorStyle_GridLine] = mvColor::ConvertToUnsignedInt(mvColor(0, 0, 0, 255)); } void Render() { // update timing GContext->deltaTime = ImGui::GetIO().DeltaTime; GContext->time = ImGui::GetTime(); GContext->frame = ImGui::GetFrameCount(); GContext->framerate = (i32)ImGui::GetIO().Framerate; ImGui::GetIO().FontGlobalScale = mvToolManager::GetFontManager().getGlobalFontScale(); if (GContext->IO.dockingViewport) ImGui::DockSpaceOverViewport(); mvFrameCallback(ImGui::GetFrameCount()); // route input callbacks UpdateInputs(GContext->input); mvToolManager::Draw(); { std::lock_guard<std::mutex> lk(GContext->mutex); if (GContext->resetTheme) { SetDefaultTheme(); GContext->resetTheme = false; } mvRunTasks(); RenderItemRegistry(*GContext->itemRegistry); mvRunTasks(); } if (GContext->waitOneFrame == true) GContext->waitOneFrame = false; } std::map<std::string, mvPythonParser>& GetParsers() { return const_cast<std::map<std::string, mvPythonParser>&>(GetModuleParsers()); } void InsertConstants_mvContext(std::vector<std::pair<std::string, long>>& constants) { //----------------------------------------------------------------------------- // Mouse Codes //----------------------------------------------------------------------------- constants.emplace_back("mvMouseButton_Left", 0); constants.emplace_back("mvMouseButton_Right", 1); constants.emplace_back("mvMouseButton_Middle", 2); constants.emplace_back("mvMouseButton_X1", 3); constants.emplace_back("mvMouseButton_X2", 4); //----------------------------------------------------------------------------- // Key Codes //----------------------------------------------------------------------------- constants.emplace_back("mvKey_0", 0x30); constants.emplace_back("mvKey_1", 0x31); constants.emplace_back("mvKey_2", 0x32); constants.emplace_back("mvKey_3", 0x33); constants.emplace_back("mvKey_4", 0x34); constants.emplace_back("mvKey_5", 0x35); constants.emplace_back("mvKey_6", 0x36); constants.emplace_back("mvKey_7", 0x37); constants.emplace_back("mvKey_8", 0x38); constants.emplace_back("mvKey_9", 0x39); constants.emplace_back("mvKey_A", 0x41); constants.emplace_back("mvKey_B", 0x42); constants.emplace_back("mvKey_C", 0x43); constants.emplace_back("mvKey_D", 0x44); constants.emplace_back("mvKey_E", 0x45); constants.emplace_back("mvKey_F", 0x46); constants.emplace_back("mvKey_G", 0x47); constants.emplace_back("mvKey_H", 0x48); constants.emplace_back("mvKey_I", 0x49); constants.emplace_back("mvKey_J", 0x4A); constants.emplace_back("mvKey_K", 0x4B); constants.emplace_back("mvKey_L", 0x4C); constants.emplace_back("mvKey_M", 0x4D); constants.emplace_back("mvKey_N", 0x4E); constants.emplace_back("mvKey_O", 0x4F); constants.emplace_back("mvKey_P", 0x50); constants.emplace_back("mvKey_Q", 0x51); constants.emplace_back("mvKey_R", 0x52); constants.emplace_back("mvKey_S", 0x53); constants.emplace_back("mvKey_T", 0x54); constants.emplace_back("mvKey_U", 0x55); constants.emplace_back("mvKey_V", 0x56); constants.emplace_back("mvKey_W", 0x57); constants.emplace_back("mvKey_X", 0x58); constants.emplace_back("mvKey_Y", 0x59); constants.emplace_back("mvKey_Z", 0x5A); #if defined (_WIN32) constants.emplace_back("mvKey_Back", 0x08); constants.emplace_back("mvKey_Tab", 0x09); constants.emplace_back("mvKey_Clear", 0x0C); constants.emplace_back("mvKey_Return", 0x0D); constants.emplace_back("mvKey_Shift", 0x10); constants.emplace_back("mvKey_Control", 0x11); constants.emplace_back("mvKey_Alt", 0x12); constants.emplace_back("mvKey_Pause", 0x13); constants.emplace_back("mvKey_Capital", 0x14); constants.emplace_back("mvKey_Escape", 0x1B); constants.emplace_back("mvKey_Spacebar", 0x20); constants.emplace_back("mvKey_Prior", 0x21); constants.emplace_back("mvKey_Next", 0x22); constants.emplace_back("mvKey_End", 0x23); constants.emplace_back("mvKey_Home", 0x24); constants.emplace_back("mvKey_Left", 0x25); constants.emplace_back("mvKey_Up", 0x26); constants.emplace_back("mvKey_Right", 0x27); constants.emplace_back("mvKey_Down", 0x28); constants.emplace_back("mvKey_Select", 0x29); constants.emplace_back("mvKey_Print", 0x2A); constants.emplace_back("mvKey_Execute", 0x2B); constants.emplace_back("mvKey_PrintScreen", 0x2C); constants.emplace_back("mvKey_Insert", 0x2D); constants.emplace_back("mvKey_Delete", 0x2E); constants.emplace_back("mvKey_Help", 0x2F); constants.emplace_back("mvKey_LWin", 0x5B); constants.emplace_back("mvKey_RWin", 0x5C); constants.emplace_back("mvKey_Apps", 0x5D); constants.emplace_back("mvKey_Sleep", 0x5F); constants.emplace_back("mvKey_NumPad0", 0x60); constants.emplace_back("mvKey_NumPad1", 0x61); constants.emplace_back("mvKey_NumPad2", 0x62); constants.emplace_back("mvKey_NumPad3", 0x63); constants.emplace_back("mvKey_NumPad4", 0x64); constants.emplace_back("mvKey_NumPad5", 0x65); constants.emplace_back("mvKey_NumPad6", 0x66); constants.emplace_back("mvKey_NumPad7", 0x67); constants.emplace_back("mvKey_NumPad8", 0x68); constants.emplace_back("mvKey_NumPad9", 0x69); constants.emplace_back("mvKey_Multiply", 0x6A); constants.emplace_back("mvKey_Add", 0x6B); constants.emplace_back("mvKey_Separator", 0x6C); constants.emplace_back("mvKey_Subtract", 0x6D); constants.emplace_back("mvKey_Decimal", 0x6E); constants.emplace_back("mvKey_Divide", 0x6F); constants.emplace_back("mvKey_F1", 0x70); constants.emplace_back("mvKey_F2", 0x71); constants.emplace_back("mvKey_F3", 0x72); constants.emplace_back("mvKey_F4", 0x73); constants.emplace_back("mvKey_F5", 0x74); constants.emplace_back("mvKey_F6", 0x75); constants.emplace_back("mvKey_F7", 0x76); constants.emplace_back("mvKey_F8", 0x77); constants.emplace_back("mvKey_F9", 0x78); constants.emplace_back("mvKey_F10", 0x79); constants.emplace_back("mvKey_F11", 0x7A); constants.emplace_back("mvKey_F12", 0x7B); constants.emplace_back("mvKey_F13", 0x7C); constants.emplace_back("mvKey_F14", 0x7D); constants.emplace_back("mvKey_F15", 0x7E); constants.emplace_back("mvKey_F16", 0x7F); constants.emplace_back("mvKey_F17", 0x80); constants.emplace_back("mvKey_F18", 0x81); constants.emplace_back("mvKey_F19", 0x82); constants.emplace_back("mvKey_F20", 0x83); constants.emplace_back("mvKey_F21", 0x84); constants.emplace_back("mvKey_F22", 0x85); constants.emplace_back("mvKey_F23", 0x86); constants.emplace_back("mvKey_F24", 0x87); constants.emplace_back("mvKey_NumLock", 0x90); constants.emplace_back("mvKey_ScrollLock", 0x91); constants.emplace_back("mvKey_LShift", 0xA0); constants.emplace_back("mvKey_RShift", 0xA1); constants.emplace_back("mvKey_LControl", 0xA2); constants.emplace_back("mvKey_RControl", 0xA3); constants.emplace_back("mvKey_LMenu", 0xA4); constants.emplace_back("mvKey_RMenu", 0xA5); constants.emplace_back("mvKey_Browser_Back", 0xA6); constants.emplace_back("mvKey_Browser_Forward", 0xA7); constants.emplace_back("mvKey_Browser_Refresh", 0xA8); constants.emplace_back("mvKey_Browser_Stop", 0xA9); constants.emplace_back("mvKey_Browser_Search", 0xAA); constants.emplace_back("mvKey_Browser_Favorites", 0xAB); constants.emplace_back("mvKey_Browser_Home", 0xAC); constants.emplace_back("mvKey_Volume_Mute", 0xAD); constants.emplace_back("mvKey_Volume_Down", 0xAE); constants.emplace_back("mvKey_Volume_Up", 0xAF); constants.emplace_back("mvKey_Media_Next_Track", 0xB0); constants.emplace_back("mvKey_Media_Prev_Track", 0xB1); constants.emplace_back("mvKey_Media_Stop", 0xB2); constants.emplace_back("mvKey_Media_Play_Pause", 0xB3); constants.emplace_back("mvKey_Launch_Mail", 0xB4); constants.emplace_back("mvKey_Launch_Media_Select", 0xB5); constants.emplace_back("mvKey_Launch_App1", 0xB6); constants.emplace_back("mvKey_Launch_App2", 0xB7); constants.emplace_back("mvKey_Colon", 0xBA); constants.emplace_back("mvKey_Plus", 0xBB); constants.emplace_back("mvKey_Comma", 0xBC); constants.emplace_back("mvKey_Minus", 0xBD); constants.emplace_back("mvKey_Period", 0xBE); constants.emplace_back("mvKey_Slash", 0xBF); constants.emplace_back("mvKey_Tilde", 0xC0); constants.emplace_back("mvKey_Open_Brace", 0xDB); constants.emplace_back("mvKey_Backslash", 0xDC); constants.emplace_back("mvKey_Close_Brace", 0xDD); constants.emplace_back("mvKey_Quote", 0xDE); #else constants.emplace_back("mvKey_Back", 259); constants.emplace_back("mvKey_Tab", 258); constants.emplace_back("mvKey_Clear", 259); constants.emplace_back("mvKey_Return", 257); constants.emplace_back("mvKey_Shift", 340); constants.emplace_back("mvKey_Control", 241); constants.emplace_back("mvKey_Alt", 342); constants.emplace_back("mvKey_Pause", 284); constants.emplace_back("mvKey_Capital", 280); constants.emplace_back("mvKey_Escape", 256); constants.emplace_back("mvKey_Spacebar", 32); constants.emplace_back("mvKey_Prior", 266); constants.emplace_back("mvKey_Next", 267); constants.emplace_back("mvKey_End", 269); constants.emplace_back("mvKey_Home", 268); constants.emplace_back("mvKey_Left", 263); constants.emplace_back("mvKey_Up", 265); constants.emplace_back("mvKey_Right", 262); constants.emplace_back("mvKey_Down", 264); constants.emplace_back("mvKey_Select", -1); constants.emplace_back("mvKey_Print", -1); constants.emplace_back("mvKey_Execute", -1); constants.emplace_back("mvKey_PrintScreen", 286); constants.emplace_back("mvKey_Insert", 260); constants.emplace_back("mvKey_Delete", 261); constants.emplace_back("mvKey_Help", -1); constants.emplace_back("mvKey_LWin", 343); constants.emplace_back("mvKey_RWin", 347); constants.emplace_back("mvKey_Apps", -1); constants.emplace_back("mvKey_Sleep", -1); constants.emplace_back("mvKey_NumPad0", 320); constants.emplace_back("mvKey_NumPad1", 321); constants.emplace_back("mvKey_NumPad2", 322); constants.emplace_back("mvKey_NumPad3", 323); constants.emplace_back("mvKey_NumPad4", 324); constants.emplace_back("mvKey_NumPad5", 325); constants.emplace_back("mvKey_NumPad6", 326); constants.emplace_back("mvKey_NumPad7", 327); constants.emplace_back("mvKey_NumPad8", 328); constants.emplace_back("mvKey_NumPad9", 329); constants.emplace_back("mvKey_Multiply", 332); constants.emplace_back("mvKey_Add", 334); constants.emplace_back("mvKey_Separator", -1); constants.emplace_back("mvKey_Subtract", 333); constants.emplace_back("mvKey_Decimal", 330); constants.emplace_back("mvKey_Divide", 331); constants.emplace_back("mvKey_F1", 290); constants.emplace_back("mvKey_F2", 291); constants.emplace_back("mvKey_F3", 292); constants.emplace_back("mvKey_F4", 293); constants.emplace_back("mvKey_F5", 294); constants.emplace_back("mvKey_F6", 295); constants.emplace_back("mvKey_F7", 296); constants.emplace_back("mvKey_F8", 297); constants.emplace_back("mvKey_F9", 298); constants.emplace_back("mvKey_F10", 299); constants.emplace_back("mvKey_F11", 300); constants.emplace_back("mvKey_F12", 301); constants.emplace_back("mvKey_F13", 302); constants.emplace_back("mvKey_F14", 303); constants.emplace_back("mvKey_F15", 304); constants.emplace_back("mvKey_F16", 305); constants.emplace_back("mvKey_F17", 306); constants.emplace_back("mvKey_F18", 307); constants.emplace_back("mvKey_F19", 308); constants.emplace_back("mvKey_F20", 309); constants.emplace_back("mvKey_F21", 310); constants.emplace_back("mvKey_F22", 311); constants.emplace_back("mvKey_F23", 312); constants.emplace_back("mvKey_F24", 313); constants.emplace_back("mvKey_F24", 314); constants.emplace_back("mvKey_NumLock", 282); constants.emplace_back("mvKey_ScrollLock", 281); constants.emplace_back("mvKey_LShift", 340); constants.emplace_back("mvKey_RShift", 344); constants.emplace_back("mvKey_LControl", 341); constants.emplace_back("mvKey_RControl", 345); constants.emplace_back("mvKey_LMenu", -1); constants.emplace_back("mvKey_RMenu", -1); constants.emplace_back("mvKey_Browser_Back", -1); constants.emplace_back("mvKey_Browser_Forward", -1); constants.emplace_back("mvKey_Browser_Refresh", -1); constants.emplace_back("mvKey_Browser_Stop", -1); constants.emplace_back("mvKey_Browser_Search", -1); constants.emplace_back("mvKey_Browser_Favorites", -1); constants.emplace_back("mvKey_Browser_Home", -1); constants.emplace_back("mvKey_Volume_Mute", -1); constants.emplace_back("mvKey_Volume_Down", -1); constants.emplace_back("mvKey_Volume_Up", -1); constants.emplace_back("mvKey_Media_Next_Track", -1); constants.emplace_back("mvKey_Media_Prev_Track", -1); constants.emplace_back("mvKey_Media_Stop", -1); constants.emplace_back("mvKey_Media_Play_Pause", -1); constants.emplace_back("mvKey_Launch_Mail", -1); constants.emplace_back("mvKey_Launch_Media_Select", -1); constants.emplace_back("mvKey_Launch_App1", -1); constants.emplace_back("mvKey_Launch_App2", -1); constants.emplace_back("mvKey_Colon", 59); constants.emplace_back("mvKey_Plus", 61); constants.emplace_back("mvKey_Comma", 44); constants.emplace_back("mvKey_Minus", 45); constants.emplace_back("mvKey_Period", 46); constants.emplace_back("mvKey_Slash", 47); constants.emplace_back("mvKey_Tilde", 96); constants.emplace_back("mvKey_Open_Brace", 91); constants.emplace_back("mvKey_Backslash", 92); constants.emplace_back("mvKey_Close_Brace", 93); constants.emplace_back("mvKey_Quote", 39); #endif } }
11,385
563
<gh_stars>100-1000 package com.gentics.mesh.core.field.binary; import static com.gentics.mesh.core.field.binary.BinaryFieldTestHelper.CREATE_EMPTY; import static com.gentics.mesh.core.field.binary.BinaryFieldTestHelper.FETCH; import static com.gentics.mesh.core.field.binary.BinaryFieldTestHelper.FILL_BASIC; import static org.assertj.core.api.Assertions.assertThat; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.util.Base64; import org.apache.commons.io.IOUtils; import org.junit.Test; import com.gentics.mesh.context.InternalActionContext; import com.gentics.mesh.core.data.NodeGraphFieldContainer; import com.gentics.mesh.core.data.binary.HibBinary; import com.gentics.mesh.core.data.container.impl.NodeGraphFieldContainerImpl; import com.gentics.mesh.core.data.dao.ContentDaoWrapper; import com.gentics.mesh.core.data.node.HibNode; import com.gentics.mesh.core.data.node.field.BinaryGraphField; import com.gentics.mesh.core.data.node.field.GraphField; import com.gentics.mesh.core.db.Tx; import com.gentics.mesh.core.endpoint.node.TransformationResult; import com.gentics.mesh.core.field.AbstractFieldTest; import com.gentics.mesh.core.image.ImageInfo; import com.gentics.mesh.core.rest.node.NodeResponse; import com.gentics.mesh.core.rest.node.field.BinaryField; import com.gentics.mesh.core.rest.node.field.Field; import com.gentics.mesh.core.rest.node.field.impl.BinaryFieldImpl; import com.gentics.mesh.core.rest.node.field.impl.StringFieldImpl; import com.gentics.mesh.core.rest.schema.BinaryFieldSchema; import com.gentics.mesh.core.rest.schema.SchemaVersionModel; import com.gentics.mesh.core.rest.schema.impl.BinaryFieldSchemaImpl; import com.gentics.mesh.json.JsonUtil; import com.gentics.mesh.test.TestSize; import com.gentics.mesh.test.context.MeshTestSetting; import com.gentics.mesh.util.FileUtils; import com.gentics.mesh.util.UUIDUtil; import io.reactivex.Flowable; import io.reactivex.Single; import io.vertx.core.buffer.Buffer; @MeshTestSetting(testSize = TestSize.PROJECT_AND_NODE, startServer = false) public class BinaryFieldTest extends AbstractFieldTest<BinaryFieldSchema> { private static final String BINARY_FIELD = "binaryField"; private static final Base64.Decoder BASE64 = Base64.getDecoder(); @Override protected BinaryFieldSchema createFieldSchema(boolean isRequired) { BinaryFieldSchema binaryFieldSchema = new BinaryFieldSchemaImpl(); binaryFieldSchema.setName(BINARY_FIELD); binaryFieldSchema.setAllowedMimeTypes("image/jpg", "text/plain"); binaryFieldSchema.setRequired(isRequired); return binaryFieldSchema; } @Test public void testBinaryFieldBase64() { try (Tx tx = tx()) { String input = ""; while (input.length() < 32 * 1024) { input = input.concat("Hallo"); } HibBinary binary = tx.binaries().create("hashsum", 1L).runInExistingTx(tx); mesh().binaryStorage().store(Flowable.just(Buffer.buffer(input)), binary.getUuid()).blockingAwait(); String base64 = tx.binaryDao().getBase64ContentSync(binary); assertEquals(input.toString(), new String(BASE64.decode(base64))); } } @Test public void testBinaryFieldBase641Char() { try (Tx tx = tx()) { String input = " "; HibBinary binary = tx.binaries().create("hashsum", 1L).runInExistingTx(tx); mesh().binaryStorage().store(Flowable.just(Buffer.buffer(input)), binary.getUuid()).blockingAwait(); String base64 = tx.binaryDao().getBase64ContentSync(binary); assertEquals(input.toString(), new String(BASE64.decode(base64))); } } @Test @Override public void testFieldTransformation() throws Exception { String hash = "6a793cf1c7f6ef022ba9fff65ed43ddac9fb9c2131ffc4eaa3f49212244c0d4191ae5877b03bd50fd137bd9e5a16799da4a1f2846f0b26e3d956c4d8423004cc"; HibNode node = folder("2015"); try (Tx tx = tx()) { ContentDaoWrapper contentDao = tx.contentDao(); // Update the schema and add a binary field SchemaVersionModel schema = node.getSchemaContainer().getLatestVersion().getSchema(); schema.addField(createFieldSchema(true)); node.getSchemaContainer().getLatestVersion().setSchema(schema); NodeGraphFieldContainer container = contentDao.getLatestDraftFieldContainer(node, english()); HibBinary binary = tx.binaries().create(hash, 10L).runInExistingTx(tx); BinaryGraphField field = container.createBinary(BINARY_FIELD, binary); field.setMimeType("image/jpg"); binary.setImageHeight(200); binary.setImageWidth(300); tx.success(); } try (Tx tx = tx()) { String json = getJson(node); assertNotNull(json); NodeResponse response = JsonUtil.readValue(json, NodeResponse.class); assertNotNull(response); BinaryField deserializedNodeField = response.getFields().getBinaryField(BINARY_FIELD); assertNotNull(deserializedNodeField); assertEquals(hash, deserializedNodeField.getSha512sum()); assertEquals(200, deserializedNodeField.getHeight().intValue()); assertEquals(300, deserializedNodeField.getWidth().intValue()); } } @Test @Override public void testFieldUpdate() { try (Tx tx = tx()) { NodeGraphFieldContainerImpl container = tx.getGraph().addFramedVertex(NodeGraphFieldContainerImpl.class); HibBinary binary = tx.binaries().create( "6a793cf1c7f6ef022ba9fff65ed43ddac9fb9c2131ffc4eaa3f49212244c0d4191ae5877b03bd50fd137bd9e5a16799da4a1f2846f0b26e3d956c4d8423004cc", 0L).runInExistingTx(tx); BinaryGraphField field = container.createBinary(BINARY_FIELD, binary); field.getBinary().setSize(220); assertNotNull(field); assertEquals(BINARY_FIELD, field.getFieldKey()); field.setFileName("blume.jpg"); field.setMimeType("image/jpg"); field.setImageDominantColor("#22A7F0"); field.getBinary().setImageHeight(133); field.getBinary().setImageWidth(7); BinaryGraphField loadedField = container.getBinary(BINARY_FIELD); HibBinary loadedBinary = loadedField.getBinary(); assertNotNull("The previously created field could not be found.", loadedField); assertEquals(220, loadedBinary.getSize()); assertEquals("blume.jpg", loadedField.getFileName()); assertEquals("image/jpg", loadedField.getMimeType()); assertEquals("#22A7F0", loadedField.getImageDominantColor()); assertEquals(133, loadedField.getBinary().getImageHeight().intValue()); assertEquals(7, loadedField.getBinary().getImageWidth().intValue()); assertEquals( "6a793cf1c7f6ef022ba9fff65ed43ddac9fb9c2131ffc4eaa3f49212244c0d4191ae5877b03bd50fd137bd9e5a16799da4a1f2846f0b26e3d956c4d8423004cc", loadedBinary.getSHA512Sum()); } } @Test @Override public void testClone() { try (Tx tx = tx()) { NodeGraphFieldContainerImpl container = tx.getGraph().addFramedVertex(NodeGraphFieldContainerImpl.class); HibBinary binary = tx.binaries().create( "6a793cf1c7f6ef022ba9fff65ed43ddac9fb9c2131ffc4eaa3f49212244c0d4191ae5877b03bd50fd137bd9e5a16799da4a1f2846f0b26e3d956c4d8423004cc", 0L).runInExistingTx(tx); BinaryGraphField field = container.createBinary(BINARY_FIELD, binary); field.getBinary().setSize(220); assertNotNull(field); assertEquals(BINARY_FIELD, field.getFieldKey()); field.setFileName("blume.jpg"); field.setMimeType("image/jpg"); field.setImageDominantColor("#22A7F0"); field.getBinary().setImageHeight(133); field.getBinary().setImageWidth(7); NodeGraphFieldContainerImpl otherContainer = tx.getGraph().addFramedVertex(NodeGraphFieldContainerImpl.class); field.cloneTo(otherContainer); BinaryGraphField clonedField = otherContainer.getBinary(BINARY_FIELD); assertThat(clonedField).as("cloned field").isNotNull().isEqualToIgnoringGivenFields(field, "outV", "id", "uuid", "element"); assertThat(clonedField.getBinary()).as("referenced binary of cloned field").isNotNull().isEqualToComparingFieldByField(field.getBinary()); } } @Test @Override public void testEquals() { try (Tx tx = tx()) { NodeGraphFieldContainerImpl container = tx.getGraph().addFramedVertex(NodeGraphFieldContainerImpl.class); HibBinary binary = tx.binaries().create(UUIDUtil.randomUUID(), 1L).runInExistingTx(tx); BinaryGraphField fieldA = container.createBinary("fieldA", binary); BinaryGraphField fieldB = container.createBinary("fieldB", binary); assertTrue("The field should be equal to itself", fieldA.equals(fieldA)); fieldA.setFileName("someText"); assertTrue("The field should be equal to itself", fieldA.equals(fieldA)); assertFalse("The field should not be equal to a non-string field", fieldA.equals("bogus")); assertFalse("The field should not be equal since fieldB has no value", fieldA.equals(fieldB)); fieldB.setFileName("someText"); assertTrue("Both fields have the same value and should be equal", fieldA.equals(fieldB)); } } @Test @Override public void testEqualsNull() { try (Tx tx = tx()) { NodeGraphFieldContainerImpl container = tx.getGraph().addFramedVertex(NodeGraphFieldContainerImpl.class); HibBinary binary = tx.binaries().create(UUIDUtil.randomUUID(), 0L).runInExistingTx(tx); BinaryGraphField fieldA = container.createBinary(BINARY_FIELD, binary); assertFalse(fieldA.equals((Field) null)); assertFalse(fieldA.equals((GraphField) null)); } } @Test @Override public void testEqualsRestField() { try (Tx tx = tx()) { NodeGraphFieldContainerImpl container = tx.getGraph().addFramedVertex(NodeGraphFieldContainerImpl.class); HibBinary binary = tx.binaries().create("hashsum", 1L).runInExistingTx(tx); BinaryGraphField fieldA = container.createBinary("fieldA", binary); // graph empty - rest empty assertTrue("The field should be equal to the html rest field since both fields have no value.", fieldA.equals(new BinaryFieldImpl())); // graph set - rest set - same value - different type fieldA.setFileName("someText"); assertFalse("The field should not be equal to a string rest field. Even if it has the same value", fieldA.equals(new StringFieldImpl() .setString("someText"))); // graph set - rest set - different value assertFalse("The field should not be equal to the rest field since the rest field has a different value.", fieldA.equals( new BinaryFieldImpl().setFileName("blub"))); // graph set - rest set - same value assertTrue("The binary field filename value should be equal to a rest field with the same value", fieldA.equals(new BinaryFieldImpl() .setFileName("someText"))); } } @Test @Override public void testUpdateFromRestNullOnCreate() { try (Tx tx = tx()) { invokeUpdateFromRestTestcase(BINARY_FIELD, FETCH, CREATE_EMPTY); } } @Test @Override public void testUpdateFromRestNullOnCreateRequired() { try (Tx tx = tx()) { invokeUpdateFromRestNullOnCreateRequiredTestcase(BINARY_FIELD, FETCH, false); } } @Test @Override public void testRemoveFieldViaNull() { try (Tx tx = tx()) { InternalActionContext ac = mockActionContext(); invokeRemoveFieldViaNullTestcase(BINARY_FIELD, FETCH, FILL_BASIC, (node) -> { updateContainer(ac, node, BINARY_FIELD, null); }); } } @Test @Override public void testRemoveRequiredFieldViaNull() { try (Tx tx = tx()) { InternalActionContext ac = mockActionContext(); invokeRemoveRequiredFieldViaNullTestcase(BINARY_FIELD, FETCH, FILL_BASIC, (container) -> { updateContainer(ac, container, BINARY_FIELD, null); }); } } @Test @Override public void testUpdateFromRestValidSimpleValue() { try (Tx tx = tx()) { InternalActionContext ac = mockActionContext(); invokeUpdateFromRestValidSimpleValueTestcase(BINARY_FIELD, FILL_BASIC, (container) -> { BinaryField field = new BinaryFieldImpl(); field.setFileName("someFile.txt"); updateContainer(ac, container, BINARY_FIELD, field); }, (container) -> { BinaryGraphField field = container.getBinary(BINARY_FIELD); assertNotNull("The graph field {" + BINARY_FIELD + "} could not be found.", field); assertEquals("The html of the field was not updated.", "someFile.txt", field.getFileName()); }); } } /** * Verifies that the buffer stream of a source can be handled in parallel for hashing and image prop extraction. * * @throws IOException */ @Test public void testMultiStreamHandling() throws IOException { InputStream ins = getClass().getResourceAsStream("/pictures/blume.jpg"); byte[] bytes = IOUtils.toByteArray(ins); Flowable<Buffer> obs = Flowable.just(Buffer.buffer(bytes)).publish().autoConnect(2); File file = new File("target", "file" + System.currentTimeMillis()); try (FileOutputStream fos = new FileOutputStream(file)) { IOUtils.write(bytes, fos); fos.flush(); } Single<ImageInfo> info = mesh().imageManipulator().readImageInfo(file.getAbsolutePath()); // Two obs handler Single<String> hash = FileUtils.hash(obs); Single<String> store = mesh().binaryStorage().store(obs, "bogus").toSingleDefault("null"); TransformationResult result = Single.zip(hash, info, store, (hashV, infoV, storeV) -> { return new TransformationResult(hashV, 0, infoV, "blume.jpg"); }).blockingGet(); assertNotNull(result.getHash()); assertEquals(1376, result.getImageInfo().getHeight().intValue()); assertEquals(1160, result.getImageInfo().getWidth().intValue()); } }
4,840
755
/** * @project: Overload * @author: <NAME>. * @licence: MIT */ #include <OvPhysics/Entities/PhysicalSphere.h> #include <OvUI/Widgets/Drags/DragFloat.h> #include "OvCore/ECS/Components/CPhysicalSphere.h" #include "OvCore/ECS/Actor.h" using namespace OvPhysics::Entities; OvCore::ECS::Components::CPhysicalSphere::CPhysicalSphere(ECS::Actor & p_owner) : CPhysicalObject(p_owner) { m_physicalObject = std::make_unique<PhysicalSphere>(p_owner.transform.GetFTransform()); m_physicalObject->SetUserData<std::reference_wrapper<CPhysicalObject>>(*this); BindListener(); Init(); } std::string OvCore::ECS::Components::CPhysicalSphere::GetName() { return "Physical Sphere"; } void OvCore::ECS::Components::CPhysicalSphere::SetRadius(float p_radius) { GetPhysicalObjectAs<PhysicalSphere>().SetRadius(p_radius); } float OvCore::ECS::Components::CPhysicalSphere::GetRadius() const { return GetPhysicalObjectAs<PhysicalSphere>().GetRadius(); } void OvCore::ECS::Components::CPhysicalSphere::OnSerialize(tinyxml2::XMLDocument & p_doc, tinyxml2::XMLNode * p_node) { CPhysicalObject::OnSerialize(p_doc, p_node); Helpers::Serializer::SerializeFloat(p_doc, p_node, "radius", GetRadius()); } void OvCore::ECS::Components::CPhysicalSphere::OnDeserialize(tinyxml2::XMLDocument & p_doc, tinyxml2::XMLNode * p_node) { CPhysicalObject::OnDeserialize(p_doc, p_node); SetRadius(Helpers::Serializer::DeserializeFloat(p_doc, p_node, "radius")); } void OvCore::ECS::Components::CPhysicalSphere::OnInspector(OvUI::Internal::WidgetContainer & p_root) { CPhysicalObject::OnInspector(p_root); Helpers::GUIDrawer::DrawScalar<float>(p_root, "Radius", std::bind(&CPhysicalSphere::GetRadius, this), std::bind(&CPhysicalSphere::SetRadius, this, std::placeholders::_1), 0.1f, 0.f, 100000.f); }
652
831
/* * Copyright (C) 2015 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.tools.idea.run.activity; import com.android.tools.idea.apk.ApkFacet; import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.module.Module; import com.intellij.psi.PsiClass; import com.intellij.util.xml.DomElement; import org.jetbrains.android.dom.converters.PackageClassConverter; import org.jetbrains.android.dom.manifest.Activity; import org.jetbrains.android.dom.manifest.ActivityAlias; import org.jetbrains.android.dom.manifest.Application; import org.jetbrains.android.dom.manifest.Manifest; import org.jetbrains.android.util.AndroidUtils; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.w3c.dom.Attr; import org.w3c.dom.Element; import org.w3c.dom.Node; import static com.android.SdkConstants.*; import static com.android.xml.AndroidManifest.NODE_ACTION; import static com.android.xml.AndroidManifest.NODE_CATEGORY; public class ActivityLocatorUtils { public static boolean containsAction(@NotNull Element filter, @NotNull String name) { Node action = filter.getFirstChild(); while (action != null) { if (action.getNodeType() == Node.ELEMENT_NODE && NODE_ACTION.equals(action.getNodeName())) { if (name.equals(((Element)action).getAttributeNS(ANDROID_URI, ATTR_NAME))) { return true; } } action = action.getNextSibling(); } return false; } public static boolean containsCategory(@NotNull Element filter, @NotNull String name) { Node action = filter.getFirstChild(); while (action != null) { if (action.getNodeType() == Node.ELEMENT_NODE && NODE_CATEGORY.equals(action.getNodeName())) { if (name.equals(((Element)action).getAttributeNS(ANDROID_URI, ATTR_NAME))) { return true; } } action = action.getNextSibling(); } return false; } public static boolean containsLauncherIntent(@NotNull DefaultActivityLocator.ActivityWrapper activity) { return activity.hasAction(AndroidUtils.LAUNCH_ACTION_NAME) && (activity.hasCategory(AndroidUtils.LAUNCH_CATEGORY_NAME) || activity.hasCategory(AndroidUtils.LEANBACK_LAUNCH_CATEGORY_NAME)); } @Nullable public static String getQualifiedName(@NotNull Element component) { Attr nameNode = component.getAttributeNodeNS(ANDROID_URI, ATTR_NAME); if (nameNode == null) { return null; } String name = nameNode.getValue(); int dotIndex = name.indexOf('.'); if (dotIndex > 0) { // fully qualified return name; } // attempt to retrieve the package name from the manifest in which this alias was defined Element root = component.getOwnerDocument().getDocumentElement(); Attr pkgNode = root.getAttributeNode(ATTR_PACKAGE); if (pkgNode != null) { // if we have a package name, prepend that to the activity alias String pkg = pkgNode.getValue(); return pkg + (dotIndex == -1 ? "." : "") + name; } return name; } @Nullable public static String getQualifiedName(@NotNull ActivityAlias alias) { ApplicationManager.getApplication().assertReadAccessAllowed(); String name = alias.getName().getStringValue(); if (name == null) { return null; } int dotIndex = name.indexOf('.'); if (dotIndex > 0) { // fully qualified return name; } // attempt to retrieve the package name from the manifest in which this alias was defined String pkg = null; DomElement parent = alias.getParent(); if (parent instanceof Application) { parent = parent.getParent(); if (parent instanceof Manifest) { Manifest manifest = (Manifest)parent; pkg = manifest.getPackage().getStringValue(); } } // if we have a package name, prepend that to the activity alias return pkg == null ? name : pkg + (dotIndex == -1 ? "." : "") + name; } @Nullable public static String getQualifiedName(@NotNull Activity activity) { ApplicationManager.getApplication().assertReadAccessAllowed(); PsiClass psiClass = activity.getActivityClass().getValue(); if (psiClass == null) { Module module = activity.getModule(); if (module != null && ApkFacet.getInstance(module) != null) { // In APK project we doesn't necessarily have the source/class file of the activity. return activity.getActivityClass().getStringValue(); } return null; } return getQualifiedActivityName(psiClass); } /** * Returns a fully qualified activity name as accepted by "am start" command: In particular, rather than return "com.foo.Bar.Inner", * this will return "com.foo.Bar$Inner" for inner classes. */ @Nullable public static String getQualifiedActivityName(@NotNull PsiClass c) { return PackageClassConverter.getQualifiedName(c); } }
1,854
746
<reponame>zhiqwang/mmdeploy<gh_stars>100-1000 # Copyright (c) OpenMMLab. All rights reserved. import torch from mmdeploy.core import FUNCTION_REWRITER @FUNCTION_REWRITER.register_rewriter( func_name='mmdet.core.bbox.coder.tblr_bbox_coder.tblr2bboxes', backend='default') def tblr2bboxes(ctx, priors, tblr, normalizer=4.0, normalize_by_wh=True, max_shape=None, clip_border=True): """Rewrite `tblr2bboxes` for default backend. Since the need of clip op with dynamic min and max, this function uses clip_bboxes function to support dynamic shape. Args: ctx (ContextCaller): The context with additional information. priors (Tensor): Prior boxes in point form (x0, y0, x1, y1) Shape: (N,4) or (B, N, 4). tblr (Tensor): Coords of network output in tblr form Shape: (N, 4) or (B, N, 4). normalizer (Sequence[float] | float): Normalization parameter of encoded boxes. By list, it represents the normalization factors at tblr dims. By float, it is the unified normalization factor at all dims. Default: 4.0 normalize_by_wh (bool): Whether the tblr coordinates have been normalized by the side length (wh) of prior bboxes. max_shape (Sequence[int] or torch.Tensor or Sequence[ Sequence[int]],optional): Maximum bounds for boxes, specifies (H, W, C) or (H, W). If priors shape is (B, N, 4), then the max_shape should be a Sequence[Sequence[int]] and the length of max_shape should also be B. clip_border (bool, optional): Whether clip the objects outside the border of the image. Defaults to True. Return: bboxes (Tensor): Boxes with shape (N, 4) or (B, N, 4) """ if not isinstance(normalizer, float): normalizer = torch.tensor(normalizer, device=priors.device) assert len(normalizer) == 4, 'Normalizer must have length = 4' assert priors.size(0) == tblr.size(0) if priors.ndim == 3: assert priors.size(1) == tblr.size(1) loc_decode = tblr * normalizer prior_centers = (priors[..., 0:2] + priors[..., 2:4]) / 2 if normalize_by_wh: wh = priors[..., 2:4] - priors[..., 0:2] w, h = torch.split(wh, 1, dim=-1) # Inplace operation with slice would fail for exporting to ONNX th = h * loc_decode[..., :2] # tb tw = w * loc_decode[..., 2:] # lr loc_decode = torch.cat([th, tw], dim=-1) top, bottom, left, right = loc_decode.split((1, 1, 1, 1), dim=-1) xmin = prior_centers[..., 0].unsqueeze(-1) - left xmax = prior_centers[..., 0].unsqueeze(-1) + right ymin = prior_centers[..., 1].unsqueeze(-1) - top ymax = prior_centers[..., 1].unsqueeze(-1) + bottom if clip_border and max_shape is not None: from mmdeploy.codebase.mmdet.deploy import clip_bboxes xmin, ymin, xmax, ymax = clip_bboxes(xmin, ymin, xmax, ymax, max_shape) bboxes = torch.cat([xmin, ymin, xmax, ymax], dim=-1).view(priors.size()) return bboxes
1,400
14,668
// Copyright 2017 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. package org.chromium.chrome.browser.offlinepages; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import org.junit.Test; import org.junit.runner.RunWith; import org.robolectric.annotation.Config; import org.chromium.base.test.BaseRobolectricTestRunner; /** Unit tests for {@link OfflinePageOrigin}. */ @RunWith(BaseRobolectricTestRunner.class) @Config(manifest = Config.NONE) public class OfflinePageOriginUnitTest { @Test public void testEncodeAsJson() { String appName = "abc.xyz"; String[] signatures = new String[] {"deadbeef", "00c0ffee"}; OfflinePageOrigin origin = new OfflinePageOrigin(appName, signatures); assertEquals("[\"abc.xyz\",[\"deadbeef\",\"00c0ffee\"]]", origin.encodeAsJsonString()); } @Test public void testEquals() { String appName = "abc.xyz"; String[] signature1 = new String[] {"deadbeef", "00c0ffee"}; String[] signature2 = new String[] {"deadbeef", "fooba499"}; OfflinePageOrigin origin1 = new OfflinePageOrigin(appName, signature1); OfflinePageOrigin origin2 = new OfflinePageOrigin(appName, signature2); OfflinePageOrigin origin3 = new OfflinePageOrigin("", signature1); OfflinePageOrigin origin4 = new OfflinePageOrigin(appName, signature1); assertFalse("Equivalent to null", origin1.equals(null)); assertTrue("Not equivalent to self", origin1.equals(origin1)); assertFalse("Equivalent when signatures not equal", origin1.equals(origin2)); assertFalse("Equivalent when name not equal", origin1.equals(origin3)); assertTrue("Equally created items not equal", origin1.equals(origin4)); assertEquals("HashCode not equal to self", origin1.hashCode(), origin1.hashCode()); assertEquals( "HashCode not equal when items are equal", origin1.hashCode(), origin4.hashCode()); } }
748
12,718
<reponame>Bhuvanesh1208/ruby2.6.1<filename>msys64/mingw64/x86_64-w64-mingw32/include/_bsd_types.h /** * This file has no copyright assigned and is placed in the Public Domain. * This file is part of the mingw-w64 runtime package. * No warranty is given; refer to the file DISCLAIMER.PD within this package. */ #ifndef _BSDTYPES_DEFINED #define _BSDTYPES_DEFINED /* Make sure __LONG32 is defined. */ #include <_mingw.h> typedef unsigned char u_char; typedef unsigned short u_short; typedef unsigned int u_int; #pragma push_macro("u_long") #undef u_long typedef unsigned long u_long; #pragma pop_macro("u_long") #if defined(__GNUC__) || \ defined(__GNUG__) __extension__ #endif /* gcc / g++ */ typedef unsigned long long u_int64; #endif /* _BSDTYPES_DEFINED */ #if defined (__LP64__) && defined (u_long) typedef unsigned __LONG32 u_long; #endif
335
614
[ { "home": "Chelsea", "away": "Tottenham Hotspur", "homescore": "2", "awayscore": "2" }, { "home": "Genoa", "away": "AS Roma", "homescore": "2", "awayscore": "3" }, { "home": "Napoli", "away": "Atalanta", "homescore": "2", "awayscore": "1" }, { "home": "Málaga", "away": "Levante", "homescore": "3", "awayscore": "1" }, { "home": "<NAME>", "away": "VfB Stuttgart", "homescore": "6", "awayscore": "2" }, { "home": "Brighton &amp; Hove Albion", "away": "Derby County", "homescore": "1", "awayscore": "1" }, { "home": "Burnley", "away": "Queens Park Rangers", "homescore": "1", "awayscore": "0" }, { "home": "Chelsea", "away": "Tottenham Hotspur", "homescore": "2", "awayscore": "2" }, { "home": "Málaga", "away": "Levante", "homescore": "3", "awayscore": "1" }, { "home": "<NAME>", "away": "VfB Stuttgart", "homescore": "6", "awayscore": "2" }, { "home": "Genoa", "away": "AS Roma", "homescore": "2", "awayscore": "3" }, { "home": "Napoli", "away": "Atalanta", "homescore": "2", "awayscore": "1" }, { "home": "Brighton &amp; Hove Albion", "away": "Derby County", "homescore": "1", "awayscore": "1" }, { "home": "Burnley", "away": "Queens Park Rangers", "homescore": "1", "awayscore": "0" }, { "home": "Walsall", "away": "Fleetwood Town", "homescore": "3", "awayscore": "1" }, { "home": "Dundee", "away": "Dundee United", "homescore": "2", "awayscore": "1" }, { "home": "<NAME>", "away": "Leganes", "homescore": "1", "awayscore": "2" }, { "home": "Cesena", "away": "<NAME>", "homescore": "2", "awayscore": "1" }, { "home": "<NAME>", "away": "<NAME>", "homescore": "3", "awayscore": "0" }, { "home": "Valenciennes", "away": "AS <NAME>", "homescore": "1", "awayscore": "0" }, { "home": "Kasimpasa", "away": "Ankaraspor" }, { "home": "Esbjerg", "away": "O<NAME>K", "homescore": "0", "awayscore": "2" }, { "home": "AIK", "away": "<NAME>", "homescore": "0", "awayscore": "0" }, { "home": "Djurgarden", "away": "Ostersunds FK", "homescore": "3", "awayscore": "0" }, { "home": "<NAME>", "away": "IFK", "homescore": "2", "awayscore": "5" }, { "home": "IFK Norrkoping", "away": "Helsingborg", "homescore": "3", "awayscore": "0" }, { "home": "<NAME>", "away": "Orebro SK", "homescore": "3", "awayscore": "2" }, { "home": "Bodo/Glimt", "away": "Sarpsborg FK", "homescore": "0", "awayscore": "2" }, { "home": "Rosario Central", "away": "<NAME>", "homescore": "0", "awayscore": "1" }, { "home": "Tigre", "away": "Lanús", "homescore": "0", "awayscore": "1" }, { "home": "Temperley", "away": "<NAME>", "homescore": "1", "awayscore": "0" }, { "home": "<NAME>", "away": "Ctral. Córdoba SE", "homescore": "1", "awayscore": "0" }, { "home": "<NAME>", "away": "Tall<NAME> Córdoba", "homescore": "0", "awayscore": "1" }, { "home": "Barracas Central", "away": "Platense", "homescore": "1", "awayscore": "1" }, { "home": "<NAME>", "away": "Fénix", "homescore": "1", "awayscore": "1" }, { "home": "<NAME>", "away": "Flandria", "homescore": "1", "awayscore": "2" }, { "home": "UAI Urquiza", "away": "Atlanta", "homescore": "0", "awayscore": "1" }, { "home": "Liniers", "away": "Central Córdoba de Rosario", "homescore": "2", "awayscore": "1" }, { "home": "Midland", "away": "Sacachispas", "homescore": "0", "awayscore": "1" }, { "home": "<NAME>", "away": "Luján", "homescore": "1", "awayscore": "0" }, { "home": "<NAME>", "away": "Ituzaingó", "homescore": "1", "awayscore": "1" }, { "home": "<NAME>", "away": "Deportes Quindío", "homescore": "2", "awayscore": "2" }, { "home": "Barranquilla FC", "away": "America Cali" }, { "home": "Silver Stars", "away": "Orlando Pirates", "homescore": "2", "awayscore": "1" } ]
1,547
7,731
# This file is part of beets. # Copyright 2016, <NAME>. # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. """Tests for the 'bucket' plugin.""" import unittest from beetsplug import bucket from beets import config, ui from test.helper import TestHelper class BucketPluginTest(unittest.TestCase, TestHelper): def setUp(self): self.setup_beets() self.plugin = bucket.BucketPlugin() def tearDown(self): self.teardown_beets() def _setup_config(self, bucket_year=[], bucket_alpha=[], bucket_alpha_regex={}, extrapolate=False): config['bucket']['bucket_year'] = bucket_year config['bucket']['bucket_alpha'] = bucket_alpha config['bucket']['bucket_alpha_regex'] = bucket_alpha_regex config['bucket']['extrapolate'] = extrapolate self.plugin.setup() def test_year_single_year(self): """If a single year is given, range starts from this year and stops at the year preceding the one of next bucket.""" self._setup_config(bucket_year=['1950s', '1970s']) self.assertEqual(self.plugin._tmpl_bucket('1959'), '1950s') self.assertEqual(self.plugin._tmpl_bucket('1969'), '1950s') def test_year_single_year_last_folder(self): """If a single year is given for the last bucket, extend it to current year.""" self._setup_config(bucket_year=['1950', '1970']) self.assertEqual(self.plugin._tmpl_bucket('2014'), '1970') self.assertEqual(self.plugin._tmpl_bucket('2025'), '2025') def test_year_two_years(self): """Buckets can be named with the 'from-to' syntax.""" self._setup_config(bucket_year=['1950-59', '1960-1969']) self.assertEqual(self.plugin._tmpl_bucket('1959'), '1950-59') self.assertEqual(self.plugin._tmpl_bucket('1969'), '1960-1969') def test_year_multiple_years(self): """Buckets can be named by listing all the years""" self._setup_config(bucket_year=['1950,51,52,53']) self.assertEqual(self.plugin._tmpl_bucket('1953'), '1950,51,52,53') self.assertEqual(self.plugin._tmpl_bucket('1974'), '1974') def test_year_out_of_range(self): """If no range match, return the year""" self._setup_config(bucket_year=['1950-59', '1960-69']) self.assertEqual(self.plugin._tmpl_bucket('1974'), '1974') self._setup_config(bucket_year=[]) self.assertEqual(self.plugin._tmpl_bucket('1974'), '1974') def test_year_out_of_range_extrapolate(self): """If no defined range match, extrapolate all ranges using the most common syntax amongst existing buckets and return the matching one.""" self._setup_config(bucket_year=['1950-59', '1960-69'], extrapolate=True) self.assertEqual(self.plugin._tmpl_bucket('1914'), '1910-19') # pick single year format self._setup_config(bucket_year=['1962-81', '2002', '2012'], extrapolate=True) self.assertEqual(self.plugin._tmpl_bucket('1983'), '1982') # pick from-end format self._setup_config(bucket_year=['1962-81', '2002', '2012-14'], extrapolate=True) self.assertEqual(self.plugin._tmpl_bucket('1983'), '1982-01') # extrapolate add ranges, but never modifies existing ones self._setup_config(bucket_year=['1932', '1942', '1952', '1962-81', '2002'], extrapolate=True) self.assertEqual(self.plugin._tmpl_bucket('1975'), '1962-81') def test_alpha_all_chars(self): """Alphabet buckets can be named by listing all their chars""" self._setup_config(bucket_alpha=['ABCD', 'FGH', 'IJKL']) self.assertEqual(self.plugin._tmpl_bucket('garry'), 'FGH') def test_alpha_first_last_chars(self): """Alphabet buckets can be named by listing the 'from-to' syntax""" self._setup_config(bucket_alpha=['0->9', 'A->D', 'F-H', 'I->Z']) self.assertEqual(self.plugin._tmpl_bucket('garry'), 'F-H') self.assertEqual(self.plugin._tmpl_bucket('2pac'), '0->9') def test_alpha_out_of_range(self): """If no range match, return the initial""" self._setup_config(bucket_alpha=['ABCD', 'FGH', 'IJKL']) self.assertEqual(self.plugin._tmpl_bucket('errol'), 'E') self._setup_config(bucket_alpha=[]) self.assertEqual(self.plugin._tmpl_bucket('errol'), 'E') def test_alpha_regex(self): """Check regex is used""" self._setup_config(bucket_alpha=['foo', 'bar'], bucket_alpha_regex={'foo': '^[a-d]', 'bar': '^[e-z]'}) self.assertEqual(self.plugin._tmpl_bucket('alpha'), 'foo') self.assertEqual(self.plugin._tmpl_bucket('delta'), 'foo') self.assertEqual(self.plugin._tmpl_bucket('zeta'), 'bar') self.assertEqual(self.plugin._tmpl_bucket('Alpha'), 'A') def test_alpha_regex_mix(self): """Check mixing regex and non-regex is possible""" self._setup_config(bucket_alpha=['A - D', 'E - L'], bucket_alpha_regex={'A - D': '^[0-9a-dA-D…äÄ]'}) self.assertEqual(self.plugin._tmpl_bucket('alpha'), 'A - D') self.assertEqual(self.plugin._tmpl_bucket('Ärzte'), 'A - D') self.assertEqual(self.plugin._tmpl_bucket('112'), 'A - D') self.assertEqual(self.plugin._tmpl_bucket('…and Oceans'), 'A - D') self.assertEqual(self.plugin._tmpl_bucket('Eagles'), 'E - L') def test_bad_alpha_range_def(self): """If bad alpha range definition, a UserError is raised.""" with self.assertRaises(ui.UserError): self._setup_config(bucket_alpha=['$%']) def test_bad_year_range_def_no4digits(self): """If bad year range definition, a UserError is raised. Range origin must be expressed on 4 digits. """ with self.assertRaises(ui.UserError): self._setup_config(bucket_year=['62-64']) def test_bad_year_range_def_nodigits(self): """If bad year range definition, a UserError is raised. At least the range origin must be declared. """ with self.assertRaises(ui.UserError): self._setup_config(bucket_year=['nodigits']) def check_span_from_str(self, sstr, dfrom, dto): d = bucket.span_from_str(sstr) self.assertEqual(dfrom, d['from']) self.assertEqual(dto, d['to']) def test_span_from_str(self): self.check_span_from_str("1980 2000", 1980, 2000) self.check_span_from_str("1980 00", 1980, 2000) self.check_span_from_str("1930 00", 1930, 2000) self.check_span_from_str("1930 50", 1930, 1950) def suite(): return unittest.TestLoader().loadTestsFromName(__name__) if __name__ == '__main__': unittest.main(defaultTest='suite')
3,196
399
#pragma once #ifdef _WIN32 # define NOMINMAX #endif #define GLM_FORCE_RADIANS #define GLM_FORCE_DEPTH_ZERO_TO_ONE #include <glm/glm.hpp> #include <glm/gtc/matrix_transform.hpp> #include <glm/gtx/color_space.hpp> #include <glm/gtx/matrix_decompose.hpp> #include <glm/gtx/io.hpp> #include <glm/gtc/constants.hpp> #include <imgui/imgui.h> #include <string> #include <vector> #include <algorithm> #include <memory> typedef unsigned char uchar; typedef unsigned int uint; typedef unsigned long ulong; #ifdef _WIN32 # undef near # undef far # undef ERROR #endif #include "system/Logger.hpp" #define STD_HASH(ENUM_NAME) \ template <> struct std::hash<ENUM_NAME> { \ std::size_t operator()(const ENUM_NAME & t) const { return static_cast<std::underlying_type< ENUM_NAME >::type>(t); } \ };
342
307
<gh_stars>100-1000 # automatically generated by the FlatBuffers compiler, do not modify # namespace: FBOutput class DriveAxis(object): x = 1 y = 2 z = 4
60
7,409
# Generated by Django 3.0.11 on 2021-01-12 13:42 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("posthog", "0112_sessions_filter"), ] operations = [ migrations.AddField(model_name="cohort", name="is_static", field=models.BooleanField(default=False),), ]
130
348
{"nom":"<NAME>","circ":"8ème circonscription","dpt":"Var","inscrits":2396,"abs":1395,"votants":1001,"blancs":69,"nuls":16,"exp":916,"res":[{"nuance":"REM","nom":"<NAME>","voix":527},{"nuance":"FN","nom":"<NAME>","voix":389}]}
90
3,807
/* * Copyright 2019 Google * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #import <Foundation/Foundation.h> #import "FirebaseInstallations/Source/Library/Public/FirebaseInstallations/FIRInstallationsErrors.h" @class FIRInstallationsHTTPError; @class FBLPromise<ResultType>; NS_ASSUME_NONNULL_BEGIN void FIRInstallationsItemSetErrorToPointer(NSError *error, NSError **pointer); @interface FIRInstallationsErrorUtil : NSObject + (NSError *)keyedArchiverErrorWithException:(NSException *)exception; + (NSError *)keyedArchiverErrorWithError:(NSError *)error; + (NSError *)keychainErrorWithFunction:(NSString *)keychainFunction status:(OSStatus)status; + (NSError *)installationItemNotFoundForAppID:(NSString *)appID appName:(NSString *)appName; + (NSError *)JSONSerializationError:(NSError *)error; + (NSError *)networkErrorWithError:(NSError *)error; + (NSError *)FIDRegistrationErrorWithResponseMissingField:(NSString *)missingFieldName; + (NSError *)corruptedIIDTokenData; + (FIRInstallationsHTTPError *)APIErrorWithHTTPResponse:(NSHTTPURLResponse *)HTTPResponse data:(nullable NSData *)data; + (BOOL)isAPIError:(NSError *)error withHTTPCode:(NSInteger)HTTPCode; + (NSError *)backoffIntervalWaitError; /** * Returns the passed error if it is already in the public domain or a new error with the passed * error at `NSUnderlyingErrorKey`. */ + (NSError *)publicDomainErrorWithError:(NSError *)error; + (FBLPromise *)rejectedPromiseWithError:(NSError *)error; + (NSError *)installationsErrorWithCode:(FIRInstallationsErrorCode)code failureReason:(nullable NSString *)failureReason underlyingError:(nullable NSError *)underlyingError; @end NS_ASSUME_NONNULL_END
787
1,035
# coding: utf-8 # flake8: noqa """ Penguin Statistics - REST APIs Backend APIs for Arknights drop rate statistics website 'Penguin Statistics': https://penguin-stats.io/ # noqa: E501 OpenAPI spec version: 2.0.0 Contact: <EMAIL> Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import # import models into model package from penguin_client.models.advanced_query_request import AdvancedQueryRequest from penguin_client.models.advanced_query_response import AdvancedQueryResponse from penguin_client.models.basic_query_response import BasicQueryResponse from penguin_client.models.bounds import Bounds from penguin_client.models.drop_info import DropInfo from penguin_client.models.drop_matrix_element import DropMatrixElement from penguin_client.models.event_period import EventPeriod from penguin_client.models.exist_conditions import ExistConditions from penguin_client.models.existence import Existence from penguin_client.models.item import Item from penguin_client.models.item_quantity import ItemQuantity from penguin_client.models.item_quantity_bounds import ItemQuantityBounds from penguin_client.models.limitation import Limitation from penguin_client.models.matrix_query_response import MatrixQueryResponse from penguin_client.models.notice import Notice from penguin_client.models.recall_last_report_request import RecallLastReportRequest from penguin_client.models.single_query import SingleQuery from penguin_client.models.single_report_request import SingleReportRequest from penguin_client.models.single_report_response import SingleReportResponse from penguin_client.models.site_stats_response import SiteStatsResponse from penguin_client.models.stage import Stage from penguin_client.models.stage_times import StageTimes from penguin_client.models.stage_trend import StageTrend from penguin_client.models.time_range import TimeRange from penguin_client.models.trend_detail import TrendDetail from penguin_client.models.trend_query_response import TrendQueryResponse from penguin_client.models.typed_drop import TypedDrop from penguin_client.models.zone import Zone
595
11,356
<filename>src/visualization/annotation/build/format/cpp/message.pb.h // Generated by the protocol buffer compiler. DO NOT EDIT! // source: message.proto #ifndef PROTOBUF_message_2eproto__INCLUDED #define PROTOBUF_message_2eproto__INCLUDED #include <string> #include <google/protobuf/stubs/common.h> #if GOOGLE_PROTOBUF_VERSION < 3003000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif #if 3003000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. #endif #include <google/protobuf/io/coded_stream.h> #include <google/protobuf/arena.h> #include <google/protobuf/arenastring.h> #include <google/protobuf/generated_message_table_driven.h> #include <google/protobuf/generated_message_util.h> #include <google/protobuf/metadata_lite.h> #include <google/protobuf/message_lite.h> #include <google/protobuf/repeated_field.h> // IWYU pragma: export #include <google/protobuf/extension_set.h> // IWYU pragma: export #include "annotate.pb.h" // IWYU pragma: export #include "data.pb.h" // IWYU pragma: export #include "meta.pb.h" // IWYU pragma: export #include "progress.pb.h" // IWYU pragma: export #include "similarity.pb.h" // IWYU pragma: export // @@protoc_insertion_point(includes) namespace TuriCreate { namespace Annotation { namespace Specification { class ActivityClassificationLabel; class ActivityClassificationLabelDefaultTypeInternal; extern ActivityClassificationLabelDefaultTypeInternal _ActivityClassificationLabel_default_instance_; class ActivityClassificationMeta; class ActivityClassificationMetaDefaultTypeInternal; extern ActivityClassificationMetaDefaultTypeInternal _ActivityClassificationMeta_default_instance_; class Annotation; class AnnotationDefaultTypeInternal; extern AnnotationDefaultTypeInternal _Annotation_default_instance_; class Annotations; class AnnotationsDefaultTypeInternal; extern AnnotationsDefaultTypeInternal _Annotations_default_instance_; class AudioClassificationLabel; class AudioClassificationLabelDefaultTypeInternal; extern AudioClassificationLabelDefaultTypeInternal _AudioClassificationLabel_default_instance_; class AudioClassificationMeta; class AudioClassificationMetaDefaultTypeInternal; extern AudioClassificationMetaDefaultTypeInternal _AudioClassificationMeta_default_instance_; class ClientRequest; class ClientRequestDefaultTypeInternal; extern ClientRequestDefaultTypeInternal _ClientRequest_default_instance_; class Data; class DataDefaultTypeInternal; extern DataDefaultTypeInternal _Data_default_instance_; class DataGetter; class DataGetterDefaultTypeInternal; extern DataGetterDefaultTypeInternal _DataGetter_default_instance_; class Datum; class DatumDefaultTypeInternal; extern DatumDefaultTypeInternal _Datum_default_instance_; class DrawingClassificationLabel; class DrawingClassificationLabelDefaultTypeInternal; extern DrawingClassificationLabelDefaultTypeInternal _DrawingClassificationLabel_default_instance_; class DrawingClassificationMeta; class DrawingClassificationMetaDefaultTypeInternal; extern DrawingClassificationMetaDefaultTypeInternal _DrawingClassificationMeta_default_instance_; class ImageClassificationLabel; class ImageClassificationLabelDefaultTypeInternal; extern ImageClassificationLabelDefaultTypeInternal _ImageClassificationLabel_default_instance_; class ImageClassificationMeta; class ImageClassificationMetaDefaultTypeInternal; extern ImageClassificationMetaDefaultTypeInternal _ImageClassificationMeta_default_instance_; class ImageDatum; class ImageDatumDefaultTypeInternal; extern ImageDatumDefaultTypeInternal _ImageDatum_default_instance_; class Label; class LabelDefaultTypeInternal; extern LabelDefaultTypeInternal _Label_default_instance_; class MetaData; class MetaDataDefaultTypeInternal; extern MetaDataDefaultTypeInternal _MetaData_default_instance_; class MetaLabel; class MetaLabelDefaultTypeInternal; extern MetaLabelDefaultTypeInternal _MetaLabel_default_instance_; class ObjectDetectionLabel; class ObjectDetectionLabelDefaultTypeInternal; extern ObjectDetectionLabelDefaultTypeInternal _ObjectDetectionLabel_default_instance_; class ObjectDetectionMeta; class ObjectDetectionMetaDefaultTypeInternal; extern ObjectDetectionMetaDefaultTypeInternal _ObjectDetectionMeta_default_instance_; class Parcel; class ParcelDefaultTypeInternal; extern ParcelDefaultTypeInternal _Parcel_default_instance_; class ProgressMeta; class ProgressMetaDefaultTypeInternal; extern ProgressMetaDefaultTypeInternal _ProgressMeta_default_instance_; class Similarity; class SimilarityDefaultTypeInternal; extern SimilarityDefaultTypeInternal _Similarity_default_instance_; class TextDatum; class TextDatumDefaultTypeInternal; extern TextDatumDefaultTypeInternal _TextDatum_default_instance_; } // namespace Specification } // namespace Annotation } // namespace TuriCreate namespace TuriCreate { namespace Annotation { namespace Specification { namespace protobuf_message_2eproto { // Internal implementation detail -- do not call these. struct TableStruct { static const ::google::protobuf::internal::ParseTableField entries[]; static const ::google::protobuf::internal::AuxillaryParseTableField aux[]; static const ::google::protobuf::internal::ParseTable schema[]; static const ::google::protobuf::uint32 offsets[]; static void InitDefaultsImpl(); static void Shutdown(); }; void AddDescriptors(); void InitDefaults(); } // namespace protobuf_message_2eproto // =================================================================== class Parcel : public ::google::protobuf::MessageLite /* @@protoc_insertion_point(class_definition:TuriCreate.Annotation.Specification.Parcel) */ { public: Parcel(); virtual ~Parcel(); Parcel(const Parcel& from); inline Parcel& operator=(const Parcel& from) { CopyFrom(from); return *this; } static const Parcel& default_instance(); enum MessageCase { kAnnotations = 1, kData = 2, kMetadata = 3, kProgress = 4, kSimilarity = 5, MESSAGE_NOT_SET = 0, }; static inline const Parcel* internal_default_instance() { return reinterpret_cast<const Parcel*>( &_Parcel_default_instance_); } static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = 0; void Swap(Parcel* other); // implements Message ---------------------------------------------- inline Parcel* New() const PROTOBUF_FINAL { return New(NULL); } Parcel* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from) PROTOBUF_FINAL; void CopyFrom(const Parcel& from); void MergeFrom(const Parcel& from); void Clear() PROTOBUF_FINAL; bool IsInitialized() const PROTOBUF_FINAL; size_t ByteSizeLong() const PROTOBUF_FINAL; bool MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; void SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; void DiscardUnknownFields(); int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } private: void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const; void InternalSwap(Parcel* other); private: inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return NULL; } inline void* MaybeArenaPtr() const { return NULL; } public: ::std::string GetTypeName() const PROTOBUF_FINAL; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- // .TuriCreate.Annotation.Specification.Annotations annotations = 1; bool has_annotations() const; void clear_annotations(); static const int kAnnotationsFieldNumber = 1; const ::TuriCreate::Annotation::Specification::Annotations& annotations() const; ::TuriCreate::Annotation::Specification::Annotations* mutable_annotations(); ::TuriCreate::Annotation::Specification::Annotations* release_annotations(); void set_allocated_annotations(::TuriCreate::Annotation::Specification::Annotations* annotations); // .TuriCreate.Annotation.Specification.Data data = 2; bool has_data() const; void clear_data(); static const int kDataFieldNumber = 2; const ::TuriCreate::Annotation::Specification::Data& data() const; ::TuriCreate::Annotation::Specification::Data* mutable_data(); ::TuriCreate::Annotation::Specification::Data* release_data(); void set_allocated_data(::TuriCreate::Annotation::Specification::Data* data); // .TuriCreate.Annotation.Specification.MetaData metadata = 3; bool has_metadata() const; void clear_metadata(); static const int kMetadataFieldNumber = 3; const ::TuriCreate::Annotation::Specification::MetaData& metadata() const; ::TuriCreate::Annotation::Specification::MetaData* mutable_metadata(); ::TuriCreate::Annotation::Specification::MetaData* release_metadata(); void set_allocated_metadata(::TuriCreate::Annotation::Specification::MetaData* metadata); // .TuriCreate.Annotation.Specification.ProgressMeta progress = 4; bool has_progress() const; void clear_progress(); static const int kProgressFieldNumber = 4; const ::TuriCreate::Annotation::Specification::ProgressMeta& progress() const; ::TuriCreate::Annotation::Specification::ProgressMeta* mutable_progress(); ::TuriCreate::Annotation::Specification::ProgressMeta* release_progress(); void set_allocated_progress(::TuriCreate::Annotation::Specification::ProgressMeta* progress); // .TuriCreate.Annotation.Specification.Similarity similarity = 5; bool has_similarity() const; void clear_similarity(); static const int kSimilarityFieldNumber = 5; const ::TuriCreate::Annotation::Specification::Similarity& similarity() const; ::TuriCreate::Annotation::Specification::Similarity* mutable_similarity(); ::TuriCreate::Annotation::Specification::Similarity* release_similarity(); void set_allocated_similarity(::TuriCreate::Annotation::Specification::Similarity* similarity); MessageCase Message_case() const; // @@protoc_insertion_point(class_scope:TuriCreate.Annotation.Specification.Parcel) private: void set_has_annotations(); void set_has_data(); void set_has_metadata(); void set_has_progress(); void set_has_similarity(); inline bool has_Message() const; void clear_Message(); inline void clear_has_Message(); ::google::protobuf::internal::InternalMetadataWithArenaLite _internal_metadata_; union MessageUnion { MessageUnion() {} ::TuriCreate::Annotation::Specification::Annotations* annotations_; ::TuriCreate::Annotation::Specification::Data* data_; ::TuriCreate::Annotation::Specification::MetaData* metadata_; ::TuriCreate::Annotation::Specification::ProgressMeta* progress_; ::TuriCreate::Annotation::Specification::Similarity* similarity_; } Message_; mutable int _cached_size_; ::google::protobuf::uint32 _oneof_case_[1]; friend struct protobuf_message_2eproto::TableStruct; }; // ------------------------------------------------------------------- class ClientRequest : public ::google::protobuf::MessageLite /* @@protoc_insertion_point(class_definition:TuriCreate.Annotation.Specification.ClientRequest) */ { public: ClientRequest(); virtual ~ClientRequest(); ClientRequest(const ClientRequest& from); inline ClientRequest& operator=(const ClientRequest& from) { CopyFrom(from); return *this; } static const ClientRequest& default_instance(); enum TypeCase { kGetter = 1, kAnnotations = 2, TYPE_NOT_SET = 0, }; static inline const ClientRequest* internal_default_instance() { return reinterpret_cast<const ClientRequest*>( &_ClientRequest_default_instance_); } static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = 1; void Swap(ClientRequest* other); // implements Message ---------------------------------------------- inline ClientRequest* New() const PROTOBUF_FINAL { return New(NULL); } ClientRequest* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from) PROTOBUF_FINAL; void CopyFrom(const ClientRequest& from); void MergeFrom(const ClientRequest& from); void Clear() PROTOBUF_FINAL; bool IsInitialized() const PROTOBUF_FINAL; size_t ByteSizeLong() const PROTOBUF_FINAL; bool MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; void SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; void DiscardUnknownFields(); int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } private: void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const; void InternalSwap(ClientRequest* other); private: inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return NULL; } inline void* MaybeArenaPtr() const { return NULL; } public: ::std::string GetTypeName() const PROTOBUF_FINAL; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- // .TuriCreate.Annotation.Specification.DataGetter getter = 1; bool has_getter() const; void clear_getter(); static const int kGetterFieldNumber = 1; const ::TuriCreate::Annotation::Specification::DataGetter& getter() const; ::TuriCreate::Annotation::Specification::DataGetter* mutable_getter(); ::TuriCreate::Annotation::Specification::DataGetter* release_getter(); void set_allocated_getter(::TuriCreate::Annotation::Specification::DataGetter* getter); // .TuriCreate.Annotation.Specification.Annotations annotations = 2; bool has_annotations() const; void clear_annotations(); static const int kAnnotationsFieldNumber = 2; const ::TuriCreate::Annotation::Specification::Annotations& annotations() const; ::TuriCreate::Annotation::Specification::Annotations* mutable_annotations(); ::TuriCreate::Annotation::Specification::Annotations* release_annotations(); void set_allocated_annotations(::TuriCreate::Annotation::Specification::Annotations* annotations); TypeCase Type_case() const; // @@protoc_insertion_point(class_scope:TuriCreate.Annotation.Specification.ClientRequest) private: void set_has_getter(); void set_has_annotations(); inline bool has_Type() const; void clear_Type(); inline void clear_has_Type(); ::google::protobuf::internal::InternalMetadataWithArenaLite _internal_metadata_; union TypeUnion { TypeUnion() {} ::TuriCreate::Annotation::Specification::DataGetter* getter_; ::TuriCreate::Annotation::Specification::Annotations* annotations_; } Type_; mutable int _cached_size_; ::google::protobuf::uint32 _oneof_case_[1]; friend struct protobuf_message_2eproto::TableStruct; }; // =================================================================== // =================================================================== #if !PROTOBUF_INLINE_NOT_IN_HEADERS // Parcel // .TuriCreate.Annotation.Specification.Annotations annotations = 1; inline bool Parcel::has_annotations() const { return Message_case() == kAnnotations; } inline void Parcel::set_has_annotations() { _oneof_case_[0] = kAnnotations; } inline void Parcel::clear_annotations() { if (has_annotations()) { delete Message_.annotations_; clear_has_Message(); } } inline const ::TuriCreate::Annotation::Specification::Annotations& Parcel::annotations() const { // @@protoc_insertion_point(field_get:TuriCreate.Annotation.Specification.Parcel.annotations) return has_annotations() ? *Message_.annotations_ : ::TuriCreate::Annotation::Specification::Annotations::default_instance(); } inline ::TuriCreate::Annotation::Specification::Annotations* Parcel::mutable_annotations() { if (!has_annotations()) { clear_Message(); set_has_annotations(); Message_.annotations_ = new ::TuriCreate::Annotation::Specification::Annotations; } // @@protoc_insertion_point(field_mutable:TuriCreate.Annotation.Specification.Parcel.annotations) return Message_.annotations_; } inline ::TuriCreate::Annotation::Specification::Annotations* Parcel::release_annotations() { // @@protoc_insertion_point(field_release:TuriCreate.Annotation.Specification.Parcel.annotations) if (has_annotations()) { clear_has_Message(); ::TuriCreate::Annotation::Specification::Annotations* temp = Message_.annotations_; Message_.annotations_ = NULL; return temp; } else { return NULL; } } inline void Parcel::set_allocated_annotations(::TuriCreate::Annotation::Specification::Annotations* annotations) { clear_Message(); if (annotations) { set_has_annotations(); Message_.annotations_ = annotations; } // @@protoc_insertion_point(field_set_allocated:TuriCreate.Annotation.Specification.Parcel.annotations) } // .TuriCreate.Annotation.Specification.Data data = 2; inline bool Parcel::has_data() const { return Message_case() == kData; } inline void Parcel::set_has_data() { _oneof_case_[0] = kData; } inline void Parcel::clear_data() { if (has_data()) { delete Message_.data_; clear_has_Message(); } } inline const ::TuriCreate::Annotation::Specification::Data& Parcel::data() const { // @@protoc_insertion_point(field_get:TuriCreate.Annotation.Specification.Parcel.data) return has_data() ? *Message_.data_ : ::TuriCreate::Annotation::Specification::Data::default_instance(); } inline ::TuriCreate::Annotation::Specification::Data* Parcel::mutable_data() { if (!has_data()) { clear_Message(); set_has_data(); Message_.data_ = new ::TuriCreate::Annotation::Specification::Data; } // @@protoc_insertion_point(field_mutable:TuriCreate.Annotation.Specification.Parcel.data) return Message_.data_; } inline ::TuriCreate::Annotation::Specification::Data* Parcel::release_data() { // @@protoc_insertion_point(field_release:TuriCreate.Annotation.Specification.Parcel.data) if (has_data()) { clear_has_Message(); ::TuriCreate::Annotation::Specification::Data* temp = Message_.data_; Message_.data_ = NULL; return temp; } else { return NULL; } } inline void Parcel::set_allocated_data(::TuriCreate::Annotation::Specification::Data* data) { clear_Message(); if (data) { set_has_data(); Message_.data_ = data; } // @@protoc_insertion_point(field_set_allocated:TuriCreate.Annotation.Specification.Parcel.data) } // .TuriCreate.Annotation.Specification.MetaData metadata = 3; inline bool Parcel::has_metadata() const { return Message_case() == kMetadata; } inline void Parcel::set_has_metadata() { _oneof_case_[0] = kMetadata; } inline void Parcel::clear_metadata() { if (has_metadata()) { delete Message_.metadata_; clear_has_Message(); } } inline const ::TuriCreate::Annotation::Specification::MetaData& Parcel::metadata() const { // @@protoc_insertion_point(field_get:TuriCreate.Annotation.Specification.Parcel.metadata) return has_metadata() ? *Message_.metadata_ : ::TuriCreate::Annotation::Specification::MetaData::default_instance(); } inline ::TuriCreate::Annotation::Specification::MetaData* Parcel::mutable_metadata() { if (!has_metadata()) { clear_Message(); set_has_metadata(); Message_.metadata_ = new ::TuriCreate::Annotation::Specification::MetaData; } // @@protoc_insertion_point(field_mutable:TuriCreate.Annotation.Specification.Parcel.metadata) return Message_.metadata_; } inline ::TuriCreate::Annotation::Specification::MetaData* Parcel::release_metadata() { // @@protoc_insertion_point(field_release:TuriCreate.Annotation.Specification.Parcel.metadata) if (has_metadata()) { clear_has_Message(); ::TuriCreate::Annotation::Specification::MetaData* temp = Message_.metadata_; Message_.metadata_ = NULL; return temp; } else { return NULL; } } inline void Parcel::set_allocated_metadata(::TuriCreate::Annotation::Specification::MetaData* metadata) { clear_Message(); if (metadata) { set_has_metadata(); Message_.metadata_ = metadata; } // @@protoc_insertion_point(field_set_allocated:TuriCreate.Annotation.Specification.Parcel.metadata) } // .TuriCreate.Annotation.Specification.ProgressMeta progress = 4; inline bool Parcel::has_progress() const { return Message_case() == kProgress; } inline void Parcel::set_has_progress() { _oneof_case_[0] = kProgress; } inline void Parcel::clear_progress() { if (has_progress()) { delete Message_.progress_; clear_has_Message(); } } inline const ::TuriCreate::Annotation::Specification::ProgressMeta& Parcel::progress() const { // @@protoc_insertion_point(field_get:TuriCreate.Annotation.Specification.Parcel.progress) return has_progress() ? *Message_.progress_ : ::TuriCreate::Annotation::Specification::ProgressMeta::default_instance(); } inline ::TuriCreate::Annotation::Specification::ProgressMeta* Parcel::mutable_progress() { if (!has_progress()) { clear_Message(); set_has_progress(); Message_.progress_ = new ::TuriCreate::Annotation::Specification::ProgressMeta; } // @@protoc_insertion_point(field_mutable:TuriCreate.Annotation.Specification.Parcel.progress) return Message_.progress_; } inline ::TuriCreate::Annotation::Specification::ProgressMeta* Parcel::release_progress() { // @@protoc_insertion_point(field_release:TuriCreate.Annotation.Specification.Parcel.progress) if (has_progress()) { clear_has_Message(); ::TuriCreate::Annotation::Specification::ProgressMeta* temp = Message_.progress_; Message_.progress_ = NULL; return temp; } else { return NULL; } } inline void Parcel::set_allocated_progress(::TuriCreate::Annotation::Specification::ProgressMeta* progress) { clear_Message(); if (progress) { set_has_progress(); Message_.progress_ = progress; } // @@protoc_insertion_point(field_set_allocated:TuriCreate.Annotation.Specification.Parcel.progress) } // .TuriCreate.Annotation.Specification.Similarity similarity = 5; inline bool Parcel::has_similarity() const { return Message_case() == kSimilarity; } inline void Parcel::set_has_similarity() { _oneof_case_[0] = kSimilarity; } inline void Parcel::clear_similarity() { if (has_similarity()) { delete Message_.similarity_; clear_has_Message(); } } inline const ::TuriCreate::Annotation::Specification::Similarity& Parcel::similarity() const { // @@protoc_insertion_point(field_get:TuriCreate.Annotation.Specification.Parcel.similarity) return has_similarity() ? *Message_.similarity_ : ::TuriCreate::Annotation::Specification::Similarity::default_instance(); } inline ::TuriCreate::Annotation::Specification::Similarity* Parcel::mutable_similarity() { if (!has_similarity()) { clear_Message(); set_has_similarity(); Message_.similarity_ = new ::TuriCreate::Annotation::Specification::Similarity; } // @@protoc_insertion_point(field_mutable:TuriCreate.Annotation.Specification.Parcel.similarity) return Message_.similarity_; } inline ::TuriCreate::Annotation::Specification::Similarity* Parcel::release_similarity() { // @@protoc_insertion_point(field_release:TuriCreate.Annotation.Specification.Parcel.similarity) if (has_similarity()) { clear_has_Message(); ::TuriCreate::Annotation::Specification::Similarity* temp = Message_.similarity_; Message_.similarity_ = NULL; return temp; } else { return NULL; } } inline void Parcel::set_allocated_similarity(::TuriCreate::Annotation::Specification::Similarity* similarity) { clear_Message(); if (similarity) { set_has_similarity(); Message_.similarity_ = similarity; } // @@protoc_insertion_point(field_set_allocated:TuriCreate.Annotation.Specification.Parcel.similarity) } inline bool Parcel::has_Message() const { return Message_case() != MESSAGE_NOT_SET; } inline void Parcel::clear_has_Message() { _oneof_case_[0] = MESSAGE_NOT_SET; } inline Parcel::MessageCase Parcel::Message_case() const { return Parcel::MessageCase(_oneof_case_[0]); } // ------------------------------------------------------------------- // ClientRequest // .TuriCreate.Annotation.Specification.DataGetter getter = 1; inline bool ClientRequest::has_getter() const { return Type_case() == kGetter; } inline void ClientRequest::set_has_getter() { _oneof_case_[0] = kGetter; } inline void ClientRequest::clear_getter() { if (has_getter()) { delete Type_.getter_; clear_has_Type(); } } inline const ::TuriCreate::Annotation::Specification::DataGetter& ClientRequest::getter() const { // @@protoc_insertion_point(field_get:TuriCreate.Annotation.Specification.ClientRequest.getter) return has_getter() ? *Type_.getter_ : ::TuriCreate::Annotation::Specification::DataGetter::default_instance(); } inline ::TuriCreate::Annotation::Specification::DataGetter* ClientRequest::mutable_getter() { if (!has_getter()) { clear_Type(); set_has_getter(); Type_.getter_ = new ::TuriCreate::Annotation::Specification::DataGetter; } // @@protoc_insertion_point(field_mutable:TuriCreate.Annotation.Specification.ClientRequest.getter) return Type_.getter_; } inline ::TuriCreate::Annotation::Specification::DataGetter* ClientRequest::release_getter() { // @@protoc_insertion_point(field_release:TuriCreate.Annotation.Specification.ClientRequest.getter) if (has_getter()) { clear_has_Type(); ::TuriCreate::Annotation::Specification::DataGetter* temp = Type_.getter_; Type_.getter_ = NULL; return temp; } else { return NULL; } } inline void ClientRequest::set_allocated_getter(::TuriCreate::Annotation::Specification::DataGetter* getter) { clear_Type(); if (getter) { set_has_getter(); Type_.getter_ = getter; } // @@protoc_insertion_point(field_set_allocated:TuriCreate.Annotation.Specification.ClientRequest.getter) } // .TuriCreate.Annotation.Specification.Annotations annotations = 2; inline bool ClientRequest::has_annotations() const { return Type_case() == kAnnotations; } inline void ClientRequest::set_has_annotations() { _oneof_case_[0] = kAnnotations; } inline void ClientRequest::clear_annotations() { if (has_annotations()) { delete Type_.annotations_; clear_has_Type(); } } inline const ::TuriCreate::Annotation::Specification::Annotations& ClientRequest::annotations() const { // @@protoc_insertion_point(field_get:TuriCreate.Annotation.Specification.ClientRequest.annotations) return has_annotations() ? *Type_.annotations_ : ::TuriCreate::Annotation::Specification::Annotations::default_instance(); } inline ::TuriCreate::Annotation::Specification::Annotations* ClientRequest::mutable_annotations() { if (!has_annotations()) { clear_Type(); set_has_annotations(); Type_.annotations_ = new ::TuriCreate::Annotation::Specification::Annotations; } // @@protoc_insertion_point(field_mutable:TuriCreate.Annotation.Specification.ClientRequest.annotations) return Type_.annotations_; } inline ::TuriCreate::Annotation::Specification::Annotations* ClientRequest::release_annotations() { // @@protoc_insertion_point(field_release:TuriCreate.Annotation.Specification.ClientRequest.annotations) if (has_annotations()) { clear_has_Type(); ::TuriCreate::Annotation::Specification::Annotations* temp = Type_.annotations_; Type_.annotations_ = NULL; return temp; } else { return NULL; } } inline void ClientRequest::set_allocated_annotations(::TuriCreate::Annotation::Specification::Annotations* annotations) { clear_Type(); if (annotations) { set_has_annotations(); Type_.annotations_ = annotations; } // @@protoc_insertion_point(field_set_allocated:TuriCreate.Annotation.Specification.ClientRequest.annotations) } inline bool ClientRequest::has_Type() const { return Type_case() != TYPE_NOT_SET; } inline void ClientRequest::clear_has_Type() { _oneof_case_[0] = TYPE_NOT_SET; } inline ClientRequest::TypeCase ClientRequest::Type_case() const { return ClientRequest::TypeCase(_oneof_case_[0]); } #endif // !PROTOBUF_INLINE_NOT_IN_HEADERS // ------------------------------------------------------------------- // @@protoc_insertion_point(namespace_scope) } // namespace Specification } // namespace Annotation } // namespace TuriCreate // @@protoc_insertion_point(global_scope) #endif // PROTOBUF_message_2eproto__INCLUDED
8,946
3,459
<filename>Real-Time Corruptor/BizHawk_RTC/libmupen64plus/mupen64plus-video-glide64mk2/src/Glide64/3dmath.h /* * Glide64 - Glide video plugin for Nintendo 64 emulators. * Copyright (c) 2002 Dave2001 * Copyright (c) 2003-2009 Sergey 'Gonetz' Lipski * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ //**************************************************************** // // Glide64 - Glide Plugin for Nintendo 64 emulators // Project started on December 29th, 2001 // // Authors: // Dave2001, original author, founded the project in 2001, left it in 2002 // Gugaman, joined the project in 2002, left it in 2002 // Sergey 'Gonetz' Lipski, joined the project in 2002, main author since fall of 2002 // Hiroshi 'KoolSmoky' Morii, joined the project in 2007 // //**************************************************************** // // To modify Glide64: // * Write your name and (optional)email, commented by your work, so I know who did it, and so that you can find which parts you modified when it comes time to send it to me. // * Do NOT send me the whole project or file that you modified. Take out your modified code sections, and tell me where to put them. If people sent the whole thing, I would have many different versions, but no idea how to combine them all. // //**************************************************************** void calc_light (VERTEX *v); void calc_linear (VERTEX *v); void calc_sphere (VERTEX *v); void math_init(); typedef void (*MULMATRIX)(float m1[4][4],float m2[4][4],float r[4][4]); extern MULMATRIX MulMatrices; typedef void (*TRANSFORMVECTOR)(float *src,float *dst,float mat[4][4]); extern TRANSFORMVECTOR TransformVector; extern TRANSFORMVECTOR InverseTransformVector; typedef float (*DOTPRODUCT)(register float *v1, register float *v2); extern DOTPRODUCT DotProduct; typedef void (*NORMALIZEVECTOR)(float *v); extern NORMALIZEVECTOR NormalizeVector;
714
2,177
<filename>src/org/nutz/castor/castor/Map2Boolean.java<gh_stars>1000+ package org.nutz.castor.castor; import java.util.Map; import org.nutz.castor.Castor; @SuppressWarnings("rawtypes") public class Map2Boolean extends Castor<Map, Boolean> { @Override public Boolean cast(Map src, Class<?> toType, String... args) { if (null == src) return Boolean.FALSE; return true; } }
172
488
/*! * \file PrePostTraversal.cc * * \brief Implements a top-down/bottom-up traversal without explicit * attributes, i.e., implements a variation on the simple traversal * that exposes the top-down and bottom-up visits. */ // tps (01/14/2010) : Switching from rose.h to sage3. #include "sage3basic.h" #include "PrePostTraversal.hh" _DummyAttribute ASTtools::PrePostTraversal::evaluateInheritedAttribute (SgNode* node, _DummyAttribute d) { visitTopDown (node); return d; } _DummyAttribute ASTtools::PrePostTraversal::evaluateSynthesizedAttribute (SgNode* node, _DummyAttribute d, SynthesizedAttributesList) { visitBottomUp (node); return d; } void ASTtools::PrePostTraversal::traverse (SgNode* node) { AstTopDownBottomUpProcessing<_DummyAttribute, _DummyAttribute>::traverse (node, _DummyAttribute ()); } void ASTtools::PrePostTraversal::traverseWithinFile (SgNode* node) { AstTopDownBottomUpProcessing<_DummyAttribute, _DummyAttribute>::traverseWithinFile (node, _DummyAttribute ()); } // eof
521
1,433
<filename>fabric-game-rule-api-v1/src/main/java/net/fabricmc/fabric/api/gamerule/v1/rule/DoubleRule.java /* * Copyright (c) 2016, 2017, 2018, 2019 FabricMC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package net.fabricmc.fabric.api.gamerule.v1.rule; import com.mojang.brigadier.context.CommandContext; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import net.minecraft.server.MinecraftServer; import net.minecraft.server.command.ServerCommandSource; import net.minecraft.world.GameRules; import net.fabricmc.fabric.api.gamerule.v1.GameRuleRegistry; public final class DoubleRule extends GameRules.Rule<DoubleRule> implements ValidateableRule { private static final Logger LOGGER = LogManager.getLogger(GameRuleRegistry.class); private final double minimumValue; private final double maximumValue; private double value; /** * @deprecated You should not be calling this constructor! */ @Deprecated public DoubleRule(GameRules.Type<DoubleRule> type, double value, double minimumValue, double maximumValue) { super(type); this.value = value; this.minimumValue = minimumValue; this.maximumValue = maximumValue; if (Double.isInfinite(value) || Double.isNaN(value)) { throw new IllegalArgumentException("Value cannot be infinite or NaN"); } if (Double.isInfinite(minimumValue) || Double.isNaN(minimumValue)) { throw new IllegalArgumentException("Minimum value cannot be infinite or NaN"); } if (Double.isInfinite(maximumValue) || Double.isNaN(maximumValue)) { throw new IllegalArgumentException("Maximum value cannot be infinite or NaN"); } } @Override protected void setFromArgument(CommandContext<ServerCommandSource> context, String name) { this.value = context.getArgument(name, Double.class); } @Override protected void deserialize(String value) { if (!value.isEmpty()) { try { final double d = Double.parseDouble(value); if (this.inBounds(d)) { this.value = d; } else { LOGGER.warn("Failed to parse double {}. Was out of bounds {} - {}", value, this.minimumValue, this.maximumValue); } } catch (NumberFormatException e) { LOGGER.warn("Failed to parse double {}", value); } } } @Override public String serialize() { return Double.toString(this.value); } @Override public int getCommandResult() { return Double.compare(this.value, 0.0D); } @Override protected DoubleRule getThis() { return this; } @Override protected DoubleRule copy() { return new DoubleRule(this.type, this.value, this.minimumValue, this.maximumValue); } @Override public void setValue(DoubleRule rule, MinecraftServer minecraftServer) { if (!this.inBounds(rule.value)) { throw new IllegalArgumentException(String.format("Could not set value to %s. Was out of bounds %s - %s", rule.value, this.minimumValue, this.maximumValue)); } this.value = rule.value; this.changed(minecraftServer); } @Override public boolean validate(String value) { try { final double d = Double.parseDouble(value); return this.inBounds(d); } catch (NumberFormatException ignored) { return false; } } public double get() { return this.value; } private boolean inBounds(double value) { return value >= this.minimumValue && value <= this.maximumValue; } }
1,231
665
# # MLDB-2111-group-by-expression.py # <NAME>, 2017-01-24 # This file is part of MLDB. Copyright 2017 mldb.ai inc. All rights reserved. # from mldb import mldb, MldbUnitTest, ResponseException class Mldb2111GroupByTests(MldbUnitTest): # noqa @classmethod def setUpClass(cls): ds = mldb.create_dataset({'id' : 'ds', 'type' : 'sparse.mutable'}) ds.record_row('0', [['x', 1, 1], ['y', 1, 2]]) ds.record_row('1', [['x', 1, 3], ['y', 2, 4]]) ds.record_row('2', [['x', 2, 5], ['y', 1, 6]]) ds.record_row('3', [['x', 2, 7], ['y', 2, 8]]) ds.commit() ds2 = mldb.create_dataset({'id' : 'ds2', 'type' : 'sparse.mutable'}) ds2.record_row('0', [['x', 1, 1], ['x', 2, 2]]) ds2.commit() def test_groupby_expression(self): res = mldb.query(""" SELECT x+1 FROM (SELECT x:1) GROUP BY x+1 """) self.assertTableResultEquals(res, [[ "_rowName", "x+1"], [ "[2]", 2 ]]) def test_groupby_expression_named(self): res = mldb.query(""" SELECT x+1 as z FROM (SELECT x:1) GROUP BY x+1 """) self.assertTableResultEquals(res, [[ "_rowName", "z"], [ "[2]", 2 ]]) def test_groupby_sub_expression(self): res = mldb.query(""" SELECT (x+1)*3 as z FROM (SELECT x:1) GROUP BY x+1 """) self.assertTableResultEquals(res, [[ "_rowName", "z"], [ "[2]", 6 ]]) def test_groupby_expression_multiple_key(self): res = mldb.query(""" SELECT x+1 FROM ds GROUP BY x+1, y*2 """) self.assertTableResultEquals(res, [[ "_rowName", "x+1"], [ "[2,2]", 2 ], [ "[2,4]", 2 ], [ "[3,2]", 3 ], [ "[3,4]", 3 ]]) ## Rowname & rowHash in the select is different than in the group by def test_groupby_rowname(self): res = mldb.query(""" SELECT rowName() FROM ds GROUP BY rowName() """) self.assertTableResultEquals(res, [["_rowName", "rowName()"], ["\"[\"\"0\"\"]\"", "\"[\"\"0\"\"]\""], ["\"[\"\"1\"\"]\"", "\"[\"\"1\"\"]\""], ["\"[\"\"2\"\"]\"", "\"[\"\"2\"\"]\""], ["\"[\"\"3\"\"]\"", "\"[\"\"3\"\"]\""]]) res = mldb.query(""" SELECT rowHash() FROM ds GROUP BY rowHash() """) self.assertTableResultEquals(res, [["_rowName","rowHash()"], ["[10408321403207385874]",11729733417614312054], ["[11275350073939794026]",9399015998024610411], ["[11413460447292444913]",4531258406341702386], ["[17472595041006102391]",12806200029519745032]]) def test_groupby_argument(self): res = mldb.query(""" SELECT sqrt(x * 3) as z FROM ds GROUP BY x * 3 """) self.assertTableResultEquals(res, [["_rowName", "z"], ["[3]",1.7320508075688772], ["[6]",2.449489742783178]]) def test_groupby_expression_function(self): res = mldb.query(""" SELECT horizontal_sum({x,y}) + 1 as z FROM ds GROUP BY horizontal_sum({x,y}) """) self.assertTableResultEquals(res, [["_rowName", "z"], ["[2]",3], ["[3]",4], ["[4]",5]]) def test_groupby_named(self): res = mldb.query(""" SELECT x+1 NAMED (x+1)*2 FROM (SELECT x:1) GROUP BY x+1 """) self.assertTableResultEquals(res, [[ "_rowName", "x+1"], [ "4", 2 ]]) def test_groupby_orderby(self): res = mldb.query(""" SELECT x+1 FROM ds GROUP BY x+1 ORDER BY x+1 """) self.assertTableResultEquals(res, [["_rowName", "x+1"], ["[2]", 2], ["[3]", 3]]) def test_groupby_having(self): res = mldb.query(""" SELECT 0 as z FROM ds GROUP BY x+1 HAVING x+1 = 3 """) self.assertTableResultEquals(res, [["_rowName","z"], ["[3]", 0]]) def test_groupby_temporal(self): res = mldb.query(""" select temporal_latest({x}) as * from ds2 GROUP BY x """) self.assertTableResultEquals(res, [["_rowName","x"], ["[2]", 2]]) res = mldb.query(""" select temporal_latest({x}) from ds2 group by temporal_latest({x}) """) self.assertTableResultEquals(res, [["_rowName","temporal_latest({x}).x"], ["\"[[[\"\"x\"\",[2,\"\"1970-01-01T00:00:02Z\"\"]]]]\"", 2]]) def test_groupby_inexact(self): msg = "variable 'x' must appear in the GROUP BY clause or be used in an aggregate function" with self.assertRaisesRegex(ResponseException, msg): res = mldb.query(""" SELECT x+1 FROM (SELECT x:1) GROUP BY 1+x """) msg = "variable 'x' must appear in the GROUP BY clause or be used in an aggregate function" with self.assertRaisesRegex(ResponseException, msg): res = mldb.query(""" SELECT x+1*3 FROM (SELECT x:1) GROUP BY x+1 """) if __name__ == '__main__': mldb.run_tests()
2,836
938
<gh_stars>100-1000 { "replace": false, "values": [ "tconstruct:molten_signalum", "tconstruct:flowing_molten_signalum" ] }
61
411
<reponame>sumau/tick // License: BSD 3 clause // // poisson.cpp // Array // // Created by bacry on 13/04/2015. // Copyright (c) 2015 bacry. All rights reserved. // #include "tick/hawkes/simulation/simu_poisson_process.h" Poisson::Poisson(double intensity, int seed) : PP(1, seed) { intensities = SArrayDouble::new_ptr(1); (*intensities)[0] = intensity; } Poisson::Poisson(SArrayDoublePtr intensities, int seed) : PP(static_cast<unsigned int>(intensities->size()), seed) { this->intensities = intensities; } void Poisson::init_intensity_(ArrayDouble &intensity, double *total_intensity_bound1) { *total_intensity_bound1 = 0; for (unsigned int i = 0; i < get_n_nodes(); i++) { intensity[i] = (*intensities)[i]; *total_intensity_bound1 += (*intensities)[i]; } } bool Poisson::update_time_shift_(double delay, ArrayDouble &intensity, double *total_intensity_bound) { return false; }
394
1,444
<filename>Mage.Sets/src/mage/cards/d/DrippingTongueZubera.java<gh_stars>1000+ package mage.cards.d; import java.util.UUID; import mage.MageInt; import mage.abilities.common.DiesSourceTriggeredAbility; import mage.abilities.dynamicvalue.common.ZuberasDiedDynamicValue; import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.game.permanent.token.SpiritToken; import mage.watchers.common.ZuberasDiedWatcher; /** * * @author Loki */ public final class DrippingTongueZubera extends CardImpl { public DrippingTongueZubera (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); this.subtype.add(SubType.ZUBERA); this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(2); this.addAbility(new DiesSourceTriggeredAbility(new CreateTokenEffect(new SpiritToken(), ZuberasDiedDynamicValue.instance), false), new ZuberasDiedWatcher()); } public DrippingTongueZubera (final DrippingTongueZubera card) { super(card); } @Override public DrippingTongueZubera copy() { return new DrippingTongueZubera(this); } }
502
314
<reponame>tclfs/rocketmq-client-cpp /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "DefaultMQProducer.h" #include <MQVersion.h> #include "DefaultMQProducerImpl.h" namespace rocketmq { DefaultMQProducer::DefaultMQProducer(const std::string& groupName) { impl = new DefaultMQProducerImpl(groupName); } DefaultMQProducer::~DefaultMQProducer() { delete impl; } void DefaultMQProducer::start() { impl->start(); } void DefaultMQProducer::shutdown() { impl->shutdown(); } std::string DefaultMQProducer::version() { std::string versions = impl->getClientVersionString(); /* versions.append(", PROTOCOL VERSION: ") .append(MQVersion::GetVersionDesc(MQVersion::s_CurrentVersion)) .append(", LANGUAGE: ") .append(MQVersion::s_CurrentLanguage); */ return versions; } // start mqclient set const std::string& DefaultMQProducer::getNamesrvAddr() const { return impl->getNamesrvAddr(); } void DefaultMQProducer::setNamesrvAddr(const std::string& namesrvAddr) { impl->setNamesrvAddr(namesrvAddr); } const std::string& DefaultMQProducer::getNamesrvDomain() const { return impl->getNamesrvDomain(); } void DefaultMQProducer::setNamesrvDomain(const std::string& namesrvDomain) { impl->setNamesrvDomain(namesrvDomain); } void DefaultMQProducer::setSessionCredentials(const std::string& accessKey, const std::string& secretKey, const std::string& accessChannel) { impl->setSessionCredentials(accessKey, secretKey, accessChannel); } const SessionCredentials& DefaultMQProducer::getSessionCredentials() const { return impl->getSessionCredentials(); } const std::string& DefaultMQProducer::getInstanceName() const { return impl->getInstanceName(); } void DefaultMQProducer::setInstanceName(const std::string& instanceName) { impl->setInstanceName(instanceName); } const std::string& DefaultMQProducer::getNameSpace() const { return impl->getNameSpace(); } void DefaultMQProducer::setNameSpace(const std::string& nameSpace) { impl->setNameSpace(nameSpace); } const std::string& DefaultMQProducer::getGroupName() const { return impl->getGroupName(); } void DefaultMQProducer::setGroupName(const std::string& groupName) { impl->setGroupName(groupName); } void DefaultMQProducer::setSendMsgTimeout(int sendMsgTimeout) { impl->setSendMsgTimeout(sendMsgTimeout); } int DefaultMQProducer::getSendMsgTimeout() const { return impl->getSendMsgTimeout(); } void DefaultMQProducer::setRetryTimes(int times) { impl->setRetryTimes(times); } int DefaultMQProducer::getRetryTimes() const { return impl->getRetryTimes(); } int DefaultMQProducer::getCompressMsgBodyOverHowmuch() const { return impl->getCompressMsgBodyOverHowmuch(); } void DefaultMQProducer::setCompressMsgBodyOverHowmuch(int compressMsgBodyThreshold) { impl->setCompressMsgBodyOverHowmuch(compressMsgBodyThreshold); } int DefaultMQProducer::getCompressLevel() const { return impl->getCompressLevel(); } void DefaultMQProducer::setCompressLevel(int compressLevel) { impl->setCompressLevel(compressLevel); } void DefaultMQProducer::setMaxMessageSize(int maxMessageSize) { impl->setMaxMessageSize(maxMessageSize); } int DefaultMQProducer::getMaxMessageSize() const { return impl->getMaxMessageSize(); } void DefaultMQProducer::setRetryTimes4Async(int times) { impl->setRetryTimes4Async(times); } int DefaultMQProducer::getRetryTimes4Async() const { return impl->getRetryTimes4Async(); } void DefaultMQProducer::setLogLevel(elogLevel inputLevel) { impl->setLogLevel(inputLevel); } elogLevel DefaultMQProducer::getLogLevel() { return impl->getLogLevel(); } void DefaultMQProducer::setLogFileSizeAndNum(int fileNum, long perFileSize) { impl->setLogFileSizeAndNum(fileNum, perFileSize); } void DefaultMQProducer::setTcpTransportPullThreadNum(int num) { impl->setTcpTransportPullThreadNum(num); } int DefaultMQProducer::getTcpTransportPullThreadNum() const { return impl->getTcpTransportPullThreadNum(); } void DefaultMQProducer::setTcpTransportConnectTimeout(uint64_t timeout) { impl->setTcpTransportConnectTimeout(timeout); } uint64_t DefaultMQProducer::getTcpTransportConnectTimeout() const { return impl->getTcpTransportConnectTimeout(); } void DefaultMQProducer::setTcpTransportTryLockTimeout(uint64_t timeout) { impl->setTcpTransportTryLockTimeout(timeout); } uint64_t DefaultMQProducer::getTcpTransportTryLockTimeout() const { return impl->getTcpTransportTryLockTimeout(); } void DefaultMQProducer::setUnitName(std::string unitName) { impl->setUnitName(unitName); } const std::string& DefaultMQProducer::getUnitName() const { return impl->getUnitName(); } void DefaultMQProducer::setMessageTrace(bool messageTrace) { impl->setMessageTrace(messageTrace); } bool DefaultMQProducer::getMessageTrace() const { return impl->getMessageTrace(); } SendResult DefaultMQProducer::send(MQMessage& msg, bool bSelectActiveBroker) { return impl->send(msg, bSelectActiveBroker); } SendResult DefaultMQProducer::send(MQMessage& msg, const MQMessageQueue& mq) { return impl->send(msg, mq); } SendResult DefaultMQProducer::send(MQMessage& msg, MessageQueueSelector* selector, void* arg) { return impl->send(msg, selector, arg); } SendResult DefaultMQProducer::send(MQMessage& msg, MessageQueueSelector* selector, void* arg, int autoRetryTimes, bool bActiveBroker) { return impl->send(msg, selector, arg, autoRetryTimes, bActiveBroker); } SendResult DefaultMQProducer::send(std::vector<MQMessage>& msgs) { return impl->send(msgs); } SendResult DefaultMQProducer::send(std::vector<MQMessage>& msgs, const MQMessageQueue& mq) { return impl->send(msgs, mq); } void DefaultMQProducer::send(MQMessage& msg, SendCallback* pSendCallback, bool bSelectActiveBroker) { impl->send(msg, pSendCallback, bSelectActiveBroker); } void DefaultMQProducer::send(MQMessage& msg, const MQMessageQueue& mq, SendCallback* pSendCallback) { impl->send(msg, mq, pSendCallback); } void DefaultMQProducer::send(MQMessage& msg, MessageQueueSelector* selector, void* arg, SendCallback* pSendCallback) { impl->send(msg, selector, arg, pSendCallback); } void DefaultMQProducer::sendOneway(MQMessage& msg, bool bSelectActiveBroker) { impl->sendOneway(msg, bSelectActiveBroker); } void DefaultMQProducer::sendOneway(MQMessage& msg, const MQMessageQueue& mq) { impl->sendOneway(msg, mq); } void DefaultMQProducer::sendOneway(MQMessage& msg, MessageQueueSelector* selector, void* arg) { impl->sendOneway(msg, selector, arg); } void DefaultMQProducer::setEnableSsl(bool enableSsl) { impl->setEnableSsl(enableSsl); } bool DefaultMQProducer::getEnableSsl() const { return impl->getEnableSsl(); } void DefaultMQProducer::setSslPropertyFile(const std::string& sslPropertyFile) { impl->setSslPropertyFile(sslPropertyFile); } const std::string& DefaultMQProducer::getSslPropertyFile() const { return impl->getSslPropertyFile(); } } // namespace rocketmq
2,659

Common Starcoder dataset

This dataset is generated from bigcode/starcoderdata.

Total GPT2 Tokens: 4,649,163,171

Generation Process

  1. We filtered the original dataset with common language: C, Cpp, Java, Python and JSON.
  2. We removed some columns for mixing up with other dataset: "id", "max_stars_repo_path", "max_stars_repo_name"
  3. After removing the irrelevant fields, we shuffle the dataset with random seed=42.
  4. We filtered the data on "max_stars_count" > 300 and shuffle again.
  5. We further reduced the dataset size by select(range(current_size, 2_500_000)), However there are only 2.13M samples left.
  6. Add "n_tokens" by using GPT2Tokenizer to count the tokens in the "content" field.
Downloads last month
128
Edit dataset card