+temp_object+ should respond to +data+ and +meta+
494918
def write(temp_object, opts={})
      temp_object.file do |fd|
        File.new.tap do |file|
          file.metadata = temp_object.meta
          file.data     = fd
          file.save!
          return file.id.to_s
        end
      end
    end
166354
function(req, res) {
      this.debug('postProcessor called');

      // example of post API business logic
      var clientMsg = res.yukon.data2.specialMsg || res.yukon.data2.msg;

      // MAGIC ALERT: if no res.yukon.renderData isn't specified, the framework uses res.yukon.data1

      // res.yukon.renderData is the base object sent to jade template
      res.yukon.renderData = {
        globalNav: res.yukon.globalNav,
        cmsData: res.yukon.data1,
        myData: res.yukon.data2,
        clientMsg: clientMsg
      };
    }
226141
function validateSetData (module, newData) {
    // require valid data
    if (typeof newData !== 'object' || newData === null) {
        throw new Error(`invalid data for ${module.meta.name}`)
    }
    // get data id
    var dataId = stableId(newData)
    // if data has not changed do not set
    if (dataId === module.meta.dataId) {
        return
    }
    // freeze data
    if (module.meta.options.freezeData) {
        deepFreeze(newData)
    }
    // set data id
    module.meta.dataId = dataId
    // log data set
    if (defined(module.meta.options.logClient)) {
        module.meta.options.logClient.log('setData', {
            data: newData,
            dataCreateTime: microTimestamp(),
            dataId: dataId,
            instanceId: instanceId.id,
            moduleName: module.meta.name,
        })
    }
    // return validated data
    return newData
}
622033
def put_template(self, temp_id, body, params={}, callback=None, **kwargs):
        

        url = self.mk_url(*['_search', 'template', temp_id])

        self.client.fetch(
            self.mk_req(url, method='PUT', body=body, **kwargs),
            callback = callback
        )
701007
function(object) {
        var self = this
        if (object == undefined || object == null) return 'null'
        if (object === true) return 'true'
        if (object === false) return 'false'
        switch (typeof object) {
          case 'number': return object
          case 'string': return this.escapable.test(object) ?
            '"' + object.replace(this.escapable, function (a) {
              return typeof self.meta[a] === 'string' ? self.meta[a] :
                '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4)
            }) + '"' :
            '"' + object + '"'
          case 'object':  
            if (object.constructor == Array)
              return '[' + map(object, function(val){
                return self.encode(val)
              }).join(', ') + ']'
            else if (object)
              return '{' + map(object, function(key, val){
                return self.encode(key) + ':' + self.encode(val)
              }).join(', ') + '}'
        }
        return 'null'
      }
883867
function with($meta, $operator = null, $value = null)
	{
		
		list($value, $operator) = $this->prepareValueAndOperator(
			$value, $operator, func_num_args() == 2
		);

		static $count;
		if (empty($count)) {
			$count = 0;
		}
		
		if (!is_array($meta)) {
			$meta = [ $meta => $value ];
		}

		foreach($meta as $key => $value) {
			$alias = '_with_condition_'.(++$count);
			$this->query->join("postmeta as {$alias}", "{$alias}.post_id", '=', 'ID');
			$this->query->where("{$alias}.meta_key", '_' . $key);
			$this->query->where("{$alias}.meta_value", $operator, $value);
		}

		return $this;
	}
127071
def respond_to?(method_sym, _include_private=false)
      name = method_sym.to_s
      key = :getter?
      if name =~ /^(.*)=$/
        name = Regexp.last_match(1)
        # Use table_map_set() to set these properties
        return false if name == 'table_map' || name == 'table_map_filter'
        key = :setter?
      elsif name =~ /^default_(.*)$/
        name = Regexp.last_match(1)
        key = :default_value?
      end
      begin
        ref = node.cmd_ref.lookup('bgp_af', name)
        ref.send(key)
      rescue IndexError
        super
      end
    end
561587
function MetaType($t,$len=-1,$fieldobj=false)
	{
		if (is_object($t)) {
			$fieldobj = $t;
			$t = $fieldobj->type;
			$len = $fieldobj->max_length;
		}

		$len = -1; // mysql max_length is not accurate
		switch (strtoupper($t)) {
		case 'R':
		case 'INT':
		case 'INTEGER': return  'I';
		case 'BIT':
		case 'TINYINT': return  'I1';
		case 'SMALLINT': return 'I2';
		case 'BIGINT':  return  'I8';
		case 'SMALLDATETIME': return 'T';
		case 'REAL':
		case 'FLOAT': return 'F';
		default: return parent::MetaType($t,$len,$fieldobj);
		}
	}
480605
def apply_meta(self, arr, funcs):
        
        if arr is None:
            logging.error("unable to convert data: emtpy section")
            return None

        tmp = np.copy(arr)
        for col in arr.dtype.names:
            for row in self._get_row_hdrs():
                meta = self._get_meta(row, col)
                for mk, mv in sorted(meta.iteritems()):
                    if mk in funcs.iterkeys():
                        tmp[col][self.irt[row]] = \
                            funcs[mk](tmp[col][self.irt[row]], mv)
        return tmp
74768
def set_meta(self, total_length, object_name):
        
        self.total_length = total_length
        self.object_name = object_name
        self.prefix = self.object_name + ': ' if self.object_name else ''
626420
function (sender, frameId, contextId, args) {
  const metaToValue = function (meta) {
    switch (meta.type) {
      case 'value':
        return meta.value
      case 'remote-object':
        return objectsRegistry.get(meta.id)
      case 'array':
        return unwrapArgs(sender, frameId, contextId, meta.value)
      case 'buffer':
        return bufferUtils.metaToBuffer(meta.value)
      case 'date':
        return new Date(meta.value)
      case 'promise':
        return Promise.resolve({
          then: metaToValue(meta.then)
        })
      case 'object': {
        const ret = {}
        Object.defineProperty(ret.constructor, 'name', { value: meta.name })

        for (const { name, value } of meta.members) {
          ret[name] = metaToValue(value)
        }
        return ret
      }
      case 'function-with-return-value':
        const returnValue = metaToValue(meta.value)
        return function () {
          return returnValue
        }
      case 'function': {
        // Merge contextId and meta.id, since meta.id can be the same in
        // different webContents.
        const objectId = [contextId, meta.id]

        // Cache the callbacks in renderer.
        if (rendererFunctions.has(objectId)) {
          return rendererFunctions.get(objectId)
        }

        const callIntoRenderer = function (...args) {
          let succeed = false
          if (!sender.isDestroyed()) {
            succeed = sender._sendToFrameInternal(frameId, 'ELECTRON_RENDERER_CALLBACK', contextId, meta.id, valueToMeta(sender, contextId, args))
          }
          if (!succeed) {
            removeRemoteListenersAndLogWarning(this, callIntoRenderer)
          }
        }
        v8Util.setHiddenValue(callIntoRenderer, 'location', meta.location)
        Object.defineProperty(callIntoRenderer, 'length', { value: meta.length })

        v8Util.setRemoteCallbackFreer(callIntoRenderer, contextId, meta.id, sender)
        rendererFunctions.set(objectId, callIntoRenderer)
        return callIntoRenderer
      }
      default:
        throw new TypeError(`Unknown type: ${meta.type}`)
    }
  }
  return args.map(metaToValue)
}
1207261
function getMetadata (dir) {
  var json = path.join(dir, 'meta.json')
  var js = path.join(dir, 'meta.js')
  var opts = {}

  if (exists(json)) {
    opts = metadata.sync(json)
  } else if (exists(js)) {
    var req = require(path.resolve(js))
    if (req !== Object(req)) {
      throw new Error('meta.js needs to expose an object')
    }
    opts = req
  }

  return opts
}
38755
def with_metaclass(meta, *bases):
    """"""

    class metaclass(meta):
        def __new__(cls, name, this_bases, d):
            return meta(name, bases, d)

    return type.__new__(metaclass, "temporary_class", (), {})
1332933
function rawContent(tagName, string, templ, innerTemplate) {
	var index = string.indexOf('</' + tagName + '>'),
		raw;
	if (index === -1)
		throw new Error(tagName + ' tag badly closed.');
	if (index) { // more than 0
		raw = string.substring(0, index);
		if (tagName === 'templ') // produce local api-like handler
		{
			innerTemplate.templFunc = new Function(raw);
		} else
			innerTemplate.raw(raw);
	}
	return string.substring(index + tagName.length + 3);
}
686357
def _apply_post_render_hooks(self, data, obj, fmt):
        
        hooks = self.post_render_hooks.get(fmt,[])
        for hook in hooks:
            try:
                data = hook(data, obj)
            except Exception as e:
                self.param.warning("The post_render_hook %r could not "
                                   "be applied:\n\n %s" % (hook, e))
        return data
230837
function (cb) {
            Y.log('Writing API Meta Data', 'info', 'builder');
            var self = this;
            this.renderAPIMeta(function (js) {
                fs.writeFile(path.join(self.options.outdir, 'api.js'), js, Y.charset, cb);
            });
        }
108760
function(e,d){
      if(e){
        console.log("User set add data response: %s", d)
        e && console.error(e)
        return
      }
      console.log("User set add data response with no error: %s", d)  
    }