text:
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">

  <title>epydoc.docbuilder</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />

         Home

         Trees

         Indices

         Help

epydoc 3.0beta1

        Package epydoc ::
        Module docbuilder

[hide private]

[frames] | no frames]

Module docbuilder
source code

Construct data structures that encode the API documentation for Python
  objects.  These data structures are created using a series of steps:

      Building docs: Extract basic information about the objects,
      and objects that are related to them.  This can be done by
      introspecting the objects' values (with epydoc.docintrospecter; or by parsing their source
      code (with epydoc.docparser.

      Merging: Combine the information obtained from
      introspection & parsing each object into a single structure.

      Linking: Replace any 'pointers' that were created for
      imported variables by their target (if it's available).

      Naming: Chose a unique 'canonical name' for each
      object.

      Docstring Parsing: Parse the docstring of each object, and
      extract any pertinant information.

      Inheritance: Add information about variables that classes
      inherit from their base classes.

The documentation information for each individual object is
  represented using an APIDoc; and the documentation for a collection of
  objects is represented using a DocIndex.

  The main interface to epydoc.docbuilder consists of two
  functions:

      build_doc() -- Builds documentation for a single
      item, and returns it as an APIDoc object.

      build_doc_index() -- Builds documentation for a
      collection of items, and returns it as a DocIndex
      object.

  The remaining functions are used by these two main functions to
  perform individual steps in the creation of the documentation.

        Classes
        [hide private]

        BuildOptions

      Holds the parameters for a documentation building process.

        _ProgressEstimator

      Used to keep track of progress when generating the initial docs
        for the given items.

        Functions
        [hide private]

          _report_errors(name,
        introspect_doc,
        parse_doc,
        introspect_error,
        parse_error)

            source code

call graph

  <map id="call_graph_for__report_errors" name="call_graph_for__report_errors">
<area shape="rect" href="epydoc.apidoc.APIDoc-class.html#__cmp__" title="apidoc.APIDoc.__cmp__()" alt="" coords="499,6,723,38" />
<area shape="rect" href="epydoc.docbuilder-module.html#_get_docs_from_module_file" title="_get_docs_from_module_file()" alt="" coords="7,90,260,122" />
<area shape="rect" href="epydoc.docbuilder-module.html#_report_errors" title="_report_errors()" alt="" coords="309,90,451,122" />
<area shape="rect" href="epydoc.log-module.html#end_block" title="log.end_block()" alt="" coords="541,62,680,94" />
<area shape="rect" href="epydoc.log-module.html#error" title="log.error()" alt="" coords="561,118,660,150" />
<area shape="rect" href="epydoc.log-module.html#start_block" title="log.start_block()" alt="" coords="539,174,683,206" />
</map>

Call Graph

      Documentation Construction

      APIDoc

          build_doc(item,
        introspect=True,
        parse=True,
        add_submodules=True,
        exclude_introspect=True,
        exclude_parse=True)

      Build API documentation for a given item, and return it as an APIDoc
      object.

            source code

      DocIndex

          build_doc_index(items,
        introspect=True,
        parse=True,
        add_submodules=True,
        exclude_introspect=True,
        exclude_parse=True)

      Build API documentation for the given list of items, and return it
      in the form of a DocIndex.

            source code

call graph

  <map id="call_graph_for_build_doc_index" name="call_graph_for_build_doc_index">
<area shape="rect" href="epydoc.apidoc.APIDoc-class.html#__cmp__" title="apidoc.APIDoc.__cmp__()" alt="" coords="286,6,510,38" />
<area shape="rect" href="epydoc.apidoc.DocIndex-class.html#__init__" title="apidoc.DocIndex.__init__()" alt="" coords="284,62,511,94" />
<area shape="rect" href="epydoc.apidoc.DocIndex-class.html#reachable_valdocs" title="apidoc.DocIndex.reachable_valdocs()" alt="" coords="246,118,550,150" />
<area shape="rect" href="epydoc.apidoc.DottedName-class.html#__cmp__" title="apidoc.DottedName.__cmp__()" alt="" coords="270,174,526,206" />
<area shape="rect" href="epydoc.apidoc.ModuleDoc-class.html#init_submodule_groups" title="apidoc.ModuleDoc.init_submodule_groups()" alt="" coords="219,230,576,262" />
<area shape="rect" href="epydoc.apidoc.NamespaceDoc-class.html#init_sorted_variables" title="apidoc.NamespaceDoc.init_sorted_variables()" alt="" coords="215,286,580,318" />
<area shape="rect" href="epydoc.apidoc.NamespaceDoc-class.html#init_variable_groups" title="apidoc.NamespaceDoc.init_variable_groups()" alt="" coords="216,342,579,374" />
<area shape="rect" href="epydoc.docbuilder.BuildOptions-class.html#__init__" title="BuildOptions.__init__()" alt="" coords="296,398,499,430" />
<area shape="rect" href="epydoc.docbuilder-module.html#_get_docs_from_items" title="_get_docs_from_items()" alt="" coords="295,454,500,486" />
<area shape="rect" href="epydoc.docbuilder-module.html#_report_valdoc_progress" title="_report_valdoc_progress()" alt="" coords="288,510,507,542" />
<area shape="rect" href="epydoc.docbuilder-module.html#assign_canonical_names" title="assign_canonical_names()" alt="" coords="288,566,507,598" />
<area shape="rect" href="epydoc.docbuilder-module.html#build_doc_index" title="build_doc_index()" alt="" coords="6,482,166,514" />
<area shape="rect" href="epydoc.docbuilder-module.html#inherit_docs" title="inherit_docs()" alt="" coords="334,622,462,654" />
<area shape="rect" href="epydoc.docbuilder-module.html#link_imports" title="link_imports()" alt="" coords="334,678,462,710" />
<area shape="rect" href="epydoc.docbuilder-module.html#merge_docs" title="merge_docs()" alt="" coords="336,734,459,766" />
<area shape="rect" href="epydoc.docstringparser-module.html#parse_docstring" title="docstringparser.parse_docstring()" alt="" coords="262,790,534,822" />
<area shape="rect" href="epydoc.log-module.html#end_progress" title="log.end_progress()" alt="" coords="316,846,479,878" />
<area shape="rect" href="epydoc.log-module.html#progress" title="log.progress()" alt="" coords="335,902,460,934" />
<area shape="rect" href="epydoc.log-module.html#start_progress" title="log.start_progress()" alt="" coords="315,958,480,990" />
</map>

Call Graph

          _report_valdoc_progress(i,
        val_doc,
        val_docs)

            source code

call graph

  <map id="call_graph_for__report_valdoc_" name="call_graph_for__report_valdoc_">
<area shape="rect" href="epydoc.apidoc.DottedName-class.html#__getitem__" title="apidoc.DottedName.__getitem__()" alt="" coords="484,6,764,38" />
<area shape="rect" href="epydoc.docbuilder-module.html#_report_valdoc_progress" title="_report_valdoc_progress()" alt="" coords="215,34,434,66" />
<area shape="rect" href="epydoc.log-module.html#progress" title="log.progress()" alt="" coords="562,62,687,94" />
<area shape="rect" href="epydoc.docbuilder-module.html#build_doc_index" title="build_doc_index()" alt="" coords="6,34,166,66" />
</map>

Call Graph

          _get_docs_from_items(items,
        options)

            source code

call graph

  <map id="call_graph_for__get_docs_from_" name="call_graph_for__get_docs_from_">
<area shape="rect" href="epydoc.apidoc.DottedName-class.html#__hash__" title="apidoc.DottedName.__hash__()" alt="" coords="468,6,727,38" />
<area shape="rect" href="epydoc.apidoc.DottedName-class.html#__len__" title="apidoc.DottedName.__len__()" alt="" coords="473,62,721,94" />
<area shape="rect" href="epydoc.docbuilder._ProgressEstimator-class.html#__init__" title="_ProgressEstimator.__init__()" alt="" coords="473,118,721,150" />
<area shape="rect" href="epydoc.docbuilder-module.html#_get_docs_from_items" title="_get_docs_from_items()" alt="" coords="213,230,419,262" />
<area shape="rect" href="epydoc.docbuilder-module.html#_get_docs_from_module_file" title="_get_docs_from_module_file()" alt="" coords="471,174,724,206" />
<area shape="rect" href="epydoc.docbuilder-module.html#_get_docs_from_submodules" title="_get_docs_from_submodules()" alt="" coords="471,230,724,262" />
<area shape="rect" href="epydoc.log-module.html#end_progress" title="log.end_progress()" alt="" coords="516,286,679,318" />
<area shape="rect" href="epydoc.log-module.html#start_progress" title="log.start_progress()" alt="" coords="515,342,680,374" />
<area shape="rect" href="epydoc.util-module.html#is_module_file" title="util.is_module_file()" alt="" coords="509,398,685,430" />
<area shape="rect" href="epydoc.util-module.html#is_package_dir" title="util.is_package_dir()" alt="" coords="509,454,685,486" />
<area shape="rect" href="epydoc.docbuilder-module.html#build_doc_index" title="build_doc_index()" alt="" coords="5,230,165,262" />
</map>

Call Graph

          _get_docs_from_pyobject(obj,
        options,
        progress_estimator)

            source code

          _get_docs_from_pyname(name,
        options,
        progress_estimator,
        supress_warnings=True)

            source code

          _get_docs_from_pyscript(filename,
        options,
        progress_estimator)

            source code

          _get_docs_from_module_file(filename,
        options,
        progress_estimator,
        parent_docs=(None, None))

      Construct and return the API documentation for the python module
      with the given filename.

            source code

call graph

  <map id="call_graph_for__get_docs_from__5" name="call_graph_for__get_docs_from__5">
<area shape="rect" href="epydoc.apidoc.DottedName-class.html#__init__" title="apidoc.DottedName.__init__()" alt="" coords="624,6,875,38" />
<area shape="rect" href="epydoc.apidoc.DottedName-class.html#__str__" title="apidoc.DottedName.__str__()" alt="" coords="628,62,871,94" />
<area shape="rect" href="epydoc.docbuilder.BuildOptions-class.html#must_introspect" title="BuildOptions.must_introspect()" alt="" coords="620,118,879,150" />
<area shape="rect" href="epydoc.docbuilder.BuildOptions-class.html#must_parse" title="BuildOptions.must_parse()" alt="" coords="638,174,862,206" />
<area shape="rect" href="epydoc.docbuilder._ProgressEstimator-class.html#progress" title="_ProgressEstimator.progress()" alt="" coords="626,230,874,262" />
<area shape="rect" href="epydoc.docbuilder-module.html#_get_docs_from_items" title="_get_docs_from_items()" alt="" coords="31,230,236,262" />
<area shape="rect" href="epydoc.docbuilder-module.html#_get_docs_from_module_file" title="_get_docs_from_module_file()" alt="" coords="311,258,564,290" />
<area shape="rect" href="epydoc.docbuilder-module.html#_report_errors" title="_report_errors()" alt="" coords="679,286,820,318" />
<area shape="rect" href="epydoc.docintrospecter-module.html#introspect_docs" title="docintrospecter.introspect_docs()" alt="" coords="615,342,884,374" />
<area shape="rect" href="epydoc.docparser-module.html#parse_docs" title="docparser.parse_docs()" alt="" coords="652,398,847,430" />
<area shape="rect" href="epydoc.log-module.html#progress" title="log.progress()" alt="" coords="687,454,812,486" />
<area shape="rect" href="epydoc.util-module.html#py_src_filename" title="util.py_src_filename()" alt="" coords="655,510,844,542" />
<area shape="rect" href="epydoc.docbuilder-module.html#_get_docs_from_submodules" title="_get_docs_from_submodules()" alt="" coords="7,286,260,318" />
</map>

Call Graph

          _get_docs_from_submodules(item,
        pkg_docs,
        options,
        progress_estimator)

            source code

call graph

  <map id="call_graph_for__get_docs_from__6" name="call_graph_for__get_docs_from__6">
<area shape="rect" href="epydoc.docbuilder._ProgressEstimator-class.html#revise_estimate" title="_ProgressEstimator.revise_estimate()" alt="" coords="563,6,864,38" />
<area shape="rect" href="epydoc.docbuilder-module.html#_get_docs_from_items" title="_get_docs_from_items()" alt="" coords="5,90,211,122" />
<area shape="rect" href="epydoc.docbuilder-module.html#_get_docs_from_submodules" title="_get_docs_from_submodules()" alt="" coords="260,90,513,122" />
<area shape="rect" href="epydoc.docbuilder-module.html#_get_docs_from_module_file" title="_get_docs_from_module_file()" alt="" coords="587,62,840,94" />
<area shape="rect" href="epydoc.util-module.html#is_module_file" title="util.is_module_file()" alt="" coords="625,118,801,150" />
<area shape="rect" href="epydoc.util-module.html#is_package_dir" title="util.is_package_dir()" alt="" coords="625,174,801,206" />
</map>

Call Graph

      Merging

          register_attribute_mergefunc(attrib,
        mergefunc)

      Register an attribute merge function.

            source code

          merge_docs(introspect_doc,
        parse_doc,
        cyclecheck=True,
        path=True)

      Merge the API documentation information that was obtained from
      introspection with information that was obtained from parsing.

            source code

call graph

  <map id="call_graph_for_merge_docs" name="call_graph_for_merge_docs">
<area shape="rect" href="epydoc.apidoc.APIDoc-class.html#__cmp__" title="apidoc.APIDoc.__cmp__()" alt="" coords="481,6,705,38" />
<area shape="rect" href="epydoc.apidoc.APIDoc-class.html#merge_and_overwrite" title="apidoc.APIDoc.merge_and_overwrite()" alt="" coords="435,62,752,94" />
<area shape="rect" href="epydoc.apidoc.APIDoc-class.html#specialize_to" title="apidoc.APIDoc.specialize_to()" alt="" coords="468,118,719,150" />
<area shape="rect" href="epydoc.apidoc.DottedName-class.html#__cmp__" title="apidoc.DottedName.__cmp__()" alt="" coords="465,174,721,206" />
<area shape="rect" href="epydoc.apidoc.DottedName-class.html#__str__" title="apidoc.DottedName.__str__()" alt="" coords="472,230,715,262" />
<area shape="rect" href="epydoc.docbuilder-module.html#_merge_posargs_and_defaults" title="_merge_posargs_and_defaults()" alt="" coords="463,286,724,318" />
<area shape="rect" href="epydoc.docbuilder-module.html#build_doc_index" title="build_doc_index()" alt="" coords="29,90,189,122" />
<area shape="rect" href="epydoc.docbuilder-module.html#merge_docs" title="merge_docs()" alt="" coords="263,202,385,234" />
<area shape="rect" href="epydoc.docbuilder-module.html#merge_attribute" title="merge_attribute()" alt="" coords="517,342,669,374" />
<area shape="rect" href="epydoc.docbuilder-module.html#merge_bases" title="merge_bases()" alt="" coords="44,146,175,178" />
<area shape="rect" href="epydoc.log-module.html#info" title="log.info()" alt="" coords="548,398,639,430" />
<area shape="rect" href="epydoc.docbuilder-module.html#merge_posarg_defaults" title="merge_posarg_defaults()" alt="" coords="5,202,213,234" />
<area shape="rect" href="epydoc.docbuilder-module.html#merge_value" title="merge_value()" alt="" coords="44,258,175,290" />
<area shape="rect" href="epydoc.docbuilder-module.html#merge_variables" title="merge_variables()" alt="" coords="31,314,188,346" />
</map>

Call Graph

          _merge_posargs_and_defaults(introspect_doc,
        parse_doc,
        path)

            source code

call graph

  <map id="call_graph_for__merge_posargs_" name="call_graph_for__merge_posargs_">
<area shape="rect" href="epydoc.docbuilder-module.html#_merge_posargs_and_defaults" title="_merge_posargs_and_defaults()" alt="" coords="179,6,440,38" />
<area shape="rect" href="epydoc.docbuilder-module.html#merge_docs" title="merge_docs()" alt="" coords="7,6,129,38" />
</map>

Call Graph

          merge_attribute(attrib,
        introspect_doc,
        parse_doc,
        cyclecheck,
        path)

            source code

call graph

  <map id="call_graph_for_merge_attribute" name="call_graph_for_merge_attribute">
<area shape="rect" href="epydoc.docbuilder-module.html#merge_attribute" title="merge_attribute()" alt="" coords="179,174,331,206" />
<area shape="rect" href="epydoc.docbuilder-module.html#merge_bases" title="merge_bases()" alt="" coords="428,6,559,38" />
<area shape="rect" href="epydoc.docbuilder-module.html#merge_docs_extracted_by" title="merge_docs_extracted_by()" alt="" coords="379,62,608,94" />
<area shape="rect" href="epydoc.docbuilder-module.html#merge_docstring" title="merge_docstring()" alt="" coords="415,118,572,150" />
<area shape="rect" href="epydoc.docbuilder-module.html#merge_posarg_defaults" title="merge_posarg_defaults()" alt="" coords="389,174,597,206" />
<area shape="rect" href="epydoc.docbuilder-module.html#merge_proxy_for" title="merge_proxy_for()" alt="" coords="412,230,575,262" />
<area shape="rect" href="epydoc.docbuilder-module.html#merge_value" title="merge_value()" alt="" coords="428,286,559,318" />
<area shape="rect" href="epydoc.docbuilder-module.html#merge_variables" title="merge_variables()" alt="" coords="415,342,572,374" />
<area shape="rect" href="epydoc.docbuilder-module.html#merge_docs" title="merge_docs()" alt="" coords="7,174,129,206" />
</map>

Call Graph

          merge_variables(varlist1,
        varlist2,
        precedence,
        cyclecheck,
        path)

            source code

call graph

  <map id="call_graph_for_merge_variables" name="call_graph_for_merge_variables">
<area shape="rect" href="epydoc.docbuilder-module.html#merge_attribute" title="merge_attribute()" alt="" coords="5,6,157,38" />
<area shape="rect" href="epydoc.docbuilder-module.html#merge_variables" title="merge_variables()" alt="" coords="205,6,363,38" />
<area shape="rect" href="epydoc.docbuilder-module.html#merge_docs" title="merge_docs()" alt="" coords="412,6,535,38" />
</map>

Call Graph

          merge_value(value1,
        value2,
        precedence,
        cyclecheck,
        path)

            source code

call graph

  <map id="call_graph_for_merge_value" name="call_graph_for_merge_value">
<area shape="rect" href="epydoc.docbuilder-module.html#merge_attribute" title="merge_attribute()" alt="" coords="6,6,158,38" />
<area shape="rect" href="epydoc.docbuilder-module.html#merge_value" title="merge_value()" alt="" coords="206,6,336,38" />
<area shape="rect" href="epydoc.docbuilder-module.html#merge_docs" title="merge_docs()" alt="" coords="386,6,508,38" />
</map>

Call Graph

          merge_package(v1,
        v2,
        precedence,
        cyclecheck,
        path)

            source code

          merge_container(v1,
        v2,
        precedence,
        cyclecheck,
        path)

            source code

          merge_overrides(v1,
        v2,
        precedence,
        cyclecheck,
        path)

            source code

          merge_fget(v1,
        v2,
        precedence,
        cyclecheck,
        path)

            source code

          merge_fset(v1,
        v2,
        precedence,
        cyclecheck,
        path)

            source code

          merge_fdel(v1,
        v2,
        precedence,
        cyclecheck,
        path)

            source code

          merge_proxy_for(v1,
        v2,
        precedence,
        cyclecheck,
        path)

            source code

call graph

  <map id="call_graph_for_merge_proxy_for" name="call_graph_for_merge_proxy_for">
<area shape="rect" href="epydoc.docbuilder-module.html#merge_attribute" title="merge_attribute()" alt="" coords="5,6,157,38" />
<area shape="rect" href="epydoc.docbuilder-module.html#merge_proxy_for" title="merge_proxy_for()" alt="" coords="207,6,369,38" />
</map>

Call Graph

          merge_bases(baselist1,
        baselist2,
        precedence,
        cyclecheck,
        path)

            source code

call graph

  <map id="call_graph_for_merge_bases" name="call_graph_for_merge_bases">
<area shape="rect" href="epydoc.apidoc.DottedName-class.html#__cmp__" title="apidoc.DottedName.__cmp__()" alt="" coords="385,6,641,38" />
<area shape="rect" href="epydoc.apidoc.DottedName-class.html#__str__" title="apidoc.DottedName.__str__()" alt="" coords="392,62,635,94" />
<area shape="rect" href="epydoc.docbuilder-module.html#merge_attribute" title="merge_attribute()" alt="" coords="5,90,157,122" />
<area shape="rect" href="epydoc.docbuilder-module.html#merge_bases" title="merge_bases()" alt="" coords="205,90,336,122" />
<area shape="rect" href="epydoc.docbuilder-module.html#merge_docs" title="merge_docs()" alt="" coords="452,118,575,150" />
<area shape="rect" href="epydoc.log-module.html#info" title="log.info()" alt="" coords="468,174,559,206" />
</map>

Call Graph

          merge_posarg_defaults(defaults1,
        defaults2,
        precedence,
        cyclecheck,
        path)

            source code

call graph

  <map id="call_graph_for_merge_posarg_de" name="call_graph_for_merge_posarg_de">
<area shape="rect" href="epydoc.docbuilder-module.html#merge_attribute" title="merge_attribute()" alt="" coords="5,6,157,38" />
<area shape="rect" href="epydoc.docbuilder-module.html#merge_posarg_defaults" title="merge_posarg_defaults()" alt="" coords="205,6,413,38" />
<area shape="rect" href="epydoc.docbuilder-module.html#merge_docs" title="merge_docs()" alt="" coords="463,6,585,38" />
</map>

Call Graph

          merge_docstring(docstring1,
        docstring2,
        precedence,
        cyclecheck,
        path)

            source code

call graph

  <map id="call_graph_for_merge_docstring" name="call_graph_for_merge_docstring">
<area shape="rect" href="epydoc.docbuilder-module.html#merge_attribute" title="merge_attribute()" alt="" coords="6,6,158,38" />
<area shape="rect" href="epydoc.docbuilder-module.html#merge_docstring" title="merge_docstring()" alt="" coords="207,6,364,38" />
</map>

Call Graph

          merge_docs_extracted_by(v1,
        v2,
        precedence,
        cyclecheck,
        path)

            source code

call graph

  <map id="call_graph_for_merge_docs_extr" name="call_graph_for_merge_docs_extr">
<area shape="rect" href="epydoc.docbuilder-module.html#merge_attribute" title="merge_attribute()" alt="" coords="5,6,157,38" />
<area shape="rect" href="epydoc.docbuilder-module.html#merge_docs_extracted_by" title="merge_docs_extracted_by()" alt="" coords="205,6,435,38" />
</map>

Call Graph

      Linking

          link_imports(val_doc,
        docindex)

            source code

call graph

  <map id="call_graph_for_link_imports" name="call_graph_for_link_imports">
<area shape="rect" href="epydoc.docbuilder-module.html#build_doc_index" title="build_doc_index()" alt="" coords="5,6,165,38" />
<area shape="rect" href="epydoc.docbuilder-module.html#link_imports" title="link_imports()" alt="" coords="215,6,343,38" />
</map>

Call Graph

      Naming

          assign_canonical_names(val_doc,
        name,
        docindex,
        score=0)

      Assign a canonical name to val_doc (if it doesn't
      have one already), and (recursively) to each variable in
      val_doc.

            source code

call graph

  <map id="call_graph_for_assign_canonica" name="call_graph_for_assign_canonica">
<area shape="rect" href="epydoc.apidoc.APIDoc-class.html#__cmp__" title="apidoc.APIDoc.__cmp__()" alt="" coords="509,6,733,38" />
<area shape="rect" href="epydoc.apidoc.APIDoc-class.html#__hash__" title="apidoc.APIDoc.__hash__()" alt="" coords="509,62,733,94" />
<area shape="rect" href="epydoc.apidoc.ClassDoc-class.html#apidoc_links" title="apidoc.ClassDoc.apidoc_links()" alt="" coords="492,118,751,150" />
<area shape="rect" href="epydoc.apidoc.DottedName-class.html#__init__" title="apidoc.DottedName.__init__()" alt="" coords="496,174,747,206" />
<area shape="rect" href="epydoc.apidoc.ModuleDoc-class.html#apidoc_links" title="apidoc.ModuleDoc.apidoc_links()" alt="" coords="483,230,760,262" />
<area shape="rect" href="epydoc.apidoc.PropertyDoc-class.html#apidoc_links" title="apidoc.PropertyDoc.apidoc_links()" alt="" coords="480,286,763,318" />
<area shape="rect" href="epydoc.apidoc.ValueDoc-class.html#apidoc_links" title="apidoc.ValueDoc.apidoc_links()" alt="" coords="489,342,753,374" />
<area shape="rect" href="epydoc.docbuilder-module.html#_unreachable_name_for" title="_unreachable_name_for()" alt="" coords="515,398,728,430" />
<area shape="rect" href="epydoc.docbuilder-module.html#_var_shadows_self" title="_var_shadows_self()" alt="" coords="532,454,711,486" />
<area shape="rect" href="epydoc.docbuilder-module.html#assign_canonical_names" title="assign_canonical_names()" alt="" coords="213,230,432,262" />
<area shape="rect" href="epydoc.docbuilder-module.html#build_doc_index" title="build_doc_index()" alt="" coords="5,230,165,262" />
</map>

Call Graph

          _var_shadows_self(var_doc,
        varname)

            source code

call graph

  <map id="call_graph_for__var_shadows_se" name="call_graph_for__var_shadows_se">
<area shape="rect" href="epydoc.apidoc.APIDoc-class.html#__cmp__" title="apidoc.APIDoc.__cmp__()" alt="" coords="520,6,744,38" />
<area shape="rect" href="epydoc.apidoc.DottedName-class.html#__cmp__" title="apidoc.DottedName.__cmp__()" alt="" coords="504,62,760,94" />
<area shape="rect" href="epydoc.apidoc.DottedName-class.html#dominates" title="apidoc.DottedName.dominates()" alt="" coords="500,118,764,150" />
<area shape="rect" href="epydoc.docbuilder-module.html#_var_shadows_self" title="_var_shadows_self()" alt="" coords="272,62,451,94" />
<area shape="rect" href="epydoc.docbuilder-module.html#assign_canonical_names" title="assign_canonical_names()" alt="" coords="6,62,224,94" />
</map>

Call Graph

          _fix_self_shadowing_var(var_doc,
        varname,
        docindex)

            source code

          _unreachable_name_for(val_doc,
        docindex)

            source code

call graph

  <map id="call_graph_for__unreachable_na" name="call_graph_for__unreachable_na">
<area shape="rect" href="epydoc.apidoc.APIDoc-class.html#__cmp__" title="apidoc.APIDoc.__cmp__()" alt="" coords="555,6,779,38" />
<area shape="rect" href="epydoc.apidoc.DottedName-class.html#__cmp__" title="apidoc.DottedName.__cmp__()" alt="" coords="539,62,795,94" />
<area shape="rect" href="epydoc.apidoc.DottedName-class.html#__hash__" title="apidoc.DottedName.__hash__()" alt="" coords="538,118,796,150" />
<area shape="rect" href="epydoc.apidoc.DottedName-class.html#__init__" title="apidoc.DottedName.__init__()" alt="" coords="542,174,792,206" />
<area shape="rect" href="epydoc.apidoc.DottedName-class.html#__len__" title="apidoc.DottedName.__len__()" alt="" coords="543,230,791,262" />
<area shape="rect" href="epydoc.apidoc.DottedName-class.html#__str__" title="apidoc.DottedName.__str__()" alt="" coords="546,286,788,318" />
<area shape="rect" href="epydoc.docbuilder-module.html#_unreachable_name_for" title="_unreachable_name_for()" alt="" coords="274,146,487,178" />
<area shape="rect" href="epydoc.docbuilder-module.html#assign_canonical_names" title="assign_canonical_names()" alt="" coords="6,146,224,178" />
</map>

Call Graph

      Inheritance

          inherit_docs(class_doc)

            source code

call graph

  <map id="call_graph_for_inherit_docs" name="call_graph_for_inherit_docs">
<area shape="rect" href="epydoc.apidoc.APIDoc-class.html#__cmp__" title="apidoc.APIDoc.__cmp__()" alt="" coords="390,6,614,38" />
<area shape="rect" href="epydoc.apidoc.ClassDoc-class.html#mro" title="apidoc.ClassDoc.mro()" alt="" coords="404,62,599,94" />
<area shape="rect" href="epydoc.docbuilder-module.html#_inherit_info" title="_inherit_info()" alt="" coords="436,118,567,150" />
<area shape="rect" href="epydoc.docbuilder-module.html#build_doc_index" title="build_doc_index()" alt="" coords="6,62,166,94" />
<area shape="rect" href="epydoc.docbuilder-module.html#inherit_docs" title="inherit_docs()" alt="" coords="214,62,342,94" />
</map>

Call Graph

          _inherit_info(var_doc)

      Copy any relevant documentation information from the variable that
      var_doc overrides into var_doc itself.

            source code

call graph

  <map id="call_graph_for__inherit_info" name="call_graph_for__inherit_info">
<area shape="rect" href="epydoc.docbuilder-module.html#_inherit_info" title="_inherit_info()" alt="" coords="183,6,313,38" />
<area shape="rect" href="epydoc.docbuilder-module.html#inherit_docs" title="inherit_docs()" alt="" coords="5,6,133,38" />
</map>

Call Graph

        Variables
        [hide private]

        _INHERITED_ATTRIBS = ['descr', 'summary', 'metadata', 'extra_d...

      Merging

        MERGE_PRECEDENCE = {'canonical_name': 'introspect', 'docformat...

      Indicates whether information from introspection or parsing should
      be given precedence, for specific attributes.

        DEFAULT_MERGE_PRECEDENCE = 'introspect'

      Indicates whether information from introspection or parsing should
      be given precedence.

        _attribute_mergefunc_registry = {'bases': <function merge_base...

      Naming

        _name_scores = {<ModuleDoc ConfigParser>: 2147483647, <ClassDo...

      A dictionary mapping from each ValueDoc to the score
      that has been assigned to its current cannonical name.

        _unreachable_names = {DottedName('??'): 12, DottedName('??', '...

      The set of names that have been used for unreachable objects.

        Function Details
        [hide private]

build_doc(item,
        introspect=True,
        parse=True,
        add_submodules=True,
        exclude_introspect=True,
        exclude_parse=True)

  	source code

  Build API documentation for a given item, and return it as an APIDoc
  object.

Parameters:

item - The item to document, specified using any of the
          following:

              A string, naming a python package directory (e.g.,
              'epydoc/markup')

              A string, naming a python file (e.g.,
              'epydoc/docparser.py')

              A string, naming a python object (e.g.,
              'epydoc.docparser.DocParser')

              Any (non-string) python object (e.g.,
              list.append)

introspect - If true, then use introspection to examine the specified
          items.  Otherwise, just use parsing.

parse - If true, then use parsing to examine the specified items.
          Otherwise, just use introspection.

Returns: APIDoc

build_doc_index(items,
        introspect=True,
        parse=True,
        add_submodules=True,
        exclude_introspect=True,
        exclude_parse=True)

  	source code

call graph

  <map id="call_graph_for_build_doc_index" name="call_graph_for_build_doc_index">
<area shape="rect" href="epydoc.apidoc.APIDoc-class.html#__cmp__" title="apidoc.APIDoc.__cmp__()" alt="" coords="286,6,510,38" />
<area shape="rect" href="epydoc.apidoc.DocIndex-class.html#__init__" title="apidoc.DocIndex.__init__()" alt="" coords="284,62,511,94" />
<area shape="rect" href="epydoc.apidoc.DocIndex-class.html#reachable_valdocs" title="apidoc.DocIndex.reachable_valdocs()" alt="" coords="246,118,550,150" />
<area shape="rect" href="epydoc.apidoc.DottedName-class.html#__cmp__" title="apidoc.DottedName.__cmp__()" alt="" coords="270,174,526,206" />
<area shape="rect" href="epydoc.apidoc.ModuleDoc-class.html#init_submodule_groups" title="apidoc.ModuleDoc.init_submodule_groups()" alt="" coords="219,230,576,262" />
<area shape="rect" href="epydoc.apidoc.NamespaceDoc-class.html#init_sorted_variables" title="apidoc.NamespaceDoc.init_sorted_variables()" alt="" coords="215,286,580,318" />
<area shape="rect" href="epydoc.apidoc.NamespaceDoc-class.html#init_variable_groups" title="apidoc.NamespaceDoc.init_variable_groups()" alt="" coords="216,342,579,374" />
<area shape="rect" href="epydoc.docbuilder.BuildOptions-class.html#__init__" title="BuildOptions.__init__()" alt="" coords="296,398,499,430" />
<area shape="rect" href="epydoc.docbuilder-module.html#_get_docs_from_items" title="_get_docs_from_items()" alt="" coords="295,454,500,486" />
<area shape="rect" href="epydoc.docbuilder-module.html#_report_valdoc_progress" title="_report_valdoc_progress()" alt="" coords="288,510,507,542" />
<area shape="rect" href="epydoc.docbuilder-module.html#assign_canonical_names" title="assign_canonical_names()" alt="" coords="288,566,507,598" />
<area shape="rect" href="epydoc.docbuilder-module.html#build_doc_index" title="build_doc_index()" alt="" coords="6,482,166,514" />
<area shape="rect" href="epydoc.docbuilder-module.html#inherit_docs" title="inherit_docs()" alt="" coords="334,622,462,654" />
<area shape="rect" href="epydoc.docbuilder-module.html#link_imports" title="link_imports()" alt="" coords="334,678,462,710" />
<area shape="rect" href="epydoc.docbuilder-module.html#merge_docs" title="merge_docs()" alt="" coords="336,734,459,766" />
<area shape="rect" href="epydoc.docstringparser-module.html#parse_docstring" title="docstringparser.parse_docstring()" alt="" coords="262,790,534,822" />
<area shape="rect" href="epydoc.log-module.html#end_progress" title="log.end_progress()" alt="" coords="316,846,479,878" />
<area shape="rect" href="epydoc.log-module.html#progress" title="log.progress()" alt="" coords="335,902,460,934" />
<area shape="rect" href="epydoc.log-module.html#start_progress" title="log.start_progress()" alt="" coords="315,958,480,990" />
</map>

Call Graph

  Build API documentation for the given list of items, and return it in
  the form of a DocIndex.

Parameters:

items - The items to document, specified using any of the
          following:

              A string, naming a python package directory (e.g.,
              'epydoc/markup')

              A string, naming a python file (e.g.,
              'epydoc/docparser.py')

              A string, naming a python object (e.g.,
              'epydoc.docparser.DocParser')

              Any (non-string) python object (e.g.,
              list.append)

introspect - If true, then use introspection to examine the specified
          items.  Otherwise, just use parsing.

parse - If true, then use parsing to examine the specified items.
          Otherwise, just use introspection.

Returns: DocIndex

_get_docs_from_module_file(filename,
        options,
        progress_estimator,
        parent_docs=(None, None))

  	source code

call graph

  <map id="call_graph_for__get_docs_from__5" name="call_graph_for__get_docs_from__5">
<area shape="rect" href="epydoc.apidoc.DottedName-class.html#__init__" title="apidoc.DottedName.__init__()" alt="" coords="624,6,875,38" />
<area shape="rect" href="epydoc.apidoc.DottedName-class.html#__str__" title="apidoc.DottedName.__str__()" alt="" coords="628,62,871,94" />
<area shape="rect" href="epydoc.docbuilder.BuildOptions-class.html#must_introspect" title="BuildOptions.must_introspect()" alt="" coords="620,118,879,150" />
<area shape="rect" href="epydoc.docbuilder.BuildOptions-class.html#must_parse" title="BuildOptions.must_parse()" alt="" coords="638,174,862,206" />
<area shape="rect" href="epydoc.docbuilder._ProgressEstimator-class.html#progress" title="_ProgressEstimator.progress()" alt="" coords="626,230,874,262" />
<area shape="rect" href="epydoc.docbuilder-module.html#_get_docs_from_items" title="_get_docs_from_items()" alt="" coords="31,230,236,262" />
<area shape="rect" href="epydoc.docbuilder-module.html#_get_docs_from_module_file" title="_get_docs_from_module_file()" alt="" coords="311,258,564,290" />
<area shape="rect" href="epydoc.docbuilder-module.html#_report_errors" title="_report_errors()" alt="" coords="679,286,820,318" />
<area shape="rect" href="epydoc.docintrospecter-module.html#introspect_docs" title="docintrospecter.introspect_docs()" alt="" coords="615,342,884,374" />
<area shape="rect" href="epydoc.docparser-module.html#parse_docs" title="docparser.parse_docs()" alt="" coords="652,398,847,430" />
<area shape="rect" href="epydoc.log-module.html#progress" title="log.progress()" alt="" coords="687,454,812,486" />
<area shape="rect" href="epydoc.util-module.html#py_src_filename" title="util.py_src_filename()" alt="" coords="655,510,844,542" />
<area shape="rect" href="epydoc.docbuilder-module.html#_get_docs_from_submodules" title="_get_docs_from_submodules()" alt="" coords="7,286,260,318" />
</map>

Call Graph

  Construct and return the API documentation for the python module with
  the given filename.

Parameters:

parent_docs - The ModuleDoc of the containing package. If
          parent_docs is not provided, then this method will
          check if the given filename is contained in a package; and if so,
          it will construct a stub ModuleDoc for the
          containing package(s).  parent_docs is a tuple,
          where the first element is the parent from introspection, and the
          second element is the parent from parsing.

register_attribute_mergefunc(attrib,
        mergefunc)

  	source code

  Register an attribute merge function.  This function will be called by
  merge_docs() when it needs to merge the attribute values
  of two APIDocs.

Parameters:

attrib - The name of the attribute whose values are merged by
          mergefunc.

mergefunc - The merge function, whose sinature is:

>>> def mergefunc(introspect_val, parse_val, precedence, cyclecheck, path):
...     return calculate_merged_value(introspect_val, parse_val)

Where introspect_val and parse_val
          are the two values to combine; precedence is a
          string indicating which value takes precedence for this attribute
          ('introspect' or 'parse');
          cyclecheck is a value used by
          merge_docs() to make sure that it only visits each
          pair of docs once; and path is a string describing
          the path that was taken from the root to this attribute (used to
          generate log messages).

          If the merge function needs to call merge_docs,
          then it should pass cyclecheck and path
          back in.  (When appropriate, a suffix should be added to
          path to describe the path taken to the merged
          values.)

merge_docs(introspect_doc,
        parse_doc,
        cyclecheck=True,
        path=True)

  	source code

call graph

  <map id="call_graph_for_merge_docs" name="call_graph_for_merge_docs">
<area shape="rect" href="epydoc.apidoc.APIDoc-class.html#__cmp__" title="apidoc.APIDoc.__cmp__()" alt="" coords="481,6,705,38" />
<area shape="rect" href="epydoc.apidoc.APIDoc-class.html#merge_and_overwrite" title="apidoc.APIDoc.merge_and_overwrite()" alt="" coords="435,62,752,94" />
<area shape="rect" href="epydoc.apidoc.APIDoc-class.html#specialize_to" title="apidoc.APIDoc.specialize_to()" alt="" coords="468,118,719,150" />
<area shape="rect" href="epydoc.apidoc.DottedName-class.html#__cmp__" title="apidoc.DottedName.__cmp__()" alt="" coords="465,174,721,206" />
<area shape="rect" href="epydoc.apidoc.DottedName-class.html#__str__" title="apidoc.DottedName.__str__()" alt="" coords="472,230,715,262" />
<area shape="rect" href="epydoc.docbuilder-module.html#_merge_posargs_and_defaults" title="_merge_posargs_and_defaults()" alt="" coords="463,286,724,318" />
<area shape="rect" href="epydoc.docbuilder-module.html#build_doc_index" title="build_doc_index()" alt="" coords="29,90,189,122" />
<area shape="rect" href="epydoc.docbuilder-module.html#merge_docs" title="merge_docs()" alt="" coords="263,202,385,234" />
<area shape="rect" href="epydoc.docbuilder-module.html#merge_attribute" title="merge_attribute()" alt="" coords="517,342,669,374" />
<area shape="rect" href="epydoc.docbuilder-module.html#merge_bases" title="merge_bases()" alt="" coords="44,146,175,178" />
<area shape="rect" href="epydoc.log-module.html#info" title="log.info()" alt="" coords="548,398,639,430" />
<area shape="rect" href="epydoc.docbuilder-module.html#merge_posarg_defaults" title="merge_posarg_defaults()" alt="" coords="5,202,213,234" />
<area shape="rect" href="epydoc.docbuilder-module.html#merge_value" title="merge_value()" alt="" coords="44,258,175,290" />
<area shape="rect" href="epydoc.docbuilder-module.html#merge_variables" title="merge_variables()" alt="" coords="31,314,188,346" />
</map>

Call Graph

Merge the API documentation information that was obtained from
  introspection with information that was obtained from parsing.
  introspect_doc and parse_doc should be two
  APIDoc instances that describe the same object.
  merge_docs combines the information from these two
  instances, and returns the merged APIDoc.

  If introspect_doc and parse_doc are
  compatible, then they will be merged -- i.e., they will be coerced
  to a common class, and their state will be stored in a shared dictionary.
  Once they have been merged, any change made to the attributes of one will
  affect the other.  The value for the each of the merged
  APIDoc's attributes is formed by combining the values of the
  source APIDocs' attributes, as follows:

      If either of the source attributes' value is UNKNOWN,
      then use the other source attribute's value.

      Otherwise, if an attribute merge function has been registered for
      the attribute, then use that function to calculate the merged value
      from the two source attribute values.

      Otherwise, if MERGE_PRECEDENCE is defined for the attribute, then
      use the attribute value from the source that it indicates.

      Otherwise, use the attribute value from the source indicated by DEFAULT_MERGE_PRECEDENCE.

  If introspect_doc and parse_doc are
  not compatible (e.g., if their values have incompatible types),
  then merge_docs() will simply return either
  introspect_doc or parse_doc, depending on the
  value of DEFAULT_MERGE_PRECEDENCE.  The two input
  APIDocs will not be merged or modified in any way.

Parameters:

cyclecheck, path - These arguments should only be provided when
          merge_docs() is called by an attribute merge
          function.  See register_attribute_mergefunc() for more
          details.

assign_canonical_names(val_doc,
        name,
        docindex,
        score=0)

  	source code

call graph

  <map id="call_graph_for_assign_canonica" name="call_graph_for_assign_canonica">
<area shape="rect" href="epydoc.apidoc.APIDoc-class.html#__cmp__" title="apidoc.APIDoc.__cmp__()" alt="" coords="509,6,733,38" />
<area shape="rect" href="epydoc.apidoc.APIDoc-class.html#__hash__" title="apidoc.APIDoc.__hash__()" alt="" coords="509,62,733,94" />
<area shape="rect" href="epydoc.apidoc.ClassDoc-class.html#apidoc_links" title="apidoc.ClassDoc.apidoc_links()" alt="" coords="492,118,751,150" />
<area shape="rect" href="epydoc.apidoc.DottedName-class.html#__init__" title="apidoc.DottedName.__init__()" alt="" coords="496,174,747,206" />
<area shape="rect" href="epydoc.apidoc.ModuleDoc-class.html#apidoc_links" title="apidoc.ModuleDoc.apidoc_links()" alt="" coords="483,230,760,262" />
<area shape="rect" href="epydoc.apidoc.PropertyDoc-class.html#apidoc_links" title="apidoc.PropertyDoc.apidoc_links()" alt="" coords="480,286,763,318" />
<area shape="rect" href="epydoc.apidoc.ValueDoc-class.html#apidoc_links" title="apidoc.ValueDoc.apidoc_links()" alt="" coords="489,342,753,374" />
<area shape="rect" href="epydoc.docbuilder-module.html#_unreachable_name_for" title="_unreachable_name_for()" alt="" coords="515,398,728,430" />
<area shape="rect" href="epydoc.docbuilder-module.html#_var_shadows_self" title="_var_shadows_self()" alt="" coords="532,454,711,486" />
<area shape="rect" href="epydoc.docbuilder-module.html#assign_canonical_names" title="assign_canonical_names()" alt="" coords="213,230,432,262" />
<area shape="rect" href="epydoc.docbuilder-module.html#build_doc_index" title="build_doc_index()" alt="" coords="5,230,165,262" />
</map>

Call Graph

  Assign a canonical name to val_doc (if it doesn't have
  one already), and (recursively) to each variable in val_doc.
  In particular, val_doc will be assigned the canonical name
  name iff either:

      val_doc's canonical name is UNKNOWN;
      or

      val_doc's current canonical name was assigned by this
      method; but the score of the new name (score) is higher
      than the score of the current name
      (score_dict[val_doc]).

  Note that canonical names will even be assigned to values like
  integers and None; but these should be harmless.

        Variables Details
        [hide private]

MERGE_PRECEDENCE

  Indicates whether information from introspection or parsing should be
  given precedence, for specific attributes.  This dictionary maps from
  attribute names to either 'introspect' or
  'parse'.

Value:

{'canonical_name': 'introspect',
 'docformat': 'parse',
 'docstring': 'introspect',
 'filename': 'parse',
 'is_alias': 'parse',
 'is_imported': 'introspect',
 'is_package': 'parse',
 'repr': 'parse',
...

DEFAULT_MERGE_PRECEDENCE

  Indicates whether information from introspection or parsing should be
  given precedence.  Should be either 'introspect' or
  'parse'

Value:

'introspect'

_attribute_mergefunc_registry

Value:

{}

_name_scores

  A dictionary mapping from each ValueDoc to the score that
  has been assigned to its current cannonical name.  If assign_canonical_names() finds a canonical name with a
  better score, then it will replace the old name.

Value:

{<ModuleDoc ConfigParser>: 2147483647,
 <ClassDoc UnicodeEncodeError>: 2147483647,
 <RoutineDoc UnicodeEncodeError.__init__>: -21,
 <RoutineDoc UnicodeEncodeError.__new__>: -21,
 <RoutineDoc UnicodeEncodeError.__str__>: -21,
 <PropertyDoc UnicodeEncodeError.encoding>: -21,
 <PropertyDoc UnicodeEncodeError.end>: -21,
 <PropertyDoc UnicodeEncodeError.message>: -21,
...

_unreachable_names

  The set of names that have been used for unreachable objects.  This is
  used to ensure there are no duplicate cannonical names assigned.
  _unreachable_names is a dictionary mapping from dotted names
  to integer ids, where the next unused unreachable name derived from
  dotted name n is DottedName('%s-%s' % (n,
  str(_unreachable_names[n]+1))

Value:

{DottedName('??'): 12,
 DottedName('??', 'APIDoc'): 4,
 DottedName('??', 'ApiLinkReader'): 2,
 DottedName('??', 'ArithmeticError'): 4,
 DottedName('??', 'AssertionError'): 1,
 DottedName('??', 'AttributeError'): 1,
 DottedName('??', 'BaseException'): 4,
 DottedName('??', 'Body'): 1,
...

_INHERITED_ATTRIBS

Value:

['descr',
 'summary',
 'metadata',
 'extra_docstring_fields',
 'type_descr',
 'arg_descrs',
 'arg_types',
 'return_descr',
...

         Home

         Trees

         Indices

         Help

epydoc 3.0beta1

    Generated by Epydoc
    3.0beta1 on Tue Feb 27 06:02:28 2007

      http://epydoc.sourceforge.net


text:
<?php namespace Configuracion;

class Error extends Controlador
{
    private $error = null;

    public function __construct($error)
    {
        parent::__construct();
        $this->error = $error;
    }

    public function index()
    {
        header("HTTP/1.0 404 ERROR");

        $data['titulo'] = '404';
        $data['error'] = $this->error;

        Vistas::mostrarPlantilla('encabezado', $data);
        Vistas::mostrar('error/404', $data);
        Vistas::mostrarPlantilla('piedepagina', $data);
    }

    public static function mostrarError($error, $class = 'alert alert-danger')
    {
        if (is_array($error)) {
            foreach ($error as $error)
            {
                $fila= "
$error
";
            }
            return $fila;
        } else {
            if (isset($error)) {
                return "
$error
";
            }
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
#if VOUCHERIFYSERVER
using System.Collections.Generic;
using Newtonsoft.Json;
using Voucherify.Core.DataModel;

namespace Voucherify.DataModel.Contexts
{
    [JsonObject]
    public class OrderUpdate
    {
        [JsonProperty(PropertyName = "status", NullValueHandling = NullValueHandling.Ignore)]
        public string Status { get; set; }

        [JsonProperty(PropertyName = "amount", NullValueHandling = NullValueHandling.Ignore)]
        public long? Amount { get; set; }

        [JsonProperty(PropertyName = "items", NullValueHandling = NullValueHandling.Ignore)]
        public List<OrderItem> Items { get; private set; }

        [JsonProperty(PropertyName = "metadata", NullValueHandling = NullValueHandling.Ignore)]
        public Metadata Metadata { get; private set; }

        public OrderUpdate()
        {
            this.Items = new List<OrderItem>();
            this.Metadata = new Metadata();
        }

        public OrderUpdate WithAmount(long? amount)
        {
            this.Amount = amount;
            return this;
        }

        public OrderUpdate WithItems(List<OrderItem> items)
        {
            this.Items = items;
            return this;
        }
    }
}
#endif


text:
import React from 'react';
import {
	StyleSheet,
	Text,
	View,
} from 'react-native';
import PropTypes from 'prop-types';
import ProgressBar from 'react-native-progress/Bar';

export default class MessageProgress extends React.Component {
	render() {
		let floatProgress = 0;
		if (this.props.currentMessage.progress) {
			if (Number(this.props.currentMessage.progress) >= 100)
				floatProgress = 1;
			else
				floatProgress = Number(this.props.currentMessage.progress) / 100;
		}
		return (
			<View style={[styles.container]}>
				<View style={{paddingBottom: 2}}>
					<Text allowFontScaling={false} style={styles.msgText}>
						{this.props.currentMessage.text}
					</Text>
				</View>
				<View style={[styles.row]}>
					<View>
						<ProgressBar progress={floatProgress} height={6}/>
					</View>
					<View>
						<Text allowFontScaling={false} style={styles.percentText}>
							{this.props.currentMessage.progress + "%"}
						</Text>
					</View>
				</View>
			</View>
		);
	}
}

const styles = StyleSheet.create({
	container: {
		marginTop: 10,
		marginBottom: 10,
	},
	row: {
		flexDirection: 'row',
		alignItems: 'center',
	},
	msgText: {
		fontSize: 14,
		color: '#0076ff',
	},
	percentText: {
		paddingLeft: 2,
		fontSize: 12,
		color: '#0076ff',
	}
});

MessageProgress.defaultProps = {
	currentMessage: {
		progress: null,//0-100
	},
};

MessageProgress.propTypes = {
	currentMessage: PropTypes.object,
};


text:
// @ts-nocheck
'use strict';
// detect-browser.js v1.0.0
// Get Browser Data

// MIT License

// Copyright (c) 2018 Ahmad Raza

// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:

// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.

// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.

function isMobile() {
    return /Mobi/.test(navigator.userAgent);
}

function getBrowserName() {
    // Opera 8.0+
    if ((window.opr && window.opr.addons)
        || window.opera
        || navigator.userAgent.indexOf(' OPR/') >= 0) {
        return 'Opera';
    }

    // Firefox 1.0+
    if (typeof InstallTrigger !== 'undefined') {
        return 'Firefox';
    }

    // Safari 3.0+ "[object HTMLElementConstructor]"
    if (/constructor/i.test(window.HTMLElement) || (function (p) {
        return p.toString() === '[object SafariRemoteNotification]';
    })(!window['safari'])) {
        return 'Safari';
    }

    // Internet Explorer 6-11
    if (/* @cc_on!@*/false || document.documentMode) {
        return 'Internet Explorer';
    }

    // Edge 20+
    if (!(document.documentMode) && window.StyleMedia) {
        return 'Microsoft Edge';
    }

    // Chrome
    if (!!window.chrome && (!!window.chrome.webstore || !!window.chrome.runtime)) {
        return 'Chrome';
    }

    // Edge Chromium
    if (isChrome && (navigator.userAgent.indexOf("Edg") != -1)) {
        return 'Edge Chromium';
    }
}

function getOSName() {
    var os;
    if (isMobile()) {
        if (/Windows/.test(navigator.userAgent)) {
            os = 'Windows';
            if (/Phone 8.0/.test(navigator.userAgent)) {
                os += ' Phone 8.0';
            } else if (/Phone 10.0/.test(navigator.userAgent)) {
                os += ' Phone 10.0';
            }
        } else if (/Android/.test(navigator.userAgent)) {
            function androidVersion() {
                if (/Android/.test(navigator.appVersion)) {
                    var v = (navigator.appVersion).match(/Android (\d+).(\d+)/);
                    return v;
                }
            }

            var ver = androidVersion();
            os = ver[0];
        } else if (/iPhone;/.test(navigator.userAgent)) {
            function iOSversion() {
                if (/iP(hone|od|ad)/.test(navigator.appVersion)) {
                    var v = (navigator.appVersion).match(/OS (\d+)_(\d+)_?(\d+)?/);
                    return [parseInt(v[1], 10), parseInt(v[2], 10), parseInt(v[3] || 0, 10)];
                }
            }

            var ver = iOSversion();
            os = 'iOS ' + ver[0] + '.' + ver[1] + '.' + ver[2];
        } else if (/iPad;/.test(navigator.userAgent)) {
            function iOSversion() {
                if (/iP(hone|od|ad)/.test(navigator.appVersion)) {
                    var v = (navigator.appVersion).match(/OS (\d+)_(\d+)_?(\d+)?/);
                    return [parseInt(v[1], 10), parseInt(v[2], 10), parseInt(v[3] || 0, 10)];
                }
            }

            var ver = iOSversion();
            os = 'iOS ' + ver[0] + '.' + ver[1] + '.' + ver[2];
        } else if (/BBd*/.test(navigator.userAgent)) {
            os = 'BlackBerry';
        }
    } else {
        if (/Windows/.test(navigator.userAgent)) {
            os = 'Windows';
            if (/5.1;/.test(navigator.userAgent)) {
                os += ' XP';
            } else if (/6.0;/.test(navigator.userAgent)) {
                os += ' Vista';
            } else if (/6.1;/.test(navigator.userAgent)) {
                os += ' 7';
            } else if (/6.2/.test(navigator.userAgent)) {
                os += ' 8';
            } else if (/10.0;/.test(navigator.userAgent)) {
                os += ' 10';
            }

            if (/64/.test(navigator.userAgent)) {
                os += ' 64-bit';
            } else {
                os += ' 32-bit';
            }
        } else if (/Macintosh/.test(navigator.userAgent)) {
            os = 'Macintosh';
            if (/OS X/.test(navigator.userAgent)) {
                os += ' OS X';
            }
        }
    }

    return os;
}

function getBrowser() {
    return {
        os: getOSName(),
        browser: getBrowserName(),
        language: navigator.language,
        languages: navigator.languages,
        user_agent: navigator.userAgent,
        device: isMobile() ? 'Mobile' : 'Desktop',
        referrer: document.referrer || 'N/A',
        online: navigator.onLine,
        timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,
        screen_resolution: screen.width + ' x ' + screen.height,
        cookie_enabled: navigator.cookieEnabled,
    };
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="urn:pubid:dita-community.org:doctypes:dita:rng:topic-urn" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
<topic
  id="topic-id">
  <title>Topic 01 (RELAX NG)</title>
  <shortdesc/>
  <prolog>
    <dc-variable-definitions>
      <dc-variable-definition name="var-01">This is Variable 01</dc-variable-definition>
      <dc-variable-definition-fallback name="var-02">This is fallback for variable-02</dc-variable-definition-fallback>
    </dc-variable-definitions>
  </prolog>

Variable ref to var-01: <dc-variableref>var-01</dc-variableref>

Variable ref to var-02: <dc-variableref>var-02</dc-variableref>

</topic>


text:
papi-rapl
=========

Adding a RAPL component to PAPI.


text:
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'

module Google
  module Apis
    module SlidesV1
      # Google Slides API
      #
      # An API for creating and editing Google Slides presentations.
      #
      # @example
      #    require 'google/apis/slides_v1'
      #
      #    Slides = Google::Apis::SlidesV1 # Alias the module
      #    service = Slides::SlidesService.new
      #
      # @see https://developers.google.com/slides/
      class SlidesService < Google::Apis::Core::BaseService
        # @return [String]
        #  API key. Your API key identifies your project and provides you with API access,
        #  quota, and reports. Required unless you provide an OAuth 2.0 token.
        attr_accessor :key

        # @return [String]
        #  Available to use for quota purposes for server-side applications. Can be any
        #  arbitrary string assigned to a user, but should not exceed 40 characters.
        attr_accessor :quota_user

        def initialize
          super('https://slides.googleapis.com/', '')
        end

        # Gets the latest version of the specified presentation.
        # @param [String] presentation_id
        #   The ID of the presentation to retrieve.
        # @param [String] quota_user
        #   Available to use for quota purposes for server-side applications. Can be any
        #   arbitrary string assigned to a user, but should not exceed 40 characters.
        # @param [String] fields
        #   Selector specifying which fields to include in a partial response.
        # @param [Google::Apis::RequestOptions] options
        #   Request-specific options
        #
        # @yield [result, err] Result & error if block supplied
        # @yieldparam result [Google::Apis::SlidesV1::Presentation] parsed result object
        # @yieldparam err [StandardError] error object if request failed
        #
        # @return [Google::Apis::SlidesV1::Presentation]
        #
        # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
        # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
        # @raise [Google::Apis::AuthorizationError] Authorization is required
        def get_presentation(presentation_id, quota_user: nil, fields: nil, options: nil, &block)
          command =  make_simple_command(:get, 'v1/presentations/{+presentationId}', options)
          command.response_representation = Google::Apis::SlidesV1::Presentation::Representation
          command.response_class = Google::Apis::SlidesV1::Presentation
          command.params['presentationId'] = presentation_id unless presentation_id.nil?
          command.query['quotaUser'] = quota_user unless quota_user.nil?
          command.query['fields'] = fields unless fields.nil?
          execute_or_queue_command(command, &block)
        end

        # Creates a new presentation using the title given in the request. Other
        # fields in the request are ignored.
        # Returns the created presentation.
        # @param [Google::Apis::SlidesV1::Presentation] presentation_object
        # @param [String] quota_user
        #   Available to use for quota purposes for server-side applications. Can be any
        #   arbitrary string assigned to a user, but should not exceed 40 characters.
        # @param [String] fields
        #   Selector specifying which fields to include in a partial response.
        # @param [Google::Apis::RequestOptions] options
        #   Request-specific options
        #
        # @yield [result, err] Result & error if block supplied
        # @yieldparam result [Google::Apis::SlidesV1::Presentation] parsed result object
        # @yieldparam err [StandardError] error object if request failed
        #
        # @return [Google::Apis::SlidesV1::Presentation]
        #
        # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
        # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
        # @raise [Google::Apis::AuthorizationError] Authorization is required
        def create_presentation(presentation_object = nil, quota_user: nil, fields: nil, options: nil, &block)
          command =  make_simple_command(:post, 'v1/presentations', options)
          command.request_representation = Google::Apis::SlidesV1::Presentation::Representation
          command.request_object = presentation_object
          command.response_representation = Google::Apis::SlidesV1::Presentation::Representation
          command.response_class = Google::Apis::SlidesV1::Presentation
          command.query['quotaUser'] = quota_user unless quota_user.nil?
          command.query['fields'] = fields unless fields.nil?
          execute_or_queue_command(command, &block)
        end

        # Applies one or more updates to the presentation.
        # Each request is validated before
        # being applied. If any request is not valid, then the entire request will
        # fail and nothing will be applied.
        # Some requests have replies to
        # give you some information about how they are applied. Other requests do
        # not need to return information; these each return an empty reply.
        # The order of replies matches that of the requests.
        # For example, suppose you call batchUpdate with four updates, and only the
        # third one returns information. The response would have two empty replies:
        # the reply to the third request, and another empty reply, in that order.
        # Because other users may be editing the presentation, the presentation
        # might not exactly reflect your changes: your changes may
        # be altered with respect to collaborator changes. If there are no
        # collaborators, the presentation should reflect your changes. In any case,
        # the updates in your request are guaranteed to be applied together
        # atomically.
        # @param [String] presentation_id
        #   The presentation to apply the updates to.
        # @param [Google::Apis::SlidesV1::BatchUpdatePresentationRequest] batch_update_presentation_request_object
        # @param [String] quota_user
        #   Available to use for quota purposes for server-side applications. Can be any
        #   arbitrary string assigned to a user, but should not exceed 40 characters.
        # @param [String] fields
        #   Selector specifying which fields to include in a partial response.
        # @param [Google::Apis::RequestOptions] options
        #   Request-specific options
        #
        # @yield [result, err] Result & error if block supplied
        # @yieldparam result [Google::Apis::SlidesV1::BatchUpdatePresentationResponse] parsed result object
        # @yieldparam err [StandardError] error object if request failed
        #
        # @return [Google::Apis::SlidesV1::BatchUpdatePresentationResponse]
        #
        # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
        # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
        # @raise [Google::Apis::AuthorizationError] Authorization is required
        def batch_update_presentation(presentation_id, batch_update_presentation_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
          command =  make_simple_command(:post, 'v1/presentations/{presentationId}:batchUpdate', options)
          command.request_representation = Google::Apis::SlidesV1::BatchUpdatePresentationRequest::Representation
          command.request_object = batch_update_presentation_request_object
          command.response_representation = Google::Apis::SlidesV1::BatchUpdatePresentationResponse::Representation
          command.response_class = Google::Apis::SlidesV1::BatchUpdatePresentationResponse
          command.params['presentationId'] = presentation_id unless presentation_id.nil?
          command.query['quotaUser'] = quota_user unless quota_user.nil?
          command.query['fields'] = fields unless fields.nil?
          execute_or_queue_command(command, &block)
        end

        # Gets the latest version of the specified page in the presentation.
        # @param [String] presentation_id
        #   The ID of the presentation to retrieve.
        # @param [String] page_object_id
        #   The object ID of the page to retrieve.
        # @param [String] quota_user
        #   Available to use for quota purposes for server-side applications. Can be any
        #   arbitrary string assigned to a user, but should not exceed 40 characters.
        # @param [String] fields
        #   Selector specifying which fields to include in a partial response.
        # @param [Google::Apis::RequestOptions] options
        #   Request-specific options
        #
        # @yield [result, err] Result & error if block supplied
        # @yieldparam result [Google::Apis::SlidesV1::Page] parsed result object
        # @yieldparam err [StandardError] error object if request failed
        #
        # @return [Google::Apis::SlidesV1::Page]
        #
        # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
        # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
        # @raise [Google::Apis::AuthorizationError] Authorization is required
        def get_presentation_page(presentation_id, page_object_id, quota_user: nil, fields: nil, options: nil, &block)
          command =  make_simple_command(:get, 'v1/presentations/{presentationId}/pages/{pageObjectId}', options)
          command.response_representation = Google::Apis::SlidesV1::Page::Representation
          command.response_class = Google::Apis::SlidesV1::Page
          command.params['presentationId'] = presentation_id unless presentation_id.nil?
          command.params['pageObjectId'] = page_object_id unless page_object_id.nil?
          command.query['quotaUser'] = quota_user unless quota_user.nil?
          command.query['fields'] = fields unless fields.nil?
          execute_or_queue_command(command, &block)
        end

        protected

        def apply_command_defaults(command)
          command.query['key'] = key unless key.nil?
          command.query['quotaUser'] = quota_user unless quota_user.nil?
        end
      end
    end
  end
end


text:
@class ParserAtom;
@class ExpressionElement;

@interface ParserAtomResolver : NSObject

- (instancetype)initWithAtom:(ParserAtom *)atom error:(NSError *__autoreleasing*)error;

- (ExpressionElement *)expressionWithError:(NSError *__autoreleasing*)error;

@end


text:
package org.lambda4j.predicate;

import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

class ThrowableLongPredicateTest {

    @Test
    void of_givenExpression_returnsFunctionalInterface() {
        ThrowableLongPredicate<Throwable> predicate = ThrowableLongPredicate.of(value -> false);
        Assertions.assertNotNull(predicate);
    }

    @Test
    void of_givenNull_returnsNull() {
        ThrowableLongPredicate<Throwable> predicate = ThrowableLongPredicate.of(null);
        Assertions.assertNull(predicate);
    }

    @Test
    void call_givenExpression_executesFunctionalInterface() {
        Assertions.assertFalse(ThrowableLongPredicate.call(value -> false, 0L));
    }

    @Test
    void call_givenNullExpression_throwsException() {
        Assertions.assertThrows(NullPointerException.class, () -> ThrowableLongPredicate.call(null, 0L));
    }

    @Test
    void constant_givenValue_returnsAlwaysValue() {
        boolean ret = false;
        ThrowableLongPredicate<Throwable> predicate = ThrowableLongPredicate.constant(ret);
        Assertions.assertDoesNotThrow(() -> {
            Assertions.assertEquals(ret, predicate.testThrows(0L));
            Assertions.assertFalse(predicate.testThrows(0L));
        });
    }

    @Test
    void alwaysTrue_givenNothing_returnsAlwaysValue() {
        ThrowableLongPredicate<Throwable> predicate = ThrowableLongPredicate.alwaysTrue();
        Assertions.assertDoesNotThrow(() -> Assertions.assertTrue(predicate.testThrows(0L)));
    }

    @Test
    void alwaysFalse_givenNothing_returnsAlwaysValue() {
        ThrowableLongPredicate<Throwable> predicate = ThrowableLongPredicate.alwaysFalse();
        Assertions.assertDoesNotThrow(() -> Assertions.assertFalse(predicate.testThrows(0L)));
    }

    @Test
    void isEqual_givenSame_returnsTrue() {
        ThrowableLongPredicate<Throwable> predicate = ThrowableLongPredicate.isEqual(0L);
        Assertions.assertDoesNotThrow(() -> Assertions.assertTrue(predicate.testThrows(0L)));
    }

    @Test
    void isEqual_givenDifferent_returnsFalse() {
        ThrowableLongPredicate<Throwable> predicate = ThrowableLongPredicate.isEqual(1L);
        Assertions.assertDoesNotThrow(() -> Assertions.assertFalse(predicate.testThrows(0L)));
    }
}


text:
package org.kuali.kfs.fp.document.web.struts;

import org.kuali.kfs.fp.document.TransferOfFundsDocument;
import org.kuali.kfs.sys.web.struts.KualiAccountingDocumentFormBase;

/**
 * This class is the form class for the Transfer of Funds document. This method extends the parent
 * KualiTransactionalDocumentFormBase class which contains all of the common form methods and form attributes needed by the Transfer
 * of Funds document. It adds a new method which is a convenience method for getting at the Transfer of Funds document easier.
 */
public class TransferOfFundsForm extends KualiAccountingDocumentFormBase {
    private static final long serialVersionUID = 1L;

    /**
     * Constructs a TransferOfFundsForm instance and sets up the appropriately casted document.
     */
    public TransferOfFundsForm() {
        super();
    }

    @Override
    protected String getDefaultDocumentTypeName() {
        return "TF";
    }

    /**
     * @return Returns the serviceBillingDocument.
     */
    public TransferOfFundsDocument getTransferOfFundsDocument() {
        return (TransferOfFundsDocument) getDocument();
    }
}


text:
cask "dataspell" do
  arch = Hardware::CPU.intel? ? "" : "-aarch64"

  version "2022.1.3,221.5921.20"

  if Hardware::CPU.intel?
    sha256 "574ab38ef23cfe1110966825269d97fad0c5d61e1db168a098a8ad8c928d2305"
  else
    sha256 "dcf07d7749bf95e0e1bc7cdb033d039ed8b1b1eff04f633e281124b4a45ce2a2"
  end

  url "https://download.jetbrains.com/python/dataspell-#{version.csv.first}#{arch}.dmg"
  name "DataSpell"
  desc "IDE for Professional Data Scientists"
  homepage "https://www.jetbrains.com/dataspell/"

  livecheck do
    url "https://data.services.jetbrains.com/products/releases?code=DS&latest=true&type=release"
    strategy :page_match do |page|
      JSON.parse(page)["DS"].map do |release|
        "#{release["version"]},#{release["build"]}"
      end
    end
  end

  auto_updates true
  depends_on macos: ">= :high_sierra"

  app "DataSpell.app"

  uninstall_postflight do
    ENV["PATH"].split(File::PATH_SEPARATOR).map { |path| File.join(path, "dataspell") }.each do |path|
      if File.exist?(path) &&
         File.readlines(path).grep(/# see com.intellij.idea.SocketLock for the server side of this interface/).any?
        File.delete(path)
      end
    end
  end

  zap trash: [
    "~/Library/Application Support/DataSpell*",
    "~/Library/Application Support/JetBrains/DataSpell*",
    "~/Library/Caches/JetBrains/DataSpell*",
    "~/Library/Logs/JetBrains/DataSpell*",
    "~/Library/Preferences/com.jetbrains.dataspell.plist",
    "~/Library/Preferences/DataSpell*",
    "~/Library/Preferences/jetbrains.dataspell.*.plist",
    "~/Library/Saved Application State/com.jetbrains.dataspell.savedState",
  ]
end


text:
package epsi.md4.com.epsicalendar.activities;

import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ListView;
import android.widget.Toast;

import java.util.List;

import epsi.md4.com.epsicalendar.Common;
import epsi.md4.com.epsicalendar.R;
import epsi.md4.com.epsicalendar.adapters.EventItemAdapter;
import epsi.md4.com.epsicalendar.beans.Event;
import epsi.md4.com.epsicalendar.ws.ApiClient;
import retrofit.Callback;
import retrofit.Response;
import retrofit.Retrofit;

public class EventListActivity extends AppCompatActivity implements AdapterView.OnItemClickListener {

    public static final int EVENT_FORM_ACTIVITY_REQUEST_CODE = 1;
    public static final String TAG = EventListActivity.class.getName();
    public static final String EXTRA_EVENT_ID = "EXTRA_EVENT_ID";
    private ListView mList;
    private ApiClient mApiClient;
    private SharedPreferences mSharedPrefs;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        // Init view
        setContentView(R.layout.activity_event_list);

        // Init fields
        this.mList = (ListView) findViewById(R.id.event_list_view);
        this.mSharedPrefs = getSharedPreferences(Common.PREFS_SCOPE, Context.MODE_PRIVATE);

        mApiClient = new ApiClient(this);
    }

    /**
     * Refresh data
     */
    private void refreshData() {

        mApiClient.listEvents().enqueue(new Callback<List<Event>>() {
            @Override
            public void onResponse(Response<List<Event>> response, Retrofit retrofit) {
                Log.v(TAG, String.format("listEvents.response: %d", response.code()));
                if (response.isSuccess()) {
                    EventItemAdapter eventItemAdapter = new EventItemAdapter(EventListActivity.this, response.body());
                    mList.setOnItemClickListener(EventListActivity.this);
                    mList.setAdapter(eventItemAdapter);
                } else {
                    Log.e(TAG, "can't get events from api ");
                }
            }

            @Override
            public void onFailure(Throwable t) {
                Log.e(TAG, String.format("Error: %s", t.getMessage()));
            }
        });
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

        if (requestCode == EventFormActivity.REQUEST_CODE) {
            if (resultCode == EventFormActivity.RESULT_OK) {
                Log.d(TAG, "new event, refreshing list");
                refreshData();
            } else if (resultCode == EventFormActivity.RESULT_CANCELED) {
                Log.d(TAG, "operation cancelled");
            }
        }
    }

    public void onClickAddEvent(View view) {
        Intent intent = new Intent(EventListActivity.this, EventFormActivity.class);
        this.startActivityForResult(intent, EVENT_FORM_ACTIVITY_REQUEST_CODE);
    }

    @Override
    protected void onResume() {
        super.onResume();

        Log.v(TAG, String.format("prefs.USER_EMAIL_KEY = %s", mSharedPrefs.getString(Common.USER_EMAIL_KEY, "")));
        if (mSharedPrefs.getString(Common.USER_EMAIL_KEY, "").equals("")) {
            Intent intent = new Intent(this, UserFormActivity.class);
            startActivity(intent);
        } else {
            refreshData();
        }
    }

    public void onClickDisconnect(View view) {
        mApiClient.logout().enqueue(new Callback<Void>() {

            @Override
            public void onResponse(Response<Void> response, Retrofit retrofit) {
                localDisconnect();
                onResume();
            }

            @Override
            public void onFailure(Throwable t) {
                Toast.makeText(EventListActivity.this, "Can not logout", Toast.LENGTH_SHORT).show();
                Log.e(TAG, String.format("Error while logging out: %s", t.getLocalizedMessage()));
            }
        });

    }

    private void localDisconnect() {
        Log.v(TAG, String.format("Clearing %s prefs", Common.PREFS_SCOPE));
        SharedPreferences.Editor edit = this.mSharedPrefs.edit();
        edit.clear();
        edit.apply();
    }

    /**
     * Listener for list item click
     *
     * @param parent
     * @param view
     * @param position
     * @param id
     */
    @Override
    public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
        Event clickedItem = (Event) parent.getItemAtPosition(position);
        Log.v(TAG, clickedItem.toString());
        Intent intent = new Intent(this, EventItemActivity.class);
        intent.putExtra(EXTRA_EVENT_ID, clickedItem.getId().toString());
        startActivity(intent);
    }
}


text:
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB)
// Reference Implementation, v2.2.8-b130911.1802
// See http://java.sun.com/xml/jaxb
// Any modifications to this file will be lost upon recompilation of the source
// schema.
// Generated on: 2016.05.30 at 07:47:34 PM JST
//
package org.sbml.sbml.level2.version4;

import java.util.ArrayList;
import java.util.List;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;

// TODO: Auto-generated Javadoc
/**
 *

 * Java class for ListOfEventAssignments complex type.
 *

 * The following schema fragment specifies the expected content contained within
 * this class.
 *
 *

 * <complexType name="ListOfEventAssignments">
 *   <complexContent>
 *     <extension base="{http://www.sbml.org/sbml/level2/version4}SBase">
 *       <sequence>
 *         <element name="eventAssignment" type="{http://www.sbml.org/sbml/level2/version4}EventAssignment" maxOccurs="unbounded"/>
 *       </sequence>
 *     </extension>
 *   </complexContent>
 * </complexType>
 *

 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ListOfEventAssignments", propOrder = {"eventAssignment"})
public class ListOfEventAssignments extends SBase {

  /** The event assignment. */
  @XmlElement(required = true)
  protected List<EventAssignment> eventAssignment;

  /**
   * Gets the value of the eventAssignment property.
   *

   * This accessor method returns a reference to the live list, not a snapshot.
   * Therefore any modification you make to the returned list will be present
   * inside the JAXB object. This is why there is not a set method
   * for the eventAssignment property.
   *

   * For example, to add a new item, do as follows:
   *
   *

   * getEventAssignment().add(newItem);
   *

   *

   * Objects of the following type(s) are allowed in the list
   * {@link EventAssignment }
   *
   * @return the event assignment
   */
  public List<EventAssignment> getEventAssignment() {
    if (eventAssignment == null) {
      eventAssignment = new ArrayList<EventAssignment>();
    }
    return this.eventAssignment;
  }
}


text:
 #define CAN_MTU         (sizeof(struct can_frame))
#endif
#ifndef CAN_MAX_DLEN
 #define CAN_MAX_DLEN 8
#endif

#include <caml/mlvalues.h>
#include <caml/memory.h>
#include <caml/alloc.h>
#include <caml/threads.h>
#include <caml/callback.h>
#include <caml/fail.h>
#include <caml/unixsupport.h>

#include <posix-time/posix-time.h>

static value eunix;

CAMLprim value bcm_initialize(void) {
  CAMLparam0();
  eunix = caml_hash_variant("EUnix");
  CAMLreturn (Val_unit);
}

CAMLprim value bcm_open(value ifname) {
  CAMLparam1(ifname);
  CAMLlocal2(result, perrno);

  int fd = -1;
  struct ifreq ifr;
  struct sockaddr_can addr;
  size_t ifnamelen;
  int lerrno = 0;

  ifnamelen = caml_string_length(ifname);
  if ((ifnamelen + 1) > sizeof(ifr.ifr_name)) {
    lerrno = ENAMETOOLONG;
    goto ERROR_CLEAN;
  }

  // copy string and put terminating \0 at it's end
  memcpy(ifr.ifr_name, String_val(ifname), ifnamelen);
  ifr.ifr_name[ifnamelen] = '\0';

  caml_release_runtime_system();

  if (0 > (fd = socket(PF_CAN, SOCK_DGRAM, CAN_BCM))) {
    lerrno = errno;
    goto ERROR;
  }

  if (-1 == ioctl(fd, SIOCGIFINDEX, &ifr)) {
    lerrno = errno;
    goto ERROR;
  }
  addr.can_family = AF_CAN;
  addr.can_ifindex = ifr.ifr_ifindex;

  if (0 > connect(fd, (struct sockaddr*)&addr, sizeof(addr))) {
    lerrno = errno;
    goto ERROR;
  }
  assert(-1 != fd);

  caml_acquire_runtime_system();

  result = caml_alloc(1, 0); // Result.Ok
  Store_field(result, 0, Val_long(fd));
  goto END;

ERROR:
  close(fd);
  caml_acquire_runtime_system();

ERROR_CLEAN:
  perrno = caml_alloc(2, 0);
  Store_field(perrno, 0, eunix); // `EUnix
  Store_field(perrno, 1, unix_error_of_code(lerrno));

  result = caml_alloc(1, 1); // Result.Error
  Store_field(result, 0, perrno);

END:
  CAMLreturn(result);
}

static int bcm_opcode_table[12] = {
  TX_SETUP,
  TX_DELETE,
  TX_READ,
  TX_SEND,
  TX_STATUS,
  TX_EXPIRED,
  RX_SETUP,
  RX_DELETE,
  RX_READ,
  RX_STATUS,
  RX_TIMEOUT,
  RX_CHANGED
};

static int bcm_flag_table[11] = {
  SETTIMER,
  STARTTIMER,
  TX_COUNTEVT,
  TX_ANNOUNCE,
  TX_CP_CAN_ID,
  RX_FILTER_ID,
  RX_CHECK_DLC,
  RX_NO_AUTOTIMER,
  RX_ANNOUNCE_RESUME,
  TX_RESET_MULTI_IDX,
  RX_RTR_FRAME
};

CAMLprim value bcm_write(value socket, value opcodes, value flags, value options, value frames) {
  CAMLparam5(socket, opcodes, flags, options, frames);
  CAMLlocal5(head, tail, data, result, perrno);

  int fd;
  struct bcm_msg_head * msg;
  uint32_t nframes, i;
  size_t msg_size, rc, dlc;
  struct timeval t1, t2;

  // compute List.length of frames list
  for (nframes = 0, tail = frames; Val_emptylist != tail; nframes++, tail = Field(tail, 1)) {}

  msg_size = sizeof(struct bcm_msg_head) + nframes * sizeof(struct can_frame);
  msg = alloca(msg_size);

  fd = Long_val(socket);

  msg->opcode = convert_flag_list(opcodes, bcm_opcode_table);
  msg->flags = convert_flag_list(flags, bcm_flag_table);
  msg->count = Int_val(Field(options, 0));

  t1 = timeval_val(Field(options, 1));
  msg->ival1.tv_sec = t1.tv_sec;
  msg->ival1.tv_usec = t1.tv_usec;

  t2 = timeval_val(Field(options, 2));
  msg->ival2.tv_sec = t2.tv_sec;
  msg->ival2.tv_usec = t2.tv_usec;

  msg->can_id = Int32_val(Field(options, 3));
  msg->nframes = nframes;

  // copy the can-frames from the frames list to bcm_msg_head
  for (i = 0, tail = frames; Val_emptylist != tail; i++, tail = Field(tail, 1)) {
    assert(i < nframes);
    head = Field(tail, 0);

    msg->frames[i].can_id = Int32_val(Field(head, 0));

    data = Field(head, 1);
    dlc = caml_string_length(data);
    assert(dlc <= CAN_MAX_DLEN);
    msg->frames[i].can_dlc = dlc;

    memcpy(& msg->frames[i].data, String_val(data), dlc);
  }

  caml_release_runtime_system();
  rc = write(fd, msg, msg_size);
  caml_acquire_runtime_system();

  if (rc != msg_size) {
    perrno = caml_alloc(2, 0);
    Store_field(perrno, 0, eunix); // `EUnix
    Store_field(perrno, 1, unix_error_of_code(errno));

    result = caml_alloc(1, 1); // Result.Error
    Store_field(result, 0, perrno);
  } else {
    result = caml_alloc(1, 0); // Result.Ok ()
    Store_field(result, 0, Val_unit);
  }

  CAMLreturn(result);
}


text:
package mockit.internal.util;

import javax.annotation.*;

import mockit.external.asm.*;
import static mockit.external.asm.Opcodes.*;

public final class TypeConversion
{
   private static final String[] PRIMITIVE_WRAPPER_TYPE = {
      null, "java/lang/Boolean", "java/lang/Character", "java/lang/Byte", "java/lang/Short", "java/lang/Integer",
      "java/lang/Float", "java/lang/Long", "java/lang/Double"
   };
   private static final String PRIMITIVE_WRAPPER_TYPES =
      "java/lang/Boolean   java/lang/Character java/lang/Byte      java/lang/Short     " +
      "java/lang/Integer   java/lang/Float     java/lang/Long      java/lang/Double";
   private static final String[] UNBOXING_NAME = {
      null, "booleanValue", "charValue", "byteValue", "shortValue", "intValue", "floatValue", "longValue", "doubleValue"
   };
   private static final String[] UNBOXING_DESC = {null, "()Z", "()C", "()B", "()S", "()I", "()F", "()J", "()D"};

   private TypeConversion() {}

   public static void generateCastToObject(@Nonnull MethodVisitor mv, @Nonnull Type type)
   {
      int sort = type.getSort();

      if (sort < Type.ARRAY) {
         String wrapperType = PRIMITIVE_WRAPPER_TYPE[sort];
         String desc = '(' + type.getDescriptor() + ")L" + wrapperType + ';';
         mv.visitMethodInsn(INVOKESTATIC, wrapperType, "valueOf", desc, false);
      }
   }

   public static void generateCastFromObject(@Nonnull MethodVisitor mv, @Nonnull Type toType)
   {
      int sort = toType.getSort();

      if (sort == Type.VOID) {
         mv.visitInsn(POP);
      }
      else {
         generateTypeCheck(mv, toType);

         if (sort < Type.ARRAY) {
            mv.visitMethodInsn(
               INVOKEVIRTUAL, PRIMITIVE_WRAPPER_TYPE[sort], UNBOXING_NAME[sort], UNBOXING_DESC[sort], false);
         }
      }
   }

   private static void generateTypeCheck(@Nonnull MethodVisitor mv, @Nonnull Type toType)
   {
      int sort = toType.getSort();
      String typeDesc;

      switch (sort) {
         case Type.ARRAY: typeDesc = toType.getDescriptor(); break;
         case Type.OBJECT: typeDesc = toType.getInternalName(); break;
         default: typeDesc = PRIMITIVE_WRAPPER_TYPE[sort];
      }

      mv.visitTypeInsn(CHECKCAST, typeDesc);
   }

   public static void generateCastOrUnboxing(@Nonnull MethodVisitor mv, @Nonnull Type parameterType, int opcode)
   {
      if (opcode == ASTORE) {
         generateTypeCheck(mv, parameterType);
         return;
      }

      int sort = parameterType.getSort();
      String typeDesc;

      if (sort < Type.ARRAY) {
         typeDesc = PRIMITIVE_WRAPPER_TYPE[sort];
      }
      else {
         typeDesc = parameterType.getInternalName();
         int i = PRIMITIVE_WRAPPER_TYPES.indexOf(typeDesc);

         if (i >= 0) {
            sort = i / 20 + 1;
         }
         else if (opcode == ISTORE && "java/lang/Number".equals(typeDesc)) {
            sort = Type.INT;
         }
         else {
            sort = Type.INT;

            //noinspection SwitchStatementWithoutDefaultBranch
            switch (opcode) {
               case FSTORE: sort = Type.FLOAT; break;
               case LSTORE: sort = Type.LONG; break;
               case DSTORE: sort = Type.DOUBLE;
            }

            typeDesc = PRIMITIVE_WRAPPER_TYPE[sort];
         }
      }

      mv.visitTypeInsn(CHECKCAST, typeDesc);
      mv.visitMethodInsn(INVOKEVIRTUAL, typeDesc, UNBOXING_NAME[sort], UNBOXING_DESC[sort], false);
   }

   public static boolean isPrimitiveWrapper(@Nonnull String typeDesc)
   {
      return PRIMITIVE_WRAPPER_TYPES.contains(typeDesc);
   }

   public static boolean isBoxing(@Nonnull String owner, @Nonnull String name, @Nonnull String desc)
   {
      return desc.charAt(2) == ')' && "valueOf".equals(name) && isPrimitiveWrapper(owner);
   }

   public static boolean isUnboxing(int opcode, @Nonnull String owner, @Nonnull String desc)
   {
      return opcode == INVOKEVIRTUAL && desc.charAt(1) == ')' && isPrimitiveWrapper(owner);
   }
}


text:
package Networking.Requests;

/**
 * This class contains final static integer fields representing a type of
 * request.
 */
public final class RequestType {

    public final static int REGISTER_ACTIVITY = 0;
    public final static int GET_MATCH_LIST = 1;
    public final static int HOST_MATCH = 2;
    public final static int CHAT_MESSAGE = 3;
    public final static int PLAYER_CONNECT = 4;
    public final static int ADD_PLAYER = 5;
    public final static int REMOVE_PLAYER = 6;
    public final static int ENTITIY_UPDATE = 7;
    public final static int LOGIN_ACCOUNT = 8;
    public final static int BOOLEAN_RESPONSE = 9;
    public final static int REGISTER_ACCOUNT = 10;
    public final static int SOURCE_FILE_TRANSFER = 11;
    public final static int START_BATTLE = 12;
    public final static int SOURCE_FILE_RECEIVED = 13;
    public final static int END_BATTLE = 14;
    public final static int GET_PLAYER_STATE_LIST = 15;
    public final static int END_BATTLE_DB_UPDATE = 16;
    public final static int SOURCE_FILE_REMOVED = 17;
}


text:
package com.jeesmon.malayalambible;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.ScrollView;

public class ObservableScrollView extends ScrollView {

	private IScrollListener listener = null;

	public ObservableScrollView(Context context) {
		super(context);
	}

	public ObservableScrollView(Context context, AttributeSet attrs,
			int defStyle) {
		super(context, attrs, defStyle);
	}

	public ObservableScrollView(Context context, AttributeSet attrs) {
		super(context, attrs);
	}

	public void setScrollViewListener(IScrollListener listener) {
		this.listener = listener;
	}

	@Override
	protected void onScrollChanged(int x, int y, int oldx, int oldy) {
		super.onScrollChanged(x, y, oldx, oldy);
		if (listener != null) {
			listener.onScrollChanged(this, x, y, oldx, oldy);
		}
	}
}


text:
//  See http://www.boost.org/libs/config for the most recent version.

// Test file for macro BOOST_NO_STRINGSTREAM
// This file should compile, if it does not then
// BOOST_NO_STRINGSTREAM should be defined.
// See file boost_no_sstream.ipp for details

// Must not have BOOST_ASSERT_CONFIG set; it defeats
// the objective of this file:
#ifdef BOOST_ASSERT_CONFIG
#  undef BOOST_ASSERT_CONFIG
#endif

#include <boost/config.hpp>
#include "test.hpp"

#ifndef BOOST_NO_STRINGSTREAM
#include "boost_no_sstream.ipp"
#else
namespace boost_no_stringstream = empty_boost;
#endif

int main( int, char *[] )
{
   return boost_no_stringstream::test();
}


text:
maintainer       "Opscode, Inc."
maintainer_email "cookbooks@opscode.com"
license          "Apache 2.0"
description      "Installs zlib"
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version          IO.read(File.join(File.dirname(__FILE__), 'VERSION'))

recipe "zlib", "Installs zlib development package"

%w{ centos redhat scientific suse fedora ubuntu debian }.each do |os|
  supports os
end


text:
package org.olat.course.nodes.projectbroker.service;

import org.olat.core.gui.translator.Translator;
import org.olat.core.id.Identity;
import org.olat.core.util.mail.MailTemplate;
import org.olat.core.util.mail.MailerResult;
import org.olat.course.nodes.projectbroker.datamodel.Project;

/**
 * @author guretzki
 */

public interface ProjectBrokerMailer {
	/**
	 * Send enrolled mail to student.
	 *
	 * @param enrolledIdentity
	 * @param project
	 * @param pT
	 * @return
	 */
	public MailerResult sendEnrolledEmailToParticipant(Identity enrolledIdentity, Project project, Translator pT);

	/**
	 * Send enrolled mail to project managers.
	 *
	 * @param enrolledIdentity
	 * @param project
	 * @param pT
	 * @return
	 */
	public MailerResult sendEnrolledEmailToManager(Identity enrolledIdentity, Project project, Translator pT);

	/**
	 * Send 'cancel enrollment' confirmation email to candidates.
	 *
	 * @param identity
	 * @param currentProject
	 * @param pT
	 * @return
	 */
	public MailerResult sendCancelEnrollmentEmailToParticipant(Identity identity, Project currentProject, Translator pT);

	/**
	 * Send 'cancel enrollment' information email to project-managers.
	 *
	 * @param identity
	 * @param currentProject
	 * @param pT
	 * @return
	 */
	public MailerResult sendCancelEnrollmentEmailToManager(Identity identity, Project currentProject, Translator pT);

	/**
	 * Send 'Project has been changed' email to participants.
	 *
	 * @param identity
	 * @param project
	 * @param pT
	 * @return
	 */
	public MailerResult sendProjectChangedEmailToParticipants(Identity identity, Project project, Translator pT);

	/**
	 * Send 'Deleted Project' email to participants.
	 *
	 * @param identity
	 * @param project
	 * @param pT
	 * @return
	 */
	public MailerResult sendProjectDeletedEmailToParticipants(Identity identity, Project project, Translator pT);

	/**
	 * Create mail-template which can be used when a candidate will be removed.
	 *
	 * @param project
	 * @param projectManager
	 * @param pT
	 * @return
	 */
	public MailTemplate createRemoveAsCandiadateMailTemplate(Project project, Identity projectManager, Translator pT);

	/**
	 * Create mail-template which can be used when a candidate will be accepted.
	 *
	 * @param project
	 * @param projectManager
	 * @param pT
	 * @return
	 */
	public MailTemplate createAcceptCandiadateMailTemplate(Project project, Identity projectManager, Translator pT);

	/**
	 * Create mail-template which can be used when a candidate will be added as candidate.
	 *
	 * @param project
	 * @param projectManager
	 * @param translator
	 * @return
	 */
	public MailTemplate createAddCandidateMailTemplate(Project project, Identity projectManager, Translator translator);

	/**
	 * Create mail-template which can be used when a participant will be removed.
	 *
	 * @param project
	 * @param identity
	 * @param translator
	 * @return
	 */
	public MailTemplate createRemoveParticipantMailTemplate(Project project, Identity identity, Translator translator);

	/**
	 * Create mail-template which can be used when a participant will be added as participant.
	 *
	 * @param project
	 * @param identity
	 * @param translator
	 * @return
	 */
	public MailTemplate createAddParticipantMailTemplate(Project project, Identity identity, Translator translator);
}