text:
class Factory

  class << self
    attr_accessor :factories #:nodoc:

    # An Array of strings specifying locations that should be searched for
    # factory definitions. By default, factory_girl will attempt to require
    # "factories," "test/factories," and "spec/factories." Only the first
    # existing file will be loaded.
    attr_accessor :definition_file_paths
  end

  self.factories = {}
  self.definition_file_paths = %w(factories test/factories spec/factories)

  attr_reader :factory_name

  # Defines a new factory that can be used by the build strategies (create and
  # build) to build new objects.
  #
  # Arguments:
  #   name: (Symbol)
  #     A unique name used to identify this factory.
  #   options: (Hash)
  #     class: the class that will be used when generating instances for this
  #            factory. If not specified, the class will be guessed from the
  #            factory name.
  #
  # Yields:
  #    The newly created factory (Factory)
  def self.define (name, options = {})
    instance = Factory.new(name, options)
    yield(instance)
    self.factories[instance.factory_name] = instance
  end

  def build_class #:nodoc:
    @build_class ||= class_for(@options[:class] || factory_name)
  end

  def initialize (name, options = {}) #:nodoc:
    assert_valid_options(options)
    @factory_name = factory_name_for(name)
    @options      = options
    @attributes   = []
  end

  # Adds an attribute that should be assigned on generated instances for this
  # factory.
  #
  # This method should be called with either a value or block, but not both. If
  # called with a block, the attribute will be generated "lazily," whenever an
  # instance is generated. Lazy attribute blocks will not be called if that
  # attribute is overriden for a specific instance.
  #
  # When defining lazy attributes, an instance of Factory::AttributeProxy will
  # be yielded, allowing associations to be built using the correct build
  # strategy.
  #
  # Arguments:
  #   name: (Symbol)
  #     The name of this attribute. This will be assigned using :"#{name}=" for
  #     generated instances.
  #   value: (Object)
  #     If no block is given, this value will be used for this attribute.
  def add_attribute (name, value = nil, &block)
    attribute = Attribute.new(name, value, block)

    if attribute_defined?(attribute.name)
      raise AttributeDefinitionError, "Attribute already defined: #{name}"
    end

    @attributes << attribute
  end

  # Calls add_attribute using the missing method name as the name of the
  # attribute, so that:
  #
  #   Factory.define :user do |f|
  #     f.name 'Billy Idol'
  #   end
  #
  # and:
  #
  #   Factory.define :user do |f|
  #     f.add_attribute :name, 'Billy Idol'
  #   end
  #
  # are equivilent.
  def method_missing (name, *args, &block)
    add_attribute(name, *args, &block)
  end

  # Adds an attribute that builds an association. The associated instance will
  # be built using the same build strategy as the parent instance.
  #
  # Example:
  #   Factory.define :user do |f|
  #     f.name 'Joey'
  #   end
  #
  #   Factory.define :post do |f|
  #     f.association :author, :factory => :user
  #   end
  #
  # Arguments:
  #   name: (Symbol)
  #     The name of this attribute.
  #   options: (Hash)
  #     factory: (Symbol)
  #       The name of the factory to use when building the associated instance.
  #       If no name is given, the name of the attribute is assumed to be the
  #       name of the factory. For example, a "user" association will by
  #       default use the "user" factory.
  def association (name, options = {})
    name    = name.to_sym
    options = symbolize_keys(options)
    association_factory = options[:factory] || name

    add_attribute(name) {|a| a.association(association_factory) }
  end

  def attributes_for (attrs = {}) #:nodoc:
    build_attributes_hash(attrs, :attributes_for)
  end

  def build (attrs = {}) #:nodoc:
    build_instance(attrs, :build)
  end

  def create (attrs = {}) #:nodoc:
    instance = build_instance(attrs, :create)
    instance.save!
    instance
  end

  class << self

    # Generates and returns a Hash of attributes from this factory. Attributes
    # can be individually overridden by passing in a Hash of attribute => value
    # pairs.
    #
    # Arguments:
    #   attrs: (Hash)
    #     Attributes to overwrite for this set.
    #
    # Returns:
    #   A set of attributes that can be used to build an instance of the class
    #   this factory generates. (Hash)
    def attributes_for (name, attrs = {})
      factory_by_name(name).attributes_for(attrs)
    end

    # Generates and returns an instance from this factory. Attributes can be
    # individually overridden by passing in a Hash of attribute => value pairs.
    #
    # Arguments:
    #   attrs: (Hash)
    #     See attributes_for
    #
    # Returns:
    #   An instance of the class this factory generates, with generated
    #   attributes assigned.
    def build (name, attrs = {})
      factory_by_name(name).build(attrs)
    end

    # Generates, saves, and returns an instance from this factory. Attributes can
    # be individually overridden by passing in a Hash of attribute => value
    # pairs.
    #
    # If the instance is not valid, an ActiveRecord::Invalid exception will be
    # raised.
    #
    # Arguments:
    #   attrs: (Hash)
    #     See attributes_for
    #
    # Returns:
    #   A saved instance of the class this factory generates, with generated
    #   attributes assigned.
    def create (name, attrs = {})
      factory_by_name(name).create(attrs)
    end

    def find_definitions #:nodoc:
      definition_file_paths.each do |path|
        require("#{path}.rb") if File.exists?("#{path}.rb")

        if File.directory? path
          Dir[File.join(path, '*.rb')].each do |file|
            require file
          end
        end
      end
    end

    private

    def factory_by_name (name)
      factories[name.to_sym] or raise ArgumentError.new("No such factory: #{name.to_s}")
    end

  end

  private

  def build_attributes_hash (values, strategy)
    values = symbolize_keys(values)
    passed_keys = values.keys.collect {|key| Factory.aliases_for(key) }.flatten
    @attributes.each do |attribute|
      unless passed_keys.include?(attribute.name)
        proxy = AttributeProxy.new(self, attribute.name, strategy, values)
        values[attribute.name] = attribute.value(proxy)
      end
    end
    values
  end

  def build_instance (override, strategy)
    instance = build_class.new
    attrs = build_attributes_hash(override, strategy)
    attrs.each do |attr, value|
      instance.send(:"#{attr}=", value)
    end
    instance
  end

  def class_for (class_or_to_s)
    if class_or_to_s.respond_to?(:to_sym)
      Object.const_get(variable_name_to_class_name(class_or_to_s))
    else
      class_or_to_s
    end
  end

  def factory_name_for (class_or_to_s)
    if class_or_to_s.respond_to?(:to_sym)
      class_or_to_s.to_sym
    else
      class_name_to_variable_name(class_or_to_s).to_sym
    end
  end

  def attribute_defined? (name)
    !@attributes.detect {|attr| attr.name == name }.nil?
  end

  def assert_valid_options(options)
    invalid_keys = options.keys - [:class]
    unless invalid_keys == []
      raise ArgumentError, "Unknown arguments: #{invalid_keys.inspect}"
    end
  end

  # Based on ActiveSupport's underscore inflector
  def class_name_to_variable_name(name)
    name.to_s.gsub(/::/, '/').
      gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2').
      gsub(/([a-z\d])([A-Z])/,'\1_\2').
      tr("-", "_").
      downcase
  end

  # Based on ActiveSupport's camelize inflector
  def variable_name_to_class_name(name)
    name.to_s.
      gsub(/\/(.?)/) { "::#{$1.upcase}" }.
      gsub(/(?:^|_)(.)/) { $1.upcase }
  end

  # From ActiveSupport
  def symbolize_keys(hash)
    hash.inject({}) do |options, (key, value)|
      options[(key.to_sym rescue key) || key] = value
      options
    end
  end

end

redpajama_set_name: RedPajamaGithub


text:
extern zend_object_handlers php_ds_stack_handlers;

void php_register_ds_stack_handlers();

#endif


text:
import gdb
import sys
import re

from glib_gobject_helper import g_type_to_name, g_type_name_from_instance, \
    g_type_to_typenode, g_quark_to_string

if sys.version_info[0] >= 3:
    long = int

def is_gst_type(val, klass):
    def _is_gst_type(type):
        if str(type) == klass:
            return True

        while type.code == gdb.TYPE_CODE_TYPEDEF:
            type = type.target()

        if type.code != gdb.TYPE_CODE_STRUCT:
            return False

        fields = type.fields()
        if len(fields) < 1:
            return False

        first_field = fields[0]
        return _is_gst_type(first_field.type)

    type = val.type
    if type.code != gdb.TYPE_CODE_PTR:
        return False
    type = type.target()
    return _is_gst_type(type)

class GstMiniObjectPrettyPrinter:
    "Prints a GstMiniObject instance pointer"

    def __init__(self, val):
        self.val = val

    def to_string(self):
        try:
            inst = self.val.cast(gdb.lookup_type("GstMiniObject").pointer())
            gtype = inst["type"]
            name = g_type_to_name(gtype)
            return "0x%x [%s]" % (long(self.val), name)
        except RuntimeError:
            return "0x%x" % long(self.val)

class GstObjectPrettyPrinter:
    "Prints a GstObject instance"

    def __init__(self, val):
        self.val = val

    def to_string(self):
        try:
            name = g_type_name_from_instance(self.val)
            if not name:
                name = str(self.val.type.target())
            if long(self.val) != 0:
                inst = self.val.cast(gdb.lookup_type("GstObject").pointer())
                inst_name = inst["name"].string()
                if inst_name:
                    name += "|" + inst_name
            return ("0x%x [%s]") % (long(self.val), name)
        except RuntimeError:
            return "0x%x" % long(self.val)

class GstClockTimePrinter:
    "Prints a GstClockTime / GstClockTimeDiff"

    def __init__(self, val):
        self.val = val

    def to_string(self):
        GST_SECOND = 1000000000
        GST_CLOCK_TIME_NONE = 2**64-1
        GST_CLOCK_STIME_NONE = -2**63
        n = int(self.val)
        prefix = ""
        invalid = False
        if str(self.val.type) == "GstClockTimeDiff":
            if n == GST_CLOCK_STIME_NONE:
                invalid = True
            prefix = "+" if n >= 0 else "-"
            n = abs(n)
        else:
            if n == GST_CLOCK_TIME_NONE:
                invalid = True

        if invalid:
            return str(n) + " [99:99:99.999999999]"

        return str(n) + " [%s%u:%02u:%02u.%09u]" % (
            prefix,
            n / (GST_SECOND * 60 * 60),
            (n / (GST_SECOND * 60)) % 60,
            (n / GST_SECOND) % 60,
            n % GST_SECOND)

def gst_pretty_printer_lookup(val):
    if is_gst_type(val, "GstMiniObject"):
        return GstMiniObjectPrettyPrinter(val)
    if is_gst_type(val, "GstObject"):
        return GstObjectPrettyPrinter(val)
    if str(val.type) == "GstClockTime" or str(val.type) == "GstClockTimeDiff":
        return GstClockTimePrinter(val)
    return None

def save_memory_access(fallback):
    def _save_memory_access(func):
        def wrapper(*args, **kwargs):
            try:
                return func(*args, **kwargs)
            except gdb.MemoryError:
                return fallback
        return wrapper
    return _save_memory_access

def save_memory_access_print(message):
    def _save_memory_access_print(func):
        def wrapper(*args, **kwargs):
            try:
                func(*args, **kwargs)
            except gdb.MemoryError:
                _gdb_write(args[1], message)
        return wrapper
    return _save_memory_access_print

def _g_type_from_instance(instance):
    if long(instance) != 0:
        try:
            inst = instance.cast(gdb.lookup_type("GTypeInstance").pointer())
            klass = inst["g_class"]
            gtype = klass["g_type"]
            return gtype
        except RuntimeError:
            pass
    return None

def g_inherits_type(val, typename):
    if is_gst_type(val, "GstObject"):
        gtype = _g_type_from_instance(val)
        if gtype is None:
            return False
        typenode = g_type_to_typenode(gtype)
    elif is_gst_type(val, "GstMiniObject"):
        mini = val.cast(gdb.lookup_type("GstMiniObject").pointer())
        try:
            typenode = mini["type"].cast(gdb.lookup_type("TypeNode").pointer())
        except gdb.MemoryError:
            return False
    else:
        return False

    for i in range(typenode["n_supers"]):
        if g_type_to_name(typenode["supers"][i]) == typename:
            return True
    return False

def gst_is_bin(val):
    return g_inherits_type(val, "GstBin")

def _g_array_iter(array, element_type):
    if array == 0:
        return
    try:
        item = array["data"].cast(element_type.pointer())
        for i in range(int(array["len"])):
            yield item[i]
    except gdb.MemoryError:
        pass

def _g_value_get_value(val):
    typenode = g_type_to_typenode(val["g_type"])
    if not typenode:
        return None
    tname = g_quark_to_string(typenode["qname"])
    fname = g_type_to_name(typenode["supers"][int(typenode["n_supers"])])
    if fname in ("gchar", "guchar", "gboolean", "gint", "guint", "glong",
                 "gulong", "gint64", "guint64", "gfloat", "gdouble",
                 "gpointer", "GFlags"):
        try:
            t = gdb.lookup_type(tname).pointer()
        except RuntimeError:
            t = gdb.lookup_type(fname).pointer()
    elif fname == "gchararray":
        t = gdb.lookup_type("char").pointer().pointer()
    elif fname == "GstBitmask":
        t = gdb.lookup_type("guint64").pointer()
    elif fname == "GstFlagSet":
        t = gdb.lookup_type("guint").pointer().pointer()
        return val["data"].cast(t)
    elif fname == "GstFraction":
        t = gdb.lookup_type("gint").pointer().pointer()
        return val["data"].cast(t)
    elif fname == "GstFractionRange":
        t = gdb.lookup_type("GValue").pointer().pointer()
    elif fname == "GstValueList":
        t = gdb.lookup_type("GArray").pointer().pointer()
    elif fname in ("GBoxed", "GObject"):
        try:
            t = gdb.lookup_type(tname).pointer().pointer()
        except RuntimeError:
            t = gdb.lookup_type(tname).pointer().pointer()
    else:
        return val["data"]

    return val["data"].cast(t).dereference()

def _gdb_write(indent, text):
    gdb.write("%s%s\n" % ("  " * indent, text))

class GdbCapsFeatures:
    def __init__(self, val):
        self.val = val

    def size(self):
        if long(self.val) == 0:
            return 0
        return int(self.val["array"]["len"])

    def items(self):
        if long(self.val) == 0:
            return
        for q in _g_array_iter(self.val["array"], gdb.lookup_type("GQuark")):
            yield q

    def __eq__(self, other):
        if self.size() != other.size():
            return False
        a1 = list(self.items())
        a2 = list(other.items())
        for item in a1:
            if item not in a2:
                return False
        return True

    def __str__(self):
        if long(self.val) == 0:
            return ""
        count = self.size()
        if int(self.val["is_any"]) == 1 and count == 0:
            return "(ANY)"
        if count == 0:
            return ""
        s = ""
        for f in self.items():
            ss = g_quark_to_string(f)
            if ss != "memory:SystemMemory" or count > 1:
                s += ", " if s else ""
                s += ss
        return s

class GdbGstCaps:
    def __init__(self, val):
        self.val = val.cast(gdb.lookup_type("GstCapsImpl").pointer())

    def size(self):
        return int(self.val["array"]["len"])

    def items(self):
        gdb_type = gdb.lookup_type("GstCapsArrayElement")
        for f in _g_array_iter(self.val["array"], gdb_type):
            yield(GdbCapsFeatures(f["features"]),
                  GdbGstStructure(f["structure"]))

    def __eq__(self, other):
        if self.size() != other.size():
            return False
        a1 = list(self.items())
        a2 = list(other.items())
        for i in range(self.size()):
            if a1[i] != a2[i]:
                return False
        return True

    def dot(self):
        if self.size() == 0:
            return "ANY"
        s = ""
        for (features, structure) in self.items():
            s += structure.name()
            tmp = str(features)
            if tmp:
                s += "(" + tmp + ")"
            s += "\\l"
            if structure.size() > 0:
                s += "\\l".join(structure.value_strings("  %18s: %s")) + "\\l"
        return s

    @save_memory_access_print("<inaccessible memory>")
    def print(self, indent, prefix=""):
        items = list(self.items())
        if len(items) != 1:
            _gdb_write(indent, prefix)
            prefix = ""
        for (features, structure) in items:
            s = "%s %s" % (prefix, structure.name())
            tmp = str(features)
            if tmp:
                s += "(" + tmp + ")"
            _gdb_write(indent, s)
            for val in structure.value_strings("%s: %s", False):
                _gdb_write(indent+1, val)
        return s

class GdbGValue:
    def __init__(self, val):
        self.val = val

    def fundamental_typename(self):
        typenode = g_type_to_typenode(self.val["g_type"])
        if not typenode:
            return None
        return g_type_to_name(typenode["supers"][int(typenode["n_supers"])])

    def value(self):
        return _g_value_get_value(self.val)

    def __str__(self):
        try:
            value = self.value()
            tname = self.fundamental_typename()
            gvalue_type = gdb.lookup_type("GValue")
            if tname == "GstFraction":
                v = "%d/%d" % (value[0], value[1])
            elif tname == "GstBitmask":
                v = "0x%016x" % long(value)
            elif tname == "gboolean":
                v = "false" if int(value) == 0 else "true"
            elif tname == "GstFlagSet":
                v = "%x:%x" % (value[0], value[1])
            elif tname == "GstIntRange":
                rmin = int(value[0]["v_uint64"]) >> 32
                rmax = int(value[0]["v_uint64"]) & 0xffffffff
                step = int(value[1]["v_int"])
                if step == 1:
                    v = "[ %d, %d ]" % (rmin, rmax)
                else:
                    v = "[ %d, %d, %d ]" % (rmin*step, rmax*step, step)
            elif tname == "GstFractionRange":
                v = "[ %s, %s ]" % (GdbGValue(value[0]), GdbGValue(value[1]))
            elif tname in ("GstValueList", "GstValueArray"):
                if gvalue_type.fields()[1].type == value.type:
                    gdb_type = gdb.lookup_type("GArray").pointer()
                    value = value[0]["v_pointer"].cast(gdb_type)
                v = "<"
                for l in _g_array_iter(value, gvalue_type):
                    v += " " if v == "<" else ", "
                    v += str(GdbGValue(l))
                v += " >"
            else:
                try:
                    v = value.string()
                except RuntimeError:
                    # it is not a string-like type
                    if gvalue_type.fields()[1].type == value.type:
                        # don't print the raw GValue union
                        v = "<unkown type: %s>" % tname
                    else:
                        v = str(value)
        except gdb.MemoryError:
            v = "<inaccessible memory at 0x%x>" % int(self.val)
        return v

    def __eq__(self, other):
        return self.val == other.val

class GdbGstStructure:
    def __init__(self, val):
        self.val = val.cast(gdb.lookup_type("GstStructureImpl").pointer())

    @save_memory_access("<inaccessible memory>")
    def name(self):
        return g_quark_to_string(self.val["s"]["name"])

    @save_memory_access(0)
    def size(self):
        return int(self.val["fields"]["len"])

    def values(self):
        for f in _g_array_iter(self.val["fields"],
                               gdb.lookup_type("GstStructureField")):
            key = g_quark_to_string(f["name"])
            value = GdbGValue(f["value"])
            yield(key, value)

    def value(self, key):
        for (k, value) in self.values():
            if k == key:
                return value
        raise KeyError(key)

    def __eq__(self, other):
        if self.size() != other.size():
            return False
        a1 = list(self.values())
        a2 = list(other.values())
        for (key, value) in a1:
            if (key, value) not in a2:
                return False
        return True

    def value_strings(self, pattern, elide=True):
        s = []
        for (key, value) in self.values():
            v = str(value)
            if elide and len(v) > 25:
                if v[0] in "[(<\"":
                    v = v[:20] + "... " + v[-1:]
                else:
                    v = v[:22] + "..."
            s.append(pattern % (key, v))
        return s

    @save_memory_access_print("<inaccessible memory>")
    def print(self, indent, prefix=None):
        if prefix is not None:
            _gdb_write(indent, "%s: %s" % (prefix, self.name()))
        else:
            _gdb_write(indent, "%s:" % (prefix, self.name()))
        for (key, value) in self.values():
            _gdb_write(indent+1, "%s: %s" % (key, str(value)))

class GdbGstEvent:
    def __init__(self, val):
        self.val = val.cast(gdb.lookup_type("GstEventImpl").pointer())

    @save_memory_access("<inaccessible memory>")
    def typestr(self):
        t = self.val["event"]["type"]
        (event_quarks, _) = gdb.lookup_symbol("event_quarks")
        event_quarks = event_quarks.value()
        i = 0
        while event_quarks[i]["name"] != 0:
            if t == event_quarks[i]["type"]:
                return event_quarks[i]["name"].string()
            i += 1
        return None

    def structure(self):
        return GdbGstStructure(self.val["structure"])

    @save_memory_access_print("<inaccessible memory>")
    def print(self, indent):
        typestr = self.typestr()
        if typestr == "caps":
            caps = GdbGstCaps(self.structure().value("caps").value())
            caps.print(indent, "caps:")
        elif typestr == "stream-start":
            stream_id = self.structure().value("stream-id").value()
            _gdb_write(indent, "stream-start:")
            _gdb_write(indent + 1, "stream-id: %s" % stream_id.string())
        elif typestr == "segment":
            segment = self.structure().value("segment").value()
            fmt = str(segment["format"]).split("_")[-1].lower()
            _gdb_write(indent, "segment: %s" % fmt)
            rate = float(segment["rate"])
            applied_rate = float(segment["applied_rate"])
            if applied_rate != 1.0:
                applied = "(applied rate: %g)" % applied_rate
            else:
                applied = ""
            _gdb_write(indent+1, "rate: %g%s" % (rate, applied))
        elif typestr == "tag":
            struct = self.structure()
            # skip 'GstTagList-'
            name = struct.name()[11:]
            t = gdb.lookup_type("GstTagListImpl").pointer()
            s = struct.value("taglist").value().cast(t)["structure"]
            structure = GdbGstStructure(s)
            _gdb_write(indent, "tag: %s" % name)
            for (key, value) in structure.values():
                _gdb_write(indent+1, "%s: %s" % (key, str(value)))
        else:
            self.structure().print(indent, typestr)

class GdbGstObject:
    def __init__(self, klass, val):
        self.val = val.cast(klass)

    @save_memory_access("<inaccessible memory>")
    def name(self):
        obj = self.val.cast(gdb.lookup_type("GstObject").pointer())
        return obj["name"].string()

    def dot_name(self):
        ptr = self.val.cast(gdb.lookup_type("void").pointer())
        return re.sub('[^a-zA-Z0-9<>]', '_', "%s_%s" % (self.name(), str(ptr)))

    def parent(self):
        obj = self.val.cast(gdb.lookup_type("GstObject").pointer())
        return obj["parent"]

    def parent_element(self):
        p = self.parent()
        if p != 0 and g_inherits_type(p, "GstElement"):
            element = p.cast(gdb.lookup_type("GstElement").pointer())
            return GdbGstElement(element)
        return None

class GdbGstPad(GdbGstObject):
    def __init__(self, val):
        gdb_type = gdb.lookup_type("GstPad").pointer()
        super(GdbGstPad, self).__init__(gdb_type, val)

    def __eq__(self, other):
        return self.val == other.val

    def is_linked(self):
        return long(self.val["peer"]) != 0

    def peer(self):
        return GdbGstPad(self.val["peer"])

    def direction(self):
        return str(self.val["direction"])

    def events(self):
        if long(self.val["priv"]) == 0:
            return
        array = self.val["priv"]["events"]
        for ev in _g_array_iter(array, gdb.lookup_type("PadEvent")):
            yield GdbGstEvent(ev["event"])

    def caps(self):
        for ev in self.events():
            if ev.typestr() != "caps":
                continue
            return GdbGstCaps(ev.structure().value("caps").value())
        return None

    def template_caps(self):
        tmp = self.val["padtemplate"]
        return GdbGstCaps(tmp["caps"]) if int(tmp) != 0 else None

    def mode(self):
        m = str(self.val["mode"]).split("_")[-1].lower()
        if m in ("push", "pull"):
            return m
        return None

    def pad_type(self):
        s = str(self.val["direction"]).split("_")[-1].capitalize()
        if g_inherits_type(self.val, "GstGhostPad"):
            s += "Ghost"
        return s + "Pad"

    @save_memory_access_print("Pad(<inaccessible memory>)")
    def print(self, indent):
        m = ", " + self.mode() if self.mode() else ""
        _gdb_write(indent, "%s(%s%s) {" % (self.pad_type(), self.name(), m))
        first = True
        for ev in self.events():
            if first:
                _gdb_write(indent+1, "events:")
                first = False
            ev.print(indent+2)
        _gdb_write(indent, "}")

    def _dot(self, color, pname, indent):
        spc = "  " * indent
        activation_mode = "-><"
        style = "filled,solid"
        template = self.val["padtemplate"]
        if template != 0:
            presence = template["presence"]
            if str(presence) == "GST_PAD_SOMETIMES":
                style = "filled,dotted"
            if str(presence) == "GST_PAD_REQUEST":
                style = "filled,dashed"
        task_mode = ""
        task = self.val["task"]
        if long(task) != 0:
            task_state = int(task["state"])
            if task_state == 0:  # started
                task_mode = "[T]"
            if task_state == 2:  # paused
                task_mode = "[t]"
        f = int(self.val["object"]["flags"])
        flags = "B" if f & 16 else "b"  # GST_PAD_FLAG_BLOCKED
        flags += "F" if f & 32 else "f"  # GST_PAD_FLAG_FLUSHING
        flags += "B" if f & 16 else "b"  # GST_PAD_FLAG_BLOCKING

        s = "%s  %s_%s [color=black, fillcolor=\"%s\", " \
            "label=\"%s%s\\n[%c][%s]%s\", height=\"0.2\", style=\"%s\"];\n" % \
            (spc, pname, self.dot_name(), color, self.name(), "",
             activation_mode[int(self.val["mode"])], flags, task_mode, style)
        return s

    def dot(self, indent):
        spc = "  " * indent
        direction = self.direction()
        element = self.parent_element()
        ename = element.dot_name() if element else ""
        s = ""
        if g_inherits_type(self.val, "GstGhostPad"):
            if direction == "GST_PAD_SRC":
                color = "#ffdddd"
            elif direction == "GST_PAD_SINK":
                color = "#ddddff"
            else:
                color = "#ffffff"

            t = gdb.lookup_type("GstProxyPad").pointer()
            other = GdbGstPad(self.val.cast(t)["priv"]["internal"])
            if other:
                s += other._dot(color, "", indent)
                pname = self.dot_name()
                other_element = other.parent_element()
                other_ename = other_element.dot_name() if other_element else ""
                other_pname = other.dot_name()
                if direction == "GST_PAD_SRC":
                    s += "%s%s_%s -> %s_%s [style=dashed, minlen=0]\n" % \
                       (spc, other_ename, other_pname, ename, pname)
                else:
                    s += "%s%s_%s -> %s_%s [style=dashed, minlen=0]\n" % \
                       (spc, ename, pname, other_ename, other_pname)
        else:
            if direction == "GST_PAD_SRC":
                color = "#ffaaaa"
            elif direction == "GST_PAD_SINK":
                color = "#aaaaff"
            else:
                color = "#cccccc"

        s += self._dot(color, ename, indent)
        return s

    def link_dot(self, indent, element):
        spc = "  " * indent

        peer = self.peer()
        peer_element = peer.parent_element()

        caps = self.caps()
        if not caps:
            caps = self.template_caps()
        peer_caps = peer.caps()
        if not peer_caps:
            peer_caps = peer.template_caps()

        pname = self.dot_name()
        ename = element.dot_name() if element else ""
        peer_pname = peer.dot_name()
        peer_ename = peer_element.dot_name() if peer_element else ""

        if caps and peer_caps and caps == peer_caps:
            s = "%s%s_%s -> %s_%s [label=\"%s\"]\n" % \
               (spc, ename, pname, peer_ename, peer_pname, caps.dot())
        elif caps and peer_caps and caps != peer_caps:
            s = "%s%s_%s -> %s_%s [labeldistance=\"10\", labelangle=\"0\", " \
                % (spc, ename, pname, peer_ename, peer_pname)
            s += "label=\"" + " "*50 + "\", "
            if self.direction() == "GST_PAD_SRC":
                media_src = caps.dot()
                media_dst = peer_caps.dot()
            else:
                media_src = peer_caps.dot()
                media_dst = caps.dot()
            s += "taillabel=\"%s\", headlabel=\"%s\"]\n" % \
                 (media_src, media_dst)
        else:
            s = "%s%s_%s -> %s_%s\n" % \
                (spc, ename, pname, peer_ename, peer_pname)
        return s

class GdbGstElement(GdbGstObject):
    def __init__(self, val):
        gdb_type = gdb.lookup_type("GstElement").pointer()
        super(GdbGstElement, self).__init__(gdb_type, val)
        self.is_bin = gst_is_bin(self.val)

    def __eq__(self, other):
        return self.val == other.val

    def children(self):
        if not self.is_bin:
            return
        b = self.val.cast(gdb.lookup_type("GstBin").pointer())
        link = b["children"]
        while link != 0:
            yield GdbGstElement(link["data"])
            link = link["next"]

    def has_pads(self, pad_group="pads"):
        return self.val[pad_group] != 0

    def pads(self, pad_group="pads"):
        link = self.val[pad_group]
        while link != 0:
            yield GdbGstPad(link["data"])
            link = link["next"]

    def _state_dot(self):
        icons = "~0-=>"
        current = int(self.val["current_state"])
        pending = int(self.val["pending_state"])
        if pending == 0:
            # GST_ELEMENT_FLAG_LOCKED_STATE == 16
            locked = (int(self.val["object"]["flags"]) & 16) != 0
            return "\\n[%c]%s" % (icons[current], "(locked)" if locked else "")
        return "\\n[%c] -> [%c]" % (icons[current], icons[pending])

    @save_memory_access_print("Element(<inaccessible memory>)")
    def print(self, indent):
        _gdb_write(indent, "%s(%s) {" %
                   (g_type_name_from_instance(self.val), self.name()))
        for p in self.pads():
            p.print(indent+2)
        _gdb_write(indent, "}")

    def _dot(self, indent=0):
        spc = "  " * indent

        s = "%ssubgraph cluster_%s {\n" % (spc, self.dot_name())
        s += "%s  fontname=\"Bitstream Vera Sans\";\n" % spc
        s += "%s  fontsize=\"8\";\n" % spc
        s += "%s  style=\"filled,rounded\";\n" % spc
        s += "%s  color=black;\n" % spc
        s += "%s  label=\"%s\\n%s%s%s\";\n" % \
             (spc, g_type_name_from_instance(self.val), self.name(),
              self._state_dot(), "")

        sink_name = None
        if self.has_pads("sinkpads"):
            (ss, sink_name) = self._dot_pads(indent+1, "sinkpads",
                                             self.dot_name() + "_sink")
            s += ss
        src_name = None
        if self.has_pads("srcpads"):
            (ss, src_name) = self._dot_pads(indent+1, "srcpads",
                                            self.dot_name() + "_src")
            s += ss
        if sink_name and src_name:
            name = self.dot_name()
            s += "%s  %s_%s -> %s_%s [style=\"invis\"];\n" % \
                 (spc, name, sink_name, name, src_name)

        if gst_is_bin(self.val):
            s += "%s  fillcolor=\"#ffffff\";\n" % spc
            s += self.dot(indent+1)
        else:
            if src_name and not sink_name:
                s += "%s  fillcolor=\"#ffaaaa\";\n" % spc
            elif not src_name and sink_name:
                s += "%s  fillcolor=\"#aaaaff\";\n" % spc
            elif src_name and sink_name:
                s += "%s  fillcolor=\"#aaffaa\";\n" % spc
            else:
                s += "%s  fillcolor=\"#ffffff\";\n" % spc
        s += "%s}\n\n" % spc

        for p in self.pads():
            if not p.is_linked():
                continue
            if p.direction() == "GST_PAD_SRC":
                s += p.link_dot(indent, self)
            else:
                pp = p.peer()
                if not g_inherits_type(pp.val, "GstGhostPad") and \
                   g_inherits_type(pp.val, "GstProxyPad"):
                    s += pp.link_dot(indent, None)
        return s

    def _dot_pads(self, indent, pad_group, cluster_name):
        spc = "  " * indent
        s = "%ssubgraph cluster_%s {\n" % (spc, cluster_name)
        s += "%s  label=\"\";\n" % spc
        s += "%s  style=\"invis\";\n" % spc
        name = None
        for p in self.pads(pad_group):
            s += p.dot(indent)
            if not name:
                name = p.dot_name()
        s += "%s}\n\n" % spc
        return(s, name)

    def dot(self, indent):
        s = ""
        for child in self.children():
            try:
                s += child._dot(indent)
            except gdb.MemoryError:
                gdb.write("warning: inaccessible memory in element 0x%x\n" %
                          long(child.val))
        return s

    def pipeline_dot(self):
        t = g_type_name_from_instance(self.val)

        s = "digraph pipeline {\n"
        s += "  rankdir=LR;\n"
        s += "  fontname=\"sans\";\n"
        s += "  fontsize=\"10\";\n"
        s += "  labelloc=t;\n"
        s += "  nodesep=.1;\n"
        s += "  ranksep=.2;\n"
        s += "  label=\"<%s>\\n%s%s%s\";\n" % (t, self.name(), "", "")
        s += "  node [style=\"filled,rounded\", shape=box, fontsize=\"9\", " \
             "fontname=\"sans\", margin=\"0.0,0.0\"];\n"
        s += "  edge [labelfontsize=\"6\", fontsize=\"9\", " \
             "fontname=\"monospace\"];\n"
        s += "  \n"
        s += "  legend [\n"
        s += "    pos=\"0,0!\",\n"
        s += "    margin=\"0.05,0.05\",\n"
        s += "    style=\"filled\",\n"
        s += "    label=\"Legend\\lElement-States: [~] void-pending, " \
             "[0] null, [-] ready, [=] paused, [>] playing\\l" \
             "Pad-Activation: [-] none, [>] push, [<] pull\\l" \
             "Pad-Flags: [b]locked, [f]lushing, [b]locking, [E]OS; " \
             "upper-case is set\\lPad-Task: [T] has started task, " \
             "[t] has paused task\\l\",\n"
        s += "  ];"
        s += "\n"

        s += self.dot(1)

        s += "}\n"

        return s

class GstDot(gdb.Command):
    """\
Create a pipeline dot file as close as possible to the output of
GST_DEBUG_BIN_TO_DOT_FILE. This command will find the top-level parent
for the given gstreamer object and create the dot for that element.

Usage: gst-dot <gst-object> <file-name>"""
    def __init__(self):
        super(GstDot, self).__init__("gst-dot", gdb.COMMAND_DATA)

    def invoke(self, arg, from_tty):
        self.dont_repeat()
        args = gdb.string_to_argv(arg)
        if len(args) != 2:
            raise Exception("Usage: gst-dot <gst-object> <file>")

        value = gdb.parse_and_eval(args[0])
        if not value:
            raise Exception("'%s' is not a valid object" % args[0])

        if value.type.code != gdb.TYPE_CODE_PTR:
            value = value.address

        if not is_gst_type(value, "GstObject"):
            raise Exception("'%s' is not a GstObject" % args[0])

        value = value.cast(gdb.lookup_type("GstObject").pointer())
        try:
            while value["parent"] != 0:
                tmp = value["parent"]
                # sanity checks to handle memory corruption
                if g_inherits_type(value, "GstElement") and \
                   GdbGstElement(value) not in GdbGstElement(tmp).children():
                    break
                if g_inherits_type(value, "GstPad") and \
                   GdbGstPad(value) not in GdbGstElement(tmp).pads():
                    break
                value = tmp
        except gdb.MemoryError:
            pass

        if not g_inherits_type(value, "GstElement"):
            raise Exception("Toplevel parent is not a GstElement")
        value = value.cast(gdb.lookup_type("GstElement").pointer())

        dot = GdbGstElement(value).pipeline_dot()
        file = open(args[1], "w")
        file.write(dot)
        file.close()

    def complete(self, text, word):
        cmd = gdb.string_to_argv(text)
        if len(cmd) == 0 or(len(cmd) == 1 and len(word) > 0):
            return gdb.COMPLETE_SYMBOL
        return gdb.COMPLETE_FILENAME

class GstPrint(gdb.Command):
    """\
Print high-level information for GStreamer objects

Usage gst-print <gstreamer-object>"""
    def __init__(self):
        super(GstPrint, self).__init__("gst-print", gdb.COMMAND_DATA,
                                       gdb.COMPLETE_SYMBOL)

    def invoke(self, arg, from_tty):
        value = gdb.parse_and_eval(arg)
        if not value:
            raise Exception("'%s' is not a valid object" % args[0])

        if value.type.code != gdb.TYPE_CODE_PTR:
            value = value.address

        if g_inherits_type(value, "GstElement"):
            obj = GdbGstElement(value)
        elif g_inherits_type(value, "GstPad"):
            obj = GdbGstPad(value)
        elif g_inherits_type(value, "GstCaps"):
            obj = GdbGstCaps(value)
        elif g_inherits_type(value, "GstEvent"):
            obj = GdbGstCaps(value)
        else:
            raise Exception("'%s' has an unkown type" % arg)

        obj.print(0)

GstDot()
GstPrint()

def register(obj):
    if obj is None:
        obj = gdb

    # Make sure this is always used befor the glib lookup function.
    # Otherwise the gobject pretty printer is used for GstObjects
    obj.pretty_printers.insert(0, gst_pretty_printer_lookup)


text:
using Microsoft.AspNetCore.Mvc;

namespace ChatApp.Web.Controllers {
    public class HomeController : Controller {

        /// <summary>
        /// Index view
        /// </summary>
        /// <returns> API documentation </returns>
        public IActionResult Index() {
            return RedirectPermanent("/api/ui");
        }

        /// <summary>
        /// Error view
        /// </summary>
        /// <returns> error information </returns>
        public IActionResult Error() {
            return View();
        }
    }
}


text:
using Newtonsoft.Json;
using System.Collections.Generic;

namespace RiotWrapper.Runes_V3
{
    public class RunePages
    {
        [JsonProperty("pages")]
        public List<RunePage> Pages { get; set; }

        [JsonProperty("summonerId")]
        public long SummonerId { get; set; }
    }
}


text:
// -----------------------------------------------------------------------------
//
// Copyright Microsoft Corporation
// 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.
// -----------------------------------------------------------------------------
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.42000
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace Microsoft.Azure.Commands.Batch.Models
{
    using System;
    using System.Collections;
    using System.Collections.Generic;
    using Microsoft.Azure.Batch;

    public class PSNodeFile
    {

        internal Microsoft.Azure.Batch.NodeFile omObject;

        private PSFileProperties properties;

        internal PSNodeFile(Microsoft.Azure.Batch.NodeFile omObject)
        {
            if ((omObject == null))
            {
                throw new System.ArgumentNullException("omObject");
            }
            this.omObject = omObject;
        }

        public System.Boolean? IsDirectory
        {
            get
            {
                return this.omObject.IsDirectory;
            }
        }

        public string Name
        {
            get
            {
                return this.omObject.Name;
            }
        }

        public PSFileProperties Properties
        {
            get
            {
                if (((this.properties == null)
                            && (this.omObject.Properties != null)))
                {
                    this.properties = new PSFileProperties(this.omObject.Properties);
                }
                return this.properties;
            }
        }

        public string Url
        {
            get
            {
                return this.omObject.Url;
            }
        }
    }
}


text:
const getJson = function(url) {
    const promise = new Promise(function(resolve, reject) {
        const handler = function() {
            if (this.readyState !== 4) {
                return;
            }
            if (this.status === 200) {
                resolve(this.response);
            } else {
                reject(new Error(this.statusText));
            }
        };

        const client = new XMLHttpRequest();
        client.open("GET", url);
        client.onreadystatechange = handler;
        client.responseType = "json";
        client.setRequestHeader("Accept", "application/json");
        client.send();
    });
    return promise;
};

getJson("/data/list.json").then(function(json) {
    console.log('Contents: ' + JSON.stringify(json));
}, function(error) {
    console.log('出错了', error);
});


text:
	<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
	<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css">

	<title>Probe - {{ title }} [{{ hostname }}]</title>

			<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
				Toggle navigation

			</button>
			 Probe [<tt>{{ hostname }}</tt>]

Status

Help

{{ title }}

	<button class="btn btn-success" onclick="javascript:refresh()">

		Refresh All
	</button>
	<input id="autoRefreshCheckbox" type="checkbox" onclick="javascript:autoRefresh()"> Automatic

Globals

Local Time

Uptime (s)

Entropy Available (bits)

CPU

Use (%)

Stats

Context Switches

Interrupts

Soft Interrupts

Syscalls

Times (s)

User

System

Nice

Idle

Memory

Total (GB)

Used (GB)

Free (GB)

Available (GB)

Disk IO

	Read	Write

#

Bytes

Time

Network IO

	In	Out

Bytes

Packets

Drops

Errors


text:
<!DOCTYPE html>

		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<link rel="stylesheet" href="css/jquery-snapmotion.css" type="text/css" />

Heading 1

Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.

Heading 2

Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.

Heading 3

Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.

Heading 4

Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.

Heading 5

Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.

Heading 6

Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.


text:
import javafx.scene.layout.Pane;
import javafx.scene.shape.Polyline;
import javafx.scene.shape.Line;
import javafx.geometry.Point2D;
import java.util.ArrayList;

public class LatticePane extends Pane {
  private int squares;
  private double scaleFactor;

  LatticePane(int squares, double scaleFactor) {
    this.squares = squares;
    this.scaleFactor = scaleFactor;

    drawGrid();
  }

  public void drawWalk(SelfAvoidingWalk walk) {
    Polyline poly = new Polyline();
    poly.setStrokeWidth(4);
    for (Point2D p: walk.getPath()) {
      double x = p.getX() * scaleFactor;
      double y = p.getY() * scaleFactor;
      poly.getPoints().addAll(x, y);
    }
    getChildren().add(poly);
  }

  // Convenience method for handling a step-by-step animation of a path
  public void nextStep(int step, ArrayList<Point2D> points) {
    resetGrid();
    Polyline poly = new Polyline();
    poly.setStrokeWidth(4);
    for (int i = 0; i <= step; i++) {
      Point2D p = points.get(i);
      double x = p.getX() * scaleFactor;
      double y = p.getY() * scaleFactor;
      poly.getPoints().addAll(x, y);
    }
    getChildren().add(poly);
  }

  public void drawGrid() {
    double width = getSize();
    double height = width;

    // Draw vertical and horizontal grid lines
    for (int i = 0; i <= squares; i++) {
      Line vert = new Line();
      vert.setStartX(i * scaleFactor);
      vert.setStartY(0);
      vert.setEndX(i * scaleFactor);
      vert.setEndY(height);

      Line hori = new Line();
      hori.setStartX(0);
      hori.setStartY(i * scaleFactor);
      hori.setEndX(width);
      hori.setEndY(i * scaleFactor);

      getChildren().addAll(vert, hori);
    }
  }

  public void resetGrid() {
    getChildren().clear();
    drawGrid();
  }

  public double getSize() {
    return squares * scaleFactor;
  }
}


text:
set -e

mkdir -p target

rustc src/peg.rs -g -o target/peg
RUST_BACKTRACE=1 target/peg src/grammar.rustpeg > src/grammar_new.rs

mv src/grammar.rs src/grammar_old.rs
mv src/grammar_new.rs src/grammar.rs

if rustc src/peg.rs -o target/peg
then
    target/peg src/grammar.rustpeg > src/grammar_new.rs
    diff -qs src/grammar.rs src/grammar_new.rs
else
    mv src/grammar_old.rs src/grammar.rs
fi


text:
Title:  {{task.title}}

Desc:   {{task.description}}

Assignee:  {{task.assignedTo}}

	<input [hidden]="!editing" [(ng-model)]="task.title">
	<input [hidden]="!editing" [(ng-model)]="task.description">
	<input [hidden]="!editing" [(ng-model)]="task.assignedTo">

	<button title="Edit" class="default" [hidden]="editing" (click)="editing=true">Edit</button>
	<button title="Delete" class="default" [hidden]="editing" (click)="onDeleted()">Delete</button>

	<button class="default" [hidden]="!editing" (click)="onEdited()">Save</button>
	<button class="default" [hidden]="!editing" (click)="onCanceled()">Cancel</button>


text:
package com.mongodb;

interface ClusterableServerFactory {
    ClusterableServer create(ServerAddress serverAddress);

    void close();
}


text:
require 'cgi'
require 'open-uri'
require 'json'
require 'hashie/mash'
require 'parallel'

# Scouter Class/Module
require 'scouter/base/version'
require 'scouter/base/object'
require 'scouter/base/single_url_api'
require 'scouter/base/multi_url_api'
require 'scouter/buffer'
require 'scouter/facebook'
require 'scouter/feedly'
require 'scouter/github'
require 'scouter/google_plus'
require 'scouter/hatena_bookmark'
require 'scouter/linkedin'
require 'scouter/pinterest'
require 'scouter/pocket'
require 'scouter/twitter'

module Scouter
  WAIT_SEC = 1
  ONE_TIME_URL_MAX = 20

  SERVICES = [ Scouter::Buffer,
               Scouter::Facebook,
               Scouter::Feedly,
               Scouter::Github,
               Scouter::GooglePlus,
               Scouter::HatenaBookmark,
               Scouter::Linkedin,
               Scouter::Pinterest,
               Scouter::Pocket,
               Scouter::Twitter ]

  # Get Social Count By Buffer/Facebook/Feedly/GooglePlus/HatenaBookmark/Linkedin/Pinterest/Pocket/Twitter
  # @param [String or Array] urls url list ot get count
  # @param [Array or nil] service service list to get count
  # @return [Hashie::Mash, Hashie::Mash] URL & count hash, Error
  def self.get_count(urls, services = SERVICES)
    results, errors = [], Hashie::Mash.new()

    Parallel.each(services, in_threads: services.count) do |service|
      result, error = service.get_count(urls)
      errors[service.service_name] = error && next unless error.empty?
      results << result
    end

    results_hash = results_merged_hash(results)
    return [results_hash, errors]
  end

  private

  # Merge result data of service to hash
  # @param [Hashie::Mash] social count & url of some services
  # @return [Hashie::Mash] URL & count hash, Error
  def self.results_merged_hash(results)
    results_hash = {}
    results.each do |item|
      item.each do |url, hash|
        results_hash[url] = (results_hash[url] || {}).merge(hash)
      end
    end
    Hashie::Mash.new(results_hash)
  end

end


text:
@implementation client_user_login

@synthesize user_login_id;
@synthesize user_name;
@synthesize user_real_name;
@synthesize user_level;
@synthesize user_area;
@synthesize user_password;
@synthesize ipad_mac_address;
@synthesize user_ipad_key;
@synthesize login_time;
@synthesize login_result;

@end


text:
<SPDX-License-Identifier: Apache-2.0>

<?php
    function incHeader($title) {
        echo '<!DOCTYPE html>';
        echo '';
        echo     '';
        echo         '<meta charset="utf-8">';
        echo         '<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">';
        echo         '<meta name="viewport" content="width=device-width, initial-scale=1.0">';
        echo         '<title>' . $title . '</title>';
        echo         '<link href="css/dashboard.css" rel="stylesheet">';
        echo         '<link href="css/bootstrap.css" rel="stylesheet">';
        echo         '<link href="css/bootstrap-theme.css" rel="stylesheet">';
        echo         '';
        echo    '';
        echo     '';
        //NavBar
        echo         '
';
        echo             '
';
        echo                '
';
        echo                    '';
        echo                         '';
        echo                         '';
        echo                        '';
        echo                     '';
        echo                     'Home';
        echo                     'Fossology+SPDX';
        echo                     'About';
        echo                     '
';
        echo                         '
';
        echo                         '
';
        echo                     '
';
        echo                 '
';
        echo             '
';
        echo         '
';
    }

    function incFooter() {
        echo         '
';
        echo             '';
        echo                 '
© University of Nebraska at Omaha 2014
';
        echo             '';
        echo         '
';
        echo     '';
        echo '';
    }

?>


text:
using System;

using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
using Shouldly;
using Xunit;

#nullable disable

namespace Microsoft.Build.UnitTests
{
    internal class EmptyLogger : Logger
    {
        /// <summary>
        /// Create a logger instance with a specific verbosity.
        /// </summary>
        /// <param name="verbosity">Verbosity level.</param>
        public EmptyLogger(LoggerVerbosity verbosity)
        {
            Verbosity = verbosity;
        }

        /// <summary>
        /// Subscribe to events.
        /// </summary>
        /// <param name="eventSource"></param>
        public override void Initialize(IEventSource eventSource)
        {
        }
    }

    public class Logger_Tests
    {
        [Fact]
        public void ExerciseMiscProperties()
        {
            EmptyLogger logger = new EmptyLogger(LoggerVerbosity.Diagnostic);
            logger.Parameters = "Parameters";
            Assert.Equal(0, string.Compare(logger.Parameters, "Parameters", StringComparison.OrdinalIgnoreCase));
            Assert.Equal(LoggerVerbosity.Diagnostic, logger.Verbosity);
            logger.Shutdown();
        }
        /// <summary>
        /// Exercises every combination of the Logger.IsVerbosityAtLeast method.
        /// </summary>
        [Fact]
        public void IsVerbosityAtLeast()
        {
            new EmptyLogger(LoggerVerbosity.Quiet).IsVerbosityAtLeast(LoggerVerbosity.Quiet).ShouldBeTrue();
            new EmptyLogger(LoggerVerbosity.Quiet).IsVerbosityAtLeast(LoggerVerbosity.Minimal).ShouldBeFalse();
            new EmptyLogger(LoggerVerbosity.Quiet).IsVerbosityAtLeast(LoggerVerbosity.Normal).ShouldBeFalse();
            new EmptyLogger(LoggerVerbosity.Quiet).IsVerbosityAtLeast(LoggerVerbosity.Detailed).ShouldBeFalse();
            new EmptyLogger(LoggerVerbosity.Quiet).IsVerbosityAtLeast(LoggerVerbosity.Diagnostic).ShouldBeFalse();

            new EmptyLogger(LoggerVerbosity.Minimal).IsVerbosityAtLeast(LoggerVerbosity.Quiet).ShouldBeTrue();
            new EmptyLogger(LoggerVerbosity.Minimal).IsVerbosityAtLeast(LoggerVerbosity.Minimal).ShouldBeTrue();
            new EmptyLogger(LoggerVerbosity.Minimal).IsVerbosityAtLeast(LoggerVerbosity.Normal).ShouldBeFalse();
            new EmptyLogger(LoggerVerbosity.Minimal).IsVerbosityAtLeast(LoggerVerbosity.Detailed).ShouldBeFalse();
            new EmptyLogger(LoggerVerbosity.Minimal).IsVerbosityAtLeast(LoggerVerbosity.Diagnostic).ShouldBeFalse();

            new EmptyLogger(LoggerVerbosity.Normal).IsVerbosityAtLeast(LoggerVerbosity.Quiet).ShouldBeTrue();
            new EmptyLogger(LoggerVerbosity.Normal).IsVerbosityAtLeast(LoggerVerbosity.Minimal).ShouldBeTrue();
            new EmptyLogger(LoggerVerbosity.Normal).IsVerbosityAtLeast(LoggerVerbosity.Normal).ShouldBeTrue();
            new EmptyLogger(LoggerVerbosity.Normal).IsVerbosityAtLeast(LoggerVerbosity.Detailed).ShouldBeFalse();
            new EmptyLogger(LoggerVerbosity.Normal).IsVerbosityAtLeast(LoggerVerbosity.Diagnostic).ShouldBeFalse();

            new EmptyLogger(LoggerVerbosity.Detailed).IsVerbosityAtLeast(LoggerVerbosity.Quiet).ShouldBeTrue();
            new EmptyLogger(LoggerVerbosity.Detailed).IsVerbosityAtLeast(LoggerVerbosity.Minimal).ShouldBeTrue();
            new EmptyLogger(LoggerVerbosity.Detailed).IsVerbosityAtLeast(LoggerVerbosity.Normal).ShouldBeTrue();
            new EmptyLogger(LoggerVerbosity.Detailed).IsVerbosityAtLeast(LoggerVerbosity.Detailed).ShouldBeTrue();
            new EmptyLogger(LoggerVerbosity.Detailed).IsVerbosityAtLeast(LoggerVerbosity.Diagnostic).ShouldBeFalse();

            new EmptyLogger(LoggerVerbosity.Diagnostic).IsVerbosityAtLeast(LoggerVerbosity.Quiet).ShouldBeTrue();
            new EmptyLogger(LoggerVerbosity.Diagnostic).IsVerbosityAtLeast(LoggerVerbosity.Minimal).ShouldBeTrue();
            new EmptyLogger(LoggerVerbosity.Diagnostic).IsVerbosityAtLeast(LoggerVerbosity.Normal).ShouldBeTrue();
            new EmptyLogger(LoggerVerbosity.Diagnostic).IsVerbosityAtLeast(LoggerVerbosity.Detailed).ShouldBeTrue();
            new EmptyLogger(LoggerVerbosity.Diagnostic).IsVerbosityAtLeast(LoggerVerbosity.Diagnostic).ShouldBeTrue();
        }
    }
}


text:
package com.rj.tb3;

import android.app.AlertDialog.Builder;
import android.app.Dialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v4.app.DialogFragment;

public class MyDialog extends DialogFragment
{

	@Override
	@NonNull
	public Dialog onCreateDialog(Bundle savedInstanceState)
	{
		Builder builder = new Builder(getActivity()); //Creating AlertDialog
		Builder builder1 = builder.setMessage("Opening Dialog")
			.setPositiveButton("OK", new DialogInterface.OnClickListener()
			{

				@Override
				public void onClick(DialogInterface arg0, int arg1) {
					// TODO Auto-generated method stub

				}
			})
			.setNegativeButton("Cancel", new DialogInterface.OnClickListener()
			{

				@Override
				public void onClick(DialogInterface arg0, int arg1) {
					// TODO Auto-generated method stub

				}
			});
		return builder1.create();
	}

}


text:
using System.Collections.Generic;
using EventEmitter.UserServices.Models;
using Microsoft.Owin.Security;

namespace EventEmitter.Api.Authentification
{
    public class PropertyBuilder : IPropertyBuilder
    {
        public AuthenticationProperties Build(User user)
        {
            IDictionary<string, string> data = new Dictionary<string, string>
            {
                { "userName", user.Name }
            };
            return new AuthenticationProperties(data);
        }
    }
}


text:
'use strict';

const mongoose = require('mongoose');
const errorCreator = require('../../error/errorCreator');
const dbConnector = require('../databaseConnector');

const docFileSchema = new mongoose.Schema(dbConnector.createSchema({
  code: { type: String, unique: true },
  title: { type: String, unique: true },
  text: [String],
  videoCodes: [String],
  images: [dbConnector.imageSchema],
}), { collection: 'docFiles' });

const DocFile = mongoose.model('DocFile', docFileSchema);

/**
 * Update doc file.
 * @private
 * @param {Object} params Parameters.
 * @param {string} params.docFileId ID of the doc file to update.
 * @param {Object} params.update Update.
 * @param {Function} params.callback Callback.
 */
function updateObject({ docFileId, update, callback }) {
  dbConnector.updateObject({
    update,
    query: { _id: docFileId },
    object: DocFile,
    errorNameContent: 'updateDocFile',
    callback: ({ error, data }) => {
      if (error) {
        callback({ error });

        return;
      }

      callback({ data: { docFile: data.object } });
    },
  });
}

/**
 * Get doc files.
 * @private
 * @param {Object} params Parameters.
 * @param {Function} params.callback Callback.
 * @param {Object} [params.query] Query to get doc files.
 * @param {Object} [params.filter] Result filter.
 */
function getDocFiles({
  query,
  callback,
  filter,
}) {
  dbConnector.getObjects({
    query,
    filter,
    object: DocFile,
    callback: ({ error, data }) => {
      if (error) {
        callback({ error });

        return;
      }

      callback({ data: { docFiles: data.objects } });
    },
  });
}

/**
 * Get a doc file.
 * @private
 * @param {Object} params Parameters.
 * @param {string} params.query Query to get doc file.
 * @param {Function} params.callback Callback.
 * @param {Object} [params.filter] Result filter.
 */
function getDocFile({
  query,
  callback,
  filter = {},
}) {
  dbConnector.getObject({
    query,
    filter,
    object: DocFile,
    callback: ({ error, data }) => {
      if (error) {
        callback({ error });

        return;
      }

      if (!data.object) {
        callback({ error: new errorCreator.DoesNotExist({ name: `docFile ${JSON.stringify(query, null, 4)}` }) });

        return;
      }

      callback({ data: { docFile: data.object } });
    },
  });
}

/**
 * Does the doc file exist?
 * @param {Object} params Parameters.
 * @param {string} params.title Title of the doc file.
 * @param {string} params.code Code of the doc file.
 * @param {Function} params.callback Callback.
 */
function doesDocFileExist({ title, code, callback }) {
  const query = { $or: [] };

  if (title) { query.$or.push({ title }); }
  if (code) { query.$or.push({ code }); }

  dbConnector.doesObjectExist({
    query,
    callback,
    object: DocFile,
  });
}

/**
 * Create and save docFile.
 * @param {Object} params Parameters.
 * @param {Object} params.docFile New docFile.
 * @param {Function} params.callback Callback.
 */
function createDocFile({ docFile, callback }) {
  doesDocFileExist({
    code: docFile.code,
    title: docFile.title,
    callback: ({ error, data }) => {
      if (error) {
        callback({ error });

        return;
      }

      if (data.exists) {
        callback({ error: new errorCreator.AlreadyExists({ name: `Docfile ${docFile.code} ${docFile.title}` }) });

        return;
      }

      dbConnector.saveObject({
        object: new DocFile(docFile),
        objectType: 'docFile',
        callback: (savedData) => {
          if (savedData.error) {
            callback({ error: savedData.error });

            return;
          }

          callback({ data: { docFile: savedData.data.savedObject } });
        },
      });
    },
  });
}

/**
 * Update docFile.
 * @param {Object} params Parameters.
 * @param {string} params.docFile Doc file info to update.
 * @param {string} params.docFileId ID of the doc file to update.
 * @param {string[]} [params.docFile.text] Array with text.
 * @param {string} [params.docFile.title] Title.
 * @param {number} [params.docFile.visibility] Minimum access level required to see document.
 * @param {boolean} [params.docFile.isPublic] Is the document visible to the public?
 * @param {Object} [params.options] Options.
 * @param {boolean} [params.options.resetOwnerAliasId] Should owner alias be reset?
 * @param {Function} params.callback Callback.
 */
function updateDocFile({
  docFileId,
  docFile,
  callback,
  options = {},
}) {
  const { resetOwnerAliasId } = options;
  const {
    text,
    title,
    visibility,
    isPublic,
    ownerAliasId,
  } = docFile;

  const update = {};
  const set = {};
  const unset = {};

  if (text) { set.text = text; }
  if (title) { set.title = title; }
  if (visibility) { set.visibility = visibility; }
  if (typeof isPublic === 'boolean') { set.isPublic = isPublic; }

  if (resetOwnerAliasId) {
    unset.ownerAliasId = '';
  } else if (ownerAliasId) {
    set.ownerAliasId = ownerAliasId;
  }

  if (Object.keys(set).length > 0) { update.$set = set; }
  if (Object.keys(unset).length > 0) { update.$unset = unset; }

  updateObject({
    docFileId,
    update,
    callback,
  });
}

/**
 * Update access to the file.
 * @param {Object} params Parameters.
 * @param {Function} params.callback Callback.
 * @param {boolean} [params.shouldRemove] Should access be removed?
 * @param {string[]} [params.userIds] Id of the users to update.
 * @param {string[]} [params.teamIds] Id of the teams to update.
 * @param {string[]} [params.bannedIds] Id of the blocked Ids to update.
 * @param {string[]} [params.teamAdminIds] Id of the teams to update admin access for.
 * @param {string[]} [params.userAdminIds] Id of the users to update admin access for.
 */
function updateAccess(params) {
  const accessParams = params;
  const { callback } = params;
  accessParams.objectId = params.docFileId;
  accessParams.object = DocFile;
  accessParams.callback = ({ error, data }) => {
    if (error) {
      callback({ error });

      return;
    }

    callback({ data: { docFile: data.object } });
  };

  if (params.shouldRemove) {
    dbConnector.removeObjectAccess(params);
  } else {
    dbConnector.addObjectAccess(params);
  }
}

/**
 * Remove doc file.
 * @param {Object} params Parameters.
 * @param {string} params.docFileId ID of the doc file.
 * @param {Function} params.callback Callback.
 */
function removeDocFile({ docFileId, callback }) {
  const query = { _id: docFileId };

  dbConnector.removeObject({
    query,
    callback,
    object: DocFile,
  });
}

/**
 * Get all doc files.
 * @param {Object} params Parameters.
 * @param {Function} params.callback Callback.
 */
function getAllDocFiles({ callback }) {
  getDocFiles({
    callback,
    errorNameContent: 'getAllDocFiles',
  });
}

/**
 * Get doc file by id.
 * @param {Object} params Parameters.
 * @param {string} params.docFileId ID of the doc file.
 * @param {Function} params.callback Callback.
 */
function getDocFileById({
  docFileId,
  callback,
}) {
  getDocFile({
    callback,
    query: { _id: docFileId },
  });
}

/**
 * Get doc file by code.
 * @param {Object} params Parameters.
 * @param {string} params.code Docfile code.
 * @param {Function} params.callback Callback.
 */
function getDocFileByCode({
  code,
  callback,
}) {
  getDocFile({
    callback,
    query: { code },
  });
}

/**
 * Get files by user.
 * @param {Object} params Parameters.
 * @param {Object} params.user User retrieving the files.
 * @param {Function} params.callback Callback.
 */
function getDocFilesByUser({
  user,
  callback,
}) {
  const query = dbConnector.createUserQuery({ user });

  getDocFiles({
    query,
    callback,
  });
}

/**
 * Get list of doc files.
 * @param {Object} params Parameters.
 * @param {Function} params.callback Callback.
 */
function getDocFilesList({ callback }) {
  getDocFiles({
    callback,
    errorNameContent: 'getDocFilesList',
  });
}

exports.createDocFile = createDocFile;
exports.updateDocFile = updateDocFile;
exports.updateAccess = updateAccess;
exports.getDocFileById = getDocFileById;
exports.removeDocFile = removeDocFile;
exports.getAllDocFiles = getAllDocFiles;
exports.getDocFileByCode = getDocFileByCode;
exports.getDocFilesByUser = getDocFilesByUser;
exports.getDocFilesList = getDocFilesList;


text:
<?php

namespace Pagekit\User\Entity;

use Pagekit\Database\ORM\ModelTrait;
use Pagekit\User\Model\Role as BaseRole;

/**
 * @Entity(tableClass="@system_role", eventPrefix="system.role")
 */
class Role extends BaseRole implements \JsonSerializable
{
    use ModelTrait;

    /** @Column(type="integer") @Id */
    protected $id;

    /** @Column(type="string") */
    protected $name;

    /** @Column(type="integer") */
    protected $priority = 0;

    /** @Column(type="simple_array") */
    protected $permissions = [];

    /**
     * {@inheritdoc}
     */
    function jsonSerialize()
    {
        $role = get_object_vars($this);

        $role['isLocked'] = $this->isLocked();
        $role['isAnonymous'] = $this->isAnonymous();
        $role['isAuthenticated'] = $this->isAuthenticated();
        $role['isAdministrator'] = $this->isAdministrator();

        return $role;
    }

    /**
     * @PreSave
     */
    public function preSave()
    {
        if (!$this->id) {
            $this->setPriority(self::getConnection()->fetchColumn('SELECT MAX(priority) + 1 FROM @system_role'));
        }
    }
}


text:
# Makefile.in generated by automake 1.10.1 from Makefile.am.
# samples/c/Makefile.  Generated from Makefile.in by configure.

# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

pkgdatadir = $(datadir)/opencv
pkglibdir = $(libdir)/opencv
pkgincludedir = $(includedir)/opencv
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = x86_64-unknown-linux-gnu
host_triplet = x86_64-unknown-linux-gnu
target_triplet = x86_64-unknown-linux-gnu
subdir = samples/c
DIST_COMMON = $(dist_csamples_DATA) $(srcdir)/Makefile.am \
	$(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/autotools/aclocal/az_python.m4 \
	$(top_srcdir)/autotools/aclocal/pkg.m4 \
	$(top_srcdir)/autotools/aclocal/swig_complete.m4 \
	$(top_srcdir)/autotools/aclocal/version_at_least.m4 \
	$(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/autotools/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/cvconfig.h
CONFIG_CLEAN_FILES =
SOURCES =
DIST_SOURCES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
    *) f=$$p;; \
  esac;
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
am__installdirs = "$(DESTDIR)$(csamplesdir)"
dist_csamplesDATA_INSTALL = $(INSTALL_DATA)
DATA = $(dist_csamples_DATA)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = ${SHELL} /home/tjwallas/Downloads/opencv-1.1.0/autotools/missing --run aclocal-1.10
ALLOCA =
AMTAR = ${SHELL} /home/tjwallas/Downloads/opencv-1.1.0/autotools/missing --run tar
AR = ar
AS = as
AUTOCONF = ${SHELL} /home/tjwallas/Downloads/opencv-1.1.0/autotools/missing --run autoconf
AUTOHEADER = ${SHELL} /home/tjwallas/Downloads/opencv-1.1.0/autotools/missing --run autoheader
AUTOMAKE = ${SHELL} /home/tjwallas/Downloads/opencv-1.1.0/autotools/missing --run automake-1.10
AWK = gawk
CARBON_CFLAGS =
CARBON_LIBS =
CC = gcc
CCDEPMODE = depmode=gcc3
CFLAGS =
CPP = gcc -E
CPPFLAGS = -DNDEBUG
CXX = g++
CXXCPP = g++ -E
CXXDEPMODE = depmode=gcc3
CXXFLAGS =
CYGPATH_W = echo
DEBUG =
DEFS = -DHAVE_CONFIG_H
DEF_CXXFLAGS = -Wall -fno-rtti -pipe -O3 -g  -msse2
DEPDIR = .deps
DLLTOOL = dlltool
DSYMUTIL =
ECHO = echo
ECHO_C =
ECHO_N = -n
ECHO_T =
EGREP = /bin/grep -E
EXEEXT =
F77 =
FFLAGS =
FFMPEGLIBS =
GREP = /bin/grep
GSTREAMER_CFLAGS =
GSTREAMER_LIBS =
GTHREAD_CFLAGS = -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include
GTHREAD_LIBS = -pthread -lgthread-2.0 -lglib-2.0
GTK_CFLAGS = -pthread -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/libpng12 -I/usr/include/harfbuzz
GTK_LIBS = -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lcairo -lpango-1.0 -lfontconfig -lfreetype -lgdk_pixbuf-2.0 -lgobject-2.0 -lglib-2.0
IEEE1394LIBS =
IMAGELIBS = -lpng12  -ljpeg -lz -lm -ltiff -ljasper
INSTALL = /usr/bin/install -c
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_PROGRAM = ${INSTALL}
INSTALL_SCRIPT = ${INSTALL}
INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
LDFLAGS =
LIBOBJS =
LIBS = -lpthread -ldl -lm
LIBTOOL = $(SHELL) $(top_builddir)/libtool
LN_S = ln -s
LTLIBOBJS =
LT_VERSION = 2:0:0
MAKEINFO = ${SHELL} /home/tjwallas/Downloads/opencv-1.1.0/autotools/missing --run makeinfo
MKDIR_P = /bin/mkdir -p
MKOCTFILE =
MMAJOR = 1
MMINOR = 1
MSUBMINOR = 0
NMEDIT =
OBJDUMP = objdump
OBJEXT = o
OCTAVE =
OCTAVE_ARCH =
OCTAVE_INCFLAGS =
OCT_CXXFLAGS = -fno-strict-aliasing -Wall -Wno-uninitialized -pipe -O3 -g  -msse2
PACKAGE = opencv
PACKAGE_BUGREPORT = opencvlibrary-devel@lists.sourceforge.net
PACKAGE_NAME = opencv
PACKAGE_STRING = opencv 1.1.0
PACKAGE_TARNAME = opencv
PACKAGE_VERSION = 1.1.0
PATH_SEPARATOR = :
PKG_CONFIG = /usr/bin/pkg-config
PYTHON =
PYTHON_CSPEC =
PYTHON_EXEC_PREFIX =
PYTHON_LSPEC =
PYTHON_PLATFORM =
PYTHON_PREFIX =
PYTHON_VERSION =
PY_CXXFLAGS = -Wall -pipe -O3 -g  -msse2
QUICKTIME_CFLAGS =
QUICKTIME_LIBS =
RANLIB = ranlib
SED = /bin/sed
SET_MAKE =
SHELL = /bin/bash
STRIP = strip
SWIG =
SWIG_OCTAVE_OPT =
SWIG_PYTHON_LIBS =
SWIG_PYTHON_OPT =
SWIG_RUNTIME_LIBS_DIR =
SWIG_VERSION =
UCIL_PACKAGE_CFLAGS =
UCIL_PACKAGE_LIBS =
UNICAP_PACKAGE_CFLAGS =
UNICAP_PACKAGE_LIBS =
VERSION = 1.1.0
XINE_LIBS =
abs_builddir = /home/tjwallas/Downloads/opencv-1.1.0/samples/c
abs_srcdir = /home/tjwallas/Downloads/opencv-1.1.0/samples/c
abs_top_builddir = /home/tjwallas/Downloads/opencv-1.1.0
abs_top_srcdir = /home/tjwallas/Downloads/opencv-1.1.0
ac_ct_CC = gcc
ac_ct_CXX = g++
ac_ct_F77 =
am__include = include
am__leading_dot = .
am__quote =
am__tar = ${AMTAR} chof - "$$tardir"
am__untar = ${AMTAR} xf -
bindir = ${exec_prefix}/bin
build = x86_64-unknown-linux-gnu
build_alias =
build_cpu = x86_64
build_os = linux-gnu
build_vendor = unknown
builddir = .
datadir = ${datarootdir}
datarootdir = ${prefix}/share
docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
dvidir = ${docdir}
exec_prefix = ${prefix}
host = x86_64-unknown-linux-gnu
host_alias =
host_cpu = x86_64
host_os = linux-gnu
host_vendor = unknown
htmldir = ${docdir}
includedir = ${prefix}/include
infodir = ${datarootdir}/info
install_sh = $(SHELL) /home/tjwallas/Downloads/opencv-1.1.0/autotools/install-sh
libdir = ${exec_prefix}/lib
libexecdir = ${exec_prefix}/libexec
localedir = ${datarootdir}/locale
localstatedir = ${prefix}/var
mandir = ${datarootdir}/man
mkdir_p = /bin/mkdir -p
oldincludedir = /usr/include
pdfdir = ${docdir}
pkgpyexecdir =
pkgpythondir =
prefix = /usr/local
program_transform_name = s,x,x,
psdir = ${docdir}
pyexecdir =
pythondir =
sbindir = ${exec_prefix}/sbin
sharedstatedir = ${prefix}/com
srcdir = .
sysconfdir = ${prefix}/etc
target = x86_64-unknown-linux-gnu
target_alias =
target_cpu = x86_64
target_os = linux-gnu
target_vendor = unknown
top_builddir = ../..
top_srcdir = ../..
csamplesdir = $(pkgdatadir)/samples/c
dist_csamples_DATA = airplane.jpg baboon.jpg box.png box_in_scene.png lena.jpg fruits.jpg stuff.jpg \
pic1.png pic2.png pic3.png pic4.png pic5.png pic6.png tree.avi \
left01.jpg left02.jpg left03.jpg left04.jpg left05.jpg left06.jpg left07.jpg \
left08.jpg left09.jpg left11.jpg left12.jpg left13.jpg left14.jpg \
right01.jpg right02.jpg right03.jpg right04.jpg right05.jpg right06.jpg right07.jpg \
right08.jpg right09.jpg right11.jpg right12.jpg right13.jpg right14.jpg \
stereo_calib.txt build_all.sh cvsample.dsp makefile.ms makefile.gnu \
agaricus-lepiota.data letter-recognition.data bgfg_codebook.cpp bgfg_segm.cpp blobtrack.cpp camshiftdemo.c \
contours.c convexhull.c camshiftdemo.c contours.c convert_cascade.c convexhull.c \
delaunay.c demhist.c dft.c distrans.c drawing.c edge.c facedetect.c \
facedetect.cmd ffilldemo.c find_obj.cpp fitellipse.c houghlines.c kalman.c kmeans.c image.cpp \
inpaint.cpp laplace.c letter_recog.cpp lkdemo.c minarea.c morphology.c motempl.c \
mushroom.cpp pyramid_segmentation.c squares.c stereo_calib.cpp watershed.cpp

all: all-am

.SUFFIXES:
$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
	@for dep in $?; do \
	  case '$(am__configure_deps)' in \
	    *$$dep*) \
	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
		&& exit 0; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  samples/c/Makefile'; \
	cd $(top_srcdir) && \
	  $(AUTOMAKE) --gnu  samples/c/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
	esac;

$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh

$(top_srcdir)/configure:  $(am__configure_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh

mostlyclean-libtool:
	-rm -f *.lo

clean-libtool:
	-rm -rf .libs _libs
install-dist_csamplesDATA: $(dist_csamples_DATA)
	@$(NORMAL_INSTALL)
	test -z "$(csamplesdir)" || $(MKDIR_P) "$(DESTDIR)$(csamplesdir)"
	@list='$(dist_csamples_DATA)'; for p in $$list; do \
	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
	  f=$(am__strip_dir) \
	  echo " $(dist_csamplesDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(csamplesdir)/$$f'"; \
	  $(dist_csamplesDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(csamplesdir)/$$f"; \
	done

uninstall-dist_csamplesDATA:
	@$(NORMAL_UNINSTALL)
	@list='$(dist_csamples_DATA)'; for p in $$list; do \
	  f=$(am__strip_dir) \
	  echo " rm -f '$(DESTDIR)$(csamplesdir)/$$f'"; \
	  rm -f "$(DESTDIR)$(csamplesdir)/$$f"; \
	done
tags: TAGS
TAGS:

ctags: CTAGS
CTAGS:

distdir: $(DISTFILES)
	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	list='$(DISTFILES)'; \
	  dist_files=`for file in $$list; do echo $$file; done | \
	  sed -e "s|^$$srcdirstrip/||;t" \
	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
	case $$dist_files in \
	  */*) $(MKDIR_P) `echo "$$dist_files" | \
			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
			   sort -u` ;; \
	esac; \
	for file in $$dist_files; do \
	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
	  if test -d $$d/$$file; then \
	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
	    fi; \
	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
	  else \
	    test -f $(distdir)/$$file \
	    || cp -p $$d/$$file $(distdir)/$$file \
	    || exit 1; \
	  fi; \
	done
check-am: all-am
check: check-am
all-am: Makefile $(DATA)
installdirs:
	for dir in "$(DESTDIR)$(csamplesdir)"; do \
	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
	done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am

install-am: all-am
	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am

installcheck: installcheck-am
install-strip:
	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	  `test -z '$(STRIP)' || \
	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:

clean-generic:

distclean-generic:
	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)

maintainer-clean-generic:
	@echo "This command is intended for maintainers to use"
	@echo "it deletes files that may require special tools to rebuild."
clean: clean-am

clean-am: clean-generic clean-libtool mostlyclean-am

distclean: distclean-am
	-rm -f Makefile
distclean-am: clean-am distclean-generic

dvi: dvi-am

dvi-am:

html: html-am

info: info-am

info-am:

install-data-am: install-dist_csamplesDATA

install-dvi: install-dvi-am

install-exec-am:

install-html: install-html-am

install-info: install-info-am

install-man:

install-pdf: install-pdf-am

install-ps: install-ps-am

installcheck-am:

maintainer-clean: maintainer-clean-am
	-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic

mostlyclean: mostlyclean-am

mostlyclean-am: mostlyclean-generic mostlyclean-libtool

pdf: pdf-am

pdf-am:

ps: ps-am

ps-am:

uninstall-am: uninstall-dist_csamplesDATA

.MAKE: install-am install-strip

.PHONY: all all-am check check-am clean clean-generic clean-libtool \
	distclean distclean-generic distclean-libtool distdir dvi \
	dvi-am html html-am info info-am install install-am \
	install-data install-data-am install-dist_csamplesDATA \
	install-dvi install-dvi-am install-exec install-exec-am \
	install-html install-html-am install-info install-info-am \
	install-man install-pdf install-pdf-am install-ps \
	install-ps-am install-strip installcheck installcheck-am \
	installdirs maintainer-clean maintainer-clean-generic \
	mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
	ps ps-am uninstall uninstall-am uninstall-dist_csamplesDATA

# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:


text:
package com.game.gameServer.msg.netty;

import java.text.MessageFormat;

import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;
import io.netty.util.AttributeKey;

import com.game.gameServer.msg.AbstractCGMsgHandler;
import com.game.gameServer.msg.AbstractCGMsgObj;
import com.game.gameServer.msg.SpecialMsgSerialUId;
import com.game.part.msg.MsgLog;
import com.game.part.msg.MsgServ;

/**
 * 自定义消息处理器
 *
 * @author hjj2017
 * @since 2016/1/10
 *
 */
public class MyChannelHandler extends ChannelInboundHandlerAdapter {
    /** 会话 UId */
    private static final AttributeKey<Long> CTX_SESSION_UID = AttributeKey.newInstance("CTX_SESSION_UID");

    @Override
    public void channelRegistered(ChannelHandlerContext ctx) throws Exception {
        // 断言参数不为空
        assert ctx != null : "ctx";
        // 调用父类同名函数
        super.channelRegistered(ctx);

        // 新建会话对象
        IoSession newSession = new IoSession(ctx.channel());
        // 将会话 UId 保存到上下文中
        ctx.attr(CTX_SESSION_UID).set(newSession.getUId());
        // 注意 : 这里用的不是 setIfAbsent 函数!
        // 不管原来有没有值,
        // 始终都使用新值代替!!

        // 添加会话对象
        IoSessionManager.OBJ.addSession(newSession);

        // 创建 CG_PLAYER_CONNECTED 消息,
        // 注意 : 有可能在业务模块中并未监听该消息...
        // 如果监听了就处理,
        // 如果没有监听就不处理,
        // 没有什么大碍
        AbstractCGMsgObj cgMsgObj = MsgServ.OBJ.newMsgObj(SpecialMsgSerialUId.PLAYER_CONNECTED);
        this.postMsg(ctx, cgMsgObj);
    }

    @Override
    public void channelRead(ChannelHandlerContext ctx, Object obj) {
        // 断言参数不为空
        assert ctx != null : "null ctx";
        assert obj != null : "null obj";

        if (obj instanceof AbstractCGMsgObj) {
            // 输出日志记录
            MsgLog.LOG.info(MessageFormat.format(
                "接到消息 {0}, sessionUId = {1}",
                obj.toString(),
                String.valueOf(getSessionUId(ctx))
            ));

            // 发送消息
            this.postMsg(
                ctx, (AbstractCGMsgObj)obj
            );
        }
    }

    @Override
    public void channelUnregistered(
        ChannelHandlerContext ctx) throws Exception {
        // 断言参数不为空
        assert ctx != null : "ctx";
        // 调用父类同名函数
        super.channelUnregistered(ctx);

        // 创建 CG_PLAYER_DISCONNECTED 消息,
        // 注意 : 有可能在业务模块中并未监听该消息...
        // 但是最好实现这个消息
        AbstractCGMsgObj cgMsgObj = MsgServ.OBJ.newMsgObj(SpecialMsgSerialUId.PLAYER_DISCONNECTED);
        this.postMsg(ctx, cgMsgObj);
    }

    @Override
    public void exceptionCaught(ChannelHandlerContext ctx, Throwable err) {
        // 记录错误日志
        MsgLog.LOG.error(err.getMessage(), err);
        // 令玩家断开连接
        ctx.close();
    }

    /**
     * 发送消息对象
     *
     * @param ctx Netty 上下文
     * @param cgMsgObj CG 消息对象
     *
     */
    private void postMsg(
        ChannelHandlerContext ctx, AbstractCGMsgObj cgMsgObj) {
        if (ctx == null ||
            cgMsgObj == null) {
            // 如果参数对象为空,
            // 则直接退出!
            return;
        }

        // 设置消息处理器
        AbstractCGMsgHandler<?> handler = cgMsgObj.getSelfHandler();

        if (handler != null) {
            // 设置会话 UId
            handler._sessionUId = getSessionUId(ctx);
        }

        // 分派消息对象
        MsgServ.OBJ.post(cgMsgObj);
    }

    /**
     * 获取会话 UId
     *
     * @param ctx Netty 上下文
     * @return 返回会话 UId
     *
     */
    private static long getSessionUId(ChannelHandlerContext ctx) {
        if (ctx != null) {
            // 获取 CTX_SESSION_UID
            Long val = ctx.attr(CTX_SESSION_UID).get();

            if (val == null) {
                return 0;
            } else {
                return val;
            }
        } else {
            return 0;
        }
    }
}


text:
using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.ComponentModel;
using System.Text;

namespace System.Diagnostics
{
    /// <devdoc>
    ///     A set of values used to specify a process to start.  This is
    ///     used in conjunction with the <see cref='System.Diagnostics.Process'/>
    ///     component.
    /// </devdoc>
    public sealed partial class ProcessStartInfo
    {
        private string _fileName;
        private string _arguments;
        private string _directory;
        private string _verb;
        private ProcessWindowStyle _windowStyle;

        internal DictionaryWrapper _environmentVariables;

        /// <devdoc>
        ///     Default constructor.  At least the <see cref='System.Diagnostics.ProcessStartInfo.FileName'/>
        ///     property must be set before starting the process.
        /// </devdoc>
        public ProcessStartInfo()
        {
        }

        /// <devdoc>
        ///     Specifies the name of the application or document that is to be started.
        /// </devdoc>
        public ProcessStartInfo(string fileName)
        {
            _fileName = fileName;
        }

        /// <devdoc>
        ///     Specifies the name of the application that is to be started, as well as a set
        ///     of command line arguments to pass to the application.
        /// </devdoc>
        public ProcessStartInfo(string fileName, string arguments)
        {
            _fileName = fileName;
            _arguments = arguments;
        }

        /// <devdoc>
        ///     Specifies the set of command line arguments to use when starting the application.
        /// </devdoc>
        public string Arguments
        {
            get => _arguments ?? string.Empty;
            set => _arguments = value;
        }

        public bool CreateNoWindow { get; set; }

        public StringDictionary EnvironmentVariables => new StringDictionaryWrapper(Environment as DictionaryWrapper);

        public IDictionary<string, string> Environment
        {
            get
            {
                if (_environmentVariables == null)
                {
                    IDictionary envVars = System.Environment.GetEnvironmentVariables();

#pragma warning disable 0429 // CaseSensitiveEnvironmentVaribles is constant but varies depending on if we build for Unix or Windows
                    _environmentVariables = new DictionaryWrapper(new Dictionary<string, string>(
                        envVars.Count,
                        CaseSensitiveEnvironmentVariables ? StringComparer.Ordinal : StringComparer.OrdinalIgnoreCase));
#pragma warning restore 0429

                    // Manual use of IDictionaryEnumerator instead of foreach to avoid DictionaryEntry box allocations.
                    IDictionaryEnumerator e = envVars.GetEnumerator();
                    Debug.Assert(!(e is IDisposable), "Environment.GetEnvironmentVariables should not be IDisposable.");
                    while (e.MoveNext())
                    {
                        DictionaryEntry entry = e.Entry;
                        _environmentVariables.Add((string)entry.Key, (string)entry.Value);
                    }
                }
                return _environmentVariables;
            }
        }

        public bool RedirectStandardInput { get; set; }
        public bool RedirectStandardOutput { get; set; }
        public bool RedirectStandardError { get; set; }

        public Encoding StandardErrorEncoding { get; set; }

        public Encoding StandardOutputEncoding { get; set; }

        /// <devdoc>
        ///    <para>
        ///       Returns or sets the application, document, or URL that is to be launched.
        ///    </para>
        /// </devdoc>
        public string FileName
        {
            get => _fileName ?? string.Empty;
            set => _fileName = value;
        }

        /// <devdoc>
        ///     Returns or sets the initial directory for the process that is started.
        ///     Specify "" to if the default is desired.
        /// </devdoc>
        public string WorkingDirectory
        {
            get => _directory ?? string.Empty;
            set => _directory = value;
        }

        public bool ErrorDialog { get; set; }
        public IntPtr ErrorDialogParentHandle { get; set; }

        [DefaultValue("")]
        public string Verb
        {
            get => _verb ?? string.Empty;
            set => _verb = value;
        }

        [DefaultValueAttribute(System.Diagnostics.ProcessWindowStyle.Normal)]
        public ProcessWindowStyle WindowStyle
        {
            get => _windowStyle;
            set
            {
                if (!Enum.IsDefined(typeof(ProcessWindowStyle), value))
                {
                    throw new InvalidEnumArgumentException(nameof(value), (int)value, typeof(ProcessWindowStyle));
                }

                _windowStyle = value;
            }
        }
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@android:color/white"
    android:gravity="center_horizontal"
    android:orientation="vertical" >

    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent" >

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical" >

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:gravity="center_vertical"
                android:orientation="horizontal" >

                <TextView
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="20dp"
                    android:layout_marginRight="5dp"
                    android:layout_weight="2"
                    android:text="Reg. No."
                    android:textColor="@android:color/black"
                    android:textSize="@dimen/tv_reg_parameter" />

                <EditText
                    android:id="@+id/et_reg_no"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="20dp"
                    android:layout_marginRight="70dp"
                    android:layout_marginTop="10dp"
                    android:layout_weight="4"
                    android:gravity="center"
                    android:hint="Reg. No."
                    android:textColor="#111111" />
            </LinearLayout>

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:gravity="center_vertical"
                android:orientation="horizontal" >

                <TextView
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="20dp"
                    android:layout_marginRight="5dp"
                    android:layout_weight="2"
                    android:text=" Vehicle Make"
                    android:textColor="@android:color/black"
                    android:textSize="@dimen/tv_reg_parameter" />

                <EditText
                    android:id="@+id/et_make"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="20dp"
                    android:layout_marginRight="70dp"
                    android:layout_marginTop="10dp"
                    android:layout_weight="4"
                    android:gravity="center"
                    android:hint="Make"
                    android:textColor="#111111" />
            </LinearLayout>

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:gravity="center_vertical"
                android:orientation="horizontal" >

                <TextView
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="20dp"
                    android:layout_marginRight="5dp"
                    android:layout_weight="2"
                    android:text="ModelName"
                    android:textColor="@android:color/black"
                    android:textSize="@dimen/tv_reg_parameter" />

                <EditText
                    android:id="@+id/et_model"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="20dp"
                    android:layout_marginRight="70dp"
                    android:layout_marginTop="10dp"
                    android:layout_weight="4"
                    android:gravity="center"
                    android:hint="ModelName"
                    android:textColor="#111111" />
            </LinearLayout>

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:gravity="center_vertical"
                android:orientation="horizontal" >

                <TextView
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="20dp"
                    android:layout_marginRight="5dp"
                    android:layout_weight="2"
                    android:text="Chasis Number"
                    android:textColor="@android:color/black"
                    android:textSize="@dimen/tv_reg_parameter" />

                <EditText
                    android:id="@+id/et_chasis_number"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="20dp"
                    android:layout_marginRight="70dp"
                    android:layout_marginTop="10dp"
                    android:layout_weight="4"
                    android:gravity="center"
                    android:hint="Chasis Number"
                    android:textColor="#111111" />
            </LinearLayout>

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:gravity="center_vertical"
                android:orientation="horizontal" >

                <TextView
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="20dp"
                    android:layout_marginRight="5dp"
                    android:layout_weight="2"
                    android:text="Contact Number"
                    android:textColor="@android:color/black"
                    android:textSize="@dimen/tv_reg_parameter" />

                <EditText
                    android:id="@+id/et_contact_number"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="20dp"
                    android:layout_marginRight="70dp"
                    android:layout_marginTop="10dp"
                    android:layout_weight="4"
                    android:gravity="center"
                    android:hint="Contact Number"
                    android:inputType="number"
                    android:maxLength="10"
                    android:textColor="#111111" />
            </LinearLayout>

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:gravity="center_vertical"
                android:orientation="horizontal" >

                <TextView
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="20dp"
                    android:layout_marginRight="5dp"
                    android:layout_weight="2"
                    android:text="Owner Email"
                    android:textColor="@android:color/black"
                    android:textSize="@dimen/tv_reg_parameter" />

                <EditText
                    android:id="@+id/et_owner_email"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="20dp"
                    android:layout_marginRight="70dp"
                    android:layout_marginTop="10dp"
                    android:layout_weight="4"
                    android:gravity="center"
                    android:hint="Owner Email"
                    android:textColor="#111111" />
            </LinearLayout>

            <Button
                android:id="@+id/btn_register"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_margin="10dp"
                android:text="Register"
                android:textColor="#111111" />
        </LinearLayout>
    </ScrollView>

</LinearLayout>


text:
class TaxonConfiguration < ActiveRecord::Base
  self.table_name = "spree_taxon_configurations"
  attr_accessible :taxon_id, :recommendation_type
end