Callback function to set header
961181
function callHeader( $params )
    {
        $options = array();

        if ( isset( $params['size'] ) )
        {
            $options['fontSize'] = $params['size'];
        }

        if ( isset( $params['justification'] ) )
        {
            $options['justification'] = $params['justification'];
        }

        if ( isset( $params['fontName'] ) )
        {
            $options['fontName'] = 'lib/ezpdf/classes/fonts/'. $params['fontName'];
        }

        $this->addToPreStack( $options );

        $label = $params['label'];
        $level = $params['level'];

        return '<C:callInsertTOC:'. $label .','. $level .'>';
    }
294908
public function set_header($header, $content = null)
	{
		if (is_null($content))
		{
			$this->headers[] = $header;
		}
		else
		{
			$this->headers[$header] = $content;
		}

		return $this;
	}
865338
function setRequestHeaders(connection, req) {
  if(_.isObject(connection.headers)){
    req.set(connection.headers);
  }
}
403094
function(callback) {
            spidex.put(self.baseUri + "/" + uploadFilename, {
                data: rawData,
                header: header,
                charset: "utf8"
            }, function(html, status, respHeader) {
                if(200 !== status && 201 !== status) {
                    return callback(new Error(html.replace("</h1>", "</h1> ").stripTags()));
                }

                var result = {};
                if(respHeader["x-upyun-width"] !== undefined) result.width = parseInt(respHeader["x-upyun-width"]);
                if(respHeader["x-upyun-height"] !== undefined) result.height = parseInt(respHeader["x-upyun-height"]);
                if(respHeader["x-upyun-frames"] !== undefined) result.frames = parseInt(respHeader["x-upyun-frames"]);
                if(respHeader["x-upyun-file-type"] !== undefined) result.type = respHeader["x-upyun-file-type"];

                callback(undefined, result);
            }).on("error", callback);
        }
615224
function headerHelper(classArray) {
  var i = classArray.length;
  var head = document.querySelectorAll('head');

  while(i--) {
    head.append('<meta class="' + classArray[i] + '" />');
  }

  return;
}
443160
function HeaderRW(countrw, keyrw, valrw, options) {
    this.countrw = countrw;
    this.keyrw = keyrw;
    this.valrw = valrw;
    this.maxHeaderCount = options.maxHeaderCount;
    this.maxKeyLength = options.maxKeyLength;
    bufrw.Base.call(this);
}
503213
function create_header_col(m) {
    var $e = $$('hcol nowrap');
    $e.css({width: p});
    if (m.options) {
      $e.css(m.options);
    }
    $e.text(m.name);
    var hilight = function () {
      if (!order)
        return;
      if (order == m.name)
      {
        $e.addClass('order asc');
        $lh = $e;
      }
      else if (order.substring(1) == m.name)
      {
        $e.addClass('order desc');
        $lh = $e;
      }
    }
    hilight();
    $e.click(function () {
      if (order == m.name) {
        order = '-' + m.name;
      }
      else {
        order = m.name;
      }
      zcookie.set('order-'+type, order);
      if ($lh)
        $lh.removeClass('order asc desc');
      hilight();
      $lh = $e;
     request_data();
    });
    return $e;
  }
757934
function _setResponseHeaders(headers) {
    this.responseHeaders = {};

    for (var header in headers) {
      if (headers.hasOwnProperty(header)) {
          this.responseHeaders[header] = headers[header];
      }
    }

    if (this.forceMimeType) {
      this.responseHeaders['Content-Type'] = this.forceMimeType;
    }

    if (this.async) {
      this._readyStateChange(FakeXMLHttpRequest.HEADERS_RECEIVED);
    } else {
      this.readyState = FakeXMLHttpRequest.HEADERS_RECEIVED;
    }
  }
1351213
function Header(cmd, size, checksum) {
  this.cmd = cmd;
  this.size = size;
  this.checksum = checksum;
}
953192
public function header(Closure $callback = null)
    {
        if (\is_null($callback)) {
            return $this->header;
        }

        $this->header = $callback;

        return null;
    }
676816
def set_header(self, key, value):
    
    self.conn.issue_command("Header", _normalize_header(key), value)
1071684
function wrapper(my, flag) {

  var callback;

  if (flag) {
    if (my.header) {
      callback = function(req, res) {

        var t = res._headerSent === false || res.finished === false;
        return t === true ? my.callback(req, res, my.data) : null;
      };
    } else {
      callback = function(req, res) {

        my.callback(req, res, my.data);
      };
    }

  } else {
    var finale = function(req, res) {

      res.end();
      req.socket.destroy();
    };
    if (my.header) {
      callback = function(req, res) {

        var t = res._headerSent === false || res.finished === false;
        return t === true ? finale(req, res) : null;
      };
    } else {
      callback = function(req, res) {

        finale(req, res);
      };
    }
  }

  /**
   * set timeout as middleware with callback
   * 
   * @function timer
   * @param {Object} req - client request
   * @param {Object} res - response to client
   * @param {next} next - continue routes
   * @return {next}
   */
  return function timer(req, res, next) {

    req.timeout = setTimeout(callback.bind(this, req, res), my.milliseconds);

    // buff
    var destroy = req.socket.destroy;
    var end = res.end;

    // override
    req.socket.destroy = function() {

      clearTimeout(req.timeout);
      destroy.call(this);
    };

    res.end = function(chunk, encoding) {

      clearTimeout(req.timeout);
      end.call(this, chunk, encoding);
    };

    next();
  };
}
1071410
function createHeaderGetter(str) {
  var header = str.toLowerCase()

  return headerGetter

  function headerGetter(req, res) {
    // set appropriate Vary header
    res.vary(str)

    // multiple headers get joined with comma by node.js core
    return (req.headers[header] || '').split(/ *, */)
  }
}
362629
public function setGroupHeaderByNumber($query_name, $header_number, $header_column, $header_custom, $show_in_html = "yes", $show_in_pdf = "yes")
    {
        $hn = (int) $header_number;
        if (!$this->checkGroupNameR("createGroupHeader", $query_name)) {
            ReporticoApp::handleError("Failure in Group Column Header: Unknown Group Name $query_name");
            return;
        }

        if (!$this->checkColumnNameR("createGroupHeader", $header_column)) {
            ReporticoApp::handleError("Failure in Group Column Header: Unknown Column $header_column");
            return;
        }

        $grp = ReporticoUtility::getGroupColumn($query_name, $this->groups);
        $col = ReporticoUtility::getQueryColumn($header_column, $this->columns);
        $header = array();
        $header["GroupHeaderColumn"] = $col;
        $header["GroupHeaderCustom"] = $header_custom;
        $header["ShowInHTML"] = $show_in_html;
        $header["ShowInPDF"] = $show_in_pdf;
        $grp->headers[$hn] = $header;
        //$this->headers[] = $header;
    }
1139695
function _setResponseHeaders(headers) {
            this.responseHeaders = {};

            for (var header in headers) {
                if (headers.hasOwnProperty(header)) {
                    this.responseHeaders[header] = headers[header];
                }
            }

            if (this.async) {
                this._readyStateChange(IsotropyXMLHttpRequest.HEADERS_RECEIVED);
            } else {
                this.readyState = IsotropyXMLHttpRequest.HEADERS_RECEIVED;
            }
        }
67380
def set_call_back(self, func):

        """"""

        self.timer.add_callback(func)
        self.timer.start()
292386
def add_response_headers(h):
    
    def headers_wrapper(fun):
        def wrapped_function(*args, **kwargs):
            response = fun(*args, **kwargs)
            for k, v in h.iteritems():
                response[k] = v
            return response
        return wrapped_function
    return headers_wrapper