CreateDraftForEditExtension.
        [Preview API]
        :param str publisher_name:
        :param str extension_name:
        :rtype: :class:`<ExtensionDraft> <azure.devops.v5_0.gallery.models.ExtensionDraft>`
340922
def create_draft_for_edit_extension(self, publisher_name, extension_name):
        
        route_values = {}
        if publisher_name is not None:
            route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str')
        if extension_name is not None:
            route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str')
        response = self._send(http_method='POST',
                              location_id='02b33873-4e61-496e-83a2-59d1df46b7d8',
                              version='5.0-preview.1',
                              route_values=route_values)
        return self._deserialize('ExtensionDraft', response)
978448
private String buildIndexName(String bucketName)
    {
        if (bucketName == null)
        {
            throw new KunderaException("Bucket Name can't be null!");
        }
        return (bucketName + CouchbaseConstants.INDEX_SUFFIX).toLowerCase();
    }
1082099
public String createIndiceMapping(String indexName, String templateName, Object parameter) throws ElasticSearchException {
		return super.createIndiceMapping(indexName, ESTemplateHelper.evalTemplate(esUtil,templateName, parameter));
	}
170274
function apiExc(apiName, apiExtra){
  var Config = require('./config').Config
    , config = new Config(confPath)
    , token = config.get('tsina.access_token') || ''
    , apiItem = twei.getApiItem(apiName)
    , weiboEmitter
    , emitter = new Emitter
    ;
    
  process.nextTick(function(){
    var query = require('querystring').decode(apiExtra)
      , proxy = optInfo.proxy ? optInfo.proxy[0] : config.get('proxy')
      ;
      
    query.access_token = token;
    log('apiExtra: ' + apiExtra);
    log('apiPath: ' + apiItem.path);
    log('query: ' + util.inspect(query));
    log('proxy: ' + proxy);
    
    emitter.emit('pendStart');
    
    if(proxy){
      twei.setProxy(proxy)
    }
    if(apiName == 'status.update' && optInfo.image && optInfo.image.length && query.status){
      weiboEmitter = twei.updateWeibo({
          accessToken: token
        , message: query.status
        , image: optInfo.image[0]
        , coordinates: optInfo.coordinates
      });
    }else{
      weiboEmitter = twei.executeApi(apiName, query, {
        method: optInfo.method && optInfo.method[0] || 'get'
      });
    }
    
    weiboEmitter.on('success', function(reply){
      var isLive
        , showData = [], outStr = ''
        ;
      
      emitter.emit('pendEnd', true, reply);
      
      log(reply);
      isLive = checkreply(reply);
      
      if(isLive){
        if(optInfo.filter){
          optInfo.filter.forEach(function(filterStr){
            showData.push(filter(reply, filterStr.trim().split('.')));
          });
          
          function filter(target, keys){
            var keys = keys.slice()//拷贝一份, 防止递归调用影响到上一级的 keys
              , key
              , ret = []
              , self = arguments.callee
              ;
            
            if(keys && keys.length){
              key = keys.shift();
              if(target instanceof Array){
                
                target.forEach(function(item){
                  if(key in item){
                    ret = ret.concat(self(item[key], keys));
                  }
                });
              
              }else if(typeof target == 'object'){
                ret = self(target[key], keys);
              }else{
                ret = [];
              }
            }else{
              ret = [target];
            }
            
            return ret;
          }
          
          if(showData.length == 1){
            outStr = showData[0].join('\n');
          }else{
            (function(){
              var tData = {}
                , group
                ;
                
              showData.forEach(function(item){
                tData[item.length] = tData[item.length] || [];
                item.forEach(function(val, row){
                  tData[item.length][row] = tData[item.length][row] || [];
                  tData[item.length][row].push(val);
                });
              });
              
              for(var len in tData){
                if(len === '1'){
                  group = new Table;
                  group.push(tData[len][0])
                  outStr += group.toString() + '\n';
                }else{
                  group = new Table;
                  tData[len].forEach(function(d){
                    group.push(d);
                  });
                  outStr += group.toString() + '\n';
                }
              }
              
            })();
          }
          console.log(outStr);
          if(!outStr || outStr.replace(/\s+/, '') * 1 === 0){//没有想要的字段, 或者全为 0 的时候
            exit(3);
          }
        }else{
          emitter.emit('data', optInfo.promise && optInfo.promise[0] || apiItem.promise, reply);
        }
      }else if(isLive === false){
        emitter.emit('data', 'error', reply);
        exit(3);
      }else{
        emitter.emit('noAuth', reply);
        log('event: noAuth');//需要登录
        takeAccessToken(function(){
          emitter.emit('retry', apiExc(apiName, apiExtra));
        });
      }
    });
    
    weiboEmitter.on('error', function(err){
      emitter.emit('pendEnd', false, err);
    });
  });
  return emitter.on('pendStart', function(){
    if(optInfo.quiet) return;
    log('event: pendStart')
    optInfo.shower.emit('pendStart');
  }).on('pendEnd', function(result, replyOrError){
    if(optInfo.quiet) return;
    log('event: pendEnd ' + result);
    optInfo.shower.emit('pendEnd', result, replyOrError);
  }).on('data', function(type, reply){
    if(optInfo.quiet && type === 'error') return;
    log('event: data_' + type);
    optInfo.shower.emit('data', type, reply);
  });
}
536829
def create(self, name):
    
    return Bucket(name, context=self._context).create(self._project_id)
234096
def create_addon(name):
    
    try:
        full_name = "fab_addon_" + name
        dirname = "Flask-AppBuilder-Skeleton-AddOn-master"
        url = urlopen(ADDON_REPO_URL)
        zipfile = ZipFile(BytesIO(url.read()))
        zipfile.extractall()
        os.rename(dirname, full_name)
        addon_path = os.path.join(full_name, full_name)
        os.rename(os.path.join(full_name, "fab_addon"), addon_path)
        f = open(os.path.join(full_name, "config.py"), "w")
        f.write("ADDON_NAME='" + name + "'\n")
        f.write("FULL_ADDON_NAME='fab_addon_' + ADDON_NAME\n")
        f.close()
        click.echo(
            click.style("Downloaded the skeleton addon, good coding!", fg="green")
        )
        return True
    except Exception as e:
        click.echo(click.style("Something went wrong {0}".format(e), fg="red"))
        return False
309961
def share_extension_with_host(self, publisher_name, extension_name, host_type, host_name):
        
        route_values = {}
        if publisher_name is not None:
            route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str')
        if extension_name is not None:
            route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str')
        if host_type is not None:
            route_values['hostType'] = self._serialize.url('host_type', host_type, 'str')
        if host_name is not None:
            route_values['hostName'] = self._serialize.url('host_name', host_name, 'str')
        self._send(http_method='POST',
                   location_id='328a3af8-d124-46e9-9483-01690cd415b9',
                   version='5.0-preview.1',
                   route_values=route_values)
419671
function _parseExtension (ext, name) {

    name = name || null;
    // If it's a string, the extension was previously loaded
    if (showdown.helper.isString(ext)) {
      ext = showdown.helper.stdExtName(ext);
      name = ext;

      // LEGACY_SUPPORT CODE
      if (showdown.extensions[ext]) {
        console.warn('DEPRECATION WARNING: ' + ext + ' is an old extension that uses a deprecated loading method.' +
          'Please inform the developer that the extension should be updated!');
        legacyExtensionLoading(showdown.extensions[ext], ext);
        return;
      // END LEGACY SUPPORT CODE

      } else if (!showdown.helper.isUndefined(extensions[ext])) {
        ext = extensions[ext];

      } else {
        throw Error('Extension "' + ext + '" could not be loaded. It was either not found or is not a valid extension.');
      }
    }

    if (typeof ext === 'function') {
      ext = ext();
    }

    if (!showdown.helper.isArray(ext)) {
      ext = [ext];
    }

    var validExt = validate(ext, name);
    if (!validExt.valid) {
      throw Error(validExt.error);
    }

    for (var i = 0; i < ext.length; ++i) {
      switch (ext[i].type) {

        case 'lang':
          langExtensions.push(ext[i]);
          break;

        case 'output':
          outputModifiers.push(ext[i]);
          break;
      }
      if (ext[i].hasOwnProperty('listeners')) {
        for (var ln in ext[i].listeners) {
          if (ext[i].listeners.hasOwnProperty(ln)) {
            listen(ln, ext[i].listeners[ln]);
          }
        }
      }
    }

  }
1065756
def extension_supported(extension_name, request):
    
    for ext in list_extensions(request):
        if ext.name == extension_name:
            return True
    return False
65857
protected void initExtensions(IExtension[] extensions) {
		final String sourceMethod = "initExtension"; //$NON-NLS-1$
		boolean isTraceLogging = log.isLoggable(Level.FINER);
		if (isTraceLogging) {
			log.entering(sourceClass, sourceMethod, new Object[]{extensions});
		}
		for (IExtension extension : extensions) {
			for (IConfigurationElement member : extension.getConfigurationElements()) {
				try {
					// make sure the contributing bundle is started.
					Bundle contributingBundle = Platform.getBundle(member.getNamespaceIdentifier());
					if (contributingBundle != null && contributingBundle.getState() != Bundle.ACTIVE && contributingBundle.getState() != Bundle.STARTING) {
						contributingBundle.start();
					}
					// get class attribute so we can see if the class is a singleton that we
					// already have an instance for.
					String className = member.getAttribute("class"); //$NON-NLS-1$
					Object ext = singletonExtensions.get(className);
					if (ext == null) {
						ext = member.createExecutableExtension("class"); //$NON-NLS-1$
						if (ext instanceof IExtensionSingleton) {
							// Add it to the map of singleton extensions
							singletonExtensions.put(className, ext);
						}
					}
					Properties props = new Properties();
					for (String attributeName : member.getAttributeNames()) {
						props.put(attributeName, member.getAttribute(attributeName));
					}
					InitParams initParams = getConfigInitParams(member);
					registerExtension(
							new AggregatorExtension(ext, props, initParams,
									extension.getExtensionPointUniqueIdentifier(),
									extension.getUniqueIdentifier(),
									this), null
							);
				} catch (CoreException ex) {
					if (log.isLoggable(Level.WARNING)) {
						log.log(Level.WARNING, ex.getMessage(), ex);
					}
				} catch (BundleException ex) {
					if (log.isLoggable(Level.WARNING)) {
						log.log(Level.WARNING, ex.getMessage(), ex);
					}
				}
			}
		}
		if (isTraceLogging) {
			log.exiting(sourceClass, sourceMethod);
		}
	}
648706
def build_extension(extensions: Sequence[ExtensionHeader]) -> str:
    
    return ", ".join(
        build_extension_item(name, parameters) for name, parameters in extensions
    )
991047
public com.google.api.ads.adwords.axis.v201809.cm.ExtensionFeedItem getExtensionFeedItem() {
        return extensionFeedItem;
    }
1321005
function legacyExtensionLoading (ext, name) {
    if (typeof ext === 'function') {
      ext = ext(new showdown.Converter());
    }
    if (!showdown.helper.isArray(ext)) {
      ext = [ext];
    }
    var valid = validate(ext, name);

    if (!valid.valid) {
      throw Error(valid.error);
    }

    for (var i = 0; i < ext.length; ++i) {
      switch (ext[i].type) {
        case 'lang':
          langExtensions.push(ext[i]);
          break;
        case 'output':
          outputModifiers.push(ext[i]);
          break;
        default:// should never reach here
          throw Error('Extension loader error: Type unrecognized!!!');
      }
    }
  }
1347490
def CreateCustomizerFeed(client, feed_name):
  
  # Get the AdCustomizerFeedService
  ad_customizer_feed_service = client.GetService('AdCustomizerFeedService',
                                                 'v201809')
  customizer_feed = {
      'feedName': feed_name,
      'feedAttributes': [
          {'type': 'STRING', 'name': 'Name'},
          {'type': 'STRING', 'name': 'Price'},
          {'type': 'DATE_TIME', 'name': 'Date'}
      ]
  }

  feed_service_operation = {
      'operator': 'ADD',
      'operand': customizer_feed
  }

  response = ad_customizer_feed_service.mutate([feed_service_operation])

  if response and 'value' in response:
    feed = response['value'][0]
    feed_data = {
        'feedId': feed['feedId'],
        'nameId': feed['feedAttributes'][0]['id'],
        'priceId': feed['feedAttributes'][1]['id'],
        'dateId': feed['feedAttributes'][2]['id']
    }
    print ('Feed with name "%s" and ID %s was added with:\n'
           '\tName attribute ID %s and price attribute ID %s and date attribute'
           'ID %s') % (feed['feedName'], feed['feedId'], feed_data['nameId'],
                       feed_data['priceId'], feed_data['dateId'])
    return feed
  else:
    raise errors.GoogleAdsError('No feeds were added')
607153
function ExtensionAPI(chartInstance) {
    zrUtil.each(echartsAPIList, function (name) {
        this[name] = zrUtil.bind(chartInstance[name], chartInstance);
    }, this);
}
370490
def PushSection(self, name, pre_formatters):
        
        if name == '@':
            value = self.stack[-1].context
        else:
            value = self.stack[-1].context.get(name)
        
        # Apply pre-formatters
        for i, (f, args, formatter_type) in enumerate(pre_formatters):
            if formatter_type == ENHANCED_FUNC:
                value = f(value, self, args)
            elif formatter_type == SIMPLE_FUNC:
                value = f(value)
            else:
                assert False, 'Invalid formatter type %r' % formatter_type
        
        self.stack.append(_Frame(value))
        return value
1061094
function vendorPropName( name ) {

	// shortcut for names that are not vendor prefixed
	if ( name in emptyStyle ) {
		return name;
	}

	// check for vendor prefixed names
	var capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),
		i = cssPrefixes.length;

	while ( i-- ) {
		name = cssPrefixes[ i ] + capName;
		if ( name in emptyStyle ) {
			return name;
		}
	}
}